Section 9. Program Control Instructions
9-23
Timer Example
The example uses Timer.
Wait Digital Trigger
Used to wait for a digital trigger before making measurements.
Syntax
WaitDigTrig(
PSlot, Mask, Word
)
Remarks
Measurement sequencer will wait until the digital inputs on the CR9071E
Counter - Timer / Digital I/O Module matches the specified word. It should be
noted that the CR9000 time stamp is clocked by the scan. Thus, if the scan
rate is set at 2 seconds, but the trigger is activated every 4 seconds, the time
stamp will still increment only 2 seconds every time the trigger activates the
scan (increment value will be off by a factor of 2).
Wait Digital Trigger is used to trigger measurement scans from an external
digital input to the CR9071E Counter - Timer / Digital I/O Module.
WaitDigTrig is placed in the program following Scan; the task sequencer will
delay until the digital trigger occurs. Mask and word are in terms of the binary
number represented by the 16 digital I/O channels. Mask is used to determine
which digital inputs to read. Word is the digital input pattern to match. When
the input matches the "word", the scan takes place.
Parameter
& Data Type
Enter
PSlot
Constant
The number of the slot in the CR9000 card frame that holds the CR9071E Module.
Mask
Constant
The Mask allows the read or write to only act on certain ports. The Mask is ANDed with the value
obtained from the CR9071E when reading and ANDed with the source before writing.
Word
Constant or
Variable
Example:
Scan (1, msec, 0, 0)
WaitDigTrig(6,&B0000000000000100, &B0000000000000100)
'read only port 3, wait until 3 is high. mask and word entered as binary numbers.
measurements and processing instructions
next Scan
example 2
WaitDigTrig(6,4,4)
'same as above: read only port 3, wait until 3 is high.
'mask and word entered as decimal numbers.
measurements and processing instructions
Next Scan
Содержание CR9000
Страница 6: ...CR9000 Table of Contents iv This is a blank page ...
Страница 22: ...CR9000 Overview OV 16 This is a blank page ...
Страница 26: ...Section 1 Installation 1 4 CR9000 FIGURE 1 1 3 CR9000 Battery Pack ...
Страница 72: ...Section 3 CR9000 Measurement Details 3 28 This is a blank page ...
Страница 88: ...Section 5 Program Declarations 5 6 This is a blank page ...
Страница 217: ...This is a blank page ...