
BASIC commands
PROGRAMMING MANUAL
112
R
e
vi
si
o
n
1
.0
3.2.153 HLM_STATUS
/i
/i
/i
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.
Bit
Name
Description
0 - 7
End code
The end code can be either the end code which is defined by
the Host Link Slave (problem in sent command string) or an
end code defined because of a problem found by the Host Link
Master (problem in received response string).
8
Timeout error
A timeout error will occur if no response has been received
within the timeout time. This indicates communication has been
lost.
9
Command not
recognized
This status indicates that the Slave did not recognize the com-
mand and has returned a IC response.
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.
Example
>> HLM_COMMAND(HLM_TEST,2,0)
>> PRINT HLM_STATUS PORT(2)
256.0000
A timeout error has occurred.
See also
HLM_READ
,
HLM_COMMAND
,
HLM_TIMEOUT
,
HLS_NODE
,
HLM_WRITE
,
SETCOM
.