LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a two pulses simultaneously using USB 6229?

Hello friends,
 
  This is Kirupasankar from India. I am Mechanical Engineer, doing automate our test rigs. In that i need to control a stepper motor through USB 6229 device and LABVIEW. I create the pulses that control the Motor. But while reverse the motor, I need to supply another pulse that has higher high time period. I am unable do that, Please help me and guide me,
 
Thanks and Regards,
Kirupasakar S.
0 Kudos
Message 1 of 6
(3,264 Views)

Hi Kirupasakar,

I'm not quite sure if I follow your question. Are you trying to generate 2 pulse trains with different duty cycles, or one pulse train with a varying duty cycle? Both can be done with the USB 6229. To get started, I would look at the "Gen Dig Pulse Train - Continuous.vi" example from Example Finder. This will allow you to generate a continuous pulse train. To create 2, simply copy the code and specify a different counter. If you want to vary the duty cycle while the generation is running, you can add a DAQmx write inside the while loop like so -

One thing to note, our counter outputs sometimes cannot source enough current to power a stepper motor - you may need to do some amplification before powering the motor itself.

Please post back if you have additional questions.

Andrew S

National Instruments

Message Edited by stilly32 on 04-06-2007 09:40 AM

0 Kudos
Message 2 of 6
(3,233 Views)

Thanks Andrew S,

 I thank you for ur co-operation. I have a separate driver that has power to supply the stepper motor. while changing the direction of rotation i need to supply the voltage of 6-8 V. For that first i tried with analog output. But my device (USB 6229) send the voltage after stopping VI, even closing all labview programs. This is my actual problem, so i try to use pulse to avoide that. My willing is to send the analog voltage for particular time and stopped immediately.  Plase help me to do that.

I attach my VI for generating the analog voltage, Please check and give a guidance.

Once again Thank you!

 

Thanks and regards,

Kirupasankar S

 

 

0 Kudos
Message 3 of 6
(3,223 Views)
Dear Andrew S,
 
I forgot to attach y VI in previous post. I attach with this post.
 
 
Thanks and regards,
Kirupasankar S
0 Kudos
Message 4 of 6
(3,220 Views)
Hi Kirupasankar,
 
The easiest way to ensure that your device is outputing 0 at the end of your generation is to write a waveform of 0's, wait a little bit (at least a generation period) and then stop and clear the task. This will ensure that you end on a 0, regardless of the last point generated.
 
Cheers,
Andrew S

Message Edited by stilly32 on 04-09-2007 08:14 AM

0 Kudos
Message 5 of 6
(3,212 Views)

Dear Andrew,

Thanks for ur guidance. I already generate 1V output and solve my problem. I really thanking you.

 

Yours,

Kirupasankar S

India

 

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