Download Print this page

HEIDENHAIN MANUALplus 620 Technical Manual page 1737

Hide thumbs Also See for MANUALplus 620:

Advertisement

8.33 Cooperative Multitasking
8.33.1 Starting a parallel process (SPAWN)
8.33.2 Control of events
January 2012
You can run several processes in the PLC with cooperative multitasking.
Unlike genuine multitasking, with cooperative multitasking information and
tasks are exchanged only at places that you define. Cooperative multitasking
permits up to 16 parallel PLC processes and the submit queue. In a program
that you have started with SUBM, you can use commands for changing tasks
and controlling events (Module 926x). You should additionally insert a task
change between the individual jobs in the submit queue, so that the control
can execute parallel processes by the end of a job at the latest. The cyclic PLC
main program does not participate in cooperative multitasking, but interrupts
a submit job and the parallel processes at whatever their current stage is.
Syntax:
SPAWN <label>
Operands:
D
Action:
In the specified double word, the control returns the identifier, see page 1733.
The control returns –1 if no process could be started. You can call the spawn
command only in a submit job or in another spawn process (maximum of eight
parallel processes are permitted). If such a process ends with EM, the control
removes it from the memory, and the memory space is again available.
The parallel processes can make events available to one another. This saves
processing time otherwise spent in the constant interrogating of operating
states by the individual processes. A special feature of event control is the
waiting period, during which the process can "sleep" for a programmed time.
With this function you can repeat program sections in a slow time grid, for
example for display or monitoring functions.
8.33 Cooperative Multitasking
1737

Advertisement

loading