The Modbus 2 driver is available in form of an FBox library for Fupla. It supports Master and Slave functions with all communication modes: RTU, ASCII, TCP and UDP. The Slave function allows master devices to read and write all Inputs, Flags, Registers and Counters in the Saia PCD®. The Master function allows you to read and write Binary, Integer 16 and 32 bit values as well as Float values from slave devices. The library is delivered with an installation program and includes its description in a Windows help file.
Supported Modbus functions as Slave (and their interpretation)
Supported functions as Master
Reading binary data (coils)
Check that the required functions are supported. Contact Engiby if further functions are desired.
You can read more details about the driver in the help file of the library. Click here to download the help file. Unzip the file on your PC and open the Modbus2.hlp file.
For evaluation purpose the Modbus TCP Driver is available on request. The library will include all described functionalities but a time limited password is delivered. We would appreciate to get a feedback of the result of your test with this package like tested devices, problems found and general conclusion. Thanks in advance.
For a first test and a good start, you can download a project example:
Use the 'Project-Restore…' command in PG5 to restore it.
Choose the CPU corresponding to your application (Master or Slave, RS or TCP). To adapt it to your CPU type, proceed as follow:
- Adjust the Online setting
- Go to the Hardware settings
- Upload the settings
- For Modbus TCP check the IP settings
- For RS ensure that the port in NOT configured as S-Bus PGU
- Download the settings if you made a change
- Go to the Software settings
- Set all to default
- Then, adapt the Modbus driver parameters in the Fboxes (Serial channel, speed, IP-address, Modbus station, etc…) according to your device.
- Build, download and run the PCD.
For a PCD slave, the master should be able to read and write flags and registers.
For a PCD master, open the Send and Receive FBox and click the buttons to execute single requests or set the enable inputs for permanent communication.
In case of questions please refer to the help of each FBox for more details.
The best test to do when you start working with the Modbus Driver is to build a Master-Slave connection using 2 Saia PCD®. You will avoid problems of different terminology and connection pin-out. Connect RS485 terminals in parallel or RS232 terminals crossed over (Tx<->Rx) and use the demo project above. Check the serial lines or TCP channel settings in the Master and Slave FBoxes, build, download and start the programs. It just will work...
When you then connect another system, you must adapt to its terminology, check all communication parameters and prepare a suitable connection.
Saia PCD® Firmware version
The Modbus2 driver is supported on all recent Saia PCD® systems (including "Non Saia-NT systems", with or without PCD7.F65x module):
PCD1, PCD2, PCD3, PCD4 and PCD6. However, for PCD3 systems please make sure the following firware requirements are fullfilled:
- PCD3 FW 1.10.42 or higher for HW A to C
- PCD3 FW 1.14.02 or higher for HW D or higher
- Attention: PCD3 Firmware version 1.28.00 to 1.28.16 cause problem with serial lines. Please update to firmware 1.28.17 or newer
Please contact Saia Burgess Controls for the optimal Firmware version for your system.
Modbus version : RTU, ASCII and J-Bus
The Modbus2 driver supports both the Modbus RTU and ASCII on RSxxx lines.
J-Bus is another name for Modbus and is fully compatible with Modbus ASCII or RTU.
Note that the RTU is two times more efficient as the ASCII. RTU needs an 8 data bits transmission.
Modbus plus cannot be supported. This version need special hardware and can only be connected via a gateway.
Modbus/TCP or UDP
The Modbus protocol over IP originally specified by Schneider uses the TCP protocol. Almost all implementations of Modbus over IP use actually TCP. Although, small data exchange as used by Modbus are faster with UDP packages. Some manufacturers have chosen to implement the UDP/IP as alternative.
With our driver you can choose between TCP and UDP. For a PCD Slave, you can even activate both TCP and UDP. With this option you don’t care on which mode the master uses or you can even accept a mix up of Masters using TCP and UDP on the same system. Remember that UDP communication is much simpler and more efficient than TCP. Therefore, you will have less trouble by using UDP especially if many devices need to be connected.
Several TCP channels
A PCD Slave can support multiple TCP or UDP connection simultaneously. The maximum number of channels is given by the PCD type. See the PCD manual for this information. When using UDP, the number of connected Master is not limited.
Up to 10 PCD Master TCP/UDP functions can be used in the same application.
For each Master function, only one TCP connection is open by the driver. When several slaves are polled, the TCP connection is closed and re-open for each successive slave (not for each successive request). This might be considered as inefficient in some cases. To improve it you have the possibility to place one driver per slave (up to 10). In this case, each driver will have its own channel and will not need to open-close the TCP connection cyclically.
Multi-protocol over the same IP-Module
The S-Bus protocol as well as any other supported protocol can be activated and used at the same time as Modbus on the PCD. The S-Bus protocol is handled by the firmware in parallel with the Modbus driver. The driver can also share the IP-module with other drivers as long as all respect the principle of 'Shared ODM'. Please contact Saia or Engiby in case of questions.
Port 10 as port 3 on PCD3.M5xxx
The PCD3.M5xxx systems have two D-Sub connectors on the left side. The right side connector is equipped as RS485 port. It can be configured for Profibus communication as port 10. If not configured, this port can be used for Modbus (or other protocols) communication but as port 3, in this case.
Basically the Modbus protocol supports 16 bits values. The PCD works with 32 bits registers in integer and floating point formats. Therefore, special options have been implemented in order to exchange 32 bits integer and float values. The most PLCs and slave devices on the market have implemented the following: 2 * 16 bits registers are used to transfer one 32 bit value.
Depending on the manufacturer, various terms are used to specify the word order for 32 bits values.
FBox option: Big Endian = LSW-MSW = Intel, e.g. used by Modicon
FBox option: Little Endian = MSW-LSW = Motorola, e.g. specified by IEEE
32 bits values - PCD as Slave
Without special configuration, 16 bits values are converted into 32 bits signed values when received in the Saia PCD®. To be able to exchange 32bit values you need to:
- select the suitable option (Little/Big endian) in the Slave Application FBox
- define an address offset for 32 bit integer and one for float values
- the master must apply this offset to the register base address when reading or writing 32 bit values
32 bits values - PCD as Master
Without special configuration, PCD 32 bit values are truncated to 16 bits. This means that the values must be limited in range from -32'536 to +32'535. To be able to exchange 32 bit values, you need to:
- select the suitable option (Little/Big endian) in the Driver FBox
- use the suitable conversion option in RCV FBox
To exchange float values, use the Float FBox (you will receive float values in PCD format) or use the Integer RCV FBox and select the conversion option 'Float*10->Int 32'.
Prices and updates
Prices of licenses and update can be found on the Modbus page.
The driver is delivered with a license valid for PG5 version 2.0, 2.1, 2.2 or 2.3. Up to 3 license keys within one year can be received with one purchase.
The number of realized applications is not limited.
The old license for Modbus 1 package, version 1.0x, to 1.7x, cannot anymore be updated.
If you have such a version, you need to purchase a Modbus 2 license (no modifications to the PCD user program are necessary, see below).
Existing Modbus 1 application on PG5 2.0
The Modbus 1 driver is now obsolete. If you start a new application with Modbus use the Modbus 2 package.
For upward compatibility of existing applications on PG5 2.x, you can install a Modbus 1 package as extension to Modbus 2 and keep your applications unchanged.
Proceed as follow:
- Order, download and install an upgrade of Modbus 2 package for PG5 2.0
- Download and install this Modbus 1 package on PG5 2.x (no key is required)
- Import your application in PG5 2.x
- Build your application as usual under PG5 2.x
The same principle is also backward applicable on PG5 1.4 but only if you have also installed Modbus 2 on this PG5 !
Further useful information about Modbus
If you search for more information about the various Modbus protocol visit the Modbus organization sites at www.modbus.org.
When you will build up your first Modbus installation, you may wish to test the Modbus driver in the PCD first. You can find very useful test software, called ModScan32, for little money by WinTech at www.win-tech.com. Further tools are available from the Modbus sites indexed above.
Planned features and actual state
|Multi Master, Multi Slave for several RSxxx lines
|Multi Master, Multi Slave for TCP or UDP channels
|Support of 2 IP-Modules on PCD2.M480
|Adjustable baudrate and Bits setting in runtime
Available for Master
|Read+Auto Send on change mechanism
|Support of high baudrates 57,6 and 115,2 kbds
| Supports of extended ranges.
Registers up to 16383
Flag up to 16383 (with option 16 bit addressing)
|Support of extended flag range 8192 to 14335
|FB calls for IL programming
|Engiby configurator (Microsoft Excel)
|Virtual Slave with up to 16k registers in DBs
|S-Bus Master Gateway
|Implementation of particular application or gateway
Modification history to the Modbus2 driver
The version history and the modifications can be found on the Modbus 2 History page.