
DN120 DeviceNet Gateway User’s Manual
Microscan Systems, Inc.
17
The
Transmit Request Number
is incremented by the user application when it sends new
TX
Message
output bytes in the Poll Command Message. After the gateway transmits these
TX
Message
bytes, it sets the
Transmit Acknowledge Number
equal to the
Transmit Request
Number
,
acknowledging the transmission. The updated
Transmit Acknowledge Number
is returned in the
next Poll Response Message. If the user application sends 0 as the
Transmit
Request Number
,
the gateway ignores the
TX Message
output bytes and resets its
Transmit
Acknowledge Number
to 0.
The following ladder-logic rungs show how the user application program writes a new
TX
Message
value, increments the
Transmit Request Number
(TX Rqst Num), and waits for the
Transmit Acknowledge Number
(TX Ack Num) to equal the
Transmit Request Number
(TX Rqst
Num). Note the application must wrap the
Transmit Request Number
from 15 to 1.
Compare Function:
TX Ack Num == TX Rqst Num
Copy Function:
TX Message = <byte array>
Addition Function:
TX Rqst Num = TX Rqst Num + 1
Compare Function:
TX Rqst Num == 16
Write Function:
TX Rqst Num = 1
Did gateway finish (acknowledge)
transmitting the last message?
Write next output bytes to transmit.
Increment TX Rqst Num (new data)
If TX Rqst Number greater than 15,
then reset number to 1 (1-15 range)