01-07-2013 02:54 PM
Hello,
I have been troubleshooting an application that consistently kept crashing/hanging after ~1 to 5 minutes. I am communicating with a syringe pump NE1000 from New Era (http://www.syringepump.com). If have finally isolated the problem to a VISA write function.
Configuration:
I was running the NI Desktop Execution Trace Kit while running the attached Test NE100X – Query Volume.vi. The log is attached, Trace Test NE100X - Query Volume vi (1_4_2013 _ 17_06_11_423180).ttd.
When I run the vi at a loop rate of 10ms, it hangs after 15889 events. (Occasionally, Win7 crashes with the Blue Screen of Death.) I did not find anything unusual in the trace report.
After the vi hangs, it becomes unresponsive. When I attempt to exit LabVIEW, I get the Resetting VI: … message, and LabVIEW is hanging and does not exit:
If I decrease the loop rate to 50 ms and 75 ms, the vi seems to be running longer, but still crashes after about 52000 events, or 25000 events,respectively. At a loop rate of 100ms, it is was running for 51 min and then I had another Blue Screen Windows crash.
What confuses me is that the system just hangs without giving me any timeout or error message. This makes the troubleshooting very difficult. A query rate of 10 Hz seems to be rather low. I wonder whether this is a hardware issue or some bug in the software. I appreciate your help in troubleshooting this issue. Thank you.
Solved! Go to Solution.
01-07-2013 03:03 PM
what is the baud rate for your RS232 port?
01-07-2013 03:48 PM
19,200 baud (manufacturer default)
01-07-2013 03:51 PM
Have you tried your VI on a non-Windows 7 PC?
I use those particular USB-RS-232 adapters all of the time and have never had a crash. However, all my PC's are still XP.
Is the adapter plugged into an onboard USB port, or an external USB hub? Is it a PC or a laptop?
01-07-2013 04:01 PM
I also used this particular USB-Serial adapter a lot on XP computers without any crashes. But I do no longer have access to an XP machine. The adapter is plugged into an on-board USB slot and does NOT go through a Hub. It is a laptop. I checked the manufacturer's webpage for updated drivers and installed the most recent driver compatible with Win7 64bit. But the observed behavior is the same as with the older driver.
01-08-2013 07:32 AM
Does it repeatably hange at exactly 15889 events? Every time?
Try running Perfmon while your VI is running to monitor CPU and memory. Maybe there is a memory leak somewhere.
01-08-2013 07:35 AM
Also, your code has no error handling. Probably not the cause of this issue, but you might be getting an intermittent error that is ouccring quickly and intermittently that it goes unnoticed.
You should check the state of your error cluster in your while loop (every iteration). If an error occurs, you should probably stop execution (or at least reinitialize the serial connection).
01-08-2013 12:08 PM
01-08-2013 12:10 PM
01-08-2013 12:22 PM
It looks like the code is already in a constant loop that is reading until the termination character is detected. It's all automatic with configuring the serial port and enabling the term char. The setting of a high byte count is normal and the recomended method.