Pulse Instructions

You can set a duration for output signals (a signal can be turned on or off for a specified amount of time) which is called a pulse instruction. This instruction asynchronously changes the value of a Boolean or Integer output signal.

When a Pulse instruction is created within a sequence of logic, the user must provide the following parameters:

The affected signal
It must be an output Boolean or integer signal of the resource. You use a selector to specify the Boolean or integer output. If the type or direction of the signal is modified after the creation of the pulse instruction, you are notified of inconsistencies when running the simulation.
The value to be set
It can be true or false for Boolean output or it can be any integer for integer output. The type of the signal is modified after the creation of the pulse instruction, and the value no longer matches the signal type, you are notified of inconsistencies when running the simulation. You do not specify a value for the inverted pulse.
The duration time during which the signal value is set
If empty, it is treated as infinite and the pulse behaves like an assignment. Otherwise, it must be positive.
A delay time after which the pulse is applied on the signal
Its default is 0. It must be positive.

A pulse instruction modifies the value of the related signal at two times:

  • The first transition happens at the execution of the pulse instruction, or after a delay if specified. Whatever the previous value of the signal it is set to the specified value (like an assignment).
  • The second transition happens as much time after the first change as specified in the duration parameter. The change consists of the inversion of the specified value for Boolean outputs, and of the valuation to 0 for integer outputs. If the duration is not specified, it is considered as infinite and this second transition does not happen.

Aside from these changes, a pulse instruction does not affect a signal. It means that other instructions (assignments or other pulses) can modify the value of the same signal during the delay or the duration times.

IO is changed before cycle computation, and are changed before executing the second pulse instruction. It is the reason why the first pulse instruction is not canceled. You cannot change IO values during the cycle.