18 -
DeviceMaster UP PROFINET CbA User Guide
: 2000409 Rev. D
Chapter 2. Programming Interface
Handshaking (Optional)
2.7. Handshaking
(Optional)
Handshaking between the DeviceMaster UP and the PLC assures the producer (for example, the PLC
component) that the consumer (for example, DeviceMaster UP) received the serial packet. The producer must
know this before it sends another packet. This avoids possible data loss that might occur due to dissimilar
polling periods or system busy conditions.
Handshaking is optional. When you disable handshaking, serial data transfer is simplified. You must ensure
that the duty cycle of the serial packets is low enough to prevent data loss.
2.7.1. General
Serial
Transfer
Procedure: Handshaking Enabled
When you enable handshaking, the handshake variables
HSK_ID
and
HSK_ACK
act as flags to the serial
data producer and consumer. In the initial state, producer and consumer set the handshake variables
HSK_ID
and
HSK_ACK
to zero and behave according to the following state machine:
Consumer
Producer
1.
Consumer loops reading
HSK_ID
.
2.
Producer writes packet of
serial data to
DATA
variable.
3.
Producer increments
HSK_ID
.
4.
Producer loops reading
HSK_ACK
.
5.
Consumer observes incremented
HSK_ID
, consumes
DATA
.
6.
Consumer writes
HSK_ACK
to
equal
HSK_ID
.
7.
Producer observes
HSK_ACK
equals
HSK_ID
. Serial packet
has been consumed.
Repeat
Содержание DeviceMaster Up
Страница 1: ...PROFINET CbA User Guide ...