5.2 Project Creation and Connection
First connection steps for XC-104/204
Connect the PC to the eth0 port of the device using an Ethernet cable
Set the PC IP address to the same network segment as the device (e.g. 192.168.119.xxx)
Connect the device power supply
Log in to the Device Web Configuration Tool through a browser (https://<Device IP>: 8375)
Set up SSH remote access
Activate USB interface and restore USB to factory settings
Set date and time
Configure network settings
XSOFT-CODESYS-3 connection steps
Create a new project and select the corresponding device model
Double click on the "Device (XC xxx)" device
Select the 'Communication' tab
Click on 'Search network' or enter the PLC IP address
Select the found device and click "Flash" to verify the device (LED flashing)
5.3 Task Configuration
XControl supports multitasking and can configure up to 50 tasks.
Task type
Loop task: Repeat execution at set intervals
Event triggered task: only executed when a specific event occurs
System event task: associated with system events such as PLC start, stop, reset, etc
Task priority
Range: 0 (highest) to 31 (lowest)
Tasks of the same priority are executed in rotation according to time slices
5.4 Interrupt Handling
The local inputs of XC-204 and XC-303 can be configured as interrupt inputs.
Configurable Interrupt
Falling edge trigger
Rising edge trigger
Any edge trigger
Interrupt library
Library Name: EA_XC303Events.lib
Function:
DisabInterrupt: Disable interrupts
Enable Interrupt: Enable interrupts
Precautions
POUs triggered by interrupts will not be time monitored
No response to new interrupts during interrupt execution
Frequent interruptions may cause task timeouts
5.5 Program Download and Startup
Program Download
After logging in online, confirm 'Load the new program?'
The 'Retain' variable is initialized during the loading process
The variable 'PERSISTENT' maintains its value
Create a boot application
Method 1: Online operation
After logging in, select the 'Create boot application' command
Method 2: Automatic generation
Enable 'Implicitly generate boot application during download' in the application properties
Guide the application to save
To SD card: Use PLC Shell command 'copyprojtsd'
To USB devices: Use the PLC Shell command 'copyprojtousb'
5.6 Debugging Function
Breakpoint/single step mode
Can set breakpoints in the application
Pause program execution at breakpoint
Note: The output that has been set when reaching the breakpoint remains in its current state
single-cycle mode
Real time execution of a program cycle
Output cancelled at the end of the cycle
compulsory
All user program tags can be forcibly assigned values
Local output can only be forced when the CPU is in RUN state and the corresponding variable is assigned a value
Chapter 6 Watchdog and Task Monitoring
6.1 Watchdog Principle
Watchdogs are used to monitor the execution time of tasks. Basic relationship:
Processing time<task interval time<watchdog time
If the processing time exceeds the interval time, the task will restart at the end of the second interval (the watchdog will not be activated)
If the processing time exceeds the watchdog time, the watchdog interrupts the program execution
6.2 Watchdog Configuration
Configurable parameters
Watchdog: enabled/disabled
Watchdog Time
Watch dog sensitivity
Sensitivity Explanation
Sensitivity=1: Triggered immediately after exceeding the watchdog time
Sensitivity=x: Triggered after x consecutive times exceeding the watchdog time
6.3 Precautions for disabling watchdog
If the watchdog is disabled, the accessed output may remain active until the PLC switches from RUN to STOP or the output power is cut off when the task cannot be completed due to a program error (such as a dead loop).
Chapter 7 System Expansion
7.1 Local Expansion
Connect the XN300 module through the system bus for local expansion.
Configuration steps
Ensure that all XN300 modules are connected and powered on
In the XSOFT-CODESYS-3 project device tree, select "Device (XC xxx)"
Right click and select 'Add device...'
Select "XN300 Master" in the "Add device" dialog box
Select the XN300 module that is actually connected, in the same order as the physical connection
Optional device scanning function for automatic detection
7.2 Remote Expansion
Remote expansion through fieldbus interface:
CANopen extension
Using XN-312-GW-CAN CANopen gateway
Up to 32 XN300 modules per CAN node
Distance between PLC and gateway: depends on baud rate, maximum 1000 meters
EtherCAT extension
Using XN-312-GW-EC EtherCAT Gateway
Support SmartWire DT module connection

Chapter 8 Web Configuration Tool (XC-104/204)
8.1 Function Overview
The XC-104/204 series PLC provides a web-based configuration tool for basic system configuration. Access method:
URL: https://<Device IP>: 8375
Port: 8375
Protocol: HTTPS
8.2 Safety Features
2048 bit RSA key encryption
Generate key upon initial startup
Password requirement:
Minimum length of 8 characters
At least one number
At least 1 uppercase letter
At least 1 lowercase letter
At least 1 special character (! @ # $^&)