EtherCAT Object Model

Note: This help topic refers to readers running firmware version 6.3.8 and higher, in conjunction with the v2 of the ESI file.

The EtherCAT implementation on consists of the following Process Data Objects (PDOs):

  • Control

  • Status

  • Acquisition

  • Inspection Results (configurable blocks)

  • SoftEvent

  • SoftEvent Ack

  • User Data (configurable blocks)

The following image shows an example of PDOs:

The Cognex object model has modular PDOs to offer flexibility and maximize performance or usability on demand. Using the maximum PDO size extends usability at the expense of the performance. For better performance, reduce the size of the PDOs. You only need to select the PDO in the application.

The PDO can have a maximum size of 1048 bytes out of 1486 bytes in a single frame. You need at least 152 bytes.

Note: For more information about how frames are used for Slaves, see EtherCAT Introduction.

Control Object

Controls the reader. This object consists of data sent from the PLC to the DataMan reader.

Byte size: 1 byte

Index Name Description
7000:01 Trigger Enable Enables triggering through EtherCAT. Clearing this bit disables triggering.
7000:02 Trigger

Triggers an acquisition when the following conditions are met:

  • Trigger Enable is set

  • No acquisition is currently in progress

  • The reader is ready to trigger

7000:03 Results Buffer Enable

Enables queuing of Result Data. If enabled, the current result data will remain until acknowledged, even if new results arrive. New results are queued. The next set of results are pulled from the queue, made available in the Result Data module, each time the current results are acknowledged.

The reader responds to the acknowledge by clearing the Results Available bit. Once the Results Ack bit is cleared the next set of read results will be posted and Results Available will be set True.

If results buffering is not enabled newly received read results will simply overwrite the content of the Result Data module. The reader can buffer up to 50 and the base station can buffer up to 500 sets of read results.

7000:04 Results Ack Used to acknowledge that the PLC has successfully read the latest result data. When set True the Result Available bit will be cleared. If result buffering is enabled, the next set of result data will be pulled from the queue and Result Available will again be set True.
7000:05 Reserved Reserved for future use.
7000:06
7000:07
7000:08

Soft Events

Used to initiate a SoftEvent.

Byte size: 1 byte

Index Name Description
7001:01 Train Code Transition from 0 to 1 invokes the Train Code operation.
7001:02 Train Match String

Transition from 0 to 1 invokes the train match string operation.

7001:03 Train Focus Transition from 0 to 1 invokes the train focus operation.
7001:04 Train Brightness Transition from 0 to 1 invokes the train brightness operation.
7001:05 Untrain Transition from 0 to 1 invokes the untrain operation.
7001:06 Reserved Reserved for future use.
7001:07 Execute DMCC Transition from 0 to 1 invokes the DMCC operation. You must first place a valid DMCC command string in User Data before invoking this event.
7001:08 Set Match String Transition from 0 to 1 invokes the set match string operation. You must first place match string data in User Data before invoking this event.

User Data Object

Data sent from a PLC to a reader to support acquisition, decode, and other special operations. Currently this object is only used to support the Execute DMCC and Set Match String SoftEvents.

PDO Index
UserData32 7002
UserData64 7003
UserData128 7004
UserData256 7005
Byte Name Description

0

32

64

96

128

224

256

480

User Data

Data sent from the PLC to the reader to support acquisition, decoding, and other special operations (array of bytes).

Note: Requires a \0 termination character.
Note: For the Set Match String SoftEvent, the pattern is applied to all symbologies.

Status Object

Indicates the current reader status. This object consists of data sent from the DataMan reader to the PLC.

Byte size: 2 byte

Index Name Description
6000:01 Trigger Ready Indicates when the reader is ready to accept a new trigger. True when Trigger Enable is set and the reader is ready to accept a new trigger.
6000:02 Trigger Ack

Indicates that the reader has received a new Trigger. Remains True as long as the Trigger bit remains True, that is, it is interlocked with the Trigger bit.

6000:03 Reserved Reserved for future use.
6000:04 Acquisition Error Indicates that the reader was unable to successfully trigger an acquisition. Cleared when the next successful acquisition occurs.
6000:05 Reserved Reserved for future use.
6000:06
6000:07
6000:08
6000:0A Decoding

Set while decoding an image.

6000:0B Results Buffer Overrun

Indicates that the reader has discarded a set of read results because the results queue is full. Cleared when the next set of results are successfully queued.

6000:0C Results Available

Indicates that a new set of read results are available, that is, the contents of the Result Data module are valid. Cleared when the results are acknowledged.

6000:0D General Fault Indicates that a fault has occurred, for example, a SoftEvent Set Match String or Execute DMCC error has occurred.
6000:0E Reserved Reserved for future use.
6000:0F
6000:0G

Soft Events Ack

Used to acknowledge completion of a SoftEvent.

Byte size: 1 byte

Index Name Description
6001:01 Train Code Ack Indicates that the Train Code operation is complete.
6001:02 Train Match String Ack

Indicates that the Train Match String operation is complete.

6001:03 Train Focus Ack Indicates that the Train Focus operation is complete.
6001:04 Train Brightness Ack Indicates that the Train Brightness operation is complete.
6001:05 Untrain Ack Indicates that the Untrain operation is complete.
6001:06 Reserved Reserved for future use.
6001:07 Execute DMCC Ack Indicates that the Execute DMCC operation is complete.
6001:08 Set Match String Ack Indicates that the Set Match String operation is complete.

Acquisition Object

Contains further information about the Result. This object consists of data sent from the reader to the PLC.

Byte size: 6 byte

Index Name Description
6002:01 TriggerID Trigger identifier. ID of the next trigger to be issued.
6002:02 ResultID The value of the Trigger ID when the trigger that generated these results was issued. Used to match up triggers with corresponding result data (16-bit integer).
6002:03 Read The bit is set on a successful decode.
6002:04 Validated The bit is set on a successful code validation.
6002:05 Verified The bit is set on a successful code verification.
6002:06 Acquisition Trigger Overrun The bit is set if the error trigger overrun is risen.
6002:07 Acquisition Buffer Overflow The bit is set if the error buffer overflow is risen.
6002:08 Reserved Reserved for future use.
6002:09 DMCC Response The DMCC responses over EtherCAT is enabled by default. This bit is set when the Inspection result bit carries the output of a DMCC. If zero, then inspection result carries a decode result.
6002:0A Reserved Reserved for future use.
6002:0B
6002:0C
6002:0D
6002:0E
6002:0F
6002:10
6002:11
6002:12

Inspection Results Object

Read result data sent from a reader to a PLC.

Bytes sizes: 

  • 0

  • 32

  • 64

  • 96

  • 128

  • 224

  • 256

  • 480

PDO Index
InspectionResult32 6003
InspectionResult64 6004
InspectionResult128 6005
InspectionResult256 6006
Byte Name Description
0...1 Result Length Actual number of bytes of Result Data contained in the Result Data field (16-bit integer).
2... Result Data

Decoded read result data (array of bytes).

Note: If the result is bigger than the frame configured, the result is sliced into subsequent data frames. For more information, see the Long Codes Behavior section in the EtherCAT Operation.