Setting up ModBus TCP
Hello all, I'm struggling with a ModBus TCP connection, but can't for the life of me understand how to properly set it up. It's my first time doing this but trial and error (and forum reading) haven't worked out so far. I have attached files to make it easier for you to understand and hopefully tell me what I've done wrong.
Basically, I want to access data on another brand PLC via ModBus and create signals for these in my 800xA system to display alarms etc. In between I have a Westermo modem which translates serial modbus to tcp. The IP of the modem is 172.16.27.80
This IP I have currently entered into the Gateway IP address in the hardware tree of the control builder, but I have no idea if this is correct.
The CI867 should have the IP of .81
What am I doing wrong?
Thanks in advance!
Answers
Search for the error code that you get (-6811) in the on-line help.
by Newwy72 Rank: 536 on 8/29/2017 7:40:28 AM | Like (0) | Report
I'd agree with MattP regarding issues with diagnostic poll time. Have you tested using a simulator (simulate the 800xA master then simulate a modbus slave) I'm assuming that you're confident that the modbus slave address of the slave is actually 1.
by bolman Rank: 6474 on 8/29/2017 10:59:35 PM | Like (0) | Report
Thank you for your input, both of you!
mattp: I did what you said and I get no more warnings in the hardware tree, but I still receive the same 6811 error on my MBTCPConnect block though.
Rob Lyon: Read through multiple examples and the help, and from what I can tell reading those my hardware address seems correct. Here's what the online help says:
"Partner in MODBUS TCP is set based on the slave hardware tree address. Partner parameter is a combination of position of the CI867 port and the slave in the hardware tree, excluding the CI867 position. (For example, slave in position 100 connected to port 2 will be 2.100)
Channel parameter is of the STRING type. In MODBUS TCP Channel should specify the CI867 to which the slave specified by Partner is connected. It is the CEX bus position of the CI867."
If I interpret this correctly then Channel = 2 and Partner = 1.1.1 (Port 1 of CI867, Gateway 1, Modbus slave 1). I've also tried multiple combos of different addresses, like 2.1.1 and 1.1 and 2.1 etc.
My best guess is that the problem is in the hardware settings somewhere...
by bolman Rank: 6474 on 8/29/2017 11:04:40 PM | Like (0) | Report
Newwy72: I have not tested a simulator because I have no idea of how to do that :)
As for the node number I am certain of it. I have a total of six modbus nodes to communicate with, 1-5 and 30. I have only tried communicating with one to begin with.
by Newwy72 Rank: 536 on 8/30/2017 12:58:12 AM | Like (0) | Report
I think the addressing is as I would expect, I'd be more inclined to think the issue is configuration of the TCP/RTU converter. Get yourself a simulator and test that works without the 800xA hardware.
Add new comment