Writing to Modbus Input Registers via TCP/IP

M

Thread Starter

Mnoob

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.
 
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.
 
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.
 
M

Michael Batchelor

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.
 
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/
 
L

Lynn August Linse

>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.
 
D
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.
 
Top