High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

Minimum requirements to "reset" a 5122 for a repeat acqusition.

Solved!
Go to solution

Hello All,

 

I am looking to revamp and streamline a legacy project running in CVI. I want to minimize to overhead for a repeated data acquisition. (Due to the user interactive nature of the experiment, multi-record is not really a good solution in this case.)

 

I used to have a paper document about the proper sequence of events for programming the 5122, but I can no longer find this document - physical or online. I do not recall if a rearm sequence was described there.  It seems that some of this very useful  information is no longer available in the modern era. If anyone has a modern online version of this document, I would love a link.

 

Use is a PXIe-5122 and PXIe-5442 that are synched with Tclock and the 5122 is triggered across the PXI backplane by an emarker from the 5442.

 

Currently, the following function calls related to the 5122 happen between each repeat

 

niScope_Abort (NISCOPE_ID);
niScope_ConfigureAcquisitionType (NISCOPE_ID, NISCOPE_VAL_NORMAL);
niScope_ConfigureChanCharacteristics (NISCOPE_ID, channel, NISCOPE_VAL_50_OHMS, 0);
niScope_ConfigureVertical (NISCOPE_ID, channel, range, 0, dig_couple, 1.0, NISCOPE_VAL_TRUE);
niScope_ConfigureHorizontalTiming (NISCOPE_ID, (*exp_thread).detect.bandwidth * 2, 3.2e7, 0.00, 1, NISCOPE_VAL_TRUE);
niScope_SampleRate (NISCOPE_ID, &actual_sample_rate);
niScope_ConfigureTriggerDigital (NISCOPE_ID, NISCOPE_VAL_RTSI_6,  NISCOPE_VAL_POSITIVE, 0.0, streaming_delay);
niScope_SetAttributeViInt32 (NISCOPE_ID, VI_NULL, NISCOPE_ATTR_FETCH_RELATIVE_TO, NISCOPE_VAL_PRETRIGGER);     
niTClk_Initiate (2, synch_session);

 

I would like to minimize these step as possible. I have tried a simple

niScope_Abort (NISCOPE_ID);

niTClk_Initiate (2, synch_session);

 

with no luck.

 

I apologize for the CVI but I assume the namespace for G is almost the same.

 

Greg

 

0 Kudos
Message 1 of 4
(3,927 Views)

Why niScope_Abort? 

something like StopAquisition?

No need to do the time consuming TClk resync unless timing parameters are changed (more details in the TClk-help)

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 4
(3,907 Views)

Hello Henrik,

 

I think that maybe we are describing slight differences in the naming schemes between CVI and LV. In the CVI version of NI_Scope there is no function named niScope_StopAcqusition.

 

niScope_Abort is described as

    C Function Prototype     ViStatus niScope_Abort (ViSession vi);

    Purpose

    Aborts an acquisition and returns the digitizer to the Idle state. Call this function if the digitizer times out waiting for a

    trigger.

 

I will admit the name niScope_Abort might be too strong name that suggests a function more akin to niScope_Reset.

 

Similarly, niTClk_Initiate is separate from niTClk_synchronize and niTClk_ConfigureForHomogeneousTriggers calls that must be made when either of the sampling rates change. I have already flagged any user changes to the sampling rates to invoke these function sparingly. You are correct to warn about unwarranted calls to  niTClk_synchronize, the function has a lengthy "settle" time.

 

In this case, niTClk_Initiate essentially replaces the otherwise required calls to  niScope_InitiateAcquisition and niFgen_InitiateGeneration.

 

Thanks for the valuable discussion.

 

0 Kudos
Message 3 of 4
(3,904 Views)
Solution
Accepted by topic author blakney

The problem I was seeing was related to the Tclock configuration on the 5442 AWG and not the digitizer. This caused the trigger for the digitizer to never get sent.

 

I find that a simple reset can be accomplished with

niTClk_Abort ()

niTClk_Initiate ()

for a simple case where the acquisition is fully contained within the onboard memory.

 

Sorry for the confusion.

Greg

0 Kudos
Message 4 of 4
(3,895 Views)