Control a traffic light with one process value
The traffic light has red, yellow and green lamps in a fixed order. Bits 0–2 of one numeric value switch them individually or together. It is a display: clicking a lamp does not change the process value.
1. Insert the traffic light
In design mode choose Displays (Anzeigen) → Ampel, place the object on the process page and double-click it to open its properties. Set the name to Anlage_Ampel_01. Text / initial value contains the visible caption Ampel; the numeric test values will be entered in the PLC table.
2. Prepare a PLC symbol
Click Symbol → Edit table. Add a row or duplicate a suitable row and edit all relevant fields: device Modbus_Testserver, symbol Anlage_Ampel, address 40009, simulation value 0, UINT16, length 1 register, Holding Register. The example connection is 127.0.0.1, port 502, unit ID 1. Use the description Steuerwort Ampel. A readable value is sufficient; write access is only needed for a separate operating control. Validate the table, save it and close the editor.
Use a free, appropriate address in your own project.
3. Apply the symbol
Select the prepared symbol in the communication table, check the symbol information and click Apply at the bottom right. Device, IP address, symbol, physical address, data type and register information are copied together. Apply the object properties and save the project. Read access is sufficient for this display. Assign the complete numeric value. The object evaluates its three bits itself; three separate BOOL symbols are unnecessary.
4. Understand the bit mapping
Bit 0 = 1 switches red; bit 1 = 2 switches yellow; bit 2 = 4 switches green. Add these values for combinations: 0 all off, 1 red, 2 yellow, 3 red and yellow, 4 green, 5 red and green, 6 yellow and green, 7 all on. There is no automatic timed sequence. Use integers 0–7 for this exercise.
5. Test the lamps
Use project simulation. Set and save 0, start F5 and check that all lamps are off. Leave test mode, edit and save the next value and restart. Repeat with 1, 3, 2 and 4 as shown. Alternatively assign a numeric input to the same symbol and enter integers 0–7; this requires write access and creates write requests when connected to a controller. A live source overrides the simulation value.
6. Common questions
A dark display can mean value 0 or no usable numeric value; check the symbol and source. Value 3 lights two lamps because it combines bits 0 and 1. Clicking lamps does nothing. A red → red/yellow → green → yellow sequence requires changing process values. For configurable levels and blinking, use the separate Stack light (Meldeleuchte) object.
Keyboard shortcuts
Apply or close property dialogs, select objects on the canvas and leave any active text field before using an object shortcut.
- Delete — delete selection
- Deletes selected simple objects without another confirmation. Check the selection first.
- Ctrl+Z / Ctrl+Y — undo / redo
- Undoes or restores an available object edit. This is not a recovery mechanism for deleted pages or files.
- Ctrl+C / Ctrl+V — copy / paste
- Copies the selection and inserts an offset copy. Check names and process assignments afterward.
- Ctrl+X — cut
- Copies objects to the internal object clipboard and removes them from the page. Paste with Ctrl+V.
- Ctrl+A — select all
- Selects unlocked objects on the current page.
- Arrow keys — move precisely
- Moves the selection one pixel in the chosen direction within the page bounds.
- Shift+Arrow — next grid position
- Moves the selection in the grid direction using the page grid spacing.
- Ctrl+L / Ctrl+Shift+L — lock / unlock
- Locks the selection; Ctrl+Shift+L unlocks all locked objects on the current page.
- Esc — end editor action
- Cancels an action such as placement or clears the current selection.
- Ctrl+S — save project
- Saves applied changes. Save again after deleting, moving or copying.
The fixed global alarm area cannot be deleted or copied. Structural objects with assigned contents can ask an additional question about those contents.