56
9-4-2. Precautions for sending or receiving message
・
When the master unit sends a message to the slave unit, the slave unit sends an acknowledge or
negative acknowledge to the computer.
・
When the slave unit receives a message properly, it sends the transmission control characters
indicating an acknowledge and address character to the master unit. If the slave unit fails to
receive a message properly, it sends the transmission control characters indicating a negative
acknowledge and address character to the master unit.
<Example 5> ENQ
A
S
W
1
ETX
1
F
…
From the master unit to the slave unit
When the slave unit receives the SW1 command properly, it sends the following message:
When the slave unit receives the SW1 command properly, it sends the following message:
<Precautions>
・
The acknowledge or negative acknowledge sent by the slave unit to the master unit indicates
whether or not the slave unit received a message from the master unit properly. The slave unit
sends an acknowledge to the master unit if the relationship between the characters and block
check characters of the message sent by the master unit to the slave unit is correct, even though
the message contains a syntax error or out-of-range error. The slave unit sends a negative
acknowledge to the master unit if the relationship between the characters and block check
characters of the message sent by the master unit to the slave unit is incorrect, even though the
message contains correct characters.
・
The slave unit sends no acknowledge or negative acknowledge to the master unit only when it
receives a broadcast mode message.
・
If the slave unit sends no acknowledge or negative acknowledge to the master unit, even though
the master unit sends a message to the slave unit, and the master unit retries sending a message
to the slave unit again, the master unit must retry sending 500ms after completion of the previous
transmission. Otherwise, signal collision may occur.
■
Status after sending negative acknowledge
・
When the slave unit sends a negative acknowledge to the master unit, it runs in the condition
before sending the acknowledge. If an acknowledge sent by the slave unit to the master unit
contains a syntax error, the slave unit ignores the message and runs in the condition before
sending the acknowledge.
・
If a message containing multi-commands is sent and one multi-command character has a syntax
error, the slave unit ignores the command containing the syntax error but it executes the other
commands.