Thursday, 15 July 2010

hardware - Running encoder on Arduino Mega using Simulink -



hardware - Running encoder on Arduino Mega using Simulink -

i using simulink togheter arduino mega 2560 command motor encoder. encoder has 200 steps per revolution. aim utilize external mode in order out info simulink scope.

earlier, when not using simulink blocks, worked fine using attachinterupt. not work since simulink not have option. have tried 2 methods:

use digital input blocks , trigger > slow use serial block togheter arduino (uno) handles encoder signal (this arduino not programmed in simulink) , sends pulses main arduino (the baudrate not seem limiting factor, instead fact block handles uint8) > slow

i cannot see generated code in simulink license, , prefer solution blocks used. there work-around??

any tip appreciated!

you may utilize s-function develop encoder algorithm using attachinterrupt of arduino. link may help http://www.mathworks.com/matlabcentral/fileexchange/39354-device-drivers

arduino hardware interrupt simulink encoder

No comments:

Post a Comment