DataMan® Industrial
Protocols Manual2024 July 18
Revision: 24.2.1.1

Legal Notices

Legal Notices
The software described in this document is furnished under license, and may be used or copied only in accordance with theterms of such license and with the inclusion of the copyright notice shown on this page. Neither the software, this document,
nor any copies thereof may be provided to, or otherwise made available to, anyone other than the licensee. Title to, andownership of, this software remains with Cognex Corporation or its licensor. Cognex Corporation assumes no responsibility
for the use or reliability of its software on equipment that is not supplied by Cognex Corporation. Cognex Corporation makes
no warranties, either express or implied, regarding the described software, its merchantability, non-infringement or its fitness
for any particular purpose.
The information in this document is subject to change without notice and should not be construed as a commitment by
Cognex Corporation. Cognex Corporation is not responsible for any errors that may be present in either this document or the
associated software.
Companies, names, and data used in examples herein are fictitious unless otherwise noted. No part of this document may be
reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, nor transferred to any
other media or language without the written permission of Cognex Corporation.
Copyright © 2024. Cognex Corporation. All Rights Reserved.
Portions of the hardware and software provided by Cognex may be covered by one or more U.S. and foreign patents, as wellas pending U.S. and foreign patents listed on the Cognex web site at: cognex.com/patents.
The following are registered trademarks of Cognex Corporation:
Cognex, 2DMAX, Advantage, AlignPlus, Assemblyplus, Check it with Checker, Checker, Cognex Vision for Industry,
Cognex VSOC, CVL, DataMan, DisplayInspect, DVT, EasyBuilder, Hotbars, IDMax, In-Sight, Laser Killer, MVS-8000,
OmniView, PatFind, PatFlex, PatInspect, PatMax, PatQuick, SensorView, SmartView, SmartAdvisor, SmartLearn,
UltraLight, Vision Solutions, VisionPro, VisionView
The following are trademarks of Cognex Corporation:
The Cognex logo, 1DMax, 3D-Locate, 3DMax, BGAII, CheckPoint, Cognex VSoC, CVC-1000, FFD, iLearn, In-Sight (design
insignia with cross-hairs), In-Sight 2000, InspectEdge, Inspection Designer, MVS, NotchMax, OCRMax, PatMax RedLine,
ProofRead, SmartSync, ProfilePlus, SmartDisplay, SmartSystem, SMD4, VisiFlex, Xpand
Portions copyright © Microsoft Corporation. All rights reserved.
Portions copyright © MadCap Software, Inc. All rights reserved.
Other product and company trademarks identified herein are the trademarks of their respective owners.

2

Table of Contents

Table of Contents
Legal Notices

2

Table of Contents

3

Symbols

6

About This Manual

7

Industrial Network Protocols

8

EtherNet/IP
DMCC
Reader Configuration Code
Setup Tool
Getting Started
Object Model

8
8
9
9
10
14

Attributes

15

SoftEvents

17

Rockwell ControlLogix Examples

23

Implicit Messaging

23

Explicit Messaging

33

PROFINET
DMCC
Reader Configuration Code
Setup Tool
Getting Started
Object Model

37
37
37
38
38
42

Modules42

Operation

47

SIMATIC Examples
TIA Portal Examples
PROFINET Class B

50
62
70

PLC Changes

71

iQ Sensor Solution
DMCC
Reader Configuration Code
Setup Tool
Overview
Discovering DataMan Readers on GX Work2
Monitoring the status of the DataMan Reader

73
74
74
75
75
75
76

List of iQSS Error Codes:

77

CC-Link IE Field Basic
DMCC
Reader Configuration Code
Setup Tool
Modules

77
77
78
78
78

3

Table of Contents

SLMP Protocol
DMCC
Reader Configuration Code
SLMP Protocol Scanner
Getting Started
Network Configuration
Data Block Configuration
Interface

83
83
83
84
84
85
86
87

Control Block88

Status Block89

Status Block Field Descriptions

89

Input Data Block90

Input Data Block Field Descriptions

91

Output Data Block91

Output Data Block Field Descriptions

91

String Command Block

91

String Command Block Field Descriptions

92

String Command Result Block

92

String Command Result Block Field Descriptions

92

Operation
ExamplesModbusTCP
DMCC
Reader Configuration Code
Setup Tool
Modbus TCP Handler
Getting Started
Network Configuration
Data Block Configuration
Interface

92
96
100
100
100
101
101
101
102
103
104

Control Block104

Control Block Field Descriptions

105

Status Block106

Status Block Field Descriptions

106

Input Data Block107

Input Data Block Field Descriptions

107

Output Data Block108

Output Data Block Field Descriptions

108

String Command Block

108

String Command Block Field Descriptions

109

String Command Result Block

109

4

Table of Contents

Operation

109

Requests

109

Typical Sequence Diagram

110

Handshaking

110

Acquisition Sequence110

Decode / Result Sequence

111

Results Buffering

112

SoftEvents

112

String Commands

113

General Fault Indicator

113

Examples113

ApplicationLayer Example

114

DataManControl Example

114

EtherCAT
File Over EtherCAT (FoE) Function
DMCC
Reader Configuration Code
Setup Tool
Getting Started
Object Model

115
116
116
117
117
118
118

Service Data Object (SDO)

118

Process Data Object (PDO)

122

Operation

123

SoftEvents

123

General Fault Indicator

123

Acquisition Sequence123

Decode / Result Sequence

124

Results Buffering

125

Industrial Protocols for the Wireless DataMan
Protocol Operation
Ethernet Address
PLC Triggering
SoftEvents
DMCC
Offline Buffering
Status of Industrial Protocols

127
127
127
127
127
127
128
128

5

Symbols

Symbols
The following symbols indicate safety precautions and supplemental information:
WARNING: This symbol indicates a hazard that could cause death, serious personal injury or electrical shock.

CAUTION: This symbol indicates a hazard that could result in property damage.

Note: This symbol indicates additional information about a subject.

Tip: This symbol indicates suggestions and shortcuts that might not otherwise be apparent.

6About This Manual

About This Manual
The DataMan reader acquires images by several methods when connected to a network:lusing the DataMan Setup Toolltrigger bitslthrough a DMCC commandlmanipulating objects through industrial protocols

The DataMan Industrial Protocols Manual provides information on how to integrate the DataMan reader into your particularenvironment using industrial protocols.

7Industrial Network Protocols

Industrial Network Protocols
DataMan uses industrial network protocols that are based on standard Ethernet protocols. These protocols, EtherNet/IP,
PROFINET, SLMP Protocol, and Modbus/TCP, are enhanced to provide more reliability than standard Ethernet.
When you install the Setup Tool, the Installer prompts you to download the tools and sample programs associated withindustrial protocols.

EtherNet/IP
DataMan supports EtherNet/IP™, an application level protocol based on the Common Industrial Protocol (CIP). EtherNet/IP
provides an extensive range of messaging options and services transferring data and I/O over Ethernet. All devices on an
EtherNet/IP network present their data to the network as a series of data values called attributes. Attributes can be groupedwith other related data values into sets called Assemblies.
By default the DataMan device has the EtherNet/IP protocol disabled. The protocol can be enabled via DMCC, scanning a
configuration code, or in the DataMan Setup Tool.
Note: If you have a wireless DataMan reader, see section Industrial Protocols for the Wireless DataMan on page 127

DMCC
The following commands can be used to enable/disable EtherNet/IP on a DataMan reader. The commands can be issued via
RS-232 or Telnet connection.
Note: Use a third party Telnet client such as PuTTY to communicate with your DataMan reader.
Enable:8

Industrial Network Protocols||>SET ETHERNET-IP.ENABLED ON||>CONFIG.SAVE||>REBOOT
Disable:||>SET ETHERNET-IP.ENABLED OFF||>CONFIG.SAVE||>REBOOT

Reader Configuration CodeScan the following reader configuration codes to enable/disable EtherNet/IP on your corded reader.
Note: You must reboot the device for the change to take effect.
Enable:Disable:Scan the following reader configuration codes to enable/disable EtherNet/IP on your DataMan 8000 Base Station.
Note: You must reboot the device for the change to take effect.
Enable:Disable:Setup Tool
In the Setup Tool's Communications application step's Ethernet tab, check EtherNet/IP to enable this industrial protocol.

9Industrial Network Protocols

Make sure to save the new selection by clicking the Save Settings button in the upper toolbar before disconnecting from thereader.
Note: The new settings take effect only after the reader is rebooted.

Getting Started
Perform these steps to start using EtherNet/IP:l

Install the Rockwell Software tool.

l

Set up the Rockwell Software tool so that it recognizes your DataMan device.

lInstall the DataMan Electronic Data Sheet (EDS) for the DataMan reader.

Perform the following steps to set up EtherNet/IP:
1. Make sure that you select the Add-on Profile (AOP) installation and the Samples installation. The Add-on Profile isonly used with Rockwell ControlLogix or CompactLogix PLCs.
2. Install the Rockwell Add-on Profiles by navigating to the following directory on Cognex.com:
https://support.cognex.com/en/downloads/dataman/software-firmware.

10

Industrial Network Protocols
3. In the search box, type Add-on Profile. Click the file and download it from the following page:

4. From the Start menu, go to Programs -> Rockwell Software -> EDS Hardware Installation Tool.

11

Industrial Network Protocols

5. Run the EDS Installation Tool.
Note: If you have an existing EDS file, uninstall it first, then install the latest version of the EDS.
6. Run the DataMan Setup Tool and update the DataMan firmware.
7. Check if the DataMan firmware is up-to-date by clicking, in the Setup Tool, View and then System Info.

12

Industrial Network Protocols
8. Make sure that in the Setup Tool, EtherNet/IP is enabled.

9. In order for the changes to take effect, save your settings and cycle power. Go to System and click Save Settings.
10. Reboot your reader.
11. Your DataMan is visible now in the RSLinx.

13

Industrial Network Protocols

Note: If your DataMan is visible, but the icon is a question mark, repeat the EDS Installation.
12. Open one of the sample jobs and integrate your DataMan into your program using the Add-on Profile.

Object Model
The ID Reader Object is a vendor specific object class. This means that it is not part of the CIP common (public) architecture
but an extension. It is a custom object that Cognex has added to the EtherNet/IP architecture on the DataMan device. All thedata and functionality of this object model are available in the DataMan reader. This includes triggering, status, events,
errors, and result data.
The ID Reader Object is identified by its vendor specific class code:

DataMan ID Reader Object Class Code: 0x79
Objects are made up of attributes (data) and services (functionality). These can be defined at the class level (common to all
instances of the class) or the instance level (unique to an individual instance). The CIP specification defines common
attributes and services that apply to all objects (often these are optional). Vendors may also define their own attributes andservices for their vendor specific classes.

14

Industrial Network Protocols
The ID Reader Object attributes and services can be individually accessed via explicit messaging. In addition, a number of
the ID Reader Object attributes are exposed in the DataMan assembly objects which allow them to be accessed as a group
via implicit messaging.

Attributes
The DataMan ID Reader Object (Class Code: 0x79) has the following attributes:
Attribute
ID

Access
Rule

Name

Data
Type

Description

0x9

Set

AcqTriggerEnable

BOOL

0 = EtherNet/IP triggering is disabled
1 = EtherNet/IP triggering is enabled

0xA

Set

AcqTrigger

BOOL

Acquire an image when this attribute changes from 0 to 1.

0xB

Get

AcqStatusRegister

BYTE

Bit0: Trigger Ready
Bit1: Trigger Ack
Bit2: Reserved
Bit3: Missed Acquisition
Bit4-7: Reserved

0xC

Set

UserData

0xD

Set

BufferResultsEnable

BOOL

When true, it enables buffering of the decode results. The
reader can buffer up to 50 and the Base Station can buffer up to
500 sets of read results.

0xE

Get

DecodeStatusRegister

BYTE

Bit0: Decoding
Bit1: Decode completed (toggle)
Bit2: Results buffer overrun
Bit3: Results available
Bit4: Reserved
Bit5: Reserved
Bit6: Reserved
Bit7: General fault indicator

ARRAY of User defined data that can be used as an input to the
BYTE
acquisition/decode.

15

Industrial Network Protocols
Attribute
ID

Access
Rule

Name

Data
Type

0xF

Set

ResultsAck

BOOL

0x10

Get

DecodeResults

Description
Acknowledges that the client received the decode results.

STRUCT The last decode results.
ofResultsID

UINT

Decode results identifier.
Corresponds to the TriggerID of the decoded image.

ResultCode

UINT

Decode result summary code value.
Bit0: 1=Read, 0=No read
Bit1: 1=Validated, 0=Not Validated
Bit2: 1=Verified, 0=Not Verified
Bit3: 1=Acquisition trigger overrun
Bit4: 1=Acquisition buffer overrun
Bit5-15: Reserved (future use)

ResultExtended

UINT

Extended result information.

ResultLength

UINT

Current number of result data bytes.

ResultData

ARRAY of Result data from last decode.
BYTE

0x12

Set

SoftEvents

BYTE

SoftEvents act as virtual inputs (execute action on 0 to 1
transition)
Bit0: Train code
Bit1: Train match string
Bit2: Train focus
Bit3: Train brightness
Bit4: Un-Train
Bit5: Reserved (future use)
Bit6: Execute DMCC command
Bit7: Set match string

0x15

Get

TriggerID

UNIT

Trigger identifier. ID of the next trigger to be issued.

0x16

Set

UserDataOption

UINT

Optional user data information. Currently only used by “Set
Match String” SoftEvent. Specifies which code target to assign
the string (16-bit Integer).
Bit0: Assign string to all targets
Bit1: Assign string to 2D codes
Bit2: Assign string to QR codes
Bit3: Assign string to 1D/stacked/postal codes

0x17

Set

UserDataLength

UINT

Current number of user data bytes.

16

Industrial Network Protocols
Attribute
ID

Access
Rule

Name

Data
Type

0x18

Get

SoftEventAck

BYTE

Description
Acknowledgment of SoftEvents.
Bit0: Train code ack
Bit1: Train match string ack
Bit2: Train focus ack
Bit3: Train brightness ack
Bit4: Un-Train ack
Bit5: Reserved (future use)
Bit6: Execute DMCC command ack
Bit7: Set match string ack

SoftEvents
SoftEvents act as “virtual” inputs. When the value of a SoftEvent changes from 0 to 1, the action associated with the event is
executed. When it is done, the corresponding SoftEventAck bit changes from 1 to 0 to mark completion.
The SoftEvent and SoftEventAck form a logical handshake. After SoftEventAck changes to 1 the original SoftEvent is set
back to 0. When that occurs, SoftEventAck is automatically set back to 0.
The “ExecuteDMCC” and “SetMatchString” SoftEvent actions require user supplied data. This data must be written to the
UserData and UserDataLength area of the Input Assembly prior to invoking the SoftEvent. Since both of these SoftEvents
depend on the UserData, only one can be invoked at a time.

General Fault Indicator
When a communication related fault occurs, the “GeneralFault” bit changes from 0 to 1. The only fault conditions supported
are SoftEvent operations. If a SoftEvent operation fails, the fault bit will be set. The fault bit remains set until either the next
successful SoftEvent operation or until TriggerEnable is set to 0 and then back to 1.

Services
The ID Reader Object supports the following Common CIP services:
Service Code

Service Name

Description

0x05

Reset

Resets the ID Reader object.

0x0E

Get_Attribute_Single

Returns the contents of the specified attribute.

0x10

Set_Attribute_Single

Modifies the specified attribute.

The ID Reader Object supports the following vendor specific services:17

Industrial Network Protocols
Service Code

Service Name

Description

0x32

AcquireTriggers a single acquisition.

0x34

SendDMCC

Sends a DMCC command to the device.

0x35

GetDecodeResults

Gets the content of the DecodeResults attribute.

Acquire Service
The Acquire Service triggers an acquisition (if the acquisition system is ready to acquire an image). If the acquisition could
not be triggered, then the Missed Acquisition bit of the AcqStatusRegister will be set until the next successful acquisition.

SendDMCC Service
The SendDMCC Service sends a DMCC command string to the device. The request data consists of the DMCC command
string that is to be sent to the reader. The reply data will contain the string result of the DMCC command. Additionally, theservice provides a numeric result status for the call. Most of these result codes relate to the basic success/failure of theservice execution. However, the service also maps the actual DMCC status codes. This allows the PLC to interpret theservice request without having to parse the actual DMCC return string.
DMCC commands transferred through the Industrial Ethernet protocols are automatically routed to the Wi-Fi reader. The
commands cannot be executed while the Wi-Fi reader is powered off, hibernating, or out-of-range.
Service Return
Code

Description

DMCC Return Code0

Success – No error

01

Bad Command-4

No Answer – System too busy-

100

Unidentified error

100

101

Command invalid

101

102

Parameter invalid

102

103

Checksum incorrect

103

104

Parameter rejected/altered due toreader state

104

Note: The DMCC command string must be in the CIP STRING2 format (16-bit integer indicating the string length incharacters followed by the actual string characters, no terminating null required).

GetDecodeResults Service
The GetDecodeResults service reads data from the DecodeResults attribute of the ID Reader Object. This service takes
parameters indicating the “size” (number of bytes to read) and the “offset” (offset into the DecodeResults attribute to begin
reading). This gives the service the flexibility to be used with PLCs that have different restrictions on the amount of data
allowed in an explicit message. It also allows you to access very large codes that cannot be completely transferred with
implicit messaging (assembly object).

GetDecodeResults Request Data Format
Name

Type

Description

Size

UINT

The number of bytes of the DecodeResults attribute to read.

OffsetUINT

The offset into the DecodeResults attribute. This specifies the first byte of the
DecodeResults attribute to begin reading (0 based offset).

18

Industrial Network Protocols
Acquisition Sequence
DataMan can be triggered to acquire images by several methods. It can be done either implicitly through the Assembly
object, or done explicitly through the ID Reader object. When using explicit messaging, you can either:laccess the Acquire Service in a single step, orldirectly manipulate the ID Reader object attributes (AcqTrigger and AcqStatusRegister), orl

use DMCC commands.

The ID Reader attributes are discussed in this section. These same values can also be accessed through the assembly
objects. On startup, the AcqTriggerEnable attribute is False. Set the attribute to True to enable triggering. When the device isready to accept triggers, the Trigger Ready bit in the AcqStatusRegister is set to True.
While the AcqStatusRegister “Trigger Ready” bit is True, each time the ID Reader object sees the AcqTrigger attributechange from 0 to 1, it initiates an image acquisition. When setting the Trigger Ready bit to True through the assembly objects,
make sure that the attribute is held in the new state until that same state value is seen in the Trigger Ack bit of the
AcqStatusRegister (this is a necessary handshake to guarantee that the change is seen by the ID Reader object).
During an acquisition, the Trigger Ready bit in the AcqStatusRegister is cleared and the Acquiring bit is set to True. When theacquisition is completed, the Acquiring bit is cleared. The Trigger Ready bit is again set to True once the device is ready to
begin a new image acquisition.
The reader allows acquisitions to overlap with the decoding of previous acquisitions. The Trigger Ready bit is set high after
the acquisition is complete, while decoding may still be in progress. The Decoding bit is deprecated and only mirrors the
behavior of the Acquiring bit. If trigger queuing is active or other trigger sources can interfere, the Trigger Ready bit may not
be reliable. As result, conflicting trigger overruns may occur, which are reported in Bit 3 of the ResultCode attribute of the ID
Reader object.
In certain cases, you can cancel an acquisition by clearing the Trigger signal before the read operation is finished. This allows
you to cancel reads in Presentation and Manual mode if no code is in the field of view. To ensure that a read is notunintentionally cancelled, make sure that the PLC holds the Trigger signal True until both TriggerAck and ResultsAvailable
are True (or DecodeComplete toggles state).

To force a reset of the trigger mechanism, set the AcqTriggerEnable attribute to False until the AcqStatusRegister is 0. Thenthe AcqTriggerEnable can be set to True to re-enable acquisition.

Decode / Result Sequence
After an image is acquired, it is decoded. When the decoding is complete and a result is ready to be delivered, the reader
toggles the DecodeComplete bit of the DecodeStatusRegister.

19

Industrial Network Protocols
Decode results are reported asynchronously to the ID Reader Object. If BufferResultsEnable is set to False, then the decode
results are immediately placed into DecodeResults, and the Results Available bit is set to True.
Note: The only way to ensure that you are not losing results is to use BufferResults. Make sure that your application canread each DecodeResult in time if you do not use BufferResultsEnable.
If the BufferResultsEnable attribute is set to True, the new results are queued. The earlier decode results remain in the
DecodeResults attribute until they are acknowledged by the client setting the ResultsAck attribute to True. After the Results
Available bit is cleared, the client sets the ResultsAck attribute back to False to allow the next queued results to be placed into the DecodeResults attribute. This is a necessary handshake to ensure that the DataManreader's client, the PLC, receives
the results, even if short gaps occur between results.

