PROFINET IO Module Reference Table - In-Sight 5.x.x and Later Firmware

This topic covers the PROFINET IO Module reference table and the signals contained in the table for In-Sight vision systems running In-Sight 5.1.0 and later firmware, in conjunction with the GSD file. For a complete list of models and supported firmware versions, see Firmware Versions.

PROFINET IO Module Reference Table and Module Descriptions

Module ID Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0

Acquisition

Control

0x101 0

Set

Offline

Reserved

Clear

Exposure

Complete

Trigger

Trigger

Enable

Acquisition

Status

0x201 0 Online Offline Reason

Missed

Acq

Exposure

Complete

Trigger

Ack

Trigger

Ready

1..2 Acquisition ID

Inspection

Control

0x102 0

Clear

Error

Reserved

Execute

Command

Set User

Data

Inspection

Results

Ack

Buffer

Results

Enable

Inspection

Status

0x203 0

Set User

Data Ack

Command

Failed

Command

Completed

Command

Executing

Results

Valid

Results

Buffer

Overrun

Inspection

Completed

System

Busy

1 Error Reserved Reserved Reserved (5.1.0 - 5.5.x)

Job

Pass

TestRun Ready (5.6.0 and later)
2..3 Error Code

Command

Control

Input

0x107 0..1 Command (16-bit)

Command

Control

Output

0x107 0..1 Current Job ID (16-bit)

Soft Event

Control Input

0x106 0

Soft Event

7

Soft Event

6

Soft Event

5

Soft Event

4

Soft Event

3

Soft Event

2

Soft Event

1

Soft Event

0

Soft Event

Control Output

0x106 0

Soft Event

Ack 7

Soft Event

Ack 6

Soft Event

Ack 5

Soft Event

Ack 4

Soft Event

Ack 3

Soft Event

Ack 2

Soft Event

Ack 1

Soft Event

Ack 0

User Data

0x301(16)

0x302(32)

0x303(64)

0x304(128)

0x305(254)

0.. User Data

Inspection Results

0x401(16)

0x402(32)

0x403(64)

0x404(128)

0x405(250)

0..1 Inspection ID
2..3 Inspection Results Code
4.. Inspection Results

Acquisition Control Module

The Acquisition Control Module and Acquisition Status Module bits allow the PLC to trigger an acquisition on the In-Sight vision system, determine when an acquisition has completed and place the vision system into an Offline status where it will no longer accept acquisition triggers.

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 External or Industrial Ethernet.
  • The Industrial Ethernet Trigger type should be used when the trigger is coming from a PLC.

2

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.

3 - 6

Reserved

Unused.

7

Set Offline

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

Acquisition Status Module

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 Trigger Enable bit is set, the AcquireImage function's Trigger parameter is set to Network, External or Industrial Ethernet, and the vision system is not currently acquiring an image.

The Industrial Ethernet Trigger type should be used when the trigger is coming from a PLC.

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. In addition, the Acquisition ID can be latched to the rising edge of this bit.

Note: If the Trigger bit is set, but the vision system is offline, the Missed Acq and Trigger Ack bits will both be set.

2

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.

3

Missed Ack

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

Note: If the Trigger bit is set, but the vision system is offline, the Missed Acq and Trigger Ack bits will both be set.

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 - 23

Acquisition ID

This ID increments at the beginning of an acquisition and when the Trigger Ack bit is set; can be used to synchronize an acquisition with its Inspection Results.

Typical Acquisition Sequence

Note: If the In-Sight vision system will be configured to accept an acquisition trigger from a PLC/Motion Controller via a Native Mode command, Cognex recommends that the SetEvent and Wait function be utilized, with the Event code set to 8 (SW8). This will ensure that vision system waits for both the acquisition and inspection to be completed before sending a "complete" response back to the PLC/Motion Controller, and that previous inspection results are not being sent to the PLC/Motion Controller. The "complete" response from the vision system can also then be used to create conditional PLC logic that sends a read request for the inspection results. For more information, see Set Event and Wait.

