Learn Schneider-ecostruxure-unitypro - 10 Code Examples & CST Typing Practice Test
Schneider EcoStruxure Control Expert (formerly Unity Pro) is an IEC 61131-3 compliant PLC programming environment used for developing, configuring, testing, and maintaining Schneider Electric Modicon PLCs across industrial automation systems.
View all 10 Schneider-ecostruxure-unitypro code examples →
Learn SCHNEIDER-ECOSTRUXURE-UNITYPRO with Real Code Examples
Updated Nov 27, 2025
Code Sample Descriptions
Hello World Output in Unity Pro (ST)
IF %I0.0 THEN
%Q0.0 := TRUE;
ELSE
%Q0.0 := FALSE;
END_IF;
A basic Structured Text example that turns ON %Q0.0 when %I0.0 is TRUE.
TON On-Delay Timer (ST)
TON_1(IN := %I0.1, PT := T#5s);
IF TON_1.Q THEN
%Q0.1 := TRUE;
END_IF;
Standard TON timer usage in Unity Pro ST.
CTU Up Counter (ST)
CTU_1(CU := %I0.2, PV := 10);
IF CTU_1.CV >= 10 THEN
%Q0.2 := TRUE;
END_IF;
Counting rising pulses on %I0.2. After reaching 10, %Q0.2 turns ON.
Analog Scaling (0-27648 -> 0-100%)
Scaled := (REAL(%IW0) * 100.0) / 27648.0;
Unity analog inputs use 0-27648 for 0-20 mA or 0-10V.
Motor Start/Stop Seal (ST)
IF %I0.3 THEN
M_Start := TRUE;
END_IF;
IF %I0.4 THEN
M_Start := FALSE;
END_IF;
%Q0.3 := M_Start;
Classic latch logic using %I0.3 start and %I0.4 stop.
Rising Edge Detection (R_TRIG)
R_TRIG_1(CLK := %I0.5);
IF R_TRIG_1.Q THEN
%Q0.4 := TRUE;
END_IF;
Using Unity’s built-in R_TRIG function block.
FOR Loop Summing Registers
Sum := 0;
FOR i := 0 TO 9 DO
Sum := Sum + %MW[i];
END_FOR;
Sum %MW0 through %MW9.
PID Function Block Example
PIDAT_1(
PV := %MW100,
SP := %MW200,
KP := 1.0,
TI := 2.0,
TD := 0.0,
MAN := FALSE,
OUT => %MW300
);
Calling the PIDAT block in Unity Pro for process control.
PWM Output Example (ST)
IF Ramp >= 100 THEN
Ramp := 0;
END_IF;
IF Ramp < Duty THEN
%Q0.5 := TRUE;
ELSE
%Q0.5 := FALSE;
END_IF;
Ramp := Ramp + 1;
Generating PWM by comparing a ramp counter against duty cycle.
Frequently Asked Questions about Schneider-ecostruxure-unitypro
What is Schneider-ecostruxure-unitypro?
Schneider EcoStruxure Control Expert (formerly Unity Pro) is an IEC 61131-3 compliant PLC programming environment used for developing, configuring, testing, and maintaining Schneider Electric Modicon PLCs across industrial automation systems.
What are the primary use cases for Schneider-ecostruxure-unitypro?
Programming Modicon M340, M580, M221, Premium, and Quantum PLCs. Industrial automation logic development. SCADA integration via Modbus, Ethernet/IP, and Schneider protocols. Safety-critical control sequences. Batch process automation
What are the strengths of Schneider-ecostruxure-unitypro?
Rich industrial-grade toolset. Strong diagnostics, traces, and breakpoints. Supports complex multi-PLC systems. Excellent for large-scale automation. Robust communication configuration
What are the limitations of Schneider-ecostruxure-unitypro?
Windows-only environment. Steeper learning curve for beginners. Expensive licensing. Can feel slow with very large projects. Not ideal for non-Modicon hardware
How can I practice Schneider-ecostruxure-unitypro typing speed?
CodeSpeedTest offers 10+ real Schneider-ecostruxure-unitypro code examples for typing practice. You can measure your WPM, track accuracy, and improve your coding speed with guided exercises.