Omron trajexia CJ1W-MCH72 Operation Manual page 182

Sysmac cj-series programmable controller
Hide thumbs Also See for trajexia CJ1W-MCH72:
Table of Contents

Advertisement

All BASIC commands
4-2-130 HW_PSWITCH
Example
PRINT#5,HEX(IN(8,16))
See also
N/A
/i
Type
Axis command
Syntax
HW_PSWITCH(mode, direction, opstate, table_start, table_end)
Description
The HW_PSWITCH command turns on digital output 8 for the axis
when the predefined axis measured position is reached, and turns the
output off when another measured position is reached. Positions are
defined as sequence in the TABLE memory in range from table_start,
to table_end, and on execution of the HW_PSWITCH command are
stored in FIFO queue.
This command is applicable only to Flexible axis axes with ATYPE val-
ues 43, 44 and 45.
The command can be used with either 1 or 5 parameters. Only 1 param-
eter is needed to disable the switch or clear FIFO queue. All five param-
eters are needed to enable switch.
After loading FIFO and going through the sequence of positions in it, if
the same sequence has to be executed again, FIFO must be cleared
before executing HW_PSWITCH command with the same parameters.
Arguments
mode
0 = disable switch; 1 = on and load FIFO; 2 = clear FIFO.
direction
0 = decreasing; 1 = increasing.
opstate
Output state to set in the first position in the FIFO; ON or OFF.
table_start
Starting TABLE address of the sequence.
table_end
Ending TABLE address of the sequence.
Example
HW_PSWITCH(1, 1, ON, 21, 50)
This command will load FIFO with 30 positions, stored in TABLE mem-
ory starting from TABLE(21) in increasing direction. When the position
stored in TABLE(21) is reached, output 8 will be set ON and then alter-
natively OFF and ON on reaching following positions in the sequence,
until the position stored in TABLE(50) reached.
Example
HW_PSWITCH(0)
This command will disable switch if it was enabled previously, but will
not clear the FIFO queue.
Example
HW_PSWITCH(2)
This command will clear FIFO queue if loaded previously.
See also
AXIS
Section 4-2
171

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents