1 Reply Latest reply on Dec 1, 2014 4:13 PM by manuk_96

    How to receive data from two devices





      I would like to do a program that only read data from devices.


      I plan to send a vendor command to request data from both devices and both devices will send data to host. Is it open two threading?




      Best regards


      Chong Han 

        • 1. Re: How to receive data from two devices

          Yes, you can have a separate thread for each device and do your transfers. This approach will scale to as many devices you want. It will also be easy to add >2 devices and it will prevent any one device from locking up transfers on other devices.






          You can alternatively go for a simple run loop by polling all devices. It is very simple to code but can introduce a lot of delays between samples of different devices. And one failed device can hold up every other devices in your loop.