From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Ramping a pulse signal using PCI-6602 card

I'm controlling a stepper motor and need a continuous pulse output with variable frequency. I need to accelerate and decelerate teh motor (It can't start immediately at a high frequency but needs to be ramped up to it). I can't have any hiccups in the signal or the motor can stall. It seemed I had my own ramp program written (which gradually increased the frequency value sent to the counter) to solve this problem, but when I switched to Office2000 I started getting hiccups in my signal. I also have a PCI 1200 card and could use A/O but I think using the counter signals would be better. If I'm wrong let me know. Once I have the motor up to speed I am reading in a pulse signal to analyze with FFT.
thanks for y
our help.
0 Kudos
Message 1 of 21
(5,846 Views)
JP;

If I understood correctly, you already had a program working and generating the frequency ramp you needed. What exactly you meant by when you switched to Office 2000 your program stopped working?
Are you going to use Labview or other software language?
Filipe
0 Kudos
Message 2 of 21
(5,834 Views)
After upgrading to windows 2000 and to the lastest version of Labview 5.1, my program no longer outputted a continuous pulse signal that could be ramped up in speed. Now it misses pulses at the transition to a new speed and also misses pulses later on in the string. Right now my board does not output a constant frequency value either. To do the ramp up I was just running a while loop that would just add 10hz to the current frequency and output that value to the counter. This seemed to work before and yielded a contant signal with no misses but it may have just been luck that it worked becuase then no delay causes problems in the signal. I am using LABView
thanks filipe for your response.
JP
0 Kudos
Message 3 of 21
(5,834 Views)
A few thoughts & musings, hope some of them are useful:
1. The sequence for setting a new frequency should be to first load up the new pulse specs (use 1 & 2, not 3 & 4), then issue the "switch cycle" command to 'Counter Control.vi' You can look at NI's example program called 'Pulse Width Modulator' to verify syntax.
2. If your frequencies are low enough and your loop time is fast enough, you may be trying to update the pulse specs before the previous specs have completed a full cycle. This has traditionally been a no-no, though I'm not 100% sure that it remains one with the latest NI-DAQ drivers.
3. No ideas about the possible interaction with MS Windows and/or Office 2000. Haven't used either.
4. (My own latest installment in a multi-year running gripe at NI): Wh
en oh when will we be granted the ability to perform buffered counter OUTPUT operations? Just as in the analog world, one can acquire a signal with AI and then reproduce it with AO, it would be REALLY REALLY handy in the counter world to measure with buffered semi-periods and then reproduce the same pulse train with a buffered output.
CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 4 of 21
(5,834 Views)
hello hello
in fact i don't want to answer this question but to ask for help. I'm a french student and i have to do a stage for my school.
I'd like to know if your programm is in C or C++ and if you could send it to me so that i'll have an example for my program(i have to make the frequency of a square signal change like a sinus or stuff like this).
PLEEEEEEEEASE HELP ME!!!
see ya.;

xav..



ps:if necessary xbahar@hotmail.com
0 Kudos
Message 5 of 21
(5,834 Views)
Hello,
Is there a good way to ramp up a counter output pulse train frequency using a PCI-6071E card? I've tried the method mentioned by the above user (putting pulse generaton vi's inside a while loop and incrementing frequency each iteration) but the output signal is very choppy. Im using Labview 7.0 with DAQmx functions.
Best wishes,
Will.
0 Kudos
Message 6 of 21
(5,737 Views)
There's an example here on ni.com that should give you a good start.

Note that to perform a seamless freq/duty cycle change, you'll need to start the pulsetrain before entering the loop. Inside the loop, you'll only update the freq and duty cycle. Then you shouldn't stop and clear the task until exiting the loop.

-Kevin P.
CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 7 of 21
(5,729 Views)
Thanks for the reply Kevin. Is it possible to get this vi in Labview 7.0?
Best wishes,
Will.
0 Kudos
Message 8 of 21
(5,720 Views)
In 7.1 I use a Timed Loop with the output from the counter as the clock source for the Loop. The loop then gets executed every time the counter changes state. (or every 2nd, 3rd, 4th …) This works basically the same as the while loop but works for higher frequencies. So fare it seams to work with the exception that I can’t have two timed loops in the same vi but I haven’t given it the full test yet.

And let me second the call for buffered output from a counter. It would be excellent if I could give the counter a list of frequencies and it did one operation with the first frequency the second operation with the second and so on and all I had to do was to monitor the buffer instead of updating the counter on the fly. Or if this is possible call me an idiot for not finding out and teach me how to do it.

Per
Message 9 of 21
(5,717 Views)
Or if anyone with 7.1 could take a screenshot of the example, it'd be much appreciated.
Best wishes,
Will.
0 Kudos
Message 10 of 21
(5,707 Views)