Cleaning robot simulation
Couldn't load pickup availability
Description
This SCL function block, FB_CleaningRobot, controls a mobile cleaning robot with automatic driving and cleaning cycles, obstacle detection, battery level, and safety checks. It can be run directly in the Siemens TIA Portal.
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
- STOP signal or battery empty → drive & cleaning motor off, warning LED on, set error flag, HMI "STOP / BATTERY EMPTY", RETURN
- State 0 (Ready) → Waiting for start command
- State 1 (starting) → drive motor active for 5 s (TON timer)
- State 2 (Cleaning) → Drive & cleaning motor run until obstacle is detected or cleaning time expires
- Obstacle → State 3: Motors off, right turn (TON timer), back to state 2
- State 4 (Completion) → Motors off, cleaning LED off, HMI “READY – TO BASE”, back to state 0
Technical details
• Inputs: Stop, Battery Empty, Start, Obstacle, Reset
• Outputs: Drive motor, cleaning motor, warning LED, cleaning LED, error flag, StatusText_HMI
• Three TON timers for start-up, cleaning and rotation phases
• Execution via INT variable #State in CASE structure; RETURN for safety states
Possible applications
• Mobile cleaning robots in halls and storage areas
• Retrofit in existing cleaning systems
• Training and demonstration projects for PLC-controlled vehicles
compatibility
Siemens S7-1200 & S7-1500, TIA Portal ≥ V13 (recommended V16+ for HMI/PLCSIM)
Scope of delivery
.scl file with input/output declarations, timer instances, state logic, and header comments; download link immediately after purchase
Support
Adjustment of cleaning duration, additional sensors, fallback logic or HMI integration on request via shop message or email.