Behavior of DecodeStatusRegister
Bit

Bit Name

Results if Buffering Disabled

Results if Buffering Enabled

1

Decoding

Set when acquiring and decoding an image.
The value of the Decoding bit is always thesame as the Acquiring bit.

Set when acquiring and decoding an image. The valueof the Decoding bit is always the same as the Acquiring
bit.

2

DecodeComplete

Toggled on completion of an image decode.

Toggled on completion of an image decode.

3

Results
BufferOverflow

Remains set to zero.

Set when decode results could not be queued because
the client failed to acknowledge a previous result.
Cleared when the decode result is successfully queued.

4

Results
Available

Set when new results are placed in the
Set when new results are placed in the DecodeResults
DecodeResults attribute. Stays set until theattribute. Stays set until the results are acknowledged
results are acknowledged by setting ResultsAck by setting ResultsAck to true.
to true.

20

Industrial Network Protocols
Results Buffering
There is an option to enable a queue for decode results. Enabling it allows a finite number of decode result data to queue up
until the client (PLC) has time to read them. This is useful to smooth out data flow if the client (PLC) slows down for shortperiods of time.
If reads occur faster than results can be sent out, the primary difference between buffering or not buffering is determining
which results get discarded. If buffering is not enabled, the most recent results are kept and the earlier result (which was notread by the PLC fast enough) is lost, because the more recent result will overwrite the earlier result. If buffering is enabled(and the queue becomes full) the most recent results are discarded until space becomes available in the results queue.
Note: If you have an overflowing queue and then disable buffering, there will be a greater than 1 difference between the
TriggerID and ResultID values. This difference represents the number of reads that had occurred but could not bequeued because the queue was full (number of lost reads equals TriggerID - ResultID - 1). After the next read, theResultID value returns to the typical operating value of TriggerID - 1.

Assembly Object
Assemblies are combinations of selected attributes (data items) from CIP objects within a device. The device vendor defines
assemblies according to their needs and combine data together in useful groupings according to the requirements of theapplication.
DataMan is an I/O adapter class device. The convention for adapters is that Input Assemblies produce (transmit) data foranother device (that is, DataMan to PLC) and Output Assemblies consume (receive) data from another device (that is, PLC
to DataMan). DataMan acts as an I/O module for another device such as a PLC.
Assembly objects use implicit messaging. They are blocks of data which are transmitted as the raw payload of implicit
messaging packets. These implicit messaging packets are produced (transmitted) repeatedly at a predefined chosen rate(for example, 100ms or 200ms).
DataMan readers have a single input assembly and single output assembly. These assemblies combine selected attributes(data) of the DataMan ID Reader Object into groupings that minimize network bandwidth, and still allow for efficient control
and processing. The data in these assemblies can also be accessed individually from the ID Reader Object. However, using
the assembly objects is much more efficient, thus they are the primary means of runtime communication between a DataMan
reader and a PLC.

Input Assembly
The Input assembly provides status information, process state, and decode results.

21

Industrial Network Protocols
Instance

Byte

11

0

Bit 7

Bit 6

Bit 5

Bit 4

Reserved

1

GeneralFault

2

SoftEventAck 7

Reserved

SoftEventAck 6

SoftEventAck 5

SoftEvent
Ack 4

Bit 3

Bit 2

Missed Acq

Acquiring

Results
Available

Results Buffer
OverrunDecodeComplete
ToggleDecoding1

SoftEventAck 3

SoftEventAck 2

SoftEventAck 1

SoftEvent
Ack 0

3-5

Reserved

6

Trigger ID (16-bit integer)

Bit 1

Bit 0

Trigger Ack Trigger
Ready

7
8

Result ID (16-bit integer)

9
10

Result Code (16-bit integer)

11
12

Result Extended (16-bit integer)

13
14

Result Data Length (16-bit integer)

15
16

Result Data 0

...
499

Result Data 483

Output Assembly
The Output assembly contains control signals, software event signals, and any user data required for the trigger and decode.

1 The value of the Decoding bit is identical to the value of the Acquiring bit. Both bits are true if an acquisition, or series of acquisitions of thesame trigger, is in progress.

22

Industrial Network Protocols
Instance

Byte

21

0

1

Bit 7

Bit 6

Bit 5

Bit 4

Reserved

SoftEvent
7

SoftEvent
6

SoftEvent
5

SoftEvent
4

2

Bit 3

Bit 2

Bit 1

Bit 0

Results
Ack

BufferResults
EnableTrigger

Trigger
Enable

SoftEvent3

SoftEvent2

SoftEvent
1

SoftEvent0

Reserved

3
4

User Data Option (16-bit integer)

5
6User Data Length (16-bit integer)

7
8User Data 0

...
499

User Data 491

Rockwell ControlLogix Examples
Implicit messages transmit time-critical application specific I/O data and can be point-to-point or multicast. Explicit messages
require a response from the receiving device. As a result, explicit messages are better suited for operations that occur lessfrequently. An instruction to send a DMCC command is an example of an explicit message.

Implicit Messaging
EtherNet/IP implicit messaging allows a DataMan reader’s inputs and outputs to be mapped into tags in the ControlLogix
PLC. Once these connections are established, the data is transferred cyclically at a user defined interval (10ms, 50ms,
100ms, and so on).
The figure below represents Ethernet-based I/O through EtherNet/IP:

The Input Assembly and Output Assembly map various attributes (data) from the ID Reader object: The Input Assembly is
the collection of DataMan reader data values sent to the PLC (PLC inputs); and the Output Assembly is the collection of data
values received by the DataMan reader from the PLC (PLC outputs).

23

Industrial Network Protocols
Establishing an Implicit Messaging Connection
To setup an EtherNet/IP implicit messaging connection between a DataMan and a ControlLogix controller, the DataMan
reader must first be added to the ControlLogix I/O Configuration tree. The most efficient method is to use the Add-on Profile.
This example assumes that the Add-on Profile has already been installed. If you do not have the Add-on Profile, see section
Using the Generic EtherNet/IP Profile.
To establish an implicit messaging connection with a ControlLogix PLC:
1. Open RSLogix5000 and load your project (or select “File -> New…” to create a new one).
From the I/O Configuration node, select the Ethernet node under the project Ethernet Module, right-click on the icon
and select New Module... from the menu:

2. From the Select Module dialog, choose your model of DataMan ID Reader from the list.
Note: This option is only available after you install the DataMan Add-On Profile.

24

Industrial Network Protocols

Note: The rest of the steps is identical regardless of which DataMan model is selected.
3. After selecting the device, the configuration dialog for the DataMan ID Reader system is displayed. Give the module aname and enter the DataMan’s IP address. The default is a bidirectional (send/receive) connection consisting ofcontrol, status, and 32 bytes of result data with keying disabled. To change this default connection, click the
Change… button. If no change is required, skip the next step.

25

Industrial Network Protocols

4. Clicking the Change… button brings up the Module Definition dialog. This dialog is used to alter the connection
configuration. You can change:l

DataMan revisionlElectronic keyinglConnection type (bidirectional/receive-only)lAmount of data received (from the DataMan)lAmount of data sent (to the DataMan)

26

Industrial Network Protocols
Electronic Keying: Defines the level of module type checking that is performed by the PLC before a connection isestablished.
Exact Match – All of the parameters must match or the connection will be rejected.
lVendorl

Product Typel

Catalog NumberlMajor Revisionl

Minor Revision

Compatible Module – To prevent the inserted module from rejecting the connection:l

The Module Types have to matchlCatalog Number has to matchl

Major Revision has to matchl

The Minor Revision of the module has to be equal to or greater than the one specified in the software.

Disable Keying – The controller does not employ keying at all.
Connection: Defines the type of data flow.
Data (Bidirectional) – The connection sends data to the DataMan and receives data from the DataMan.
Input (Results only) – The connection only receives data from the DataMan. If more than one PLC needs to receive
data from the same DataMan device, choose the Input connection option.
Input Results from Sensor: Defines the amount of data received on the connection from the DataMan. The
minimum amount is the Status data only. The connection can be configured to also receive read result data. The
amount of result data received is defined in fixed increments (16 bytes, 32 bytes, 64 bytes, and so on). Select the size
to return no more than the largest code size to be read by the application. Setting the size larger wastes network
bandwidth and diminishes performance.

27

Industrial Network Protocols
Output Data to Sensor: Defines the amount of data transmitted on the connection (to the DataMan). The minimum
amount is the Control data only. The connection can be configured to also send user data. The amount of user data
sent is defined in fixed increments (16 bytes, 32 bytes, 64 bytes, and so on). To enable User Data output, right-click
the DataMan module and then go to Properties -> Change -> Output Data to Sensor.

5. The final step is configuring the connection rate. The rate at which data is transmitted/received is defined as theRequested Packet Interval (RPI). The RPI defines how frequently the data is transmitted/received over theconnection. To optimize network performance, do not set this rate lower than required by a given application, or lower
than half the expected maximum read rate of the user application. Setting it lower wastes bandwidth and does not
improve processing performance.
6. Select the “Connection” tab of the “New Module” dialog to set the rate.

28

Industrial Network Protocols
7. After adding the module to ControlLogix, the I/O tree should appear as follows:

8. When the DataMan module is added to the I/O tree, RSLogix 5000 creates tags that map to the DataMan reader Input
and Output Data (that is, the Input and Output Assembly Objects in the DataMan Reader). These tags can be foundunder the “Controller Tags” node of the project tree.
Note: The base name of these tags is the name you gave to the DataMan Module that you added to the I/O
Configuration in the previous steps.

The tags are organized in two groups: Status and Control. The Status group represents all the data being received
from the DataMan. The Control group represents all the data being sent to the DataMan.
These tags are the symbolic representation of the DataMan Assembly Object contents. The PLC ladder is written toaccess these tag values. By monitoring or changing these tag values the PLC ladder is monitoring and changing the
DataMan Assembly Object contents.
Note: Based on the configured RPI, there is a time delay between the DataMan and the PLC tag values. Take
this time delay into account when writing all PLC ladders.

Accessing Implicit Messaging Connection Data
One aspect of the Add-on Profile is that it automatically generates ControlLogix tags representing the connection data.

29

Industrial Network Protocols
The generated tags are divided into two groups: Status and Control. The Status group represents all the data being received
from the DataMan. The Control group represents all the data being sent to the DataMan.
Status tag group is the data the ControlLogix receives from the DataMan reader:lTriggerReady: Indicates when the DataMan reader can accept a new trigger. This tag is True when the Control tag“TriggerEnable” has been set , and the sensor is not acquiring an image.

l

TriggerAck: Indicates when the DataMan reader has been triggered (that is, the Control tag “Trigger” has been set toTrue). This tag stays set until the Trigger tag is cleared.

l

Acquiring: Indicates when the DataMan reader is acquiring an image either by setting the Trigger bit or by an
external trigger.

lMissedAcq: Indicates when the DataManreader misses an acquisition trigger. This happens when trigger on throughthe Trigger On bit of Ethernet/IP fails. It is cleared when the next successful acquisition occurs.

lDecoding: Deprecated. Same behavior as Acquiring.

l

DecodeCompleted: Tag value is toggled (1 to 0 or 0 to 1) when a decode is completed.

lResultsBufferOverrun: Indicates when the DataMan reader discards a set of decode results because the results
queue is full. Cleared when the next set of results are successfully queued.

lResultsAvailable: Indicates when a set of decode results are available (that is, the ResultID, ResultCode,ResultLength and ResultsData tags contain valid data).

lGeneralFault: Indicates when a fault has occurred. Currently only used by Soft Event operations.

lTrainCodeAck: Indicates that the SoftEvent “TrainCode” is complete.

lTrainMatchStringAck: Indicates that the SoftEvent “TrainMatchString” has completed.

lTrainFocusAck: Indicates that the SoftEvent “TrainFocus” has completed.

lTrainBrightnessAck: Indicates that the SoftEvent “TrainBrightness” has completed.

l

UnTrainAck: Indicates that the SoftEvent “UnTrain” has completed.

l

ExecuteDmccAck: Indicates that the SoftEvent “ExecuteDMCC” has completed.

l

SetMatchStringAck: Indicates that the SoftEvent “SetMatchString” has completed.

30

Industrial Network ProtocolslTriggerID: Value of the next trigger to be issued. Used to match triggers issued with corresponding result data
received later.

lResultID: The value of TriggerID when the trigger that generated these results was issued. Used to match
TriggerID’s with result data.

lResultCode: Indicates success/failure of this set of results.
l

Bit 0 ,1=read 0=no readl

Bit 1 ,1=validated 0=not validated (or validation not in use)l

Bit 2 ,1=verified 0=not verified (or verification not in use)l

Bit 3 ,1=acquisition trigger overrunl

Bit 4 ,1=acquisition buffer overflow (not the same as result buffer overflow).

l

Bits 5-15 , reserved (future use)l

ResultExtended: Unused.

l

ResultLength: Number of bytes of result data contained in the ResultData tag.

lResultData: Decode result data. Control tag group is the data sent from the ControlLogix to the DataMan reader:lTriggerEnable: Setting this tag enables EtherNet/IP triggering. Clearing this field disables the EtherNet/IP triggering.

l

Trigger: Setting this tag triggers an acquisition if:l

The TriggerEnable tag is set.

l

No acquisition/decode is currently in progress.

l

The device is ready to trigger.

l

ResultsBufferEnable: When set, the decode results are queued. Results are made available each time the PLC
acknowledges the current results. The Decode ID, Decode Result and Decode ResultsData fields are held constantuntil the ResultsAck field acknowledged and set them. The DataMan reader responds to the acknowledgment byclearing the ResultsValid bit. Once the ResultsAck field is cleared, the next set of decode results are posted.

l

ResultsAck: The ResultsAck tag is used to acknowledge that the PLC read the latest results. When ResultsAck isset, the ResultsAvailable tag will be cleared. If results buffering is enabled, the next set of results are made available
when the ResultsAck tag is cleared again.

lTrainCode: Changing this tag from 0 to 1 invokes the train code operation.

lTrainMatchString: Changing this tag from 0 to 1 invokes the train match string operation.

lTrainFocus: Changing this tag from 0 to 1 invokes the train focus operation.

31

Industrial Network ProtocolslTrainBrightness: Changing this tag from 0 to 1 invokes the train brightness operation.

l

Untrain: Changing this tag from 0 to 1 invokes the un-train operation.

l

ExecuteDMCC: Changing this tag from 0 to 1 invokes the DMCC operation. A valid DMCC command string must be
written to UserData prior to invoking this SoftEvent.

l

SetMatchString: Changing this tag from 0 to 1 invokes the set match string operation. The match string data must be
written to UserData prior to invoking this SoftEvent.

l

UserDataOption: Optional user data information. For more information, see the PROFINET documentation.

l

UserDataLength: Number of bytes of user data contained in the UserData tag.

l

UserData: This data is sent to the DataMan reader to support acquisition and/or decode.

Note:
Configure the DataMan module in RSLogix 5000 to manually add UserData to the output assembly.
Perform the following steps on a CompactLogix or ControlLogix PLC:
1. Right click the DataMan module and select Properties.
2. Under Module Definition, click Change.
3. The Module Definition window pops up. Under the Output Data to Sensor drop-down menu, select SINT-484.
4. Click OK. RSLogix 500 is now updating the Module Definition.
The output assembly controller tags now list UserData as part of the output assembly.

Verifying Implicit Messaging Connection Operation
After the DataMan is added as an I/O device in a ControlLogix project and the project is downloaded to the controller, the I/O
connection needs to be established. Once a successful connection is established, cyclic data transfers are initiated at therequested RPI.
To verify a proper I/O connection, follow these steps:
1. Download the project to the ControlLogix controller.
2. When the download completes, the project I/O indicator is I/O OK, indicating that the I/O connection is successfullycompleted.
To verify the correct, two-way transfer of I/O data, go to the controller tags in RSLogix and change the state of the
TriggerEnable bit from 0 to 1:

3. The TriggerReady tag changes to 1. Triggering is now enabled.
4. Whenever the Trigger tag is changed from 0 to 1, the DataMan reader acquires an image.

32

Industrial Network Protocols
Note: The current TriggerID value is 1. Make sure that the results of the next trigger to be issued come back witha corresponding ResultID of 1.
5. After the acquisition/decode has completed, the DecodeCompleted tag will toggle, and the ResultsAvailable tag goesto 1. This example shows a successful read (ResultCode bit 0 = 1) and the read has returned 16 bytes of data
(ResultLength=16). The data is in the ResultData tag.

Explicit Messaging
Unlike implicit messaging, explicit messages are sent to a specific device that always sends a reply to that message. As aresult, explicit messages are better suited for operations that occur infrequently. Explicit messages can be used to read andwrite the attributes (data) of the ID Reader Object. They can also be used for acquiring images, sending DMCC commands
and retrieving result data.

Issuing DMCC Commands
One of the more common explicit messages sent to a DataMan ID Reader is an instruction to execute a DMCC command.
Explicit messages are sent from ControlLogix to a DataMan using MSG instructions. There are two different paths forinvoking DMCC messages with explicit messaging: through the PCCC Object, or through the ID Reader Object “SendDMCC”
service. The example shows the SendDMCC service.
The CIP STRING2 format is required for transmission across EtherNet/IP: a 16-bit length value followed by actual string
characters, no null terminator. Logix stores strings in a slightly different format: a 32-bit length value followed by actual string33

Industrial Network Protocols
characters, no null terminator. Therefore, some of the sample ladder involves converting to/from the two different string
formats.
Note: The instruction to send a DMCC is intended as a demonstration of DataMan explicit messaging behavior. Thissame operation could be written in a much more efficient ladder but would be less useful as a learning tool.
1. Add the following tags to the ControlLogix Controller Tags dialog:l

Send_DMCC_Command: Boolean flag used to initiate the command.

l

DMCC_Command_String: String containing the DMCC command to execute.

l

DMCC_Result_String: String receiving the DMCC command results.

lMessage_Data: Temp buffer holding the data to send via the MSG instruction.

lMessage_Result: Temp buffer holding the data received via the MSG instruction.

lMessage_Pending: Boolean flag used to indicate that a message is in process.

l

MSG_DMCC: Data structure required by the Logix MSG instruction.

34

Industrial Network Protocols
2. Add the following two rungs to the MainRoutine of your ControlLogix project:

3. Edit the MSG instruction. Configure it for “CIP Generic”, service 0x34 “SendDMCC”, class 0x79 “ID Reader Object”
and instance 1. Set the source to “Message_Data” and the destination to “Message_Result”.

35Industrial Network Protocols
4. On the MSG instruction Communication tab, browse for and select the DataMan which you added to the project I/O
Configuration tree. This tells Logix where to send the explicit message.

5. Download the project to the ControlLogix and place in “Run Mode”.
To operate:
1. Place a DMCC command in the “DMCC_Command_String” tag. For example “||>GET TRIGGER.TYPE$r$l”. Note
the $r$l at the end of the string. This is how Logix represents a CRLF.
2. Toggle the “Send_DMCC_Command” tag to 1.
3. When the “Send_DMCC_Command” tag goes back to 0 execution is complete. The DMCC command results can befound in “DMCC_Result_String”.

36Industrial Network Protocols

PROFINETPROFINET is an application-level protocol used in industrial automation applications. This protocol uses standard Ethernet
hardware and software to exchange I/O data, alarms, and diagnostics.
DataMan supports PROFINET I/O. This is one of the two “views” contained in the PROFINET communication standard.
PROFINET I/O performs cyclic data transfers to exchange data with Programmable Logic Controllers (PLCs) over Ethernet.
The second “view” in the standard, PROFINET Component Based Automation (CBA), is not supported.
By default, the DataMan has the PROFINET protocol disabled. The protocol can be enabled via DMCC, scanning aparameter code or in the DataMan Setup Tool.
Note: If you have a wireless DataMan reader, see section Industrial Protocols for the Wireless DataMan on page 127

DMCC
The following commands can be used to enable/disable PROFINET. The commands can be issued via RS-232 or Telnet
connection.
Note: Use a third party Telnet client such as PuTTY to communicate with your DataMan reader.
Enable:||>SET PROFINET.ENABLED ON||>CONFIG.SAVE||>REBOOT
Disable:||>SET PROFINET.ENABLED OFF||>CONFIG.SAVE||>REBOOT

