Jump to content
  • 0

AnalogIn_Trigger problem


Ubaidullah_Asif

Question

Hi, I run analog discovery Analog In Trigger input code. I want to save the every acquisitions in file but in this code the while loop is not break or ends. can anyone help me in breaking/ending this while loop. loop is:

for iTrigger in range(1,101):

#begin acquisition

dwf.FDwfAnalogInConfigure(hdwf, c_bool(False), c_bool(True))

x = "i"

while True:

dwf.FDwfAnalogInStatus(hdwf, c_bool(1), byref(sts))

print " i am here!!%s", i

i = i+1

if sts.value == DwfStateDone.value :

break

time.sleep(0.001)

 

dwf.FDwfAnalogInStatusData(hdwf, 0, rgdSamples, 8192)

 

dc = sum(rgdSamples)/len(rgdSamples)

print "Acquisition #"+str(iTrigger)+" average: "+str(dc)+"V"

any guideline or suggestion? or verified answer

 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...