solerpwr07 Posted April 9, 2009 Report Share Posted April 9, 2009 I have setup a calibrated LVDT using the DAQ assist. Simple enough feature in my code: signal comes straight from the DAQ assistant, is subject to calibration math functions, and then out put to a numeric indicator. I want to be able to zero the LVDT when a button on the front panel is pressed. So say the lvdtis reading at a displacement already, I want that value to be zero and and any further displacement will be relative to that point. what a simple way of accomplishing this, unfortunately Im still learning trial by error with labview. Quote Link to comment
paramesium Posted April 10, 2009 Report Share Posted April 10, 2009 hmm....last time i did something like this i put DAQ inside a subVI then when u press "initialise"button , u will get the data... so...you let your main reading to minus up your second reading(which u get when u press "initialise" button) put it in sequence structure if it is in the same loop if it is not...creat a local variable... hope u can understand what i am trying to say Quote Link to comment
Jolt Posted April 11, 2009 Report Share Posted April 11, 2009 QUOTE (solerpwr07 @ Apr 8 2009, 03:46 PM) I have setup a calibrated LVDT using the DAQ assist. Simple enough feature in my code: signal comes straight from the DAQ assistant, is subject to calibration math functions, and then out put to a numeric indicator. I want to be able to zero the LVDT when a button on the front panel is pressed. So say the lvdtis reading at a displacement already, I want that value to be zero and and any further displacement will be relative to that point. what a simple way of accomplishing this, unfortunately I'm still learning trial by error with LabVIEW. I assume you have some sort of "structure" your code is running in - this could be a simple While loop or better, an event driven state machine... Click on the outer edge of this structure and create a shift register - shift registers are you friends! Initialize the register on the left hand side with a constant, probably a "0" as a double precision float (usually orange). When you get a LVDT reading subtract the the register value from it. Most of the time you will wire the left and right registers together - this will pass the current value "around" again. Create a "zeroing" case or event that allows you to put the base LVDT reading into the right hand register - this will be the new offset and will be "passed around" until you change it again. Remember to wire the register "through" every case in multiple case structures. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.