![Azbil C7G Скачать руководство пользователя страница 306](http://html1.mh-extra.com/html/azbil/c7g/c7g_installation-and-configuration-manual_3042606306.webp)
7-4
Chapter 7. Modbus RTU Communication Functions
crc16 ^= next;
for ( i = 0; i < 8; i++ )
{
carry = crc16 & 0x0001;
crc16 >>= 1;
if ( carry != 0 )
{
crc16 ^= 0xa001;
}
}
p++;
len--;
}
return crc16;
}
z
z
End-of-frame judgment
The message end (end of 1 frame) is determined when the period of time during
which no character is received exceeds the time specified for the transmission
speed. If the next character is not received by the time-out time shown below, the
frame is determined to have ended.
However, note that the time-out time has a fluctuation of ±1 ms.
Set transmission speed (bps)
Time-out time
Transmission speed (bps)
9600
5 ms or more
19200
3 ms or more
38400
2 ms or more
57600
2 ms or more
115200
2 ms or more
z
Command type
Command (send message) types supported by this device are as follows.
Command type
Function code
Conformance class
Multiple data read
03H (1 byte)
class 0
Multiple data write
10H (1 byte)
class 0
1 data write
06H (1 byte)
class 1
*
*This device does not support class 1 commands other than 1 data write.
z
Exception codes
In the case of a response message when there was an error, one of the exception
codes shown below is put after the function code.
Error type
Exception code
Description
Illegal function code
01H (1 byte)
Function code not supported by this controller
Illegal data address
02H (1 byte)
A data address that could not be read or written
was included
Illegal data
03H (1 byte)
Error other than those shown above
Busy
06H (1 byte)
Device cannot process the data.
Please send again.