POWERLINK Factory Interface

POWERLINK Factory Interface

Note: POWERLINK is only supported by In-Sight 70xx - 74xx series vision systems running In-Sight firmware version 4.7.2 or later, and In-Sight Explorer software version 4.7.2 or later. It is not supported with firmware version 5.1.0 or later.

The data transferred between the POWERLINK Master Node and an In-Sight vision system during the isochronous phase is organized into five data channels. The Channels described below are mappable to the Process Data Object (PDO) for cyclic transfer over a POWERLINK network during the isochronous phase. The Channels from the POWERLINK Factory Interface provide a communication path to specific In-Sight vision system data buffers, for the exchange of data and vision system job management, acquisition and inspection control and status data.

Inspection Control Object (0x2000)

The Inspection Control Object is a pre-defined double-integer that enables the PLC to issue certain common In-Sight vision system commands, such as triggering the vision system, changing the vision system's job file and initiating Soft Events.

Index Name Type Access Notes

1

Control

32-bit integer

RW

The 32-bit Control field is mapped into the Control structure, which is described in the Control Structure Table, below.

2

JobLoadID

16-bit integer

RW

The ID number (1-999) of the job to load when the Initiate Job Load bit is set by the PLC.

Control Structure

When the Control field of the Inspection Control Object is configured for cyclic transfer, the individual bits of the Control Structure will be accessible in the PLC.

Note: In the current release, the Control field is exposed as a DWORD only (without bitwise labels).
Bit Name Description

0

Trigger Enable

This field is set to enable triggering via the Trigger bit. Clear this bit to disable the network triggering mechanism.

1

Trigger

Setting this bit triggers an acquisition when the following conditions are met:

  • The In-Sight vision system is Online.
  • The Trigger Enable bit is set.
  • The AcquireImage function's Trigger parameter is set to Industrial Ethernet.

    Note: The Trigger parameter settings of Network or External may also be used, but they will add additional latency.

2

Buffer Results Enable

When this bit is set, the Inspection Count, Inspection Result Code and Inspection Results fields are held constant until they are acknowledged by setting the Inspection Results Ack bit. Up to eight inspections are held in the In-Sight vision system's buffer. The vision system will respond to the acknowledgment by clearing the Results Valid bit. Once the Inspection Results Ack bit is cleared and there is a new set of results sent to the PLC, the Results Valid bit will no longer be cleared. If the Inspection Results Ack bit is cleared and there are no more results in the vision system's buffer that are to be sent to the PLC, the Results Valid bit remains cleared.

3

Inspection Results Ack

When the Buffer Results Enable bit is set, the Inspection Results Ack bit is set by the PLC to acknowledge that it has received the Inspection Count, Inspection Result Code and Inspection Results data. The next set of inspection results is then sent to the PLC. Clearing the Inspection Results Ack bit causes the vision system to set the Results Valid bit if the buffer is not empty.

4

Initiate Job Load

When set, the vision system loads the job ID specified in the Job Load ID field.

Note: Do not set the Initiate Job Load bit while the In-Sight vision system is Online. Take the vision system Offline before setting the Initiate Job Load bit; otherwise the Job Load Failed bit will not be set.

5 -6

Reserved

Reserved for future implementations.

7

Set Offline

When this bit is set, the In-Sight vision system is taken Offline until the bit is cleared again.

8 - 15

Reserved

Reserved for future implementations.

16

Set User Data

This command is used by the PLC to indicate to the In-Sight vision system that it should transfer the User Data field into a holding buffer for consumption by the vision system.

17 - 18

Reserved

Reserved for future implementations.

19

Clear Exposure Complete

While this signal is High, the Exposure Complete status will remain reset. Once this signal is set to Low, the Exposure Complete status will be set to High on the next exposure completion.

20 - 23

Reserved

Reserved for future implementations.

24 - 31

Soft Event 0 - 7

Allows Spreadsheet soft events to be triggered. Setting any of these bits causes the associated soft event in the Spreadsheet to be triggered.

Inspection Status Object (0x2001)

The Inspection Status Object is also a pre-defined double integer block, which informs the PLC about the status of the In-Sight vision system, such as Trigger Ready, Inspecting, and Inspection Complete, for example, and provides additional diagnostic information, such as error statuses, Online/Offline status or missed acquisitions.

