Pro
15 min

Modbus Register Read — Drive Status

vfdmodbusfieldbusstatus-mappingindustrial

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

Modbus Register Read — Drive Status scenario preview

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_RUNNING

Modbus: drive spinning (speed > 0.5 %)

BOOL · %I0.0

MB_FAULTED

Modbus: drive fault active

BOOL · %I0.1

MB_AT_SPEED

Modbus: drive at reference speed

BOOL · %I0.2

Outputs

RUN_LAMP

Panel lamp — drive running

BOOL · %Q0.0

FAULT_LAMP

Panel lamp — drive fault

BOOL · %Q0.1

SPEED_LAMP

Panel lamp — drive at speed

BOOL · %Q0.2

FEED_OK

Feeder 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.

  1. #1Panel lamps mirror Modbus status bits

    Set each Modbus input individually and verify the matching lamp turns on.

  2. #2FEED_OK = MB_RUNNING AND NOT MB_FAULTED

    FEED_OK on when running, off when faulted.

  3. #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.

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

Runnable simulator field guide

Modbus register-read PLC scenario: test checklist

Direct answer

The learner can separate transport, device identity, data object and interpretation, then diagnose silence, exception, implausible value and stale data.

Written for pLC and communications learners building a bounded read transaction and tracing the result into an engineering tag.

an industrial communications and supervisory-control lab joining a process tank, PLC, network path and operator display for end-to-end data validation while studying Modbus register identity, function, offset, type conversion, quality and freshness
System map / 02

NODE 01observable

Scenario setup

Client and server identity, TCP or RTU transport, unit identifier, function, documented label, protocol offset, quantity, data type, byte and word order, scale, unit and freshness.

NODE 02observable

I/O and state map

Known server value through request, response, raw registers, conversion, engineering tag, timestamp, quality and consuming logic.

NODE 03observable

Normal run

One documented point returns the expected words and converts to a plausible current value under a controlled reference condition.

NODE 04observable

Boundary run

Timeout, wrong unit, illegal function, illegal address, quantity overflow, signed value, swapped words, server restart, stale cache and reconnect.

NODE 05observable

Injected fault

A physical, transport, identity, function, address, quantity, type, order, scale, unit, quality or freshness mismatch.

NODE 06observable

Target check

The transaction checked against current device documentation, captured frames and production application behavior.

Answer surface / 07

How do you read a Modbus register in a PLC?

Define server identity, supported read function, zero-based offset, quantity, type, order, scale and unit, then verify the result against a known condition.

Why can a Modbus register read succeed but show the wrong number?

The transport can succeed while signedness, word order, scale, unit or point mapping is incorrect.