LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

offset lvdt before running program

Solved!
Go to solution

Hi all,

 

I am using an LVDT to measure the soil displacement. This has to take into account both the consolidation and swelling and thus requires the LVDT to move in both directions. Therefore the voltage has to be zeroed after the LVDT is pushed in so that it can record both negative and positive direction. So far, I have managed to do this by using a case structure which executes when the 'Zero out' button is pushed. However, it only comes into effect after the program is run. What I need is a 'zero out' button that can be used before the program is run. So i want to push in the lvdt, hit the 'zero out' button, then start running the program to avoid those initial voltages getting recorded onto the xy graph.

 

I did find a vi file that does this but it was very complicated and used older version of labview. I am fairly new to labview and thus couldn't follow the coding on it.

 

I have attached the vi file to make it easier to understand. Your help is greatly appreciated

 

Cheers,

Gurung 

 

 

0 Kudos
Message 1 of 4
(2,758 Views)

Hi Gurung,

 

Have you tried having the Zero Out button pushed to a True value before you start the program? This will allow the code in the Case structure for the True case to be executed on the first iteration of the For loop. You may, however, lose some data in this case. Because the Case structure operates on data coming from the DAQ Assistant it needs to occur after some data has been acquired. Is this a calibration issue? As in, when you push the LVDT into the soil it has a a voltage measurement that you need to treat as a reference (zero value)?

 

Regards, 

James D.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,737 Views)

Hi James,

 

Yes it is a calibration issue. I want the lvdt to be pushed in and have that point calibrated as the 'new 0' voltage point so that the lvdt can move down and record the readings when the soil gets consolidated. I want the lvdt set up (i.e. pushed in) before running the program as I dont want any voltages recorded on the graph beforehand.

 

 

As for "Have you tried having the Zero Out button pushed to a True value before you start the program?", I don't understand what you mean by it as i am new to labview....perhaps if you could modify the attached vi file to what you mean, I would be able to understand it better. 

 

Thanks,

Gurung

 

0 Kudos
Message 3 of 4
(2,722 Views)
Solution
Accepted by topic author Gurung

The two screen grabs show how I have done the same "Auto Zero" function when using an LVDT for displacement measurement, I was also recording force at the same time then graphing the results post recording.

 

On the initial run the true/ False loop is set to TRUE, in this case the displacement is subtracted from zero to provide an offset, this offset value is then passed to the shift register where it remains as a constant for subsequent itterations of the main While Loop as the value is simply passed straight through the True/ False loop with nothing done to it on all iterations after the first.

The offset value is then added to the data read from the LVDT to provide a displacement figure relative to zero from whereever the program was first run. There is a front panel "Record" button which is pressed to start and stop the recording of data - Hope this is of help - Mike

Download All
Message 4 of 4
(2,710 Views)