Index Name Type Access Notes

1

Status

32-bit integer

R

The 32-bit Control field is mapped into the Status structure, which is described in the Status Structure Table, below.

2

CurrentJobID

16-bit integer

R

A 16-bit integer that denotes the ID number of the currently running job on the vision system, or 65535 if the current job does not have an ID number. This field is updated when the job is changed on the vision system, regardless of method of job change.

3

AcquisitionID

16-bit integer

R

The identifier is associated with the current acquisition. This identifier is set to the Acquisition ID when the Trigger Ack signal is asserted for an acquisition triggered using the Trigger bit.

Status Structure

When the Status field of the Inspection Status Object is configured for cyclic transfer, the individual bits of the Status Structure will be accessible in the PLC.

Note: In the current release, the Control field is exposed as a DWORD only (without bitwise labels).
Bit Name Description

0

Trigger Ready

Indicates when an In-Sight vision system can accept a new trigger via the Trigger bit. This field is true when the vision system is Online, the Network Trigger Enable bit is set, the AcquireImage function's Trigger parameter is set to Industrial Ethernet and the vision system is not currently acquiring an image.

The Trigger parameter settings of Network or External may also be used, but they will add additional latency.

1

Trigger Ack

Indicates when an In-Sight vision system has been triggered by the Trigger bit being set; this bit will stay set until the Trigger bit is cleared.

2

Acquiring

Set when an In-Sight vision system is currently acquiring an image, regardless how the acquisition was triggered.

3

Missed Acq

Set when an In-Sight vision system misses an acquisition trigger, regardless how the acquisition was triggered; cleared when an acquisition is successfully triggered.

4 - 6

Offline Reason

This field is a 3-bit field used to identify the cause of why an In-Sight vision system is Offline:

Offline Reason Name Description

0

Online

The vision system is Online.

1

Programming

The vision system's job is being modified.

2

Discrete Offline

A discrete signal is holding the vision system Offline.

3

Comm. Offline

A communications protocol is holding the vision system Offline.

Note: It is possible to have multiple devices holding the In-Sight vision system Offline. In this scenario, this field will return the channel with the lowest reason code.

7

Online

This bit is set when the In-Sight vision system is Online, and cleared when the vision system is Offline. When the vision system is Offline, examine the Offline Reason field to determine the reason.

8

Inspecting

This bit is set when an In-Sight vision system is running a job.

9

Inspection Completed

This bit is toggled upon the completion of an inspection. It is guaranteed to be toggled after the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are sent to the PLC.

10

Results Buffer Overrun

This field is set when the Buffer Results Enable bit is set and the In-Sight vision system has discarded a set of inspection results because the PLC has not acknowledged the results by setting the Inspection Results Ack bit. Up to eight inspections are held in the vision system's buffer; therefore, this bit is set when the ninth inspection is added to the buffer, and will overwrite the eighth inspection in the buffer. The bit is not cleared until a valid inspection occurs and a previous inspection is not overwritten.

11

Results Valid

Set when the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are set. The bit is cleared when the Inspection Results Ack bit is set.

Note: If job processing is enabled to occur in overlapped mode, either the Buffer Results Enable bit should be enabled/set, or the Inspection Completed bit should be used to latch the inspection results.

12

Job Loading

This bit is set when a job load was initiated through this protocol.

13

Job Load Complete

This bit is toggled on the completion of a job load operation initiated by this protocol.

14

Job Load Failed

This bit is set when the last job load attempt failed. It is cleared after a successful job load, initiated by the MN.

15

Reserved

Reserved for future implementations.

16

Set User Data Ack

This command is used by the PLC to indicate to the In-Sight vision system that it should transfer the User Data field into a holding buffer for consumption by the vision system.

17 -18

Reserved

Reserved for future implementations.

19

Exposure Complete

This bit is set upon the completion of the In-Sight vision system's exposure period, and is reset by the Clear Exposure Complete bit. This bit will be held in a reset state if the Clear Exposure Complete signal is set to High.

20 Job Pass

