ST500 | Remote control frequency inverter serially with Modbus RS485
The communication between the control unit and the frequency inverter equipped with RS485 must run in RTU mode. In this case, the ST500 inverter expects a transmission with 19200 baud, 8/N/2 in the factory setting. Via simple data transmission of the bytes in raw format without further coding is sent and received. Additional control characters are not necessary.
Here are two example data sets sent to the frequency inverter:
01 07 20 00 00 01 7E 0A (start command, represented as hexadecimal numbers).
01 07 20 00 00 06 3F C8 (stop command, represented as hexadecimal numbers)
Data sets must always be sent in one piece. If a pause of more than 1½ characters duration occurs between two individual characters, the data record is invalid according to the protocol definition and must be discarded.
Short explanation of the structure:
01 = Address of the frequency inverter (is set on the frequency inverter via F9.02).
07 = volatile storage, value is not permanently programmed
20 00 = Control parameter address
00 01 = Forward operation
7E 0A = CRC checksum
Further addresses and functions can be found in the manual.
You can calculate the CRC checksum as follows:
Function for calculating the CRC checksum (in C):
unsigned int cal_crc16 （unsigned char *data, unsigned int length）
unsigned int i,crc_value=0xffff;
crc_result ^= *data++;
for（i=0; i<8; i++）
if（crc_result & 0x01）
crc_result = （crc_value >> 1）^0xa001;
crc_result = crc_result >> 1;
crc_result = ((crc_result & 0xff) << 8) | (crc_result >> 8);
Note that the CRC-16 checksum must be transmitted in Modbus format as a little endian, i.e. the lower-order half of the data word before the higher-order half (in hexadecimal notation, i.e. the first two and last two characters of the result are swapped), so that it matches the inverter’s algorithm (as in the cal_crc16() function above).