MATLAB: Send data continuously

real timeusb

how to send data every 10 millisecond continuously with serial communication? thanx

Best Answer

Hi Paskah,
you can use timers in Matlab to send continously data to your serial device.
t = timer ;
set(t,'ExecutionMode','fixedRate');
set(t,'Period',0.01);
set(t,'TimerFcn',{@mytimer_serial, handles});
start(t)
In the mytimer_serial function you can fire the command to the serial line. But please be careful about the precision as Walter already stated.
Gerd
Related Question