04-11-2012 10:13 PM
Here's my situation:
I have labview code I am using to control a stepper motor. I would like to have a realtime graph that shows the position of the stepper motor (whether actual position or calculated position). I will be dealing with very large amounts of data, potentially.
The motor will be moving in variations of a trapezoidal position profile. Think of it this way: positive slope up to x, hold at x, negative slope down to 0, hold at 0.
I am thinking that I need to do this in two pieces. I will have a graphing VI that can graph whatever is sent to it in real time, point by point. I will also have a vi that figures out where the next point is based on the user inputs.
Does anybody have any suggestions as to how I should do this? What kind of graph would be suited best to this application?
04-12-2012 03:19 PM
Hi Arringtonbp,
What hardware are you using to control the motor? What kind of position data are you graphing and how are you acquiring that data? Some more details about the specifics of the application will help us to provide you with better suggestions. Thanks!
Regards,
Kira T
04-12-2012 09:25 PM
Hello Kira T,
I am using a NI MID 7604 driver to control the motor (with the PCI 7344 card). Right now, the user inputs the relative displacement of the motor (mm) and the rate that the motor will travel (mm/s). I have generated code to move the motor using NI motion assistant, and it works correctly. I am trying to graph the position of the motor in real time alongside the motor.
It is important to note that this code could be run up to 3 hours at a time. The step size of the motor is 0.00635 mm once you consider that it is doing half steps through the driver.
Please let me know if you need more information!
04-13-2012 05:10 PM
04-13-2012 05:24 PM
I will check those examples. Also, is there a way to get position feedback from a stepper motor if you don't have an encoder? Is there such a thing as an internal encoder? If so, how can I tell if I have one of those?
If we could get position feedback, I'm assuming it would be in the form of a waveform, which we could just graph that way.
04-16-2012 01:43 PM
Hi Arringtonbp,
You would know if your motor has an encoder because you would see the leads for you to attach the encoder to the drive. The attached VI is an example of 2 different ways that you can read and graph the position with no encoder. The first way is to use the Read Vector Space Position.flx and the second is to use Acquire Trajectory Data.flx and Read Trajectory Data.flx. Both of these are used in the attach example and plotted. They should give the same result. Please let me know if this helps.
Regards,
Kira T
04-16-2012 03:47 PM
Would it be possible to get a version of this file that is compatible with Labview 2010? That is the version that I have available.
04-17-2012 04:31 PM
Hi Arringtonbp,
I have attached a screenshot of the VI with some notes in it. the basic VI with the Read Vector Space Postion.flx can be found in the example finder under Hardware Input and Output>>Motion Control>>NI 73xx>>Arc Move>>Two-Axis Circle with Position Monitor.vi.
Regards,
Kira T