High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

PXIe-5105 two channel measurement

I am trying to do a 2 channel measurement by setting the other channel as the second channel. It works when the other channel is channel 0. I believe this is the default for the other channel.

 

When I tried changing the other channel to a different channel it does not work, it is always using channel 0.

niScope_SetAttributeViString (handle, otherChannel, NISCOPE_ATTR_MEAS_OTHER_CHANNEL, 0)

 

Is there another function call i have to call to commit the change?

0 Kudos
Message 1 of 3
(3,422 Views)

Please provide your vi(s) or code that setup the task.

 

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 3
(3,402 Views)

struct niScope_wfmInfo *arrayWfmInfoPtr = NULL;
  ViReal64 *arrayWaveformPtr = NULL;
  ViInt32 numWaveForm = 0;

  handleErr(niScope_ActualNumWfms(handle, firstChannel, &numWaveForm));

 

  handleErr(niScope_SetAttributeViString (handle, otherChannel, NISCOPE_ATTR_MEAS_OTHER_CHANNEL, 0));        

  if (arrayWfmInfoPtr)
    free (arrayWfmInfoPtr);
  arrayWfmInfoPtr = malloc(sizeof(struct niScope_wfmInfo) * numWaveForm);

  if (arrayWaveformPtr)
    free (arrayWaveformPtr);
  arrayWaveformPtr = malloc (sizeof(ViReal64) * arrayActualRecordLength * numWaveForm);


  if (arrayWaveformPtr == NULL || arrayWfmInfoPtr == NULL)
  {
    goto Error;
  }

  handleErr(niScope_InitiateAcquisition (handle));

  handleErr(niScope_FetchArrayMeasurement (handle, firstChannel, timeout, SUBTRACT, arrayActualRecordLength,arrayWaveformPtr, arrayWfmInfoPtr));
 

0 Kudos
Message 3 of 3
(3,390 Views)