Omron TJ2-MC64 - PROGRAMMING Programming Manual page 117

Hide thumbs Also See for TJ2-MC64 - PROGRAMMING:
Table of Contents

Advertisement

BASIC commands
Description
The HLM_READ command reads data from 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 to either VR or TABLE
variables. Each word of data will be transferred to one variable. The maximum
data length is 30 words (single frame transfer).
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_READ, be sure to set-up the Host Link Master pro-
tocol 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.
/i
pc_area value
Data area
PLC_DM
DM area
(or value 0)
PLC_IR
CIO/IR area
(or value 1)
PLC_LR
LR area
(or value 2)
PLC_HR
HR area
(or value 3)
PLC_AR
AR area
(or value 4)
PROGRAMMING MANUAL
Host link command
RD
RR
RL
RH
RJ
pc_area value
Data area
PLC_EM
EM area
(or value 6)
/i
plc_offset
The address of the specified PC memory area to read from. Range: [0,
9999].
length
The number of words of data to be transferred. Range: [1, 30].
mc_area
The memory selection of the TJ2-MC64 to read the send data from. See
the table below.
/i
mc_area value
MC_TABLE
(or value 8)
MC_VR
(or value 9)
/i
mc_offset
The address of the specified TJ2-MC64 memory area to write to. Range
for VR variables: [0, 63999]. Range for TABLE variables: [0, 499999].
Example
HLM_READ(2,17,PLC_DM,120,20,MC_TABLE,4000)
This example shows how to read 20 words from the PLC DM area addresses
120-139 to TJ2-MC64 TABLE addresses 4000-4019. The PC has Slave node
address 17 and is connected to the RS-422A port.
See also
HLM_COMMAND, HLM_STATUS, HLM_TIMEOUT, HLS_NODE,
HLM_WRITE, SETCOM.
Host link command
RE
Data area
TABLE variable array
Global (VR) variable array
111

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tj1-prtTj1-drtTj1-cortTj1-mlGrt1-ml2Tj1-fl02

Table of Contents