Discussion:
TCP/IP Connecting with Real Time Controller
(too old to reply)
tbd
2007-02-28 07:40:09 UTC
Permalink
Hi Guy,
     Would it work to have the RT server poll the Host/Client periodically?  The RT-Server could send anything to the client, say a U32, that the client would send back within a very short time.  If this loopback doesn't happen, it's probably safe to assume the client-connection is dead.
Is this a case where it's reasonable to expect client connections [to RT Server] will simply go dead and we need a way for the Server to test the connection?
Cheers!
SJeane
2008-07-03 19:40:07 UTC
Permalink
Guy,
I am currently looking at the same problem as yourself.  I setup a crio as the server and am communicating over satellite (Hughsnet) to my computer here in the lab.  Both the crio and the satellite are both here in the lab so I can simulate problems that I am viewing with other installations I have running.  I too have not been able to get to the root cause of disconnecting and then reconnecting the cat 5 between the crio and satellite modem and then continue to transmit data.  I have worked with error control on the host side and can programatically clear errors and re-establish connection if I reboot the crio but not if I unplug it.  I can re-establish connection though if I reboot the crio after I have unplugged it.  I have been working with the RT Reboot Controller.vi on the real-time side but to no avail.  Any thoughts or hints as to a possible solution would be great.  If you like I can go into detail on what I have done and tried.
TNx,
/steve
Pakman
2008-07-08 05:10:06 UTC
Permalink
Hi SJeane, When you tried using the RT Reboot Controller.vi, why did it not work?  Did the unit not reboot?
SJeane
2008-07-08 16:10:13 UTC
Permalink
Hay Packman;
 When I reboot the crio manually the 3rd led lights on the crio and the lan connection lights go off  and then back on.  Using the vi. I dont see any visual indication of a reboot and nothing changes on the host.  ie. I still maintain error 56 from the tcp reads. 
Pakman
2008-07-23 05:10:05 UTC
Permalink
Hi SJeane, I apologize for taking so long to respond, but I wanted to test this on my end.  In doing so, I realized that using the RT Reboot Controller.vi after the connection is lost does not work because the message to reboot cannot be relayed to the target without communication!  Thus, to solve this problem, we have to approach it a different way.  You mentioned that you tried programmatically clearing errors, but did you try to reestablish connection after clearing the errors?  I tested this on my end with a FieldPoint controller, and the attached VIs resumed operation even after unplugging/replugging the Ethernet cable (no reboot).  Will this solution work for you?


Reestablish.zip:
http://forums.ni.com/attachments/ni/170/343166/1/Reestablish.zip
SJeane
2008-07-23 13:40:12 UTC
Permalink
Pakman,
I will incorporate this into my RT vi. and test.  I have my listen on the cRIO RT side and not on the host.  Is it possible that I will need to have error handling code on the RT side?  I have used the no EOC vi.   I do not know what the error generated on the RT side and need to develope a way to log these errors to be identified.  Rebooting the cRIO is the only sure way that I can think of to reestablish connection but I know it is not the best fix.
 
TNx,
/steve 
Pakman
2008-08-13 05:10:06 UTC
Permalink
Hi Steve, I've recoded the application so that the real-time target is the server.  Please let me know if it allows the connection to be re-established without reboot.  I've tested it here using Compact FieldPoints, and it worked beautifully.  Unless cRIOs have different error codes, it should work fine on them as well.  Also, I was able to determine what error codes to monitor by writing their values to internal flash memory.  You can do the same by simply making the file path something like "C:\myfile.txt."


RT Server.zip:
http://forums.ni.com/attachments/ni/170/348866/1/RT Server.zip

Continue reading on narkive:
Loading...