Other Parts Discussed in Thread: TMS320F28069F
Hi,
Currently we implemented a second motor on a single controller using InstaSPIN on a TMS320F28069F. Both motors are controlled and turning independently, but currently we have some issues with motor 2 regarding the learning process. We are not sure if this is caused the way we implemented the second motor. We would like feedback on what is the best way to implement the second motor.
This is how the current implemented looks like, using a single control loop interrupt:
- Motor 1 PWM 1 triggers SOC-A and fills all ADC-SOC's with values including Motor 1 and 2.
- A single interrupt is triggered (on ADC int 1) which handles the control loop for both motors.
We could also implement the second motor with use of an separate interrupt per motor:
- Motor 1 PWM triggers SOC-A and fills all SOC's needed for Motor 1.
- Motor 2 PWM triggers SOC-B and fills all SOC's needed for Motor 2.
- Each motor get their own interrupt handling their control loop.
What is your opinion on both implementations? And what is the correct way to implement two motors using 1 controller?