BASIC commands
PROGRAMMING MANUAL
115
R
e
vi
si
o
n
1
.0
3.2.156 HLS_NODE
/i
3.2.157 HW_PSWITCH
/i
Example
HLM_WRITE(1,28,PLC_EM,50,25,MC_VR,200)
This example shows how to write 25 words from TJ2-MC64 ' s VR addresses
200-224 to the PC EM area addresses 50-74. The PC has Slave node
address 28 and is connected to the RS-232C port.
See also
HLM_READ
,
HLM_COMMAND
,
HLM_STATUS
,
HLM_TIMEOUT
,
HLS_NODE
,
SETCOM
.
Type
Communication parameter
Syntax
HLS_NODE
Description
The
HLS_NODE
parameter defines the Slave unit number for the Host Link
Slave protocol. The TJ2-MC64 will only respond as a Host Link Slave to Host
Link Master command strings with the unit number as specified in this param-
eter. The valid range for this parameter is [0, 31]. The default value is 0.
Arguments
N/A
Example
No example.
See also
N/A
Type
I/O command
Syntax
HW_PSWITCH(mode, direction, opstate, table_start, table_end)
Description
The
HW_PSWITCH
command turns on the OUT 0 output 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
values 43,
44 and 45.
The command can be used with either 1 or 5 parameters. Only 1 parameter is
needed to disable the switch or clear FIFO queue. All five parameters 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 exe-
cuting
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 memory
starting from
TABLE(21)
in increasing direction. When the position stored in
TABLE(21)
is reached, the OUT 0 output will be set ON and then alternatively
OFF and ON on reaching following positions in the sequence, until the posi-
tion 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