RTXI / rtxi

Tutorials, FAQs, and more at http://rtxi.org/docs
GNU General Public License v3.0
53 stars 15 forks source link

Channels get scrambled when activating new channels #166

Closed thiagoburghi closed 6 months ago

thiagoburghi commented 6 months ago

Basic Information:

RTXI Version: 3.0.4 Installed from Live CD?: No DAQ device: NI PCIe 6259

Error Description: Activating a new DAQ channel in the control panel changes the signal of previously activated channels

What was supposed to happen: signals should remain associated to their correct channels

What steps will trigger the error? 1- Turn on Oscilloscope to monitor signals. 2 - Activate a channel (in the control panel) that is currently receiving a signal and display in oscilloscope. Example: channel 3 of our DAQ is just receiving white noise: image

3- Activate a second channel (in the control panel) that is currently receiving a different signal. The previously activated channel now displays the different signal. Example: after activating channel 6, channel 3 now display the different signal (pink noise): image

In addition, channel 6 now displays the signal that was previously associated to channel 3: image

4-Activating new signals keep scrambling the previous channels. Example: activated channel 7, now channel 6 is yet a different signal: image

While it is now channel 7 that acquired the white noise signal that should have been that of channel 3: image

5 - Deactivating the last activated channel seems to correct everything. Example: deactivating channel 7 results in channels 3 and 6 having the right signals: image

The problem is not one with the oscilloscope: recording the signals shows that the data associated to them has indeed been scrambled internally in RTXI. Here is data recorded after step 4: image

fusge commented 6 months ago

The error comes from the National Instruments DAQ driver for RTXI. It reads and writes channels in the order the channels are added instead of a "sorted by port number" order. The issue is fixed and should be available in the dev branch soon.

fusge commented 6 months ago

I merged the fix to the dev branch. Can you confirm that the update fixes the issue on your hardware?

thiagoburghi commented 6 months ago

I can confirm that the fix worked, thanks!