Overview
This document covers the integration of a Datalogic Matrix 300N industrial 2D imager with a Siemens SIMATIC S7-1200 CPU 1215C over PROFINET IO. The Matrix 300N is a compact, IP67-rated 2D reader that exposes its read results, status flags, and control interface through PROFINET IO conformance class A or B. The S7-1215C has a built-in PROFINET interface (X1, 2-port switch) that operates as an IO controller natively, so no additional CP module, sidecar interface, or signal board is required for the scanner connection.
The integration path follows the standard PROFINET IO workflow used for any third-party IO device on a SIMATIC controller:
- Obtain the GSDML device description for the exact Matrix 300N variant and firmware revision.
- Install the GSDML in TIA Portal.
- Add the device to the device configuration of the CPU 1215C.
- Assign a unique PROFINET device name and IP address.
- Wire the scanner's I/O slot configuration (inputs, outputs, diagnostics) to the PLC's process image.
- Program the application to consume the result data and drive the trigger and control bits.
- Verify with online diagnostics, watch tables, and a live read cycle.
Direct connection is possible. The S7-1215C's X1 interface is a 2-port managed switch, so the Matrix 300N can be patched directly into the second port of the CPU with a standard Cat 5e (or higher) PROFINET cable without an external switch, provided the installation rules for cable length (≤ 100 m copper) and grounding are respected.
Prerequisites
| Item | Specification / Note |
|---|---|
| Siemens CPU | SIMATIC S7-1200 CPU 1215C, any DC/DC/DC or AC/DC/RLY variant. Firmware V4.2 or later recommended for full GSDML V2.3 support. See the Siemens S7-1200 system manual for hardware revision details. |
| TIA Portal | V15.1 or later. V16/V17 recommended for newest Datalogic GSDML revisions. Match TIA Portal version to firmware per the Siemens TIA Portal compatibility tool. |
| Datalogic scanner | Matrix 300N 2D imager with PROFINET option enabled. Confirm factory option with the supplier — PROFINET is a field-bus variant of the standard unit, not a software upgrade. See the Datalogic Matrix 300N product page for variant ordering codes. |
| GSDML file | GSDML-Vx.x-Datalogic-Matrix300N-yyyymmdd.xml (or vendor-supplied). Request from Datalogic support or download from the product support page. |
| Ethernet cabling | Cat 5e SF/UTP or higher, M12 D-coded (typical industrial form factor) or RJ45. Max segment length 100 m. Use only PROFINET-certified cable assemblies (at minimum, the green-sheathed type A cable). |
| Power supply | 24 VDC, ≥ 1 A reserved for the scanner. Matrix 300N typical consumption ≈ 0.4–0.6 A at 24 VDC depending on illumination and liquid lens option. |
| Engineering access | PC with TIA Portal, Ethernet connection to CPU 1215C PROFINET X1. Datalogic WebScan/Impact or ID-NET configuration tool recommended for scanner parameter setup. |
Hardware Topology and Wiring
The S7-1215C PROFINET interface (X1) is an integrated 2-port switch. The two RJ45 sockets are labelled X1 P1 and X1 P2, or labelled PORT_1 and PORT_2 depending on the CPU revision. Either port can be used for the engineering PC and either for the scanner — there is no upstream/downstream restriction for IO traffic on the CPU's built-in switch.
Pinout for industrial M12 D-coded PROFINET cables:
| M12 Pin | Signal | Wire color (PROFINET spec) |
|---|---|---|
| 1 | TD+ (Transmit Data +) | Yellow |
| 2 | RD+ (Receive Data +) | Orange |
| 3 | TD- (Transmit Data -) | White |
| 4 | RD- (Receive Data -) | Blue |
Power the Matrix 300N from a dedicated 24 VDC branch protected by a 2 A or 3 A slow-blow fuse. The scanner provides a power input and a power output daisy-chain; do not exceed the cumulative current per branch (typically 4 A cumulative on Datalogic readers). Ground the scanner's chassis to the cabinet ground bus with a low-impedance bond (≤ 1 Ω at the cabinet end).
GSDML File Acquisition and Installation
The GSDML (Generic Station Description Markup Language) is the XML-based device description PROFINET uses to expose a device's slots, modules, diagnostics, and parameters. TIA Portal cannot import the Matrix 300N into the device catalog without it. The Datalogic GSDML is keyed to the firmware revision of the scanner; using the wrong revision is the single most common cause of station failures on PROFINET startup.
- Identify the exact Matrix 300N part number from the device label, including the suffix that denotes the fieldbus variant.
- Visit the Datalogic product support portal and locate the GSDML file matching the part number and firmware revision. As of current releases, typical files are named
GSDML-V2.3-Datalogic-Matrix_300N-yyyymmdd.xmlorGSDML-V2.4-Datalogic-Matrix_300N-yyyymmdd.xml. - If the GSDML is not published, request it from the Datalogic sales or support channel with the part number and firmware version.
- Save the file to a known folder on the engineering PC.
- In TIA Portal:
Options > Manage general station description files (GSD). - Set the source path to the folder containing the GSDML.
- Select the GSDML row in the list and click
Install. - Wait for the import to complete and confirm the device now appears in the Hardware catalog under
PROFINET IO > Sensors > Datalogic > Matrix 300N. Restart TIA Portal if the catalog tree does not refresh.
PLC Hardware Configuration in TIA Portal
Open the project containing the S7-1215C station and double-click Device configuration on the CPU.
- From the Hardware catalog, navigate to
PROFINET IO > Sensors > Datalogic > Matrix 300N. - Drag and drop the device onto the PROFINET subnet attached to the CPU 1215C's X1 interface. TIA Portal will draw a line from the CPU's port to the new device's port.
- Right-click the device >
Properties>PROFINET interface>Ethernet addresses. Assign:- A unique PROFINET device name (for example
scanner1) — must match exactly the name loaded into the scanner at runtime. - An IP address (for example
192.168.0.10) on the same subnet as the CPU's X1 interface (default192.168.0.1, mask255.255.255.0). - A device number (PROFINET slot ID, for example 1).
- A unique PROFINET device name (for example
- Right-click the device >
Assign device name. TIA Portal will discover reachable devices and let you select the target by its MAC address. The MAC address of the Matrix 300N is printed on the device label and also retrievable via WebScan/Impact. - Open
Device viewon the Matrix 300N to insert the I/O slot modules. Typical default configuration:- Slot 0: DAP (Device Access Point) — auto-inserted, not removable.
- Slot 1:
Input: Result data(e.g., 32 bytes / 16 words). - Slot 2:
Input: Status and diagnostics(e.g., 4 bytes / 2 words). - Slot 3:
Output: Control and Trigger(e.g., 4 bytes / 2 words).
- Right-click each I/O slot >
Propertiesto enable the consistent or non-consistent (overlapped) access mode. Use consistent access for the full result buffer so that the PLC reads a snapshot of the data, not bytes that may change mid-scan. - Compile and download the hardware configuration to the CPU 1215C.
PROFINET Network and Device Name Assignment
PROFINET identifies a device on the wire by its station name, not its IP address. The CPU 1215C opens an RPC connection to the station named scanner1; if the device on the network has a different name, the connection will not establish even if the IP is correct. The name is the only mandatory PROFINET identifier; the IP is only required for IP-based services (WebScan, Impact, PDev, SNMP).
To assign the name to the physical scanner, use one of the following methods:
-
From TIA Portal: Online > Accessible nodes > select the device by MAC >
Assign PROFINET device name. Wait for the "Assignment successful" response before continuing. -
From the Datalogic WebScan/Impact configuration tool: Connect to the scanner's service interface (default IP
192.168.0.1if not yet named) and set the station name under PROFINET settings. - From the scanner's HMI or display (if equipped): Menu > Communications > PROFINET > Station name.
After the name is written, power-cycle the scanner. The PLC's online diagnostics should show:
- Device status: green check, no fault.
- Communication: established.
- Maintenance: no alarms.
I/O Slot Mapping and Data Structure
After downloading the hardware configuration, TIA Portal auto-generates the I/O addresses in the PLC's process image. With the slot plan above, a typical mapping is:
| Slot | Direction | Module | Length | Default Address |
|---|---|---|---|---|
| 0 | — | DAP | — | — |
| 1 | Input | Result data | 32 bytes | %IB100 ... %ID107 (consistent area) |
| 2 | Input | Status / diagnostics | 4 bytes | %IB108 ... %IB111 |
| 3 | Output | Control / Trigger | 4 bytes | %QB100 ... %QB103 |
Devices & networks > Matrix 300N > Device overview > I/O addresses or check the system constants view.Result data layout (typical, depends on GSDML revision; verify against the Datalogic manual for the part number in use):
| Offset (bytes) | Type | Field | Description |
|---|---|---|---|
| 0 | UINT16 | Length | Length of valid payload in bytes (excluding length field itself) |
| 2 | BYTE | Reserved | — |
| 3 | BYTE | Status | Bit 0: read OK, Bit 1: trigger active, Bit 2: no-decode, Bit 3: partial read. See Datalogic manual for full bit map. |
| 4..N | BYTE[] | Payload | Decoded barcode content, ASCII or binary per configuration |
Output control layout (typical):
| Offset (bytes) | Type | Field | Description |
|---|---|---|---|
| 0 | BOOL | Trigger | Rising edge or level-high = trigger a read cycle (configurable in WebScan/Impact) |
| 1 | BOOL | Enable | Enable the scanner (must be TRUE to read) |
| 2..3 | UINT16 | Reserved | — |
PLC Programming for Scan Data Processing
Use a structured approach: a trigger generator, a result copy block, and a string parser. The S7-1200 does not have native string handling as rich as the S7-1500, so use the standard String and Char_Array types with explicit length fields. For consistent PROFINET data, use DPRD_DAT (read) and DPWR_DAT (write) system blocks, which respect the consistent area defined in the slot configuration.
Sample SCL (Structured Control Language) function block to trigger and capture a scan result:
// SCL FB: Matrix300N_ScanCtrl
// Triggers one scan cycle and copies the result data into a STRING.
// Uses DPRD_DAT for consistent PROFINET read of the result module.
FUNCTION_BLOCK "Matrix300N_ScanCtrl"
VAR
bTrigger : BOOL; // Output to scanner control bit (Trigger)
bEnable : BOOL; // Output to scanner control bit (Enable)
bReadOK : BOOL; // Input from scanner status (ReadOK)
bNoDecode : BOOL; // Input from scanner status (NoDecode)
iResultLen : INT; // Input from scanner result length field
arrResult : ARRAY[0..31] OF BYTE; // Local copy of result buffer
sResult : STRING[32]; // Parsed result string
i : INT; // Loop index
bTriggerPulse : BOOL; // Internal one-shot trigger
END_VAR
BEGIN
// Drive outputs to scanner (these are symbolic tags tied to %QB100..%QB103)
"Matrix300N_Control".Enable := bEnable;
"Matrix300N_Control".Trigger := bTrigger;
// Pull inputs from scanner (symbolic tags tied to %IB100..%ID107 consistent area)
bReadOK := "Matrix300N_Status".ReadOK;
bNoDecode := "Matrix300N_Status".NoDecode;
iResultLen := "Matrix300N_Result".Length;
// Read the consistent result buffer using DPRD_DAT
// (LADDR := slot 1 I/O start address, RECORD := arrResult, RET_VAL := ret)
"DPRD_DAT_DB".LADDR := 100; // %I address start (replace with real)
"DPRD_DAT_DB".RECORD := arrResult;
"DPRD_DAT_DB"(REQ := TRUE);
// Convert raw bytes to STRING (assumes ASCII, length capped to 32)
sResult := '';
IF iResultLen > 0 AND iResultLen <= 32 THEN
FOR i := 0 TO iResultLen - 1 DO
sResult[i+1] := BYTE_TO_CHAR(arrResult[i+1]);
END_FOR;
END_IF;
// One-shot trigger pulse, 50 ms wide
IF bTrigger AND NOT bTriggerPulse THEN
bTriggerPulse := TRUE;
ELSIF NOT bTrigger THEN
bTriggerPulse := FALSE;
END_IF;
END_FUNCTION_BLOCK
For consistent access, the source bytes from the result module must be read with a single instruction that respects the consistent area length (DPRD_DAT or BLKMOV in TIA Portal). TIA Portal will refuse to map a multi-word consistent area directly into a tag; you must use the system block DP/PN I/O access from the slot configuration.
Trigger sequence (recommended state machine):
Recommended state machine flow:
- Set
Enable := TRUE. - Wait for
ReadOK := FALSE(scanner ready, no stale result). - Pulse
Triggerhigh for ≥ 20 ms (or match the scanner's debounce setting in WebScan/Impact). - Wait for
ReadOK := TRUE(result valid). - Read length via DPRD_DAT, copy bytes, parse string.
- Pulse
Triggerlow, clear the result, and repeat for the next read.
For acyclic data (reading identification and maintenance information or writing parameters at runtime), use the RDREC and WRREC system blocks. Index 0xAFF0 is the standard PROFINET I&M0 record; index 0x0000 returns the slot diagnostics. Acyclic communication is in addition to the cyclic IO and does not interfere with the real-time result data flow.
Verification and Commissioning
- In TIA Portal, go
Online > Go onlinewith the CPU 1215C. - Open
Online & diagnostics > PROFINET IO > Devices. The Matrix 300N should appear with a green check and status "OK". - Open a Watch Table (or the system tag table) and add the result data, status, and control tags.
- Place a test code (for example a printed Data Matrix label) in front of the scanner's optical window at the recommended read distance (typically 50–300 mm depending on lens choice).
- Set
Enable := TRUEin the watch table or via the FB. - Force a trigger pulse by setting
Trigger := TRUEfor 50 ms, then back to FALSE. - Observe the result data populating within the configured PROFINET update time (typically 1–4 ms after the read completes).
- Decode the result bytes to a string in the watch table to confirm the content matches the printed code.
Pass criteria:
- PROFINET device status: OK.
-
ReadOKtoggles TRUE on successful decode, FALSE on no-decode. - Result length field reflects the actual byte count of the decoded payload.
- Result content matches the test code.
- Trigger pulses are acknowledged within one or two PROFINET update cycles.
Troubleshooting Matrix
| Symptom | Probable Cause | Diagnostic | Fix |
|---|---|---|---|
| Device shows "Not accessible" in TIA online | PROFINET device name mismatch | Compare device name in TIA hw config with actual name in Datalogic WebScan/Impact | Re-assign the device name from TIA Portal or from the scanner's web UI |
| Device shows "Station failure" after download | GSDML revision does not match scanner firmware | Check firmware version in scanner diagnostics | Install matching GSDML or update scanner firmware to a supported version |
| Result data length is always 0 | Enable bit is FALSE in control output | Watch the control output module | Set Enable := TRUE in the FB or control word |
| Result data shows partial or corrupted bytes | Non-consistent (overlapped) access used on multi-word result | Check access mode in slot properties | Set the full module length to "Consistent" and use DPRD_DAT or BLKMOV |
| Trigger has no effect | Trigger pulse too short for the configured debounce | Check trigger debounce in scanner config | Pulse Trigger high for at least 20 ms, or match the scanner's debounce setting |
| LED on scanner shows red | Hardware fault (laser, power, optics) | Read the diagnostics slot in TIA, or check WebScan/Impact log | Power cycle, check 24 VDC, clean optics, or return for service |
| PLC cannot find device at all | Cable, port, or VLAN issue | Ping the scanner IP from the engineering PC | Replace cable, verify port LEDs, check switch VLAN config if external switch used |
| Spurious triggers or reads when idle | No-decode timeout returning to ready state on a previous trigger | Inspect the trigger state machine in the FB | Make Trigger a level-controlled state, not a momentary edge, in the scanner's PROFINET slot config |
| Result buffer returns control characters (NUL, STX, ETX) | Data formatting is binary or framed, not plain ASCII | Inspect the first 8 bytes in the watch table | Configure the scanner's output format to "Plain ASCII" in WebScan/Impact |
| Connection drops intermittently | EMC, ground loop, or cable near VFD | Check PROFINET diagnostics for error counters | Re-route cable, install EMC glands, ensure equipotential bonding |
| Station goes up but process image is all zeros | Wrong slot inserted or wrong submodule type | Compare the inserted modules in TIA with the WebScan/Impact PROFINET module list | Insert the correct input and output modules; match the module ID exactly |
| Acyclic RDREC returns STATUS=0xDE80B0xx | Index not supported by the device | Check the supported I&M and parameter indices in the GSDML | Use index 0xAFF0 for I&M0, 0xAFF1..0xAFF4 for I&M1..I&M4 |
FAQ
Does the S7-1215C need an additional module to talk PROFINET to the Datalogic Matrix 300N?
No. The S7-1215C's built-in X1 PROFINET interface is a 2-port switch that acts as an IO controller natively. No CP, signal board, or sidecar module is required for PROFINET IO communication with the Matrix 300N.
Where do I get the GSDML file for the Matrix 300N?
From the Datalogic product support portal for the exact part number and firmware revision, or directly from the Datalogic supplier. The file is named GSDML-Vx.x-Datalogic-Matrix_300N-yyyymmdd.xml and is installed in TIA Portal via Options > Manage general station description files (GSD).
Can I connect the S7-1215C directly to the Matrix 300N without a switch?
Yes. The X1 interface is a 2-port managed switch, so the scanner can be patched directly into the second port. A direct connection supports cable runs up to 100 m on Cat 5e or higher with PROFINET-certified cable.
What is the difference between the PROFINET device name and the IP address?
PROFINET identifies the device on the wire by the station name, not the IP. The CPU opens an RPC connection to the device with the configured name. The IP address is used for IP-based services (web UI, WebScan/Impact) once the connection is established. Both must be set, and the name must match exactly between the TIA Portal hardware config and the physical device.
What PROFINET update time should I use for the Matrix 300N?
For typical read applications with cycle times of 50 to 500 ms, an update time of 1 to 4 ms is appropriate. Lower update times reduce jitter but increase network load. The S7-1215C supports RT with update times from 1 ms upward; IRT is not generally required for image processing applications.
What happens if I use a GSDML that does not match the scanner firmware?
The PLC will report a station failure at PROFINET startup. The TIA online diagnostics will show the specific error code, but the device will not be reachable for cyclic IO. Always match the GSDML revision to the firmware revision printed on the scanner's device label or shown in WebScan/Impact.