Reader Configuration CodeScanning the following reader configuration codes enables/disables PROFINET for your corded reader.
Note: You must reboot the device for the change to take effect.
Enable:Disable:Scanning the following reader configuration codes enables/disables PROFINET for your DataMan 8000 Base Station.
Note: You must reboot the device for the change to take effect.

37

Industrial Network Protocols
Enable:Disable:Setup Tool
1. Open Setup Tool to discover the reader.
Note: The reader must be in the subnet.
2. If the reader appears as misconfigured, select the reader, and click Repair & Support to change the misconfigured
IP address to the desired static IP.
Note: Having a properly configured IP address is mandatory to further connect to the reader via Setup Tool.
3. Connect to the reader by clicking Connect.
4. Navigate to Communications application.
5. Enable PROFINET under Ethernet tab.
Note: Enabling PROFINET immediately turns off DHCP and turns the current IP address to a static IP.
6. The Siemens engineering software (TIA or Step7) can discover the reader now.
7. Using the engineering software, configure how the reader is discovered by the PLC. PROFINET offers two modes:
a. The reader has a permanent static IP address. The static IP address must be configured in the PLC projectand match the setting on the reader.
b. The IP address of the reader is configured centrally in the PLC project. In this case, the reader boots up withthe permanent IP address of 0.0.0.0. Once the PLC identifies the reader on the network by the station nameof the reader, PLC assigns the configured IP address temporarily to the device. In this case, 'temporarily'means that the reader starts again with the zero IP on the next boot.
8. Click Save Settings in the upper toolbar before disconnecting from the reader.
Note: The new settings take effect only after the reader is rebooted.

Getting Started
Preparing to use PROFINET involves the following main steps:l

Make sure that you have either the SIMATIC Step 7 programming software or TIA Portal installed.

l

Set up the Siemens Software tool so that it recognizes your DataMan device.

lInstall the Generic Station Description (GSD) file.

Note: Expanding the process image can have a performance impact on the PLC scan cycle time. If your scan time iscritical, use the minimal acceptable module sizes and manually remap them down lower in the process image.
Perform the following steps to set up PROFINET using SIMATIC or TIA Portal:38

Industrial Network Protocols
1. Verify that SIMATIC is on your machine.
2. From the Windows Start menu, go to Cognex and select the folder that contains the PROFINET tools.

3. Check if the DataMan's firmware is up-to-date by clicking, in the Setup Tool, View and then System Info.

39

Industrial Network Protocols
4. Make sure that in the Setup Tool, PROFINET is enabled.

40

Industrial Network Protocols
5. Download the TIA Portal Integration Guide from https://support.cognex.com/en/downloads/detail/in-sight/3687/1033.

41

Industrial Network Protocols
6. Open the PROFINET Tag Generator file that is included in the TIA Portal Integration Guide.

7. From the Windows Start menu, launch the SIMATIC Manager or TIA Portal.

Object Model
Modules
The PROFINET implementation on DataMan consists of seven I/O modules:
1. Acquisition Control Module
2. Acquisition Status Module
3. Results Control Module
4. Results Status Module
5. SoftEvent Control Module
6. User Data Module
7. Result Data Module

42Industrial Network Protocols

Acquisition Control Module
Controls image acquisition. This module consists of data sent from the PLC to the DataMan device.
Slot number: 1
Total Module size: 1 byte
Bit

Name

0

Trigger Enable

1

Trigger

2-7

Reserved

Description
Setting this bit enables triggering via PROFINET. Clearing this bit disables triggering.
Setting this bit triggers an acquisition when the following conditions are met:l

Trigger Enable is set.

l

No acquisition is currently in progress.

l

The device is ready to trigger.

Reserved for future use

Acquisition Status Module
Indicates the current acquisition status. This module consists of data sent from the DataMan device to the PLC.
Slot number: 2
Total Module size: 3 bytes
Bit

Name

Description

0

Trigger Ready

Indicates when the device is ready to accept a new trigger. Bit is True when “Trigger Enable”
is set and the device is ready to accept a new trigger.

1

Trigger Ack

Indicates that the DataMan has received a new Trigger. This bit remains True as long as the“Trigger” bit remains True (that is, it is interlocked with the Trigger bit).

2

Reserved

Reserved for future use.

43

Industrial Network Protocols
3Missed Ack

Indicates that the DataMan was unable to successfully trigger an acquisition. Bit is cleared
when the next successful acquisition occurs.

4-7

Reserved

Reserved for future use.

8-23

Trigger ID

ID value of the next trigger to be issued (16-bit integer). Used to match issued triggers withcorresponding result data received later. This same value is returned in ResultID of theresult data.

Note: The Missed Ack bit in the Acquisition Status Register will only be set if an acquisition triggered from theAcquisition Control Module could not get executed.

Results Control Module
Controls the processing of result data. This module consists of data sent from the PLC to the DataMan device.
Slot number: 3
Total Module size: 1 byte
Bit

Name

Description

0

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 ofresults are pulled from the queue (made available in the Result Data module) eachtime the current results are acknowledged. The DataMan will respond to theacknowledge by clearing the “Results Available” bit. Once the “Results Ack” bit iscleared 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 andthe base station can buffer up to 500 sets of read results.

1

Results Ack

Bit is 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” willagain be set True.

2-7

Reserved

Reserved for future use.

Results Status Module
Indicates the acquisition and result status. This module consists of data sent from the DataMan device to the PLC.
Slot number: 4
Total Module size: 1 byte
Bit

Name

Description

0

Decoding

1

Decode Complete

Bit is toggled on the completion of a decode operation when the new results are
made available (0 -> 1 or 1 -> 0).

2

Result Buffer Overrun

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

3

Results Available

Indicates that the DataMan is decoding an acquired image.1

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

1 The value of the Decoding bit is identical to the value of the Acquiring bit. Both bits are true if an acquisition, or series of acquisitions of thesame trigger, is in progress.

44

Industrial Network Protocols
4-6

Reserved

7

General Fault

Reserved for future use
Indicates that a fault has occurred. Currently only used by Soft Event operations.

SoftEvent Control Module
Used to initiate a SoftEvent and receive acknowledgment of completion. Note that this is a bi-directional I/O module. Module
data sent from the PLC initiates the SoftEvent. Module data sent by the DataMan device acknowledges completion.
Slot number: 5
Total Module size: 1 byte (input) and 1 byte (output)
Data written from the PLC to DataMan:
Bit

Name

0

Train CodeBit transition from 0 -> 1 causes the train code operation to be invoked.

1

Train Match
StringBit transition from 0 -> 1 causes the train match string operation to be invoked.

2

Train Focus

Bit transition from 0 -> 1 causes the train focus operation to be invoked.

3

Train
Brightness

Bit transition from 0 -> 1 causes the train brightness operation to be invoked.

4

UntrainBit transition from 0 -> 1 causes the untrain operation to be invoked.

5

Reserved

Reserved for future use

6
7

Description

Execute DMCC Bit transition from 0 -> 1 causes the DMCC operation to be invoked. Note that a valid DMCC
command string must first be placed in “User Data” before invoking this event.
Set Match
StringBit transition from 0 -> 1 causes the set match string operation to be invoked. Note that match
string data must first be placed in “User Data” before invoking this event.

Data written from the DataMan to PLC:
Bit

Name

Description

0

Train Code Ack

1Train Match String Ack

2

Train Focus Ack

3

Train Brightness Ack

4

Untrain Ack

Indicates that the “Untrain” operation is complete

5

Reserved

Reserved for future use

6

Execute DMCC Ack

Indicates that the “Execute DMCC” operation is complete

7

Set Match String Ack

Indicates that the “Set Match String” operation is complete

Indicates that the “Train Code” operation is complete
Indicates that the “Train Match String” operation is complete
Indicates that the “Train Focus” operation is complete
Indicates that the “Train Brightness” operation is complete

User Data Module
Data sent from a PLC to a DataMan to support acquisition, decode and other special operations. Currently this module is onlyused to support the “Execute DMCC” and “Set Match String” SoftEvents.
Note: There are 5 versions of the User Data module. Only one instance can be configured for use in a given application.
The “User Data Option” and “User Data Length” fields are the same for each module. The “User Data” field varies in size
based on the selected module. Choose the module which is large enough to exchange the amount of data yourapplication requires.

45

Industrial Network Protocols
Slot number: 6
Total Module size:
4 + 16 (16 bytes of User Data)
4 + 32 (32 bytes of User Data)
4 + 64 (64 bytes of User Data)
4 + 128 (128 bytes of User Data)
4 + 250 (250 bytes of User Data)
Byte

Name

Description

0-1

User Data Option

Optional user data information. Currently only used by “Set Match String”
SoftEvent. Specifies which code target to assign the string (16-bit Integer).
Bit0: Assign string to all targets
Bit1: Assign string to 2D codes
Bit2: Assign string to QR codes
Bit3: Assign string to 1D/stacked/postal codes

2-3

User Data Length

Number of bytes of valid data actually contained in the “User Data” field (16-bit
Integer).

4...

User Data

Data sent from the PLC to the DataMan to support acquisition, decoding, andother special operations (array of bytes).

Result Data Module
Read result data sent from a DataMan to a PLC.
Look into the Result Data Module for non-PROFINET related data if there is an acquisition problem on the reader. The"Result Code" part contains information about trigger overruns or buffer overflows that have occurred on the reader.
Note: There are 5 versions of the Result Data module. Only a single instance can be configured for use in a given
application. The “Result ID”, “Result Code”, “Result Extended” and “Result Length” fields are the same for each module.
The “Result Data” field varies in size based on the selected module. Choose the module which is large enough toexchange the amount of result data your application requires.
Slot number: 7
Total Module size:
8 + 16 (16 bytes of Result Data)
8 + 32 (32 bytes of Result Data)
8 + 64 (64 bytes of Result Data)
8 + 128 (128 bytes of Result Data)
8 + 246 (246 bytes of Result Data)
Byte

Name

0-1

Result ID

Description
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).

46

Industrial Network Protocols
2-3

Result Code

Indicates the success or failure of the read that produced these results (16-bit
Integer).
Bit 0,1=read, 0=no readBit 1,1=validated, 0=not validated (or validation not in use)
Bit 2,1=verified, 0=not verified (or verification not in use)
Bit 3,1=acquisition trigger overrun
Bit 4,1=acquisition buffer overflow
Bits 5-15 reserved

4-5

Result Extended

Currently unused (16-bit Integer).

6-7

Result Length

Actual number of bytes of read data contained in the “Result Data” field (16-bit
Integer).

8...

Result Data

Decoded read result data (array of bytes)

Operation
SoftEvents
SoftEvents act as “virtual” inputs. When the value of a SoftEvent changes from 0 -> 1 the action associated with the event will
be executed. When the action completes the corresponding SoftEventAck bit will change from 0 -> 1 to signal completion.
The acknowledge bit will change back to 0 when the corresponding SoftEvent bit is set back to 0.
The “ExecuteDMCC” and “SetMatchString” SoftEvent actions require user supplied data. This data must be written to the
UserData and UserDataLength area of the UserData Module prior to invoking the SoftEvent. Only one SoftEvent can be
invoked at a time because both of these SoftEvents depend on the UserData.

General Fault Indicator
When a communication related fault occurs the “GeneralFault” bit will change from 0 -> 1. Currently the only fault conditions
supported are SoftEvent operations. If a SoftEvent operation fails, the fault bit will be set. The fault bit will remain set until thenext SoftEvent operation or until triggering is disabled and again re-enabled.

Acquisition Sequence
DataMan can be triggered to acquire images by several methods. It can be done explicitly by manipulating the Trigger bit of
the Acquisition Control Module, it can be triggered by external hardwired input, and it can be triggered via DMCC. Thissection describes manipulating the Acquisition Control Module bits.
On startup the “Trigger Enable” bit will be False. It must be set to True to enable triggering. When the device is ready toaccept triggers, the “Trigger Ready” bit will be set to True.
While the Trigger Ready bit is True, each time the reader detects the “Trigger” bit change from 0 to 1, it initiates an image
acquisition. Make sure that the client (PLC) holds the bit in the new state until that same state value is seen back in the
Trigger Ack bit. This is a necessary handshake to guarantee that the reader detects the change.

47

Industrial Network Protocols
During an acquisition, the Trigger Ready bit will be cleared and the Acquiring bit will be set to True. When the acquisition iscompleted, the Acquiring bit will be cleared. The Trigger Ready bit is again set to True once the device is ready to begin a
new image acquisition.
The reader allows acquisitions to overlap with the decoding of previous acquisitions. The Trigger Ready bit is set high after
the acquisition is complete, while decoding may still be in progress. The Decoding bit is deprecated and only mirrors the
behavior of the Acquiring bit. If trigger queuing is active or other trigger sources can interfere, the Trigger Ready bit may not
be reliable. Conflicting trigger overruns are reported in the Result Code bit of the Result Data module.
To force a reset of the trigger mechanism, set the Trigger Enable bit to False, until the Trigger Ready bit is 0. Then, Trigger
Enable can be set to True to re-enable acquisition.
As a special case, an acquisition can be cancelled by clearing the Trigger signal before the read operation is complete. This
allows cancelling reads in Presentation and Manual mode if no code is in the field of view. To ensure that a read is notunintentionally cancelled, it is advised that the PLC hold the Trigger signal True until both TriggerAck and ResultsAvailable
are True or DecodeComplete toggles state.

Decode / Result Sequence
After an image is acquired, it is decoded. When the decoding is complete and a result is ready to be delivered, the reader
toggles the DecodeComplete bit of the DecodeStatusRegister.
Decode results are reported asynchronously to the Result Status module. If BufferResultsEnable is set to False, then the
decode results are immediately placed into DecodeResults, and the Results Available bit is set to True.
Note: The only way to ensure that you are not losing results is to use BufferResults. Make sure that your application canread each DecodeResult in time if you do not use BufferResultsEnable.
If the Results Buffer Enable bit is set to True, the new results are queued. The earlier decode results remain in the Results
Module until the client acknowledges them by setting the “Results Ack” bit to True. After the Results Available bit is cleared,
make sure that the client sets the Results Ack bit back to False to allow the next queued results to be placed into the Results
Module. This is a necessary handshake to ensure the results are received by the DataMan client (PLC), even if short gaps
occur between results.

Behavior of DecodeStatusRegister
Bit

Bit Name

Results if Buffering Disabled

Results if Buffering Enabled

0

Decoding

Set when acquiring and decoding an image. The
value of the Decoding bit is always the same as
the Acquiring bit.

Set when acquiring and decoding animage. The value of the Decoding bit
is always the same as the Acquiring
bit.

48

Industrial Network Protocols
1

Decode Complete

Toggled on completion of an image decode.

Toggled on completion of an image
decode.

2

Results Buffer
Overflow

Remains set to zero.

Set when decode results could not
be queued because the client failed
to acknowledge a previous result.
Cleared when the decode result is
successfully queued.

3

Results Available

Set when new results are placed in the Results
Module. Stays set until the results are
acknowledged by setting Results Ack to true.

Set when new results are placed in
the Results Module. Stays set until
the results are acknowledged by
setting Results Ack to true.

Results Buffering
There is an option to enable a buffer for decode results. If enabled, this allows a finite number of decode result data to queue
up in the buffer until the client (PLC) has time to read them.
If reads are occurring faster than results can be sent out, the primary difference between buffering or not buffering is which
results get discarded. If buffering is not enabled, the more recent result overwrites the earlier result. If Results Buffering isenabled and the queue is full, the most recent results are discarded until space becomes available in the results queue.
Results buffering helps to smooth the data flow if the client (PLC) slows down for periods of time, or if there are surges of read
activity.
Note: If the queue has overflowed and then buffering is disabled, there will be a greater than 1 difference between the
TriggerID and ResultID values. This difference represents the number of reads that occurred but could not be queued
because the queue was full (number of lost reads equals TriggerID - ResultID - 1). After the next read, the ResultID
value will return to the typical operating value of TriggerID - 1.

49

Industrial Network Protocols
Results Fragmentation
Results Fragmentation is a PROFINET feature that is automatically enabled together with Results Buffering. This feature
splits decode result strings into chunks if the strings are too large for the Results Data field. The chunks are pushed to thebuffer like normal results. Then, the PLC can read the chunks one by one and reassemble the decode result string.
In contrast, if Results Buffering is disabled, large decode result strings are cut off to fit into the Results Data field, whichmeans that the end of the string gets lost.
A decode result chunk looks like a normal result. The Result Length represents the remaining number of result characters.
The last chunk of a Decode Result string can be found as follows:l

Its Result Length is lower or equal to the Result Buffer size.

l

Its Result ID is different from the ID of the next result.

SIMATIC Examples
This section gives some examples of using the DataMan with a Siemens S7-300 PLC assuming that you are familiar with theS7-300 and the SIMATIC programming software.
1. If you already have a project, click Cancel to skip past the New Project wizard. Otherwise, let the wizard guide you
through creating a new project.
2. In the opened project, double-click the Hardware icon to open the HW Config dialog. From the main menu, selectOptions -> Install GSD File….

50

Industrial Network Protocols
3. Browse to the installation folder of the GSD file (or the folder where you saved the GSD file if you downloaded it fromthe web).

4. Select the GSD file you wish to install and follow the displayed instructions to complete the installation.
Note: If there is more than one GSD file in the list, and you are unsure which to install, choose the one with themost recent date.

5. Add your DataMan device to your project. This makes the DataMan available in the Hardware Catalog. Launch the
SIMATIC Hardware Config tool.
6. In the main menu, select View -> Catalog.
7. The catalog is displayed. Expand the PROFINET IO tree to the Cognex ID Readers node.

51

Industrial Network Protocols
8. Press and hold the left mouse button to drag the DataMan reader and drop it on the PROFINET IO network symbol in
the left pane.

The HW Config tool automatically maps the DataMan I/O modules into the memory space.
Note: By default, the 64 byte User Data and 64 byte Result Data Modules are inserted. There are multiple sizes
available for both of these modules. To optimize performance, use the module size that most closely matches
the actual data requirements of your application. You can change the module by deleting the one in the table
and inserting the appropriate sized module from the catalog.
9. Right-click the DataMan icon and select Object Properties….
10. Give the reader a name. This must match the name of your actual DataMan reader. The name must be unique andfollow DNS naming conventions. For details, see the SIMATIC Software help.

52

Industrial Network Protocols
11. If your DataMan reader is configured to use its own static IP, uncheck Assign IP address via IO controller. As analternative, if you wish the PLC to assign an IP address, select the Ethernet button and configure the appropriate
address.

12. In the IO Cycle tab, select the appropriate cyclic update rate for your application.

13. By default, the SIMATIC software maps the User Data and Result Data Modules to offset 256. This is outside of thedefault process image area size of 128. That is, data in these modules are inaccessible by some SFCs such as
BLKMOV. As a solution, either remap the modules to lower offsets within the process image area or expand theprocess image area to include these modules.
If you choose to expand the process image area, make the size large enough for the module size plus the default 256 offset.

53

Industrial Network Protocols

Note: Expanding the process image can have a performance impact on the PLC scan cycle time. If your scan time iscritical, use the minimal acceptable module sizes and manually remap them down lower in the process image.

Symbol Table
It is recommended that you define symbols for the DataMan I/O module elements to make the code much easier to read andreduce mistakes. This sample table shows symbols defined for a typical instance of a DataMan reader. It is possible that
DataMan I/O modules are at different addresses in your project. Make sure to adjust your symbol definitions based on thespecific offsets of the I/O modules.

54

Industrial Network Protocols

Trigger and Get Results
Run the sample program “DM200_SampleRead” for the complete example program.
Note: This sample can be used with any PROFINET enabled DataMan reader.
Perform the following steps to install the program:
1. Start the SIMATIC Manager software.
2. Close any open applications.
3. From the main menu, select File -> Retrieve…
4. Browse to find the sample file on your PC.

55

Industrial Network Protocols

5. Save the project on your PC.

6. The Siemens software extracts the sample archive and makes it available.
Reduced to the basics, the process of reading and retrieving results consists of the following:
1. Define an area in your application to save read results. There are many options regarding how and where result data
can be stored. In this example, a Data Block (DB) is defined containing the fields of the Result Data module that are
relevant for our application.

2. Enable the reader.

56

Industrial Network Protocols
3. Set the trigger signal and set coil to indicate a read is pending.

4. As soon as the trigger signal is acknowledged, clear the trigger signal.

5. As soon as the results are available, save a copy of the result data and set the results acknowledge signal.

57

Industrial Network Protocols

