Modbus Communication With Gateway

Ignition 8.1.39 - Windows 10

Hello, I am trying to talk to an old Motorola MOSCAD controller which has been using Modbus RTU communications on an old iFix system.

The MOSCAD controller is (as far as I can tell) the master of the Modbus RTU communication protocol. It issues read/write requests to several remote stations to pull alarm data, etc.

When we decided to upgrade to Ignition, we opted for a Modbus gateway (SGW-MB1524-T) which converts the traffic between Modbus TCP and Modbus RTU.

I'm having some trouble getting any information read in from the MOSCAD controller at this time. Ignition is connected to the Modbus gateway with no issues.

Here is the old iFix configuration:

** General **
Device Driver: Modbus RTU Serial
Name: Device0
ID: 1 (Decimal)

** Settings **
Settings > Data Access
Zero based addressing enabled
Zero based bit addressing within registers enabled
Using modbus function 06 for single register values
Using modbus function 05 for single coil writes

Settings > Data Encoding
Using default modbus Byte order
Using first word low in 32 bit data types
Using First Dword low in 64 bit data types

** Block Sizes **
Output Coils: 32
Input Coils: 32

Internal Registers: 32
Holding Registers: 32

** Channel Properties **
ID: COM 3 (This PC running Ignition is entirely seperate from the one running iFix so not sure if this applies)
Baud Rate: 9600
Data bits: 8
Parity: None
Stop Bits: 1
Flow Control: None

Here are some images of the Modbus Gateway configuration web portal:




Here is how I have attempted to set up the device in Ignition:

Finally, here is a Wireshark Capture which displays Error:Gateway target device failed to respond.

Ignition's driver uses unit ID 0 by default, but it looks like your serial device is unit ID 1.

Prefix the unit ID on all your addresses like this:

[DeviceName]1.C1
[DeviceName]1.HR1

etc...

I've added this to my tags and I now see in Wireshark that it is requesting the correct unit, however, I still cannot see values from this controller.

I'm getting the same Modbus exception code as before: Gateway target device failed to respond

This is the gateway telling you the downstream device didn’t respond. If the address and unit are definitely correct you’ll have to troubleshoot the gateway instead. Make sure the serial settings are correct, etc…

Thank you for the response.

Is Ignition always going to be the master device under a Modbus communication scheme?

Yes. There is a third party module offered by @pturmel that offers a Modbus slave/server option as well, but it seems clear from everything you've posted that's not what you need here.

1 Like

Thank you for the response.

I messed around with some settings and I was able to read values from holding registers, input registers, and discrete inputs, however, for whatever reason I still cannot read from a coil.

1 Like