Publication 1756-PM004C-EN-P - October 2009 23
Communicate with I/O Modules Chapter 1
This example copies inputs and outputs to the tags of a structure for a drill
machine.
Buffer I/O
The main routine of the program executes the following subroutines in this sequence.
The map_inputs routine copies the values of input devices to their corresponding tags that are used in the drill routine.
The drill routine executes the logic for the drill machine.
The map_outputs routine copies the values of output tags in the drill routine to their corresponding output devices.
42369
Jump to Subroutine
Routine name map_inputs
JSR
Jump to Subroutine
Routine name drill
JSR
Jump to Subroutine
Routine name map_outputs
JSR
_1791_8AC:I.Data[0].0 drill[1].depth_limit
_1791_8AC:I.Data[0].4 drill[1].home_limit
/
drill[1].part_advance
ONS
one_shots.0
drill[1].forward
/
drill[1].depth_limit
drill[1].forward
drill[1].depth_limit
drill[1].retract
/
drill[1].home_limit
drill[1].retract
drill[1].forward _1791_8AC:O.Data[0].0
drill[1].retract _1791_8AC:O.Data[0].1