6. When the reader sees the result acknowledge signal, clear result acknowledge, clear the read pending coil, andsignal that the read process is complete.

58

Industrial Network Protocols
Note: The reader clears “Results Available” as soon as it sees the PLC’s “Results Ack” signal.

Using SoftEvents
Run the sample program “DM200_SoftEvents” for the complete example program.
Note: This sample can be used with any PROFINET enabled DataMan reader.
Perform the following steps to install the program:
1. Start the SIMATIC Manager software.
2. Close any open applications.
3. From the main menu, select File -> Retrieve…
4. Browse to find the sample file on your PC.

5. Select Dm200_SoftEvents.zip from the Siemens folder.
6. Select a destination folder to save the project on your PC.

59

Industrial Network Protocols

7. The Siemens software extracts the sample archive and makes it available.
SoftEvents are a means of invoking an activity by manipulating a single control bit. The activity for each bit is predefined (formore details, see section SoftEvents). With the exception of “Execute DMCC” and “Set Match String” all SoftEvents may be
invoked in the same way. “Execute DMCC” and “Set Match String” require the added step of loading the User Data modulewith application data before invoking the event.
Reduced to the basics, the process of invoking a SoftEvent consists of the following:60

Industrial Network Protocols

Executing DMCC Commands
Refer to sample program “DM200_SoftEvents” for the complete example program. For information on how to install it, seesection Using SoftEvents.
Note: This sample can be used with any PROFINET enabled DataMan reader.
“Execute DMCC” is a SoftEvent which requires the added step of loading the User Data module with the desired DMCC
command string before invoking the event. Note that the SoftEvent mechanism does not provide a means of returning DMCC
response data other than a failure indication. This mechanism cannot be used for DMCC “||>GET…” commands.
The process of executing a DMCC command is the same for all other SoftEvents as in the example above except the step of
invoking the SoftEvent also includes copying the command string to the User Data Module. In this example the command
string is in a Data Block. This example can be expanded to utilize a Data Block with an array of command strings that the
copy function can reference by an index value. It allows the user to pre-define all DMCC commands that are required by theapplication and invoke them by index.

61

Industrial Network Protocols

The function “Set User Data” (FC11) copies the provided string to the User Data module. Refer to the example program forthe actual STL code.

TIA Portal Examples
This section gives some examples of using the DataMan with a Siemens S7-1200 PLC, assuming that you are familiar with
the S7-1200 and TIA Portal.

62

Industrial Network Protocols
1. In TIA Portal, either create a new project, or open an existing one.
2. In Project View, click Options and click Manage general station description files (GSD).

3. Browse to the installation folder of the GSD file (or the location where you saved the GSD file if you downloaded itfrom the web).
4. Select the GSD file you wish to install and follow the displayed instructions to complete the installation.
Note: If there is more than one GSD file in the list and you are unsure which to install, choose the one with the mostrecent date.

63

Industrial Network Protocols

5. Go to Device Configuration and add your device in the Network View tab.
6. The Hardware catalog is displayed on the right. Expand the “PROFINET IO” tree to the “Cognex ID Readers” node.
7. Press and hold the left mouse button to drag the DataMan reader and drop it on the PROFINET IO network symbol in
the left pane.

The HW Config tool automatically maps the DataMan I/O modules into the memory space.

64

Industrial Network Protocols
Note: By default, the 64 byte User Data and 64 byte Result Data Modules are inserted. There are multiple sizes
available for both of these modules. To optimize performance, use the module size that most closely matches the actual
data requirements of your application. You can change the module by deleting the one in the table and inserting theappropriate sized module from the catalog.
8. Right-click the DataMan icon and select Properties….

9. Give the reader a name. This must match the name of your actual DataMan reader. The name must be unique andfollow DNS naming conventions. For details, see the TIA Portal help documentation.
10. If your DataMan reader is configured to use its own static IP, select the IP address is set directly at the device
radio button. As an alternative, if you wish the PLC to assign an IP address, select the Ethernet button and configure
the appropriate address.

65Industrial Network Protocols
11. Check the checkbox next to the device image and connect the selected device with the PLC by drawing a line withyour mouse.

12. By default, the SIMATIC software maps the User Data and Result Data Modules to offset 256. This is outside of thedefault process image area size of 128. That is, data in these modules are inaccessible by some SFCs such as
BLKMOV. As a solution, either remap the modules to lower offsets within the process image area or expand theprocess image area to include these modules.
If you choose to expand the process image area, make the size large enough for the module size plus the default 256 offset.

66

Industrial Network Protocols
Note: Expanding the process image can have a performance impact on the PLC scan cycle time. If your scan time iscritical, use the minimal acceptable module sizes and manually remap them down lower in the process image.

Symbol Table
It is recommended that you define symbols for the DataMan I/O module elements to make the code much easier to read andreduce mistakes. This sample table shows symbols defined for a typical instance of a DataMan reader. It is possible that
DataMan I/O modules are at different addresses in your project. Make sure to adjust your symbol definitions based on thespecific offsets of the I/O modules. For more information, see the TIA Portal Integration Guide for In-Sight and DataMan athttps://support.cognex.com/en/downloads/detail/in-sight/3687/1033.

Trigger and Get Results
Open the sample program “Cognex-Dataman” for the complete example program.
Note: This sample can be used with any PROFINET enabled DataMan reader.
Perform the following steps to install the program:
1. Start TIA Portal.
2. Browse to find the sample file on your PC.

67

Industrial Network Protocols

3. Save the project on your PC. TIA Portal extracts the sample archive and makes it available.
Reduced to the basics, the process of reading and retrieving results consists of the following:
1. Define an area in your application to save read results. There are many options regarding how and where result data
can be stored. In this example, a temporary tag is defined containing the fields of the Result Data module that are
relevant for our application.

2. Enable the reader.

3. Set the trigger signal and set coil to indicate a read is pending.

4. As soon as the results are available, clear the trigger signal and save a copy of the result data and set the results
acknowledge signal.

68Industrial Network Protocols

5. When the reader sees the result acknowledge signal, clear result acknowledge, clear the read pending coil, andsignal that the read process is complete.
Note: The reader clears “Results Available” as soon as it sees the PLC’s “Results Ack” signal.

Using SoftEvents
SoftEvents are a means of invoking an activity by manipulating a single control bit. The activity for each bit is predefined. For
more details, see section SoftEvents. With the exception of “Execute DMCC” and “Set Match String” all SoftEvents may be
invoked in the same way. “Execute DMCC” and “Set Match String” require the added step of loading the User Data modulewith application data before invoking the event.
Reduced to the basics, the process of invoking a SoftEvent consists of the following:69

Industrial Network Protocols

Executing DMCC Commands
Refer to sample program “Cognex-Dataman” for the complete example program. For information on how to install it, seesection Using SoftEvents.
Note: This sample can be used with any PROFINET enabled DataMan reader.
“Execute DMCC” is a SoftEvent which requires the added step of loading the User Data module with the desired DMCC
command string before invoking the event. Note that the SoftEvent mechanism does not provide a means of returning DMCC
response data (other than a failure indication). So this mechanism cannot be used for DMCC “||>GET…” commands.
The process of executing a DMCC command is the same for all other SoftEvents (see example above) except the step of
invoking the SoftEvent also includes copying the command string to the User Data Module. In this example the command
string is exists in a Data Block. This example can be expanded to utilize a Data Block with an array of command strings thatthe copy function can reference by an index value. This allows the user to pre-define all DMCC commands that are requiredby the application and invoke them by index.

PROFINET Class B
Upgrading a DataMan reader to firmware version 6.1.7 or higher installs a new PROFINET stack, adding support for
PROFINET Class B. While this adds new functions and capabilities, it is not a drop-in replacement for a DataMan reader

70Industrial Network Protocols
running the Class A stack, which all previous versions of DataMan firmware supported. You need to update the hardware
configuration in the TIA software.
If you add new DataMan readers to an existing system that has other DataMan products, both GSD files need to be installed.
Refer to the table for which GSD file to use with a given reader.
FirmwareVersionGSD
File

Description

6.1.7 orlater

V2.34 or Supports Class B, uses the Port stack. The Class-B configurations are suffixed with CC-B, indicating
later
that the configuration is Class B. Example: DataMan 470 CC-B.

Earlierthan 6.1.7

V2.31 or Uses the Siemens PROFINET stack.
earlier

SNMP (Simple Network Management Protocol) v2 is supported only when the V2.34 GSD file is used. PROFINET uses the
topology technology to detect and identify devices on SNMP.
Supported MIBs:l

LLDP-MIDl

LLDP-EXT-DOT3-MIBl

MIB-II

Writable OIDs:l

1.3.6.1.2.1.1.4.0 (sysContact, defaults to “Someone <someone@somewhere.net>”)l

1.3.6.1.2.1.1.5.0 (sysLocation, defaults to “somewhere”)

l

1.3.6.1.2.1.1.6.0 (sysName, defaults to “something”)

These OIDs are reset to the default settings after a factory reset. Other OIDs are also supported in the above MIBs but haveread access only.

PLC Changes
When upgrading the firmware on a DataMan reader to firmware version 6.1.8 or higher, you need to remove the reader fromthe PLC hardware configuration, replace the General Station Description (GSD) file, then re-add the “CC-B” version of thereader to the hardware configuration.
From the point of view of the PLC, a Class A device is replaced with a Class B device, which fundamentally changes how the
PLC communicates with the reader. The PLC treats the reader as a completely different device.
Follow these steps to replace the reader in the hardware configuration of the PLC while maintaining the IO module
addressing scheme to ensure that the logic in the project is not affected.
Note: It is highly recommended to follow this process for each reader being upgraded, one at a time.

71Industrial Network Protocols
1. Go into the TIA Portal software and install the new GSD file from the Options drop down menu -> Manage General
Station Description File dialog.

Note: If you are adding onto an existing hardware configuration and are not removing any existing DataMan
readers, skip steps 2, 3, and 5.
2. Select the source path in the Manage General Station Description Files dialog and browse to the location of the
DataMan GSD file: C:\Program Files (x86)\Cognex\DataMan\DataMan Software <version>\Tools\Profinet
Tip: The TIA software automatically assigns IO module addresses when a new system is added to the hardware
configuration. To prevent different addresses from being assigned when the class B system is added, take ascreenshot of the original IO Module addressing. This allows the new reader’s IO modules to be mapped to thecorrect address space in the PLC, and prevent broken logic in the project:

3. Remove the existing DataMan system from the hardware configuration.

72

Industrial Network Protocols
4. Expand the catalog in the TIA Portal software, select the “CC-B” version and add it to your configuration. For
example, “DataMan 470 CC-B”.

5. Confirm that the IO Module addressing matches what the original vision system was mapped to. If they are different,
refer to the screenshot taken in step 2 to restore the IO module addresses to their previous values.
6. To change the cycle time to 8 ms, or to another value, select the reader from the Device view, and on the General tab,select Real Time Settings. Select the appropriate cycle time from the Update Time drop down menu:

Note: The new GSD file has a faster cycle time, defaulting to 4 ms from 8 ms. While this shortens the network
update interval, it also doubles the amount of PROFINET traffic from this device.
7. Compile and download the changes to the PLC.

iQ Sensor Solution
iQ Sensor Solution (iQSS) is an engineering tool offered by Mitsubishi Electric. It allows the intuitive configuration andmaintenance of sensors. If iQSS is enabled in the Setup tool, DataMan supports setting and monitoring of the following
device settings via iQSS:l

IP address and subnet maskl

The selected industrial protocol (SLMP, CC-Link IE Field Basic, or None).

l

SLMP scanner parameters and device address mappings

Disabling iQSS blocks any attempts to remotely get or set these device settings.

73

Industrial Network Protocols
Note: If you have a wireless DataMan reader, read the section Industrial Protocols for the Wireless DataMan.

DMCC
The following commands can be used to enable or disable the iQ Sensor Solution. The commands can be issued via RS-232
or Telnet connection.
Note: Because you have to make changes to the Telnet client provided by Windows to communicate with DataMan, it isrecommended you use third party clients such as PuTTY.
Enable:||>SET IQSS.ENABLED ON||>CONFIG.SAVE||>REBOOT
Disable:||>SET IQSS.ENABLED OFF||>CONFIG.SAVE||>REBOOT
Choose language:
English:||>SET IQSS.LANGUAGE 0||>CONFIG.SAVE||>REBOOT
Japanese:||>SET IQSS.LANGUAGE 1||>CONFIG.SAVE||>REBOOT

Reader Configuration CodeScanning the following reader configuration codes will enable/disable iQ Sensor Solution for your corded reader.
Enable:Disable:Scanning the following reader configuration codes will set the language for the iQSS on your DataMan reader.

74

Industrial Network Protocols
English:Japanese:

Setup Tool
The iQ Sensor Solution can be enabled by checking the box iQ Sensor Solution in the Communications step under the
Ethernet tab. Make sure to save the new selection by choosing Save Settings before disconnecting from the reader.

Overview
This topic describes how to configure the iQ Sensor Solution for DataMan devices, and transfer data between a reader and a
Mitsubishi Automation Controller using GX Works2. The examples in this topic were written assuming the following
components are being used:l

DataMan ReaderlMitsubishi iQ-R, Q, L or F-series (3E Frame) Automation Controller

Note: Note: FX Series (1E Frame) are not supported.
l

Mitsubishi GX Works2 software (SWnDNC-GXW2-E) version 1.492 or laterl

Cognex Language Package (English = CognexInsight_en.ipar; Japanese = CognexInsight_ja.ipar) included within
Setup Tool

Note: iQ Sensor Solution is only available on Setup Tool using 6.1.5 or later versions.
Note: For more information on Mitsubishi iQ Sensor Solution, refer to Mitsubishi's iQ Sensor Solution Reference
Manual.
Mitsubishi iQ Sensor Solution is a factory protocol that enables the GX Works2 software to control readers over the SLMPScanner protocol. With the iQ Sensor Solution, GX Work2 is able to discover readers on the network, read/write the reader's
SLMP Scanner parameter settings and monitor the status of a reader.
Note: For more information on GX Works2, refer to the GX Works2 Operating Manual.

Discovering DataMan Readers on GX Work2
The following procedure assumes that the DataMan reader has not been previously configured for SLMP Scanner and isconnected to the same Ethernet subnet as a supported Mitsubishi Automation Controller.
1. Launch GX Works2.
2. From the Tool menu, select Register Profile. The Register Profile window opens.
3. Create a new project in GX Works2.

75

Industrial Network Protocols
4. Navigate to the Cognex DataMan Language Package (English = CognexInsight_en.ipar; Japanese = CognexInsight_
ja.ipar), and click Register.
Note: By default, the Cognex Language Package is installed to: C:\Program Files (x86)\Cognex\In-Sight\InSight Explorer 4.9.x\Factory Protocol Description\ESPP.
5. Select Parameter --> PLC Parameter on the Project view. The L Parameter Setting window is displayed.
6. Select the Built-in Ethernet Port Settings tab.
7. Check the Set Open Setting in Ethernet Configuration window checkbox. The following message will be displayed.
8. Click Yes; the Open Settings button will be changed to the Ethenet Conf. button.
9. Click the Ethernet Conf. button. The Ethernet Configuration window will be displayed.
10. Select Ethernet Configuration --> Online --> Detect Now; the following message is displayed.
11. Read the message and click Yes. The actual system configuration is reflected on the Ethernet Configuration window.
12. Select Close with Reflecting the Setting. The settings on the Ethernet Configuration window will be saved, and thesystem configuration setting is completed.
Note: Up to 16 readers may be displayed (in ascending order of their IP addresses) on the Ethernet Configuration
window after executing the automatic detection of connected devices. If the Detect Now button is pressed, and areader in the network is not iQSS-compatible, the reader will not appear in the Ethernet configuration window. If areader is iQSS-compatible but no profile was previously added to GX Works2, "Module With No Profile Found" will be
displayed.
Note: When a reader is detected in the actual system configuration, error information is displayed on the Output window
when there is an error in the system configuration after executing the automatic detection of connected devices.
Double-click the error on the Output window and correct the error at the error jump destination.
Note: For troubleshooting, refer to Mitsubishi's iQ Sensor Solution Reference Manual.

Monitoring the status of the DataMan Reader
1. Launch GX Works2 and open a project that has the specified network configured.
2. From the Diagnostics menu, select Sensor/Device Monitor. The Module Selection (Sensor/Device Monitor) window
will be displayed.
3. Click OK; the Status of readers connected to the Built-in Ethernet port LCPU will be displayed on the Sensor/Device
Monitor window.

76

Industrial Network Protocols
4. Select the desired reader from the "list of devices" or "device map area". The status of the reader will be displayed on
the Monitor Information window.
Note: Only one reader can be monitored in the Ethernet Configuration window at a time.

List of iQSS Error Codes:
Error CodeDescription

0

SLMP connection established

1

SLMP connection in progress

2

SLMP connection rejected

3

SLMP connection or configuration faulted

4

SLMP poll rate configured too low

5

SLMP connection idle

6

SLMP connection timed out

7

SLMP Status block error

8

SLMP Control block error

9

SLMP Output block error

10

SLMP Input block error

11

SLMP Command block error

12

SLMP Command Result block error

13

SLMP not started (if none or if different protocol like CC-Link is started)

14

SLMP settings require a reader reboot to become effective

CC-Link IE Field Basic
The CC-Link IE Field Basic is an application-level protocol used in industrial automation applications. This protocol uses
standard Ethernet hardware and software to exchange I/O data, alarms, and diagnostics. It is Mitsubishi Electric’s publicly
available, standardized communication format for communicating with iQ- Series, FX Series, iQ-R, iQ-F, Q, and L Series
PLCs through Ethernet or serial connections. DataMan supports the CC-Link IE Field Basic on Ethernet only.
By default the DataMan has the CC-Link Protocol disabled. The protocol can be enabled in the Setup Tool, via DMCC, or byscanning a parameter code.
Note: If you have a wireless DataMan reader, read the section Industrial Protocols for the Wireless DataMan.

DMCC
The following commands can be used to enable or disable the CC-Link IE Field Basic. The commands can be issued via RS232 or Telnet connection.
Note: Because you have to make changes to the Telnet client provided by Windows to communicate with DataMan, it isrecommended you use third party clients such as PuTTY.
Enable:||>SET CC-LINK.ENABLED ON||>CONFIG.SAVE||>REBOOT

77

Industrial Network Protocols
Disable:||>SET CC-LINK.ENABLED OFF||>CONFIG.SAVE||>REBOOT

Reader Configuration CodeScanning the following reader configuration codes will enable/disable CC-Link Protocol for your corded reader.

Enable:Disable:Setup Tool
The CC-Link IE Field Basic can be enabled by checking the box CC-Link in the Communications step under the Ethernet
tab - > Industrial Protocols. Make sure to save the new selection by choosing Save Settings before disconnecting from thereader.
Note: You must reboot your reader for the new settings to take effect.
Note: For more information visit Mitsubishi website.

Modules
The CC-Link IE Field Basic implementation on DataMan consists of four I/O modules:
1. Control Block
2. Status Block
3. Output Data Block
4. Input Data Block

Signal Layout
Block name

Link Device Name

Data Length

Data Flow

Control Block

RY

64 bits (only the first 32 bits
are used)

PLC to Reader

Status BlockRX

64 bits (only the first 32 bits
are used)

Reader to PLC

Output Data Block

RWw

32 Words (64 bytes)

PLC to Reader

Input Data Block

RWr

32 Words (64 bytes)

Reader to PLC

78

Industrial Network Protocols
Note: The number of link devices can be increased up to a factor of 4, if the reader is configured in GXWorks to occupy
more than one station. This can be useful if inspection results or DMCC commands need to be transmitted that are
longer than 62 bytes.

Control Block (RY)The Control block contains bit type data. However, the block may be defined to exist in either bit or word memory in the PLC.
This block consists of the control signals sent from the PLC to the reader. It is used by the PLC to initiate actions andacknowledge certain data transfers.Control Block
Bit 7

Bit 6

Bit 5

Bit 4

Reserved

Bit 15

Bit 14

Bit 13

Bit 3

Bit 2

Bit 1

Bit 0

Results Ack

BufferResults
EnableTrigger

Trigger
EnableBit 11

Bit 10

Bit 9

Bit 8

Bit 18Bit 17

Bit 16

Reserved

Reserved

Bit 12

Reserved
Bit 23

Bit 22

Bit 21

Bit 20

Bit 19Reserved
Bit 31

Bit 30

Bit 29Bit 28Bit 27

Bit 26

Bit 25

Bit 24

Soft Event 7

Soft Event 6

Soft Event 5

