From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Output the source for acquisition ticks

I am acquiring an analog signal from physical channel A with a frequency f and underlying TimeBase of 100MHz from the DAQ card (internally, i.e. no external trigger source).
On physical channel B I now need to output a digital signal that coincides with the ticks used for the acquisition of channel A.
Specifically, whenever the DAQ board generates a tick to start the acquisition of one sample on channel A, I want that same tick  to simultaneoulsy be output on channel B. This means that I do not want to specify a frequency for the output of the ticks on channel B, but rather 'redirect' the tick signal to an output.
I am using the PCIe-6376 card.
The manual states that "AI Sample Clock Timebase is not available as an output on the I/O connector." Does this mean that what I am trying to do is impossible?

Attached is my best attempt, however, I am having trouble getting the ticks to be output on channel B.

0 Kudos
Message 1 of 7
(2,478 Views)

Hi doug,

 

can't you use the sample clock of the AI channel?

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(2,464 Views)

I don't have a physical card to check, but I think you should be able to do this (it works with a simulated PCIe-6376)

 

snippet.png

 

Here I've used the DAQmx Connect Terminals.vi to route the ai/SampleClock to PFI0, although you can use any of the PFI lines. This allows you to mirror the sample clock to an output line, which I think is what you want?


GCentral
Message 3 of 7
(2,461 Views)

If you can't export the clock you need to a PFI pin on that hardware, you can perhaps still make it work another way.

 

I think you could generate a 100MHz pulsetrain on a digital output pin (this is the exported clock you need), then route it back in to another digital pin on the hardware and use this as an "external" sample clock for your analog IO.

 

Deceased

 

 

0 Kudos
Message 4 of 7
(2,457 Views)

@ GerdW:

What yours does, is give a HIGH tick whenever I take a sample, no?
What I need is a HIGH tick whenever the counter for that channel is HIGH. I.e. if I use a 100MHz Timebase for channel A, I want channel B to output a 100MHz signal. The acquisition rate should not affect the output of channel B at all.

0 Kudos
Message 5 of 7
(2,420 Views)

Ah, then for my suggestion you also don't want the sample clock but rather the timebase. Just choose differently from the options.

 

As a side note, you may need to right click on the control/constant and enable Advanced Terminals via the filtering options. See here for details


GCentral
Message 6 of 7
(2,409 Views)

First 2 steps back and hopefully we'll find our way along to 3 steps forward.

 

1. If you go into MAX and select your device, there's a tab at the bottom for "Device Routes".  This is a good place to go when you need to figure out what routing you can and can't do.  And sure enough, it's clear that the AI Sample Clock Timebase can't be routed to a PFI pin.

 

2. Fortunately, while the *functional* signal known as the "/Dev1/ai/SampleClockTimebase" can't be routed from inside the AI timing engine circuitry, the raw original signal outside the AI timing engine *can* be.  It's known as "/Dev1/100MHzTimebase".

 

3. The routing matrix in MAX shows it in yellow on my device, meaning that routing is *indirect*, requiring the use of some further resources on the board (usually a counter).

 

4. cbutcher has been exactly right, twice.  In msg #3 he answered the question as you originally phrased it.   In msg #6 he answered your clarified question, telling you more briefly and directly the same thing I'm giving you some background details about.

 

5. It still seems odd to export the timebase alone.  I'd think that at some point it'd be important to *also* establish when the AI samples happen.  Exporting clocks is usually for the purpose of syncing separate devices, and syncing usually also means aligning sampled data from those separate devices.   I'd think you'd want to also export the AI Sample Clock signal.

 

 

-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 7
(2,375 Views)