What you’ll learn
- Identify a binary input, a numeric value and a writable output in a scan trace.
- Predict assignment results and distinguish software output from physical response.
Before you start · 2 related lessons
0 of 2 prerequisites demonstrated. You can open this lesson at any time.A program makes a repeatable decision
A controller program reads values, applies rules and requests outputs. A variable is a name holding a value. Occupied may hold the A value with two possible states, true and false. value true or false. ZoneTemperature may hold a number with units, such as 73°F. An input receives information. An output requests an action. Assigning a value stores the result in the destination variable.
Make one assignment
For the first virtual project, the request for exhaust follows room occupancy. In words, assign the current value of Occupied to Start. In the graph, wire the binary point input for EF-01.OCC to the value pin of the binary point output EF-01.EF-CMD. A connection passes a value. The virtual controller repeats the program at its configured interval, called a One execution of the controller task. . Actual airflow follows the equipment state and its local enable.
Combine numeric and Boolean values
Subtract two temperatures to calculate an error. For example Room = 75°F and Target = 72°F gives Excess = 3°F. A comparison such as Excess greater than 2°F converts the number into true or false. At exactly 2°F the strict comparison is false. An AND operator needs both conditions true. OR needs at least one true, and NOT reverses a Boolean. A conditional Writing the calculated or copied value into a named destination. chooses a value based on a true or false result.
Follow state across scans
A simple subtraction function returns its result from its current inputs. A timer function block also has a particular One particular copy of a function block with its own state. with memory, such as elapsed seconds. That state helps today’s scan use previous scans. Retaining a value across a program cycle does not establish that it will survive a power loss or a download. Check controller and project settings. During debugging, inspect the input, intermediate calculation, written output and equipment response in order.
- Input snapshot
- Assigned output
- Equipment response
Normal operation
Example training conditions
- Occupancy changes to true at 09:00:02. In this training example the graph executes at 09:00:00, :05 and :10. The Start output first reads true at :05.
- With the local enable present the exhaust fan then accelerates and air delivery rises. A running command and a positive airflow sample can occur at different times.
Worked service example
The operator reports that the new program ignored a brief occupied request.
Recorded field evidence · training example
- Capture times for the 5-second task: 10:00:00, :05 and :10.
- An independent event recorder shows the input true from :01 to :03, then false. The task sampled false at :00 and :05.
- Program output stayed false during both recorded task scans.
The pulse occurred entirely between samples, so this scan record can explain the missing response. Confirm whether this signal is specified as a maintained level or an event. Choose an approved capture strategy if short events must be recognized. An output trace alone could not distinguish a missed sample from a logic fault.
Terms in this lesson
- Assignment
- Writing the calculated or copied value into a named destination.
- Boolean
- A value with two possible states, true and false.
- Scan
- One execution of the controller task.
- Instance
- One particular copy of a function block with its own state.
Hands-on exercise
Interpret a three-stop scan record before building the occupancy project in the virtual controller.
Predict before inspection
Standalone simulator · free practice
Build and execute the occupancy-controlled exhaust program
Wire the occupancy input to Start, deploy, and exercise occupied and unoccupied inputs. Run the project acceptance checks, stop the program and verify restoration.
Open simulator →Knowledge check
Pass at 80%.
Field takeaways
- Write down the input snapshot, calculated result, output owner and physical consequence at their respective times.
References and further reading
- Schneider Electric · Cyclic task execution on the M251 ↗
- Schneider Electric · Functions and function blocks ↗