Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Express vi occasionally doesn't read out USB 6009 on re-run

I'm using Labview 8.0 and the USB 6009 to control an oven and read out the temperature at different locations inside the oven. The temperature values are read at a rate of 1Hz by an Express vi in a while loop, which gets the values from the USB 6009. The (four) temperature values are processed and an array with max., mean, etc. values is built and sent to a Spreadsheet File.vi in a case structure with feedback node, writing the data to a file with all the temperature values and some other values (e.g. pressure values, which are read in through the serial port).

Now, if you run the vi, it writes all the data to the file but if you then stop it and re-run it (without closing the vi, only push stop, push run), about every 2nd - 3rd time the temperature data (i.e. all the data which should be supplied by the USB 6009) is not written to the file! The file is still written and all the other values (e.g. pressure from the serial port, etc.) appear properly but the columns for the data coming from the USB 6009 are filled with "0"s. If you then push stop and run again (and again), you again have an approx. 50% chance of the file being written properly or not (seems to be pretty random...). So, usually after 2-3-4 tries Labview writes the file properly.

It does not seem to depend on if you write the data to a new file or the old one.
The green LED on the USB 6009 is always blinking.
Restarting the vi/Labview/Computer doesn't help.

Any ideas what the problem is here?

0 Kudos
Message 1 of 2
(2,073 Views)
Do you initialize the feedbach node?. If not initialized, the feedback node keeps its last value on subsequent executions of the vi.
Make sure that you close the file reference using "Close File" before leaving the main vi.
Do you have a continuous acquisition configured in DAQ Assistant?If so, have you tried stopping the acquisition throught stop input terminal?
Lastly, try creating the associated code with the DAQ Assistant. This will help you troubleshooting the issue. To do this, select "Generate NI-DAQmx Code" from the shortcut menu.
It should be helpful if you could attach a simple example that shows this behaviour.
 
Regards,
CesarV
 

Mensaje editado por CesarV

César Verdejo
Training and Certification | National Instruments
0 Kudos
Message 2 of 2
(2,055 Views)