Modbus Mode

Modbus is a communication protocol supported by many popular PLC's and HMI's and is an easy way for the host to command and query our motion control products. Commanding a point to point move is as simple as loading motion parameters such as move speed and distance into registers, transferring the data to the drive and sending a "go" command. You can even start and stop Q programs stored in the drive. Example programs and application notes are available on our website.

Modbus/RTU is currently available on the STM24QF and SWM24QF. For details, please refer to the Modbus Manual. Firmware version 1.06 or later is required for Modbus support.

Even though our Modbus implementation allows you to control and monitor all aspects of the drive from your host device, this dialog allows you to chose an initial command mode such a pulse/direction, velocity control or point to point positioning. You can also pre-configure I/O such as end of travel limit sensors and the fault output.

Slave Address

Modbus slave addresses 1 through 32 are supported by our products. The slave address is set using ST Configurator's Modbus dialog. If you plan to install Q segments in your drive, and your drive is an RS-485 type, you'll need to check the "Use Address" box in the Q Programmer software and provide the drive's "SCL Address" as indicated in the Modbus dialog. For example, if you set the Modbus slave address to 13, the corresponding SCL address is the equals sign ("=").

Big Endian, Little Endian

Modbus transfers 16 bit words. That’s great for parameters like speed or acceleration because they are 16 bits. But move distance (DI) is 32 bits in our drives, as are some of the monitor values. Modbus is happy to move more than 16 bits of data at a time, but we need to pay attention to word order or we may be in for some unpleasant surprises.
In our Modbus implementation, we default to having the big end of 32 bit values in the first word of memory. That’s big endian. Consider, for example, setting DI for 100,000. That’s 000186A0 hex, which is logically divided into the 16 bit words 0001 and 86A0. The big end of the word (the most significant word, or MSW) is 0001 and it goes into the first register location, 40031. The little (least significant) end is 86A0 and that goes into the second word, 40032.

Great, but what if the HMI has other ideas? In fact,some PLCs and HMIs use little endian word order for 32 bit values, so if you write 100,000 to a memory location, it will write the little end (LSW) first and the drive will see it as 86A00001. Not good. 86A00001 hex equals 2,258,632,705 decimal. That’s a very long move.

To keep things simple for the PLC or HMI programmer, ST Configurator allows the user to select the word order that works best with their PLC or HMI.