09-30-2019 09:58 AM
Hello,
I am using NI PCI 6229 for Ctr0 and Ctr1 channels as output pulse generation to drive a stepper motor. Pulses at Ctr 0 ables the motor to rotate CW and at Ctr1 to CCW direction. degree grading is from 0 to say 50 degree.
My question is: can we display the same angle in Front panel in Gauge indicator of stepper motor as it rotates.
thanks
Solved! Go to Solution.
09-30-2019 10:05 AM
Hi DMic,
It sounds like you have a motor that you're controlling using LabVIEW and you want a visual display of the current position on the VI Front Panel?
To do this, you'll need some way to establish a reference position (the position of the Gauge indicator that you want to match). This could be just be starting the VI when you are at some "0" location, or by adjusting a control, or by reading some value using an Analog Input or similar from the motor (assuming such a reference signal is available, or using a Rotary Encoder, etc).
Once you have a reference position, it should be certainly possible to ensure that the two remain in step (given that LabVIEW knows the intended rotation from a point, since it is controlling the motor).
Was this just a general question, or is there a specific part you're having problems with?
09-30-2019 10:32 AM
yes it is related to specific part . i want to get current position of the stepper motor. but it doesn't have encoder . only stepper driver. in this case can v display in gauge indicator.
09-30-2019 10:40 AM
@DMic wrote:
yes it is related to specific part . i want to get current position of the stepper motor. but it doesn't have encoder . only stepper driver. in this case can v display in gauge indicator.
You should be able to display the relative rotation with a fairly simple calculation. To get an absolute value, you need a reference point. LabVIEW can't just guess this (well, I suppose it could, but it can't accurately guess this) so you'd have to use one of the methods listed above (or some other method I didn't think of). Setting the "position" to 0 when you start the VI is the simplest but if you're trying to make LabVIEW match some external display (gauge, etc) then you'll probably need some offset control.
09-30-2019 10:53 AM
sorry, it has proximity sensor installed at 0 position and another some 40 degree. we have these 2 sensors .
09-30-2019 11:01 AM
Then you should be able to use the 0 position as a reference to reset the value of the front panel indicator. It might be offset for part of the first rotation, but once you pass the sensor (or you could include the 40 degree to reduce the possible rotation before they're aligned) you can update the offset angle to make them aligned.
10-01-2019 07:51 AM
To use this method you will need to home or reset the position occasionally to make sure it is somewhat accurate. When you start the software you could home the system to 0 so you know you are starting correctly and that the pluses from the motor control should be correct when you move the stepper motor.