Using the assert function to generate output triggers
You can use certain trigger objects to generate output triggers on demand. These trigger objects are
the digital I/O lines, TSP-Link synchronization lines, and the LAN.
The programming example below illustrates how to generate an output trigger using the assert
function of the trigger object.
Connection parameters and commands that establish a connection are not shown in this example.
-- Generate a falling-edge trigger on digital I/O line 3.
digio.trigger[3].mode = digio.TRIG_FALLING
digio.trigger[3].assert()
-- Generate a rising edge trigger on TSP-Link sync line 1.
tsplink.trigger[1].mode = tsplink.TRIG_RISINGM
tsplink.trigger[1].assert()
-- Generate a LAN trigger on LAN pseudo line 6.
lan.trigger[6].mode = lan.TRIG_EITHER
lan.trigger[6].assert()
Using the release function of the hardware lines
Use the release function to allow the hardware line to output another external trigger when the pulse
width is set to 0.
Setting the pulse width to 0 results in an indefinite length pulse when the assert function is used to
output an external trigger. When an indefinite length pulse is used, the release function must be used
to release the line before another external trigger can be output.
The release function can also be used to release latched input triggers when the hardware line mode
is set to Synchronous. In Synchronous mode, the receipt of a falling edge trigger latches the line low.
The release function releases this line high in preparation for another input trigger.
The programming example below illustrates how to output an indefinite external trigger.
-- Set digio line 1 to output an indefinite external trigger.
digio.trigger[1].mode = digio.TRIG_FALLING
digio.trigger[1].pulsewidth = 0
digio.trigger[1].assert()
-- Release digio line 1.
digio.trigger[1].release()
-- Output another external trigger.
digio.trigger[1].assert()
For information about hardware lines, see Digital I/O port and TSP-Link synchronization lines (on
page 4-11).