06-04-2010 02:37 PM
Hi,
I am using PCI-6229. I need to use digital output channel to generate 20KHz 30%duty cycle pulses.
The datasheet shows DO sample clock frequency can be 1M Hz. But in may application, only 100KHzTimebase can work to generate. But acctually I need at least 200K Hz.
Attached is the Vi I made. Can anyone help me with this problem?
Thanks
Solved! Go to Solution.
06-07-2010 12:35 PM
Hello ossoo,
The PCI-6229 doesn't have a digital timing engine, so in order to create a digital task that will run at 1MHz you must use an external sample clock. One thing you can do though is generate a pulse train at your desired frequency using one of the onboard counters of the 6229, and then using that counter output as the sample clock for your digital task. Take a look at the attached modification I made to your VI which shows how to generate your digital task at 1MHz using the onboard counter. You can change the frequency of the counter's pulse train in order to change the frequency of your digital output. Please let me know if you have any questions.
Regards,
06-07-2010 05:26 PM - edited 06-07-2010 05:29 PM
Thanks, B.E.Z.
This works.
I have another question. Because I want to save the two counter for other use, is there any other ways to create the 1MHz or at least 200KHz sample clock? Because I want to create 200K Hz 30% duty cycle digital pulses.
Thanks.
06-07-2010 05:48 PM
How to use another digital channel as the external sample clock?
Thanks
06-08-2010 12:04 PM - edited 06-08-2010 12:06 PM
Hello ossoo,
There is also a terminal on the card called Freq Out which can be used to generate a 1MHz pulse train. Take a look at page 7-23 of the User Manual for more information on this terminal. This can then be routed to your digital sample clock, just as we did with the previous example.
Regards,
08-21-2012 08:48 AM
Hello All,
I tried to modify the VI posted in this thread in order to aquire a digital signal with the PCI-6229. Sinc the frequency of the signal is below 1k i tried to devide the signal of ctr0 respectively of freqout by 8 or 16 since 6.25k or 12.5k sampling frequency would be more than enough for my purpose. By the way, when I am using the 100k timebase for the timing of the task the programm is working. Since i try to monitor up to 20 channels, the amount of data genereated is too much. Therefore I tried to use the modified VI.
Sometimes, the VI works, but almost always, the DAQmx - Read VI doesn´t terminate.
Has anybody an idea what i did wrong?
Thank you for your assistance.
Sincerely,
Mirko
08-22-2012 06:55 PM
Hi Mirko,
One idea that you can try is to give the Read VI a timeout.
Another idea is to use the DAQmx Configure Input Buffer VI to make the buffer bigger if you think that there is too much data.
Do any of those work?
Sincerely,
Bogdan Buricea
Applications Engineering
National Instruments