NI USB-6361 Device Timeout Error When Using "startForeground" Command in MATLAB®

Updated Jun 17, 2022

Reported In

Hardware

  • USB-6361

Software

  • MATLAB

Other

I use MATLAB for programming my USB-6361 devices.

Issue Details

I have multiple NI USB-6361 devices. When I run MATLAB code where there is used the "startForeground" command, some of my devices throw a Timeout error reaching the line where the "startForeground" is located.
image.png

Solution

NI devices are programmed in MATLAB with the use of the Data Acquisition Toolbox. The "StartForeground" command is not a function of the DAQ Toolbox. It is a part of Start Foreground Operations the use of which is not recommended in the MATLAB versions starting from the R2020a as there are possibilities of unexpected behavior from the system.
It is recommended to use the natively supported commands and functions of the DAQ Toolbox in MATLAB when working with NI Hardware.

Additional Information

NOTE: For technical support regarding the "Data Acquisition Toolbox for MATLAB and Simulink" contact MathWorks.

MATLAB® is a registered trademark of The MathWorks, Inc.