advertisement
from the Forum department...
Writing to Modbus Input Registers via TCP/IP
Communications systems and equipment. topic
Posted by Mnoob on 16 August, 2012 - 4:14 pm
Is it to write to a modbus slave's input register through TCP/IP?

I am trying to write a software that will allow the forcing of physical DI points on a PLC through modbus TCP/IP. Any input on how to do this is greatly appreciated. Thanks.


Posted by Mark on 16 August, 2012 - 9:39 pm
Hello,

I have never seen a function code to write to 3XXXX registers.

Good luck,

Mark
http://www.peakhmi.com/


Posted by Mark on 16 August, 2012 - 10:33 pm
Hello,

Re-read your post; I have never seen a function to write 1XXXX registers.

Good luck,

Mark
http://www.peakhmi.com/


Posted by Mnoob on 17 August, 2012 - 12:20 am
Is this a Modbus protocol specific? Is it possible to change the function code for the Modbus server to achieve this? Or is this limited to the PLC? Thanks.


Posted by Mark on 17 August, 2012 - 11:38 am
Hello,

>Is this a Modbus protocol specific? Is it possible to change the function code for the Modbus server to achieve this? Or is this limited to the PLC?<

MODBUS is a communication protocol specification. It does not provide for writing inputs. It has a defined set of functions.

I have seen devices that map all memory types to the same locations. So, writing to coil 1 is the same as writing to input 1.

The issue is on the next I/O scan the state of the real input writes over whatever you just did.

What you are trying to do is called a 'force'. This is generally PLC specific.

The MODBUS protocol does not have any provisions for 'forces'.

Good luck,

Mark
http://www.peakhmi.com/


Posted by pvbrowser on 17 August, 2012 - 2:12 am
This is not related to modbus only. It is related to all remote i/o.

A output signal on a remote i/o might be read. But you can't write a input signal.


Posted by Michael Batchelor on 17 August, 2012 - 10:26 am
Technically you can if you aren't paying attention in your programming. It just doesn't work.

And if you aren't paying attention, you can really hose things up bad if you're doing it in a home grown VB package.

Got scars to prove it.


Posted by Lynn August Linse on 17 August, 2012 - 12:51 pm
>Is it to write to a modbus slave's I am trying to write a software that will allow the forcing of physical DI points on a PLC through modbus TCP/IP.<

Modicon supports 'forcing' (or 'simulation' or 'faking') inputs on a PLC, but I think they use vender-specific Function 0x7E with some undocumented sub-function.

Your only option is to use a Modicon tool with Wireshark and try to reverse engineer how they 'force' an input.


Posted by David Kempf on 15 September, 2012 - 6:54 pm
This is the exact problem Port40's Automation Enterprise Management was meant to solve.

You are still going to need enable each of your sites with outbound access to the Internet - there is simply no way around it. Port40's Enterprise client does that in an IT friendly way - HTTP, SSL, and web services.

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2013 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.


Fortune
It's easier to fight for one's principles than to live up to them.
Advertise here
Advertisement
our advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive