MODBUS TCP Plugin?

Forum rules

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo

Posted on
Mon Jul 02, 2012 4:53 pm
trimixdiver1 offline
Posts: 18
Joined: Jul 02, 2012

MODBUS TCP Plugin?

Has anyone tried to make some sort of plugin for MODBUS TCP? I wish I could and I would.

Thanks

Posted on
Mon Jul 02, 2012 7:04 pm
loafbread offline
Posts: 137
Joined: May 25, 2009

Re: MODBUS TCP Plugin?

I would like to see the same thing.

Posted on
Fri Jul 06, 2012 7:13 pm
trimixdiver1 offline
Posts: 18
Joined: Jul 02, 2012

Re: MODBUS TCP Plugin?

How hard would it be? Jay?

Thanks

Posted on
Fri Jul 06, 2012 7:53 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: MODBUS TCP Plugin?

No idea what the MODBUS protocol even looks like or what types of devices it supports so I couldn't estimate. Perhaps there's other users that have some experience with it that can comment.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Jul 07, 2012 12:18 pm
trimixdiver1 offline
Posts: 18
Joined: Jul 02, 2012

Re: MODBUS TCP Plugin?

jay (support) wrote:
No idea what the MODBUS protocol even looks like or what types of devices it supports so I couldn't estimate. Perhaps there's other users that have some experience with it that can comment.


I have a link to the protocol. I wish I was more software writing savvy. Im a RSLogix geek.

http://www.rtaautomation.com/modbustcp/

http://www.prosoft-technology.com/kb/file.php?id=53

Modbus is a older but widely used way to talk to and control a lot of equipment and devices. Its pretty easy to set up and you can expand the possibilities of Indigo.
It does digital and analog.

Another cool thing is this
http://www.integpg.com/jnior/ethernet_io.aspx

They are ethernet connected, run MODBUS, one wire, have built in IO and have analog and RTD add on modules. There is also a energy software that takes pulses from a KWH meter or water meter and charts it. Also the company is in my backyard in Pittsburgh, and the support is awesome.


I have 10 of them
I think this would be a cost effective way to expand the use of Indigo.

Posted on
Sun Jul 08, 2012 12:03 pm
trimixdiver1 offline
Posts: 18
Joined: Jul 02, 2012

Re: MODBUS TCP Plugin?

Some more info

http://www.control.com/thread/1026206345

I sure wish I could do it, but I don't even know where to start...... :roll:

I know Homeseer was talking about it.... :lol:

Posted on
Tue Jul 10, 2012 1:40 pm
trimixdiver1 offline
Posts: 18
Joined: Jul 02, 2012

Re: MODBUS TCP Plugin?

Here is something relating to Python

http://code.google.com/p/pymodbus/

http://code.google.com/p/modscan/


Again, I wish I could do it, my mind is too full of PLC programming stuff.

Posted on
Mon Dec 03, 2012 7:38 am
loafbread offline
Posts: 137
Joined: May 25, 2009

Re: MODBUS TCP Plugin?

I thought about trying to write a plugin even though I have never written any python and am not a programmer, lol. I didn't get too far.

I installed the pymodbus libraries from here: http://code.google.com/p/pymodbus/
I struggled for about a day to write the code below to retrieve 18 I/O from an ADAM 6050 module and to retrieve numerous power meter values from a Conserv power meter. Most of my time was spent trying to figure out python. In the end it seems to be pretty simple code for the data retrieval. I don't have time or talent to turn it into a plugin.

There are numerous IO devices available that have some advantages. Their hardware is usually rugged and industrial. They usually have builtin opto isolation on the inputs and outputs. They are comparable in cost to the EZIO devices on a per port basis.

I am glad to see Berkinet developing a Phidgets plugin. I think when somebody has time to look at Modbus it would be a nice addition to the Indigo suite.

The Moxa product line looks reasonable: http://www.moxa.com/product/ioLogik_E1212.htm
Here is another device that is reasonably priced: http://gridconnect.com/ethernet-io.html
The ADAM modules are good but require Windows OS to configure.

------ code sample ----

#!/usr/bin/env python

from pymodbus.client.sync import ModbusTcpClient as ModbusClient
from struct import *

# read digital inputs from ADAM 6050 module
print '\n'
print ' read digital inputs from ADAM 6050 module'
print ''
client = ModbusClient('192.168.1.44')
result = client.read_discrete_inputs(0,17)

for i in range(0, 17):
print 'bit:', i, result.bits[i]
client.close()

# read power meter via lantronix Ethernet/ModbusTCP converter
print '\n'
print ' read Conserv power meter via lantronix Ethernet/ModbusTCP converter'

client = ModbusClient('192.168.1.91')
result = client.read_holding_registers(3900, count=100, unit=1)

#print result.registers
print ''
for i in range(0, 56, 2):
f1 = unpack('f', pack('HH', result.registers[i], result.registers[i + 1]))[0]
print "address:", i + 3901, "float", f1
client.close()

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests