BASIC commands
PROGRAMMING MANUAL
114
R
e
vi
si
o
n
1
.0
3.2.155 HLM_WRITE
/i
/i
/i
/i
/i
Type
Communication command
Syntax
HLM_WRITE(port, node, plc_area, plc_offset, length, mc_area,
mc_offset)
Description
The
HLM_WRITE
command writes data from the TJ2-MC64 to a Host Link
Slave by sending a Host link command string containing the specified node of
the Slave to the serial port. The received response data will be written from
either VR or TABLE variables. Each variable will define the word or data that
will be transferred. The maximum data length is 29 words (single frame trans-
fer).
Program execution will be paused until the response string has been received
or the timeout time has elapsed. The timeout time is specified by using the
HLM_TIMEOUT
parameter. The status of the transfer can be monitored with
the
HLM_STATUS
parameter.
Notes:
•
When using the
HLM_WRITE
, be sure to set-up the Host Link Master
protocol by using the
SETCOM
command.
•
The Host Link Master commands are required to be executed from one
program task only to avoid any multi-task timing problems.
Arguments
•
port
The specified serial port. 1 = RS-232C serial port 1; 2 = RS-422A serial
port 2
•
node
The Slave node number to send the Host link command to. Range: [0,
31].
•
plc_area
The PLC memory selection for the Host link command. See the table
below.
pc_area value
Data area
Host link command
PLC_DM
(or value 0)
DM area
WD
PLC_IR
(or value 1)
CIO/IR area
WR
PLC_LR
(or value 2)
LR area
WL
PLC_HR
(or value 3)
HR area
WH
PLC_AR
(or value 4)
AR area
WJ
PLC_EM
(or value 6)
EM area
WE
•
plc_offset
The address of the specified PLC memory area to write to. Range: [0,
9999].
•
length
The number of words of data to be transferred. Range: [1, 29].
•
mc_area
The memory selection of the TJ2-MC64 to read the send data from. See
the table below.
mc_area value
Data area
MC_TABLE
(or value 8)
Table variable array
MC_VR
(or value 9)
Global (VR) variable array
Type
Communication command
•
mc_offset
The address of the specified TJ2-MC64 memory area to read from.
Range for VR variables: [0, 63999]. Range for TABLE variables: [0,
499999].
pc_area value
Data area
Host link command