WWW.SSTCOMM.COM
17
to the buffer
After adding byte swap processing:
1. Read a certain length of data from the buffer (input or output), byte swap processing, then put it in the frame
buffer of the command, and finally send the command
2. When the command has a response, the data is separated from the response frame of the command ,byte swap
processing, then copied to the buffer
Note: When the byte swapping process is performed, the data to be processed is divided according to a specific
length. For example, when 2 bytes are exchanged, data is processed in units of 2 bytes. When 4 bytes are
exchanged, data is processed in units of 4 bytes.
3.3.1.10 IO Status Word
In order to easily obtain the state of the execution of each command under each master station, the IO state word
is introduced
MODBUS master protocol and User Config-POLL protocol
Both of these protocols are the master protocol and are also based on command. We use a bit to indicate whether
the execution of each command is successful or not. When the command execution is successful, the corresponding
bit is set to 1, otherwise it is set to 0.When a subnet is configured as a master protocol, the number of bytes occupied
by the IO status word of the subnet is calculated using the following formula:
The number of bytes in IO status word = ((integer, Discard decimal part) (command bar number under
15) / 16) * 2
For example:
MODBUS master station protocol is configured in subnet 1, with a total of 15 commands, according to the
calculation formula above:
(15 + 15) / 16 = 1, 1*2 = 2 (bytes)
So the IO status of these 15 commands takes up 2 bytes. The specific IO status indication information is as
follows:
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Byte 0
Command
7 indicate
bit
Command
6 indicate
bit
Command
5 indicate
bit
Command
4 indicate
bit
Command
3 indicate
bit
Command
2 indicate
bit
Command
1 indicate
bit
Command
0 indicate
bit
Byte 1
Command
14 indicate
bit
Command
13 indicate
bit
Command
12 indicate
bit
Command
11 indicate
bit
Command
10 indicate
bit
Command
9 indicate
bit
Command
8 indicate
bit
Summary of Contents for GT200-PN-RS
Page 53: ...WWW SSTCOMM COM 53...