
http://www2.merrick-inc.com/mct/GCMModbus.pdf Page 10 2014-05-18/Lars
Character receiver state enumeration:
0 Waiting for first UART interrupt
1 Not used in Modbus
2 Buffering data
3 Not used in Modbus
4 Waiting for second end character (ModBus ASCII)
5 Received telegram complete on delimiters (ModBus ASCII)
6 Received telegram complete on UART timeout or intrinsic length (ModBus RTU)
7 Not used in Modbus
8 Not used in Modbus
Character transmitter state enumeration:
0 Idle
1 First character in UART, RS422 transmitter enabled
2 Ongoing transmission from ISR
3 Last byte of telegram placed in UART FIFO
4 Waiting for UART transmitter empty to disable the RS422 transmitter
Communication task state enumeration:
0 Not used
1 Initializing (transient)
2 Waiting for some characters received
3 Waiting for end-of-telegram condition
4 Handling message
5 – 8 Not used in Modbus
No valid telegrams have been received for MaxTime (see above), and MaxTime is
greater than zero.
Starting Word in last CIT read or write telegram. Typically 16 or 44.
Number of Words in last CIT read or write telegram
Telegram command enumeration. Protocol dependent. For Modbus:
3 for Read Multiple Registers, 16 for Write Multiple Registers, 8 for Diagnostics
ModBus telegram 8 subfunction. Only subfunction 0 (echo data) is supported.
Calculated CRC in incoming telegram.
CRC field in incoming telegram. Must be equal to cCRC for valid checksum.
Byte count field in incoming and outgoing ModBus telegrams
Number of characters in the last completed incoming telegram
Counter for incoming telegrams. This includes all telegrams with a valid end
condition
Counter for handled telegrams. This includes all telegrams addressed to this GCM,
correctly formatted, with a correct checksum.
Counter for transmitted telegrams
Counter for received, correctly formatted telegrams not addressed to this GCM
Counter for received telegrams with checksum errors
Counter for received, incorrectly formatted telegrams. See rxlfm below
Last encountered received format error enumeration. Protocol dependant. Note 1.
Counter for isTimeout. Increments every time isTimeout goes from False to True
Counter for ModBus RTU telegrams who have had the end condition determined by
the content of the length determining fields within the telegram
Counter for ModBus RTU telegrams who have had the end condition determined by
UART character timeout
Kommentare zu diesen Handbüchern