High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI 5122 CLK OUT

I have been trying to verify that a 100MHz, or any clock signal at all, is present at the CLK OUT connector on the PXI 5122 Digitizer card we have.   We have several of these digitizer cards, and I cannot get any kind of clock signal at all to be routed to the CLK OUT connector on any of these cards.   I am using Visual Basic 6.0 with the NIScope 9.0.   After going through the help documentation forwards and backwards, the two lines of code I have been using to try and accomplish this are:
 
Dim Session as ViSession
Dim ErrorCode as string
 
ErrorCode = niScope_init("Dev1", NISCOPE_VAL_FALSE, NISCOPE_VAL_FALSE, Session)
ErrorCode = niScope_configureclock(Session, NISCOPE_VAL_NO_SOURCE,  NISCOPE_VAL_CLK_OUT, NISCOPE_VAL_NO_SOURCE, True)
 
 
These  two lines come back with no errors, but there is still nothing present at the CLK OUT connector.  I've had the CLK OUT hooked to an oscilloscope and also a frequency counter, but there is nothing there.   Is this because the clock is driven low until the 5122 samples for data? Or should there automatically be a clock signal present at the CLK OUT by using the niScope_configureclock  regardless of whether the 5122 is acquiring data or not?  I was thinking maybe there is an additional command I am leaving out that needs to be used to specify which internal timebase to route to the CLK OUT.  
 
Craig
 
0 Kudos
Message 1 of 3
(6,694 Views)
There are several things going on here.

First, you won't see a signal until the settings get committed to hardware.  This doesn't happen immediately when you call _configureClock.  The settings will be applied to hardware when you call niScope_Commit, niScope_InitiateAcquisition, or niScope_Read.

(Commit applies the attributes to hardware; InitiateAcquisition commits and then starts acquiring samples and looking for triggers; Read commits, initiates, and tries to fetch data.)

Second, if you want to route the sample clock, _configureClock is not the function you want to use.  That will try to route the reference clock, not the sample clock.  For example, if you set the device to lock its sample clock to a 10 MHz external reference, this function will route that 10 MHz signal out of ClockOut, not the 100 MHz sample clock.

You should use the niScope_ExportSignal function, with NISCOPE_VAL_SAMPLE_CLOCK as the signal, NULL as the signalIdentifier, and NISCOPE_VAL_CLK_OUT as the outputTerminal.  Alternatively, you can set the NISCOPE_ATTR_EXPORTED_SAMPLE_CLOCK_OUTPUT_TERMINAL attribute to NISCOPE_VAL_CLK_OUT.


Message 2 of 3
(6,683 Views)
Thanks for the help.  I was able to get both of your suggestions to work.   I was able to see a nice clean 100MHz signal at the CLK OUT connector once I acquired data at the maximum sampling rate. 
 
Thanks,
 
Craig
0 Kudos
Message 3 of 3
(6,657 Views)