BASIC commands
PROGRAMMING MANUAL
92
Revi
si
on 3.0
/i
/i
3.2.141 HLM_STATUS
/i
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 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 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 write to. Range
for VR variables: [0, 1023]. Range for TABLE variables: [0, 63999].
Example
HLM_READ(2,17,PLC_DM,120,20,MC_TABLE,4000)
This example shows how to read 20 words from the PC DM area addresses
120-139 to TJ1-MC__'s 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
.
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
PLC_HR
(or value 3)
HR area
RH
PLC_AR
(or value 4)
AR area
RJ
PLC_EM
(or value 6)
EM area
RE
mc_area value
Data area
MC_TABLE
(or value 8)
TABLE variable array
MC_VR
(or value 9)
Global (VR) variable array
Type
Communication parameter
Syntax
HLM_STATUS PORT(n)
Description
The
HLM_STATUS
parameter contains the status of the last Host Link Master
command sent to the specified port. The parameter will indicate the status for
the
HLM_READ
,
HLM_WRITE
and
HLM_COMMAND
commands. The sta-
tus bits are defined in the table below.
The
HLM_STATUS
will have value 0 when no problems did occur. In case of
a non-0 value, any appropriate action such as a re-try or emergency stop
needs to be programmed in the user BASIC program.
Each port has an
HLM_STATUS
parameter. The
PORT
modifier is required to
specify the port.
Arguments
•
n
The specified serial port. 1 = RS-232C serial port 1; 2 = RS-422A serial
port 2
Example
>> HLM_WRITE(1,28,PLC_EM,50,25,MC_VR,200)
>> PRINT HEX(HLM_STATUS PORT(1))
1
Apparently the CPU Unit is in RUN mode and does not accept the write oper-
ation.
pc_area value
Data area
Host link command
I52E-EN-03.book Seite 92 Freitag, 29. Juni 2007 11:55 11