Soft Event 4

Soft Event 3

Soft Event 2

Soft Event 1

Soft Event 0

Control Block (RY) Field Descriptions
Bit

Name

Description

0

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

1

Trigger

Setting this bit triggers an acquisition.
Note: The Trigger Ready bit must be set high before triggering an acquisition.

2

3

BufferResults
EnableWhen this bit is set, each read result set (ResultID, ResultCode, ResultLength and ResultData
fields) will be held in the Output Block until it is acknowledged. Once acknowledged, the next setof read results will be made available from the buffer. If new read results arrive before the earlier
set is acknowledged the new set will be queued in the reader’s buffer. The reader can buffer up to
50 and the base station can buffer up to 500 sets of read results. See Operation for a descriptionof the acknowledgement handshake sequence.

ResultsAck Set by the PLC to acknowledge that it has received the latest results (ResultID, ResultCode,ResultLength and ResultData fields). When the reader sees this bit transition from 0->1 it clears
the ResultsAvailable bit. This forms a logical handshake between the PLC and reader. If result
buffering is enabled, the acknowledgement will cause the next set of queued results to be moved
from the buffer. See Operation for a description of the acknowledgement handshake sequence.

4-15

Reserved

Future use

16

Reserved

Future use

17

Reserved

Future use

18-23

Reserved

Future use

79

Industrial Network Protocols
Bit
24-31

Name

Description

SoftEvents Bits act as virtual discrete inputs. When a bit transitions from 0->1 the associated action is
executed. After executing the action the reader sets the corresponding SoftEventAck to signalthat the action is complete. This forms a logical handshake between the PLC and reader.
Bit0: Train code
Bit1: Train match string
Bit2: Train focus
Bit3: Train brightness
Bit4: Un-Train
Bit5: Reserved (future use)
Bit6: Execute DMCC command
Bit7: Set match string

Status Block (RX)The status block contains bit type data. However, the block may be defined to exist in either bit or word memory in the PLC.
This block consists of the status signals sent from the reader to the PLC. It is used by the reader to signal status andhandshake certain data transfers.
Bit 7

Bit 6

Bit 5

Bit 4

Reserved
Bit 15

Bit 14

Bit 13Genereal
Fault
Bit 23

Bit 12

Reserved
Bit 22

Bit 21

Bit 20

Bit 3

Bit 2

Bit 1

Bit 0

MissedAcq

Acquiring

TriggerAck

Trigger
Ready

Bit 11

Bit 10

Bit 9

Bit 8

Results
Available

Results Buffer
OverrunDecode Complete
ToggleDecoding

Bit 19Bit 18Bit 17

Bit 16

Reserved

Reserved

Reserved
Bit 31

Bit 30

Bit 29Bit 28Bit 27

Bit 26

Bit 25

Bit 24

Soft Event
Ack 7

Soft Event
Ack 6Soft Event
Ack 5

Soft Event
Ack 4Soft Event
Ack3

Soft Event
Ack 2

Soft Event
Ack 1

Soft Event
Ack 0

Status Block (RX) Field Descriptions
Bit

Name

Description

0

Trigger Ready

Indicates when the reader is ready to accept a new Trigger. The reader sets this bit when
TriggerEnable has been set and the reader is ready to accept a new trigger.

1

Trigger Ack

Indicates when the reader recognizes that Trigger has been set. This bit will remain set until
the Trigger bit has been cleared.

2

AcquiringSet to indicate that the reader is in the process of acquiring an image.
Note: For CF26, this bit is “Reserved”.

3

Missed Acq

Indicates that the reader missed a requested acquisition trigger. The bit is cleared when thenext acquisition is issued.

4-7

Reserved

Future use

8

Decoding

Deprecated. The value of the Decoding bit is always the same as the Acquiring bit.

80

Industrial Network Protocols
Bit

Name

Description

9

DecodeComplete
ToggleIndicates new result data is available. Bit toggles state (0->1 or 1->0) each time new result
data becomes available.

10

Results Buffer
OverrunSet to indicate that the reader has discarded a set of read results because the PLC has not
acknowledged the earlier results. Cleared when the next set of result data is successfully
queued in the buffer. This bit only has meaning if result buffering is enabled.

11

Results
Available

Set to indicate that new result data is available. Bit will remain set until acknowledged with
ResultsAck even if additional new read results become available.

12-14

Reserved

Future use

15

General Fault

16

Reserved

Future use.

17

Reserved

Future use

18-23

Reserved

Future use

24-31

SoftEvent Ack

Set to indicate that an Ethernet communications fault has occurred. Currently only used bysoft event operations. Bit will remain set until the next successful soft event or until
TriggerEnable is set low and then high again.

Set to indicate that the reader has completed the soft event action. Bit will remain set until
the corresponding SoftEvent bit is cleared. This forms a logical handshake between the PLC
and reader.
Bit0: Ack train code
Bit1: Ack train match string
Bit2: Ack train focus
Bit3: Ack train brightness
Bit4: Ack untrain
Bit5: Reserved (future use)
Bit6: Ack Execute DMCC command
Bit7: Ack set match string

Input Data Block (RWw)
The Input Data block contains word type data. This is data sent from the PLC to the reader. The block consists of user
defined data that may be used as input to the acquisition/decode operation.
Word 0Word 1

Word 2..N

UserDataOption

User Data Length

User Data

Input Data Block (RWw) Field Descriptions
Word

Name

Description

0

User Data Optional user data information. Currently only used by “Set Match String” SoftEvent. Specifies which
Optioncode target to assign the string (16-bit Integer).
Bit0: Assign string to all targets
Bit1: Assign string to 2D codes
Bit2: Assign string to QR codes
Bit3: Assign string to 1D/stacked/postal codes

1

User Data Number of bytes of valid data actually contained in the UserData field.
Length2..NUser Data User defined data that may be used as an input to the acquisition/decode.

81Industrial Network Protocols
Output Data Block (RWr)
The Output Data block contains word type data. This is data sent from the reader to the PLC. The block consists primarily ofread result data.
Word 0Word 1

Word 2

Word 3

Word 4

Word 5..N

Reserved

Trigger ID

Result ID

Result CodeResult Length

Result Data

Output Data Block (RWr) Field Descriptions
Word

Name

Description

0

Reserved

Future use

1

Trigger ID

Trigger identifier. Identifier of the next trigger to be issued. Used to match issued triggers with result
data that is received later. This same value will be returned as the ResultID of the corresponding
read.

2

Result ID

Result set identifier. This is the value of TriggerID when the corresponding trigger was issued. Usedto match up triggers with corresponding result data.

3

Result Code Indicates the success or failure of the read that produced this result set.
Bit0: 1=Read, 0=No read
Bit1: 1=Validated, 0=Not Validated
Bit2: 1=Verified, 0=Not Verified
Bit3: 1=Acquisition trigger overrun
Bit4: 1=Acquisition buffer overrun
Bit5-15: Reserved (future use)

4

ResultNumber of bytes of valid data actually in the ResultData field.
Data Length

5..N

Result Data Result data from this acquisition/decode.

82Industrial Network Protocols

SLMP Protocol
The SLMP Protocol uses standard Ethernet hardware and software to exchange I/O data, alarms, and diagnostics. It is
Mitsubishi Electric’s publicly available, standardized communication format for communicating with Q, iQ and L Series PLCs
through Ethernet or serial connections. DataMan supports SLMP Protocol on Ethernet only.
By default, the DataMan has SLMP Protocol disabled. The protocol can be enabled in the Setup Tool, via DMCC, or byscanning a configuration code.
Note: If you have a wireless DataMan reader, see section Industrial Protocols for the Wireless DataMan on page 127.

DMCC
The following commands can be used to enable/disable SLMP Protocol. The commands can be issued via RS-232 or Telnet
connection.
Note: Use a third party Telnet client such as PuTTY to communicate with your DataMan reader.
Enable:||>SET SLMP-PROTOCOL.ENABLED ON||>CONFIG.SAVE||>REBOOT
Disable:||>SET SLMP-PROTOCOL.ENABLED OFF||>CONFIG.SAVE||>REBOOT

Reader Configuration CodeScanning the following reader configuration codes enables/disables SLMP Protocol for your corded reader.
Note: You must reboot the device for the change to take effect.
Enable:Disable:Scanning the following reader configuration codes enables/disables SLMP protocol on your DataMan 8000 Base Station.
Note: You must reboot the device for the change to take effect.

83Industrial Network Protocols
Enable:Disable:SLMP Protocol Scanner
SLMP Protocol on DataMan is implemented as a client type device also referred to as a scanner. The DataMan reader
initiates all communication in the form of read and write requests. The PLC acts as a passive server reacting to the read andwrite requests. Since the PLC cannot initiate communication, it relies on the reader to periodically ask (scan) the PLC for any
actions or information that the PLC requires, such as triggering or retrieving read results.

Getting Started
By default, SLMP Protocol is not enabled on the DataMan reader. The protocol must be enabled and the protocol
configuration parameters must be set to correctly interact with a PLC. Protocol configuration is accomplished via the
DataMan Setup Tool.
In the Setup Tool's Communications application step's Ethernet tab, check SLMP Protocol to enable this industrial
protocol.

84

Industrial Network Protocols

Make sure to save the new selection by clicking the Save Settings button in the upper toolbar before disconnecting from thereader.
Note: The new settings take effect only after the reader is rebooted.
SLMP Protocol configuration consists of two aspects: defining the network information and defining the data to beexchanged. All configuration parameters are accessed via the SLMP Protocol tab.
You must modify the IP Address to match the address of your PLC. In addition, modify Network Number, PC Number and
Destination Module if they differ from your network.

Network Configuration
The network configuration defines all the information that the DataMan reader needs to establish a connection with a PLC.

85

Industrial Network Protocols
NameDefault

Range

Description

IP Address<empty >Any valid IP address

IP Address of the PLC toconnect to.

Host Port (Hex)0x3000Any Hex port number
0x1000-0xFFFF

Port number of the SLMP
Protocol channel on the PLC.

Timeout (ms)1000

5 - 30000

Time to in milliseconds for a
response from the PLC to an
SLMP Protocol message.

Poll Interval (ms)

1000

10 - 30000

Requested time inmilliseconds between
successive polls of the Control
Block from the PLC.

PLC Series

QCPU

QCPU or LCPU

Defines frame type used.
Currently only 3E supported.

Network Number0

0 - 239

SLMP Protocol network
number to communicate with
(0 = local network).

PC Number

0xFF

0x01 -0x78 = station on CC-Link IE
field network adapter

Station identifier on thespecified network of thedestination module.

0x7E = Master station on CC-Link
IE field network
0xFF = Direct connect to local
stationDestination Module

0x3FF

0x3ff = Local station (default)
0x3d0 = Control system CPU
0x3d1 = Standby system CPU
0x3d2 = System A CPU
0x3d3 = System B CPU
0x3e0 = CPU 1
0x3e1 = CPU 2
0x3e2 = CPU 3
0x3e3 = CPU 4

Module identifier of the device
to connect to.

Data Block Configuration
The data block configuration defines the data that will be exchanged between the DataMan reader and the PLC. Six data
blocks are available. Each block has a predefined function.
Not all data blocks are required. Configure only those data blocks which your application needs. Typically the Control andStatus blocks are defined because they control most data flow. However, there are some use cases where even these blocks
are not required.
A data block is configured by defining the PLC Device type (that is, memory type), Device offset and Number of Devices
contained in the data block. If either the Device type or Number of Devices is undefined, that block will not be used. That is,no data is exchanged for that block.

86

Industrial Network Protocols
Block NameControlSupported Device Types<none>, D, W, R, ZR, M, X, Y, L, F, B

Offset NumberofDevices0655350, if type<none>
32, if bit
type2, if word
type
(readonly)

Status<none>, D, W, R, ZR, M, X, Y, L, F, B

0655350, if type<none>
32, if bit
type2, if word
type
(readonly)

PLC Input

None, D, W, R, ZR

0655350 - 960

PLC Output

None, D, W, R, ZR

0655350 - 960

CommandNone, D, W, R, ZR

0655350 - 960

CommandResultNone, D, W, R, ZR

0655350 - 960

InterfaceThis section describes the interface to the DataMan reader as seen by the PLC via SLMP Protocol. The interface model
consists of six data blocks grouped in three logical pairs:lControl and Statusl

PLC Input and PLC OutputlCommand and Command Response

Not all of the blocks are required. You may select which blocks are appropriate for your particular application. However,Control and Status will generally be included for most applications.
You can define the starting address and device type for each interface block that you choose to use in your application.
Undefined blocks will not be exchanged. For any transfer (read or write) the entire block is sent, even if only one field within
the block has changed value. The protocol implementation will minimize network use by grouping as many value changes aslogically possible into a single transfer.

87

Industrial Network Protocols

Control Block
The Control block contains bit type data. However, the block may be defined to exist in either bit or word memory in the PLC.
This block consists of the control signals sent from the PLC to the reader. It is used by the PLC to initiate actions andacknowledge certain data transfers.Control Block
Bit 7

Bit 6

Bit 5

Bit 4

Reserved

Bit 15

Bit 14

Bit 13

Bit 3

Bit 2

Bit 1

Bit 0

Results Ack

BufferResults
EnableTrigger

Trigger
EnableBit 11

Bit 10

Bit 9

Bit 8

Bit 18Bit 17

Bit 16

Initiate
String Cmd

Set User
Data

Bit 12

Reserved
Bit 23

Bit 22

Bit 21

Bit 20

Bit 19Reserved
Bit 31

Bit 30

Bit 29Bit 28Bit 27

Bit 26

Bit 25

Bit 24

SoftEvent 7

SoftEvent 6

SoftEvent 5

SoftEvent 4

SoftEvent 3

SoftEvent 2

SoftEvent 1

SoftEvent 0

Control Block Field Descriptions
Bit

Name

Description

0

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

1

Trigger

Setting this bit triggers an acquisition.
Note: The Trigger Ready bit must be set high before triggering an acquisition.

2

BufferResults
EnableWhen this bit is set, each read result set (ResultID, ResultCode, ResultLength and ResultData
fields) will be held in the Output Block until it is acknowledged. Once acknowledged, the next
set of read results will be made available from the buffer. If new read results arrive before theearlier set is acknowledged, the new set will be queued in the reader’s buffer. The reader canbuffer up to 50 and the Base Station can buffer up to 500 sets of read results. See Operation fora description of the acknowledgement handshake sequence.

3

ResultsAck

Set by the PLC to acknowledge that it has received the latest results (ResultID, ResultCode,ResultLength and ResultData fields). When the reader sees this bit transition from 0 to 1, it
clears the ResultsAvailable bit. This forms a logical handshake between the PLC and reader. If
result buffering is enabled, the acknowledgement will cause the next set of queued results to be
moved from the buffer. See section Operation for a description of the acknowledgement
handshake sequence.

4-15

Reserved

Reserved for future use.

16

SetUserData Set by the PLC to signal that new UserData is available. After reading the new UserData, thereader sets Set UserDataAck to signal that the transfer is complete. This forms a logicalhandshake between the PLC and reader.

17

Initiate
StringCmd

Set by the PLC to signal that a new StringCommand is available. After processing thecommand, the reader sets StringCmdAck to signal that the command result is available. This
forms a logical handshake between the PLC and reader.

18-23

Reserved

Future use

88Industrial Network Protocols
Bit

Name

Description

24-31

SoftEvents

Bits act as virtual discrete inputs. When a bit transitions from 0 to 1, the associated action is
executed. After executing the action, the reader sets the corresponding SoftEventAck to signalthat the action is complete. This forms a logical handshake between the PLC and reader.
Bit0: Train code
Bit1: Train match string
Bit2: Train focus
Bit3: Train brightness
Bit4: Un-Train
Bit5: Reserved (future use)
Bit6: Execute DMCC command
Bit7: Set match string

Status Block
The status block contains bit type data. The block can also be defined to exist in either bit or word memory in the PLC. This
block consists of the status signals sent from the reader to the PLC. The reader uses it to signal status and handshake certain
data transfers.
Bit 7

Bit 6

Bit 5

Bit 4

Reserved
Bit 15

Bit 14GeneralFault
Bit 23

Bit 13

Bit 12

Reserved
Bit 22

Bit 21

Bit 20

Bit 3

Bit 2

Bit 1

Bit 0

MissedAcq

Acquiring

TriggerAck

Trigger
Ready

Bit 11

Bit 10

Bit 9

Bit 8

Results
Available

Results Buffer
OverrunDecode Complete
ToggleDecoding

Bit 19Bit 18Bit 17

Bit 16

String Cmd
Ack

Set User
Data Ack

Reserved
Bit 31

Bit 30

Bit 29Bit 28Bit 27

Bit 26

Bit 25

Bit 24

SoftEventAck 7

SoftEventAck 6

SoftEventAck 5

SoftEventAck 4

SoftEvent
Ack3

SoftEventAck 2

SoftEventAck 1

SoftEventAck 0

Status Block Field Descriptions
Bit

Name

Description

0

Trigger
Ready

Indicates when the reader is ready to accept a new Trigger. The reader sets this bit when
TriggerEnable has been set and the reader is ready to accept a new trigger.

1

TriggerAck

Indicates when the reader recognizes that Trigger has been set. This bit remains set until the
Trigger bit is clear.

2

Acquiring Set to indicate that the reader is in the process of acquiring an image.

3

MissedAcq

4-7

Reserved Future use

8

Decoding Deprecated. The value of the Decoding bit is always the same as the Acquiring bit.

Indicates that the reader missed a requested acquisition trigger. The bit is cleared when the next
acquisition is issued.

89Industrial Network Protocols
Bit

Name

Description

9

Decode Indicates new result data is available. Bit toggles state (0 to 1 or 1 to 0) each time new result data
Complete becomes available.
Toggle10

Results
BufferOverrun11

Results Set to indicate that new result data is available. Bit will remain set until acknowledged with
Available ResultsAck even if additional new read results become available.

12-14

Set to indicate that the reader has discarded a set of read results because the PLC has not
acknowledged the earlier results. Cleared when the next set of result data is successfully queued
in the buffer. This bit only has meaning if result buffering is enabled.

Reserved Future use

15

GeneralFault

Set to indicate that an Ethernet communications fault has occurred. Currently only used by
SoftEvent operations. Bit will remain set until the next successful SoftEvent or until TriggerEnable
is set low and then high again.

16

Set User
Data Ack

Set to indicate that the reader has received new UserData. Bit will remain set until thecorresponding SetUserData bit is cleared. This forms a logical handshake between the PLC andreader.

17

StringCmd Ack

Set to indicate that the reader has completed processing the latest string command and that thecommand response is available. Bit will remain set until the corresponding InitiateStringCmd bit iscleared. This forms a logical handshake between the PLC and reader.

18-23

Reserved Future use

24-31

SoftEvent Set to indicate that the reader has completed the SoftEvent action. Bit will remain set until theAckcorresponding SoftEvent bit is cleared. This forms a logical handshake between the PLC andreader.
Bit0: Ack train code
Bit1: Ack train match string
Bit2: Ack train focus
Bit3: Ack train brightness
Bit4: Ack untrain
Bit5: Reserved (future use)
Bit6: Ack Execute DMCC command
Bit7: Ack set match string

Input Data Block
The Input Data block contains word type data. This is data sent from the PLC to the reader. The block consists of user
defined data that may be used as input to the acquisition/decode operation.
Word 0Word 1

Word 2..N

UserDataOption

User Data Length

User Data

90

Industrial Network Protocols

Input Data Block Field Descriptions
Word

Name

Description

0

User Data Optional user data information. Currently only used by “Set Match String” SoftEvent. Specifies which
Optioncode target to assign the string (16-bit Integer).
Bit0: Assign string to all targets
Bit1: Assign string to 2D codes
Bit2: Assign string to QR codes
Bit3: Assign string to 1D/stacked/postal codes

1

User Data Number of bytes of valid data actually contained in the UserData field.
Length2..NUser Data User defined data that may be used as an input to the acquisition/decode.

Output Data Block
The Output Data block contains word type data. This is data sent from the reader to the PLC. The block consists primarily ofread result data.
Word 0Word 1

Word 2

Word 3

Word 4

Word 5..N

Reserved

Trigger ID

Result ID

Result CodeResult Length

Result Data

Output Data Block Field Descriptions
Word

Name

Description

0

Reserved

Future use

1

Trigger ID

Trigger identifier. Identifier of the next trigger to be issued. Used to match issued triggers with result
data that is received later. This same value will be returned as the ResultID of the corresponding
read.

2

Result ID

Result set identifier. This is the value of TriggerID when the corresponding trigger was issued. Usedto match up triggers with corresponding result data.

