RTC6 boards
Doc. Rev. 1.0.21 en-US
10 RTC6 Commands
573
Undelayed
Short List
Command
periodic_toggle_list
Function Generates and periodically toggles a signal at an adjustable output port.
Call
periodic_toggle_list( Port, Mask, P1, P2, Count, Start )
Parameters
Port
Output port (0…4, as with set_port_default).
As an unsigned 32-bit value.
Mask
Defines the bits to be toggled, (the maximum value depends on the port).
1 = bit is toggled.
0 = bit remains unchanged.
As an unsigned 32-bit value.
P1
Duration of the toggled signal in [10 µs] (> 0, 16 bit max.).
As an unsigned 32-bit value.
P2
Duration of the toggled signal in [10 µs] (> 0, 16 bit max.).
As an unsigned 32-bit value.
Count
Number of P1–P2 period repetitions.
As an unsigned 32-bit value.
Start
Duration until the first toggling starts in [10 µs].
As an unsigned 32-bit value.
Comments • If an unallowed parameter value is supplied for
Port
or 0 for
P1
or
P2
, then
periodic_toggle_list is replaced by a list_nop and a get_last_error return code
RTC6_PARAM_ERROR
is generated.
•
Mask
defines the bits to be toggled. Bits which are set to 1 in
Mask
are toggled and bits
which are set to 0 remain unchanged.
Mask
is limited to the maximum allowed value of
the selected port (see also set_port_default). Extra bits are ignored.
• The selected bits are toggled. This state is maintained for
P1
10 µs clock cycles. Then
they are toggled once again and kept stable for
P2
10 µs clock cycles. Users define
the toggle bit start values (“off” state; “on” signal is active-HIGH or active-LOW) by
other standard commands (write_da_x, write_8bit_port, write_io_port, etc.).
These – and (should the situation arise) other queued delayed short list commands –
are executed before periodic_toggle_list.
• The first toggling occurs after
Start
10 µs clock cycles. Toggling is repeated
Count
-times.
Count
= 0 immediately stops an output in progress. The remaining
parameters are then not relevant. If the stop happens in the
P1
period (“On”), a toggle
occurs to restore the initial state (“Off”).
• The parameters
P1
and
P2
are clipped to the value range [0…65,535].
P1
and
P2
must
not be 0 at the same time.
• The selected port should not concurrently be used for other outputs such as
“Automatic Laser Control“.
• At a set_end_of_list, stop_execution or external /STOP the periodical signals
continue.
• periodic_toggle_list toggles endless with
Count
= 2
32
–1.
• See also Chapter 9.4 ”Periodical I/O Signals”, page 301.