SCL Programming Manual
Structured Control Language Practical Manual

Official Philosophy: Open the software, open the Softwell Notebook, and perform the practical.

20 Practical Steps
Action Flow Manual
No Theory / Only Practical
Softwell Training Template

Softwell
Digital Practical
Notebook

[check] Open -> Click -> Select -> Download -> Test -> Complete

NO THEORY * ONLY PRACTICAL
P01

Softwell Digital Practical Manual

Practical 01 - Create SCL Project

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Open TIA Portal and create a new training project.
v
02
STEP 02
Add a PLC CPU or simulator-supported controller.
v
03
STEP 03
Create a project folder named D:\Softwell_Training\SCL_Programming.
v
04
STEP 04
Save the project with the name Softwell_SCL_Manual.
v
05
STEP 05
Confirm the project tree is ready for program blocks.

Expected Result

SCL training project is created and ready for programming blocks.

P02

Softwell Digital Practical Manual

Practical 02 - Create First SCL Function

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Open Program blocks and add a new Function.
v
02
STEP 02
Select language SCL and name it FC_First_SCL.
v
03
STEP 03
Create input variable StartCmd of type Bool.
v
04
STEP 04
Create output variable RunCmd of type Bool.
v
05
STEP 05
Write simple assignment RunCmd := StartCmd; and compile the block.

Expected Result

First SCL function compiles successfully and copies input command to output command.

P03

Softwell Digital Practical Manual

Practical 03 - Call SCL Function from Main Program

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Open the main program block.
v
02
STEP 02
Drag or call FC_First_SCL inside the main logic.
v
03
STEP 03
Connect StartCmd to a test tag or memory bit.
v
04
STEP 04
Connect RunCmd to an output or memory bit.
v
05
STEP 05
Compile and monitor the logic online or in simulation.

Expected Result

SCL function is called from the main program and responds to the test input.

P04

Softwell Digital Practical Manual

Practical 04 - Boolean Logic in SCL

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Create FC_Boolean_Logic in SCL.
v
02
STEP 02
Add inputs StartPB, StopPB and FaultActive.
v
03
STEP 03
Add output MotorRun.
v
04
STEP 04
Write logic using AND, OR and NOT operators.
v
05
STEP 05
Test all input combinations using watch table or simulation.

Expected Result

Boolean SCL logic correctly controls MotorRun based on start, stop and fault status.

P05

Softwell Digital Practical Manual

Practical 05 - Set Reset Logic

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Create a function block FB_Motor_Latch in SCL.
v
02
STEP 02
Add StartPB, StopPB and Fault inputs.
v
03
STEP 03
Add static variable RunMemory.
v
04
STEP 04
Write latch logic so Start sets and Stop/Fault resets RunMemory.
v
05
STEP 05
Compile, call the FB with an instance DB and test.

Expected Result

Motor latch keeps run command active until stop or fault condition resets it.

P06

Softwell Digital Practical Manual

Practical 06 - Timer Logic in SCL

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Create FB_StartDelay in SCL.
v
02
STEP 02
Declare TON timer instance in the static area.
v
03
STEP 03
Add StartCmd input and DelayedRun output.
v
04
STEP 04
Call the TON timer with PT value T#5s.
v
05
STEP 05
Test that DelayedRun turns ON after the delay time.

Expected Result

SCL timer logic creates a verified start delay.

P07

Softwell Digital Practical Manual

Practical 07 - Counter Logic in SCL

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Create FB_PartCounter in SCL.
v
02
STEP 02
Add PartSensor input and Reset input.
v
03
STEP 03
Use rising edge logic or counter instruction as per trainer setup.
v
04
STEP 04
Increment CountValue for every detected part.
v
05
STEP 05
Reset CountValue when Reset is true.

Expected Result

Part counter increments on sensor pulses and resets correctly.

P08

Softwell Digital Practical Manual

Practical 08 - Analog Scaling Function

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Create FC_Scale_Analog in SCL.
v
02
STEP 02
Add RawValue, RawMin, RawMax, EngMin and EngMax inputs.
v
03
STEP 03
Add ScaledValue output as Real.
v
04
STEP 04
Write linear scaling formula in SCL.
v
05
STEP 05
Test using raw values 0, 13824 and 27648.

Expected Result

Analog raw value is converted into engineering units using SCL formula.

P09

Softwell Digital Practical Manual

Practical 09 - Limit and Alarm Logic

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Create FC_Limit_Check in SCL.
v
02
STEP 02
Add ProcessValue, LowLimit and HighLimit inputs.
v
03
STEP 03
Add LowAlarm, HighAlarm and Normal outputs.
v
04
STEP 04
Write comparison logic using less-than and greater-than operators.
v
05
STEP 05
Test below, within and above limit values.

Expected Result

SCL comparison logic generates low, high and normal status outputs correctly.

P10

Softwell Digital Practical Manual

Practical 10 - Case Statement Practical

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Create FC_Mode_Select in SCL.
v
02
STEP 02
Add ModeNo input as Int.
v
03
STEP 03
Add AutoMode, ManualMode and MaintenanceMode outputs.
v
04
STEP 04
Use CASE ModeNo OF for mode selection.
v
05
STEP 05
Test ModeNo values 1, 2, 3 and invalid value.

