LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set Wait acquire....Set Wiat aquire

Hello All,

I am developing a VI that needs to do the following. When I start the VI it starts aquiring data (no problem) to be varified before aquisition begins. Then I would like to start my aquisition series. The idea is to have two while loops, one used for all the aquisition and one to be used for all the timing. I have no problem using data aquisition but I need help in the timing loop. The loop should do the following, the user enters different forcing frequencies (this is done), thereafter a signal generated (done), while the signal is generated...wait for a specefied time before starting aquisition. The way I want to aquire data is just to enable the write to file data using a global variable from the timin loop to be sent to the aquisition loop), therefore my program is always aquiring but only sometimes writing. Thus after the wait period data is aquired (by an amount specefied by the user). Then loop repeats the same sequency using the same steps set forcing...wait...write samples...all while the other while loop its doing is thing, the only thing comunicating between both loops should be the global variable which I am guessing should be a boolean that connects to the enable button on write measurement file.


Attached is a draft VI

Cheers,
Alloush
0 Kudos
Message 1 of 2
(2,452 Views)
Hi Alloush,

I have looked at your VI and have and I have a couple of suggestions.

Is there any reason the two while loops do not fit on screen? As a rule of thumb you want to make sure that your block diagram fits on one screen, or if it has to be bigger that you only have to scroll in one direction to view it all.

I am not entirely sure from your description what you want to do but it seems you main problem is how to architect your code so things execute when you want them. To this end have you thought about any of the formal training courses? They will discuss methods to architect your code so you can perform the sort of operations you need. go to www.ni.com/training for more information.

There are also several online documents that will go through different architectures

http://zone.ni.com/devzone/cda/epd/p/id/3717
http://zone.ni.com/devzone/cda/epd/p/id/2941
http://zone.ni.com/devzone/cda/tut/p/id/3024

The state machine architecture is one of the easiest to get started with and very flexible.

Regards

Jon B
Applications Engineer
NI UK & Ireland
0 Kudos
Message 2 of 2
(2,404 Views)