Digital I/O

Showing results for 
Search instead for 
Did you mean: 

PCI-6229 Digital I/O sample clock problem

Go to solution


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?





0 Kudos
Message 1 of 7
Accepted by topic author ossoo

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.



0 Kudos
Message 2 of 7

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.





Message Edited by ossoo on 06-07-2010 05:29 PM
0 Kudos
Message 3 of 7

How to use another digital channel as the external sample clock?



0 Kudos
Message 4 of 7

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.



Message Edited by B.E.Z. on 06-08-2010 12:06 PM
0 Kudos
Message 5 of 7

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.




0 Kudos
Message 6 of 7

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?




Bogdan Buricea

Applications Engineering

National Instruments

Bogdan Buricea
Applications Engineer
National Instruments
0 Kudos
Message 7 of 7