An In-Sight vision system can be triggered by directly manipulating the Trigger Enable and Trigger bits in the Acquisition Control Module, or by monitoring the Trigger Ready, Trigger Ack and Missed Acq bits in the Acquisition Status Module.

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 Acquisition Status Module 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 0 to 1, an image acquisition will be initiated. The Trigger bit should be held in the new state until that same state value has been seen in the Trigger Ack bit of the Acquisition Status Module (which is a necessary handshake to guarantee that the change has been seen by the vision system).

During an acquisition, the Trigger Ready bit in the Acquisition Status Module will be cleared. The Exposure Complete bit will be set at the end of the acquisition, and can only be cleared by the Clear Exposure Complete bit.

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

Inspection Control Module

The Inspection Status Module and Inspection Control Module modules allow the PLC to monitor the vision processing portion of the In-Sight vision system to determine when new results are available, and to request that the vision system queue any new results.

Bit Name Description

0

Buffer Results Enable

When this bit is set, the Inspection ID, Inspection Result and Inspection Results fields are held constant until the Inspection Results Ack field has acknowledged them and been set. Up to eight inspections are held in the vision system's buffer. The In-Sight vision system will respond to the acknowledgment by clearing the Results Valid bit. Once the Inspection Results Ack field is cleared and there is a new set of rules 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.

1

Inspection Results Ack

When the Buffer Results Enable bit is set, the Inspection Results Ack bit acknowledges that the PLC has received the Inspection ID, Inspection Result 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. If results buffering is disabled, the Inspection Results Ack bit must be set to clear the Results Valid bit.

2 Set User Data The rising edge of this signal will latch the User Data Holding Buffer into the User Data field to give the vision system access to the user data. To guarantee that the vision system received the command, the bit should be held high in the PLC until the Set User Data Ack bit is asserted in the Inspection Status Module. The User Data Holding Buffer can be written to by using the Profinet Write Record command. If the Set User Data signal is asserted while the User Data Module is configured on the Profinet connection, a module alarm will be asserted.
3 Execute Command (5.1.0 - 5.5.x)

When set, the vision system either loads the job ID specified in the Command field or executes the Job Load by Name command to load the job name given in the User Data buffer. The signal must be held high until the Command Completed signal is toggled. The falling edge of this signal (if prior to Command Complete) is interpreted as an abort request.

Execute Command (5.6.0 and later) When set, the vision system loads the job ID specified in the Command field or executes the Job Load by Name command to load the job name given in the User Data buffer. When using TestRun, the rising edge of this signal will execute command to start TestRun. The signal must be held high until the Command Completed signal is toggled. The falling edge of this signal (prior to Command Complete) is interpreted as a TestRun execution abort request.

4 - 6

Reserved

Unused.

7 Clear Error When this bit is set, it will clear the Error and Error Code signals; the Clear Error bit should be held high until the Error bit has been cleared. If an error has been queued, clearing this bit will cause the Error and Error Code signals to be set to the next queued error code.

Inspection Status Module

Bit Name Description

0

System Busy

Set when the vision system is running a job, loading a job or responding to user input.

1

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.

2

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, and in turn set the InspectionResults 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. The ninth inspection, and all subsequent inspections, will be dropped until there is room in the buffer (when the results have been acknowledged out). The bit is not cleared until a valid inspection occurs and a previous inspection is not overwritten.

3

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.

4

Command Executing (5.1.0 - 5.5.x)

This bit is set to 1 when Job Load is started. The Command Completed and Command Failed bits will be set prior to the falling edge of this bit.

Command Executing (5.6.0 and later) This bit is set to 1 when a TestRun execution or Job Load is started. When a TestRun execution has completed, this bit is cleared. The Command Completed bit and Command Failed bit will be set prior to the falling edge of this bit.

5

