Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

changing the timebase for a pulse train running on a PCI6602

Hello,

I am generating a pulse train using the "generate pulse train.vi"  and I am running it on a PCI6602 card. I would like to change betweeen the timebases that the pulse train runs off of whenever I need to. I know there are 3 choices (80Mhz, 20 Mhz, 100kHz) and I know the default is 20Mhz. I have been using the "set attribute.vi", set SOURCE SELECTION, TIMEBASE n, and inputting n. When connected with the appropriate task ID, the set attribute vi will only NOTgive an error when n=80 000 000, 20 000 000, or 100 000 (which is good). But it doesn't seem to be changing the timebase. I am testing whether or not the timebase is changing by using the fact that the maximum output frequency of any counter is the timebase divided by 4. For instance, I have n = 100 000, but I can still acheive a frequency of 100 000 Hz. Plus, in the "continuous pulse generator config.vi", it still reads the timebase as 20 000 000 Hz. I feel it might be a problem in placing the "set attribute.vi".  I have tried many places, including between pulse config and counter start within gen pulse train.vi, and after gen pulse train .vi,


Could anyone possibly help?

- Kieran
0 Kudos
Message 1 of 4
(4,032 Views)
by the way, I am using regular Ni DAQ, not DAQmx

-Kieran
0 Kudos
Message 2 of 4
(4,030 Views)

To Kieran21:

I use DAQmx, but I think this will help you more or less.

You can change timebase by setting the properities of the virtual channel. In DAQmx, select "Channel Node", then find "Counter Output→General Properies→Counter Timebase→Source&Rate".

Source=OnboardClock

Rate=80Mhz, 20 Mhz or 100kHz

Hope it will help you!


Feel Good Inc. Love forever love is free. Let's turn forever you and me.
0 Kudos
Message 3 of 4
(4,025 Views)

To Kieran:

In NI traditional DAQ, you can use "Counter Set Attribute.vi" to setup your timebase.

attribute ID=source selection

attribute value type=timebase n

attribute value number=80M Hz, 20M Hz or 100k Hz

Hope it will help you!


Feel Good Inc. Love forever love is free. Let's turn forever you and me.
0 Kudos
Message 4 of 4
(4,024 Views)