
Presence and availability are opposite questions
A sensor answers “Is there a carton here?” The station-free lamp answers “Is this position available?” These conditions have opposite Boolean values. Before selecting any ladder instruction, write down what a TRUE input actually means. An empty station does not automatically mean that every related signal should be FALSE.
The two-state rule
| Carton present | NOT carton present | Station-free indication |
|---|---|---|
| FALSE | TRUE | ON |
| TRUE | FALSE | OFF |
NOT is a unary operation: it needs one Boolean value and reverses it. In the linked exercise, xSensor_CartonPresent is the sensor input and xLamp_StationFree is the lamp output. Both are BOOL signals. The scene controls the sensor when you place or remove a carton.
Try the principle in the free sandbox
- Open the sandbox and use one available switch input and one lamp output. Note their actual tag names in the Tags list.
- Build a NO contact for the input, followed by a NOT instruction and a normal COIL for the lamp.
- Run the CPU. With the switch off, expect the lamp on. With the switch on, expect the lamp off.
- Compare that with a single NC instruction and a normal coil. For one Boolean input, the resulting truth table is the same.
--[ input ]--[ NOT ]------------( lamp )--This is a generic sandbox example. In the course task, transfer the same reasoning to the physical scene and verify the sensor rather than treating it as an operator switch.
NOT, NC and NCOIL are different tools
An NC instruction tests whether its assigned tag is FALSE. A NOT instruction inverts the current logic result at that point in the rung and has no tag of its own. A negated coil (NCOIL) writes the opposite of the result reaching it to its destination.
A physical normally closed switch is a separate electrical concept. Its input may be TRUE while released, depending on the wiring and the signal definition. Do not select a ladder NC instruction just because a component is labelled NC.
Check the scene, then the program
In the course exercise, use Place carton and Take carton. First confirm that the presence signal follows the carton. Then check that your running program produces the opposite lamp state. Repeat the change more than once; the output should not latch or depend on its previous state.
Common mistakes
- Double inversion: NOT followed by NCOIL reverses the signal twice and can recreate the original input state.
- Wrong signal meaning: “present” and “free” are complementary; their names cannot be used interchangeably.
- Judging a paused screenshot: with the CPU stopped, outputs are off. The truth table describes the intended program while it is running.
The public tutorial teaches the operation. The linked course exercise provides the actual workstation, checks and reference solution for eligible accounts.
Put the explanation into practice
Public tutorial. The linked exercise requires sign-in and eligible course access.
Practice in simulator ↗Ready for the next step?
Develop your ladder logic skills in TIA Portal, from basic conditions to more complete control programs.
Siemens S7-1200/1500 LAD/FBD course ↗
Looking for a broader path? Explore PLC Bootcamp or compare PLC courses by platform and level.
Check the selected offer for its syllabus, software requirements and simulator access conditions.