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
Содержание EH-A14EDR
Страница 6: ...MEMO ...
Страница 10: ...MEMO ...
Страница 141: ...Chapter 3 Programming 3 81 Program ...
Страница 166: ...Chapter 5 Maintenance 5 4 MEMO ...
Страница 170: ...Appendix A1 4 MEMO ...