STM32 电机教程 0 - MotorControl Workbench下载与安装

前言

STM32微控制器提供了行业标准Arm®Cortex®-M核心运行矢量控制或FOC模式的性能,广泛应用于空调、家用电器、无人机、建筑和工业自动化、医疗和电动自行车应用的高性能驱动器。

STM32 MCSDK(电机控制软件开发工具包)固件(X-CUBE-MCSDK和X-CUBE-MCSDK- ful)包括永磁同步电机(PMSM)固件库(FOC control)和STM32电机控制工作台(用于配置FOC固件库参数)及其图形用户界面(GUI)。STM32电机控制工作台是一款PC软件,它可以减少STM32 PMSM FOC固件配置所需的设计工作和时间。用户通过GUI生成项目文件,并根据应用程序的需要初始化库。所使用的算法的一些变量可以实时监控和更改。

 

示例详解

 

出现两个结果:

第一个不包括全部源代码,可以直接下载,第二个包涵全部源码,需要官方验证用户信息后才能下载。本示例直接下载第一个作为演示。

    1. 下载完后,解压得到exe文件,然后双击EXE文件开始安装!

 

安装完成后在电脑桌面上生成如上图右边的两个图标: MotorControl Workbench 5.4.0 和Motor Profiler 5.4.0,其中Motor Profiler是用来对电机参数实现快速测试的工具(需配合支持的开发板使用),MotorControl Workbench即是ST电机控制平台,后面我们将重点介绍这个平台的使用,如何用它快速实现对无刷电机的控制,包括有感/无感,6步方波控制,FOC控制等等。

 

    1. 初识MotorControl Workbench:

MotorControl Workbench需要用到.NET3.5框架,如果电脑上没有安装.NET3.5,需先安装,这里提供一个WIN10环境下安装.NET3.5的方法:

https://blog.csdn.net/zhanglifu3601881/article/details/92800310

 

安装好.NET3.5后,双击桌面上的MotorControl Workbench图标,打开MotorControl Workbench,界面显示如下:

我们打开示例工程看看:

点击主界面中的图形可以打开对应的设置功能窗口:

下面我们来生成这个示例工程:

保存工程文件:

选择生成产数:

代码生成中…:

生成完成:

打开刚指定的生成文件夹(不要有中文),里面有和工程名相同的STMCX文件和目录:

在工程目录中有如下文件:

进入工程目路的MDK-ARM子目录下,打开程序工程:

工程打开后可以直接编译:

编译完成:

编译成功后便将程序下载到开发板中运行,查看效果。如果有要修改的可以直接在IDE工程中改代码,也可以修改ICO文件(cube工程文件),然后生成代码,当开也可以直接用MotorControl Workbench打开STMCX文件,修改STMCX后重新生成工程。

 

OK,本期实验完成!下期见!同时如果大家有什么疑问或是有想了解的其它内容,也欢迎大家留言!!最后喜欢这个公众号的同学们记得加关注了,每天都会有技术干货推出!!文中源码资料下载,关注十三公众号:

在公众号里给十三发送 “下载|STM32 电机教程0” :

 

