LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controling speed of a DC motor

Hello

 

I am using a usb-6009 and a DC motor. I am generating a sine wave using the waveform generation assistant and want to display the generated sine wave and the output speed in the same graph. I am having a problem with the time stamp since I am getting too large values (30000000...) also the sine input is in Voltages and the speed output in rpm. How to get this two signals in one graph to show the shift in phase of both signals. Attached is an example of what I have built so far

0 Kudos
Message 1 of 6
(3,208 Views)

Hi UWI,

 

I am not getting what exactly are you trying to do. If you want to control the speed of a DC motor, I believe the most comon way is to make a PWM and the speed will depend on the duty cycle of the PWM.

 

You can make this with DAQmx.

 

Here is an example of this: http://decibel.ni.com/content/docs/DOC-13798

 

Now, about the ploting question, if you want to plot two different signals in the same plot, the only thing that you need is tu use the Merge Signals.

 

Regards,

Luis Elias
NI VeriStand and HIL Product Manager
0 Kudos
Message 2 of 6
(3,178 Views)

BTW, I forgot to tell you that you MUST connect the outputs of your 6009 to a H bridge in order to avoid creating some damage on your 6009.

Luis Elias
NI VeriStand and HIL Product Manager
0 Kudos
Message 3 of 6
(3,177 Views)

Hi Luis

 

Let me explain myself a little better. I am using a usb6009 conected to a DC motor. I am actualy generating a sine waveform using the sine wave generator from Labview an want to see the output speed from the DC (Tach-output). The goal of my experiment  is to get, in the same chart a display of my sine input and my speed output signals to determine the phase shift between the two of them and ultimatly construct a bode diagram showing magnitud and phase. Since the usb6009 input/outpit is only 0-5V, I am using a fix ofset for the input sine wave of 2.5V. Now, I am already seen the two signals in the same grapgh but the input at 2.5 and the output lifted above this value. I need two of them at the same value on the Y axis to be able to measure the phase shift. I am new in using labview so I have experiencing a lot of dificulties on this matter

0 Kudos
Message 4 of 6
(3,152 Views)

Hi UWI

 

I am sorry, I did not get what you were doing at the first time.

 

I am just not getting you are plotting the output singnal and the DC motor voltage?? I am not getting how are you measuring the speed of the DC motor. Do you have any kind of traducer that sends you a different amplitude voltage signal than your output signal??

 

Another thing I would like to let you know is that we have a couple of VIs that hepls with the phase measurement, this are called Multiple Tone Information.VI and Tone MeasurementsVI.

 

You might be able to use them!!

 

Now, here is a link with a small LV course: http://zone.ni.com/devzone/cda/tut/p/id/5247 Take a look at it. you might be able to use it.

 

I also added a VI which calculates the Phase between two different signals with two differnet Amplitudes.

 

I hope this helps a little bit, and I will keep an eye on this forum.

 

Regards,

 

PS If you need any other LV version of the VI, let me know!

 

 

ToneMeasurements.png

Luis Elias
NI VeriStand and HIL Product Manager
0 Kudos
Message 5 of 6
(3,140 Views)

Thank You Luis

 

I am sorry for taking so long to reply. I think I omitted a detail and it is that the version of LabView I am using is 8.0 so I have not been able to open the solution you sent me. Attached is the VI that I built so far. Just need to be able to display the phase and amplitud of the output from the DAQ, just befor the merge signal icon

 

Regards,

 

UWI

0 Kudos
Message 6 of 6
(3,059 Views)