LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data logging every 0.5 voltage.

Hello,

 

I'm new to Labview.  I am trying to create aVI that would log data into excel file every 0.5v voltage drop.  Fox example, in my VI code every time my BEAM voltage drops from 1.0v to 0.95v, 0.95v to 0.90v, 0.90v to 0.85v so on; i want my VI to log my BEAM reading and MIC reading. it doesn't matter what MIC value is at time of voltage drop.  Please help.  I've attached my rough VI.

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

Hi Amit,

 

never, never ever, under no circumstences compare floating point numbers for equality!

 

Now you should define that "voltage drop" more detailed (maybe voltage drop in a certain time) as now you just compare current value with last reading...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,200 Views)

@GerdW wrote:

Hi Amit,

 

never, never ever, under no circumstences compare floating point numbers for equality!



And if you do, first you give me another nickel in my retirement fund. Then go read this: http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.17

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

i am comparing current value vs last value.  I don't care about timing.

 

Thank you for your help

 

Amit

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

Hello there,

 

my signal has too much noise or oscillations.  I want to take the a average every second or so and if the average value is less than 0.005 from the previous average value then i want to logg it.  Can anyone please give me an idea?  Thank you for your help.

 

Amit

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

Hi Amit,

 

there are several functions in the Math palette to calc the mean - choose one of them...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(3,155 Views)

Hey Amit,

This example shows how to calculate a running average of an array which is similar to what you are looking to do:http://zone.ni.com/devzone/cda/epd/p/id/5229 You will need to modify this implementation in such a way that you can keep track of differences between the previous average and your average over the last second but the overall concept should be similar.  Please post back if you have any additional questions.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 7 of 7
(3,136 Views)