Home Security System User Manual

178
Pulse Outputs Section 7-6
7-6-8 Time Measurement with the Pulse Counter
The one-shot pulse output function can be used to create a high-precision
pulse counter timer.
To measure time with high-precision, start the timer by executing the
STIM(980) instruction with C1 = 000B or 000C and C2 = 0000, and stop the
timer by executing STIM(980) with C1 = 000B or 000C and C2 = 0001.
The timer’s elapsed time is stored in 8-digit hexadecimal in words A621 and
A620 (pulse output 1) or A623 and A622 (pulse output 2). When the timer
starts, the corresponding words are initialized to 0000 0000 hex and the con-
tent is incremented as time passes. The final value is retained when the timer
stops.
Set the pulse output operation mode to Calculation (time measurement) in
advance in the System Setup, as shown in the following table.
Note (1) The external pulse output from the port is disabled when this mode is se-
lected.
(2) A pulse output port that is being used as a pulse counter timer cannot be
used for any other pulse output functions.
Word Bits Function Contents
A620 00 to 15 Pulse time
measurement
1
Lower
4 digits
Contains the pulse counter’s time mea-
surement in 8-digit hexadecimal.
The content can range from 0000 0000
to FFFF FFFF hex.
Note These words are refreshed dur-
ing the Motion Control Module’s
I/O refreshing.
A621 00 to 15 Upper
4 digits
A622 00 to 15 Pulse time
measurement
2
Lower
4 digits
These words function just like the
words for pulse time measurement 1,
described above.
A623 00 to 15 Upper
4 digits
Tab page Function Details
Pulse Output Pulse output 1 Operation mode Calculation (time measurement)
Pulse output 2 Operation mode
Counting mode
(Time measurement)
Timer start condition
Timer stop condition
Timer started by executing
STIM with C2 = 0000.
Timer stopped by executing
STIM with C2 = 0001.
Timer PV in
A620 and A621
or A622 and A623
Ela
p
sed time
PV reset
PV held
Time