USB data receiving

A forum for general discussion of the Python programming language.

USB data receiving

Postby awlemn » Mon Mar 25, 2013 3:39 am


Imagine i have 3 devices each one connect by usb, and they are sending information continuously.
Now, i've got 3 threads, one for each port, to deal with the information i receive.

Is it possible that i may loose some bytes?
If some, is there any way to make this a little more "real time"?

thank you :)
Posts: 1
Joined: Mon Mar 25, 2013 3:34 am

Re: USB data receiving

Postby tnknepp » Mon Mar 25, 2013 3:27 pm

Information is never sent continuously via a digital signal. A continuous transfer can only occur via an analog signal. There is likely some flow control in your instrument, and definitely a defined baud rate. You can specify the baud rate in your python script for each input, and an associated time out. There should be no loss of data other than the usual, though very rare, send/receive errors. Most instrument operate between 2400 - 9600, which is plenty "slow" enough for even a humble computer.
Python: 2.7 via Anaconda
Numpy: 1.7
Pandas: 0.11
OS: Windows 7
IDE: Spyder/IPython
User avatar
Posts: 153
Joined: Mon Mar 11, 2013 7:41 pm

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 6 guests