LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Displayed input values cycle back and forth from correct value to zero. Why?

My application acquires and displays the values of approximately 40 analog voltages from a chassis with several SCXI cards. It also offers the user command of approximately one dozen analog outputs through the use of knobs, dials, etc.

The VI was constructed using several instances of the DAQmx Assistant VI. One task monitors thermocouples, two other tasks monitor miscellaneous analog voltages, and a fourth task commands the AOs. The VI runs as a sequence inside a While loop.

Using MAX->Test I have confirmed that individually each of the inputs and outputs functions correctly.

Problem is that when I run my VI, correct display values are shown only intermittently. Most of the tim
e all the displays show a value of zero.

Any ideas on what I can do to fix this problem?
0 Kudos
Message 1 of 4
(2,825 Views)
Without seeing your code, no.

Are you giving enough time for the data to be acquired?
Are the arrays the right size and type?
Etc.

Les Hammer
0 Kudos
Message 2 of 4
(2,825 Views)
I suspect that it's caused by using several instances of the DAQmx Assistant. I've only really used traditional DAQ or the individual DAQmx functions but I believe that in each occurence of the assistant, the DAQ hardware is initialized to just use those channels that you specify. If the assistant is not capable of of configuring all channels in a single task, then you can use several DAQmx Create Channel functions to configure all channels and then a single DAQmx Read to acquire all channels at the same time.
Message 3 of 4
(2,825 Views)
Thanks for the inspiration that multiple instances of the DAQmx Assistant may conflict with one another. I took your idea and tried a slightly different remedy...

My application uses a Flat Sequence within a While Loop to run four separate DAQmx Assistant tasks that monitor and control various SCXI I/O. I separated the four instances of the DAQmx Assistant so that each ran in its own frame within the Flat Sequence. It seems that since only one frame is active at any given time, I've now resolved the conflicts between the DAQmx Assistants. My displays have now stopped blinking back and forth between the correct value and zero.

Thanks again for your timely and really useful assistance!
0 Kudos
Message 4 of 4
(2,825 Views)