It is possible to read data simultaneously from a serial port and a data acquisition board using the Data Acquisition Toolbox 2.14 (R2009a). The "StartFcn" property of the ANALOGINPUT object can be used to initiate reading from the SERIAL port. The code snippet below creates an ANALOGINPUT object and performs the data acquisition:
s = serial('COM1','OutputBufferSize',4096)
ai = analoginput('nidaq','Dev1');
The Callback function MYSERIAL, used with the StartFcn event in the code above, is shown below and contains the MATLAB code to read data from the serial port.
function myserial(obj, event, s)
serialdata = fread(s,1)
For more information about events and callback functions, please check the following link: