Modbus Register Read — Drive Status
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
A Modbus RTU comms card is mounted in the PLC rack and connected to the drive over RS-485. On every PLC scan the card reads the drive status register and maps three bits into BOOL inputs that your ladder can use directly: | Input | Meaning | |-------|---------| | **MB_RUNNING** | Drive output frequency > 0 (motor spinning) | | **MB_FAULTED** | Drive has an active fault code | | **MB_AT_SPEED** | Drive has reached the commanded speed reference | Your ladder task is straightforward — wire the panel and the feeder permissive: 1. **RUN_LAMP** mirrors MB_RUNNING. 2. **FAULT_LAMP** mirrors MB_FAULTED. 3. **SPEED_LAMP** mirrors MB_AT_SPEED. 4. **FEED_OK** — feeder permissive: MB_RUNNING AND NOT MB_FAULTED. Note: FEED_OK also serves as the drive RUN command. The physics engine uses it to start/stop the drive, closing the feedback loop.
Objectives
- RUN_LAMP := MB_RUNNING
- FAULT_LAMP := MB_FAULTED
- SPEED_LAMP := MB_AT_SPEED
- FEED_OK := MB_RUNNING AND NOT MB_FAULTED
Hints
- Each lamp is a single contact-to-coil rung: | MB_RUNNING | := RUN_LAMP ;
- FEED_OK needs a NOT (NC contact): | MB_RUNNING AND /MB_FAULTED | := FEED_OK ;
I/O Table
Inputs
MB_RUNNINGModbus: drive spinning (speed > 0.5 %)
BOOL · %I0.0
MB_FAULTEDModbus: drive fault active
BOOL · %I0.1
MB_AT_SPEEDModbus: drive at reference speed
BOOL · %I0.2
Outputs
RUN_LAMPPanel lamp — drive running
BOOL · %Q0.0
FAULT_LAMPPanel lamp — drive fault
BOOL · %Q0.1
SPEED_LAMPPanel lamp — drive at speed
BOOL · %Q0.2
FEED_OKFeeder permissive (also drive run command)
BOOL · %Q0.3
Your program will be tested against:
All test cases run automatically when you submit. Assertions are hidden until you pass.
- #1Panel lamps mirror Modbus status bits
Set each Modbus input individually and verify the matching lamp turns on.
- #2FEED_OK = MB_RUNNING AND NOT MB_FAULTED
FEED_OK on when running, off when faulted.
- #3FEED_OK → physics drives MB_RUNNING (feedback loop)
When FEED_OK=true the physics engine spins the drive; MB_RUNNING goes high and RUN_LAMP lights.
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