
Event Multitasking - 16
..emergency
'Emergency stop pressed. Turn off all outputs
out 2,255
return
'
..headup
'Head has moved up. Time to move product over
pulse 3,2,16,.5,0
return
'
..preheat
'Pre-heater done. Now turn on heat for 1 second
pulse 2,2,8,1,0
return
The rest of your program, starting after preheat, executes independently of the timed outputs. Each output will time
without further intervention by the program. Thus, the program can do other tasks, like handle communications, check
safety limits and acquire process data such as temperatures, pressures, etc.
The above example shows the timing generated by the program. An active state is shown high. Pressing a start switch
initiates operation. The head is on for the full heat time. A pre-heater is on for 2 seconds. Then the real heater is on for
1 second. The head stays down for an additional second before the pusher shoves the pr oduct out. The sequ ence repeats
when the start switch is pressed.
If the program should terminate before a timer times out, the bit will be left in the “active” state. When program
execution stops, all tim ers ar e canceled . If the progr am is r estarted w ith the CO NT statement, the timer s will not restart.
Komentáře k této Příručce