Multiple Motor Profiles on same MCWorkbench Application
I have a motor control application generated with MCWorkbench and am successfully using it on my custom board. I added many custom features to the application such as CAN Bus, absolute encoder and my own position control to suit our application. T
I am handling different encoder configurations with #ifdef directives.
This firmware works great but I need to use it with a few different motors.
So what would be the simplest way to modify the application to handle multiple motor profiles and PID gains in the same file?
I don't think the mc_api.c has provisions for that. So I noticed that mc_config.c parameters are already available in main.c so I could change them directly. I considered including drive_parameters.h and pmsm_motor_parameters.h to re-define those parameters in main.c
Thank you in advance!
