10-05-2005 01:19 PM
10-05-2005
02:45 PM
- last edited on
03-18-2025
10:47 AM
by
Content Cleaner
If your DAQ card has an on-board counter, then this vi should suit your needs as a starting point. It allows to to change frequency and duty cycle of the output pulse train on-the-fly.
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=DE27921DB53A4D8DE034080020E74861
FYI- stepper motor velocity is usually changed by altering the frequency, not the duty cycle, of the pulse train. But without knowledge of the driver hardware you are using, you could be correct about altering the width (duty cycle). Also if you try to accelerate a stepper motor too fast, it may stall out and whine at you.
Now I just saw from the header you are using a 6009, I do not think that has a counter on board. So you will have to do a software timed loop to cycle a digital output repetively on and off. You will only get a couple 100 of Hz out of this and actual frequency may drift due to Windoze timing uncertanties. The loop timing is used to set frequency, not duty cycle. So if you need fixed frequency and variable duty cycle, let us know the ranges to come up with a solution.
Good luck
Message Edited by AnalogKid2DigitalMan on 10-05-2005 02:48 PM
Message Edited by AnalogKid2DigitalMan on 10-05-2005 02:55 PM
06-14-2006 02:31 PM
06-15-2006
06:17 PM
- last edited on
03-18-2025
10:47 AM
by
Content Cleaner
vikg,
To be able to output a semi-fixed duty cycle signal at 60Hz you could create a while loop that has a Wait(ms) vi with a wait time of around 8ms (120Hz) and then alternate the output to the digital channel every iteration of the loop. However, the loop will be software timed, meaning if the computer is doing something there may be a glitch of a longer period. Additional programming may allow functionality roughly similar to what you are looking for but the performance will be poor at best. You will not be able to achieve a duty cycle that is close to 100%. Since the time of the low portion of the duty cycle will be going toward 0 as the duty cycle goes to 100% the update rate will need to increase. If you are lucky, you may be able to push the duty cycle to 80% or so but not much closer than that. You can achieve 100% by writing a high and not changing it but you will not be able to get anything between 80% and 100%. And as I mentioned before this is all software timed meaning the timing of the duty cycle will all be influenced by what is going on on the computer. If you move a window your update rate may drop to a few hertz.
In conclusion, I would highly recommend getting a DAQ board with a counter. If you are looking for a USB solution I would recommend taking a look at the NI USB-6251. In addition to having a couple counters it has many other impressive features as well. You can take a look at:
https://www.ni.com/en-us/support/model.usb-6251.html
I hope this is helpful.
Regards,
Neil S.
Applications Engineer
National Instruments
06-19-2006 02:59 PM
06-20-2006
11:49 AM
- last edited on
03-18-2025
10:48 AM
by
Content Cleaner
Hello Vikas,
The PCI-6221 will be able to support two separate 60-Hz PWM digital signals in addition to an analog input. The Pulse Width Modulation in NI LabVIEW Using NI-DAQmx describes how to program a PWM in LabVIEW or if you are using another programing language you can reference the DAQmx API helps to translate between the VI names and the API convention. The 6221 will most likely work for your application, but for the fastest response time you might consider a Real-Time system.
Regards,
06-30-2009 11:29 AM
Hello,
I am using a Geckodrive G203V stepper drive (http://www.geckodrive.com/upload/G203V-REV-6-MANUAL.pdf) to operate a tension stage. I also want to use the USB-6009 to operate this stepper motor as well as the load cell and LVDT.
My labview experience is limited so I am looking for advice/help
What would be the best approach to build this up in labview?
In the other posts there was mention of a counter (however, not on the 6009). What would be the best approach to control the stepper and be able to set the count? I know there were ideas in previous posts but this is a different application so may be there is a better way or another approach that would would?
Thanks much,
Jerry
05-16-2010 03:23 AM
Hi All
I'm Triyng to make an interface between my Laptop and another one Using their Own USB port.I could not do it yet.would somebody help me?
Where can i find related VIs.
Regards
Azizi
05-16-2010 08:05 AM