Pro
8 min
CCST 07 — One-Shot Rising Edge (R_TRIG)
ccstladderone-shotR_TRIGedge
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
PUSHBUTTONMomentary push-button
BOOL · %I0.0
Outputs
PULSE_LAMPOne-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.
- #1Pulse on first scan of press
Pulse on first scan of press
Related scenarios
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