maartenvervelde Posted September 14, 2015 Share Posted September 14, 2015 I made a custom servo algorithm in Simulink with the ppmac target library. I generated code and got 4 files: PIDController.c PIDController.h PIDController_private.h PIDController_types.h Following the guide, I added those files in the Realtime routines folder in the Power PMac IDE. Then I chose the user servo in the user servo setup for motor 1, but when I go to the tuning window of the IDE, I still get Servo Algorithm: standard. Is the text not updated or am I doing something wrong? Maarten Link to comment Share on other sites More sharing options...
bradp Posted September 14, 2015 Share Posted September 14, 2015 Find out what Motor[].Ctrl answers back in the IDE terminal window. If it answer something like UserAlgo.ServoCtrlAddr[] then the text in the IDE is wrong. But if you get Sys.ServoCtrl then you either did not do the setup correctly or have the IDE version with the bug that it does not configure the user servo correctly. So other question is what IDE version do you have? Link to comment Share on other sites More sharing options...
maartenvervelde Posted September 14, 2015 Author Share Posted September 14, 2015 Find out what Motor[].Ctrl answers back in the IDE terminal window. If it answer something like UserAlgo.ServoCtrlAddr[] then the text in the IDE is wrong. But if you get Sys.ServoCtrl then you either did not do the setup correctly or have the IDE version with the bug that it does not configure the user servo correctly. So other question is what IDE version do you have? The error was that I forgot to add 2 more files to the Realtime Routines folder. Those were located in C:\Program Files\MATLAB\R2015a\simulink\include. I didn't notice that the build failed but it was indicated so it was my fault. Thanks for your suggestions Link to comment Share on other sites More sharing options...
Recommended Posts