Specifications
BASIC commands
PROGRAMMING MANUAL 96
Revision 5.0
3.2.141 HLM_COMMAND
/i
/i
/i
/i
/i
Example PRINT#5,HEX(IN(8,16))
See also N/A
Type Communication command
Syntax HLM_COMMAND(command, port [ , node [ , mc_area/mode [ , mc_offset
]]])
Description The HLM_COMMAND command performs a specific Host link command
operation to one or to all Host Link Slaves on the selected port.
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_COMMAND, be sure to set-up the Host Link Mas-
ter 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 • command
The selection of the Host Link operation to perform. See the table below.
command value Description
HLM_MREAD
(or value 0)
This performs the Host Link PLC MODEL READ (MM) command to read
the CPU Unit model code. The result is written to the TJ1-MC__ variable
specified by mc_area and mc_offset.
HLM_TEST
(or value 1)
This performs the Host Link TEST (TS) command to check correct com-
munication by sending string "MC__ TEST STRING" and checking the
echoed string. Check the HLM_STATUS parameter for the result.
HLM_ABORT
(or value 2)
This performs the Host Link ABORT (XZ) command to abort the Host link
command that is currently being processed. The ABORT command does
not receive a response.
HLM_INIT
(or value 3)
This performs the Host Link INITIALIZE (**) command to initialize the
transmission control procedure of all Slave Units.
HLM_STWR
(or value 4)
This performs the Host Link STATUS WRITE (SC) command to change
the operating mode of the CPU Unit.
• port
The specified serial port. 1 = RS-232C serial port 1; 2 = RS-422A serial
port 2.
• node (for HLM_MREAD, HLM_TEST, HLM_ABORT and HLM_STWR)
The Slave node number to send the Host link command to. Range: [0,
31].
• mode (for HLM_STWR)
The specified CPU Unit operating mode. 0 = PROGRAM mode; 2 =
MONITOR mode; 3 = RUN mode.
• mc_area (for HLM_MREAD)
The memory selection of the TJ1-MC__ 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
• mc_offset (for HLM_MREAD)
The address of the specified TJ1-MC__ memory area to read from.
Range for VR variables: [0, 1023]. Range for TABLE variables: [0,
63999].
command value Description