12-11-2008 03:23 PM
Solved! Go to Solution.
12-12-2008 11:19 AM
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,
12-12-2008 02:20 PM
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)
12-15-2008 05:04 PM
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,
12-15-2008 07:05 PM
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
12-16-2008 10:10 PM
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!