Detailed flowcharts appendix d – Rockwell Automation 1775-KA PLC-3 Communication Adapter Module User Manual User Manual

Page 232

Advertising
background image

Detailed Flowcharts

Appendix D

DĆ22

Figure D.26

GETCODE Subroutine

GETCODE

GETRAW

Get Byte From UART

DLE
?

GETRAW

Get Byte From UART

DLE
?

No

Yes

BCC

Add Data Byte
to BCC

Return Byte
and Data Flag

Save ACK or
NAK in RESP

WAKEUP

Resume XMIT
if Sleeping
at WTRESP

ACK or NAK
?

Yes

No

No

Yes

No

Yes

ETX
?

Return Byte
and Control Flag

BCC

Include ETX

GETRAW

Get Low Byte of
BCC

BCC

Include in Check

GETRAW

Get High Byte of
CRC

BCC

Include in Check

Return EXT
and Control Flag

10096–I

Output:

BYTE –– What Was Received

Control/Data Flag –– Set if BYTE is

a control character which was
preceded by a DLE

NOTE: CRC Should Now Equal Zero

Advertising