Applicable scenarios for pattern behavior
ESUPs_WrPersistData_Shutdown: Perform a quick shutdown after saving persistent data (default). Standard application ensures that data is not lost and the system is securely shut down.
ESUPs_WrPersistData_CoShutdown only saves data and does not shut down. There is a more advanced power management system available externally, or it may require quick recovery after a brief power outage.
ESUP_SimediateShutdown: Immediately shut down without saving data. When the data is irrelevant or the battery level is extremely low.
ESUPS-CheckPowerStatus only checks the power status and has no action. Used for monitoring or debugging purposes.
Diagnostic technique: By reading the eState output, the UPS status can be determined. For example, eSUP1_PowerOK indicates that the power supply is normal, and eSUPs_WritePersistentData indicates that critical data is being written. The health (percentage) of supercapacitors can be viewed in real-time through nCapacity.
On site fault diagnosis: LED status code and K-Bus analysis
When there is an abnormality in the I/O system connected to CX52x0, the diagnostic LED of the power terminal is the primary tool for locating the problem without software. CX52x0 automatically recognizes the connected bus system (K-bus or E-bus) and displays the corresponding status.
3.1 K-Bus mode diagnosis (connecting KL series bus terminals)
When the system is connected to traditional bus terminals, focus on the K-BUS RUN and K-BUS ERR LEDs.
Normal operation: K-BUS RUN is always green and on, while K-BUS ERR is off.
Error indication: The K-BUS ERR red LED will flash at a specific frequency to convey error codes and parameters. The error code starts with a fast flashing, followed by a slow sequence; The incorrect parameter follows closely behind.
K-BUS ERR LED Flashing Code Diagnosis Table
Error code, error parameter description, and root cause solution
Continuous irregular flashing - EMC interference: poor power quality or poor grounding. Check if there are any spikes in the 24V power supply; Implement EMC rectification (such as installing filters and ensuring that the shielding layer is grounded).
3 pulse 0 K-Bus command errors: Bus terminal not detected, or the first terminal is damaged. Check if the terminal is inserted; Use the "splitting method" to identify damaged terminals.
4 pulse 0 data interruptions (immediately after the power module). Check if terminal KL9010 is installed.
Data interruption (after terminal n): Poor or damaged connection of terminal n+1. Check and re plug the n+1 terminal, and replace it if necessary.
Communication error between pulse n and the register of terminal n. Replace the bus terminal with index n.
6 pulse 0 initialization errors. Replace the embedded PC.
1/8 internal data error. Perform hardware reset (power off and restart).
7 pulse 0 process data length mismatch: The actual configuration is inconsistent with the software configuration. Check if the terminal model configured in the TwinCAT project matches the actual installation.
Note: Some K-Bus errors may not immediately turn off the K-BUS ERR light after physical elimination. At this point, it is necessary to perform a complete power-off and power on operation on the power terminal.
3.2 E-Bus Mode Diagnosis (Connect EL Series EtherCAT Terminal)
When connecting the EtherCAT terminal, the L/A (Link/Activity) LED replaces the K-Bus indicator light. VBUS LED indicates the power supply status of the terminal bus (green constant light indicates normal, off indicates short circuit or overload, rated load upper limit is 2A). L/A flashing indicates data communication on the E-bus, while constant light indicates only the link without data.
3.3 Diagnosing K-Bus through TwinCAT software
In the TwinCAT development environment, more detailed diagnostic information can be obtained. Under the bus coupler (CX-BK), a State variable can be monitored:
Value=0: K-Bus runs synchronously with no errors.
Value ≠ 0: The binary bit meaning needs to be checked. For example:
Bit 0 (1): K-Bus error, refer to the above LED flashing code table.
Bit 1 (2): The terminal configuration has changed after startup.
Bit 2 (4): Process image length mismatch.
Bit 11 (2048): Watchdog timeout.
Reset method: K-Bus errors can be reset by calling the IOF_DeviceReset function block (located in Tclofunctions. lib).

System recovery and advanced configuration
4.1 Remote configuration using Beckhoff Device Manager
The CX52x0 comes with a built-in web-based configuration tool - Beckhoff Device Manager. Suitable for remote diagnosis when local operation is not possible.
Access method:
Accessing port 443 via HTTPS protocol: https://<IP address or hostname>/config.
Factory default credentials: username Administrator, password 1.
Function: Can modify network settings, enable or disable UWF (Unified Write Filter), update firmware, etc.
4.2 TPM (Trusted Platform Module) Enabling
CX52x0 supports firmware TPM (fTPM 2.0) and can be used for security features such as BitLocker encryption.
Prerequisite: UEFI BIOS, 64 bit Windows 10 (version 1809 or higher).
Enabling steps:
Set Boot>Boot mode select to UEFI in BIOS.