Task 1: HMI Design in CODESYS - sebastianguerra6/Workshop-3 GitHub Wiki

Task 1: HMI Design in CODESYS

2.1 Logic Circuit Design

  • Sensors:
    • B1 (bottom sensor)
    • B2 (middle sensor)
    • B3 (top sensor)
  • Outputs:
    • H1: Fill level correct (B1 & B2 on, B3 off)
    • H2: Fill level too low (only B1 on)
    • H3: Fill level too high (B1, B2, B3 all on)
    • H4: Tank empty (all sensors off)
    • H5: Error (any physically impossible combination, e.g., B3 on but B1 off)

2.2 Ladder Diagram

Below is a textual representation of the ladder logic:

image image image

2.3 HMI Setup and Configuration

  1. Variable Declarations:

image

  1. HMI Elements:
    • Push Buttons (or toggles) for B1, B2, B3, and any system start/stop inputs.
    • LED Indicators or shapes with dynamic color for each output (H1 through H5).
  2. Properties:
    • Buttons are linked to the sensor variables (B1, B2, B3), either as momentary or toggle inputs.
    • Each indicator’s background color or visible property is tied to its corresponding output variable.