1 creating egd consumed exchanges, Creating egd consumed exchanges – Horner APG XL4 OCS HE-ETN300 User Manual

Page 37

Advertising
background image

SUP0740-07

CH.6

11/30/2009

Page 37 of 98

# 958

When creating a Consumed Exchange, the application programmer selects an Exchange Number
for it, determines whether to receive the Exchange as a single Consumer or as a member of a
Group of Consumers, chooses which Producer to receive the Exchange from, and sets how often
to expect the Exchange to be received.

When defining I/O Blocks for a Consumed Exchange, the application programmer selects what
type and how much information will be associated with the Exchange. For Consumed Exchanges,
there are five types of I/O Blocks to choose from: Data, Status, Timestamp, OCS Timestamp,
and Filler. Table 6.3 shows these I/O Block Types along with their definitions:

Table 6.3 – Consumed Exchange I/O Block Type Definitions

Type

Definition

Data Block

Block of consecutive OCS registers to be written with received data

Status Block

16-bit OCS register to be written with the Consumed Exchange’s

status word

Timestamp Block

8-byte binary timestamp indicating when the Producer sampled the

data

OCS Timestamp Block

14-byte OCS-format timestamp indicating when the Producer sampled

the data

Filler Block

Specifies a block of received data to ignore (skips unwanted data)


When defining Data Blocks for a Consumed Exchange, the maximum total OCS register data the
Exchange can receive from the EGD network is 1400 bytes. This means that up to a total of 700
16-bit registers (%R, %AI, AQ, etc.), or 11,200 1-bit registers (%M, %T, %I, %Q, etc.), or a
combination thereof can be defined for a Consumed Exchange.

Note: The Ethernet Module allows a total of up to 256 Data Blocks to be defined for all

Consumed Exchanges combined. This means that if 127 Consumed Exchanges are
configured, each can have an average of about 2 Data Blocks defined.


When a Status Block is defined for a Consumed Exchange, exactly 2 bytes of register data are
written with the Consumed Exchange’s Status Word. See Section 6.7 for general information
regarding EGD Status Words, and Section 6.7.2 for specific information regarding EGD
Consumed Exchange Status Words.

For a Timestamp Block, exactly 8 bytes of register data will be written with two 32-bit binary
timestamp values, containing the number of seconds and nanoseconds since January 1, 1970.

For an OCS Timestamp Block, exactly 14 bytes of register data will be written with a 7-word
OCS-format timestamp, consisting of second, minute, hour, day, month, year and millisecond
words. This OCS Timestamp can be displayed on the OCS screen, can be loaded into the OCS
time-of-day clock, and can be more easily processed by ladder logic.

Note: The binary Timestamp Block is rarely used, and there is never any need to define more

than one Status Block or OCS Timestamp Block for a given Consumed Exchange.


A Filler Block is used to skip unwanted data sent by the Producer. For example, if the Producer
sends 40 data bytes in an Exchange, and the Consumer only needs the first and last 10 bytes, a
Filler Block would be defined, in the appropriate slot in the list, to skip the middle 20 bytes of data.

6.5.1

Creating EGD Consumed Exchanges


To create EGD Consumed Exchanges, perform the following six steps:

Advertising
This manual is related to the following products: