LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Acquisition Progress Indicator

Hello everyone,

I have developed a basic data acquisition system, whereby the user can acquire different data from the card connected to different sensors using a simple case structure. Sampling is for finite mode, so for example is the user wants to acquire data for 10 seconds he can specify the time and it will be acuired. 

What I want to do is to implement a progress indicator so that the front panel shows some activity while the data is being acquired and not leave the user to contemplate if it is doing what its supposed to do. Any suggestion how I can implement this? data acquisition is conducted inside a case structure. Thanks for any ideas.

 

cheers,

0 Kudos
Message 1 of 6
(2,898 Views)

Many ways to do this. A few:

  • You could change the cursor to an hourglass while its running so the user can tell it is doing something.
  • Have the process update a global and have it read in another loop that updates.
  • Create a VI to store the status and read it in another loop.
  • You could just implement a timer in a separate loop that takes the user input and converts it to a percentage to display. Have it visible only when the test is active.

0 Kudos
Message 2 of 6
(2,891 Views)

Thanks ErnieH,

I know its a simple thing, but the problem becomes when I enter the case structure upon a true event (acquire data). When the acquisition occurs inside the case structure, other loops cannot be executed simulatneously. The case structure is only exited whence all data acquisition has occured. Global variable approach sounds good, let me see how this goes.

0 Kudos
Message 3 of 6
(2,887 Views)

You can create a sub-vi to run within the case structure.  It would get updated every iteration, effectively becoming a counter. 

 

Slider write state.png

 

 

Read State

 

Slider Read state.png

 

This is an FGV.  Two controls and on indicator.  The property node is controlled by the number of measurements to take and the slider max limit is adjusted accordingly.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 4 of 6
(2,882 Views)

If you want it to update information to the user, then you need to have it running outside of the main loop, if that loop is running until it stops. Otherwise, the front panel will not be update You can create a loop outside of your main loop just to update controls, dials, etc. Just make sure it does not use all of your processing time by adding a delay. Best thing to do is to create a 2 dummy loops, one with the delay the other without,  to test it out until you get something that will work for you. Good luck. When in doubt mock something up. That is the beauty of this language.

0 Kudos
Message 5 of 6
(2,868 Views)

@ErnieH wrote:

If you want it to update information to the user, then you need to have it running outside of the main loop, if that loop is running until it stops. Otherwise, the front panel will not be update 


Not necessarily. It depends on his structure.  If he is acquiring data within is main loop which may be running as his top-level VI, then posting the data as it's acquired is no problem at all.  As I said, it depends on his structure, but since the OP has not posted his VI, it's difficult to predict the behavior of his code; however, since he wants a running progress indicator as a visual aid to the user, it makes sense that the fp will be updated from within the loop.

 

If you are referring to my VI example, I created that with the assumption that it would be used as a sub-VI within his main loop.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 6 of 6
(2,849 Views)