Implement modbus output
- This topic has 1 reply, 2 voices, and was last updated 5 years, 4 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forums › Conduit: AEP Model › Implement modbus output
Tagged: modbus output pyModbusTCP
Hi,
I would like to implement a modbus slave on my gateway. The idea is to pass my sensors data on a modbus output, that a software will then access.
I read this topic : http://www.multitech.net/developer/forums/topic/modbus-tcp-with-node-red/ and found out I can’t use node-red to do so.
So the idea, I guess, is to use pyModbusTCP, but is there other ways to do so ? Is there ressources given by multitech or other to do this ?
My other question is how do I access to my modbus : I access my gateway with 192.168.2.1, but how can I poll the slave on 127.0.0.1 ? What are the requierements ?
Does anybody have any ressources that could help me ?
Thank you,
Justine
Hello Justine,
I would recommend that you have your pyModbusTCP slave post a listen on the appropriate interface (probably 192.168.2.1 since it sounds from your description that you access the device that way.) You should pick a port to listen on. My recommendation is port 1502 or 502 since that is what some applications use for modbus. You would also need to create a firewall Input Filter rule to allow modbus traffic to the port you pick.
You can package your python modbus application up as a custom application (http://www.multitech.net/developer/software/aep/creating-a-custom-application/) if you want to be able to install the application from Device HQ.
The libmodbus library is also available on the Conduit to build C/C++ applications, but unless you have a good reason to go that route Python is a good way to go for implementation.
Hope that helps.
Jeff