for iTrigger in range(nAverage):
# new acquisition is started automatically after done state
while True:
dwf.FDwfAnalogInStatus(self.h, c_bool(True), byref(self.sts))
# print(self.sts.value)
# print(DwfStateDone.value)
if self.sts.value == DwfStateDone.value:
break
time.sleep(0.001)
# define channel to receive data
channel = c_int(self.nCH - 1)
# pass data to vector
dwf.FDwfAnalogInStatusData(self.h, channel, rxData, self.nRecLength) # get channel 1 data
dwf.FDwfAnalogInConfigure(self.h, c_bool(False), c_bool(True)) # deactivate oscilloscope before USB switching.
Lost connection in USB switching
in Test and Measurement
Posted
We are using AD2 on custom design imx6 based microcontroller.
The controller has only 2 USB ports & we are using a USB switching IC to switch between multiple devices.
The device performs well as long as we are not switching the USB port, but when switching is performed the device stops collecting data.
The USB switching action is equivalent of disconnecting & reconnecting USB cable. We are using Python for our application.
Here's the code.
What can be the possible error.