General > General Discussions

Modbus map?

(1/1)

John_Parker:
Can anyone explain how a relay status can be assigned to modbus address?
Thanks

EDGAR:
Not sure I understand your question? The PLC comes with the data sheet that shows you the Modbus address table and reference of each PLC IO.

Ed

williamsj:
Hi,

I'm assuming here that you want to connect over the LAN and not RS485.

Firstly you need to connect to the plc you want to write to/read from. The following command will do that:

PRINT #4 "<MBTCPCONNECT 192.168.0.40:502>"

The 192.168.0.40 IP address is the one for the destination plc. The 502 at the end is necessary as it is the port number that is used by MODBUS over tcp/ip

Next, write to a location on the destination plc use the following command:

WRITEMODBUS 4,1,1101,DM[50]

In this instance I am writing to an DM location on the destination PLC from a DM location on the source PLC. How do I know the destination is a DM location? It is the 1000 at the beginning of the 1101 (check chapter 14, pg 10 of the manual). I am actually writing to DM[100] on the destination PLC, you can read the manual to see how the numbers work out.
The 4 at the beginning is the port I'm going out on the source, 4 because I'm using the ethernet socket. The following 1 is the Id of the destination plc, seems redundant but necessary
The DM[50] is the location of the data on the source plc.

Hopefully this makes some sort of sense. It will be very similar for RS485.

cheers,

john

BetterBath:
Very interesting and difficult) However thank you for the post.
BathroomHandymanRoofingour siteclick herejunk removalclick hererooferhandymanroofroofrepairroofInstallationmetalroofingroofrenovationin PortSt LucieFloridabathroomremodel

Navigation

[0] Message Index

Go to full version