Pro
8 min

CCST 07 — One-Shot Rising Edge (R_TRIG)

ccstladderone-shotR_TRIGedge
CCST 07 — One-Shot Rising Edge (R_TRIG) scenario preview

Ready to build this?

Sign up free — no credit card required. This scenario requires the Pro plan.

Sign up to play this scenario →

Already have an account? Log in

Briefing

Use R_TRIG to count only ONE pulse per press of PUSHBUTTON, even if the scan catches it high for multiple cycles.

Objectives

  • Use R_TRIG_1 on PUSHBUTTON input
  • Drive COUNTER_INPUT from R_TRIG_1.Q
  • PULSE_LAMP must flash one scan only on each press

Hints

  • R_TRIG_1(CLK:=PUSHBUTTON); gives a one-scan-wide TRUE on rising edge
  • PULSE_LAMP := R_TRIG_1.Q

I/O Table

Inputs

PUSHBUTTON

Momentary push-button

BOOL · %I0.0

Outputs

PULSE_LAMP

One-shot pulse output

BOOL · %Q0.0

Your program will be tested against:

All test cases run automatically when you submit. Assertions are hidden until you pass.

  1. #1Pulse on first scan of press

    Pulse on first scan of press

Ready to build this?

Sign up free — no credit card required. This scenario requires the Pro plan.

Sign up to play this scenario →

Already have an account? Log in