Irrigation system with soil moisture sensor
Couldn't load pickup availability
Description
This SCL function block FB_Garden_Irrigation controls automatic garden irrigation based on soil moisture, time release, and manual start. When the tank is empty, it automatically shuts off and reports the status via the HMI.
Note: All modules are designed exclusively as a learning and optimization basis and are not approved for live operation. System modules, in particular, must be finally tested and commissioned by qualified personnel before productive use.
How it works
- Tank empty? → Pump off, alarm on, HMI "Tank empty – Irrigation blocked", RETURN
- State 0 (Wait) →
- HumidityActual < HumiditySetpoint and Time Release = TRUE or ManuStart = TRUE
→ Pump on, start timer (30 s), state → 1
- State 1 (Watering) →
- HumidityActual ≥ HumiditySetpoint or Timer.Q = TRUE
→ Pump off, stop timer, status text "Irrigation finished", state → 0
- Invalid state → fallback to state 0
Technical details
• Inputs: TankEmpty, HumidityActual, HumiditySetpoint, Time Release, ManuStart, Timer.Q
• Outputs: Pump, Alarm, StatusText (STRING)
• Timer: TON instance (PT=T#30s) for maximum watering time
• Control: INT variable state in CASE structure
• Safety: RETURN when the tank is empty
Possible applications
• Automatic irrigation in home gardens and greenhouses
• Public green spaces and parks
• Retrofit for existing systems
• PLC training on time- and condition-controlled processes
compatibility
Siemens S7-1200 & S7-1500; TIA Portal V13 and higher (V16+ recommended for HMI & PLCSIM)
Scope of delivery
• .scl file with input/output declarations, timer instance, CASE logic and header comments (adjustment instructions for duration and humidity limits)
• Download link after purchase
Support
I can help with adjusting watering times, integrating additional sensors, or HMI layouts. Feel free to contact me anytime via shop message or email.