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” :

 

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.
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值