MATLAB Answers


Arduino stepper motor control with Simulink.

Asked by Comunity
on 6 Apr 2014
Latest activity Commented on by Joao da Silva on 8 Dec 2015
I am trying to control a stepper motor using a Simulink model with Matlab and Arduino.
I am using a stepper motor driver board ULN2003APG. I have uploaded adioes.pde file to the Arduino board. I have installed the Arduino Support Package for Matlab and I am trying to run the Simulink stepper_sim.mdl example inside the support package.
Here is what error i get when i try to run it: image
The corresponding 'msfun_arduino_io_setup.tlc' file for the MATLAB S-function 'msfun_arduino_io_setup' in block 'stepper_sim/Arduino IO Setup' must be located in the current working directory, the MATLAB S-function directory 'C:\Users\Laptop\Desktop\IV Курс VIII Семестър\Дипломна\Matlab Arduino Library\ArduinoIO\ArduinoIO\simulink', or the directory 'C:\Users\Laptop\Desktop\IV Курс VIII Семестър\Дипломна\Matlab Arduino Library\ArduinoIO\ArduinoIO\simulink\tlc_c'
Is it some code error or is it just that i can't control a stepper motor with such a motor driver board ?

  1 Comment

I have today the same problem. Aparently for matlablab 2013b there is a bug for to use arduino stepper motor. I use exactly the same chineese hardware.What matlab version do you use?You need also, choose motor_v2.pde and upload to arduino IDE. After, see what USB port yor arduino board is conected.Then, by matlab prompt, prompt a=arduino('COMX') and wait ... nI don't do it because there is a bug for matlab2013b

Sign in to comment.

0 Answers