9/9/2009 10:05 AM | |
Posts: 5 Rating:
|
Hi,
I want communicate between Festo CPX plc and cpu 414-1 414-1XG02-0AB0 and 443-1EX11-0XE0 with open modbus TCP.cpu 414 will be master
I can communicate between PC and Festo cpx plc with modbus tcp.
I 'll read/write holding register.
cpx's modbus device mapping is
input adress (read) 45392 to 45647
output adress (write)40001 to 40256
I tried with example code but I always read CONTROL DAT.STATUS value as an error code 80A4 or 8304.
How can I solve this problem.?
code is in attachment
Best Regards,
Mehmet
AttachmentModbuswi.zip (749 Downloads) |
9/9/2009 11:33 AM | |
Joined: 1/17/2007 Last visit: 7/29/2024 Posts: 1544 Rating:
|
Both the status codes you have quoted point to the connection not being established / open. Have you set up a TCP connection in NetPro to the target device? The local port can be any that is not used (I normally use 2000). The remote port should be 502 (which is specifically reserved for modbus). The remote IP address should be the IP address of your target device. Because you are master you will have to check the "active connection establishment" checkbox when setting up the connection (see attached pictures activecon1 and activecon2). activecon1.gif shows the connection properties. activecon2.gif shows the port/IP address details. Have you used the correct ID and LADDR parameters on the block inputs? (get them from netpro - see activecon1.gif) Is the connection shown as open in NetPro? (use the "Activate/Deactivate Connection Status" button to display the current connection status. It is selected via netpro by clicking on the icon that looks like a plug and socket with a 'i' on it). I have also included the use manual for your reference. Attachmentmodbus.zip (727 Downloads) |
Programming today is the race between software engineers building bigger and better idiot proof programs, and the universe producing bigger and better idiots. |
|
9/9/2009 1:06 PM | |
Posts: 5 Rating:
|
hi smiffy, I checked list and onlyI checked active connection establishment. Connection status is established and in tcp connectionproperties send andreceive status is waiting. but I can't readregister in plc andCONTROL DAT.STATUS valuehas an error code 80A4 How can I solve? I addedscreenshots in attachment Thank you for your help Mehmet Attachmentscreen.zip (703 Downloads) |
9/9/2009 3:02 PM | |
Posts: 5 Rating:
|
hi Wüstenräuber, code is in attachment. thank you for your help. best regards, Mehmet AttachmentModbuswi.zip (666 Downloads) |
Follow us on