Rockwell Automation 1775-KA PLC-3 Communication Adapter Module User Manual User Manual

Page 116

Advertising
background image

Full-Duplex Protocol

Chapter 10

10Ć12

Table 10.A

Transmitter for Full-Duplex Protocol

TRANSMITTER is defined as

loop

Message=GET-MESSAGE-TO-SEND

Status=TRANSFER (Message)

SIGNAL-RESULTS (Status)

end

TRANSFER (Message) is defined as

initialize nak-limit and enq-limit

SEND (Message)

start timeout

loop

WAIT for response on path 2 or timeout.

if received DLE ACK then return SUCCESS

else if received DLE NAK then

begin

if nak-limit is exceeded then return FAILURE

else

begin

count NAK retries;

SEND-MESSAGE (message);

start timeout

end

end

else if timeout

begin

if enq-limit is exceeded then return FAILURE

else

begin

count ENQ retries;

send DLE ENQ on path 1;

start timeout

end

end

end loop

SEND (Message) is defined as

begin

BCC = O

send DLE STX on path 1

for every byte in the message do

begin

add the byte to the BCC;

send the corresponding data code on path 1

end

send DLE ETX BCC on path 1

end

GET-MESSAGE-TO-SEND

This is an operating-system-dependent interface routine that waits and allows the rest of the system to run until the message source

has supplied a message to be sent.

SIGNAL-RESULTS

This is an implementation-dependent routine that tells the message source of the results of the attempted message transfer.

WAIT

This is an operating-system-dependent routine that waits for any of several events to occur while allowing other parts of the system

to run.

Advertising