Remote Processing CAMBASIC User Manual

Page 205

Advertising
background image

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

T h e re s t o f yo u r pr o g ra m , s ta r ti ng a ft e r p r e he a t, e x e cu te s in d ep e nd e nt ly o f t he ti m ed o ut pu ts . E a ch o ut pu t w i ll ti m e
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 hea d stays dow n for an a dditional second before th e pusher shoves the pr oduct out. The sequ ence re peats
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 stop s, all tim ers ar e canceled . If the progr am is r estarted w ith the CO NT sta tement, the timer s will not res tart.

Advertising