PLCDualTimerDemo
A complete, unrestricted LAD example that alternates two PLC commands through independent IEC TON timers.
Designed as a small educational utility for Siemens-compatible projects, it includes the original TIA Portal project, readable logic documentation and a reproducible test checklist.
// Expected sequence
Two positions, two independent times, one repeated cycle
- 01Enable
Intermittenza_Attivata - 02Comando-Pos1
timePos1_ON - 03Timer transitionIEC TON
- 04Comando-Pos2
timePos2_ON - 05Repeat / stopSafe-state verification required
// Main [OB1]
Four documented LAD segments
Program organisation
- Enable/disable command
- Position 1 activation time
- Position 2 activation time
- Alternating Pos1/Pos2 logic
Visible implementation
%M0.1—Intermittenza_Attivata%M0.3 / %M0.4—Comando-Pos1 / Pos2%MD8 / %MD12— independent times%DB4 / %DB2— IEC TON instances
// Code view
The actual ladder logic in TIA Portal
// Release status
What is included and what still needs validation
| Item | Included | Documented validation |
|---|---|---|
| Complete TIA Portal V18 project | ✓ | Structure inspected |
| LAD logic and readable tag documentation | ✓ | Visually confirmed |
| Hardware and software compilation | Checklist included | Not recorded |
| PLCSIM | Test procedure included | Not recorded |
| Compatible PLC hardware test | Test procedure included | Not recorded |
| Production use | No functional restriction | Not validated |
// Requirements & licence
Open original work, proprietary engineering environment
TIA Portal V18
Created with TIA Portal V18 Update 5, project version 18.0.1.0. Open a copy first to avoid irreversible migration.
S7-1500
The recorded station uses a CPU 1511-1 PN, article 6ES7 511-1AL03-0AB0, firmware V3.0.
MIT License
The original logic and documentation can be used, modified and redistributed under the MIT terms, with copyright and licence notice preserved.
Siemens
TIA Portal, PLCSIM, SIMATIC, firmware, libraries and trademarks remain subject to Siemens AG's licences and terms.