10-24-2018 04:33 AM
Hello,
I am new to LabVIEW NXG. I am controlling a DC motor with an output PWM signal through a MyDAQ which allows it to run it through a shake table but i want to be able to make the motor essentially stop and go in reverse at any point in its motion with a time dependence set by the user. I understand i need to reverse the polarity of the voltage i am outputting to the motor but i do not know how to go about this. (i am trying to model an earthquake through a shake table and essentially need to vary the amplitude with time rather than the motor completing vibrations of the same amplitude every time which is not very realistic.)
See attached code
any help would be greatly appreciated.
10-24-2018 10:43 AM
@dylan94 wrote:
Hello,
I am new to LabVIEW NXG. I am controlling a DC motor with an output PWM signal through a MyDAQ which allows it to run it through a shake table but i want to be able to make the motor essentially stop and go in reverse at any point in its motion with a time dependence set by the user. I understand i need to reverse the polarity of the voltage i am outputting to the motor but i do not know how to go about this. (i am trying to model an earthquake through a shake table and essentially need to vary the amplitude with time rather than the motor completing vibrations of the same amplitude every time which is not very realistic.)
See attached code
any help would be greatly appreciated.
I don't understand what the purpose of driving the motor in revere is going to accomplish.
10-25-2018 06:01 AM
Basically the motor makes a shake table go back and forth. When it moves back and forth it moves the same distance every time. We want to model seismic waves (earthquakes) which do not have a constant amplitude. We to to be able to make the table do small and large vibrations under our control and we think we could do this by swinging the voltage back through zero and reversing it’s polarity would make the table go the opposite direction before it reached as far as it can go.
i hope this is more clear.
10-25-2018 06:05 AM
Hi dylan,
and what's your problem with setting a negative value for "amplitude / V"?
(Do you control the motor directly with your PWM signal or do you command an external motor controller? External controllers usually don't like PWM with negative amplitudes…)
10-25-2018 07:47 AM - edited 10-25-2018 07:48 AM
I guess I was thinking ahead of myself. I was wondering why you couldn't just use positive voltage and AC coupling to eliminate the DC offset. But maybe you need the full amplitude of the signal?