06-20-2011 03:55 PM
I am fairly new to Labview, and I am having trouble with the following. I am working on replacing a Digital Vector Filter with Labview software. I have a rotating shaft with eccentricities, which are measured by X and Y proximitors. Also, a keyphasor voltage keeps track of the rotation rate, which enables me to relate X and Y to each other. Essentially, I have to find when the keyphasor voltage hits -11 volts, and keep track of when that happens, then, keep track of the next time that happens, in order to get the time it takes for one revolution. I don't know if this makes a difference, but the data is coming in as dynamic data. I want to be able to tell the user what the rotational rate is as the program is running.
06-20-2011 09:56 PM
Can you post your code? It always helps if we can see what you are talking about. From what I gather from your post, you simply want to record the voltage when it hits -11V, start a timer, then stop it when it hits -11V again (1 revolution). Is this correct? For timing, you can use the Elapsed Time Express VI. Trigger it on the first instance of -11V, use a functional global variable to store your voltage, and compare your FGV contents against new measurements until -11V is read once again, and read the timer, then reset it.
06-21-2011 12:41 AM
Hi aem64,
Without seeing your code, I can't tell you exactly what to do.Anyway I have made an example vi which does a voltage checking and gets time of rotation. Check out the attached VI. It's just a simulation and so the results may not be absolute. But you can get an idea of how to do that for sure.
Regards,
Nitzz
(Give kudos to good Answers, Mark it as a Solution if your problem is Solved;))
06-21-2011 03:47 PM - edited 06-21-2011 03:51 PM
Thanks for the help!
I have taken the vi you gave me and changed it to a bit. The voltage going in is being sampled rather quickly, and thus there is no actual point that equals -11 Volts. I want to do something like the following: Check timer time, tm, and check:
if tm-1 > -11 Volts and tm < -11
do the following calculation to get the actual value time that voltage crosses -11 Volts, tk.
tk= (tm-1) + ( (tm- (tm-1) ) / ( Km - (Km-1) ) ) * (-11-(Km-1)), where Km is the voltage at tm.
I want to be able to do this streaming, to show the user what the tk value is live. The only times I really need to save are tm and tm-1, from there I can save all the tk's in an array for further analysis.
Please let me know if this is possible.
Thanks