BASIC commands
PROGRAMMING MANUAL
90
Revi
si
on 3.0
3.2.137 HALT
/i
3.2.138 HEX
/i
3.2.139 HLM_COMMAND
/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.
Example
loop:
PRINT "Measured position = ";MPOS;CHR(13);
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 as in programs. The
STOP
command can be used to stop a single program task.
Arguments
N/A
Example
No example.
See also
PROCESS
,
STOP
.
Type
I/O 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_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
•
command
The selection of the Host Link operation to perform. See the first table
below.
•
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 second table below.
•
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].
I52E-EN-03.book Seite 90 Freitag, 29. Juni 2007 11:55 11