3

Result Code Indicates the success or failure of the read that produced this result set.
Bit0: 1=Read, 0=No read
Bit1: 1=Validated, 0=Not Validated
Bit2: 1=Verified, 0=Not Verified
Bit3: 1=Acquisition trigger overrun
Bit4: 1=Acquisition buffer overrun
Bit5-15: Reserved (future use)

4

ResultNumber of bytes of valid data actually in the ResultData field.
Data Length

5..N

Result Data Result data from this acquisition/decode.

String Command Block
The String Command block contains word type data. This is data sent from the PLC to the reader. The block is used totransport string based commands (DMCC) to the reader.

91

Industrial Network Protocols
Note: Do not send string commands that change the reader configuration at the same time as reads are being
triggered. Changing configuration during acquisition/decode can lead to unpredictable results.
Word 0Word 1..N

LengthString Command

String Command Block Field Descriptions
Word

Name

Description

0

LengthNumber of bytes of valid data in the StringCommand field.

1..N

String Command

ASCII text string containing the command to execute. No null termination required.

String Command Result Block
The String Command Result block contains word type data. This is data sent from the reader to the PLC. The block is used totransport the response from string based commands (DMCC) to the PLC.
Word 0Result CodeWord 1
LengthWord 2..N
String Command Result

String Command Result Block Field Descriptions
Word

Name

Description

0

Result Code Code value indicating the success or failure of the command. Refer to the Command Reference,
available through the Windows Start menu or the DataMan Setup Tool Help menu.

1

LengthNumber of bytes of valid data in the StringCommand field.

2..N

StringCommandResultASCII text string containing the command to execute. No null termination required.

Operation
SLMP Protocol is a command/response based protocol. All communications are originated from the DataMan reader. The
reader must send read requests to the PLC at a periodic interval to detect changes in the control bits.

Scanning
To initiate actions or control data transfer, the PLC changes the state of certain bits of the Control block. Since only the reader
can initiate communications, the reader scans (that is, reads the Control block from the PLC) at a periodic rate. This rate isuser-defined.
After each scan, the reader will process changes in state of the bits in the Control block. Some state changes require
additional communications with the PLC, such as writing updated acknowledge bit values or reading a new string command.
The reader handles these additional communications automatically. Other state changes initiate activities such as triggeringa read or executing a SoftEvent. The reader performs the requested action and later reports the results.

92

Industrial Network Protocols
For any transfer (read or write), the entire interface block is sent, even if only one field within the block has changed value.
The protocol implementation will minimize network usage by grouping as many value changes as logically possible into asingle transfer.

Typical Sequence Diagram

Handshaking
A number of actions are accomplished by means of a logical handshake between the reader and the PLC: triggering,transferring results, executing SoftEvents, string commands, and so on. This ensures that both sides of a transaction know
the state of the operation on the opposite side. Network transmission delays always introduce a finite time delay in transfer
data and signals. Without this handshaking, one side of a transaction might not detect a signal state change on the otherside. Any operation that has both an initiating signal and corresponding acknowledge signal uses this basic handshakeprocedure.
The procedure involves a four-way handshake.
1. Assert signal
2. Signal acknowledge
3. De-assert signal
4. De-assert acknowledge

93Industrial Network Protocols
The requesting device asserts the signal to request an action (set bit 0 to 1). When the target device detects the signal andthe requested operation is complete, it asserts the corresponding acknowledge (set bit 0 to 1). When the requesting device
detects the acknowledge, it de-asserts the original signal (1 to 0). Finally, when the target device detects the original signal
de-asserted, it de-asserts its acknowledge (bit 0 to 1). To function correctly, both sides must see the complete assert/deassert cycle (0 to 1 and 1 to 0). The requesting device should not initiate a subsequent request until the cycle completes.

Acquisition Sequence
DataMan can be triggered to acquire images by several methods. It can be done via the SLMP Protocol by setting the Trigger
bit or issuing a trigger String Command, by DMCC (Telnet), or hardwired trigger signal. This section describes the Trigger bit
method.
On startup the TriggerEnable will be False. It must be set to True to enable triggering via the SLMP Protocol Trigger bit.
When the device is ready to accept triggers, the reader will set the TriggerReady bit to True.
While the TriggerReady bit is True, each time the reader detects the Trigger bit change from 0 to 1, it initiates a read. Make
sure that the Trigger bit is held in the new state until that same state value is seen in the TriggerAck bit. This is a necessary
handshake to guarantee that the reader detects the trigger.
During an acquisition, the TriggerReady bit will be cleared and the Acquiring bit will be set to True. When the acquisition iscompleted, the Acquiring bit will be cleared. When the device is ready to begin another image acquisition, the TriggerReadybit will again be set to True.
The reader allows acquisitions to overlap with the decoding of previous acquisitions. The Trigger Ready bit is set high after
the acquisition is complete, while decoding may still be in progress. The Decoding bit is deprecated and only mirrors the
behavior of the Acquiring bit. If trigger queuing is active or other trigger sources can interfere, the Trigger Ready bit may not
be reliable. As result, conflicting trigger overruns may occur, which are reported in Bit 3 of the Result Code word of the Output
Data Block.

To force a reset of the trigger mechanism, set the TriggerEnable to False until TriggerReady is also set to False. Then,
TriggerEnable can be set to True to re-enable acquisition.
As a special case, an acquisition can be cancelled by clearing the Trigger signal before the read operation is complete. This
allows for canceling reads in Presentation and Manual mode if no code is in the field of view. To ensure that a read is notunintentionally cancelled, make sure that the PLC holds the Trigger signal True until both TriggerAck and ResultsAvailable
are True (or DecodeComplete toggles state).

Decode / Result Sequence
After an image is acquired, it is decoded. When the decoding is complete and a result is ready to be delivered, the reader
toggles the DecodeComplete bit of the DecodeStatusRegister.
Decode results are reported asynchronously to the Output Data block. If BufferResultsEnable is set to False, then the decode
results are immediately placed into DecodeResults, and the Results Available bit is set to True.

94

Industrial Network Protocols
Note: The only way to ensure that you are not losing results is to use BufferResults. Make sure that your application canread each DecodeResult in time if you do not use BufferResultsEnable.
If ResultsBufferEnable is set to True, the new results are queued in a buffer and DecodeComplete is toggled. The earlier read
results remain in the Output Data block until the PLC acknowledges them. After the acknowledgment handshake, if there are
more results in the queue, the next set of results will be placed in the Output Data block and ResultsAvailable is set to True.

Results Buffering
There is an option to enable a queue for read results. If enabled, this allows a finite number of sets of result data to be queued
up until the PLC has time to read them. This is useful to smooth out data flow if the PLC slows down for short periods of time.
In general, if reads are occurring faster than results can be sent out, the primary difference between buffering or not buffering
determines which results get discarded. If buffering is not enabled, the most recent results are kept and the earlier result,which the PLC did not read quickly enough, is lost. The more recent result overwrites the earlier result. If buffering is enabled
and the queue becomes full, the most recent results are discarded until space becomes available in the results queue.
Note: If the queue has overflowed and then buffering is disabled, there will be a greater than 1 difference between the
TriggerID and ResultID values. This difference represents the number of reads that occurred but could not be queue
because the queue was full (number of lost reads equals TriggerID - ResultID - 1). After the next read, the ResultID
value will return to the typical operating value of TriggerID - 1.

SoftEvents
SoftEvents act as “virtual” inputs. When the value of a SoftEvent bit changes from 0 to 1, the action associated with the event
is executed. When the action completes, the corresponding SoftEventAck bit will change from 0 to 1 to signal completion.
The SoftEvent and SoftEventAck form a logical handshake. After SoftEventAck changes to 1, the original SoftEvent should
be set back to 0. When that occurs, SoftEventAck will automatically be set back to 0.
WARNING: Do not execute SoftEvents that change the reader configuration at the same time that reads are being
triggered. Changing configuration during acquisition/decode can lead to unpredictable results.

95

Industrial Network Protocols
Note: The “ExecuteDMCC” and “SetMatchString” SoftEvent actions require user supplied data. This data must be
written to the UserData and UserDataLength area of the Input Data block prior to invoking the SoftEvent. Since both ofthese SoftEvents depend on the UserData, only one may be invoked at a time.

String Commands
The DataMan SLMP Protocol implementation includes a String Command feature. This feature allows you to execute stringbased DMCCs over the SLMP protocol connection. The DMCC is sent to the reader through the String Command block. The
DMCC result is returned through the String Command Result block. Initiating a command and notification of completion isaccomplished by signaling bits in the Control and Status blocks.
To execute a DMCC, the command string is placed in the data field of the String Command block. The command string
consists of standard ASCII text. The same command format is used for a serial (RS-232) or Telnet connection. The string
does not need to be terminated with a null character. Instead, the length of the string (that is, the number of ASCII characters)
is placed in the length field of the String Command block.
After executing the DMCC, the result string is returned in the String Command Result block. Similar to the original command,
the result string consists of ASCII characters in the same format that is returned through a serial or Telnet connection. Also,
there is no terminating null character. Instead the length of the result is returned in the Command String Result length field.
The Command String Result block also contains a numeric result code. This allows you to determine the success or failure of
the command without having to parse the text string. The values of the result code are defined in the DMCC documentation.

General Fault Indicator
When an SLMP Protocol communication-related fault occurs, the “GeneralFault” bit will change from 0 to 1. Currently the
only fault conditions supported are SoftEvent operations. If a SoftEvent operation fails, the fault bit will be set. The fault bit willremain set until the next successful SoftEvent operation, or, until TriggerEnable is set to 0 and then back to 1.

ExamplesIncluded with the DataMan Setup Tool installer is an example PLC program created with Mitsubishi (GX Works2) software.
This program demonstrates the DataMan ID readers’ capabilities and proper operation. You can do the same operations byusing more advanced features and efficient programming practices with Mitsubishi PLCs. For demonstration purposes, thesample program is used.

Function
The example application demonstrates the following operations:
1. Triggering a read
2. Getting read results
3. Executing string commands (DMCC)
4. Executing SoftEvent operations

96

Industrial Network Protocols
a. Train codeb. Train match stringc. Train focus
d. Train brightnesse. Un-train
f. Execute DMCC
g. Set match string
The “Main” program contains a PLC ladder rung to invoke each of these operations. The operation is invoked by toggling thecontrol bit on the rung from 0 to 1. This invokes the associated subroutine to perform the operation. When the operation iscomplete, the subroutine sets the control bit back to 0.

Triggering a Read
The example provides two trigger options; “Continuous Trigger” and “Single Trigger”. As the name implies, enabling the“Continuous Trigger” bit will invoke a continuous series of read operations. Once enabled, the “Continuous Trigger” control
bit will remain set until you disable it. The “Single Trigger” control bit invokes a single read operation. This control bit willautomatically be cleared when the read is completed.
Primarily, the trigger subroutine manages the trigger handshake operation between the PLC and the reader. The control
Trigger bit is set, the PLC waits for the corresponding TriggerAck status bit from the reader, and the control Trigger bit isreset. Refer to a description of handshaking in section Operation.
The trigger subroutine contains a delay timer. This is not required for operation. It exists simply to add an adjustable artificial
delay between reads for demonstration purposes.

Getting Read Results
For this example the operation of triggering a read and getting read results were intentionally separated. This is to support thesituation where the PLC is not the source of the read trigger. For example, the reader may be configured to use a hardware
trigger. In such a case, only the get results subroutine would be needed.
Like the triggering subroutine, the get results subroutine manages the results handshake operation between the PLC and thereader. However, it also copies the result data to internal storage. The routine waits for the ResultsAvailable status bit tobecome active, it copies the result data to internal storage, and then executes the ResultsAck handshake. Refer to a
description of handshaking in section Operation.
The read result consists of a ResultCode, ResultLength, and ResultData. Refer to section Output Data Block Field
Descriptions for details of the ResultCode values. The ResultLength field indicates how many bytes of actual result data exist
in the ResultData field. The subroutine converts this byte length to word length before copying the results to internal storage.
The get results subroutine gathers read statistics: number of good reads, number of no-reads, and so on. This is not requiredfor operation. It is simply for demonstration purposes.

97Industrial Network Protocols
Execute String Commands (DMCC)
The string command feature provides a simple way to invoke DMCC commands from the PLC. The command format andcommand result format is exactly identical to that used for serial or Telnet DMCC operation.
This subroutine copies an example DMCC command (||>GET CAMERA.EXPOSURE) to the String Command block andthen manages the string command handshake operation between the PLC and the reader to invoke the command andretrieve the command result. Any valid DMCC command may be invoked with this mechanism. Refer to the DataMan
Command Reference document available through the Windows Start menu or the DataMan Setup Tool Help menu.

Execute SoftEvents
SoftEvents are used to invoke a predefined action. Each SoftEvent is essentially a virtual input signal. Each of the SoftEvent
subroutines manages the handshake operation between the PLC and the reader to invoke the predefined action. The
associated action is invoked when the SoftEvent bit toggles from 0 to 1. The subroutine then watches for the associated
SoftEventAck bit from the reader which signals that the action is complete. For a description of handshaking, see section
Operation.
Note: The “Execute DMCC” and “Set Match String” SoftEvents make use of the Input Data block. The subroutine forthese two events copies the relevant data into the User Data fields of the Input Data block and then invokes the User
Data subroutine to transfer the data to the reader. The actual SoftEvent action is invoked only after the user data istransferred. The user data needs to be transferred before invoking either of these events.

98Industrial Network Protocols
Note: The “Train Match String” SoftEvent only prepares the training mechanism. The actual training occurs on the next
read operation. Therefore, a trigger must be issued following “Train Match String”.

99Industrial Network Protocols

ModbusTCP
Modbus is an application layer protocol. It provides client/server communication between devices connected to different
types of buses or networks. Modbus is a request/response protocol, and its services are specified by using function codes.
Modbus TCP provides the Modbus protocol using TCP/IP. System port 502 is reserved for Modbus communication. It uses
standard Ethernet hardware and software to exchange I/O data and diagnostics. DataMan provides Modbus TCP server
functionality only.
By default, DataMan has the Modbus TCP protocol disabled. The protocol can be enabled in the Setup Tool, via DMCC, or byscanning a configuration code.
Note: If you have a wireless DataMan reader, see section Industrial Protocols for the Wireless DataMan on page 127

DMCC
The following commands can be used to enable/disable Modbus TCP. The commands can be issued via RS-232 or Telnet
connection.
Note: Use a third party Telnet client such as PuTTY to communicate with your DataMan reader.
Enable:||>SET MODBUSTCP.ENABLED ON||>CONFIG.SAVE||>REBOOT
Disable:||>SET MODBUSTCP.ENABLED OFF||>CONFIG.SAVE||>REBOOT

Reader Configuration CodeScanning the following reader configuration codes enables/disables Modbus TCP for your corded reader.
Note: You must reboot the device for the change to take effect.
Enable:Disable:Scanning the following reader configuration codes enables/disables Modbus TCP for your DataMan 8000 Base Station.
Note: You must reboot the device for the change to take effect.

100Industrial Network Protocols
Enable:Disable:Setup Tool
Modbus TCP can be enabled by checking Enabled on the Industrial Protocols pane’s Modbus TCP tab. Make sure to savethe new selection by choosing “Save Settings” before disconnecting from the reader.
Note: You must reboot your reader for the new settings to take effect.

Modbus TCP Handler
Modbus TCP on DataMan is implemented as a server type device. All communication is initiated by the PLC in the form of
read and write requests. The PLC acts as a client which actively sends read and write requests.

Getting Started
By default, Modbus TCP is not enabled on the DataMan reader. The protocol must be enabled and the protocol configuration
parameters must be set to correctly interact with a PLC. Protocol configuration is accomplished via the DataMan Setup Tool.
In the Setup Tool's Communications application step's Ethernet tab, check Modbus TCP to enable this industrial protocol.

101Industrial Network Protocols

Make sure to save the new selection by clicking the Save Settings button in the upper toolbar before disconnecting from thereader.
Note: The new settings take effect only after the reader is rebooted.

Network Configuration
The network configuration defines all the information that the DataMan reader needs to establish a connection with a PLC. In
most cases the default values may be used and no changes are need.
Name

Default

Range

Description102Industrial Network Protocols
Host Port

502

Fixed

Port number where Modbus TCP can be accessed on this reader.

Max Connections

3

1-6

Maximum number of simultaneous Modbus TCP connections.

Idle Timeout(seconds)

120

1-3600Timeout period after which the Modbus TCP connection will beclosed. If no traffic is received on a Modbus TCP connection for thisamount of time, the connection will automatically be closed.

String byte swap

False

True / False

String byte swap enable. If set to True, bytes within each registerthat forms a string will be swapped.

Holding Register
Only Mode

False

True / False

Holding Register Only Mode enable. If set to True, all data blocks will
be mapped to the Holding Register space.

Data Block Configuration
The data block configuration defines the data that will be exchanged between the DataMan reader and the PLC. Six data
blocks are available. Each block has a predefined function.
DataMan only supports Modbus TCP server operation. For standard server operation, only two configuration options exist.
By default the ‘Control’ and ‘Status’ data blocks are located in bit address space (Coil and Discrete Input). If needed, one orboth of these data blocks may be redefined to exist in register address space (Holding Register and Input Register). All otherdata block configurations are fixed.
Standard Block Configuration
Block Name

Address Space

OffsetSchneider Form Addressing

Quantity

Control

Coil or Holding Register

0000000 – 000031
400000 – 400001

32, if coil2, if holding register

StatusDiscrete Input or Input Register0

100000 – 100031
300000 – 300001

32, if discrete input
2, if input register

PLC Input

Holding Register

2000

402000 – 404004

1 – 2005

PLC Output

Input Register

2000

302000 – 304004

1 - 2005

Command String

Holding Register

1000

401000 – 401999

1 - 1000

1000

301000 – 301999

1 - 1000

Command String Result Input Register

Note: The 6 digit 0-based Schneider representation is used here.
DataMan also supports an alternate block configuration. A number of PLCs can only access the ModbusTCP ‘Holding
Register’ address space. The alternate 'Holding Register Only' configuration exists to accommodate these PLCs. In thisalternate configuration, all reader input and output data is mapped to the ModbusTCP ‘Holding Register’ address space. To
enable this alternate mode, perform one of the following options:l

Check the “Holding Register Only” box on the ModbusTCP configuration screen.

l

Use the DMCC, which switches on or off the alternate mode (Holding Register Only mode).

Enable:||>SET MODBUSTCP-HOLDING-ONLY ON

Disable:103

Industrial Network Protocols||>SET MODBUSTCP-HOLDING-ONLY OFFlscan the Reader Programming Codeslfor the wireless reader

Enable:lDisable:for the corded reader

Enable:Disable:Holding Register Only” Block Configuration
Block Name

Address Space

OffsetSchneider Form Addressing

Quantity

Control

Holding Register

0400000 – 400001

2

StatusHolding Register

5000

405000 – 405001

2

PLC Input

Holding Register

2000

402000 – 404004

1 – 2005

PLC Output

Holding Register

7000

407000 – 409004

1 – 2005

Command String

Holding Register

1000

401000 – 401999

1 – 1000

Command String Result

Holding Register

6000

406000 – 406999

1 – 1000

Note: The 6 digit 0-based Schneider representation is used here.

InterfaceThis section describes the interface to the DataMan reader as seen by the PLC via Modbus TCP. The interface model
consists of 6 data blocks grouped in 3 logical pairs:lControl and Statusl

Input Data and Output DatalString Command and String Response

Control Block
The Control block contains bit type data. This block consists of the control signals sent from the PLC to the reader. It is usedby the PLC to initiate actions and acknowledge certain data transfers.

104

Industrial Network Protocols
Bit 7

Bit 6

Bit 5

Bit 4

Reserved

Bit 15

Bit 14

Bit 13

Bit 3

Bit 2

Bit 1

Bit 0

Results Ack

BufferResults
EnableTrigger

Trigger
EnableBit 11

Bit 10

Bit 9

Bit 8

Bit 18Bit 17

Bit 16

Initiate
String Cmd

Set User
Data

Bit 12

Reserved
Bit 23

Bit 22

Bit 21

Bit 20

Bit 19Reserved
Bit 31

Bit 30

Bit 29Bit 28Bit 27

Bit 26

Bit 25

Bit 24

SoftEvent 7

SoftEvent 6

SoftEvent 5

SoftEvent 4

SoftEvent 3

SoftEvent 2

SoftEvent 1

SoftEvent 0

Control Block Field Descriptions
Bit

Name

Description

