Arduino stepper motor control with Simulink.

1 view (last 30 days)
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
Erorr:
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
Joao da Silva
Joao da Silva on 8 Dec 2015
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.

Answers (0)

Communities

More Answers in the  Power Electronics Control

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!