IP Address Issues

Discussion of configuring and troubleshooting communication to PLC's or other devices using iX Developer.
Post Reply
daoa80
Posts: 44
Joined: Fri Aug 10, 2012 8:50 am

IP Address Issues

Post by daoa80 »

1. No communication between my EMCP and my QTERM-A12. The following message is been displayed "Controller 1": Illegal address s 0 n 2"

2. The IP address is assigned manually for my PC, Router, QTERM-A12, and EMCP starting with 165.x.x.x. Does anyone knows if it likes the 165.x.x.x address or if it is better to use the usual 192.168.x.x

3. What causes an invalid address error?

4. Using the following: Controller -> MODICON, Protocol -> Modbus Master

Thanks

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: IP Address Issues

Post by mark.monroe »

You most likely have the wrong subnet mask. If you want to use 165, then you need to use subnet mask 255.255.XXX.XXX.

http://www.subnet-calculator.com/subnet.php?net_class=B
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

daoa80
Posts: 44
Joined: Fri Aug 10, 2012 8:50 am

Re: IP Address Issues

Post by daoa80 »

I am using a 255.255.x.x. subnet mask as described below:

1. EMCP IP(165.26.78.10), Subnet(255.255.254.0), and Gateway(165.26.78.1)

2. QTERM-A12 IP(165.26.78.3), Subnet(255.255.254.0) and Gateway(165.26.78.1)

3. Router IP(165.26.78.1) and Subnet(255.255.254.0)

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: IP Address Issues

Post by mark.monroe »

If you unplug the A12 from the network, do you get the same error or do you get a "comm err station 0"?

After you have unplugged the A12, can you ping the 165.26.78.3 address to see if anyone else is using it?

Also, how are you addressing the Modbus registers in iX developer?
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

daoa80
Posts: 44
Joined: Fri Aug 10, 2012 8:50 am

Re: IP Address Issues

Post by daoa80 »

I made some modifications:

1. IP router(165.26.78.1), Subnet(255.255.254.0)

2. PC IP(165.26.78.2), Subnet(255.255.254.0), and Gateway(165.26.78.1)

3. A12 IP(165.26.78.3), Subnet(255.255.254.0), and Gateway(165.26.78.1)

4. EMCP IP(165.26.78.4), Subnet(255.255.254.0), and Gateway(165.26.78.1)


On iXDeveloper Controller settings tab I have:

1. Communication mode Ethernet TCP/IP

2. Start address 1-based

On the Stations tab I have:

1. Station(0), IP(165.26.78.4), Port(502), Node(2)



error Controller1: Illegal address s 0 n 2

* After I unplug the A12 cable, the error is "comm err station 0
* eventually I ping 165.26.78.3 and the request is timed out
* I'm doing addressing in decimal e.g 40145

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: IP Address Issues

Post by mark.monroe »

The error is indicating that you are not addressing an Modbus address properly. Either the address is not on the Modbus slave you are trying to connect to, or you are trying to access an address that is not a valid Modbus address. You should review your Modbus addresses and make sure they are all valid. You could create a simple project with a single address in it and see if you can naraow it down to the address that is causing you problems. Sometimes people get the "Start Address" setting wrong and their addresses are off by 1 from what the slave is expecting.

You are connecting to the Slave, but are having issues addressing the Modbus addresses. As you can tell by the change in error message when you unplug the Ethernet cable.

Definition of the error message:
Illegal address s xx n yy Address are outside a valid range in station xx, node yy.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

jcjelektro
Posts: 40
Joined: Tue Nov 22, 2011 3:54 am
Location: Gjerlev, Denmark
Contact:

Re: IP Address Issues

Post by jcjelektro »

Hello

I got the same error after i have edited the Taglist in Excel (Import/export file)
I found that Excel have some auto functions there remove the Zero's in a modbus adress: fx. 001880 become 1880. That give me that fault.
Check the adresses for missing zero's.

- Emil
--
Emil Gundersen
JCJelektro.dk

Post Reply