How To Run A Matrix300 Over PROFINET-IO (v1.1)
How To Run A Matrix300 Over PROFINET-IO (v1.1)
How To Run A Matrix300 Over PROFINET-IO (v1.1)
Matrix 300
over
PROFINET-IO
Summary
Master Revision History ..................................................................................................................2
Overview .........................................................................................................................................3
Referenced PLC Project ..............................................................................................................3
Referenced Configuration Tool ...................................................................................................3
Making a correct layout ...................................................................................................................4
Matrix300 setup with Visiset ...........................................................................................................5
Ethernet ........................................................................................................................................5
PROFINET-IO.............................................................................................................................5
Operating Mode ...........................................................................................................................7
GSDML file installation ..................................................................................................................8
Setting the HW Configuration .........................................................................................................9
Opening the sample project ...........................................................................................................11
Aligning the project and reader configurations .............................................................................12
Logic and Functional Blocks .........................................................................................................15
OB1: “DAD” FB .......................................................................................................................15
OB1: Reading Loop ...................................................................................................................16
Check the data traffic .....................................................................................................................21
(Most Common)Troubleshooting ..................................................................................................23
Overview
This document is intended to lead the user to start and practice the communication between a Datalogic
imager Matrix300 device and a Siemens S7-300/400 PLC over PROFINET-IO.
Following the simple steps explained below the user will be able to run a complete PLC project, in order
to capture barcode data and display them on his PLC.
The communication can be a “control-free” communication or handled by the Datalogic Data Flow
Control “DAD” named.
To find out more, please refer to the following documents:
• DAD FB 2.0 Instruction Manual
PLC commands
Matrix data
(i.e 192.168.0.5)
(i.e 192.168.0.1)
Simatic
(i.e 192.168.0.2)
Ethernet
First it needs to connect the reader to the communication network (i.e. 192.168.0.x).
Select “Ethernet” tab on the Parameter Setup, then “Ethernet System” and set the network parameters.
PROFINET-IO
Then it needs to enable PROFINET-IO.
On the “PROFINET IO” section of “Ethernet” tab set as following:
• Status = enabled
• Input Area Size = PLC configuration aligned (default = 64)
• Output Area Size = PLC configuration aligned (default = 8)
• Data Flow Control = PLC configuration aligned (default =
DAD Driver)
• Data Consistency = PLC configuration aligned (default =
disabled)
• Station Name = PLC configuration aligned (default =
Datalogic, now “Matrix”)
• Data TX = enabled
Operating Mode
Now it needs to select the Operating Mode for the reader.
Select “Operating Mode” tab on the Parameter Setup, then set as following:
Finally, click on “Send” button to send and save this setup into the reader.
Note:
Setting “Reading Phase ON” or “Reading Phase OFF” to a fieldbus activates the I/O Control making byte 0 of I/O
Data Exchange Area reserved for control operations and not available for data exchange (ref. section
“AB 0: I/O byte” of pag.18).
Open the Hardware configuration and select “Install new GSD” in “Tools” tab.
From that local directory select the file: GSDML-V2.1-Datalogic-Matrix-PNIO-20140214 then confirm
the loading.
After the installation has completed, following 3 new nodes and related icons
- Matrix210
- Matrix300
- Matrix410
appear in the PLC HW catalogue under the folders:
PROFINET IO/Additional Field Devices/Sensors/Datalogic Matrix Readers
and
PROFINET IO/Additional Field Devices/Sensors/Datalogic Matrix Readers/Migration Module1
1
Select “Migration” nodes for Controller (PLC) not supporting the extended PROFINET-IO diagnostic
Rev. 1.1 27/02/2014
DATALOGIC AUTOMATION Pag. 9 of 23
Datalogic GSDML file automatically controls the right position of the I/O modules, avoiding incorrect
positions and showing specific warning messages.
The involved PLC is a Siemens S7 PLC, the fieldbus in use is PROFINET-IO; anyway, this project can
be easily adjusted in order to run over PROFIBUS; a simple modification on the HW configuration of the
PLC project achieves this goal.
This table sets the sw configuration of the PLC project: these values MUST match with the reader
configuration and with the PLC HW configuration.
Following the table items to check and match (look at the red arrows on the right side of the table):
1. INPUT field area first byte number
The current value must match the INPUT area starting address in the HW configuration
6. Consistency Mode
The current value must match the reader configuration:
• DAD_Cfg.Consistency = FALSE Data Consistency = Disabled
DAD block instance implements the data flow control; it can be used to handle the communication
between PLC and Matrix device.
Remember: in Matrix setup must be “Ethernet/Profinet IO/ Data Flow Control = DAD Driver”.
refer to the Alarm- and Troubleshooting- tables to analyze the issue; then activate the “Alarm_Reset”
input to clear it.2
First, it needs to provide a trigger to the device in order to start the reading phase.
This project is able to provide a logical trigger by a PLC bit; see segments 4 and 5 of OB1:
2
Refer to the “DAD FB 2.0 Instruction Manual”
Rev. 1.1 27/02/2014
DATALOGIC AUTOMATION Pag. 17 of 23
These program segments implement an endless cycle, which set and reset the “Phase_ON” signal, it
mapped on the M7.7 bit of the PLC memory.
M7 byte is mapped on the first byte of the Output area, it means this bit acts as trigger bit for the device
over the fieldbus.
The active period of the trigger is controlled by the T1 timer, its value is currently set to 2 seconds.
The user can freely modify the timing, if needed.
A VAT table “ReadingLoop_Control” named is also available to control the reading loop (see below)
Data flow control (DAD) enabling is NOT mandatory to run this sample PLC project.
It’s also possible to start a “control-free” communication, disabling DAD both on the reader setup and
on DB101 Configuration Data Block.
The project segment n.6 (see below) allows the reading loop anyway.
If the device has been correctly placed in front of an enabled bar code, an endless reading session starts
to capture data then forward them to the PLC over PROFINET- IO.
Here above a snapshots of the Input table during the I/O handshake.
Note that:
1. EB 0: I/O byte : it is reserved for the I/O control. See “Important note” of pag.6 to find out more.
o EB 3: length byte = 59, showing the node sent 59 bytes to the PLC
3. EB 4…..: data bytes: data string the device sent to the PLC. These data are also stored into the
data block DB105 “DAD_Read” named.
Here above a snapshots of the Output table during the I/O handshake.
Note that:
1. AB 0: I/O byte
PLC handles this byte to answer the node, to acknowledge the received data string. Note that the
current value is 81(hex) (1 0 0 0 0 0 0 1 binary), it means:
• Bit 7 = 1: DAD mark
3. M6.0: DAD_Enable
“TRUE” value shows DAD data flow control is running. Set/reset this flag to enable/disable DAD
(Most Common)Troubleshooting
Trouble Cause Action
Error code = 100 Configurations mismatch Align DB101 parameters, reader
parameters and PLC HW
configuration.
Error code = 100 even Incorrect checksum detected on Enable/disable the “Alarm_reset”
after configuration aligning the initial PLC check control line
Disable/enable the “DAD_enable”
control line
Switch on/off the reader
Data Flow Control Lost synchronization of PLC and Enable/disable the “ResyncCmd”
handshake not running reader control line
Data traffic stopped, Overwrite Protection enabled Disable Overwrite Protection in
Rx_Warning ON DB101 block