Jump to content

MikeWatson

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by MikeWatson

  1. Thank you @attila. I set the sample mode to Min/Max in the app and saw the glitch goes up to 7V. So I did what you suggested and set trigger level to 7. Now I have consistent triggers. One thing I didn't do right is the trigger position. The number means where in time to center. So a negative number moves the trigger position to the right. Should this be in the API docs? Thanks again! FDwfAnalogInTriggerFilterSet(hdwf, filterDecimate); FDwfAnalogInTriggerLevelSet(hdwf, 7); FDwfAnalogInTriggerConditionSet(hdwf, trigcondRisingPositive); FDwfAnalogInTriggerPositionSet(hdwf, -0.05);
  2. Hello. I'm trying to analyze an analog signal using the WaveForm SDK on Linux (Ubuntu 18.04). But I'm having troubles controlling the trigger position in the buffer of 8192 samples. I want the event of interest located on the right end, so that the buffer captures what happened *BEFORE* it, instead of after it (to avoid repeated patterns.) I'm looking for a narrow spike >5V to trigger. There is only one such data point in the buffer of samples, and I can verify that. My code looks like this but the trigger position is not fixed in each run. Some times the >5V point is very early in the buffer. Thank you! // Modified from sample code: analogin_acquisition.cpp // sample rate // 50,000 Hz, 8192 samples, // 163.84 ms range // 0.00002s or 20 us between samples FDwfAnalogInFrequencySet(hdwf, 50000.0); // configure trigger FDwfAnalogInTriggerSourceSet(hdwf, trigsrcDetectorAnalogIn); FDwfAnalogInTriggerTypeSet(hdwf, trigtypeEdge); FDwfAnalogInTriggerConditionSet(hdwf, trigcondRisingPositive); FDwfAnalogInTriggerLevelSet(hdwf, 5.0); FDwfAnalogInTriggerHysteresisSet(hdwf, 0.05); FDwfAnalogInTriggerHoldOffSet(hdwf, 0.15); // cycle is 0.16 // set trigger position to the right // time range is (-82 ms, 82 ms) FDwfAnalogInTriggerPositionSet(hdwf, 0.08); // <-------- look here FDwfAnalogInConfigure(hdwf, 0, true); Digilent.adept.runtime_2.21.3-amd64.deb Digilent.waveforms_3.16.3_amd64.deb The WaveForm application works properly with the same parameters.
×
×
  • Create New...