I'm a relatively new Labview User trying to set up an experiment with LabVIEW motion that previously ran on a Galil Motion Controller. Basically, I have a two axis system and am trying to make what would be ellipses in 2D cartesian coordinates:
Labview 7.0 (I know, it's on the list of upgrades for the lab, but I don't know when it will actually get put through)
NI PXI-7350 Controller
NI MID-7652 Servo Motor Drive
2 servo motors
for my experiments, I need this system to follow a sinusoid in position with precise control over the period of the motion. All of my initial experiments will be done with the two axes 90 degrees out of phase, though some later ones may need to change that parameter. The amplitude of motion needs to be independent for each axis. I also need continuous position feedback from the encoders.
I started by generating my sinusoids in MATLAB and feeding them into the NI-Motion Assistant as a contoured move, but I couldn't figure out how to get precise control over the period of the movement (it was mostly just guess/check with the velocity in the move constraints). Furthermore, I can't seem to export the contoured move to a LabView VI. This is important to me bacause there needs to be an overall VI setting various parameters between the two sinusoids and handling the data acquisition. The actual motion needs to be something I can put into a subVI.
Once I gave up on Motion Assistant, I started looking through the FlexMotion example files, and eureka! there was an example on creating a 2D ellipse. If I could get this to work, it would probably fit my needs very well. The example did not work off the shelf, I change the wire into "Configure Vector Space.flx" at the y-axis connector from "Elliptical Tracking Axis #" to "y-axis". After doing that, if you set "Elliptical Tracking Axis #" to Axis 1, the y-axis will follow the x-axis, like I wanted. I can change the amplitudes of my sinusoids by changing the radius of the x-axis motion and the gear ratio between the two axes.
I thought that I could achieve the out of phase part of my requirements by starting one axis at an offset and then running the program, but I'm not sure that will work. Right now, the problem I am seeing is that the VI will not make a normal ellipse. That is, anything I try to run results in an ellipse that is slanted to the side (equivalent to a phase lag that is not a multiple of pi/2, if you look at the math). The most frustrating part is that if I back everything up and go back to the original example, starting with both axes at 0, my ellipse is still slanted (I have a phase lag that is unaccounted for in the code.)
I still think that doing electronic gearing between the two axes is the way to go for the motion profiles that I am trying to make, but I NEED to control the phase lag between the sinusoids (the angle of the ellipse) very precisely, and I cannot conduct my experiments with an unknown and unaccounted-for phase lag. It might make for an ultimately more flexible setup if I were to go back to contouring to a set of points, but I need to be able to precisely control the period of motion and also be able to save the motion into a subVI.
If anyone can help me on this issue, it would be much apppreciated, as my research project is on hold until I find a solution to this problem.