Prestrobe is a feature that memorizes the current counter value. Use the external input or the request flag to memorize the value.
Turn ON the prestrobe request flag under the CH counter input control request in the system variable (#L_ExIOCntInCtrl) to obtain the counter value in the system variable (#L_HSC*_PSV). The Operation bit will differ depending on the CH to which you allocate the high-speed counter.
When you are using 2-phase
settings, arrangement of mapped terminals will differ.
For details about the 2-phase settings, please see the following.
31.5.7 High
Speed Counter (2-phase Settings, LT Series)
On the LT4000 series,
to activate the extended input function (external input), turn ON the
allow extended input bit (d) in #L_ExIOCntInExtCtrl for each CH.
31.5.1.3 Special
I/O System Variables
Summary
The setup procedure for the prestrobe is summarized below.
Store the value with the external input or the request flag.
If you use the external input to
store, acknowledge the value in [Show Counter External Input Completed].
If you use the request flag to store, acknowledge the value in [Special
I/O State].
The [Request Special I/O Parameter Change] and [Special I/O Parameter Change Completed] operations reflect all the CH parameters you change.
Right after transferring, operations use parameter values set up in GP-Pro EX. Any restarts, which include going off-line, reset, and turning power OFF, use stored system variables as parameters.
[A] External input trigger
When the signal of the prestrobe input terminal that is specified in [I/O driver] turns ON, the current count value is stored in the system variable (#L_HSC*_PSV).
Signal of the prestrobe input terminal specified in [I/O Driver Settings] turns on, and you can check whether storage is completed. The setup procedure is shown below.
How to acknowledge the storage completion
Use the system variable (#L_ExIOCntInExtCtrl).
#L_ExIOCntInExtCtrl
Regarding the details of the variable
allocated in [Counter External Input Completed], the watch bit differs,
depending on the CH on which you allocate the high-speed counter,
as shown below.
a: CH1 prestrobe complete
b: CH2 prestrobe complete
c: CH3 prestrobe complete
d: CH4 prestrobe complete
Regarding the details of the variable
allocated in [Acknowledge Counter External Input Completed], the operation
bit differs, depending on the CH on which you allocate the high-speed
counter, as shown below.
a: CH1 prestrobe completion acknowledged
b: CH2 prestrobe completion acknowledged
c: CH3 prestrobe completion acknowledged
d: CH4 prestrobe completion acknowledged
The figure below shows a timing
chart for [Show Counter External Input Completed] and [Acknowledge
Counter External Input Completed].
1) When the external input turns ON, the current count value is stored
in the system variable (#L_HSC*_PSV).
2) Once the value is stored, the completion flag of the counter external
input turns ON.
3) Acknowledge that the completion flag of the counter external input
is ON and turn ON the completion acknowledgment flag of the counter
external input.
4) When the acknowledgment flag of the counter external input is recognized
as ON, the completion flag of the counter external input turns OFF.
[B] Request flag trigger
Turn ON the prestrobe request flag under the CH counter input control request in the system variable (#L_ExIOCntInCtrl) to memorize the current counter value.
The prestrobe completed flag under the CH counter input control response in the system variable (#L_ExIOCntInCtrl) turns ON when saving of the current counter value is completed. The Operation bit and Monitor bit differ depending on the CH to which you allocate the high-speed counter.
How to acknowledge the storage completion
Use the system variable (#L_ExIOCntInCtrl).
#L_ExIOCntInCtrl
For variables allocated in [Counter
input control request], the operation bit will differ depending on
the CH to which you allocate the high-speed counter, as shown below.
Turn on the 3rd bit of the CH to store the current count value.
For variables allocated in [Counter
Input Control Response], the watch bit differs depending on the CH
to which you allocate the high-speed counter, as shown below.
If the 3rd bit of the CH is 1, the value has been stored. If it is
0, the value has not been stored.
1) Turn ON the request flag for the counter input control to store
the value.
2) Once the value is stored, the Storage complete flag turns ON.
3) Acknowledge that the Storage complete flag is ON and turn the store
flag OFF.
4) When the store flag is recognized as OFF, the Storage complete flag
turns OFF.