High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI-5122 External Sample Clock

Solved!
Go to solution
PXI-1031 Chassis
PXI-8106 PC
PXI-5122 14bit 100MS/s Digitizer
Labview 8.5
I am driving X-Y mirrors steering a laser.
I am measuring the reflected light
to develop a raster image of a sample.
I have a pixel clock running at 60MHz that
I want to clock the acquistion and external
trigger that defines the 'line valid' or sampling
across the mirrors during their constant velocity
range.
I am using [PFI0 with 'READY for START EVENT'] as
a start pulse to run my x-y mirror scan.
CH0: Analog signal
SMA TRIG: line valid
AUX: PFI0 with 'READY for START EVENT'
In the property node 'niScope'
when I add the following elements:
Sample Clock Timebase Source = VAL_NO_SOURCE
Sample Clock Timebase Rate = 60000000
Sample Clock Timebase Divisor = 1
I get the following message:
Error -1074118614 occurred at Error occurred at:  niScope Fetch Binary 16.vi:2
Possible reason(s):
Driver Status:  (Hex 0xBFFA402A)
An acquisition has not been initiated.
Error -1074134971 occurred at Property Node (arg 4) in CSKB-4X_VID.vi
Possible reason(s):
The channel or repeated capability name is not allowed.
Attribute: NISCOPE_ATTR_SAMP_CLK_TIMEBASE_SRC, Channel: 0
Attached are the VIs with the elements added to the niScope property node
and without.
I get the above errors even when I set the 'Sample Clock Timebase Source'
to 'VAL_NO_SOURCE'
It appears, by just adding the elements, it gives me the error(s).
How can I get the external sampling clock to work along with external trigger?
Download All
0 Kudos
Message 1 of 6
(8,820 Views)

Hi csk,

 

The error you are receiving  (Error -1074134971) is due to the fact that you are setting the sample clock timebase properties after setting the Active Channel property in the same property node. The property node executes in sequential order, so once you set the active channel, all subsequent properties will use this value. However, having this property set is not compatible with the timebase properties, so it gives this error. Therefore, you will need to add another Active Channel property beneath the Enable TIS property and pass an empty string to it (shown in attached screenshot; you can simply right-click the Enable TIS property and choose Add Element). Otherwise, you can just set the Sample Clock Timebase properties at the beginning of the property node or in a separate property node before the current one.

 

Regards,

Daniel S.
National Instruments
0 Kudos
Message 2 of 6
(8,802 Views)

That worked but now I am not getting the correct sampling size.

 

PFI0: Pulse to start my acquistion

CLKIN: 60MHz

CH0: 900Hz SAWTOOTH

TRIG: 1.8KHz (90% duty cycle)

 

(see attached image dump from Agilent Scope)

 

Between each TRIG rising and falling edge (as indicated on image)

I want to sample 150 points of the sawtooth. No points in the TRIG gap.

 

There will be 15,000 cycles of the sawtooth (30,000 transistions * 150 pts per transition)

4,500,000 points to sample

 

I am getting 4,995,000 samples from the digitizer.

 

If the TRIG is not starting and stopping the sampling on its edges (10% more points)

I would get calculated 4,950,000 (ehh.. closer to reported value)

 

0 Kudos
Message 3 of 6
(8,793 Views)

Hi csk,

 

When you say that you are receiving 4,995,000 samples, can you confirm that each fetch is returning just 150 samples or is this value different? If it is 150 samples each time, this would indicate that the loop is iterating and performing an acquisition 33,300 times rather than the expected 30,000 times. Based on the VI attached in your initial post, you are configuring the digitizer to perform a single acquisition each time (I assume with a record length of 150 samples), and doing this each time a rising edge is seen. This method assumes that the acquisition, fetching, and processing of the data can be done in the software before the next rising edge to trigger off of. However, I noticed that the loop only stops in the case of an error or the user pressing a stop button. Thus, I am interested in learning more about how you are configuring the program to acquire exactly 30,000 records of 150 samples each. Perhaps a screenshot or attaching the current code would also further help in my understanding. Thanks, and I look forward to hearing back from you soon!

 

Regards,

Daniel S.
National Instruments
0 Kudos
Message 4 of 6
(8,763 Views)

I used the wrong terminology in the graphic. I want to sample at the speed of my board's clock at 60MHz. I have this tied into the CLKIN input. I have a 90% duty cycle square wave going into the EXT TRIG port. My signal is going into CH0. I want to sample 4,500,000 points in one acquisition, sampling at my 60MHz clock rate AND only during the positive portion of my EXT TRIG signal.

 

At positive edge of TRIG, sample 150pts, stop sampling at negative edge of TRIG and 10% period, and repeat until collecting 4,500,000 points.

 

CSK

0 Kudos
Message 5 of 6
(8,755 Views)
Solution
Accepted by topic author csk

Hi csk,

 

I was wondering if you could clarify how many samples you wish to take. Am I correct that you wish to take 30,000 sets of 150 samples each, or do you mean you want to take 150 sets of 30,000 samples each (since 30,000 periods of the 60 MHz clock fits within 90% of a 1.8kHz signal)? In either case, the current method you are using is only going to acquire a single record each time through the loop, and so you will be limited by how fast you can retrigger in software.

 

For your application, it sounds like you will need to perform a multi-record acquisition, as this will allow you to specify what condition to trigger off of and how many samples to acquire each time the trigger occurs. In this way, each "transition" of the sawtooth wave is considered a single record, and you are acquiring multiple different records corresponding to each time a rising edge trigger occurs. I believe that you can accomplish exactly what you need with only a slight modification to the niScope shipping example "niScope EX Multi Record Fetch More Than Available Memory.vi" (found at Start » Programs » National Instruments » NI-SCOPE » Examples). With this VI, you can specify that you wish each record to have a min record length of 30,000 samples (or 150 samples if this is the case) and that you wish to acquire 150 records (or 30,000 if this is the case). The only major change that you would need to make is to change the Configure Trigger VI to be a Digital Edge trigger rather than an analog trigger. With this and a few other modifications (ie - configuring the external clock) you should be able to accomplish what you need. Please let me know if I explained this alright and if my assumptions are correct. Thanks, and best of luck!

Daniel S.
National Instruments
Message 6 of 6
(8,738 Views)