Senlan Hope800 Series Manual page 137

High-performance vector control inverter
Table of Contents

Advertisement

Slave address
Modbus function code
Start address(MSB)
Start address(LSB)
Word number
written(MSB)
Word number
written(LSB)
Byte number written
MSB of 1st data
LSB of 1st data
MSB of 2nd data
LSB of 2nd data
CRC(LSB)
CRC(MSB)
 Function 22: mask write
This function provides an easy way to modify certain bit(s) of the control word, compared to the
complicated and time-consuming "read-change-write" method. It is only valid for the control word (including
the main control word and extended control word). The operation is as follows:
Result= (operand & AndMask)|(OrMask & (~ AndMask)) , i.e.,
When all bits of OrMask are "0": clear certain bit(s);
When all bits of OrMask are "1": set certain bit(s) to "1";
When all bits of AndMask are "0": the result is OrMask;
When all bits of AndMask are "1": the result remains unchanged
Example: set bit 7(digital input 24: process PID disabled) of the address 3205H(extended control word
2) of the #1 slave to 1 and then clear it. The query from the master and the response from the slave are as
follows (the slave echoes the original function code)
Set bit 7 to 1
Slave address
Modbus function code
MSB of operand address
LSB of operand address
AndMask MSB
AndMask LSB
OrMask MSB
OrMask LSB
CRC(LSB)
CRC(MSB)
 Function 8: read-back test. The test code is 0000H. The original frame is required to return.
 Exception response: if the slave fails to implement the request from the master, it will return an exception
response message.
01H
10H
32H
00H
00H
02H
04H
00H
3EH
13H
88H
D2H
54H
01H
16H
32H
05H
FFH
7FH
FFH
FFH
3EH
68H
6 Parameter Description
Slave address
Modbus function code
Start address(MSB)
Start address(LSB)
Word number
written(MSB)
Word number
written(LSB)
CRC(LSB)
CRC(MSB)
Clear bit 7
Slave address
Modbus function code
MSB of oprand address
LSB of oprand address
AndMask MSB
AndMask LSB
OrMask MSB
OrMask LSB
CRC(LSB)
CRC(MSB)
01H
10H
32H
00H
00H
02H
4FH
70H
01H
16H
32H
05H
FFH
7FH
00H
00H
3FH
D8H
133

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents