Borrar filtros
Borrar filtros

S-Function encoder_slsp_mega code explanation

1 visualización (últimos 30 días)
Aldiaz Nabil Faekar
Aldiaz Nabil Faekar el 25 de Nov. de 2014
Hello,
i want to ask about several commands on encoder_slsp_mega blocks that i got from this link : http://www.mathworks.com/matlabcentral/fileexchange/39354-device-drivers . and i still don't get about this command:
typedef struct { int pinA; int pinB; int pos; int del;} Encoder;
volatile Encoder Enc[3] = {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}};
what are "typedef struct" and "Enc[3]" function means?also i confused about "global variables" that mentioned in sfunction guide. From the guides tells me that all parameter must be wrote on global variables on library pane. i was tried to create my own encoder block from arduino simple code but i got error in the end of compiling. it said that my parameters was not declare, although i had put it on the discrete update pane. can anybody tells me how to write global variables in s-function pane from arduino code.
All the answers will be appreciate. Thanks alot
Aldiaz

Respuestas (0)

Categorías

Más información sobre MATLAB Support Package for Arduino Hardware en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by