Skip to workspace
BAS Bridge
System explorer

Level 5 · Control logic and sequence development

Read the same sequence in blocks and structured text

25 minutes · Intermediate

Reading open · Practical open · Knowledge check open

What you’ll learn

  • Map a function-block connection to a named variable in a textual sequence.
  • Trace a program across a normal scan, a brief loss of proof and a sustained fault.
Before you start · 2 related lessons0 of 2 prerequisites demonstrated. You can open this lesson at any time.

Follow variables and execution order

A function-block diagram shows data traveling from input pins through logic to output pins. Check pin type and units. A comparator converts a numeric value to a Boolean. Each timer instance stores elapsed time across calls. A programming system may use execution order or prior-scan values on some paths. Inspect the actual compiled order and task interval when two blocks appear to respond one scan apart.

Read a short structured-text example

Suppose RunRequest is assigned (Occupied OR Extension) AND Ready. A separate instance call ProofDelay(IN := RunRequest AND NOT FanProof, PT := T#15s) evaluates the missing- interval. FanAlarm := ProofDelay.Q assigns the result to an alarm variable. The symbols := indicate assignment or named input association. The timer instance must be evaluated each scan in this example so a returning proof can reset it. These lines describe control intent and need platform-specific declarations and terminators before use in a real program.

Build the scan trace

On paper give each scan an input snapshot, enable, elapsed time and alarm output. Write a plain-language version before editing the block diagram. If a timer is only called inside a conditional branch, check its documented behavior when skipped. A retained output can make a corrected physical condition look like a persistent alarm.

Translation from a block chain to variables
  1. Read Occupied / Extension / Ready
  2. Assign RunRequest
  3. Compare request with FanProof
  4. Call ProofDelay instance
  5. Assign FanAlarm from Q

Normal operation

Example training conditions

  • A program scans once per second. Occupied becomes true while Ready is false; the AND block and fan output remain false. On the next scan both inputs are true and the output becomes true.
  • The program can issue a command in one scan. The physical fan and its proof take longer to respond.

Worked service example

A simulated fan annunciates failure when proof normally arrives eight seconds after the request.

Recorded field evidence · training example

  • Approved proving delay 15 s. Scan interval 1 s.
  • Recorded program drives alarm directly from RunRequest AND NOT FanProof.
  • Timer Q remains false when fan proof arrives at 8 s.

The missing-proof condition becomes true immediately, but the alarm output is wired to the raw comparator. Route the training alarm to the qualified result and test early proof, sustained failure and return to normal.

Field procedure

  1. Write the input, output and retained state for each block.
  2. Translate the path into plain-language assignments, then step through multiple scans.
  3. Test normal start, interruption shorter than the delay and a sustained failure. Record the result and deployed revision.

Hands-on exercise

Use the function-block playground to identify the input, comparison or Boolean intermediate, and output. Predict the next scan before executing it.

Function-block commissioning

Connect the request and permission so both must remain on for three seconds before EF-01 receives a start. Losing either input must immediately remove the start. Each scan advances the same simulated controller and exhaust plant by one second.

  1. InputsRequest · AHU occupancyPermit · exhaust enable
  2. On delay
  3. Binary outputEF-01.EF-CMD
Scans 0 · gate — · timer — · output —

Unit 4 service call

The operator enabled the AHU. Should the fan have started yet?

Predict which transition is permitted and when its proof timer starts. Bring back the source, reading and time of your strongest observation.

Open case simulator

Knowledge check

Pass at 80%.

1. A correct 15 s proof timer is visible. FanAlarm still activates instantly. Which connection should you trace first?
2. A function block resets its elapsed time to zero on every scan even though Enable stays true. Which implementation detail needs inspection?
3. A one-second controller scan adds 2 to a retained counter on every enabled execution. Starting from 4, what is its value after three enabled scans?
4. RunRequest stays true. FanProof remains false for 14 s, true for one scan, then false for 6 s. For the example 15 s non-retentive delay, how much longer must proof remain missing?
5. A Boolean expression calculates FanEnable=true, yet the controller output remains Off. What is the next program-level trace?

Field takeaways

  • Trace the actual writer of each output.
  • Test both sides of a timing boundary with a scan-by-scan record.

References and further reading

Technician handbook