0

Trigger Enable

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

1

Trigger

Setting this bit triggers an acquisition. Note that the Trigger Ready bit must be set highbefore triggering an acquisition.

2

Buffer Results
EnableWhen this bit is set, each read result (ResultID, ResultCode, ResultLength andResultData fields) will be held in the Output Block until it is acknowledged. Once
acknowledged, the next set of read results will be made available from the buffer. If newread results arrive before the earlier set is acknowledged the new set will be queued in
the reader’s buffer. The reader can buffer up to 50 and the Base Station can buffer up to
500 sets of read results. See Operation for a description of the acknowledgement
handshake sequence.

3

ResultsAck

Set by the PLC to acknowledge that it has received the latest results (ResultID,
ResultCode, ResultLength and ResultData fields). When the reader sees this bit
transition from 0 to 1 it clears the ResultsAvailable bit. This forms a logical handshake
between the PLC and reader. If result buffering is enabled, the acknowledgement willcause the next set of queued results to be moved from the buffer. See section
Operation for a description of the acknowledgement handshake sequence.

4-15

Reserved

Future use

16

SetUserData

Set by the PLC to signal that new UserData is available. After reading the new
UserData the reader sets SetUserDataAck to signal that the transfer is complete. This
forms a logical handshake between the PLC and reader.

17

Initiate
StringCmd

Set by the PLC to signal that a new StringCommand is available. After processing thecommand, the reader sets StringCmdAck to signal that the command result isavailable. This forms a logical handshake between the PLC and reader.

18-23

Reserved

Future use

105

Industrial Network Protocols
24-31

SoftEvents

Bits act as virtual discrete inputs. When a bit transitions from 0 -> 1 the associatedaction is executed. After executing the action the reader sets the corresponding
SoftEventAck to signal that the action is complete. This forms a logical handshake
between the PLC and reader.
Bit0: Train code
Bit1: Train match string
Bit2: Train focus
Bit3: Train brightness
Bit4: Un-Train
Bit5: Reserved (future use)
Bit6: Execute DMCC command
Bit7: Set match string

Status Block
The status block contains bit type data. This block consists of the status signals sent from the reader to the PLC. It is used by
the reader to signal status and handshake certain data transfers.
Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

MissedAcq

Acquiring

TriggerAck

Trigger
Ready

Bit 11

Bit 10

Bit 9

Bit 8

Results
Available

Results
BufferOverrunDecodeComplete
ToggleDecoding

Bit 19Bit 18Bit 17

Bit 16

String Cmd
Ack

Set User
Data Ack

Reserved
Bit 15

Bit 14GeneralFault
Bit 23

Bit 13

Bit 12

Reserved

Bit 22

Bit 21

Bit 20Reserved

Bit 31
SoftEventAck 7

Bit 30

Bit 29Bit 28

SoftEvent Ack SoftEvent Ack SoftEvent Ack
654

Bit 27

Bit 26

Bit 25

Bit 24

SoftEvent
Ack3

SoftEventAck 2

SoftEventAck 1

SoftEvent Ack
0

Status Block Field Descriptions
Bit

Name

Description

0

Trigger Ready

Indicates when the reader is ready to accept a new Trigger. The reader sets this bit
when TriggerEnable has been set and the reader is ready to accept a new trigger.

1

TriggerAck

Indicates when the reader recognizes that Trigger has been set. This bit will remain
set until the Trigger bit has been cleared.

2

AcquiringSet to indicate that the reader is in the process of acquiring an image.

3

Missed Acq

Indicates that the reader missed a requested acquisition trigger. The bit is cleared
when the next acquisition is issued.

4-7

Reserved

Future use

8

Decoding

Deprecated. The value of the Decoding bit is always the same as the Acquiring bit.

106Industrial Network Protocols
9

Decode Complete
ToggleIndicates new result data is available. Bit toggles state (0 -> 1 or 1 -> 0) each time
new result data becomes available.

10

Results Buffer
OverrunSet to indicate that the reader has discarded a set of read results because the PLC
has not acknowledged the earlier results. Cleared when the next set of result data
is successfully queued in the buffer. This bit only has meaning if result buffering isenabled.

11

Results Available

Set to indicate that new result data is available. Bit will remain set until
acknowledged with ResultsAck even if additional new read results become
available.

12-14

Reserved

15

General Fault

Set to indicate that an Ethernet communications fault has occurred. Currently onlyused by SoftEvent operations. Bit will remain set until the next successful
SoftEvent or until TriggerEnable is set low and then high again.

16

Set User Data Ack

Set to indicate that the reader has received new UserData. Bit will remain set until
the corresponding SetUserData bit is cleared. This forms a logical handshake
between the PLC and reader.

17

StringCmd Ack

Set to indicate that the reader has completed processing the latest string commandand that the command response is available. Bit will remain set until thecorresponding InitiateStringCmd bit is cleared. This forms a logical handshake
between the PLC and reader.

18-23

Reserved

Future use

24-31

SoftEventAck

Set to indicate that the reader has completed the SoftEvent action. Bit will remain
set until the corresponding SoftEvent bit is cleared. This forms a logical handshake
between the PLC and reader.
Bit0: Ack train code
Bit1: Ack train match string
Bit2: Ack train focus
Bit3: Ack train brightness
Bit4: Ack untrain
Bit5: Reserved (future use)
Bit6: Ack Execute DMCC command
Bit7: Ack set match string

Future use

Input Data Block
The Input Data block is sent from the PLC to the reader. The block consists of user defined data that may be used as input tothe acquisition/decode operation.
Word 0User Data Option

Word 1
User Data Length

User Data

Input Data Block Field Descriptions
Word

Name

Description

107

Word 2..NIndustrial Network Protocols
0User Data
OptionOptional user data information. Currently only used by “Set Match String” SoftEvent. Specifies whichcode target to assign the string (16-bit Integer).
Bit0: Assign string to all targets
Bit1: Assign string to 2D codes
Bit2: Assign string to QR codes
Bit3: Assign string to 1D/stacked/postal codes

1

User Data
LengthNumber of bytes of valid data actually contained in the UserData field.

2..N

User Data

User defined data that may be used as an input to the acquisition/decode.

Output Data Block
The Output Data block is sent from the reader to the PLC. The block consists primarily of read result data.
Word 0Word 1

Word 2

Word 3

Word 4

Word 5...nReserved

Trigger ID

Result ID

Result CodeResult Length

Result Data

Output Data Block Field Descriptions
Word

Name

Description

0

Reserved

Future use

1

Trigger ID

Trigger identifier. Identifier of the next trigger to be issued. Used to match issued triggers
with result data that is received later. This same value will be returned as the ResultID of
the corresponding read.

2

Result ID

Result identifier. This is the value of TriggerID when the corresponding trigger was
issued. Used to match up triggers with corresponding result data.

3

Result Code

Indicates the success or failure of the read that produced this result set.
Bit0: 1=Read, 0=No read
Bit1: 1=Validated, 0=Not Validated
Bit2: 1=Verified, 0=Not Verified
Bit3: 1=Acquisition trigger overrun
Bit4: 1=Acquisition buffer overrun
Bit5-15: Reserved (future use)

4

Result Data
LengthNumber of bytes of valid data actually in the ResultData field.

5...nResult Data

Result data from this acquisition/decode. Formatted as ASCII text with two charactersper 16-bit register. No terminating null character.

String Command Block
The String Command block is sent from the PLC to the reader. The block is used to transport string based commands(DMCC) to the reader.
Note: Do not send string commands that change the reader configuration at the same time as reads are being
triggered. Changing configuration during acquisition/decode can lead to unpredictable results.

108

Industrial Network Protocols
Word 0Word 1...nLengthString Command

String Command Block Field Descriptions
Word

Name

Description

0

Length1..NStringCommandNumber of bytes of valid data in the StringCommand field.
ASCII text string containing the command to execute. No null termination required.

String Command Result Block
The String Command Result block is sent from the reader to the PLC. The block is used to transport the response from string
based commands (DMCC) to the PLC.
Word 0Word 1ResultCode

LengthWord 2..N
String Command Result

String Command Result Block Field Descriptions
Word

Name

0

Result Code1

Length2..NStringCommandResultDescription
Code value indicating the success or failure of the command. Refer to the
Command Reference, available through the Windows Start menu or the
DataMan Setup Tool Help menu, for specific values.
Number of bytes of valid data in the StringCommand field.
ASCII text string containing the command to execute. No null termination required.

Operation
Modbus TCP is a request/response based protocol. All communications are originated from the PLC. The reader acts asserver.

Requests
To initiate actions or control data transfer, the PLC changes the state of certain bits of the Control block and sends requests
to the reader.
After each request, the reader will process changes in state of the bits in the Control block. Some state changes require
additional communications with the PLC, such as writing updated acknowledge bit values or reading a new string command.
These additional communications are handled automatically by the reader. Other state changes initiate activities such as
triggering a read or executing a SoftEvent. The reader performs the requested action and later reports the results.

109

Industrial Network Protocols

Typical Sequence Diagram

Handshaking
A number of actions are accomplished by means of a logical handshake between the reader and the PLC (triggering,transferring results, executing SoftEvents, string commands, and so on). This is done to ensure that both sides of atransaction know the state of the operation on the opposite side. Network transmission delays will always introduce a finite
time delay in transfer data and signals. Without this handshaking, it is possible that one side of a transaction might not detecta signal state change on the other side. Any operation that has both an initiating signal and corresponding acknowledge
signal will use this basic handshake procedure.
The procedure involves a four-way handshake.
1. Assert signal
2. Signal acknowledge
3. De-assert signal
4. De-assert acknowledge
The requesting device asserts the signal to request an action (set bit 0 -> 1). When the target device detects the signal andthe requested operation has completed, it asserts the corresponding acknowledge (set bit 0 -> 1). When the requesting
device detects the acknowledge, it de-asserts the original signal (1 -> 0). Finally, when the target device detects the original
signal de-asserted, it de-asserts its acknowledge (bit 0 -> 1). To function correctly both sides must see the complete
assert/de-assert cycle (0 -> 1 and 1 -> 0). The requesting device should not initiate a subsequent request until the cycle
completes.

Acquisition Sequence
DataMan can be triggered to acquire images by several methods. It can be done by setting the Trigger bit or issuing a trigger
String Command. It can also be done via DMCC command (Telnet) or hardwired trigger signal. The Trigger bit method will be
discussed here.
On startup, TriggerEnable will be False. It must be set to True to enable triggering via the Trigger bit. When the device isready to accept triggers, the reader will set the TriggerReady bit to True.

110

Industrial Network Protocols
While the TriggerReady bit is True, each time the reader detects the Trigger bit change from 0 -> 1, it will initiate a read. The
Trigger bit should be held in the new state until that same state value is seen in the TriggerAck bit (this is a necessary
handshake to guarantee that the trigger is seen by the reader).
During an acquisition, the TriggerReady bit will be cleared and the Acquiring and Decoding bits will be set to True. When theacquisition is completed, the Acquiring and Decoding bits will be cleared. When the device is ready to begin another image
acquisition, the TriggerReady bit will again be set to True.
The reader allows acquisitions to overlap with the decoding of previous acquisitions. The Trigger Ready bit is set high after
the acquisition is complete, while decoding may still be in progress. The Decoding bit is deprecated and only mirrors the
behavior of the Acquiring bit. If trigger queuing is active or other trigger sources can interfere, the Trigger Ready bit may not
be reliable. As result, conflicting trigger overruns may occur, which are reported in Bit 3 of the Result Code word of the Output
Data Block.

To force a reset of the trigger mechanism set the TriggerEnable to False until TriggerReady is also set to False. Then,
TriggerEnable can be set to True to re-enable acquisition.
As a special case, an acquisition can be cancelled by clearing the Trigger signal before the read operation has completed.
This allows for the cancellation of reads in Presentation and Manual mode if no code is in the field of view. To ensure that aread is not unintentionally cancelled, it is advised that the PLC hold the Trigger signal True until both TriggerAck andResultsAvailable are True (or DecodeComplete toggles state).

Decode / Result Sequence
After an image is acquired, it is decoded. When the decoding is complete and a result is ready to be delivered, the reader
toggles the DecodeComplete bit of the DecodeStatusRegister.
Decode results are reported asynchronously to the Output Data block. If BufferResultsEnable is set to False, then the decode
results are immediately placed into DecodeResults, and the Results Available bit is set to True.
Note: The only way to ensure that you are not losing results is to use BufferResults. Make sure that your application canread each DecodeResult in time if you do not use BufferResultsEnable.
If ResultsBufferEnable is set to True, the new results are queued in a buffer and DecodeComplete is toggled. The earlier read
results remain in the Output Data block until they are acknowledged by the PLC. After the acknowledgment handshake, if
there are more results in the queue, the next set of results will be placed in the Output Data block and ResultsAvailable is set
to True.

111

Industrial Network Protocols

Results Buffering
There is an option to enable a queue for read results. If enabled, this allows a finite number of sets of result data to be queued
up until the PLC has time to read them. This is useful to smooth out data flow if the PLC slows down for short periods of time.
Also, if result buffering is enabled the reader will allow overlapped acquisition and decode operations. Depending on theapplication this can be used to achieve faster overall trigger rates. See the Acquisition Sequence description for further
details.
In general, if reads are occurring faster than results can be transferred to the PLC, some data will be lost. The primarydifference between buffering or not buffering determines which results get discarded. If buffering is not enabled, the mostrecent results are kept and the earlier result (which was not read by the PLC quickly enough) is lost. The more recent result
will overwrite the earlier result. If buffering is enabled (and the queue becomes full) the most recent results are discarded untilroom becomes available in the results queue.
Note: If the queue overflowed and then buffering is disabled, there will be a greater than 1 difference between the
TriggerID and ResultID values. This difference represents the number of reads that occurred but could not be queued
because the queue was full (number of lost reads equals TriggerID - ResultID - 1). After the next read, the ResultID
value returns to the typical operating value of TriggerID - 1.

SoftEvents
SoftEvents act as virtual inputs. When the value of a SoftEvent bit changes from 0 to 1, the action associated with the event is
executed. When the action completes, the corresponding SoftEventAck bit changes from 0 to 1 to signal completion.
The SoftEvent and SoftEventAck form a logical handshake. After SoftEventAck changes to 1, make sure that the original
SoftEvent is set back to 0. When that occurs, SoftEventAck is automatically set back to 0.
Note: Do not execute SoftEvents that change the reader configuration at the same time that reads are being triggered.
Changing configuration during acquisition/decode can lead to unpredictable results.

112

Industrial Network Protocols
The “ExecuteDMCC” and “SetMatchString” SoftEvent actions require user supplied data. Make sure that this data is written
to the UserData and UserDataLength area of the Input Data block prior to invoking the SoftEvent. Only one SoftEvent can be
invoked at a time, because both of these SoftEvents depend on the UserData.

String Commands
The DataMan Modbus TCP Protocol implementation includes a String Command feature. This feature allows you to execute
string-based DMCCs. The DMCC is sent to the reader through the String Command block. The DMCC result is returned
through the String Command Result block. Initiating a command and notification of completion is accomplished by signaling
bits in the Control and Status blocks.
To execute a DMCC, the command string is placed in the data field of the String Command block. The command string
consists of standard ASCII text. The same command format is used for a serial (RS-232) or Telnet connection. The string
does not need to be terminated with a null character. Instead, the length of the string, that is, the number of ASCII characters,
is placed in the length field of the String Command block.
After executing the DMCC, the result string is returned in the String Command Result block. Similar to the original command,
the result string consists of ASCII characters in the same format as returned through a serial or Telnet connection. Also, there
is no terminating null character. Instead, the length of the result is returned in the Command String Result length field. The
Command String Result block also contains a numeric result code. This allows you to determine the success or failure of thecommand without having to parse the text string. The values of the result code are defined in the DMCC documentation,
available through the Windows Start menu or the Setup Tool Help menu.

General Fault Indicator
When a communication-related fault occurs, the “GeneralFault” bit changes from 0 to 1. The only fault conditions supported
are SoftEvent operations. If a SoftEvent operation fails, the fault bit will be set. The fault bit will remain set until the next
successful SoftEvent operation, or until TriggerEnable is set to 0 and then back to 1.

ExamplesIncluded with the DataMan Setup Tool installer are two example PLC programs created with CoDeSys v2.3 software. Thesesamples are designed and tested on a Wago 750-841 PLC. These programs demonstrate the DataMan ID readers’capabilities and proper operation. You can do the same operations by using more advanced features and efficient
programming practices with Wago PLCs. The examples try to show different approaches in the techniques used for thecommunication to the DataMan reader and they are better for demonstration purposes.
Note: All examples are designed to work only if the “Control” datablock is mapped to the Coil space and the “Status”
datablock is mapped to the Discrete Input space.

113Industrial Network Protocols

ApplicationLayer Example
This sample realizes a generic data transfer between the DataMan reader and the PLC. Memory areas of the “Control”,“Status” and “Output Area” are cloned in the PLC and synchronized cyclically, or as needed. Each data area is synchronizedwith its own instance of “ETHERNETMODBUSMASTER_TCP”. This causes three TCP connections to be open
simultaneously. Make sure that the Modbus TCP related setting “Maximum Connections” on the DataMan reader is set to atleast 3 for this example to work.

Function
The example application demonstrates the following operations:
1. Transfer the 32-bit “Control” register data from the PLC to the reader.
2. Transfer the 32-bit “Status” register data from the reader to the PLC.
3. Transfer “Output Data” from the reader to the PLC.
All actions are started when there is a connection to the reader.

Transferring “Control” Register Data
All data gets transferred when there is a change in the local PLC data. The local PLC data can be manipulated in thevisualization.
Note: No synchronization is implemented from the reader to the PLC, so the local PLC data can be incorrect after
building up the connection or if another Modbus TCP client manipulates the Contol register simultaneously. There is atimeout setting that can lead to a disconnect if you do not manipulate the “Control” register during this timeframe.

Transferring Status Register Data
All data gets transferred cyclically. The poll interval can be specified in the visualization.

Transferring Output Data
All data gets transferred cyclically. The poll interval can be specified in the visualization.

DataManControl Example
This sample shows in a sequential manner the steps to do to achieve one of the functions named in the following subsection.
To outline this chronological sequence, “Sequential Function Chart” is used as programming language.

Function
The example application demonstrates the following operations:
1. Triggering a read
2. Getting read results
3. Executing string commands (DMCC)
4. Executing SoftEvent operations
a. Train codeb. Train match stringc. Train focus
d. Train brightnesse. Untrain
f. Execute DMCC
g. Set match string114

Industrial Network Protocols
The “Main” program contains variables to invoke each of these operations. The operation is invoked by toggling the controlbool directly or from the visualization (red=0, green=1) from 0 to 1. This will invoke the associated subroutine to perform theoperation. When the operation 4 is complete, the subroutine will set the control bit back to 0.

Triggering a Read
The example provides a “Continuous Trigger”. As the name implies, enabling the “xTrigger” bit will invoke a continuous seriesof read operations. Once enabled, the “xTrigger” control bit will remain set until you disable it.
Primarily, the trigger subroutine manages the trigger handshake operation between the PLC and the reader. The control
Result Ack and Trigger bits are reset, the Trigger Enable bit is set, the PLC waits for the corresponding TriggerReady status
bit from the reader, and the control Trigger bit is set. Refer to a description of handshaking in section Operation.

Getting Read Results
For this example the operation of triggering a read and getting read results was intentionally separated. This is to support thesituation where the PLC is not the source of the read trigger. For example, the reader may be configured to use a hardware
trigger. In such a case, only the get results subroutine would be needed.
Like the triggering subroutine, the get results subroutine manages the results handshake operation between the PLC and thereader. The routine waits for the ResultsAvailable status bit to become active, it copies the result data to internal storage, andthen executes the ResultsAck handshake. Refer to a description of handshaking in section Operation.
The read result consists of a ResultCode, ResultLength, and ResultData. Refer to section Output Data Block Field
Descriptions for details of the ResultCode values. The ResultLength field indicates how many bytes of actual result data exist
in the ResultData field. The subroutine converts this byte length to word length before copying the results to internal storage.

Execute String Commands (DMCC)
The string command feature provides a simple way to invoke DMCCs from the PLC. The command format and command
result format is exactly identical to that used for serial or Telnet DMCC operation.
This subroutine copies an example DMCC (||>GET DEVICE.TYPE) to the String Command block and then manages thestring command handshake operation between the PLC and the reader to invoke the command and retrieve the command
result. Any valid DMCC command may be invoked with this mechanism. Refer to the DataMan Command Reference
document available through the Windows Start menu or the Setup Tool Help menu.

