I'm using the python interface, trying to read data from a photocell in streaming mode, check if the resulting data exceed some criterion, and if so, change the value on a digital output pin. My code is:
import numpy as np import u3 import time d = u3.U3() d.configU3() d.getCalibrationData() d.configAnalog(u3.FIO0) d.streamConfig(NumChannels=1,PChannels=,NChannels=,Resolution=0,ScanFrequency=2500) d.streamStart() checkForZeroTime = False for content in d.streamData(): if checkForZeroTime: if time.time()>=nextZeroTime: d.getFeedback(u3.BitStateWrite(IONumber=11,State=0)) checkForZeroTime = False if content is not None: data = content['AIN0'] if np.any(np.array(data)>1): d.getFeedback(u3.BitStateWrite(IONumber=11,State=1)) nextZeroTime = time.time()+1 checkForZeroTime = True
However, the device to which the output is attached isn't picking up any of the output events. When I just do:
import u3 d = u3.U3() d.configU3() d.getFeedback(u3.BitStateWrite(IONumber=11,State=1))
The device does indeed receive an output event, so this doesn't seem to be a wiring issue.
Is it possible that when the u3 is in streaming input mode it can't do any digital outputs?