09-14-2017 01:34 PM
Hello all
I am using a cRIO 9063 controller and want to connect up to a Moxa Serial to Ethernet controller via TCP/IP. I am using the VIs available in the TCP palette to achieve connection and exchange data. This all works fine when I run/test the VI on my computer against the realtime target, but the moment I deploy it to run under realtime as startup, it can't establish connection and I recieve error code 59 (The network is down, unreachable, or has been reset). I have set the VI frontpanel as a webpage to follow progress from where I get the error message.
The cRIO and Moxa is connected via a switch and are on the same subnet address and everything is kept as simple as possible.
I have looked through MAX to see if I was missing any software, but haven't been able to figure a solution there, nor by selecting any other setting in MAX or Labview.
Could someone tell what is required to achieve a TCP connection running on Realtime. What would I be missing?
Thanks in advance 🙂
Solved! Go to Solution.
09-14-2017 02:04 PM - edited 09-14-2017 02:13 PM
Can you post your code? The TCP/IP VIs run fine on a cRIO 9063. The Real-Time Runtime Engine is enough.
Regards, Jens
EDIT: Just a wild idea: Perhaps you are trying to open the TCP/IP connection to early after startup of the rtexe?
09-14-2017 02:23 PM
Hello
It is part of a bigger VI so I'll just drop a dump of it. It reports error when trying to open the TCP connection. I have verified that the IP and port fields are valid with proper information to connect up against. Basically I open the connection, send commands to my serial target and read responses. I save the TCP connection ID in a feedback node, call on it when needed and close it at the end.
My question, between the lines in addition, would be what distinguishes running the VI on my computer against realtime where it works compared to when I want it to run "unmanaged" with runtime.
09-14-2017 02:23 PM - edited 09-14-2017 02:24 PM
Hello
It is part of a bigger VI so I'll just drop a dump of it. It reports error when trying to open the TCP connection. I have verified that the IP and port fields are valid with proper information to connect up against. Basically I open the connection, send commands to my serial target and read responses. I save the TCP connection ID in a feedback node, call on it when needed and close it at the end.
My question, between the lines in addition, would be what distinguishes running the VI on my computer against realtime where it works compared to when I want it to run "unmanaged" with runtime.
09-14-2017 03:33 PM - edited 09-14-2017 03:34 PM
As already stated TCP/IP runs fine inside a rtexe. What are the network settings on your cRIO? It might be a good idea to try to open the TCP/IP connection several times inside a loop. Something like this, since it might take some time directly after the start of the system for the network to be accessible:
Regards, Jens
09-14-2017 11:20 PM
@jg69 wrote:
As already stated TCP/IP runs fine inside a rtexe. What are the network settings on your cRIO? It might be a good idea to try to open the TCP/IP connection several times inside a loop. Something like this, since it might take some time directly after the start of the system for the network to be accessible:
I've noticed this is the case on the linux targets. In my case, str to IP only returns 127.0.0.1 for the first 5-10 seconds.
09-15-2017 01:23 AM
Hi jg69
Thank you very much. That seems to be have been the case as I get the TCP connection now.