LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How divide clocks or create virtual ripple counter in LV7 using DAQmx on E-series.

I'm looking for help with control over clocks, where I want to divide down the rate of a source clock to create one or more controllable, reduced rate, clock sources to drive DAQms Timing Controls. The original source clock is either the onboard (internal) clock or an external clock brought in through the PFI0 pin. Information and - better yet - example program frame would be much appreciated.

My systems use LabView 7 with DAQmx configured E-series devices. One system uses PCI-MIO-16E board, the other uses the pc-card near equivalent; on the PCI boad, the external clock ranges from sub-Hz to almost 1Mhz. (see simplified programs attached). I also have a 6533 device I intend
to synchronize through a RTSI cable.

I want to drive the analog outputs with selectable clock rates which are 1/N of the input frequency of the source, internal or external. All the counters controls (e.g. Down Counter or Divider Config.vi) appear to be incompatible with DAQmx Timing control. The solution must be in the polymorphic configuration (yes?!), but I haven't yet found any examples or support solutions that address this issue.

So, for both external and internal clock sources,
(1) How can I use DAQmx timing controls with counters, and/or
(2) How can I configure DAQmx timing controls to function like counters, with control over output rate compared to input rate (for external clocks, since I think I know how I would do it for internal timebase... but it doesn't seem transferable), and/or
(3) Is there an example of how to make a ripple counter (input internal or external, output rates = 1/2, 1/4, 1/8, 1/16) that compatible with DAQmx.

Thank you very much.
0 Kudos
Message 1 of 6
(3,548 Views)
Hello:

I have attached a LV 7.0, DAQmx example for dividing a signal found of PFI 0 down by a factor of n with n = {4,5,6,...}. Unfortunately, you can not divide down by a factor of less than 4. This is because the min inputs for high tick and low tick is 2 and 2+2 = 4. This will create an output on CTR0 OUT pin that you can use for your AO part of code... Good Luck!

Sincerely,
Brooks B
Applications Engineer
National Instruments
Message 2 of 6
(3,544 Views)
Thanks - it works perfectly for the analog outputs. It didn't occur to me that the "ticks" were used for this purpose.
0 Kudos
Message 3 of 6
(3,544 Views)
Dear Mr. Brooks,
 
could you post an equivalent example code in Ansi C using DAQMX?
I have the same problem on how to use counter 0 to divide down an external
clock source present in the PFI8 input and how to out the divided clock in the CTR 0 OUT or,
much better, how to use the divided down clock as a sample clock.
 
My system is composed of
- One PXI-1024 with a Win2k controller
- Three PXI-6071E board
 
Thank you so much in advance
 
Stefano
Italy
 
0 Kudos
Message 4 of 6
(3,365 Views)
Dear NI / Mr. Brooks,
 
could you post an equivalent example code in Ansi C using DAQMX?
I have the same problem on how to use counter 0 to divide down an external
clock source present in the PFI8 input and how to out the divided clock in the CTR 0 OUT or,
much better, how to use the divided down clock as a sample clock.
 
My system is composed of
- One PXI-1024 with a Win2k controller
- Three PXI-6071E board
 
Thank you so much in advance
 
Stefano
Italy
0 Kudos
Message 5 of 6
(3,364 Views)
Dear NI / Mr. Brooks,
 
could you post an equivalent example code in Ansi C using DAQMX?
I have the same problem on how to use counter 0 to divide down an external
clock source present in the PFI8 input and how to out the divided clock in the CTR 0 OUT or,
much better, how to use the divided down clock as a sample clock.
 
My system is composed of
- One PXI-1024 with a Win2k controller
- Three PXI-6071E board
 
Thank you so much in advance
 
Stefano
Italy
0 Kudos
Message 6 of 6
(3,363 Views)