当前位置:网站首页>51 single chip microcomputer stepping motor control system based on LabVIEW upper computer (upper computer code + lower computer source code + ad schematic + 51 complete development environment)
51 single chip microcomputer stepping motor control system based on LabVIEW upper computer (upper computer code + lower computer source code + ad schematic + 51 complete development environment)
2022-04-23 13:00:00 【Outside Jinguan City】
Functional specifications :
1. The running state of the stepping motor passes VISA The serial port is transmitted to the upper computer in real time , The upper computer displays in a curve , And can store data .
2. The upper computer can send the running angle of the stepping motor 、 Speed command to the lower computer , Control stepping motor .
3. Press the key to control the forward and reverse rotation and speed regulation of the motor .
4.labview Sure excel or txt Store motor operation data in format , And read the reproduced operation curve ( Data playback function ).
matters needing attention :
Lower processor :STC89C51/STC89C52
Upper computer :Labview2018+VISA A serial port
Press the key to control the stepping motor
Chinese notes of relevant pin connection :
#include<reg52.h>
#include <intrins.h>
#define uchar unsigned char
#define uint unsigned int
#define MotorData P0 // Stepper motor control interface definition
uchar phasecw[4] ={
0x08,0x04,0x02,0x01};// Positive rotation Motor conduction phase sequence D-C-B-A
uchar phaseccw[4]={
0x01,0x02,0x04,0x08};// reverse Motor conduction phase sequence A-B-C-D
uchar motor_state=0; //0 stop 1 Positive rotation 2 reverse
uchar motor_speed=5; //5-25 fast - slow
sbit key1=P1^1; // Forward button
sbit key2=P1^2; // Reverse key
sbit key3=P1^0; // Speed regulation key
Main function program :
void
main(void)
{
Delay_xms(50); // Wait for the system to stabilize
Timer_Init(); // Initialize the timer
while(1)
{
key_scan(); // Scan button
if(motor_state==0) MotorStop(); // Stop turning
else if(motor_state==1)MotorCW(motor_speed); // Turn the angle clockwise
else if(motor_state==2)MotorCCW(motor_speed);// Turn the angle counterclockwise
}
}
The information contained is as follows :
Screenshot of upper computer operation :
See the comments section for links to all the information , Please leave a message if you have any questions ~
author :amusen
Time :2022.4
I wish good !
版权声明
本文为[Outside Jinguan City]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230613382577.html
边栏推荐
- Free and open source intelligent charging pile SaaS cloud platform of Internet of things
- R语言中dcast 和 melt的使用 简单易懂
- Bert base Chinese Download (SMART)
- Kubernetes 入门教程
- Jiachen chapter Genesis "inner universe" joint Edition
- Wonderful review | the sixth issue of "source" - open source economy and industrial investment
- pyqt5 将opencv图片存入内置SQLlite数据库,并查询
- [csnote] ER diagram
- Go language: passing slices between functions
- Plato farm - a game of farm metauniverse with Plato as the goal
猜你喜欢
SSM框架系列——数据源配置day2-1
XinChaCha Trust SSL Organization Validated
5 free audio material websites, recommended collection
mysql支持ip访问
MySQL supports IP access
31. Next arrangement
STM32 control stepper motor (ULN2003 + 28byj)
梳理網絡IP代理的幾大用途
No idle servers? Import OVF image to quickly experience smartx super fusion community version
What are the forms of attack and tampering on the home page of the website
随机推荐
How to prevent the website from being hacked and tampered with
Get the punch in record of nailing attendance machine
有趣的IDEA插件推荐,给你的开发工作增添色彩
只是不断地建构平台,不断地收拢流量,并不能够做好产业互联网
The quill editor image zooms, multiple rich text boxes are used on one page, and the quill editor upload image address is the server address
云原生KubeSphere部署Mysql
[Blue Bridge Cup] April 17 provincial competition brushing training (the first three questions)
Baserecyclerviewadapterhelper realizes pull-down refresh and pull-up loading
Homomorphic encryption technology learning
将新增和编辑的数据同步更新到列表
Ad20 supplementary note 3 - shortcut key + continuous update
Unable to create servlet under SRC subfile of idea
NPDP | how can product managers not be excluded by programmers?
Record some NPM related problems (messy records)
Image attribute of input: type attribute of fashion cloud learning -h5
风尚云网学习-input属性总结
数据库中的日期时间类型
(个人)最近项目开发后存在的系统漏洞整理
Timing role in the project
Wu Enda's programming assignment - logistic regression with a neural network mindset