23.03.2017 Views

wilamowski-b-m-irwin-j-d-industrial-communication-systems-2011

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

55-18 Industrial Communication Systems<br />

For the exchange of real-time application data, CIP provides the means of so-called implicit messages.<br />

Implicit messages have a connection-oriented uni- or multicast producer/consumer messaging model<br />

(i.e., similar to publish/subscribe model). In general, fieldbuses feature a cyclic execution behavior. In<br />

difference, CIP allows the so-called application-triggered message production behavior, which fits very<br />

well to the event-triggered execution model of IEC 61499. CIP furthermore provides QoS mechanisms<br />

that can be utilized for simplifying an IEC 61499 application, as certain <strong>communication</strong> errors can be<br />

handled at CIP stack level. These QoS mechanisms are<br />

1. Sequence counter: Each message is identified with an increasing sequence number, which allows<br />

the detection of wrong message order and lost messages.<br />

2. Production inhibit timer: With this value, the minimum time between two messages can be specified<br />

on the producer’s side. This allows to bound the network traffic.<br />

3. Expected packet rate: This rate gives the consumer an estimation of how often messages will<br />

arrive. This can be used to determine if the producer was lost.<br />

As CIP producers do not keep track of and do not request an acknowledgment from consumers, the<br />

producer has no CIP means for detecting the loss of consumers.<br />

With these basic assumptions, the behavior of the CIP_SEND_1 and the CIP_RCV_1 <strong>communication</strong><br />

FBs (Figure 55.15) is as follows:<br />

• The device containing the CIP_SEND_1 FB initializes this FB with an INIT+ event. The FB will<br />

create a CIP assembly object with the given ID. To this assembly object, the CIP_RCV_1 can now<br />

connect. The size of the data and the meaning of the data are defined by the number of inputs<br />

and their data types. As CIP uses the same data types as IEC 61499, namely the data types of IEC<br />

61131-3, the CIP data encoding mechanisms can be directly used.<br />

• After the CIP_SEND_1 set up its side of the <strong>communication</strong>, the CIP_RCV_1 can establish the<br />

connection. This is again triggered with an INIT+ event. The ID input has to specify the address<br />

of the device and the assembly object to connect to (i.e., the assembly object created by the CIP_<br />

SEND_1). As a result, the CIP stack is configured for a consumer, and a unicast CIP connection<br />

between the two devices is established. As the application cannot guarantee that the CIP_SEND_1<br />

is initialized before the CIP_RCV_1, the implementation has to be robust enough to handle this<br />

case (e.g., automatic retry to establish the connection).<br />

• On triggering the REQ event of the CIP_SEND_1, the input data are encoded into the CIP network<br />

format, and the message is sent. With a CNF event, the IEC 61499 application is informed<br />

on the success of this procedure. No information on the consumer side, such as if the data have<br />

been received and processed is given.<br />

• On receiving a message, the CIP stack will inform the CIP_RCV_1 FB. There the data is decoded<br />

and placed on the outputs. The application is then notified with an IND event.<br />

• Through INIT events, the connection can be closed from both sides. If the connection is closed<br />

from the CIP_SEND_1 side, the CIP_RCV_1 will be informed, otherwise not.<br />

Event<br />

INIT<br />

REQ<br />

INITO<br />

CNF<br />

INIT INITO<br />

IND<br />

Data<br />

CIP_SEND_1<br />

ID<br />

SD_1<br />

CIP_RCV_1<br />

ID<br />

RD_1<br />

FIGURE 55.15<br />

Producer–consumer pair implemented with CIP.<br />

© <strong>2011</strong> by Taylor and Francis Group, LLC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!