07-25-2005 12:11 PM
07-27-2005 07:33 AM
'Initialize Scope
niScope_init("DAQ::1, NISCOPE_VAL_FALSE, NISCOPE_VAL_FALSE, vi)
niScope_ConfigureAcquisition(vi, NISCOPE_VAL_NORMAL)'Configure Vertical for each channel
niScope_ConfigureVertical(vi, "0", ....
niScope_ConfigureVertical(vi, "1", ....
'Configure Channel Characteristics for each channel
niScope_ConfigureChanCharacteristics(vi, "0", ....
niScope_ConfigureChanCharacteristics(vi, "1", ....'Configure Horizontal timing
niScope_ConfigureHorizontalTiming(vi, ....'Define Trigger
niScope_ConfigureTriggerEdge(vi, "0" or "1" or "VAL_EXTERNAL", ...'Initiate Acquisition
niScope_InitiateAcquisition(vi);'Retrieve Record Length
niScope_ActualRecordLength(vi, actualRecordLength);'Make an array for waveforms, size must be RecordLength * 2
Redim waveform( 0 to (actualRecordLength * 2) - 1)'Fecth de acquisition
niScope_Fetch(vi, "0,1", TimeOut, actualRecordLength, waveform(0), wfmInfo(0))'You must fetch all channels together to make sure that the acquisition moment is the same
'Where:
' TimeOut - must be higher than (RecordLenght / SampleRate) + time for trigger
' waveform - array with channels acquisition
' For example, if actualRecordLength is 25000
' from item 0 to 24999 => Samples for CH0
' from item 25000 to 49999 => Samples for CH1
'
' wfmInfo - array with timing information for each channel
' wfminfo(0).relativeInitialX = The start time acquisition for CH0
' wfminfo(1).relativeInitialX = The start time acquisition for CH1
' wfminfo(0).xincrement = time increment for each item of waveform array for CH0
' wfminfo(1).xincrement = time increment for each item of waveform array for CH1
07-27-2005 09:20 AM
Marcelo
Thanks for the great info. I'll give this a try (in CVI). I'm just beginning to learn how to make the 5112 work.
Scott Youngren
07-28-2005 04:27 AM
07-28-2005 07:29 AM