![Yamatake SDC35 User Manual Download Page 223](http://html.mh-extra.com/html/yamatake/sdc35/sdc35_user-manual_905228223.webp)
8-5
●
MODBUS RTU
All messages are written in binary data.
A MODBUS RTU message consists of (1) to (3) below.
The part of (2) stores commands, which are transmission contents from the master
station and responses, which are transmission contents from the slave station.
All messages use binary data. (Each slot below corresponds to one character.)
(1) Station address (1 byte)
(2) Send message, response message
(3) Checksum (2 bytes)
• Station address
Of the messages sent by the master station, the device creates response messages
only when station addresses are the same. Station addresses in the messages are
expressed in one byte. The station address is set up by the station address setup
(setup setting C65). However, when the station address is set to 0, the device
creates no response even if station addresses match. The device returns the same
station address as that of the received message.
• Checksum (CRC)
This value is for checking whether or not some abnormality (e.g. noise) causes
the message content to change during communications. The checksum is
expressed as 2 bytes.
The checksum (CRC) creation method is shown below.
/* CRC calculation */
/* Input
unsigned char length : Number of transmission bytes
*/
/*
unsigned char *top
: Transmission data start pointer */
/* Output
unsigned short CRC
: CRC calculation result
*/
unsigned short crc16( unsigned char length, unsigned char *top )
{
unsigned short CRC= 0xffff;
unsigned short next;
unsigned short carry;
unsigned short n;
unsigned char crcl;
while ( length-- ) {
next = (unsigned short)*top;
CRC ^= next;
for (n = 0; n < 8; n++) {
carry = CRC & 1;
CRC >>= 1;
if (carry) {
CRC ^= 0xA001;
}
}
top++;
}
crcl = (CRC & 0xff00)>>8;
CRC <<= 8;
CRC |= crcl;
return CRC;
}
Chapter 8. MODBUS COMMUNICATION FUNCTION
(2)
(1)
(3)
1 frame
Summary of Contents for SDC35
Page 16: ......
Page 17: ......
Page 19: ... display key para key or V key key enter key 2 second press hold of para key V ...
Page 32: ......
Page 46: ......
Page 58: ......
Page 71: ......
Page 84: ......
Page 95: ......
Page 172: ......
Page 174: ...6 2 Chapter 6 LIST OF DISPLAYS AND SETTING DATA ...
Page 211: ......
Page 230: ......
Page 240: ......
Page 248: ......
Page 260: ......
Page 268: ......
Page 270: ......
Page 279: ......