Communication protocols
PROGRAMMING MANUAL
161
Revi
si
on 3.0
End codes
These are the end codes defined in the
HLM_STATUS
parameter:
/i
Set up
You need the
SETCOM
command to set up the serial port of the TJ1-MC__
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.
IC
Undefined command
(response only)
-
Valid
Valid
Valid
Caution
You must execute the Host Link master commands from one pro-
gram task only to avoid any multi-task timing problems.
Caution
The Host Link master commands provide the tools to exchange
data with the Host Link slave. The user program must contain
proper error handling routines to deal with communication failure
and perform retries if necessary.
End code
Description
Probable cause
Solution
$00
Normal
completion
No problem exists.
N/A
$01
Not executable
in RUN mode
The command that was sent can-
not be executed when the PC is
in RUN mode.
Check the relation
between the com-
mand and the PC
mode.
$13
FCS error
The FCS is wrong.
Influence from noise,
transfer the command
again.
Header
code
Name
BASIC command
required
RUN
MON
PRG
$14
Format error
•
The command format is
wrong.
•
A command that cannot be
divided has been divided.
•
The frame length is smaller
than the minimum length for
the applicable command.
Check the format and
transfer the command
again.
$15
Entry number
data error
The data is outside the specified
range or too long.
Correct the command
arguments and trans-
fer the command
again.
$18
Frame length
error
The maximum frame length of
131 bytes is exceeded.
Check the command
and transfer the com-
mand again.
$19
Not executable
You did not obtain access rights.
Obtain access rights.
$21
Not executable
due to CPU
error.
The command cannot be exe-
cuted because a CPU error has
occurred.
Cycle the power sup-
ply of the CPU.
$100
Host Link slave
ACK timeout
-
-
$200
IC command
address error
-
-
End code
Description
Probable cause
Solution
I52E-EN-03.book Seite 161 Freitag, 29. Juni 2007 11:55 11