Automatic animal feeding
Couldn't load pickup availability
Description
This SCL function block FB_Feeding controls automatic feeding with silo monitoring and time window logic. It checks whether the silo is empty, enables manual or time-controlled feeding once per time window, and doses via motor and flap.
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
- Silo empty? → Flap & motor off, alarm on, status text = "Silo empty – feeding blocked", RETURN
- Check time window (CurrentTime between StartTimeFrom and StartTimeTo) → AutoStartErgeht = TRUE (once)
- StartRelease = ManuStart OR AutoStartErgeht → State → 1
- State 1 (Dosing) → FlapOpen = TRUE, MotorOn = TRUE, Start timer (PT=T#10s), StatusText = "Feeding in progress"
- State 2 (Wait) → ActualWeight ≥ TargetWeight OR Timer.Q = TRUE → FlapOpen & MotorOn = FALSE, State → 3
- State 3 (Completion) → StatusText = "Feeding completed", wait until CurrentTime > StartTimeUntil → AutoStartErgeht = FALSE, State → 0
Technical details
• Inputs: SiloEmpty, ManuStart, CurrentTime, StartTimeFrom, StartTimeTo, ActualWeight, TargetWeight, Timer.Q
• Outputs: FlapOpen, MotorOn, Alarm, StatusText (STRING)
• Timer: TON instance with PT=T#10s for feeding duration
• State machine: INT variable state in CASE structure, AutoStartErfolge prevents multiple starts
• RETURN when SiloLeer cancels all subsequent actions
Possible applications
• Automated animal feeding in stables and feed silos
• Aquaculture and processing facilities
• Retrofit into existing feeding systems
• Training and demo modules for PLC sequence controls
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 (timer duration, weight values, time window); download link after purchase
Support
Adjustment of feeding times, additional sensors, manual HMI interventions or control system connection on request via shop message or email.