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:
2.3 HMI Setup and Configuration
- Variable Declarations:
- 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
throughH5
).
- Push Buttons (or toggles) for
- 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.
- Buttons are linked to the sensor variables (