06-09-2010 10:07 AM
I have a test program that is utilizing the NI-9481 relay modules to switch power to a part and switch a Keithley 2000 DMM to measure the voltage. This test needs to power on and off the part 3000x for 4 minutes on and 4 minutes off. I implemented this design using a state machine design pattern. The timing is done in one minute increments using the "Get Time/Date in seconds" function available with Labview 8.2. Each minute a measurement is taken and the data is writen to a text file.
-Measurements Algorithm:
-Prior to anything, instrument is initialized with a reset, enters state machine loop
-Measurment Function, configures DC Volts and trigger, (relays switch), send trigger and read from instrument when SRQ is asserted
-Switching Algorithm:
-DAQmx Create task w/Auto cleanup(T)
-DAQmx Create channel - Digital Output
-Property Node for Channel - DO.Invert Lines = False
-DAQmx Generate Digital 1D Data
-DAQmx Write Data w/ Auto start(T)
I have been working out the bugs with the devices we are communicating with and they appear to be working normally, however for the second time(yesterday was a DAQmx error) at cycle 131(17ish hours into the test) the program has become unresponsive and windows will not open the task manager and windows explorer reports "Insufficient system resources" when attempting to open a window. Labview is not reporting an error...
Currently I suspect the while loop that is controlling the timing and am placing a WaitTillNextmsMultiple function in the loop set to 500.
Also I wonder if the DAQmx sequence is consuming memory and eventually consumes all system resources.
If anyone has any ideas or knows of a problem with the devices I am using please help. Thanks
Solved! Go to Solution.
06-09-2010 10:13 AM
N8D11 wrote:I have a test program that is utilizing the NI-9481 relay modules to switch power to a part and switch a Keithley 2000 DMM to measure the voltage. This test needs to power on and off the part 3000x for 4 minutes on and 4 minutes off. I implemented this design using a state machine design pattern. The timing is done in one minute increments using the "Get Time/Date in seconds" function available with Labview 8.2. Each minute a measurement is taken and the data is writen to a text file.
-Measurements Algorithm:
-Prior to anything, instrument is initialized with a reset, enters state machine loop
-Measurment Function, configures DC Volts and trigger, (relays switch), send trigger and read from instrument when SRQ is asserted
-Switching Algorithm:
-DAQmx Create task w/Auto cleanup(T)
-DAQmx Create channel - Digital Output
-Property Node for Channel - DO.Invert Lines = False
-DAQmx Generate Digital 1D Data
-DAQmx Write Data w/ Auto start(T)
I have been working out the bugs with the devices we are communicating with and they appear to be working normally, however for the second time(yesterday was a DAQmx error) at cycle 131(17ish hours into the test) the program has become unresponsive and windows will not open the task manager and windows explorer reports "Insufficient system resources" when attempting to open a window. Labview is not reporting an error...
Currently I suspect the while loop that is controlling the timing and am placing a WaitTillNextmsMultiple function in the loop set to 500.
Also I wonder if the DAQmx sequence is consuming memory and eventually consumes all system resources.
If anyone has any ideas or knows of a problem with the devices I am using please help. Thanks
If the bolded stuff is happening repeatedly... you have answered your own question.
LV will not destroy resources until it exits as part of its clean-up routine.
Create tasks and allocate resource once when you start and re-use them until you are done, then detroy them.
Ben