I'm looking at data from the example code, AnalogIn_Trigger.py. I made it simpler by removing the average loop, now just prints a single post-trigger dataset.
I have the following
1KHz 2Vrms attached to ch1
dwf.FDwfAnalogInTriggerAutoTimeoutSet(hdwf, c_double(0)) #disable auto trigger
dwf.FDwfAnalogInTriggerSourceSet(hdwf, trigsrcDetectorAnalogIn) #one of the analog in channels
dwf.FDwfAnalogInTriggerTypeSet(hdwf, trigtypeEdge)
dwf.FDwfAnalogInTriggerChannelSet(hdwf, c_int(0)) # first channel
dwf.FDwfAnalogInTriggerLevelSet(hdwf, c_double(1.20)) # 1.2V
dwf.FDwfAnalogInTriggerConditionSet(hdwf, trigcondRisingPositive)
when I print acquired data, I would expect the dataset[0] to start just above the triggerlevelset of 1.2v. My results are all over the place, here's output from 2 runs
DWF Version: 3.5.4
Opening first device
Preparing to read sample...
1.5915261256
1.5915261256
1.5911919716
1.58952120157
1.58918704757
1.58785043155
1.58818458555
1.58551135352
1.58684796954
1.58517719951
DWF Version: 3.5.4
Opening first device
Preparing to read sample...
0.778195278362
0.779197740376
0.779197740376
0.780534356395
0.780534356395
0.782873434427
0.783541742436
0.784878358455
0.784878358455
0.785212512459
Question
holla2040
Folks,
I'm looking at data from the example code, AnalogIn_Trigger.py. I made it simpler by removing the average loop, now just prints a single post-trigger dataset.
I have the following
1KHz 2Vrms attached to ch1
dwf.FDwfAnalogInTriggerAutoTimeoutSet(hdwf, c_double(0)) #disable auto trigger
dwf.FDwfAnalogInTriggerSourceSet(hdwf, trigsrcDetectorAnalogIn) #one of the analog in channels
dwf.FDwfAnalogInTriggerTypeSet(hdwf, trigtypeEdge)
dwf.FDwfAnalogInTriggerChannelSet(hdwf, c_int(0)) # first channel
dwf.FDwfAnalogInTriggerLevelSet(hdwf, c_double(1.20)) # 1.2V
dwf.FDwfAnalogInTriggerConditionSet(hdwf, trigcondRisingPositive)
when I print acquired data, I would expect the dataset[0] to start just above the triggerlevelset of 1.2v. My results are all over the place, here's output from 2 runs
DWF Version: 3.5.4
Opening first device
Preparing to read sample...
1.5915261256
1.5915261256
1.5911919716
1.58952120157
1.58918704757
1.58785043155
1.58818458555
1.58551135352
1.58684796954
1.58517719951
DWF Version: 3.5.4
Opening first device
Preparing to read sample...
0.778195278362
0.779197740376
0.779197740376
0.780534356395
0.780534356395
0.782873434427
0.783541742436
0.784878358455
0.784878358455
0.785212512459
Any ideas? I've attached my code.
Thanks,
Craig
AnalogIn_Trigger.py
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.