LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

use clock signal as digital input

I am using PXI 7811R FPGA module in a PXI 1042Q chassis.

I would like to use the clock signal (10 - 40 MHz) as a digital input, and be able to output the signal on an oscilloscope.  Now, all I have been reading is that the clock controls the execution times of VIs and functions, but is there a way to use it as a signal source?

If the clock signal cannot be used this way, is there a way to generate a digital signal in Labview FPGA without actually applying one to the DI (all I have is analog generators)?

All this is so I can generate a digital signal, feed it to an ADC board which in turns is connected to the FPGA (7811R), and finally try to display the samples on my PC (host VI).

Any input will be appreciated!
0 Kudos
Message 1 of 4
(3,635 Views)
I mean I will feed an analog signal to the ADC (a little correction up there).

I guess, I can feed the DIO line a square wave from the function generator I have, but the signal is pretty distorted.  I think it has to do with the TTL limits... but whatever it is, I am not getting a good input signal with what I have.

Do you think I need to buy a module that would possibly generate a digital signal?  I am not sure one exists.
0 Kudos
Message 2 of 4
(3,614 Views)
Hi Naso,

I hope you're doing well.  It sounds like you want to generate a digital clock signal from the FPGA to drive an ADC and then read in the digital data from the ADC, all within the 7811R.  I'm assuming you're using the latest version of LabVIEW FPGA (version 😎 since you didn't specify.  You can definitely create a digital output signal from the 7811R using the built in timing source.  You would set up a While loop with a Loop Timer to determine the timing of your loop, and use an I/O node to write the digital values.  To actually get your output to be a clock signal, you could use a shift register with a Not function to alternate between true false values.  This will be hardware timed since it is on the FPGA, so you will not need to feed in any outside signals for timing purposes.

There are a couple of shipping examples you can combine to help you get started.  You can find these under Help»Find Examples.  The first example is to show you how to set up a project for digital output (Hardware Input and Output»R Series»Basic IO»Digital Line Output - R Series.lvproj), and the second one shows you how to set the loop time to set your clock frequency (Hardware Input and Output»R Series»FPGA Fundamentals»Loops»Simple Loops - R Series.lvproj).  Let us know if this is helpful, or if you have more specific questions.  Have a great day!

Thaison V
Applications Engineer
National Instruments

0 Kudos
Message 3 of 4
(3,602 Views)
Thank you for the help, everything worked perfect.

I actually used a timed loop and used the FPGA reference clock to obtain frequencies as low as 2.5 MHz.  For anything lower I used your suggestion for a loop timer.
0 Kudos
Message 4 of 4
(3,577 Views)