Flasher

OnTime times while the lamp is on, then OffTime times while it is off. When OffTime is done, both reset and the cycle starts again.

Step by step

Pick a step. The rungs are drawn by the editor after Core scans the program up to that step.

1. Enable on. OnTime starts timing and Lamp is on.

StepEnableOnTime.ACCOffTime.ACCLamp
1. Enable on1001
2. Scan 2160001
3. Scan 31120000
4. Scan 4112006000
5. Scan 51120012000
6. Scan 61001

Why it works

  • Rung 0: OnTime times while Enable is on and OffTime is not done.
  • Rung 1: OffTime starts when OnTime is done.
  • Rung 2: Lamp is on while OnTime is still timing, so it turns off when OnTime is done.
  • When OffTime is done, XIO OffTime.DN breaks rung 0. OnTime resets, which breaks rung 1, so OffTime resets in the same scan. OnTime starts again on the next scan.
  • Each step here is one scan, 600 ms apart.

Common mistakes

  • One timer resetting itselfA TON with XIO on its own DN resets on the scan after it is done, so DN is on for one scan only. Use two timers when the on and off times matter.
  • A fixed one-second blinkSystem_Clock_1s already blinks once a second. Use XIC System_Clock_1s when the times do not need setting.

Instructions used

Related