12-01-2014 09:16 AM
LV2013 on Win7, LVRT2013 on PXI-8196
Blog for (mostly LabVIEW) programmers: Tips And Tricks
Solved! Go to Solution.
12-01-2014 11:29 AM
CoastalMaineBird wrote:
What I don’t understand is why the re-try succeeds. I break the other end by ABORTing the program that is running (on the PXI).So, how is it that a stopped program can allow a new connection?--------------------So, is this a bug in the PXI’s OpSys? Or just a natural consequence of the fact that it cannot do everything at once? Or is there something I’m missing?I don’t mind highlighting the light on connection breakage; it’s the extra CONNECT/DISCONNECT events that I want to avoid.And if I have to wait a while, how long do I have to wait? Is the 150 mSec a property of this particular model (PXI-8196), or LVRT2013, or what?
I suspect the correct solution here is not to ABORT the program on the RT side, but rather to provide a way for it to exit cleanly. It's not the program that's accepting a new connection, it's the operating system. My guess is that it takes a while for the operating system to clean up everything when you stop the program. Have you considered running Wireshark to capture the TCP data and watch the sequence that occurs when you abort the RT program? Try it, and post the log - I think it will help explain what's happening.
12-01-2014 12:04 PM
I suspect the correct solution here is not to ABORT the program on the RT side, but rather to provide a way for it to exit cleanly.
Well, yes, but I need to guard against contingencies.
Have you considered running Wireshark to capture the TCP data and watch the sequence that occurs when you abort the RT program?
OK, I haven't used Wireshark and am not used to chasing things to that level of detail, but attached is the log you mentioned.
There's a ton of data there, but only an ounce of information, and I don't know how to dig it out.
I suspect that it's just that the OpSys on the PXI doesn't get notified that the program has quit until 130+ mSec later, but the host is able to notice the connection death and retry it before then.
The only solution I see is to wait for something longer than any reasonable (heh!) system would take (I have to handle multiple models of controllers ) before attempting to reconnect.
Not difficult to do, but I need to know what I'm dealing with.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
12-01-2014 01:18 PM
You're right, there's too much information in that log - I can't quickly see what's going on and don't have time to dig into it. If possible I'd suggest that you not start the log until just before you abort the RT application, and perhaps that's what you've already done - although looking at the log I can see a transfer of what looks like the ni-rt.ini file as well as an XML configuration file, so I'm guessing that you started the log earlier.
12-01-2014 01:25 PM
You're right, there's too much information in that log
What I said was there's too much data and not enough information. 😉
Yeah don't mess with it.
I forgot to detail what I had done:
--- I reverted the code to show the problem again.
--- I started the host
--- I started the WireShark log
--- I started the PXI program.
--- I aborted the PXI program.
--- I stopped the log.
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom." --- Clifford Stoll
Blog for (mostly LabVIEW) programmers: Tips And Tricks
12-01-2014 04:11 PM - edited 12-01-2014 04:28 PM