How-to
Configure a VFD for Modbus RTU control from an S7-1200 PLC
Short answer
A VFD obeys run and speed writes from an S7-1200 over Modbus RTU only after its control source and speed reference source point at the serial network; factory settings leave them at the terminals, which gives a link that reads cleanly while the motor never starts. Give the drive a unique slave address, match baud, parity and stop bits to the MB_COMM_LOAD port, then run six commissioning checks, unloaded, before coupling the load.

On this page
Configuring the VFD, not the PLC, is where this link is won: set the drive's control source and its speed reference source to the serial or Modbus option, give the drive a unique slave address, and match its baud, parity and stop bits to the S7-1200 port you configure with MB_COMM_LOAD. Factory settings point both sources at the terminals or the keypad, which is why a fresh link reads cleanly over RS485 while the motor never starts. The sequence below proves the drive on its own, then brings the master code up, and finishes with an unloaded run and a link-loss test before you couple any load.
How the pieces fit on the S7-1200 side #
An S7-1200 CPU carries the Modbus RTU and Modbus TCP instructions, and its onboard PROFINET port serves Modbus TCP without extra hardware. Modbus RTU is serial: it needs an RS232 or RS485 communication module or board, and one S7-1200 carries up to three serial communication modules plus one communication board; in a tight cabinet that board is the CB1241 RS485 option, which adds the port without using a slot. If the drive side turns out to be Ethernet, the PLC-side configuration is a different job — what you must configure on the PLC side for Modbus TCP — and the rest of this article stays on the RTU wire.
The serial port itself is configured by the MB_COMM_LOAD instruction, called once for each port you use, each call bound to its own instance data block; one load call and one instance per port is a documented requirement, not a preference. Siemens publishes an application example that pairs a SINAMICS V20 with an S7-1200 over Modbus RTU, Industry Online Support entry ID 63696870, and its data-block layout and call order are a sound template even for a drive of another make.
Drive parameters to set before the first request #
Parameter numbers differ from drive to drive, so find these by function in the drive's own commissioning manual and write down each number with its scaling and data type. A Modbus slave answers reads almost regardless of its control configuration, but it obeys written run and speed commands only when the control source and the speed reference source point at the serial network. That mismatch is the most common first-commissioning failure, and it is the subject of why your VFD ignores Modbus RTU start commands from a PLC.
| Parameter, found by function | Required state | Symptom when wrong |
|---|---|---|
| Control or start/stop source | serial or Modbus network | reads work, run bit ignored |
| Speed reference source | serial or Modbus network | drive runs at keypad or analog speed, written speed ignored |
| Serial protocol | Modbus RTU | no response at all |
| Slave address | unique, in the 1 to 247 range | silence, or the wrong device answers |
| Baud, parity, stop bits | identical to the PLC port | timeouts, framing or CRC errors |
| Communication-loss timeout and action | set deliberately, tested in check 6 | an unrequested trip, or an uncontrolled coast |
| Register map entries | control word, speed reference, status word, output frequency, fault code, scaling, data type | writes land on the wrong register |
Two rows deserve a note. The Modbus serial line specification's default is 19200 baud, 8 data bits, even parity and one stop bit, with two stop bits where a device runs without parity; whatever your drive actually uses, both ends must match exactly, and a slave that answers only under one parity setting is a documented pattern — why a DL05 Modbus RTU slave answers only with ODD parity. Keeping start and stop on digital inputs while the link carries only the speed reference is also a legitimate design with its own wiring rules; splitting VFD speed and start stop between Modbus and digital inputs covers it.
Wiring the RS485 bus #
Run the bus as a daisy chain: A to A and B to B at every node, plus the signal common when the drive provides one, and keep the cable one continuous shielded twisted pair. Terminate the two physical ends only, with the resistance the drive manual specifies — 120 ohms is the usual value on twisted pair — and leave every middle node unterminated. No star taps or long stubs: every drop off the trunk invites exactly the reflections that show up as CRC faults on a read.
The commissioning sequence #
Work through the checks in order; each assumes the previous one passed. Keep the motor uncoupled and the drive keypad within reach as your local stop until check 6 passes.
- Prove the drive answers on its own. Connect a PC Modbus master tool through a USB-to-RS485 adapter, set the tool to the drive's slave address and serial settings, and issue a function 03 read of the output frequency register. A timeout means wiring or identity: swap A and B, since polarity labels differ between vendors, then re-verify the address, baud, parity and that the serial protocol is enabled. Framing or CRC errors point at a parity or stop-bit mismatch or missing termination. An exception response is progress: the link works and the register number is wrong.
- Configure the PLC port. Call MB_COMM_LOAD once from startup logic with PORT set to your module or board and BAUD and PARITY identical to the drive's, bound to its own instance data block, and set the response timeout input RESP_TO above the drive's slowest documented reply.
- Enter register addresses in the base your tool expects. The conversion is short but it decides read versus garbage, and it is worked below. If MB_MASTER reports error 16#8188, treat the address entry as the first suspect and work through why MB_MASTER on an S7-1200 reports Modbus error 16#8188 before touching the wiring.
- Sequence the requests. Call MB_MASTER cyclically, one request at a time: REQ on a rising edge, MB_ADDR at the drive's slave address, MODE set to read or write, DATA_ADDR at the starting register, DATA_LEN at the register count, DATA_PTR at a data-block buffer. A serial port carries one request at a time, so raise the next REQ only after DONE or ERROR reports; overlapping requests on one port are exactly how a Modbus RTU read and write on one port drops VFD control. Decode STATUS from the Siemens instruction documentation whenever ERROR is set, and a timeout there sends you back to check 1.
- Write the speed reference with the run inhibited. From the PLC, write a low speed reference; the drive's reference display must show the written value at the scaling your map states, and the motor must stay stopped. Read the status word and the output frequency back and confirm the PLC buffer agrees with the drive display.
- Run unloaded, then pull the link. Set the run bit: the motor accelerates to the written speed and the status word reports run. Clear it: a controlled deceleration to zero. While it runs, open the RS485 pair: the drive must take the communication-loss action you configured — trip, controlled stop or hold — after its configured timeout, and raise its communication fault. A drive that runs on indefinitely has no working loss detection, and that must be fixed before the load is coupled.
Worked example: entering a holding register the drive manual lists as 40101 #
The inputs: your drive's register map lists the speed reference as holding register 40101 — an example number, illustrative only; read the real one from your own map — and the map follows the standard Modbus convention that numbers holding registers from 40001, while the wire protocol addresses registers counting from zero.
The rule in words: wire address = listed number minus 40001. The arithmetic: 40101 - 40001 = 100. The result: the register sits at wire address 100 and is the 101st holding register on the device.
The decision: enter 100 wherever the tool asks for the zero-based address and 40101 wherever it asks for the 40001-style number; both name the same register, and the response tells you which form was wanted. A timeout means the link, not this number, is at fault — go back to check 1. An exception response means the address or the count is out of range for this device. Plausible but frozen data, a frequency reading that never moves while the drive display changes, means you are one register off: recompute the offset instead of stepping through registers one by one.
The two parameters that decide success #
When reads pass but the motor never starts, the first suspects are the two parameters this article opens with: the control source and the speed reference source still pointing away from the network, or a register map written for another model. Set those two sources first, prove the drive alone, then bring the master code up in that order, and a first commissioning turns into six short checks with a decision at each one.
Questions asked
Can one RS485 port control several drives?
Yes. Daisy-chain every drive on the same pair and give each a unique slave address in the 1 to 247 range. The port still carries one request at a time, so each extra drive shares the same cycle time and every update slows as the chain grows. Give the speed reference and status reads the front of the polling order, and leave slow-changing values such as fault codes for the end of the sequence.
What should the drive do when the Modbus link drops?
Decide that before commissioning. Trip on communication loss is the right default for most machines: the drive stops on its own ramp and raises its communication fault once the timeout expires. Hold last speed or a coast stop belongs only where the risk assessment accepts that response. A drive that keeps running after the pair is opened has no working loss detection, and it must be corrected before loaded operation.
Which function codes move speed and status on a typical drive?
Drives expose the control word, speed reference, status word and output frequency as holding registers, so function 06 writes one register, function 16, hexadecimal 10, writes several in one request, and function 03 reads them back. The register numbers, scaling and data type come from that drive's own register map, not from another model's, even within the same range from the same manufacturer.
Is there extra hardware if I use Modbus TCP instead?
Not on the PLC side: the S7-1200's onboard PROFINET port carries Modbus TCP and the CPU includes the TCP client instructions. The drive needs an Ethernet option, the drive acts as the server and the PLC as the client, and the drive-side control source and speed reference source still have to point at the network before writes take effect.

