03-22-2011 01:46 PM
Hello everyone... i had a doubt. how to how to reinitialize an input from DAQmx to zero using button? i have an analog i/p channel (LVDT) whose value needs to be zeroed out after
the length reaches a given value 'x'... how should i do it? idea is to restart the measurement when the lvdt reads 'x'
thanks in advance
03-22-2011 09:22 PM
Do you mean you have a question? A doubt means you don't believe you can do something.
What exactly do you mean by reinitialize a DAQmx input? I don't know how you even initialize it.
What I think you mean is that you want to make a given input value a zero. Kind of like a tare button on on a scale. What you need to do is when you want to rezero, store that value in a shift register of your while loop and subtract that value from future readings you take from your DAQmx channel.
03-25-2011 09:06 AM
@Raven's Fan, I am sorry for my poor explanation. Yes, I would like to create a tare.., i hav a shaft and a LVDT. the LVDT measures the traverse length of the shaft.
when the shaft reaches a particular point, the reading on the LVDT should be made zero. it is like re-counting from "THAT" particular position.
like you mentioned below, how can I make this rezeroing based on a button input from user? like, the user decides when he wants to REZERO the value on LVDT.
can you post a sample code screenshot please?
many thanks
03-25-2011 09:37 AM - edited 03-25-2011 09:37 AM
Like this.
03-25-2011 11:31 AM
@Ravens Fan, thanks for the immediate help, but this example makes the value '0' as soon as i hit the Tare button, what I would liek to do is, restart the measurement from '0' value i.e. if the
LVDT reads 10inches at time 'x'; you hit the Tare Button @time x, the LVDT reading should go to zero, and restart the reading like 0,0.5,1.0 inches and so on...
let me know if I don't make any sense to you.
03-25-2011 01:24 PM
That is what it does. Once you hit the tare button, the value in the numeric indicator changes to zero, and changes from there as you increase the input up and down.
03-25-2011 02:02 PM
yes,,, thanks a lot!