How-to
Configuring SAFEX-C.1x diagnosis on ctrlX CORE over EtherCAT
Short answer
To read SAFEX-C.1x status in a ctrlX CORE PLC over EtherCAT, enable Additional diagnostic in the SAFEX-C.1x properties (plus Add Non-Cyclic Data for FB-Type2), import SAFEX_Diagnosis_1V04.export or SAFEX_Diagnosis_2V00.export, and call the block with the start address of the mapped Functional Outputs, for example ADR(%IW40), with FieldbusType FALSE.

On this page
To read SAFEX-C.1x diagnosis in a ctrlX CORE PLC over EtherCAT, enable Additional diagnostic in the SAFEX-C.1x properties, import SAFEX_Diagnosis_1V04.export (FB-Type1) or SAFEX_Diagnosis_2V00.export (FB-Type2) into the ctrlX PLC project, and call the block with the start address of the mapped Functional Outputs — for example ADR(%IW40) — with FieldbusType set to FALSE, the EtherCAT default. Nothing is programmed in the safety controller; the change lives in the PLC project only. Everything below assumes ctrlX CORE as EtherCAT MainDevice and SAFEX-C.1x as EtherCAT SubDevice.
Check the EtherCAT path first #
The function block only decodes process data that is already being exchanged. Before touching diagnostic logic:
- Commission the EtherCAT segment and bring it to OP, and check power, cabling, port connections and the detected device order against the configured topology.
- Confirm the configured SAFEX-C.1x matches the connected controller and that its process-data configuration is accepted.
- Open the PLC process-data mapping, locate the SAFEX-C.1x Functional Outputs (inputs from the PLC's perspective), and watch the incoming status bytes online before adding the block.
EtherCAT being operational and the safety controller being in Run are separate checks: a controller can exchange diagnostic data while reporting a state other than Run, and a readable value in PLC memory does not prove freshness. The LiveCounter output is what proves freshness — as long as it counts, communication is OK. If your safety controller drops off the bus entirely, the failure looks different from a diagnosis-configuration problem; the 65D stop behaviour on an added EtherCAT module is covered in why a safety PLC stops with 65D when its EtherCAT module is added.
Enable the SAFEX-C.1x diagnostic options #
Both block types require Additional diagnostic activated in the SAFEX-C.1x properties. For FB-Type2, also activate Add Non-Cyclic Data. "Non-cyclic" describes the requested information, not a separate connection: the request and response still travel through the Functional Input and Functional Output interfaces already mapped over EtherCAT.
- Open the SAFEX-C.1x device properties and enable Additional diagnostic.
- For FB-Type2, enable Add Non-Cyclic Data as well.
- Apply the configuration through the engineering system's normal download workflow.
- Review the resulting process-data layout and PLC mapping — enabling these options can change the mapping, so check the final layout, not the one recorded beforehand.
The first five bytes of the Functional Outputs carry the basic diagnostic interface: Mode, LiveCounter and ErrorCode. The function block decodes that layout so your application does not have to.
Import the function block #
Pick the block by the information you need:
| Item | FB-Type1 | FB-Type2 |
|---|---|---|
| Function block | SAFEX_Diagnosis_1V04 | SAFEX_Diagnosis_2V00 |
| Import file | SAFEX_Diagnosis_1V04.export | SAFEX_Diagnosis_2V00.export |
| Basic status | Mode, state flags, LiveCounter, ErrorCode, CommunicationOK | The same basic status |
| Extra information | Basic diagnostic interface | Non-cyclic data: CRC, FW-version and more |
| Device options required | Additional diagnostic | Additional diagnostic and Add Non-Cyclic Data |
| PLC data paths | Read Functional Outputs | Read Functional Outputs and write Functional Inputs |
The documented FB-Type1 combination is firmware/FPGA 1.0.1.65/227 with ENG-Version >= 1.8.7.10917, the official version since April 2026. Check those values against your installed controller and engineering software before choosing SAFEX_Diagnosis_1V04; for FB-Type2, use the compatibility information supplied with its export and the controller documentation.
Import steps:
- Download the block package and unzip it first — the
.exportfile must be extracted from the.zipbefore import. - Import
SAFEX_Diagnosis_1V04.exportorSAFEX_Diagnosis_2V00.exportinto the ctrlX PLC project. The FB-Type2 export also contains an optional implementation example. - Confirm the imported block, its interface and any required user-defined types (FB-Type2 uses an ENUM for the non-cyclic data) compile without errors.
Point the block at the mapped interfaces #
The block needs the start address of the mapped interface — read it from your configured I/O mapping, not from an address that happens to hold a plausible value. The SAFEX-C.1x names its interfaces from the controller's perspective: its Functional Outputs enter the PLC input image, and its Functional Inputs are written from the PLC output image.
| Interface | Direction at the PLC | Example pointer | Used for |
|---|---|---|---|
| Functional Outputs | PLC input | ADR(%IW40) | Basic status and diagnostic response |
| Functional Inputs | PLC output | ADR(%QB48) | FB-Type2 request interface (FunctionalInput) |
Worked example: FB-Type1 on a five-byte status interface #
Inputs (illustrative project values, not fixed addresses):
- Functional Outputs mapped at %IW40 in the PLC input image (read from your I/O mapping).
- FieldbusType = FALSE, because the controller sits on EtherCAT; TRUE selects PROFINET.
- One instance of SAFEX_Diagnosis_1V04, called cyclically from the PLC program.
Rule: the block takes a pointer to the start of the Functional Outputs and decodes the first five bytes into Mode, state BOOLs, LiveCounter, ErrorCode and CommunicationOK.
Arithmetic and wiring in the call:
- Connect the status input to
ADR(%IW40)— the first mapped byte of the Functional Outputs. - Leave FieldbusType at FALSE.
- Call the instance every PLC cycle so the LiveCounter can be watched for change.
Result on a healthy controller: CommunicationOK = TRUE, Mode = 4 (Run), LiveCounter incrementing each scan, ErrorCode = 0. Mode values are 1 = Init, 2 = Self-test, 3 = BusInit, 4 = Run, 5 = Stop, 8 = RunIntern, 6 = Fatal Error, 7 = Alarm.
Decision: if CommunicationOK is TRUE and the LiveCounter counts, the diagnostic path is proven and you can use Mode, the state BOOLs and ErrorCode in your application logic. If CommunicationOK stays FALSE while EtherCAT is in OP, re-check the start pointer against the current mapping and confirm Additional diagnostic is actually applied on the controller.
Watch for the known firmware defect #
SAFEX-C.1x firmware 1.0.1.45 documents error 2254: the functional inputs of a PROFINET connection do not work if there is a link behind the output. This article's path is EtherCAT, where FieldbusType stays FALSE, but if you later move the same controller to PROFINET and diagnosis stops working, check that release note before changing your PLC code.
Decision summary #
- Basic status only (Mode, LiveCounter, ErrorCode, CommunicationOK): enable Additional diagnostic, import
SAFEX_Diagnosis_1V04.export, point the block at the Functional Outputs start address, FieldbusType FALSE. - CRC and firmware information as well: enable Additional diagnostic and Add Non-Cyclic Data, import
SAFEX_Diagnosis_2V00.export, additionally connect FunctionalInput to the Functional Inputs start address such asADR(%QB48), and use NonCyclicCommand, NonCyclicResult and NonCyclicData (the example program stores all non-cyclic values in an array). Note that elements 4, 5 and 6 (CRC_PMT-) supply 0 and are not used.
Questions asked
Does anything have to be programmed in the SAFEX-C.1x itself?
No. All of the work happens in the ctrlX PLC project: the SAFEX-C.1x only needs the Additional diagnostic option (and Add Non-Cyclic Data for FB-Type2) enabled in its properties, and the diagnostic function block is imported and called in the PLC application.
What do the Mode output values of the diagnosis block mean?
Mode reports the SAFEX-C.1x device status: 1 = Init, 2 = Self-test, 3 = BusInit, 4 = Run, 5 = Stop, 8 = RunIntern, 6 = Fatal Error and 7 = Alarm. The block also breaks the fatal, alarm, RunIntern and Run states out as BOOL signals, and CommunicationOK is TRUE when communication is healthy.
What is the difference between FB-Type1 and FB-Type2?
FB-Type1 (SAFEX_Diagnosis_1V04.export) reads the five-byte basic status: Mode, LiveCounter, ErrorCode and CommunicationOK, and needs only Additional diagnostic. FB-Type2 (SAFEX_Diagnosis_2V00.export) adds non-cyclic data such as CRC and firmware version, and additionally needs Add Non-Cyclic Data enabled plus a pointer to the Functional Inputs, for example ADR(%QB48).


