BASIC commands
PROGRAMMING MANUAL 109
Revision 1.0
3.2.149 HALT
/i
3.2.150 HEX
/i
3.2.151 HLM_COMMAND
/i
/i
Arguments • label
A valid label that occurs in the program. An invalid label will give a compi-
lation error before execution.
Labels can be character strings of any length, but only the first 15 char-
acters are significant. Alternatively line numbers may be used as labels.
Example loop:
PRINT "Measured position = ";MPOS;CHR(13);
WA(1000)
GOTO loop
See also GOSUB..RETURN
Type System command
Syntax HALT
Description The HALT command stops execution of all program tasks currently running.
The command can be used both on Command Line Terminal as in programs.
The STOP command can be used to stop a single program task.
Note: HALT doesn’t stop any motion. Currently executing, or buffered moves
will continue unless they are terminated with a CANCEL or RAPIDSTOP com-
mand.
Arguments N/A
Example No example.
See also PROCESS, STOP.
Type System command
Syntax HEX
Description This command is used in a print statement to output a number in hexadecimal
format.
Arguments N/A
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 TJ2-MC64 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.