This bit is set if the most recent job passed as configured in the Job Pass/Fail Cell Setup dialog. This bit is cleared if the job did not pass.

21 - 23

Reserved Reserved for future implementations.

24 - 31

Soft Event Ack 0 - 7

These bits are used to indicate that the Soft Event command was received.

Inspection Results (0x2010)

The Inspection Results provide the acquisition ID and the length of the data in the Inspection Results Data block.

Index Name Type Access Notes

1

InspectionID

32-bit integer

R

The acquisition ID associated with this set of results.

2

InspectionResultCode

16-bit integer

R

Currently unused; always 0.

3

InspectionResultLength

16-bit integer

R

The length of the inspection results data.

Inspection Results Data (0x2011)

The Inspection Results Data Channel is a configurable series of registers that are used for communicating data from the vision inspection to the PLC. For example, the PLC may want to know what the overall "Pass/Fail" result, the result of a measurement, the X, Y and angle position of a part or the result of a bar code. This data is sent via the Inspection Results Data Channel.

Index Name Type Access Notes

1 - 64

InspectionResultsNN

32-bit integer

R

Inspection result data written from the spreadsheet, using the WriteResultsBuffer function.

User Data (0x2021)

The User Data Channel is a configurable series of registers used for sending values from the PLC to the In-Sight vision system. For example, a tolerance setting can be sent from the PLC to the vision system, so that it applies the applicable tolerance when inspecting a certain part.

The User Data Channel can also be used to write individual 32-bit integer values to the User Data Block, or assign them to the Process Data Object (PDO) for cyclical transfer.

Index Name Type Access Notes

1 - 64

UserDataNN

32-bit integer

RW

Data buffer which can be read into the spreadsheet using the ReadUserDataBuffer or ReadLatchedUserDataBuffer function.

POWERLINK/In-Sight Vision System Mapping

The following modules allow access to the various subsystems in the In-Sight vision system.

Typical Acquisition Sequence

An In-Sight vision system can be triggered by directly manipulating the Trigger Enable and Trigger bits in the Control field of the Inspection Control Object, or by monitoring the Trigger Ready, Trigger Ack, Acquiring and Missed Acq bits in the Status structure of the Inspection Status Object.

While in Automation Studio, from the Inspection Control Channel, set the Trigger Enable bit to True and toggle the Trigger bit from False to True, while the Trigger Ready bit is set to True.

Sample In-Sight Vision System Acquisition Sequence

On initial start-up, the Trigger Enable bit will be False, and must be set to True to enable triggering. When the vision system is ready to accept triggers, the Trigger Ready bit in the Control field of the Inspection Control Object will be set to True.

While the Trigger Enable and Trigger Ready bits are True, each time the vision system sees the Trigger bit change from False to True, an image acquisition will be initiated. The Trigger bit should be held on until the Trigger Ack bit of the Status structure of the Inspection Status Object changes to False (this is a necessary handshake to guarantee that the change has been seen by the vision system).

During an image acquisition, the Trigger Ready bit in the Control field of the Inspection Control Object will be cleared and the Acquiring bit will be set to True. When the acquisition is completed, the Acquiring bit will be cleared and the Trigger Ready bit will again be set to True, indicating that the vision system is ready to begin a new image acquisition.

To force a reset of the trigger mechanism, set the Trigger Enable bit to False until the Acquisition Status register is True. Then the Trigger Enable bit can be set to True and acquisitions re-enabled.

Inspection/Result Sequence

When an image is acquired by an In-Sight vision system, the image is placed in a queue for processing. While the vision system is processing the image, the Inspecting bit of the Status structure is set. When the vision system has finished processing the image, the Inspecting bit is cleared and the Inspection Completed bit is toggled.

The Buffer Results Enable bit of the Control Structure determines how inspection results are handled by the vision system. If the Buffer Results Enable bit is set to False, then the inspection results are immediately placed into the Control Structure and the Results Valid bit is set to True. If the Buffer Results Enable bit is set to True, the new results are queued. The earlier inspection results remain in the Control Structure until the PLC sets the Inspection Results Ack bit to True, acknowledging receipt of the results. After the Results Valid bit is cleared, the PLC should set the Inspection Results Ack bit back to False to allow the queued results to be placed into the Status Structure (this is a necessary handshake to ensure that the results are received by the PLC).

