Pro
7 min
CCST 09 — Integer Comparison (GEQ/LEQ)
ccstladdercomparisonintegerGEQ
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
SPEED_OK is TRUE when SPEED_INT is between 800 and 1200 RPM (inclusive). Use two comparison instructions.
Objectives
- SPEED_OK := (SPEED_INT >= 800) AND (SPEED_INT <= 1200)
- False when SPEED_INT < 800 or > 1200
Hints
- Use two comparison branches: GEQ(SPEED_INT, 800) AND LEQ(SPEED_INT, 1200)
- In IEC: SPEED_OK := (SPEED_INT >= 800) AND (SPEED_INT <= 1200)
I/O Table
Inputs
SPEED_INTSpeed value (RPM)
INT · %IW0
Outputs
SPEED_OKSpeed in range indicator
BOOL · %Q0.0
Your program will be tested against:
All test cases run automatically when you submit. Assertions are hidden until you pass.
- #1SPEED_OK when at 1000
SPEED_OK when at 1000
- #2Not ok when at 700
Not ok when at 700
- #3Not ok when at 1300
Not ok when at 1300
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