cx5200 en
cx5200 en
cx5200 en
CX52x0
Embedded PC
Table of contents
1 Notes on the documentation .................................................................................................................... 5
1.1 Representation and structure of warnings ......................................................................................... 6
1.2 Documentation issue status .............................................................................................................. 7
4 Product overview..................................................................................................................................... 11
4.1 Structure .......................................................................................................................................... 13
4.2 Name plate ...................................................................................................................................... 14
4.3 Types ............................................................................................................................................... 15
4.4 Architecture overview ...................................................................................................................... 16
6 Commissioning........................................................................................................................................ 29
6.1 Assembly ......................................................................................................................................... 29
6.1.1 Permissible installation positions ..................................................................................... 30
6.1.2 Fastening to the DIN rail .................................................................................................. 31
6.1.3 Changing the MicroSD card............................................................................................. 32
6.1.4 Changing the CFast card................................................................................................. 33
6.1.5 Installing passive EtherCAT Terminals............................................................................ 34
6.2 Power supply ................................................................................................................................... 35
6.2.1 Connect Embedded PC ................................................................................................... 36
6.2.2 UL requirements .............................................................................................................. 37
6.3 Switching on .................................................................................................................................... 38
6.4 Switching off .................................................................................................................................... 38
7 Configuration ........................................................................................................................................... 39
7.1 Starting the Beckhoff Device Manager ............................................................................................ 39
7.2 Windows 10 IoT Enterprise ............................................................................................................. 40
7.2.1 Identification of the Ethernet interfaces (X000, X001) ..................................................... 40
11 Decommissioning.................................................................................................................................... 69
11.1 Removing cables ............................................................................................................................. 69
11.2 Dismantling the Embedded PC ....................................................................................................... 70
12 Technical data.......................................................................................................................................... 71
13 Appendix .................................................................................................................................................. 73
13.1 Accessories ..................................................................................................................................... 73
13.2 Certifications .................................................................................................................................... 74
13.3 Support and Service ........................................................................................................................ 75
List of tables............................................................................................................................................. 76
The responsible staff must ensure that the application or use of the products described satisfy all the
requirements for safety, including all the relevant laws, regulations, guidelines and standards.
Disclaimer
The documentation has been prepared with care. The products described are, however, constantly under
development.
We reserve the right to revise and change the documentation at any time and without prior announcement.
No claims for the modification of products that have already been supplied may be made on the basis of the
data, diagrams and descriptions in this documentation.
Trademarks
Beckhoff®, TwinCAT®, EtherCAT®, EtherCAT G®, EtherCAT G10®, EtherCAT P®, Safety over EtherCAT®,
TwinSAFE®, XFC®, XTS® and XPlanar® are registered trademarks of and licensed by Beckhoff Automation
GmbH.
Other designations used in this publication may be trademarks whose use by third parties for their own
purposes could violate the rights of the owners.
Patent Pending
The EtherCAT Technology is covered, including but not limited to the following patent applications and
patents:
EP1590927, EP1789857, EP1456722, EP2137893, DE102015105702
with corresponding applications or registrations in various other countries.
EtherCAT® is a registered trademark and patented technology, licensed by Beckhoff Automation GmbH,
Germany
Copyright
DANGER
Hazard with high risk of death or serious injury.
WARNING
Hazard with medium risk of death or serious injury.
CAUTION
There is a low-risk hazard that can result in minor injury.
NOTE
There is a potential hazard to the environment and equipment.
This notice provides important information that will be of assistance in dealing with the product or
software. There is no immediate danger to product, people or environment.
Limitation of liability
All the components are supplied in particular hardware and software configurations appropriate for the
application. Unauthorized modifications and changes to the hardware or software configuration, which go
beyond the documented options, are prohibited and nullify the liability of Beckhoff Automation GmbH & Co.
KG.
In addition, the following actions are excluded from the liability of Beckhoff Automation GmbH & Co. KG:
• Failure to comply with this documentation.
• Improper use.
• Use of untrained personnel.
• Use of unauthorized replacement parts.
The Embedded PC is designed for a working environment that meets the requirements of protection class
IP20. This involves finger protection and protection against solid foreign objects up to 12.5 mm, but not
protection against water. Operation of the devices in wet and dusty environments is not permitted, unless
specified otherwise. The specified limits for electrical and technical data must be adhered to.
Improper use
All interventions must be carried out with knowledge of control programming, and the qualified personnel
must be familiar with the current standards and guidelines for the automation environment.
Mounting
• Never work on live equipment. Always switch off the power supply for the device before installation,
troubleshooting or maintenance. Protect the device against unintentional switching on.
• Observe the relevant accident prevention regulations for your machine (e.g. the BGV A 3, electrical
systems and equipment).
• Ensure standard-compliant connection and avoid risks to personnel. Ensure that data and supply
cables are laid in a standard-compliant manner and ensure correct pin assignment.
• Observe the relevant EMC guidelines for your application.
• Avoid polarity reversal of the data and supply cables, as this may cause damage to the equipment.
• The devices contain electronic components, which may be destroyed by electrostatic discharge when
touched. Observe the safety precautions against electrostatic discharge according to DIN EN
61340-5-1/-3.
Further information about the safe handling of networks and software can be found in the Beckhoff
Information System:
http://infosys.beckhoff.com
Document name
IPC Security Guideline
NOTE
Short circuit due to moisture
Moisture can form during transport in cold weather or in the event of large temperature fluctuations.
Avoid moisture formation (condensation) in the Embedded PC, and leave it to adjust to room temperature
slowly. If condensation has occurred, wait at least 12 hours before switching on the Embedded PC.
Despite the robust design of the unit, the components are sensitive to strong vibrations and impacts. During
transport the Embedded PC must be protected from
• mechanical stress and
• use the original packaging.
CX5230 CX5240
Dimensions (W x H x D) 142 mm x 100 mm x 91 mm
Weight approx. 1195 g
Storage
• Remove the battery from the Embedded PC if storage temperatures exceed 60 °C. The battery should
be stored separate from the Embedded PC in a dry environment at a temperature between 0 °C and
30 °C.
The preset date and time are lost if the battery is removed.
• Store the Embedded PC in the original packaging.
4 Product overview
The CX5200 product family includes two different Embedded PCs, which differ by their processor type and
RAM. The CX52x0 Embedded PC is a full-fledged PC with the following basic configuration:
• CFast card slot,
• MicroSD card slot,
• two independent Gbit Ethernet interfaces,
• four USB 3.0 interfaces,
• and a DVI-D interface
The Embedded PC features an internal 1-second UPS as persistent data memory. In the event of a power
failure the 1-second UPS can store up to 1 MB of persistent data on the CFast card or MicroSD card.
Microsoft Windows 10 IoT Enterprise 2019 LTSC or TwinCAT/BSD can be used as the operating system.
Extension modules
The basic CPU module can be extended if required and thus equipped with additional interfaces. To do this,
a system module or fieldbus module from the CX2500-xxxx series can be plugged in via the multi-pin
connection on the left-hand side of the device. In total, no more than one module can be plugged in.
Optional interface
The Embedded PC can be ordered ex factory with an optional interface. The optional interface cannot be
retrofitted.
The power supply terminal for the Embedded PC is located on the right-hand side. Bus Terminals (K-bus) or
EtherCAT Terminals (E-bus) can be attached on the right-hand side of the power supply terminal. The power
supply terminal automatically recognizes the respective bus system (K-bus or E-bus).
Software
In combination with the TwinCAT automation software, the CX52x0 Embedded PC becomes a powerful IEC
61131-3 PLC with up to four user tasks.
Additionally, Motion Control tasks can also be executed. It may be possible to control several servo axes,
depending on the required sampling time. In addition to simple point-to-point movements, it is possible to
execute more complex multi-axis functions such as electronic gearing, cam plate and flying saw.
In addition to real-time execution of control tasks, the TwinCAT real-time kernel ensures that enough time
remains for the user interface (HMI), to communicate with the real-time components via software interfaces
such as ADS or OPC.
4.1 Structure
8 9
7 10
6 11
5 12
4 13
3 14
2 15
1 16
4.3 Types
The CX52x0 Embedded PC can be ordered with different software options. Use this overview in conjunction
with the information on the name plate to ascertain the operating system and the TwinCAT version of the
Embedded PC.
The CX5230 and CX5240 Embedded PCs are available with the following software options:
The CX52x0 Embedded PCs are based on the Intel Atom microarchitecture, which was developed by Intel.
The following CPUs are used:
• Intel® AtomTM x5-E3930 (dual-core)
• Intel® AtomTM x5-E3940 (quad-core)
In addition to the arithmetic unit, the CPU also contains the memory controller and the graphics controller.
The processors use the Intel® HD Graphics core. For details on the CPUs please refer to Intel. The memory
is connected directly to the CPU. The Embedded PCs are available in two memory configurations: 4 GB and
8 GB DDR4-RAM. The memory is not extendable.
The interfaces (USB, DVI, and LAN) are standard interfaces. Devices that meet the corresponding standard
can be connected to and operated at these interfaces.
5 Interface description
The USB interfaces are type A and comply with the USB 3.0 specification.
Pay attention to the power consumption of the connected devices. No more than 900 mA and 4.5 W of
power can be output per interface. The USB interfaces support data rates of up to 5 Gbit/s.
Both Ethernet interfaces reach speeds of 10 / 100 / 1000 Mbit. The LEDs on the left of the interfaces indicate
the connection status. The upper LED (LINK/ACT) indicates whether the interface is connected to a network.
If this is the case, the LED lights up green. The LED flashes when data transfer on the interface is in
progress.
The lower LED (SPEED) indicates the connection speed. At a speed of 10 Mbit, the LED does not light up. If
the speed is 100 Mbit, the LED lights up green. The LED lights up red if the speed is 1000 Mbit (gigabit).
The Embedded PC also supports higher resolutions, based on the DVI standard. A maximum resolution of
2560 x 1440 pixels can be set on the Embedded PC. Whether this resolution is achieved depends on the
monitor, the cable quality and the cable length.
The Embedded PC also supports higher resolutions, based on the DVI standard. A maximum resolution of
2560 x 1440 pixels can be set on the Embedded PC. Whether this resolution is achieved depends on the
monitor, the cable quality and the cable length.
Version 1.1a of the DisplayPort (DisplayPort++) is installed on the Embedded PC. Adapters from DisplayPort
to DVI-D or DisplayPort to HDMI can be used to connect monitors without DisplayPort to the Embedded PC.
The audio interfaces are accessed via the operating system. The audio interface operates in stereo mode as
standard, using stereo outputs/inputs and a single-channel input for the microphone. The inputs should be
connected as indicated.
The left channel is transferred via the tip of the jack plug, the right channel via the first ring. The remainder of
the sleeve is used for earthing.
Signal Description
L Left channel
R Right channel
Ground Ground
The only existing channel is transferred via the tip, the remainder of the sleeve is used for earthing.
The maximum baud rate on both channels is 115 kbit. The interface parameters are set via the operating
system or from the PLC program.
The maximum baud rate on both channels is 115 kbit. The interface parameters are set via the operating
system or from the PLC program.
For RS 485 pins 2 and 3 (data +) must be connected, and pins 7 and 8 (data -).
Table 18: Default setting, RS485 without echo with end point (terminated).
Function Status
Echo on off
Echo off on
Auto send on on
Always send on off
Auto receive on on
Always receive on off
Term on on
Term on On
Other configurations for the RS485 interface can be ordered ex factory. The following options are available:
• N031-0001 RS485 with echo, end point (terminated).
• N031-0002 RS485 without echo, stub (without termination).
• N031-0003 RS485 with echo, stub (without termination).
• N031-0004 RS422 full duplex end point (terminated).
An RS485 interface cannot be configured retrospectively and must always be ordered ex factory as required.
The incoming EtherCAT signal is connected to the upper LAN interface. The lower LAN interface relays the
signal to other EtherCAT slave devices.
For the optional EtherCAT slave interface (B110), documentation with further information is available for
download from the Beckhoff website:
https://www.beckhoff.de/german/download/epc.htm?id=71003127100362
Document name
CXxxx0-B110 optional interface EtherCAT slave.
Pins 3 and 8 transfer the PROFIBUS signals. These must never be swapped over, as this will prevent
communication.
The Profibus bus line is connected via a 9-pin D sub with the following pin assignment:
Pin Connection
1 Shielding
2 not used
3 RxD/TxD-P
4 not used
5 GND
6 +5 VDC
7 not used
8 RxD/TxD-N
9 not used
For the optional PROFIBUS interface (x310), documentation with further information is available for
download from the Beckhoff website:
https://www.beckhoff.de/german/download/epc.htm?id=71003127100362
Document name
CXxxx0-x310 optional Profibus interface.
The CAN bus line is connected via a 9-pin D-sub plug with the following pin assignment:
Pin Connection
1 not used
2 CAN low (CAN-)
3 CAN Ground (internally connected to pin 6)
4 not used
5 Shield
6 CAN Ground (internally connected to pin 3)
7 CAN high (CAN+)
8 not used
9 not used
For the optional CANopen interface (x510), documentation with further information is available for download
from the Beckhoff website:
https://www.beckhoff.de/german/download/epc.htm?id=71003127100362
Document name
CXxxx0-x510 optional CANopen interface.
6 Commissioning
6.1 Assembly
Install the Embedded PC horizontally in the control cabinet on a DIN rail, in order to ensure optimum heat
dissipation.
The Embedded PC must be mounted horizontally on the DIN rail. Ventilation openings are located at the top
and bottom of the housing. This ensures an optimum airflow through the Embedded PC in vertical direction.
In addition, a minimum clearance of 30 mm above and below the Embedded PCs is required, in order to
ensure adequate ventilation.
If vibrations and impact occurs in the same direction as the DIN rail, the Embedded PC must be secured with
an additional bracket, in order to prevent it slipping.
Requirements:
• DIN rail of the type TS35/7.5 or TS35/15 according to EN 60715.
ð You have installed the Embedded PC successfully. Check again that the mounting is correct and that the
Embedded PC is engaged on the DIN rail.
The MicroSD card slot is intended for a MicroSD card. Data and further programs can be stored here, or
Windows Embedded Compact 7 can be installed instead.
The eject mechanism is based on the push/push principle. Below, we show you how to change the MicroSD
card.
Requirements:
• The Embedded PC must be switched off. The MicroSD card may only be installed or removed in
switched-off state.
A CFast card is a non-volatile memory. Data to be retained in the event of a power failure should be saved
on the CFast card. The CFast cards supplied by Beckhoff are industrial cards with an increased number of
write cycles and an extended temperature range (+85 °C).
The eject mechanism is based on the push/push principle. Below, we show you how to change the CFast
card.
Requirements:
• The Embedded PC must be switched off. The CFast cards may only be installed or removed in
switched off state.
ð The card is seated correctly when its end is flush with the front side of the housing.
EtherCAT Terminals that do not take part in active data exchange are referred to as passive terminals.
Passive EtherCAT Terminals have no process image and do not require current from the terminal bus (E-
bus).
Passive EtherCAT Terminals (e.g. EL9195) can be detected in TwinCAT. In the tree structure the EtherCAT
Terminal is displayed without process image, and the value in column “E-bus (mA)” does not change,
compared to the preceding EtherCAT Terminal.
The entry "Current consumption via E-Bus" in the technical data of an EtherCAT Terminal indicates whether
a particular EtherCAT Terminal requires power from the terminal bus (E-bus).
The following diagram shows the permissible installation of a passive EtherCAT Terminal. The passive
EtherCAT Terminal was not directly attached to the power supply unit.
The power supply terminals require an external voltage source, which provides 24 V DC (-15% / +20%). The
power supply terminal must provide 4 A at 24 V, in order to ensure the operation of the Embedded PCs in all
situations.
The cabling of the Embedded PC in the control cabinet must be done in accordance with the standard EN
60204-1:2006 PELV = Protective Extra Low Voltage:
• The "PE" and "0 V" conductors of the voltage source for a basic CPU module must be on the same
potential (connected in the control cabinet).
• Standard EN 60204-1:2006, section 6.4.1:b stipulates that one side of the circuit, or a point of the
energy source for this circuit must be connected to the protective earth conductor system.
Connections
Fig. 22: Connections for system voltage (Us) and power contacts (Up)
No. Description
1 The upper spring-loaded terminals (Us) identified with "24 V" and "0 V" supply the
Embedded PC and the terminal bus (data transfer via K-bus or E-bus).
2 The spring-loaded terminals (Up) identified as "+", "-" and "PE" supply the Bus Terminals
via the power contacts and the sensors or actuators connected to the Bus Terminals.
Fuse
• When dimensioning the fuse for the system voltage (Us), observe the maximum power consumption of
the Embedded PC (see: Technical data)
• Protect the power contacts (Up) with a fuse with a max. rating of 10 A (slow-blow).
To switch off the Embedded PC, do not disconnect the ground (0 V), because otherwise current may
continue to flow via the shielding, depending on the device, and damage the Embedded PC or peripheral
devices.
Always disconnect the 24 V line. Devices connected to the Embedded PC, which have their own power
supply (e.g. a Panel) must have the same potential for "PE" and "0 V" as the Embedded PC have (no
potential difference).
2. The wire can now be inserted into the round terminal opening without any force.
3. The terminal closes automatically when the pressure is released, holding the wire safely and
permanently.
ð You have successfully connected the voltage source to the power supply terminal when the two upper
LEDs of the power supply terminal light up green.
The left LED (Us 24V) indicates the supply of the basic CPU module and terminal bus. The red LED (Up
24V) indicates the Bus Terminal supply via the power contacts.
6.2.2 UL requirements
The CX52x0 Embedded PCs are UL-certified. The corresponding UL label can be found on the name plate.
The CX52x0 Embedded PCs can thus be used in areas where special UL requirements have to be met.
These requirements apply to the system voltage (Us) and the power contacts (Up). Applications without
special UL requirements are not affected by UL regulations.
UL requirements:
• The Embedded PCs must not be connected to unlimited voltage sources.
• Embedded PCs may only be supplied from a 24 V DC voltage source. The voltage source must be
insulated and protected with a fuse of maximum 4 A (corresponding to UL248).
• Or the power supply must originate from a voltage source that corresponds to NEC class 2. An NEC
class 2 voltage source must not be connected in series or parallel with another NEC class 2 voltage
source.
6.3 Switching on
Please ensure that the Embedded PC is fully configured before switching on the Embedded PC.
To switch off the Embedded PC, do not disconnect the ground (0 V), because otherwise current may
continue to flow via the shielding, depending on the device, and damage the Embedded PC or peripheral
devices.
Always switch off the power supply unit first and then disconnect the 24 V line.
7 Configuration
Requirements:
• Host PC and Embedded PC must be located in the same network. Depending on the operating system
version, the network firewall must allow access via port 80 (HTTP) or port 443 (HTTPS).
• IP address or host name of the Embedded PC.
ð Navigate forward in the menu and configure the Industrial PC. Note that modifications only become
active once they have been confirmed. It may be necessary to restart the Industrial PC.
In the Network and Sharing Center the Ethernet interfaces (X000, X001) of the CX20x0 Embedded PC are
identified as follows as standard:
• Ethernet 2 corresponds to the Ethernet interface X000.
• Ethernet corresponds to the Ethernet interface X001.
Fig. 26: Windows 10, Identification of the Ethernet interfaces (X000, X001) in the Network and Sharing
Center.
Device Manager
In the Device Manager the Ethernet interfaces (X000, X001) of the CX20x0 Embedded PC are identified as
follows as standard:
• Intel(R) 82574L Gigabit Network Connection #2 corresponds to the Ethernet interface X000.
• Intel(R) 82574L Gigabit Network Connection corresponds to the Ethernet interface X001.
Fig. 27: Windows 10, identification of the Ethernet interfaces (X000, X001) in the device manager.
The Ethernet interfaces (X000, X001) support jumbo frames only if the original Intel® driver is installed.
Requirements:
• The original Intel® driver can be downloaded from https://downloadcenter.intel.com.
• Install the original Intel® driver. Note that this will delete the real-time capable driver from Beckhoff.
• Check whether the peripheral devices support jumbo frames.
3. Under Settings click on Jumbo Packet, under Value select the option 4088 bytes or 9014 bytes.
ð You have successfully activated jumbo frames, and you can now transfer larger data quantities.
Requirements:
• The original Intel® driver can be downloaded from https://downloadcenter.intel.com.
• Install the original Intel® driver for the Network Interface Card. Note that this will delete the real-time
capable driver from Beckhoff.
5. Under Select a team type select the option Adapter Fault Tolerance
ð You have successful set NIC Teaming for your Ethernet interfaces. Further settings can be specified or
changed under the Settings tab.
Requirements:
• You can find the TcRteInstall.exe in a TwinCAT 2 standard installation under: C:\TwinCAT\Io
\TcRteInstall.exe
• And in a TwinCAT 3 standard installation under: C:\TwinCAT\3.1\System\TcRteInstall.exe
Proceed as follows:
1. Double-click the TcRteInstall.exe file.
The installation dialog appears and shows the compatible Ethernet interfaces under Compatible
devices.
2. Select the Ethernet interfaces for which you wish to restore the Beckhoff real-time driver and click on
Install.
ð The Beckhoff real-time driver is installed. The Ethernet interfaces with installed Beckhoff real-time driver
are shown under Installed and ready to use devices (real-time capable).
7.3 TwinCAT
The Tree View chapter can be used as an example for creating a project without actual hardware. All
devices and components of an Embedded PCs must be added manually in TwinCAT 3.
The smallest possible configuration of a CX20x0 Embedded PC, consisting of a basic CPU module and a
CX2100-0004 power supply unit, is displayed in the tree view of TwinCAT 3 as follows:
Fig. 28: CX20x0 Embedded PC in the tree view of TwinCAT 3, with attached EtherCAT Terminals (left) or
Bus Terminals (right).
The configuration in the tree view differs depending on whether EtherCAT Terminals or Bus Terminals are
connected to the Embedded PC.
The local PC and the target devices must be connected to the same network or directly to each other via an
Ethernet cable. In TwinCAT a search can be performed for all devices in this way and project planning
subsequently carried out.
4. Type the host name or the IP address of the device into the Enter Host Name / IP box and press
[Enter].
Enter the user name and password for the CX in the User Name and Password fields and click OK.
6. If you do not wish to search for any further devices, click on Close to close the Add Route Dialog.
The new device is displayed in the Choose Target System window.
7. Select the device you want to specify as target system and click OK.
ð You have successfully searched for a device in TwinCAT and inserted the device as the target system.
The new target system and the host name are displayed in the menu bar.
Using this procedure you can search for all available devices and also switch between the target systems
at any time. Next, you can append the device to the tree view in TwinCAT.
4. Select the devices you want to use and confirm the selection with OK.
Only devices that are actual available are offered for selection.
For Embedded PCs with connected Bus Terminals (K-bus) a Bus Coupler device (CX-BK) is displayed.
For EtherCAT Terminals (E-bus) the EtherCAT coupler is added automatically.
ð The Embedded PC was successfully scanned in TwinCAT and is displayed in the tree view with the
inputs and outputs.
The Tree view chapter illustrates how Embedded PCs with connected Bus or EtherCAT Terminals are
displayed.
Requirements:
• For TwinCAT 2 you have to install and license the supplement TS622x | TwinCAT EtherCAT
Redundancy on the Embedded PC:
http://www.beckhoff.de/forms/twincat3/warenkorb.aspx?lg=de&title=TS622x-EtherCAT-
Redundancy&version=1.0.2
• In TwinCAT 3 the supplement is already included and only has to be licensed.
• Hardware wired as EtherCAT ring (see Fig.: Smallest possible configuration for EtherCAT cable
redundancy) and added in TwinCAT.
5. Select the appropriate LAN connection according to your cabling at the Embedded PC.
ð You have successfully configured cable redundancy. Under the Online tab the EtherCAT slaves are
displayed, for which cable redundancy was configured.
Under State the state of the individual EtherCAT slaves is displayed. If, for example, the cable
connection between the EK1100 and EK1110 Bus Couplers is interrupted, the status of the Bus Coupler
changes. The message "LINK_MIS B" and "LINK_MIS A" appears under status.
Although the connection between the Bus Couplers is interrupted, the EtherCAT Terminals connected to
the EK1100 Bus Coupler show no fault.
If the cable connection is interrupted without cable redundancy at the same location, the terminals show
a fault under status.
The watchdog is activated with bExecute = TRUE and nWatchdogTimeS >= 1s.
Once the watchdog has been activated, the function block must be called cyclically and at shorter intervals
than nWatchdogTimeS, because the Embedded PC automatically restarts if the set time is less than
nWatchdogTimeS.
NOTE
Unwanted restart
The watchdog restarts the Embedded PC as soon as the time set for nWatchdogTimeS elapses.
Be aware of this behavior and disable the watchdog if you use breakpoints, carry out a PLC reset or an
overall reset, stop TwinCAT, switch to config mode or activate the configuration.
Requirements:
• Tc2_System library.
• TwinCAT v3.1.0
• A previously created PLC project in TwinCAT.
2. Under Tc2_System > POUs > SYSTEM +TIME click on the function block FB_PcWatchdog_BAPI.
ð The description of the function block can then be found under the Documentation tab or in the library
description under: FB_PcWatchDog_BAPI. If necessary, you can install the Tc2_System library at a
later stage via the Add Library button in the Library Manager.
The 1-second UPS is an UltraCap capacitor that continues to supply the processor with power in the event of
a power failure. During this period persistent data can be saved, which are available on switching on again.
Fig. 30: Behavior of systems in the event of a power failure without and with a 1-second UPS.
Since the 1-second UPS is designed for the entire service life, the holding time is considerably longer with
new devices. The capacitors age over the course of time and the holding time decreases. Therefore a
maximum of 1 MB persistent data can be reliably saved over the entire service life. Do not save any other
data and do not use any other applications to control the 1-second UPS.
Please note that the 1-second UPS does not supply power to the K-bus or the E-bus and that their data may
already be invalid when the 1-second UPS is activated. Also, the fieldbus system (or Ethernet) may not work
or not work properly once the 1-second UPS was activated.
• Declare important data such as counter values in the PLC as VAR PERSISTENT. Then call the
function block FB_S_UPS_BAPI cyclically in TwinCAT in order to control the 1-second UPS (see:
FB_S_UPS_BAPI [} 56]).
• Select the mode in the function block in order to specify what should happen in the case of a power
failure. Specify, for example, whether persistent data are saved and a quick shutdown is executed
(see: Mode and status of the function block).
• Subsequently you can check the validity of the variables and monitor whether the persistent variables
are loaded without error (see: Checking the validity of the variables).
Sample project:
ups_example.pro.
Components Version
TwinCAT on the development PC and on the control TwinCAT 2.11R3 Build 2047 (or higher)
system TwinCAT 3.1 Build 4018 (or higher)
Advanced
Bootloader version 1.00-23 Enables/disables the UPS
Firmware version 1.00-77
Mainboard serial no 120003414250178
Mainboard Prod. Date (Week.Year) 44.14
Mainboard BootCount 4711
Mainboard operation time 1224 min (20 h)
Voltage (Min/Max) 5.00 V / 5.20 V
Temperature (Min/Max) 15 °C / 63 °C
SUPS Enable
Options: Enable / Disable
Switches the 1-second UPS on or off.
Hold USB
Options: Enable / Disable
Switches off the power supply for the USB ports in UPS mode.
Delay
Options: 0…255 seconds
Start delay with which the 1-second UPS is charged.
Powerfail counter
Number of voltage failures
The UWF does not need to be switched off, because an exception can be defined for the \boot directory.
By default an exception list is automatically created when the UWF is switched on. The \Boot directory is
already entered in this list. Check the configuration of the UWF if you have made changes to the exception
list.
The UWF can be configured via the Beckhoff Unified Write Filter Manager.
8.3 FB_S_UPS_BAPI
The function block FB_S_UPS_BAPI can be used on devices with 1-second UPS and with BIOS-API from
version v1.15, in order to control the 1-second UPS from the PLC.
When the function block is first called, the data for accessing the 1-second UPS are determined via BIOS-
API. This process takes several cycles. This is followed by cyclic testing for power failure. When the
persistent data are written next, the access data for the PLC are saved persistently, so that during
subsequent boot operations the check for power failures can take place immediately after the PLC start.
In the event of a power failure the charge state of the 1-second UPS is checked every 50 ms, every 200 ms
if voltage is present and the capacity is less than 90%, and every second if voltage is present and the
capacity is more than 90%. This also takes place via BIOS-API access.
In the event of a power failure the function block FB_S_UPS_BAPI can be used to save the persistent data
and/or execute a quick shutdown, depending on the selected mode. The default input values of the
FB_S_UPS_BAPI should be retained.
The 1-second UPS does not have sufficient capacity for bridging power failures. Only the Compact Flash/
CFast card/Micro SD can be used for data storage, in view of the fact that the UPS capacity is not sufficient
for operating a hard disk.
The 1-second UPS can be used only for a few seconds in the event of a power failure in order, to save
persistent data. The data must be saved in the fast “persistent mode” “SPDM_2PASS”, even though this can
lead to real-time violations. Make sure you configure adequate router memory for saving the persistent data.
Regardless of the mode and therefore irrespective of whether data were saved or a quick shutdown was
performed, the UPS switches off the mainboard after the capacitors have been discharged, even if the
voltage has returned in the meantime.
NOTE
Loss of data
If other applications or the PLC keep further files open or write to them, file errors may occur if the 1-second
UPS switches off the controller.
In the eSUPS_WrPersistData_NoShutdown mode only the persistent data are saved, no QuickShutdown is
performed.
In the eSUPS_CheckPowerStatus mode only a check is performed as to whether a power failure has
occurred. If this is the case, the function block only switches back to the PowerOK state after the expiry of
tRecoverTime (10s).
VAR_INPUT
VAR_INPUT
sNetID : T_AmsNetId:= ''; (* '' = local netid *)
iPLCPort : UINT := 0; (* PLC Runtime System for writing persistent data *)
tTimeout : TIME := DEFAULT_ADS_TIMEOUT; (* ADS Timeout *)
eUpsMode : E_S_UPS_Mode := eSUPS_WrPersistData_Shutdown; (* UPS mode (w/
wo writing persistent data, w/wo shutdown) *)
ePersistentMode : E_PersistentMode := SPDM_2PASS; (* mode for writing persistent data *)
tRecoverTime : TIME := T#10s; (* ON time to recover from short power failure in mode eSUPS_Wr
PersistData_NoShutdown/eSUPS_CheckPowerStatus *)
END_VAR
iPLCPort: Port number of the PLC runtime system (851 for the first PLC runtime system, 852 for the second
PLC runtime system, …). If no port number is specified, iPLCPort is 0. The function block then automatically
determines the port of the PLC runtime system.
tTimeout: Timeout for writing of the persistent data or the quick shutdown.
eUpsMode: Defines whether persistent data are to be written and whether a quick shutdown is to be
executed. The default value is eSUPS_WrPersistData_Shutdown, i.e. a quick shutdown is executed
automatically once the persistent data have been saved. (Type: E_S_UPS_Mode)
ePersistentMode: Mode for the writing of the persistent data. Default value is SPDM_2PASS.
tRecoverTime: Time after which the UPS returns to PowerOK state in UPS modes without quick shutdown.
The tRecoverTime must be greater than the maximum charging time of the UPS, otherwise the UPS may
discharge too much in the event of short, consecutive power failures, which could result in the charge being
insufficient for storing the persistent data.
VAR_OUTPUT
VAR_OUTPUT
bPowerFailDetect : BOOL; (* TRUE while powerfailure is detected *)
eState : E_S_UPS_State; (* current ups state *)
nCapacity : BYTE; (* actual capacity of UPS *)
bBusy : BOOL; (* TRUE: function block is busy *)
bError : BOOL; (* FALSE: function block has error *)
nErrID : UDINT; (* FB error ID *)
END_VAR
bPowerFailDetect: TRUE during power failure. FALSE if the supply voltage is present.
Requirements
With the mode selected in the function block you can specify what should happen in the case of a power
failure.
eSUPS_WrPersistData_Shutdown: Writing of persistent data and then a QuickShutdown
eSUPS_WrPersistData_NoShutdown: Only writing of the persistent data (no QuickShutdown)
eSUPS_ImmediateShutdown: Only QuickShutdown (no writing of persistent data)
eSUPS_CheckPowerStatus: Only check status (neither writing of persistent data nor a QuickShutdown)
E_S_UPS_State
The internal state of the function block can be read with E_S_UPS_State.
eSUPS_PowerOK:
in all modes: Power supply is OK
eSUPS_PowerFailure:
in all modes: Power supply is faulty (only shown for one PLC cycle)
eSUPS_WritePersistentData:
in mode eSUPS_WrPersistData_Shutdown: Writing of persistent data is active
in mode eSUPS_WrPersistData_NoShutdown: Writing of persistent data is active
eSUPS_QuickShutdown:
in mode eSUPS_WrPersistData_Shutdown: QuickShutdown ist active
in Mode eSUPS_ImmediateShutdown: QuickShutdown is active
eSUPS_WaitForRecover:
in mode eSUPS_WrPersistData_NoShutdown: Wait for the reestablishment of the power supply
in mode eSUPS_CheckPowerStatus: Wait for the reestablishment of the power supply
eSUPS_WaitForPowerOFF:
in mode eSUPS_WrPersistData_Shutdown: Wait for switching off of the PC by the UPS
in mode eSUPS_ImmediateShutdown: Wait for switching off of the PC by the UPS
8.5.1 SYSTEMINFOTYPE
TYPE SYSTEMINFOTYPE
STRUCT
runTimeNo :BYTE;
projectName :STRING(32);
numberOfTasks :BYTE;
onlineChangeCount :UINT;
bootDataFlags :BYTE;
systemStateFlags :WORD;
END_STRUCT
END_TYPE
bootDataFlags: State of the boot data (RETAIN and PERSISTENT) after loading. The upper four bits
indicate the state of the persistent data, while the lower four bits indicate the state of the retain data.
systemStateFlags : Reserved.
When shutting TwinCAT down the PERSISTENT and RETAIN data is written into two files on the hard disk.
The path can be specified in TwinCAT System Control by means of the TwinCAT system properties (PLC
tab). The standard setting is "<Drive>:\TwinCAT\Boot". The files all have a fixed name with fixed extensions:
If the persistent or retain variables are not loaded, e.g. because they are invalid, the backup file is loaded by
default. In that case bit 1 of the bootDataFlags (for the RETAIN variables) in the PLC and/or bit 5 (for the
PERSISTENT variables) is set.
A registry setting can be used to determine whether the backup file is deleted or used. The backup file is
used by default (setting 0). If the backup file is to be deleted, the value of "ClearInvalidRetainData" or
"ClearInvalidPersistentData" must be set to 1 in the registry under:
[HKEY_LOCAL_MACHINE\SOFTWARE\Beckhoff\TwinCAT\Plc]
"ClearInvalidRetainData"=dword:00000000
"ClearInvalidPersistentData"=dword:00000000
Whether the backup file is to be used can also be set in the TwinCAT System Manager in the tree structure
on the left under PLC > PLC Settings:
The backup files are deleted if the option Clear Invalid Retain Data or Clear Invalid Persistent Data is set
in the System Manager. Corresponds to registry entry 1.
8.5.2 PlcAppSystemInfo
Each PLC contains an instance of type 'PlcAppSystemInfo' with the name '_AppInfo'.
The corresponding namespace is 'TwinCAT_SystemInfoVarList'. This must be specified for use in a library,
for example.
TYPE PlcAppSystemInfo
STRUCT
ObjId : OTCID;
TaskCnt : UDINT;
OnlineChangeCnt : UDINT;
Flags : DWORD;
AdsPort : UINT;
BootDataLoaded : BOOL;
OldBootData : BOOL;
AppTimestamp : DT;
KeepOutputsOnBP : BOOL;
ShutdownInProgress : BOOL;
LicensesPending : BOOL;
BSODOccured : BOOL;
TComSrvPtr : ITComObjectServer;
AppName : STRING(63);
ProjectName : STRING(63);
END_STRUCT
END_TYPE
If the variable runTimeNo was used under TwinCAT 2, the corresponding program code must be converted
for application under TwinCAT 3.
Example:
• Application under TwinCAT 2: nPlcAdsPort := 801 + (SystemInfo.runTimeNo - 1) * 10;
• Application under TwinCAT 3: nPlcAdsPort := _AppInfo.AdsPort;
9.1.1 K-bus
The power supply unit checks the connected Bus Terminals for errors. The red LED "K-bus ERR" is off if no
error is present. The red LED "K-bus ERR" flashes if Bus Terminal errors are present.
The frequency and number of the flashes can be used to determine the error code and the error argument.
An error is indicated by the "K-bus ERR" LED in a particular order.
Table 29: K-bus ERR LED, fault indication sequence through the LED.
Order Meaning
Fast blinking Starting the sequence
First slow sequence Error code
No display Pause, the LED is off
Second slow sequence Error code argument
Count how often the red LED K-bus ERR flashes, in order to determine the error code and the error
argument. In the error argument the number of pulses shows the position of the last Bus Terminal before the
error. Passive Bus Terminals, such as a power feed terminal, are not included in the count.
For some error the LED "K-BUS ERR" does not go out, even if the error was rectified. Switch the power
supply for the power supply unit off and back on again to switch off the LED after the error has been rectified.
State variable
In TwinCAT there is a State variable under the Bus Coupler for K-bus diagnostics.
Fig. 32: Status variable for error handling and diagnostics under TwinCAT.
If the value is "0", the K-bus operates synchronous and without error. If the value is <> "0" there may be a
fault, or it may only be an indication that the K-bus cycle is longer than the task. In which case it would no
longer be synchronous with the task. The task time should be faster than 100 ms. We recommend a task
time of less than 50 ms. The K-bus update time typically lies between one and five ms.
If there is a K-bus error, this can be reset via the IOF_DeviceReset function block (in the TcIoFunctions.lib).
9.1.2 E-bus
The power supply unit checks the connected EtherCAT Terminals. The "L/A" LED is lit in E-bus mode. The
"L/A" LED flashes during data transfer.
9.2 Faults
Please also refer to the Safety instructions section.
Please make a note of the following information before contacting Beckhoff service or support:
The quickest response will come from support / service in your country. Therefore please contact your
regional contact. For details please refer to our website at www.beckhoff.de or ask your distribution partner.
The battery must be replaced every 5 years. Spare batteries can be ordered from Beckhoff Service. A
CR2032 battery (3 V, 225 mAh) is used in the Embedded PC.
The battery compartment is below the front flap. The battery stores the time and date. The time and date are
reset if the battery is removed. Be aware of this behavior for your hardware and software configuration and
reset the time and date in the BIOS after a battery change. All other BIOS settings remain unchanged and
are retained.
Requirements:
• The Embedded PC is switched off.
3. Push the new battery into the battery compartment. The negative pole points to the left towards the DVI-I
interface.
ð The battery change is complete. Close the front flap and reset the date and time in the BIOS.
Clean only the housing of the Embedded PC. Use a soft, moist cleaning cloth for this. Make sure that the
ventilation slots of the device are always free and do not clog up.
The following cleaning agents and materials are unsuitable and may cause damage:
• corrosive cleaning agents
• solvents
• scouring agents
• hard objects
11 Decommissioning
Before dismantling the Embedded PC, shut down the Embedded PC and switch off the power supply. Only
then can you remove all the cables. Also remove all cables from the first terminal after the power supply
terminal.
Requirements:
• Terminate your software and shut down the Embedded PC.
• Switch off the power supply.
ð In the next step the Embedded PC can be removed from the DIN rail and dismantled.
Requirements:
• All cables were removed from the Embedded PC.
2. Pull the orange strap on the power supply terminal and gently remove the device from the DIN rail.
Disposal
The device must be fully dismantled in order to dispose of it. Electronic components must be disposed of
according to national electronic waste regulations.
12 Technical data
Table 33: Technical data, dimensions and weights.
CX5230 CX5240
Dimensions (W x H x D) 142 mm x 100 mm x 91 mm
Weight approx. 1095 g
13 Appendix
13.1 Accessories
Table 40: CFast cards
13.2 Certifications
All products of the Embedded PC family are CE, UL and EAC certified. Since the product family is
continuously developed further, we are unable to provide a full listing here. The current list of certified
products can be found at www.beckhoff.com.
This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to
Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful
interference when the equipment is operated in a commercial environment. This equipment generates, uses,
and can radiate radio frequency energy and, if not installed and used in accordance with the instruction
manual, may cause harmful interference to radio communications. Operation of this equipment in a
residential area is likely to cause harmful interference in which case the user will be required to correct the
interference at his own expense.
This equipment does not exceed the Class A limits for radiated emissions as described in the Radio
Interference Regulations of the Canadian Department of Communications.
Please contact your Beckhoff branch office or representative for local support and service on Beckhoff
products!
The addresses of Beckhoff's branch offices and representatives round the world can be found on her internet
pages:
http://www.beckhoff.com
You will also find further documentation for Beckhoff components there.
Beckhoff Headquarters
Huelshorstweg 20
33415 Verl
Germany
Phone: +49(0)5246/963-0
Fax: +49(0)5246/963-198
e-mail: info@beckhoff.com
Beckhoff Support
Support offers you comprehensive technical assistance, helping you not only with the application of
individual Beckhoff products, but also with other, wide-ranging services:
• support
• design, programming and commissioning of complex automation systems
• and extensive training program for Beckhoff system components
Hotline: +49(0)5246/963-157
Fax: +49(0)5246/963-9157
e-mail: support@beckhoff.com
Beckhoff Service
The Beckhoff Service Center supports you in all matters of after-sales service:
• on-site service
• repair service
• spare parts service
• hotline service
Hotline: +49(0)5246/963-460
Fax: +49(0)5246/963-479
e-mail: service@beckhoff.com
List of tables
Table 1 Dimensions and weight of the individual modules. ...................................................................... 10
Table 2 Available extension modules for the CX52x0. ............................................................................. 11
Table 3 Available optional interfaces for the CX52x0. .............................................................................. 11
Table 4 Legend for the configuration. ....................................................................................................... 13
Table 5 Information on the name plate. .................................................................................................... 14
Table 6 CX52x0 ordering information. ...................................................................................................... 15
Table 7 USB interfaces (X100, X101, X102, X103), pin assignment........................................................ 17
Table 8 Ethernet interface X000 and X001, pin assignment. ................................................................... 18
Table 9 DVI-D interface X200, pin assignment......................................................................................... 19
Table 10 DVI-D interface X200, resolution at the monitor. ......................................................................... 19
Table 11 DVI-D interface X300, pin assignment......................................................................................... 20
Table 12 DVI-D interface X300, resolution at the monitor. ......................................................................... 20
Table 13 DisplayPort, pin assignment. ....................................................................................................... 21
Table 14 DisplayPort X300, resolution at the monitor. ............................................................................... 21
Table 15 Line In /Line Out jack plugs, pin assignment. .............................................................................. 22
Table 16 RS232 interface X300, pin assignment. ...................................................................................... 23
Table 17 RS422/485 interface, pin assignment.......................................................................................... 24
Table 18 Default setting, RS485 without echo with end point (terminated). ............................................... 24
Table 19 EtherCAT slave interface X300, pin assignment. ........................................................................ 25
Table 20 PROFIBUS interface X310, pin assignment. ............................................................................... 26
Table 21 Wire colors of the PROFIBUS line............................................................................................... 26
Table 22 CANopen interface X510, pin assignment................................................................................... 27
Table 23 PROFINET RT interface, pin assignment.................................................................................... 28
Table 24 Required wire cross-sections and strip lengths. .......................................................................... 36
Table 25 Access data for the Beckhoff Device Manager on delivery. ........................................................ 39
Table 26 Legend for the tree view. ............................................................................................................. 45
Table 27 Cable redundancy, hardware for sample configuration. .............................................................. 49
Table 28 Diagnostic LEDs in K-Bus mode.................................................................................................. 62
Table 29 K-bus ERR LED, fault indication sequence through the LED. ..................................................... 62
Table 30 K-BUS ERR LED, fault description and troubleshooting. ............................................................ 63
Table 31 Description of the State variable values. ..................................................................................... 64
Table 32 Diagnostic LEDs in K-Bus mode.................................................................................................. 65
Table 33 Technical data, dimensions and weights. .................................................................................... 71
Table 34 Technical data, general data. ...................................................................................................... 71
Table 35 Technical data, I/O terminals. ...................................................................................................... 71
Table 36 Technical data, environmental conditions.................................................................................... 71
Table 37 Technical data, graphic specifications. ........................................................................................ 72
Table 38 Technical data, interfaces............................................................................................................ 72
Table 39 Technical data, optional interfaces. ............................................................................................. 72
Table 40 CFast cards ................................................................................................................................. 73
Table 41 Spare battery for CX systems...................................................................................................... 73
Table 42 Further spare parts. ..................................................................................................................... 73
List of figures
Fig. 1 Example configuration of a CX5240 Embedded PC.................................................................... 13
Fig. 2 Name plate example.................................................................................................................... 14
Fig. 3 Nomenclature for the CX52x0 Embedded PC. ............................................................................ 15
Fig. 4 USB interfaces (X100, X101, X102, X103).................................................................................. 17
Fig. 5 Ethernet interfaces X000, X001................................................................................................... 18
Fig. 6 DVI-D interface X200................................................................................................................... 19
Fig. 7 DVI-D interface X300................................................................................................................... 20
Fig. 8 DisplayPort X300. ........................................................................................................................ 21
Fig. 9 Audio interface X300, X301, X302............................................................................................... 22
Fig. 10 Line In / Line Out X300, X302 jack plugs..................................................................................... 22
Fig. 11 Mic In X301 jack plug................................................................................................................... 22
Fig. 12 RS232 interface X300.................................................................................................................. 23
Fig. 13 RS485 interface X300.................................................................................................................. 24
Fig. 14 EtherCAT slave interface X300. .................................................................................................. 25
Fig. 15 PROFIBUS interface X310. ......................................................................................................... 26
Fig. 16 CANopen interface X510. ............................................................................................................ 27
Fig. 17 PROFINET RT interface X300..................................................................................................... 28
Fig. 18 CX52x0 Embedded PC, dimensions. .......................................................................................... 29
Fig. 19 CX52x0 Embedded PC, permitted installation position. .............................................................. 30
Fig. 20 Identifying a passive EtherCAT Terminal in TwinCAT................................................................. 34
Fig. 21 Passive EtherCAT Terminals, permissible installation. ............................................................... 34
Fig. 22 Connections for system voltage (Us) and power contacts (Up)................................................... 35
Fig. 23 Connection example with a CX52x0............................................................................................ 36
Fig. 24 UL label on CX52x0..................................................................................................................... 37
Fig. 25 Connection example for areas with special UL requirements...................................................... 37
Fig. 26 Windows 10, Identification of the Ethernet interfaces (X000, X001) in the Network and Sharing
Center. ......................................................................................................................................... 40
Fig. 27 Windows 10, identification of the Ethernet interfaces (X000, X001) in the device manager. ...... 40
Fig. 28 CX20x0 Embedded PC in the tree view of TwinCAT 3, with attached EtherCAT Terminals
(left) or Bus Terminals (right). ...................................................................................................... 45
Fig. 29 Example configuration of a CX52x0 with EtherCAT cable redundancy....................................... 49
Fig. 30 Behavior of systems in the event of a power failure without and with a 1-second UPS. ............. 53
Fig. 31 UWF exception list under TwinCAT 3.......................................................................................... 55
Fig. 32 Status variable for error handling and diagnostics under TwinCAT............................................. 64