Chapter 3 Programming
3
– 62
If counter value exceeds preset value 1 or 2, then program execution is interrupted and corresponding FUNCTION
is called. After that, program execution returns back to the original position.
Each counter has two different preset values, but the same FUNCTION is called. This can be identified by the
variable “EventPrm.byChannelIndex” in the FUNCTION. If counter value exceeds preset 1, then 1 is stored in
EventPrm.byChannelIndex.
Functions contain no internal state information. Use global variables including local I/O (external I/O) in functions.
Local I/O (external I/O) used only in functions is not updated. Make sure to use in other programs or function
blocks also.
Sample program
Preset2
Preset1
FUNCTION called
(EventPrm.byChannelIndex=1)
FUNCTION called
(EventPrm.byChannelIndex=1)
FUNCTION called
(EventPrm.byChannelIndex=2)
Counter
Marker
Summary of Contents for EH-A14EDR
Page 6: ...MEMO ...
Page 10: ...MEMO ...
Page 141: ...Chapter 3 Programming 3 81 Program ...
Page 166: ...Chapter 5 Maintenance 5 4 MEMO ...
Page 170: ...Appendix A1 4 MEMO ...