Command Completed (5.1.0 - 5.5.x)

When a Command completes the Command Executing bit goes low and if the Execute Command bit is still high, the Command Completed bit is set. If the Command did not successfully complete, the Command Failed bit is also set.

Note: The camera clears the Command Completed bit when the Execute Command bit goes low.
Command Completed (5.6.0 and later)

This bit is set to indicate that a TestRun execution or Job Load has completed.

Note: If you attempt to execute TestRun on a Job without a TestRun configuration, both the Command Completed and the Command Failed bit will be set.You must wait for the TestRun Ready bit to be set before executing TestRun.

6

Command Failed (5.1.0 - 5.5.x)

This bit is set to 1 to indicate that Job Load has failed to run to completion. It is cleared when a new job is loaded by the PLC/HMI. If the job is changed through In-Sight Explorer, this bit does not change. This bit is always set prior to setting the Command Completed bit.

Command Failed (5.6.0 and later) This bit is set to 1 to indicate that a TestRun execution or Job Load has failed. It is cleared when a new TestRun sequence is executed, or a new job is loaded by the PLC/HMI. If you change the job in In-Sight Explorer, this bit does not change.

7

Set User Data Ack

This bit is set to acknowledge completion of the Set User Data command.

8 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.

The behavior of the Job Pass bit will depend on whether or not results buffering is disabled or enabled:

Buffering Is DisabledBuffering Is Enabled
  • Set when an inspection is completed and the Job Pass/Fail cell indicates pass; otherwise it remains cleared. For more information, see Job Pass/Fail Cell Setup Dialog.
  • 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.
  • The Job Pass bit will be valid prior to the Results Valid bit being set.
9 Reserved (5.1.0 - 5.5.x) Unused.
TestRun Ready (5.6.0 and later)

This bit is set to 1 when the vision system has a valid TestRun configuration. This signal is cleared when TestRun executes (regardless of the TestRun initiator) and returns to 1 after TestRun execution completes.

Note:
  • This bit is signaled regardless of whether the vision system is Online or Offline.

  • Initiating TestRun by an external device is NOT supported on vision systems running In-Sight firmware 5.1.0 to 5.5.x.
10 - 14 Reserved Unused.
15 Error

This bit is set when an error has occurred, which is defined in the Error Code field.

16 - 31 Error Code

A 16-bit numeric representation of the error that has occurred:

Code Error Description
0x0000 No Error No error occurred.
0x0100 Trigger set while disabled Occurs when the Trigger bit is set while the Trigger Enable bit is cleared and the AcquireImage function's Trigger parameter is set to External, Network or Industrial Ethernet.
0x0101 Trigger set while Offline Occurs when the Trigger bit is set while the vision system is Offline.
0x0400 Already Executing Error Occurs when the Execute Command bit is set and the Executing bit is still High.
0x0401 Job load requested while Online Occurs when a Job Load command is issued while the vision system is Online.
0x0402 Job load requested does not exist on the camera Occurs when a JobID sent in the Command field does not exist as a prefix for any job in the camera file system. For example, if you send Command = 123 and no job on the camera contains 123xxxxx.job.

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 System Busy bit of the Inspection Status Module is set. When the vision system has finished processing the image, the System Busy bit is cleared and the Inspection Completed bit is toggled.

The Buffer Results Enable bit of the Inspection Control Module 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 Inspection Results Module and the Results Valid bit is set to True. When results buffering is disabled, the Inspection Results Ack bit must be set to clear the Results Valid bit.

If the Buffer Results Enable bit is set to True, the new results are queued. The PLC sets the Inspection Results Ack bit, which sets the Results Valid bit to True, if there are still results to be acknowledged. 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 Inspection Results Module (this is a necessary handshake to ensure that the results are received by the PLC).

Inspection Status Module Behavior

Bit Bit Name Results If Buffering Is Disabled Results If Buffering Is Enabled
0 System Busy

