Rockwell-automation 1775-KA PLC-3 Communication Adapter Module User Ma Instrukcja Użytkownika Strona 120

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 239
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 119
Full-Duplex Protocol
Chapter 10
1016
Table 10.B
Receiver
for Full-Duplex Protocol
RECEIVER is defined as
variables
LAST-HEADER is 4 bytes copied out of the last good message
RESPONSE is the value of the last ACK or NAK sent
BCC is an 8-bit block check accumulator
LAST-HEADER = invalid
LAST RESPONSE = NAK
loop
reset parity error flag
GET-CODE
if DLE STX then
begin
BCC=0
GET-CODE
while it is a data code
begin
if buf
fer is not overflowed put data in buf
fer
GET-CODE
end
if the control code is not a DLE ETX then send DLE NAK
else if error flag is set then send DLE NAK
else if BCC is not zero then send DLE NAK
else if message is too small then send DLE NAK
else if message is too large then send DLE NAK
else if header is same as last message send a DLE ACK
else if message sink is full send DLE NAK
else
begin
send message to message sink
send a DLE ACK
save last header
end
end
else if DLE ENQ then send LAST-RESPONSE
else LAST-RESPONSE = NAK
end
GET-CODE is defined as
loop
variable
GET-CHAR
if char is not a DLE
begin
add char to BCC
return the char and data flag
end
else
Przeglądanie stron 119
1 2 ... 115 116 117 118 119 120 121 122 123 124 125 ... 238 239

Komentarze do niniejszej Instrukcji

Brak uwag