Inspection Status Signal Behavior

Bit Name Results If Buffering Is Disabled Results If Buffering Is Enabled

Inspecting

Set when processing an image.

Set when processing an image.

Inspection Complete

Toggled on completion of image processing.

Toggled on completion of image processing.

Results Buffer Overflow

Remains set to 0.

Set when the inspection results could not be queued because the PLC failed to acknowledge the previous results, causing the results buffer to overflow. Cleared when an inspection result is successfully queued.

Results Valid

Set when new results are placed in the Inspection Resultsand Inspection Results Data channels. Stays set until the results are acknowledged by setting the Inspection Results Ack bit to True.

Set when new results are placed in the Inspection Results and Inspection Results Data channels. Stays set until the results are acknowledged by setting the Inspection Results Ack bit to True.

Job Pass Set when an inspection is completed and the Job Pass/Fail cell indicates pass; otherwise it remains cleared.
Note: The Job Pass bit will be valid prior to toggling the Inspection Completed bit.

Set when new results are placed in the InspectionResults attribute and the Job Pass/Fail cell indicated pass for that result set; otherwise it remains cleared. The state will not change until the results are acknowledged by setting the InspectionResultsAck attribute to True, at which time the bit will be cleared.

Note: The Job Pass bit will be valid prior to the Results Valid bit being set.

Results Buffering

A queue for inspection results may be enabled. If enabled, this allows a finite number of inspection data results to be queued until the PLC has time to read them. This is a useful feature for smoothing out data flows if different parts of the system (including the external PLC) slow down for short periods of time.

In general, if inspections are occurring faster than the results can be sent out, the primary difference between buffering and not buffering is determining which results get discarded. If buffering is not enabled, the most recent results are kept, and the earlier result that the PLC was unable to read is lost. Essentially, the most recent result will simply overwrite the earlier result. If buffering is enabled (and the queue becomes full), the most recent results are discarded until room becomes available in the results queue.

Soft Events

In addition to sending data to an In-Sight vision system from a PLC, soft events can be sent to control job specific behavior. Each soft event has a trigger (bits 24-31 in the Inspection Control Object) and acknowledgment bit (bits 24-31 in the Inspection Status Object) associated with it. The rising edge of the trigger bit causes the In-Sight vision system to process the action associated with the soft event. Upon initiation of the soft event, the vision system will set the Soft Event Ack bit to High. This bit will be held High until the PLC resets the trigger bit, and the processing of the action associated with the soft event has been completed. If the soft event could not be triggered, the general fault bit will be set to High; this bit will remain High until an event is successfully triggered.

Note: In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.

POWERLINK/In-Sight Vision System LED Behavior

When utilizing a POWERLINK-enabled In-Sight vision system, the vision system's LEDs are used to convey POWERLINK-specific behavior status updates. User 1 LED (red) is the POWERLINK error LED, and User 2 LED (green) is the POWERLINK status LED; these states cannot be modified in the Discrete I/O Settings dialog.

Note: User 1 LED will turn on when the vision system, as a Node on the POWERLINK network, detects an error condition on the POWERLINK network, and will turn off once normal operation resumes.
User 2 LED State LED Behavior Description

LED OFF

Constantly OFF

POWERLINK is initializing.

LED Flickering

Blinking at 10Hz

POWERLINK is in basic Ethernet mode (i.e. a POWERLINK Master Node has not been detected on the network).

LED Single Flash

One short flash (200ms), followed by a long OFF phase (1000ms)

The vision system has detected a Master Node on the POWERLINK network, however, isochronous communications have not been detected.

LED Double Flash

Two short flashes, followed by a long OFF phase

The POWERLINK network has begun isochronous communications, but the vision system has not been configured to participate.

LED Triple Flash

Three short flashes, followed by a long OFF phase

The Node device has completed configuration, and is awaiting a signal from the Master Node to begin isochronous communications.

LED ON

Constantly ON

The Node device is communicating on the POWERLINK network.

LED Blinking

Blinking at 2.5Hz

The POWERLINK Node has stopped due to an error.