09-16-2011 07:47 PM
Hello
Iam using an Encoder to measure the position of the motor....what can I do in labview to get the graph of angle in rads versus Time once the motor finishes rotating.
09-16-2011 09:19 PM
Do you have a specific question?
Have you looked in the example finder for examples on waveform charts, waveform graphs, and XY graphs?
Do any of the messages in this thread ring a bell?
09-16-2011 09:48 PM
You question is quite vague but hope the following helps.
You can save the encoder angles in an array of a predefined length (if you know the amount of data that you want to plot) by replaying the value in the array with an incrementing index and using a shift register. You should convert the angles into your preferred units before sotring in the array.
Place a graph outside your for/while loop and once your program exits the loop, the array will be displayed in the graph.
Cheers!!
09-16-2011 10:38 PM
ok what you said does give me some hope...but can you be little bit more specific when you say " replaying the value in the array with an incrementing index..I know how shift register works...also but how can I get the plot of angle Versus time
09-16-2011 10:44 PM - edited 09-16-2011 10:45 PM
Sorry, it should be 'replacing' instead of replaying.
Moreover, what is your data format for the angle? Does it have a time stamp on it. If not, then you'll only see the angles vs the data point number in the graph.
If the angle is a dynamic array , then you have the time stamp already in the data.
Can you post your vi or a snap of the block diagram. Then I can hopefully provide a better suggestion.
Cheers!!!
09-16-2011 10:46 PM
sure I dont have the VI right now, but when do you usually check the forum so that I can send it you.
Thanks
09-16-2011 11:03 PM
Whenever you will upload the vi/snap, I'll get an email notification.
Cheers!!
The best thanks is a kudo:)
09-19-2011 06:39 PM
Ok here is the snapshot of the encoder VI...so what Iam trying to do is get the plot of angle versus time..just to know what times the angle show up.
09-19-2011 07:34 PM
The DAQ assistant provides a timestamp with the data that you have removed by using the 'Convert form dynamic array' function. Your Your 'formula node' in its present form is not required and you can remove it.
You can use the 'Get dynamic data attributes' to get the timestamp that you can display in an indicator. Moreover, to plot the data, you can use a chart or a graph (uncheck the 'ignore timestamp' option) by directly wiring the DAQ assistant to the chart.
It would also be helpful to you if you go through some LV examples. They are an excellent source to learn.
Cheers!
09-19-2011 07:41 PM
Iam using the formula node to calibrate the reading because the encoder resolution is different so I have stepper motor...and this encoder gives me the angle after every 12 steps so what I have trying to get is plot of angle versus time... more like a scatter plot....Iam looking for is a graph that shows the times at which the angles appear...I can do this by hand..how will I need to do it by using the chart or graph function...
like if I connect a graph directly to the daq then all I see is a straight line that moves up and down.