Computer lockup on LabJack communication error


bull8042

Recommended Posts

When I lose communication with the U3, my pc locks up completely to the point that I have to do a "hard shutdown"! I also inadvertently entered a LabJack Reset command at one point (mistake) which resulted in the same response.

Is there something I am coding wrong that causes an endless loop or something that DAQFactory can't recover from?

Link to comment
Share on other sites

First, make sure you are on the absolute latest versions of DAQFactory (5.79), the LabJack UD and all the firmware.

It could be that you have an endless loop, but only if you are using the OnAlert sequence event and trying to catch the disconnect.

BTW: a reset looks like a disconnect/reconnect to DAQFactory and windows for that matter.

Link to comment
Share on other sites

I have the latest and greatest. If I have all of my channels set to test, the sequences all run flawlessly, and with the channels set to "labjack" as well. But, if the USB cable gets unplugged or the LabJack is not connected when DAQFactory loads the program (.ctl file), I get a couple of lines in the warning/error window stating communications error with the LabJack which I expect, then the pc locks up. Even after restoring communications, the program cannot recover. Regardless of how long I wait, the PC will not resume responding to any input...... Even ctrl+alt+del ceases to respond. When the ol' 3-fingered salute stops working, then you know Windows is dead.

Is this a driver issue perhaps or something much more low level than my scripts?

Link to comment
Share on other sites

It hangs even if the LabJack is unplugged when you start DAQFactory? That is quite unusual and more likely caused by scripts. Or perhaps its just an absolute fluke with your machine. So, two things:

1) either post, or email us your .ctl doc so we can take a peek.

2) try it on another PC and see if it does the same thing. If not, then we know that there is just something weird with your machine, probably a low-level driver conflict

3) ok, I said 2, but here's another thing to try: does it do the same sort of thing when you run the LabJack test panels?

Link to comment
Share on other sites

It hangs even if the LabJack is unplugged when you start DAQFactory? Yes it does.

1) See attached....

2) My other computers all run Linux, and DAQFactory's behavior in a Virtualbox instance is not exactly favorable.

3) does it do the same sort of thing when you run the LabJack test panels? You know, I don't know that I have tried plugging in and unplugging the U3 when I had all my channels set to test.... and I left it at home and can't try it at the moment.

Link to comment
Share on other sites

2) VirtualBox isn't perfect and DAQFactory takes full advantage of the intricacies of Windows. We have not tested DF under any windows emulation software and so I would not expect it to work correctly. Are these problems under VirtualBox or on a normal windows machine?

3) give that a try. Also try commenting out all the labjack function calls.

PS: when declaring your variables you do:

global E_Stop = "0"

E_Stop and most of your variables are not strings, so you don't want the quotes:

global E_Stop = 0

Link to comment
Share on other sites

2) Under VirtualBox it is unrecoverable, but I experience the same issue in Windows as well, just to a lesser extent. I have tried setting all of my channels to "test" and still hose it up when I unplug the LJ. However, I increased my delays in the sequences calling the LJ functions to 750ms and it has helped. That leads me to believe that I need to terminate those sequences when a communication error has been detected and allow DF to re-establish communication and then restart the sequences.

"E_Stop and most of your variables are not strings, so you don't want the quotes:"

That is a habit from programming PHP where variables must be in quotes regardless of their form. I will correct that.

You have me pointed in the right direction I believe.

Thanks....

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.