LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running average and resetting indicators in application

I am using USB6218 and labview 2009 for my application to capture pressure sensor output on a0 - a30 channel. I have set the DAQmx to read 10samples at 100hz sample rate from all 30 channels. Finally I formed an array for eg: ch1_voltage ch1_pressure ch2_voltage ch2_pressure and so on by scaling the voltage output from the pressure sensor to corresponding PSI. I have following issues and I really appreciate some experts advice.

 

1) At the end of data acquisition for all 30channels I would like to get a average of 10samples on each channel and connect them to individual pressure indicator as shown in my VI (I have just shown for 2 channels). I have a pressure sensor connected to channel 0. For some reason even though I haven't connected any pressure sensor on channel 1 I read the same PSI output on the indicator on both channels.

 

2) I want to monitor the pressure and verify its within some threshold for a time that is indicated by the user (using my Max sample time control in my VI). If its within the threshold the test is pass if not fail. I have implemented this in my VI and I am not sure the implementation is efficient

 

3) I am not able to reset the pressure indicator readings between two runs. For example after 4seconds on my VI the pressure indicator stays at 15psi (applied pressure) and even if i press the stop button the indicator doesn't reset to 0.

 

4) I would like to implement a start button to initialize the application instead starting it automatically.

 

Please need some help.

 

Thanks

0 Kudos
Message 1 of 5
(3,213 Views)

I would really appreciate if I could get some help.

 

Thanks

0 Kudos
Message 2 of 5
(3,181 Views)

@romesh wrote:

 

3) I am not able to reset the pressure indicator readings between two runs. For example after 4seconds on my VI the pressure indicator stays at 15psi (applied pressure) and even if i press the stop button the indicator doesn't reset to 0.

 

Thanks


Have a look at property nodes. You can use the "write" mode of a property node set up for using the "value" of the output block.

 


4) I would like to implement a start button to initialize the application instead starting it automatically.

 A few ways you can do this....

1) Use a loop before the main program with a start button to break out of the loop and continue to actual program. (Will need to start the main VI before this will work though)

2) Use a funky Xcontrol to create a run button that will start the VI running without actually using the VI run button.

3) ...must be some others I can't think of

0 Kudos
Message 3 of 5
(3,172 Views)

Thanks for your reply. I am just learning Labview and I haven't used property node before. Is there any example I could see to get an idea of how to use it in my application. How do I run my main VI first? Please be more specific.

 

0 Kudos
Message 4 of 5
(3,159 Views)

romesh,

 

The property nodes and invoke nodes in LabVIEW are part of an architecture called VI Server. 

 

In short, just about any static configuration (property) or action (invoke) you can alter before running your code can also be changed during run-time with VI Server.  This thread contains more of an overview regarding VI Server.

Looking for a tutorial on how to use VI Server  

 

Kevin S.

Applications Engineer

National Instruments

0 Kudos
Message 5 of 5
(3,134 Views)