Pro
10 min
CCST 27 — Speed Reference Scaling
ccstmotionanalogscalingVFD
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
An analog speed reference SPEED_REF_RAW (0-32767) must be scaled to 0-60 Hz for SPEED_HZ output. Apply linear scaling.
Objectives
- Scale SPEED_REF_RAW (0-32767) to SPEED_HZ (0-60)
- Use integer math: SPEED_HZ := (SPEED_REF_RAW * 60) / 32767
Hints
- Multiplication before division to avoid truncation to zero
- INT result: SPEED_HZ := INT(SPEED_REF_RAW * 60 / 32767)
I/O Table
Inputs
SPEED_REF_RAWRaw speed reference (0-32767)
INT · %IW0
Outputs
SPEED_HZSpeed reference in Hz (0-60)
INT · %QW0
Your program will be tested against:
All test cases run automatically when you submit. Assertions are hidden until you pass.
- #1Full ref = 60 Hz
Full ref = 60 Hz
- #2Half ref ≈ 30 Hz
Half ref ≈ 30 Hz
- #3Zero ref = 0 Hz
Zero ref = 0 Hz
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