Set when the vision system is running a job, loading a job or responding to user input.

Set when the vision system is running a job, loading a job or responding to user input.

1 Inspection Complete

Toggled on completion of an inspection.

Toggled on completion of an inspection.

2 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.
3 Results Valid

Set when new results are placed in the Inspection Results Module. 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 Module. Stays set until the results are acknowledged by setting the Inspection Results Ack bit to True.

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.

Command Control Input Module

The Current Job ID field module indicates the current job ID of the In-Sight vision system, or 65535 if the current job does not have an ID. In order to load a job, the PLC must set the vision system Offline by using the Set Offline bit. Next, the Command field is set to the desired job's ID and the Execute Command bit is set. Once the Command Completed bit is set, the Execute Command bit should be reset.

Byte Name Description
0 - 1 Command (5.1.0 - 5.5.x) This is a 16-bit integer used to either indicate the Job ID number (0-999) of the job to load or to specify the Job Load by Name command (0x4000). The job load is executed when the Execute Command bit is set by the PLC. The Command field must be held constant between the rising edge of the Execute Command signal and the rising edge of the Command Completed signal, or the results will be indeterminate. If using the Job Load by Name command, the job name must be transferred to the User Data buffer before setting the Execute Command bit.
Command (5.6.0 and later)

This value indicates the TestRun sequence to execute or the ID number (1-999) of the job to load when the Execute Command bit is set by the PLC.

0x1007 = Execute TestRun

0x0000 – 0x03E7 = Job IDs

Command Control Output Module

Byte Name Description

0 - 1

Current Job ID

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.

Soft Event Control Input Module

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

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Soft Event 7 Soft Event 6 Soft Event 5 Soft Event 4 Soft Event 3 Soft Event 2 Soft Event 1 Soft Event 0
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.

A soft event can be used by the PLC to trigger job specific behavior. Each soft event has a trigger and acknowledgment bit 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.

Soft Event Control Output Module

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

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Soft Event Ack 7 Soft Event Ack 6 Soft Event Ack 5 Soft Event Ack 4 Soft Event Ack 3 Soft Event Ack 2 Soft Event Ack 1 Soft Event Ack 0

User Data Module

This data can be read from the In-Sight Explorer Spreadsheet, using the GetBufferData and ReadUserDataBuffer functions.

Inspection Results Module

This is the data that is written from the In-Sight spreadsheet, using the WriteResultsBuffer function. If the Buffer Results Enable bit of the Inspection Control Module is set, then the inspection results will remain unchanged until acknowledged by pulsing the InspectionResults Ack bit.

Byte Name Description

0 - 1

Inspection ID

The acquisition ID associated with this set of results.

2 - 3

Inspection Result Code (5.1.0 - 5.5.x)

The inspection result code is defined by the Result Code parameter of the WriteResultsBuffer function. For more information, see WriteResultsBuffer.

Inspection Result Code (5.6.0 and later)

Indicates the result of the latest TestRun execution. If all tests pass, the value will be 7. If one or more tests do not pass, or if there is a problem with the setup or cleanup during the TestRun execution, the value will be 0.

  • This field is only valid when a TestRun execution is completed successfully.
  • The results in this field can become invalidated if a Job without a TestRun is loaded, another TestRun job is executed, a TestRun is in progress, a TestRun execution or job load has failed, or a TestRun execution is aborted.

4 - 253

Inspection Results

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

PROFINET Timing Diagrams - With Buffering and Without Buffering

The following timing diagrams help illustrate the relationships between the Acquisition Control, Inspection Control, Acquisition Status, Inspection Status and Inspection Results registers:

PROFINET Acquisition and Inspection Timing Diagram without Buffering Enabled

Note: Although the inspection results are not overwritten until the next inspection is completed, the results should be processed by the PLC while the Results Valid bit is set.

PROFINET Acquisition and Inspection Timing Diagram with Buffering Enabled