Expected Result

CASE statement selects the correct operating mode and handles invalid mode values.

P11

Softwell Digital Practical Manual

Practical 11 - For Loop Practical

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Create FC_Array_Total in SCL.
v
02
STEP 02
Create an array input or internal array of production counts.
v
03
STEP 03
Use FOR loop to add all array values.
v
04
STEP 04
Store result in TotalCount output.
v
05
STEP 05
Test with known sample values and compare manually.

Expected Result

FOR loop calculates total count from array values.

P12

Softwell Digital Practical Manual

Practical 12 - Array Average Function

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Create FC_Array_Average in SCL.
v
02
STEP 02
Use an array of Real values as sample data.
v
03
STEP 03
Loop through all values and calculate sum.
v
04
STEP 04
Divide by number of samples to create AverageValue.
v
05
STEP 05
Test the function with simple known values.

Expected Result

SCL array average calculation returns the expected average value.

P13

Softwell Digital Practical Manual

Practical 13 - String Handling in SCL

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Create FC_Batch_String in SCL.
v
02
STEP 02
Add BatchPrefix and BatchNumber inputs.
v
03
STEP 03
Convert or combine values into a batch text string as per available functions.
v
04
STEP 04
Store final text in BatchName output.
v
05
STEP 05
Monitor output for different batch numbers.

Expected Result

SCL string logic creates a readable batch name for reports and HMI display.

P14

Softwell Digital Practical Manual

Practical 14 - Function Block with Instance DB

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Create FB_Valve_Control in SCL.
v
02
STEP 02
Add OpenCmd, CloseCmd, OpenFB and CloseFB signals.
v
03
STEP 03
Use static variables for internal command memory and fault status.
v
04
STEP 04
Call FB_Valve_Control twice with separate instance DBs.
v
05
STEP 05
Verify both valve instances work independently.

Expected Result

Reusable SCL function block controls multiple valves with separate instance data.

P15

Softwell Digital Practical Manual

Practical 15 - Data Block Access

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Create a global data block DB_Process_Setpoints.
v
02
STEP 02
Add setpoints for speed, temperature and pressure.
v
03
STEP 03
Read these setpoints inside an SCL block.
v
04
STEP 04
Use the values in limit or scaling calculations.
v
05
STEP 05
Modify DB values online and verify SCL logic updates.

Expected Result

SCL block reads and uses global data block setpoints.

P16

Softwell Digital Practical Manual

Practical 16 - Fault Code Generation

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Create FC_Fault_Code in SCL.
v
02
STEP 02
Add multiple alarm inputs such as EStop, Overload and HighTemp.
v
03
STEP 03
Assign numeric fault codes based on priority.
v
04
STEP 04
Use IF ELSIF structure for priority handling.
v
05
STEP 05
Test that highest priority fault code is selected.

Expected Result

SCL fault code logic produces correct priority-based diagnostic code.

P17

Softwell Digital Practical Manual

Practical 17 - Machine Sequence in SCL

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Create FB_Sequence_Control in SCL.
v
02
STEP 02
Declare StepNo as static integer.
v
03
STEP 03
Use CASE StepNo OF to build sequence steps.
v
04
STEP 04
Add transition conditions for Start, SensorDone and Reset.
v
05
STEP 05
Monitor StepNo while running simulation.

Expected Result

SCL sequence logic moves through machine steps in the correct order.

P18

Softwell Digital Practical Manual

Practical 18 - SCL Diagnostics Watch Table

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Create a watch table for SCL block inputs, outputs and static variables.
v
02
STEP 02
Add key variables such as StepNo, RunMemory and FaultCode.
v
03
STEP 03
Go online or start simulation.
v
04
STEP 04
Force or modify inputs carefully as per trainer instruction.
v
05
STEP 05
Observe how SCL variables change during execution.

Expected Result

Watch table helps diagnose SCL logic and internal variables.

P19

Softwell Digital Practical Manual

Practical 19 - Optimize and Comment SCL Code

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Open one completed SCL block.
v
02
STEP 02
Add clear comments above major logic sections.
v
03
STEP 03
Rename unclear variables to meaningful names.
v
04
STEP 04
Remove unused temporary variables.
v
05
STEP 05
Compile and confirm zero errors after cleanup.

Expected Result

SCL code is readable, maintainable and compiles cleanly.

P20

Softwell Digital Practical Manual

Practical 20 - Final SCL Programming Project

Philosophy: Open the software, open the Softwell manual, and perform the practical.

SCL ProgrammingPLC LogicFunctionsAutomation
Software: TIA Portal with SCL / Structured Control Language editor
Setup: Engineering laptop, PLC simulator or training PLC, sample I/O tags
01
STEP 01
Build one integrated SCL project using motor latch, analog scaling and sequence logic.
v
02
STEP 02
Add fault code generation and watch table diagnostics.
v
03
STEP 03
Call all required SCL blocks from the main program.
v
04
STEP 04
Run simulation or hardware test for the complete flow.
v
05
STEP 05
Archive the final project and record expected results.

Expected Result

Final SCL project demonstrates reusable functions, function blocks, diagnostics and complete machine logic.

☎ Call 🟢 WhatsApp ✉ Enquire Now