Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem outputting a sine at 100 Hz with PCI7358

Hi,
 
I am using PCI7358 to control a voice coil actuator with Flexmotion in
Labview 7.1, and a potentiometer on ADC channel is used for onboard
feedback on the 7358.

I want to actuate the motor with a smooth sine wave from 0.1 to 100 Hz
over 5 mm of travel.

2 approaches I tried are:

The Flexmotion position buffer to contour the sine, but the requested
interval in Config buffer is limited to between 10 ms and 45.25 ms (PID
rate is set at 250 um), so with a sampling rate of 10 S/s, the contour
could only get between 2 to 10 Hz.

So I put a sine array to a load DAC vi placed in a timed loop.  The loop
can get down to 1 ms interval, which should give me the 100 Hz with 10
S/s.  But load DAC requires the axis to be unmapped.  So I set the
primary output as stepper with closed loop mode, and the primary
feedback is ADC channel.

With the load DAC, the motor moves like a square wave, ie hitting the
mechanical ends of travel for each sine cycle, and it doesn't move until
the sine is in the order ± 1750 counts.  This also shows that the
primary feedback is not working at all, however the ADC is reading the
position correctly.

============

Does it help if I config buffer to general output, ie. can it output to
Start Motion faster than a position buffer? or can I load the buffer faster?
or What settings is needed to use the load DAC vi with position feedback
on its primary ADC?

Could anyone provide me with any other suggestions as to ways to correct my
problems in either approach to achieve a smooth sine motion from 0.1 to
100 Hz?

Your time and assistance is greatly appreciated,

Albert
0 Kudos
Message 1 of 4
(3,633 Views)

Hello Albert,

I was able to find a useful KnowledgeBase document of the website at http://www.ni.com.  Searching with keywords “Load DAC” the first result is entitled Using Load DAC Does Not Generate an Analog Output on My Motion Board  

As mentioned in this document the first thing to check is that you are passing the correct number to the DAC Value input (16-bit where -32,768 to +32,767 corresponds to the full ±10 V).  At the bottom of this document are also some example programs which generate an analog output signal using a motion board that you might want to try out.  I hope this helps.  Please let us know if you would like further clarification or assistance regarding this issue.

Best Regards,

Vu D
Applications Engineer

0 Kudos
Message 2 of 4
(3,609 Views)
Hi Vu D,

Thank you very much for your reply.

For the load DAC value, what I've done is to set DAC and ADC both to +/-10V range, then I calibrated my potentiometer to find that ADC gives 1760 counts per mm displacment.
With the 0.000305 V/LSB from the NI7358 spec, for a 1 mm peak-peak displacement, I need to output 1760 counts or 0.53 V.  And I've measured the output, it is around 0.6 V.

Is this conversion correct?

My other concern is that using the DAC requires the axis to be unmapped.  I've set the axis to a stepper, closed loop mode, and primary feedback on ADC.
However the onboard feedback doesn't seem to be working. So this just gives me an uncontrolled motion ie. the motor simply moves from end to end of its travel.

Is it possible to use DAC on an unmapped axis while having ADC feedback on that axis?? If so, please advice me what settings I should use.

Thank you again for your help,

Albert

0 Kudos
Message 3 of 4
(3,601 Views)

Hi Albert,

In regards to your conversion question, are you measuring the full voltage range (i.e. maximum positions corresponding to +/-10V) and linearly determining the counts per displacement?  This should give you a more accurate account of your setup.   For example, if +10V corresponds to 100 steps and 0V to 0 steps, each volt would be 10 steps.  

Since you are currently configured as a closed loop stepper, the motion controller is reading the analog feedback, but sending it back to the stepper output which is not being used.  It would be better to configure this as an open loop stepper in MAX, so that you can communicate with your analog output and encoder input (Read Encoder Data.vi) independently.  I hope this helps.

Vu

0 Kudos
Message 4 of 4
(3,585 Views)