Arduino stepper motor control with Simulink.

2 次查看(过去 30 天)
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 个评论
Joao da Silva
Joao da Silva 2015-12-8
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

请先登录,再进行评论。

回答(0 个)

社区

更多回答在  Power Electronics Control

类别

Help CenterFile Exchange 中查找有关 Device Driver Blocks 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by