LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected intermittent hangups when either writing to file or setting control value via property node?

I'm having a bit of a curious issue... I wrote this Error Handler VI as a means of modularly logging hardware errors and updating the user interface of the main running VI. In short, the VI takes as inputs an error cluster and a string (which identifies the piece of hardware). If there's an error, it the error info is written to an error log text file in the executable's directory. Whether or not there's an error also impacts a status indicator on the main running VI's front panel. The status indicator is an Xcontrol which accepts numbers as an input to identify whether the hardware is Not Found, Init state, OK or in Error state. If there are three consecutive errors with a particular piece of hardware, the state changes to Error state and a button on the front panel is set to visible. This button allows the user to re-initialize the hardware. Ever since deploying this VI into our software, I've very intermittently seen the software hang up in a catastrophic way (can still change tabs and push buttons, but nothing responds - had to close out of LabVIEW using ctrl+alt+del and all serial hardware became unresponsive since I wasn't able to properly close out the VISA references). Each time, I've had to restart Windows. I've narrowed the problem down to either this VI, or to the fact that I also recently updated DAQmx drivers. I've spoken directly to NI about the drivers and they said there shouldn't be a problem as the drivers are compatible with all the DAQ modules we're using. Whether or not this is true, I believe a communication error of some sort is being thrown during a DAQ operation, and that the software is getting hung up in my error handler. The Error Handler VI usually works successfully, but when these hang ups have happened, I've also notice that the error was never written to the error log text file. So I guess my main question is (apologies for coming around to this the long way)... is there anything in this VI that, if it failed in some way, could get completely hung up instead of timing out and proceeding?

I've attached the Error Handler VI and its associated sub VIs. Thanks in advance for your assistance, and I'm happy to provide more information if it's wanted.

 

Worth noting: the main program is run as an executable, and the error log gets written to a directory on the PC's hard drive with completely open read/write permissiosn.

0 Kudos
Message 1 of 2
(2,114 Views)

Hello SteveMRG,

What version of LabVIEW and NI DAQmx are you using? Does this error occur when the program is run from the development PC from the project? Can you create a debuggable executable and activate Highlight execution when the error occurs as to verify which state the program is in?

Wear
National Instruments
Product Support Engineer
0 Kudos
Message 2 of 2
(2,080 Views)