This is a guide to setup the NI cDAQ with MATLAB
Note: The latest version of MATLAB supported by the DAQmx package is R2018b. In order to use this DAQ you must install R2018b.
This assumes prior knowledge of MATLAB and a MathWorks account.
Download MATLAB, Simulink, Stateflow and Other MathWorks Products
Select and download R2018b
Follow the prompts, including signing in to acquire the license.
When prompted to install toolboxes, check the boxes for:
Data Acquisition Toolbox
Vehicle Network Toolbox
From there, let the install finish.
While the install is finishing, download this package:
Once the download is complete: open that support package and install it in MATLAB.
This will require a restart of your PC after completion.
There's no need to interact with any NI gui's or register the hardware.
After restart: use the USB connection to the cDAQ to connect to your PC and ensure the DAQ is powered on.
In the matlab command window: insert the following command:
>> daq.getDevices
If everything is successful, you will see this as a result:
From this image: it is seen that there are three cards connected to the chassis with unique device ID's. These device ID's are determined by the SLOT of the daq the card is connected to.
We have three different cards connected to the chassis.