2018-05-14 06:11 PM
The 5.0 version use commands like 'bool MC_StartMotor1(void);' instead of the old 4.3 'bool MCI_StartMotor(CMCI this);' This api change is documented in AN5143 rev 2.
A google search on MC_StartMotor1 gives one hit - in that application note.
Where can I find example code that use this new api?
Or any documentation on how to use it?
And I wonder why stuff like the potentiometer example still is using the old api.
Are anyone programmatically (not using motor profiler) driving motors with 5.0?
Thanks for any help.
2018-06-11 06:46 AM
Hello Electric,
Please, find attached an example using the standard P-NUCLEO-IHM001 hardware setup.
This example provides you with the following features:
1/Green LED usage, on the NUCLEO-STM32F302R8 control board, to reflect the Motor state machine status (Green = RUN status);
2/Red LED usage, on the X-NUCLEO-IHM07M1 power board, to reflect any error occurrence during the Motor usage (Red = Error);
3/Blue Button usage,
on the NUCLEO-STM32F302R8 control board, to
start or to stop the Motor;4/Blue Potentiometer usage,
on the X-NUCLEO-IHM07M1 power board,to tune the speed of the Motor (from 0 to its maximum speed).
(However, please note that spinning the Bull Running motor at low speed <~1000 rpm doesn't work and do generate an error ;)The 'main.c' source file contains all these implemented features (as exercises), while the 'MCSDK - Potentiometer.stmcx' file is the ST MC Workbench (MC SDK v5.1.1) configured project file, and the 'MCSDK - Potentiometer.ioc' file is the STM32CubeMX (v4.1) configured project file.
Enjoy it :)
PBo
________________ Attachments : MCSDK - Potentiometer.stmcx.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxWB&d=%2Fa%2F0X0000000az9%2F1b2vVFC8p_MXf966J9_aMN_y8dimGBuuD0IAXMayNoA&asPdf=falseMCSDK - Potentiometer.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxW6&d=%2Fa%2F0X0000000azC%2FX4MBMUBP5cRrCIo8SziUX24jG_C8k9lPiIjgToM6MuU&asPdf=falsemain.c.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxVd&d=%2Fa%2F0X0000000azA%2FCoVkBLNylKYu8yBOOty8cJ01.D6nojSLxpbdkynylBA&asPdf=false2018-08-27 01:39 AM
can you share example code for start, stop and change RPM
2021-06-27 09:58 PM
The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK).
Best regards