Loading local progress…
Course
Practise in
Level 1, 0 XP · your progress
← Course
Stage 1 · Read, decide, command · 6 min

Know what a tag represents

I can explain a scan and make an output follow an input.

Practise it now: Your first command Free, no sign-up. New to this? Read the lesson first.

1. Why it matters

A tank screen shows a level reading next to a valve command. Mix them up and you could open a valve when you only meant to show a number.

2. The idea in plain words

A is a name for one piece of information. Start is the button signal. PumpOn is the command sent to the pump.

Every tag has a data type, which says what it can hold. holds or , like an on/off switch.

and hold whole numbers, such as a bottle count. holds numbers with decimals, such as a 42.5% tank level.

Time has its own rules. Siemens programmes use the TIME type for a length of time. Logix set their time as a whole number of milliseconds.

Types stop mistakes. You cannot put a tank percentage into an on/off command.

Each tag also has a job. An brings information in. An sends a command out. An internal tag remembers a result or something that happened earlier.

In the Siemens block interface, Static tags keep their value from one to the next. In the optimised blocks used here, Temp tags start fresh each time the block runs.

Rockwell uses program tags, which keep their values between scans.

For now, focus on inputs and outputs. Later exercises explain timers and memory. What happens to values when the power goes off is not covered in these labs.

3. See it happen

Siemens SCL · TIA Portal V20
#PumpOn := #Start;

Does this copy a request, or prove the motor is turning?

Decide your answer first. Then step through the scans to check it.

Input or eventResult
Start FALSE (BOOL)?
Start TRUE (BOOL)?

A mistake to look for

Treating an output command as proof that the equipment moved. Also watch the types: INT and DINT hold whole numbers and REAL holds decimals. None of them can stand in for a BOOL.

4. Vendor notes

Siemens notes

List inputs, outputs and Static memory in the block interface. Static memory belongs to the block’s instance.

Temp is scratch space in the blocks used here. It starts fresh each time.

5. On site

In a factory wash room, an operator holds a button to run a water pump. Letting go should stop the pump.

If the pump keeps running after the button is released, the hose keeps spraying when nobody expects it.

Where you'd find thisWater for the top floors

In a block of flats, a basement tank holds water from the mains. Two pumps push it up to the taps above. One runs while the other waits as a spare. A low-water switch stops the pumps before the tank runs dry.

  1. Street mainsWater enters the building
  2. Storage tankHolds a supply for the pumps
  3. Water pumpsPush water to the floors aboveYou are here
  4. Taps upstairsResidents use the water they need
On a real site: places, parts and safety
  • Block of flats — pushing water up to the top floors
  • Brewery — sending hot water to a brewing tank
  • Water-treatment works — moving water between filter tanks
  • Office building — pumping water round the heating pipes

Recognise it on site

  • The reservoir stores the water. On this practice rig the water flows back into it, so normal pumping never empties it.
  • An electric motor spins the pump to push water through the pipe. A guard covers its moving shaft.
  • The standby pump is a spare on the same pipes. It takes over when the main pump cannot run.
  • The flow transmitter, a meter in the pipe, measures how much water passes each second.
  • The pressure gauge shows how hard the water pushes against the pipe walls.
  • The controller cabinet holds the PLC, the industrial computer that runs your code. It also holds the switches that power the motors.

A low-water switch can take away permission to run. The pump must stop before it runs dry and damages its seal.

The PLC can say ON even when a pump has failed. Check the measured flow as well as the command.

The Stop input in these exercises is not an emergency stop. Real machines also need guards, emergency stops and a safe way to cut the power.

The sizes, timings and cutaways are teaching choices, not a drawing of any one real installation.

6. Try it on the rig

Open the Block interface tab (Siemens) or the Program tags tab (Rockwell) above the code. Find Start, an input, and PumpOn, an output.

Open the mission, make a prediction, run the equipment, then test your programme. Passing the tests completes practice; reading this page alone does not.

01. Your first command

7. Check your understanding

Predict a new case. A wrong answer gives you an explanation and another try.

1. Nobody is pressing the Start button, so Start is FALSE. The PLC runs this line. What does it set PumpOn to?

Siemens SCL
#PumpOn := #Start;
Choose your answer

2. Which type holds a simple yes/no value: TRUE or FALSE?

Choose your answer