Omron TJ2-MC64 - PROGRAMMING Programming Manual page 221

Hide thumbs Also See for TJ2-MC64 - PROGRAMMING:
Table of Contents

Advertisement

Communication protocols
End code
Description
Probable cause
$14
Format error
$15
Entry number
The data is outside the specified
data error
range or too long.
$18
Frame length
The maximum frame length of
error
131 bytes is exceeded.
$19
Not executable
You did not obtain access rights.
$21
Not executable
The command cannot be exe-
due to CPU
cuted because a CPU error has
error.
occurred.
$100
Host Link slave
-
ACK timeout
$200
IC command
-
address error
Set up
You need the SETCOM command to set up the serial port of the TJ2-MC64
for the Host Link Master protocol. Set the command as follows:
SETCOM(baudrate, data_bits, stop_bits, parity, port, 6)
After you have set this command, you can use the HLM_READ,
HLM_WRITE and HLM_COMMAND commands to read and write data
using Host Link.
PROGRAMMING MANUAL
Solution
The command format is
Check the format and
wrong.
transfer the command
A command that cannot be
again.
divided has been divided.
The frame length is smaller
than the minimum length for
the applicable command.
Correct the command
arguments and trans-
fer the command
again.
Check the command
and transfer the com-
mand again.
Obtain access rights.
Cycle the power sup-
ply of the CPU.
-
-
Timeout
The timeout mechanism is implemented to prevent that the BASIC task
pauses for a long time due to bad or no communication. The
HLM_TIMEOUT parameter specifies the timeout period. This period is the
maximum time the program task waits after it has sent the command to
receive a response.
If the timeout period elapses, the HLM_STATUS contains the status of the
command, and the BASIC task continues.
The HLM_TIMEOUT parameter specifies the timeout period for all
commands and for all ports.
Status
The HLM_STATUS parameter contains the status of the last Host Link
master command sent to the specified port. The parameter indicates the
status for the HLM_READ, HLM_WRITE and HLM_COMMAND
commands. The status bits are:
/i
Bit
Name
Description
0-7
End code
The end code is:
the end code defined by the Host Link slave, when a prob-
lem occurred in the data string of the sent command, or
an end code defined by the Host Link master, when a prob-
lem occurred in the data string of the received response.
8
Timeout error
A timeout error occurs if no response is received within the time-
out period. This indicates that the communication is lost.
9
Command not
This status indicates that the slave did not recognise the com-
recognised
mand and has returned an IC response.
The HLM_STATUS has value 0 when no problems occurred. In case of a
non-zero value you need to program an appropriate action such as a retry or
emergency stop in the user BASIC program. Each port has an
HLM_STATUS parameter. You need the PORT modifier to specify the port.
215

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tj1-prtTj1-drtTj1-cortTj1-mlGrt1-ml2Tj1-fl02

Table of Contents