View unanswered posts | View active topics It is currently Tue May 21, 2013 11:37 am



Reply to topic  [ 8 posts ] 
 MODBUS TCP Plugin? 
Author Message

Joined: Jul 02, 2012
Posts: 18
Post MODBUS TCP Plugin?
Has anyone tried to make some sort of plugin for MODBUS TCP? I wish I could and I would.

Thanks


Mon Jul 02, 2012 4:53 pm
Profile

Joined: May 25, 2009
Posts: 96
Post Re: MODBUS TCP Plugin?
I would like to see the same thing.


Mon Jul 02, 2012 7:04 pm
Profile

Joined: Jul 02, 2012
Posts: 18
Post Re: MODBUS TCP Plugin?
How hard would it be? Jay?

Thanks


Fri Jul 06, 2012 7:13 pm
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6651
Location: Austin, Texas
Post 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)
Image


Fri Jul 06, 2012 7:53 pm
Profile WWW

Joined: Jul 02, 2012
Posts: 18
Post 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.


Sat Jul 07, 2012 12:18 pm
Profile

Joined: Jul 02, 2012
Posts: 18
Post 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:


Sun Jul 08, 2012 12:03 pm
Profile

Joined: Jul 02, 2012
Posts: 18
Post 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.


Tue Jul 10, 2012 1:40 pm
Profile

Joined: May 25, 2009
Posts: 96
Post 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()


Mon Dec 03, 2012 7:38 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.