06-27-2010 05:46 AM
Hi,
I am attaching the vi iam using for finding the speed in rpm using counter inputs (BNC 2120) from a rotary encoder.
However it doesnt give me the direction.. i.e.positive or negative speed..
Kindly explain how to change the program to give this info....
ruser
06-28-2010 08:09 AM
What kind of encoder is it? Tach, Incremental, Abosolute or other?
Jason
06-28-2010 08:24 AM
To get direction from an incremental encoder you need to look at the state of the other encoder line each time there is a transition on one line. It is a fairly simple exercise in boolean logic. You do need to evaluate many combinations. Some counter boards have the direction decoding logic included, but many do not. If your DAQ board does not have the capability built in, you will need to read the two encoder lines with digital inputs to get the data you will need to decode direction. If the direction does not change very often you may still be able to use the counter for speed measurement. Be sure to discard any measurements of the speed which may contain a direction reversal.
Why do you have the Is Task Done? VI and not use the "task done?" output? Seems useless.
You have the Write to Measurement File.vi set to overwrite the file and you are writing one datapoint on each iteration of the loop. Is that what you really want?
Similarly you are writing one data point to the Waveform Graph on each iteration. Consider replacing it with a chart.
Lynn
06-29-2010 02:02 AM
Hi,
thanks for the suggestions..
iam fairly new to labview, have been trying to work my way out coz theres none here to teach me...:)
I was having trouble not knowing how to get speed data from the encoder, hence a friend here at NI forum , helped with this vi for getting the speed data through a 2 counter input. I have connected the encoder wires to a BNC 2120, digital counter inputs.
and the internal output of one counter is used as the clk generation source.
the program works fine for me , except , i dont get the direction...
hence i really dont know what the Is task done vi is for???
the write to measurement file is set to over write , because i require to run the program sevseral times to get the experimental data which i can really use. hence to avoid having too many lvm files unnecesasarily , i made this so , so that finally i have one lvm file with the data i want.
i shall try replacing the graph with a cahart .. may be thats why i dont get any figures...!!...:)
thanks a lot...
regards,
ruser