Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview execution for Loops and VI in DAQmx pannel

Hallo all,

 

I am quite new in Labview programming. From past 1 month I have been doing some simple programs. I have a doubt regarding a example VI in LabVIEW.  The attache pic is the example in Labview named " continuous Acquisition and graph voltage( u can see in the pic). In the block diagram why only one DAQmx VI, "analog 1d waveform " is put in the while loop for continnuous acquisition.  What about the remaining VI s ? why they are not implemented in loop ?

 

1)If all the DAQmx VI used in block diagram  are running till the stop button is pressed , then why not " analog 1d waveform" VI is not updating with time ?

 

2)Is that loop implementation is only for the purposes of visualization ? My question is if we connect "analog 1d waveform"(with out loop) to a VI which can save data in text format and run the program for 5 min, Is it going to save entire 5 min data in a text file or only  one iteration data ?

 

3) When any such kind of loops are attached with data streaming from DAQ, what is the rate of execution of loop ? on what factors does it depend ? How do we know that loop excution is faster than acquisition, so that we are not missing any samples ?

 

 

Regards

Vaidhin.

0 Kudos
Message 1 of 7
(3,914 Views)

There is no need to do any of the initialization functions more than once. Why would you think they should be in the loop? The waveform is updating with time - each time the loop iterates. The loop is there so that you can do more than a single acquisition. You can't run the VI for 5 minutes without having a loop unless you click on the run continuous button and that would be wrong. Please don't use that. If you have it connected to a file write function, you will save data each time the function is called. The loop rate is going to vary and with continuous acquisition mode, you don't really care as long as you don't do a lot or processing inside the loop that will delay the transfer of samples from the DAQ card. If you don't run the loop fast enough, you will get an error saying so.

Message 2 of 7
(3,906 Views)

Hi Dennis,

 

Thank you vry much for the reply. One thing was clear from ur answer like I dont need to worry about rate of iteration....... You mean to say that initialisation functions will remain in the same state untill we hit stop button in front pannel ?

0 Kudos
Message 3 of 7
(3,899 Views)

The init functions will stay in the same state until you stop/clear the task.

0 Kudos
Message 4 of 7
(3,895 Views)

Hi Dennis,

 

How to differentiate between initialisation function and normal function ? Is it only by practice or is it possible to check anywhere like properties of that block ?

0 Kudos
Message 5 of 7
(3,881 Views)

I don't know what you mean by 'normal'. You should go to the main Getting Started with DAQmx page and review the information there. You also should keep Context Help open and read what is there and the Detailed Link that is present. There are also all of the examples that come with LabVIEW.

0 Kudos
Message 6 of 7
(3,876 Views)

Thank you verymuch Dennis. Context help was great. I will go through examples, I will post if there are any quries.

0 Kudos
Message 7 of 7
(3,872 Views)