BASIC commands
PROGRAMMING MANUAL
94
Revi
si
on 3.0
3.2.143 HLM_WRITE
/i
/i
Type
Communication command
Syntax
HLM_WRITE(port, node, pc_area, pc_offset, length, mc_area, mc_offset)
Description
The
HLM_WRITE
command writes data from the TJ1-MC__ 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].
•
pc_area
The PC memory selection for the Host link command. See the first table
below.
•
pc_offset
The address of the specified PC 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 TJ1-MC__ to read the send data from. See
the second table below
•
mc_offset
The address of the specified TJ1-MC__ memory area to read from.
Range for VR variables: [0, 1023]. Range for TABLE variables: [0,
63999].
Example
HLM_WRITE(1,28,PLC_EM,50,25,MC_VR,200)
This example shows how to write 25 words from TJ1-MC__ ' 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
.
pc_area value
Data area
Host link command
PLC_DM
(or value 0)
DM area
RD
PLC_IR
(or value 1)
CIO/IR area
RR
PLC_LR
(or value 2)
LR area
RL
I52E-EN-03.book Seite 94 Freitag, 29. Juni 2007 11:55 11