V5.4.4完整版/2020年5月 STM32电机控制软件开发套件(MCSDK)- 完整源代码 主要变化: Version 5.4.4 is mostly a bug fix release of X-Cube-MCSDK v5.4.3. It also introduces some new feature. ◾Added Support for PFC on STM32F3. This support is added as an example for the STEVAL-CTM010V1 Dual motor demo board. ◾Atollic TrueSTUDIO & SW4STM32 Deprecation. Atollic TrueSTUDIO and SW4STM32 IDEs are no longer actively developed and ST's strategy is to replace them with STM32CubeIDE. Recent STM32 series like STM32G4 devices for instance, are already not supported by all these IDEs. In a near future release of the Motor Control SDK, support for these IDE will be dropped and it will not be possible anymore to generate a project for them from the Workbench. ◾Introduced a workaround for the issue with injected ADC conversions that exists on STM32G4xx Cut 2.2 devices. See the dedicated section below for more details. ◾Reintroduced the correct ST Motor Profiler version (the same as release 5.4.1 of the SDK). The Motor Profiler delivered with MCSDK 5.4.2 and 5.4.3 was incomplete. ◾Fixed an issue with the faulty setting of the maximum application current for the second drive in dual drive configurations ◾Fixed an issue with Position Control configurations using an absolute position encoder (with Z signal). ◾Fixed another issue with Position Control where a division by 0 was possible. ◾Fixed a bootstrap capacitor charge issue in ICS configurations ◾Fixed a SW Error that could occur during the offset measurement loop ◾Fixed a code generation issue resulting in a compilation error when enabling open loop. ◾Fixed a STM32H7 example compilation issue - missing files have been added. ◾Fixed a generation issue for some STM32G0 and STM32F0 devices where TIM2 does not exist but was referenced in the code anyway. This resulted in a compilation failure. ◾Fixed an issue with STM32F1 HD devices in single shunt configurations ◾In the workbench, the maximum PWM frequency can now be set as high as 500 KHz. ◾Fixed an issue due to the limited RShunt resolution. Now, values such as 0.00025 Ω are accepted. ◾Fixed an issue with NVIC configuration for IHM34V2 inverter boards. ◾Fixed a Workbench issue that resulted in a wrong pin assignment when creating new projects based on the NUCLEO-G431RB control board. See section Pin assignment with NUCLEO-G431RB for more details. ◾Fixed an issue that resulted in incorrect overcurrent settings with some power boards. See section Over current settings correction for some power boards ◾Enable users to select DAC channel 2 with STM32L452
This manual describes the X-CUBE-MCSDK and X-CUBE-MCSDK-FUL STM32 motor control software development kits (SDKs) designed for, and to be used with, STM32 microcontrollers. The SDKs contain a software library that implements the field oriented control (FOC) drive of 3-phase permanent magnet synchronous motors (PMSMs), both surface mounted (SMPMSM) and interior (I-PMSM). The STM32 family of 32-bit Flash microcontrollers is specifically developed for embedded applications. It is based on the following ARM® Cortex®-M cores: the Cortex®-M0 for the STM32F0, the Cortex®-M3 for the STM32F1 and STM32F2, and the Cortex®-M4 for the STM32F3, STM32F4 and STM32L4, and the Cortex®-M7 for the STM32F7. These microcontrollers combine high performance with first-class peripherals that make them suitable for performing three-phase motor FOC. The PMSM FOC library can be used to quickly evaluate ST microcontrollers, to complete ST application platforms, and to save time when developing motor control algorithms to be run on ST microcontrollers. It is written in the C language, and implements the core motor control algorithms, as well as sensor reading/decoding algorithms and sensor-less algorithms for rotor position reconstruction. This library can be easily configured to make use of the STM32F30x's embedded advanced analog peripherals (fast comparators and programmable gain amplifiers (PGAs)) for current sensing and protection, thus simplifying application boards. When deployed with the STM32F103 (Flash memory from 256 Kbytes to 1Mbyte), STM32F303 or STM32F4 devices, the library allows two motors to be driven simultaneously. The library can be customized to suit user application parameters (motor, sensors, power stage, control stage, pin-out assignment) and provides a ready-to-use application programming interface (API). A PC graphical user interface (GUI), the ST motor control workbench, allows complete and easy customization of the PMSM FOC library. Thanks to this, the user can run a PMSM motor in a very short time. A set of ready-to-use examples is provided to explain the use of the motor control API and its most commonly used features. These projects usually provide a UART interface that allows convenient real-time fine-tuning of the motor control subsystem with a remote control tool, the STM32 motor control monitor. The STM32 motor control SDK is delivered as an expansion pack for the STM32 CubeMX tool, and the PMSM FOC library is based on the STM32 Cube Firmware libraries. The list of supported STM32 microcontrollers is provided in the release note delivered with the SDK.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:技术黑板 设计师:CSDN官方博客 返回首页
评论 3

打赏作者

张十三的博客

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值