This page has no translation to Русский yet. The original English version is below. If you’d like to help, great! See how to translate a documentation page in the contribution guide.
Note This is a web-version of a tutorial chapter embedded right into the XOD IDE. To get a better learning experience we recommend to install the desktop IDE or start the browser-based IDE, and you’ll see the same tutorial there.

Pulses

Screenshot of 009-pulses

In previous lessons, we told that the clock node ticks. To be more precise, the node outputs pulses.

This data type is very different from all the others like numbers and booleans. Values ​​in the XOD are transferred to the links continuously, even if they don’t change. They are like voltage. The pulse data type is different. Imagine something like a flash. It’s basically a message to trigger something else. It does not transmit any data. Howerver, it is useful when you need to convey that an event has occurred or tell something else to work.

And of course, XOD offers a tweak-pulse node to send pulses manually during simulation.

Exercice

Let’s play with pulses using tweak-pulse.

  1. Run the simulation.
  2. Select the tweak-pulse node.
  3. Press the “pulse” button in the Inspector; the counter will reset back to 0.
  4. Replace the clock node with an another tweak-pulse and restart the simulation.
  5. Increment the counter by manually sending pulses to INC pin.
Found a typo or mistake? Want to improve the text? Edit this page on GitHub and open a pull request. If you have a complex proposal or you want to discuss the content, feel free to start a new thread on XOD forum.