Synchronizing the Analog Input Subsystems of Multiple DT9837B Modules with MATLAB R2018b

This article is a guide to configuring two DT9837B modules for synchronized analog input acquisition in MATLAB R2018b. It can also be applied to grouping other modules, of the same model, i.e. DT9837A, DT9837C, DT9847 Series, DT9857E Series. This procedure is required since Master/Slave mode is not supported with MATLAB's 64-bit sessions.

1. This article assumes that the target system is already configured to use Data Translation hardware with MATLAB R2018b (or newer).

2. You will need to install the latest version of Data Translation's Device Collection Manager v1.0.0.4.

3. Close all software applications and disconnect the DT9837B modules, if already connected to the target system's USB ports.

4. Connect one DT9837B module to the target system and then open Data Translation's 'Data Acquisition Control Panel' applet, in Windows (Legacy) Control Panel. Make note of the 'DT-Open Layer Name' (a.k.a. board name), in the applet, and then close it.

5. Connect the second DT9837B module to the target system and then open the 'Data Acquisition Control Panel' applet once again. Make note of the second module's 'DT-Open Layer Name' (a.k.a. board name). Verify that it looks similar to the image below and then close the applet.

6. Open the DT Device Collection Manager located on the target system. The application should have been installed to the folder: 'C:\Program Files (x86)\Data Translation\Utilities'.

7. Click on 'New Collection' and enter a collection name, e.g. DT9837Bsync.

8. Select a device from the combo box, in the lower left corner, and then click the 'Add Device' button.

9. Select the second device from the combo box and then click the 'Add Device' button again.

10. Click on the device designated to be the 'Master' and then select the 'Master Device' property. The second device will not have this property value selected.

11. Close the DT Device Collection Manager and then open the 'Data Acquisition Control Panel' applet. Verify that the board list shows the 'DT9837Bsync' collection name, which will be the 'device' used in MATLAB.

12. When synchronizing multiple DT9837B modules, connect a RJ45 cable (less than 1 foot in length) between the two modules. Please refer to the DT9837 Series User's Manual (

13. Close the 'Data Acquisition Control Panel' applet and launch MATLAB R2018b (or newer). Begin by verifying the available Data Translation devices. For this example, the 'DT9837Bsync' Device ID will be used. The Analog Input subsystem shows 14 channels between the two modules. The first eight channels are the BNC analog input channels. The remaining channels correspond to the tachometer counter channels and the gate counter channels. (Please refer to the 'Supported Device Driver Capabilities' chart in the DT9837 Series User's Manual.)

The following lines of code were used in a .m script to acquire and display data from the Analog Input subsystems, of two DT9837B modules.

% Begin by creating a session.
s = daq.createSession('dt');

% Add an analog input channel for each DT9837B module, in the Device Collection,
% with the measurement type set to ‘Voltage’.
CollectionName = 'DT9837Bsync';
ch0 = addAnalogInputChannel(s,CollectionName, '0', 'Voltage');	% First AIN channel of collection device #0
ch4 = addAnalogInputChannel(s,CollectionName, '4', 'Voltage');	% First AIN channel of collection device #1

% Configure analog input channel properties
ch0.Coupling= 'DC';
ch0.TerminalConfig = 'SingleEnded';		
ch0.Range = [-10,10];
ch4.Coupling= 'DC';
ch4.TerminalConfig = 'SingleEnded';		
ch4.Range = [-10,10];

%% Set session properties
% Set the acquisition rate (30kHz). 
s.Rate = 30000;

%% Set input event handler
% Add a listener for DataAvailable events. The callback function plots
% the acquired data against time
lh = addlistener(s,'DataAvailable', @(src,event) plot(event.TimeStamps, event.Data));

% Acquire continuous data in the background
s.IsContinuous = true;

durationInSeconds = 10;
localTimer = tic;
while s.IsRunning && toc(localTimer) < durationInSeconds
    fprintf('Scans Acquired = %d\n', s.ScansAcquired)

% Cleanup

% Delete the listener and session.
delete (s);