Jump to content
  • 0

About analog discovery triggers


k.hirabayashi

Question

Dear Help,

About the of the trigger
The waveform of ① attached with the following source code was acquired.
However, if you want to acquire at the trigger position like ②, what kind of setting should be done?

I am using the SDK in C#

double range1 = 50;
double range2 = 5;
double acHz = 3561;
int bufferSize = 8192;
int tgch = 0;
double hysteresis = (double)(50.0 / 100.0);
double timeout = 100;
double tleve = 0;
double position = bufferSize / 2.0 / acHz;

FDwfAnalogInConfigure(hdwf, false, false);
FDwfAnalogInAcquisitionModeSet(hdwf, 0);
FDwfAnalogInFrequencySet(hdwf, acHz);
FDwfAnalogInBufferSizeSet(hdwf, bufferSize);
FDwfAnalogInChannelEnableSet(hdwf, 0, true);
FDwfAnalogInChannelEnableSet(hdwf, 1, true);
FDwfAnalogInChannelRangeSet(hdwf, 0, range1);
FDwfAnalogInChannelRangeSet(hdwf, 1, range2);
FDwfAnalogInTriggerAutoTimeoutSet(hdwf, timeout);
FDwfAnalogInTriggerSourceSet(hdwf, 2);
FDwfAnalogInTriggerTypeSet(hdwf, 0);
FDwfAnalogInTriggerChannelSet(hdwf, tgch);
FDwfAnalogInTriggerLevelSet(hdwf, tleve);
FDwfAnalogInTriggerConditionSet(hdwf, 0);
FDwfAnalogInTriggerHysteresisSet(hdwf, hysteresis);
FDwfAnalogInTriggerPositionSet(hdwf, position);
FDwfAnalogInConfigure(hdwf, false, true);

OutPutWave....

do
{
    FDwfAnalogInStatus(hdwf, true, ref sts);
} while (sts != AnalogDiscovery.DwfState.DwfStateDone);

 

thank you for the help,

trigger.jpg

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...