PLCSIM setup

You cannot learn Modbus from a diagram alone. At some point you need a device on the other end of the wire that answers, refuses, or says nothing at all. PLCSIM (the PLC Simulator on the LearnSCADA store) gives you that device, with a free two-hour trial, in about the time it takes to read this paragraph.
Most people learning Modbus hit the same wall. The book makes sense, the function codes make sense, and then there is nothing to poll. A spare PLC costs money. A meter on the plant floor is not yours to experiment on. Desktop simulators work, until you need one that Ignition on a cloud gateway, a Raspberry Pi on your bench, and a laptop on almost any network can all reach at once.
PLCSIM is the LearnSCADA answer to that. It is a hosted Modbus TCP server that you start from your browser and poll from anywhere. You sign in with a free LearnSCADA store account to get started.
What PLCSIM is
PLCSIM runs real Modbus TCP sandboxes at sim.learnscada.com. When you start one, you get your own server with coils, discrete inputs, input registers, and holding registers, plus a web dashboard where you can watch the values and change them by hand.
- Free two-hour trial. Every store account gets two hours of run time, one time. You can spread those two hours over several sessions, which is enough to work through a few chapters with a live device answering. A trial simulator stops after 10 minutes with no dashboard open and no Modbus connection, so idle time does not use up your two hours.
- Your own simulator for $97. A one-time purchase, no subscription, buys your own private Modbus simulator: a permanent Modbus port, writes allowed, and your own configuration kept between runs. Sessions run up to 12 hours and you can restart any time. A sim that sits idle for 30 minutes stops on its own.
- Any client works. Point Ignition, pymodbus, Modbus Poll, Node-RED, or your own code at the host and port the dashboard shows you. It is standard Modbus TCP, so if your client speaks Modbus, it speaks to PLCSIM.
- You can see both sides. Write a holding register from your client and watch it change on the dashboard. Change a value on the dashboard and watch your client pick it up on the next poll. That loop is where Modbus stops being abstract.
You can see it working before you sign in: books.learnscada.com/sim shows a live water-plant graphic of the shared demo. Your own dashboard adds a Plant panel where the tank, valves, pump, and FILL, HOLD, and FEED step indicators move as your client writes, with AUTO/MANUAL and pump and valve controls. A second built-in sample runs the tank as a fill, hold, feed cycle with live speed and hold-time settings. The step-by-step PLCSIM user guide is a free PDF download.
Your first poll
Start a sandbox and note the host and port on the dashboard. From Python, five lines get you a live read:
from pymodbus.client import ModbusTcpClient
client = ModbusTcpClient("sim.learnscada.com", port=PORT_FROM_DASHBOARD)
client.connect()
rr = client.read_holding_registers(0, count=10)
print(rr.registers)
That one call puts twelve bytes on the wire. This is the request, byte for byte:
The first seven bytes are the MBAP header. The amber bytes are the PDU: read holding registers, starting at address 0, ten registers. Modbus TCP carries no CRC; TCP handles error checking.
The unit byte depends on your pymodbus version. Versions 3.6 through 3.9 send unit 0 when you do not set one; newer versions, which call it device_id, send unit 1. The frame above is from pymodbus 3.10 or later; 3.6 through 3.9 send 00 in that byte. PLCSIM answers on any unit ID, so the read works either way.
In Ignition, add a Modbus TCP device connection on the gateway, give it the same host and port, and browse or address the tags. One thing to watch: Ignition addresses are one-based by default, so HR1 reads the register the Python call above calls address 0. That off-by-one has cost more commissioning hours than any wiring fault, and it is far cheaper to learn it on a sandbox than on a live pump station.
Where the course comes in
PLCSIM gives you a device. Understanding Modbus teaches you what to do with it.
The course follows the book chapter by chapter, all 19 of them, with animated figures you can step through, browser tools that build frames and decode registers, and a short check at the end of each chapter. Enrolling includes the complete book as a PDF. The two together cover the gap most training leaves open: the course explains the idea, and the sandbox lets you prove it on a real server before you move on.
A few places where the pairing pays off fast:
- Data model and addressing. Read the same register from Ignition and from Python and reconcile the numbers until zero-based and one-based addressing stop surprising you.
- Data types and word order. The default water-tank sample uses only 16-bit registers, so first upload a workbook with a float32 tag. The template's Instructions sheet shows how; then open the Workbooks panel, choose Upload, and Activate it. Set the float on the dashboard, read the two registers raw, then decode them both ways. You will see exactly what a swapped word order looks like.
- Troubleshooting. Every Modbus request ends in one of three outcomes: data, an exception, or silence. Every address from 0 to 9999 exists in all four PLCSIM tables, so an unmapped address in that range simply reads 0. Ask for an address above 9999 and PLCSIM answers with exception code 02, Illegal Data Address. Point your client at a port outside PLCSIM's range, such as 5020, and the request times out: that is silence. Practicing all three on purpose is how you learn to tell them apart at 2 a.m.
- The pump-station project. The book's project chapter (chapter 15) monitors a pump station in Python. New PLCSIM simulators start with a pump-and-tank sample, so the station has a live device behind it instead of a mock.
Try both before you pay for anything. PLCSIM's two-hour trial is free, and Part I of the course is free to preview. Run the opening chapters against a live sandbox and decide from there.
What comes next
Modbus is the first protocol on PLCSIM because it is the one every controls engineer meets first. The $97 purchase is available today and gets you your own private Modbus simulator. Allen-Bradley CIP for Logix tags and a controller emulator are coming later to the paid version, and Ignition users will be able to browse simulated Logix tags the same way they browse a real ControlLogix.
PLCSIM and the Understanding Modbus course run on the LearnSCADA store at books.learnscada.com.
Get new LearnSCADA articles
New articles on SCADA, Ignition, alarm management, and industrial data, by email. No spam. Unsubscribe any time.
Comments
No comments yet. Start the conversation.