Execute SoftEvents
SoftEvents are used to invoke a predefined action. Each SoftEvent is essentially a virtual input signal. Each of the SoftEvent
subroutines manages the handshake operation between the PLC and the reader to invoke the predefined action. The
associated action is invoked when the SoftEvent bit toggles from 0 to 1. The subroutine then watches for the associated
SoftEventAck bit from the reader which signals that the action is complete. For a description of handshaking, see section
Operation.
Note: The “Execute DMCC” and “Set Match String” SoftEvents make use of the Input Data block. The subroutine forthese two events copies the relevant data into the User Data fields of the Input Data block and then invokes the User
Data subroutine to transfer the data to the reader. Only after the user data is transferred is the actual SoftEvent action
invoked. It is required that the user data be transferred before invoking either of these events.
Note: The “Train Match String” SoftEvent only prepares the training mechanism. The actual training occurs on the next
read operation. Therefore, a trigger must be issued following “Train Match String”.

EtherCAT
EtherCAT is an application-level protocol used in industrial automation applications. This real-time Ethernet protocol uses
standard Ethernet hardware for wiring and special EtherCAT hardware on readers for efficient communication in a fieldbus
segment. EtherCAT aims to maximize the data rate on the physical network by sending frames always from the EtherCAT
master controller. One master device must be present on the fieldbus segment. The master device is often implemented as a
Programmable Logic Controller (PLC).

115

Industrial Network Protocols
DataMan readers support EtherCAT on readers that integrate an EtherCAT subdevice controller. Refer to the Quick Start
Guide of your reader to see whether yours contains the EtherCAT hardware and for further information, for example, whichports on the reader are used for EtherCAT communication.
To use your Ethernet card for EtherCAT virtualization as part of development or demonstrations, plug the DataMan reader
into a properly set environment. EtherCAT communication can create problems in the Ethernet settings of your hostcomputer.
By default, the reader has the EtherCAT protocol enabled. You can enable or disable the protocol through DMCC, scanning a
configuration code, or in the DataMan Setup Tool. You need to connect the DataMan Setup Tool through the secondary
Ethernet socket if you want to use DMCC or the DataMan Setup Tool.

File Over EtherCAT (FoE) Function
You can transmit files from the PLC to the reader over EtherCAT. The following file extensions are supported:
File
Extension

File Type

Comments.bin.gz

FirmwareupdateThe reader does not reboot automatically to apply the update. You have to reboot the reader
manually, or using EXECUTE DMCC SoftEvent. The reader is not operational during the
update.

.cdc

Devicebackup

You must manually reboot the EtherCAT reader to apply the backup files. This is different from
non-EtherCAT DataMan readers, which restart automatically.
If you do not reboot the reader, the old state persists. You can reboot the reader with the
Execute DMCC SoftEvent.

.cfg

Deviceconfiguration

Does not require a reboot.

Note:
l

If you have more than one readers connected in a ring topology, the configuration can break when you reboot
more than one readers at the same time.

lCertain PLCs can remove the file extension when you upload these files through FoE. Always make sure thatthe file extensions are correct.

l

You can find the .cfg and .cdc files by unzipping the .DMB file that the DataMan Setup Tool produces whenexporting a reader configuration.

DMCC
You can use the following commands to enable or disable EtherCAT:
Enable:||>SET ETHERCAT.ENABLED ON||>CONFIG.SAVE||>REBOOT
Disable:||>SET ETHERCAT.ENABLED OFF||>CONFIG.SAVE||>REBOOT

116

Industrial Network Protocols
You can issue these commands through RS-232 or Telnet connection. Use a third-party Telnet client, such as PuTTY, tocommunicate with your DataMan reader.

Reader Configuration CodeScanning the following reader configuration codes enables or disables EtherCAT for your reader.
Note: You must reboot the reader for the change to take effect.

EnableDisableSetup Tool
1. Open Setup Tool to discover the reader.
Note: The reader must be in the subnet.
2. If the reader appears as misconfigured, select the reader and click Repair & Support to change the misconfigured IP
address to the desired static IP.
Note: The reader must have a properly configured IP address for connecting to the DataMan Setup Tool.
3. Click Connect to connect to the reader.
4. Navigate to the Communications application step.
5. Enable EtherCAT under the Ethernet tab.
6. Reboot the reader.

117

Industrial Network Protocols

Getting Started
Preparing to use EtherCAT involves the following main steps:l

Make sure that you have the development environment of your EtherCAT master device installed, for example,
TwinCAT 3 in case of a Beckhoff PLC.

l

Set up the development environment software tool so that it recognizes your DataMan reader.

lInstall the ESI (EtherCAT Slave Information) file.

Object Model
Service Data Object (SDO)
The EtherCAT implementation on DataMan consists of the following Service Data Objects:lControll

Statusl

Inspection Result HeaderlInspection Results118

Industrial Network ProtocolslSoftEventl

SoftEvent AcklUser Data

Note: By default, all of these objects are mapped to Process Data Objects (PDOs). Writing to SDOs have no effect if thevalues are directly overwritten by PDO data. If you want to use them as SDOs, please remove the PDO mapping
beforehand.

Control Object
Controls the reader. This object consists of data sent from the PLC to the DataMan reader.
Index: 7000
Total size: 1 byte
Bit

Name

0

TriggerEnable

1

Trigger

Description
Enables triggering through EtherCAT. Clearing this bit disables triggering.
Triggers an acquisition when the following conditions are met:l

Trigger Enable is setl

No acquisition is currently in progressl

The reader is ready to trigger

119

Industrial Network Protocols
2

ResultsBufferEnable

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 ofresults are pulled from the queue, made available in the Result Data module, eachtime the current results are acknowledged.
The reader will respond 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 andResults Available will be set True.
If results buffering is not enabled newly received read results will simply overwrite thecontent of the Result Data module. The reader can buffer up to 50 and the basestation can buffer up to 500 sets of read results.

3

ResultsAck

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.

4-7

Reserved

Reserved for future use.

Status Object
Indicates the current reader status. This object consists of data sent from the DataMan reader to the PLC.
Index: 6000
Total size: 2 bytes
Bit

Name

Description

0

TriggerReady

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.

1

TriggerAck

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.

2

Reserved

TBD

3

AcquisitionError

4-7

Reserved

Reserved for future use.

8

Decoding

Set while decoding an image.

9

DecodeComplete

Toggled on the completion of a decode operation when the new results are madeavailable (0 to 1 or 1 to 0).

10

ResultBufferOverrun

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.

11

ResultsAvailable

12

GeneralFault

13-15

Reserved

Indicates that the reader was unable to successfully trigger an acquisition. Cleared
when the next successful acquisition occurs.

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.
Indicates that a fault has occurred, for example, a SoftEvent Set Match String or
Execute DMCC error has occurred.
Reserved for future use.

Note: The AcquisitionError bit in the Status SDO will only be set if an acquisition triggered from the Control SDO could
not get executed.

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

120

Industrial Network Protocols
Index: 6002
Total size: 3 words
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

Inspection ResultCode

Indicates the success or failure of the read that produced these results (16-bit
integer).
Bit

Description

0

Read

1

Validated

2

Verified3

Acquisition trigger overrun

4

Acquisition buffer overflow

5-15

Reserved

Inspection Results Object
Read result data sent from a reader to a PLC.
Index: 6003
Total size: 31 bytes
Byte

Name

Description

0...1

Result Length

Actual number of bytes of Result Data contained in the Result Data field (16-bit
integer).

2...30Result Data

Decoded read result data (array of bytes).

SoftEvent Object
Used to initiate a SoftEvent.
Note: There is another object called SoftEvent Ack for data sent by the reader to acknowledge completion of the events
issued with this object.
Index: 7001
Total size: 1 byte
Data written from the PLC to the reader:
Bit

Name

0

Train Code1

Train Match String

2

Train Focus

3

Train Brightness

4

Untrain

Description
Transition from 0 to 1 invokes the Train Code operation.
Transition from 0 to 1 invokes the train match string operation.
Transition from 0 to 1 invokes the train focus operation.
Transition from 0 to 1 invokes the train brightness operation.
Transition from 0 to 1 invokes the untrain operation.

121

Industrial Network Protocols
5

Reserved

Reserved for future use.

6

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.

7

Set Match String

Transition from 0 to 1 invokes the set match string operation. You must first placematch string data in User Data before invoking this event.

SoftEvent Ack Object
Used to acknowledge completion of a SoftEvent.
Note: There is another object called SoftEvent for data sent by the PLC to initiate the events acknowledged with thisobject.
Index: 6001
Total size: 1 byte
Data written from the reader to PLC:
Bit

Name

Description

0

Train Code Ack

1Train Match String Ack

2

Train Focus Ack

3

Train Brightness Ack

4

Untrain Ack

Indicates that the Untrain operation is complete.

5

Reserved

Reserved for future use.

6

Execute DMCC Ack

Indicates that the Execute DMCC operation is complete.

7

Set Match String Ack

Indicates that the Set Match String operation is complete.

Indicates that the Train Code operation is complete.
Indicates that the Train Match String operation is complete.
Indicates that the Train Focus operation is complete.
Indicates that the Train Brightness operation is complete.

User Data Object
Data sent from a PLC to a reader to support acquisition, decode and other special operations. Currently this object is onlyused to support the Execute DMCC and Set Match String SoftEvents.
Index: 7002
Size: 31 bytes
Byte

Name

0...30User Data

Description
Data sent from the PLC to the reader to support acquisition, decoding, and otherspecial operations (array of bytes).
Note: Requires a \0 termination character.
Note: For the Set Match String SoftEvent, the pattern is applied to all
symbologies.

Process Data Object (PDO)
The following mapping is active by default:
PDO

SDO

122

Industrial Network Protocols
TxPDO1

StatusTxPDO2

SoftEventsAck

TxPDO3

TriggerID
ResultID
ResultCodeTxPDO4InspectionResults

RxPDO1

Control

RxPDO2

SoftEvents

RxPDO3

UserData

Operation
SoftEvents
SoftEvents act as “virtual” inputs. When the value of a SoftEvent bit changes from 0 to 1, the action associated with the event
is executed. When the action completes, the corresponding SoftEventAck bit will change from 0 to 1 to signal completion.
The acknowledge bit will change back to 0 when the corresponding SoftEvent bit is set back to 0.
The ExecuteDMCC and SetMatchString SoftEvent actions require user-supplied data. This data must be written to the
UserData Module prior to invoking the SoftEvent. Since both of these SoftEvents depend on the UserData, only one can be
invoked at a time.

General Fault Indicator
When a communication-related fault occurs, the GeneralFault bit will change from 0 to 1. Currently the only fault conditions
supported are SoftEvent operations. If a SoftEvent operation fails, the fault bit will be set. The fault bit will remain set until thenext successful SoftEvent operation, or, until TriggerEnable is set to 0 and then back to 1.

Acquisition Sequence
You can trigger the reader to acquire images with the following methods:l

By explicitly manipulating the Trigger bit of the Acquisition Control ModulelThrough external hardwired inputlThrough DMCC

This section describes manipulating the Acquisition Control Module bits.
On startup, the TriggerEnable bit is False. It must be set to True to enable triggering. When the reader is ready to accept
triggers, the reader sets the TriggerReady bit to True.

123

Industrial Network Protocols
While the TriggerReady bit is True, each time the reader detects the Trigger bit change from 0 to 1, it initiates a read. Make
sure that the PLC holds the bit in the new state until that same state value is seen in the TriggerAck bit. This is a necessary
handshake to guarantee that the reader detects the change.
During an acquisition, the TriggerReady bit is cleared. When the reader is ready to begin another image acquisition, theTriggerReady bit is set to True again.
If results buffering is enabled, the reader allows overlapped acquisition and decoding operations. The TriggerReady bit is set
high after the acquisition is complete but while the decoding is still in process. You can use this to achieve faster overall
trigger rates. If result buffering is not enabled, the TriggerReady bit remains low until both the acquisition and decode
operations are complete.

To force a reset of the trigger mechanism, set the TriggerEnable bit to False until the TriggerReady bit is also set to False.
Then, the TriggerEnable bit can be set to True to reenable acquisition.
As a special case, you can cancel an acquisition by clearing the Trigger signal before the read operation is complete. This
allows for canceling reads in Continuous and Manual mode if no code is in the field of view. To ensure that a read is notunintentionally canceled, make sure that the PLC holds the Trigger signal True until both the TriggerAck andResultsAvailable bits are True (or the DecodeComplete bit toggles state).

Decode / Result Sequence
After an image is acquired, it is decoded. When the decoding is complete and a result is ready to be delivered, the reader
toggles the DecodeComplete bit of the DecodeStatusRegister.
The Results Buffer Enable bit determines how the reader handles decode results. If BufferResultsEnable is set to False, thenthe decode results are immediately placed into DecodeResults, and the Results Available bit is set to True.
If the Results Buffer Enable bit is set to True, the new results are queued. The earlier decode results remain in the Results
Module until the client acknowledges them by setting the Results Ack bit to True. After the Results Available bit is cleared,
make sure that the client sets the Results Ack bit back to False to allow the next queued results to be placed in to the Results
Module. This is a necessary handshake to ensure the results are received by the DataMan client (PLC).

124

Industrial Network Protocols

Results Buffering
There is an option to enable a queue for decode results. If enabled, this allows a finite number of sets of result data to bequeued up until the client (PLC) has time to read them. This is useful to smooth out data flow if the client (PLC) slows down
for short periods of time or if there are surges of read activity.
If result buffering is enabled, the reader will allow overlapped acquisition and decode operations. Depending on theapplication this can be used to achieve faster over all trigger rates. In general, if reads are occurring faster than results can besent out, the primary difference between buffering or not buffering determines which results get discarded. If buffering is notenabled the most recent results are kept and the earlier result (which was not read by the PLC fast enough) is lost. The more
recent result overwrites the earlier result. If buffering is enabled and the queue becomes full, the most recent results are
discarded until space becomes available in the results queue.
Note: If the queue has overflowed and then buffering is disabled, there will be a greater than 1 difference between the
TriggerID and ResultID values. This difference represents the number of reads that occurred but could not be queued
because the queue was full (number of lost reads equals TriggerID - ResultID - 1). After the next read, the ResultID
value will return to the typical operating value of TriggerID - 1.

Long Codes Behavior with Results Buffering
During non-buffered operation, only the 29 bytes available in the Inspection Result object can store read results. If you needto read codes longer than 29 bytes, enable Results Buffering and perform the steps below. Before doing so, make sure theResultsAvailable bit in the Status object is 1 and Result length contains a longer length than bytes available in the array (29bytes).
1. Read out the 29 bytes of data.
2. Set ResultsAck bit in the Control object to 1 to acknowledge reading.
lResultsAvailable bit in the Status object goes to 0.

125

Industrial Network Protocols
3. Lower ResultsAck bit in the control object to 0 again.
l

ResultValid bit in the status object goes back to 1.

l

ResultID in the Inspection Result Header stays the same because no new result is available.

l

ResultID in the Inspection Result Header stays the same because no new result is available.

l

Result length now contains the length of the remaining data of the full code: last length - 29 bytes.

4. Read out the remaining data.
5. If not finished, continue with step 2. Don’t forget to also acknowledge the last readout, so that the next Result can bedelivered.

126

Industrial Protocols for the Wireless DataMan

Industrial Protocols for the Wireless DataMan
Special considerations must be taken into account when using any of the Industrial Ethernet protocols with DataMan wirelessreaders. Industrial protocol connections are established not between the PLC and the wireless device, but between the PLC
and the DataMan Base Station.
The DataMan wireless reader may be, at times:lpowered downlin hibernation modelphysically out of range

Automatic power down and hibernation are features that preserve power and extend the time period between recharging.
The following sections detail the necessary configurations you have to set to communicate with the DataMan Base Station(through which information is routed to the DataMan wireless reader).

Protocol Operation
Because the wireless reader can become unavailable at times, the Industrial Ethernet protocols are actually run from theBase Station. The Base Station is directly wired to the Ethernet network and is online continuously (even when the reader isunavailable). In this way the Ethernet protocol operation is not disrupted when the reader is unavailable. This results in a few
special considerations.

Ethernet Address
Because the Ethernet protocols are run from the Base Station, you must use the Base Station Ethernet address when
configuring the protocol. For example, when configuring EtherNet/IP using the RSLogix5000 software package, you selectthe DM8000 reader but you must enter the IP address of the Base Station (not the reader). The PLC using the protocol must
communicate with the Base Station.

PLC Triggering
Because the wireless reader can become unavailable at times, triggering from the PLC is not supported on wireless readers.
The PLC will receive all read results triggered from the reader. Also, SoftEvents and DMCC commands are supported (whenthe reader is available).

SoftEvents
SoftEvents triggered from the PLC are supported. However, these events will fail if the reader is unavailable. Such a failure
will be signaled by the ‘General Fault’ bit.
Note: Some operations assigned to SoftEvents are in general not supported on any handheld DataMan readers (forexample, ‘Train Code’, ‘Train Focus’, ‘Train Brightness’). Unsupported operations will also result in the ‘General Fault’signal being set.

DMCC
DMCC commands issued from the PLC are supported. However, these events will fail if the reader is unavailable. Dependingon which Industrial Ethernet protocol is in use, the failure will be signaled either with the ‘General Fault’ signal or an error
status return code. The new DMCC error return code ‘105’ has been established to signal that the reader is unavailable.

127

Industrial Protocols for the Wireless DataMan
Note: When issuing DMCC commands from the PLC to a wireless reader, do not change the DMCC response format(that is, do not issue the command ‘COM.DMCC-RESPONSE’). Doing this may disable DMCC operation on thewireless reader. This command can be used on non-Industrial Ethernet connections such as Telnet.

Offline Buffering
When the wireless reader is physically out of range of the Base Station, it will automatically buffer all reads. Buffer capacity
varies according to a number of factors. However, typically several hundred reads can be stored. These buffered reads arealso preserved if the reader enters hibernation (sleep mode). When the reader is brought back into range of the Base Station
the buffered reads will automatically be downloaded.
If this offline buffering situation is anticipated in the user application, then Industrial Ethernet protocol buffering should also beenabled. Protocol buffering will allow a PLC to control the rate that read results are returned to the PLC. This prevents the
PLC from becoming overwhelmed by a rapid flow of read results. Refer to the specific Industrial Protocol section of thisdocument for details of enabling and utilizing protocol buffering.
Note: The Base Station can buffer up to 500 results.

Status of Industrial Protocols
The Status field of the industrial protocols (in Setup Tool, under Industrial Protocols tab) displays the last logged message ofthe status dialog. The message will remain displayed until another message is logged. If no industrial protocol is enabled, thestatus field remains blank.
Status messages vary by protocol, and some protocols do not log any messages. See the table below for a summary of
messages for protocols that display them:Protocol/Reader
Wi-Fi readers

Modbus TCP

Message

Description

Industrial ethernet
protocols shutdown

Displayed if no protocol is running

Proxy %s connection
opening

Opening connection to Wi-Fi reader, s == connection type ("Command","Result", or "User DMCC")

Proxy %s open

Connection open, s == connection type ("Command", "Result", or "User
DMCC")

Proxy %s not open

failed to open connection, s == connection type ("Command", "Result", or"User DMCC")

Proxy %s closed

connection has been closed, s == connection type ("Command", "Result", or"User DMCC")

Modbus TCP starting... Protocol starting
Modbus TCP: Server
Setup Failed

Failed to start server

Modbus TCP running

Protocol running

Modbus TCP: Addblock%s failed

Data block configuration error

Modbus TCP control
block %s

Status of ModbusTCP data block, s == “info” or “error”

128

Industrial Protocols for the Wireless DataMan
Protocol/Reader
SLMP Protocol

Message
Opening SLMP
scannerconnection %s:%x

Description
starting SLMP connection, s==IP address, x==port number

SLMP scanner
SLMP connection established, s==IP address, x==port number
connection established%s:%x
SLMP scannerconnection %s:%xrejected

PLC has rejected the connection, s==IP address, x==port number

SLMP scannerconnection %s:%x
faultedMiscellaneous connection fault has occurred, s==IP address, x==port number

SLMP scanner poll rate Configured SLMP poll rate is set too low
set too low
SLMP scannerconnection normal%s:%x

SLMP connection has been restored, s==IP address, x==port number

SLMP Scanner control
block %s

Status of SLMP data block, s == “info” or “error”

SLMP Scanner failedtransfering '%s' block

Comm error, failed to transfer a data block, s==block name129

Copyright © 2024
Cognex Corporation. All Rights Reserved.