S-Function encoder_slsp_mega code explanation
1 回表示 (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Arduino Hardware についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!