SPLat Logo

ModBus: Master configuration

NOTICE: Our web site is being updated, but is currently experiencing extreme slowness due to host issues. Please contact us directly.
NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map
SPLat will be shut down for the Christmas Holiday season from Friday 20 December 2024 through Tuesday 7 January 2025. We will check emails periodically and will continue to process orders but at a slower pace. Santa hat

ModBus: Master configuration

To set up a SPLat to be a ModBus master you need to do two things:

  1. Configure a Communications Control Block.
  2. Create a control script.

A ModBus master control script is stored in NVEM page 0 memory. You can think of the script as being a simple program in a special purpose language. Most script commands specify a ModBus message to be sent, a slave address, its data content and what is to happen to any data returned by the slave. A small number of script commands perform housekeeping actions.

While control scripts may at first appear rather complicated, they do in fact make life easier. Without control scripts you would have to write a separate task to manage communications. With a control script you essentially specify the messages you need and the system takes care of the rest. Any remaining complexity stems from the nature of ModBus and the need to map out the relationships between various items in master and slave(s).

The full repertoire of ModBus script commands is listed in the programming reference.