Rungsrungs.dev
DocsBlogExercises
> run studio> run studio.rungs.dev
← All courses

Edges and One-Shots

Acting once when a signal changes

Compare the current input with its previous-scan state to detect a transition, turn that edge into a one-scan pulse and make a held button act only once.

  1. 0

    // Drives one output that follows the button instantly and another that follows it one scan later.

    One-Scan Delay

    EXERCISE
    Difficultymedium
    Status—unknown
  2. 1

    // Produces a single-scan pulse on the rising edge of the input.

    Rising Edge

    EXERCISE
    Difficultyeasy
    Status—unknown
  3. 2

    // Produces a single-scan pulse on every 1-to-0 transition of a BOOL input.

    Falling Edge

    EXERCISE
    Difficultyeasy
    Status—unknown
  4. 3

    // Toggles a lamp output on each rising edge of a push button.

    Press-Toggle Lamp

    EXERCISE
    Difficultymedium
    Status—unknown
  5. End
Previous course← Boolean LogicNext courseTimers →

Product

  • PLC Simulator
  • Exercises
  • Courses
  • Pricing

Learn

  • Learn PLC Programming
  • Documentation
  • Ladder Logic
  • Structured Text
  • Blog

Community

  • Discussions
  • Contact

Legal

  • Privacy Policy
  • Terms and Conditions
  • Refund Policy
  • Cookie settings
© 2026 Techsolid Automation Limited