View
217
Download
0
Category
Preview:
Citation preview
7/31/2019 BACnet_MSTP
1/10
1
BACnet MS/TP
Physical and Electrical considerations
Packet structure
Receive Frame State Machine
Slave and Master Node State Machine
Design issues (timing, buffering, MAC address)
7/31/2019 BACnet_MSTP
2/10
2
BACnet MS/TP EIA-485
120 120
510 47K 47K
+5
RTSTxRx
510
+5
RTSTxRx RTSTxRx
+ + +
- - -
Node with networkbias resistors
Node with localbias resistors
Node withoutbias resistors
Baud Rates: 9600, 19200, 38400, 57600, 76800Parity: noStart Bits: 1
Stop Bits: 1Least Significant Bit First (same as EIA-232)Uses standard UART
This may not be the ideal circuit for EIA-485. Therehas been much debate in the BACnet MS/TPworking group about it.
7/31/2019 BACnet_MSTP
3/10
3
MS/TP Packet Structure0x55
Preamble0xFF
Length
Destination Address
Source Address
Frame Type
Header CRC
Data
Data CRC
pad
2 octets, most significant octet first
1 octet
1 octet
1 octet
2 octets
1 octet
(present if Length is non-zero) Length octets
(present if Length is non-zero) 2 octets
(optional) at most, 1 octet0xFF
7/31/2019 BACnet_MSTP
4/10
4
Receive Frame State Machine
IDLEDATACRC
Bad CRC
Good CRC
EatAnOctet
EatAnError
Preamble 1
Timeout
NotPreamble
PREAMBLEError
HEADERCRC
BadCRC
NoData
NotForUs
HEADER
Frame Type
Destination
Source
Length 1
Length 2
DATA
Preamble
2
CRC 1
Data Octet
Data
Tim
eout
Error
HeaderCRC
Timeout
Error
RepeatedPreamble 1
CRC2
FrameTooLong
7/31/2019 BACnet_MSTP
5/10
5
Master Node State Machine
POLL
FOR
MASTER
DONE
WITH
TOKEN
INITIALIZE
USE
TOKEN
PASS
TOKEN
WAIT
FOR
REPLY
IDLENO
TOKEN
ANSWER
DATA
REQUEST
SendMaintenancePFMNothingToSend
SendNoWaitSendAnotherFrame
SoleMasterSoleMasterDeclareSoleMaster
SendNextPFM
SendAndWaitR
eceive
dReply
ReplyTim
eOut
Inva
lidFr
ame
Receive
dPostponeSen
dToken
ResetM
ainten
anceP
FM
Receiv
edR
eplyT
oPFM
Don
eWith
PFM
Fin
dN
ewSuccessor
GenerateT
ok
en
SawFrame
LostToken
Receiv
edUnexpectedFram
e
RetrySendToken
SawTo
kenUser
ReceivedU
nexpectedFram
e
ReceivedToken
DeferredReply
Reply
ReceivedDataNeedingReply
DoneInitializing
ReceivedPFM
ReceivedDataNoReplyReceivedInvalidFrame
ReceivedUnwantedFrame
SoleMasterRestartMaintenancePFM
7/31/2019 BACnet_MSTP
6/10
7/31/2019 BACnet_MSTP
7/10
7
MS/TP Timing
Tframe_abort
< 60 bit times
55 FF 00 72 0A 00 00 A9 55 FF 00 03 72 00 00 95 55 FF 00 A0 03 00 00 04
Tturnaround
> 40 bit times
Tusage_timeo
ut
< 20ms
Token TokenToken
Tpostdrive
< 15 bit times
7/31/2019 BACnet_MSTP
8/10
8
MS/TP Timing
55 FF 01 07 03 00 00 6D 55 FF 00 0A 03 00 00 04
TokenPoll For Master
Tusage_timeo
ut
< 20ms
EF 0F 41 2D 55 FF 00 72 0A 00 00 A9
Treply_timeout
< 255ms
Token
80 00 01 0E 31 00 62 FF01 04 02 05 53 07 C4 0255 FF 05 89 0A 00 12 12
BACnet Data Expecting Reply
7/31/2019 BACnet_MSTP
9/10
7/31/2019 BACnet_MSTP
10/10
10
MS/TP MAC Address
Master Node MAC 0-127 (0x00 - 0x7F)
Slave Node MAC 0-254 (0x00-0xFE)
Broadcast 255 (0xFF)
DIP switch, dials, LCD
Non-volatile, same after power cycle or reset
Proposed Auto Addressing (DHCP, ZeroConfig)
Recommended