Modbus TCP/IP on X4 via DIA

Hello,

I have a ConnectPort X4. I would like to set up a custom DIA device to speak modbus TCP/IP to a bunch of PLCs, collect all the data, and put it out into the iDigi cloud. I figure this is the sort of thing that has been done before, but can’t seem to put my finger on a good example. Can someone point me in the right direction?

Thanks,

Mike

You have seen these, right:
http://www.digi.com/wiki/developer/index.php/Category:Modbus
http://www.digi.com/wiki/developer/index.php/Modbus_Dia_Client

My client code will poll (pull) remote words in via Modbus, then parse these into Dia channels. It uses the IA engine, which adds a bit of config work, but allows it to support any collection of Modbus/TCP, UDP, RTU and ASCII via Ethernet, serial or even XBee RS232/485 adapters.

The IA engine support 802.15.4, Zigbee, and DigiMesh - but Dia currently only works with Zigbee.

I had seen the Category:Modubs page, but there is a lot of information there and I was having a hard time finding what I needed.

The Modbus Dia client is exactly what I was hoping to find (and hadn’t). However I have a simple question. Is the source code for driver: devices.modbus.mbus_udp_device:MBusUDPDevice available? Surely this is where the UDP modbus requests are made and the channels are defined.

Thanks for your help

Mike

It is on this page:
http://www.digi.com/wiki/developer/index.php/Modbus_Dia_Code_Add-On

This includes both the server and client, but the dia.zip will only contain the files required. There should be some readme’s in the ZIP, plus the ZIP include sub-directories so it is designed to copy on top of your Dia source files.

Lynn,

I’m probably making a newbie mistake, but I followed all the instructions on http://www.digi.com/wiki/developer/index.php/Importing_Modbus_data_from_IO_device including all updates to my CP X4.

When I run the sample Python I get the following:

Core: Starting Channel Manager…
Core: Starting Device Driver Manager…
ERROR:AbstractServiceManager:Exception during dynamic class load: Traceback (most recent call last):

It doesn’t seem to find: devices.modbus.mbus_udp_device:MBusUDPDevice.

I checked dia.zip in the X4 and it has the right files (devices/modbus/mbus_udp_device).

Am I missing something?