Test
an RS485 connection and use the RS485_GUI
PCN-1001 User manual
87
The communication protocol
SNP (Small Network Protocol) is the communication protocol used in the RS485 connection.
The packet format contains the addresses of both the sender and recipient and the number of packets to be sent
along with the current packet number.
Bit stuffing is not used because, when the length of data field is stated, all values can be sent in the data field.
The maximum length of the data field is MAX_DATA_LENGTH = 1024 bytes.
FIELD
LENGTH (BYTES)
CONTENTS
PreAmble
5
5 times 0xFF, to be sent prior to the initial character in order to give
time for change of transmission direction
StartCharacter
1
SOH = 0x01
Source
1
Address of sender
Destination
1
Address of recipient
TotalPacketNumber
1
Total number of packets
PacketNumber
1
Number of this packet
First packet has number 1
DataLength
2
States the length of the data field
LSB (Least Significant Byte) is to be sent first
Data
0 to MAX_DATA_LENGTH Each byte can contain 0 to 0xFF
CRC16
2
CRC16 (x16 x15 x2 x0) check sum calculated from Source to Data
(both fields included) with an initial value of -1.
LSB is to be sent first
Postamble
1
0xFF.
Remember that there is only one master on the bus, while all others are slaves. When the master has sent a
message to a slave, an answer from the slave is expected. A slave cannot send anything to a master without
being asked. It is possible to send to all slaves at a time (broadcast), which means that slaves do not return an
answer and that messages are not retransmitted.
Summary of Contents for PCN-1001
Page 1: ...PCN 1001 Passenger People Counter USER MANUAL Rev 4 0 23 December 2011 PCN 1001_UserMan_En_4 0...
Page 13: ...Part 1 Introduction PCN 1001 User manual 13 PCN 1001_UserMan_En_4 0 PART 1 INTRODUCTION...
Page 14: ...This page has been intentionally left blank...
Page 22: ...This page has been intentionally left blank...
Page 32: ...This page has been intentionally left blank...
Page 48: ...This page has been intentionally left blank...
Page 50: ...This page has been intentionally left blank...
Page 97: ...APPENDIX PCN 1001 User manual 97 PCN 1001_UserMan_En_4 0 APPENDIX...
Page 98: ...This page has been intentionally left blank...
Page 110: ...This page has been intentionally left blank...
Page 114: ...This page has been intentionally left blank...
Page 116: ...This page has been intentionally left blank...
Page 117: ...Notes PCN 1001 User manual 117 PCN 1001_UserMan_En_4 0 Notes...