当前位置:网站首页>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
边栏推荐
- Use of Presto date function
- 4.22学习记录(你一天只做了水题是吗)
- Connect orcale
- Translation of multi modal visual tracking: review and empirical comparison
- 内核错误: No rule to make target ‘debian/canonical-certs.pem‘, needed by ‘certs/x509_certificate_list‘
- Custom nail robot alarm
- Free and open source intelligent charging pile SaaS cloud platform of Internet of things
- Baserecyclerviewadapterhelper realizes pull-down refresh and pull-up loading
- Go language array operation
- Packet capturing and sorting -- TCP protocol [8]
猜你喜欢

云原生KubeSphere部署Mysql

STM32 is connected to the motor drive, the DuPont line supplies power, and then the back burning problem

Synchronously update the newly added and edited data to the list

梳理網絡IP代理的幾大用途

在线计算过往日期天数,计算活了多少天

R语言中dcast 和 melt的使用 简单易懂

PC starts multiple wechat at one time

Record a website for querying compatibility, string Replaceall() compatibility error

SSM框架系列——数据源配置day2-1

Custom nail robot alarm
随机推荐
Record Alibaba cloud server mining program processing
Can I take the CPDA data analyst certificate for 0 foundation
Community version Alibaba MQ ordinary message sending subscription demo
Navicat远程连接数据库 出现 1130- Host xxx is not allowed to connect to this MySQL server错误
Idea的src子文件下无法创建servlet
[daily question] chessboard question
Translation of multi modal visual tracking: review and empirical comparison
HQL statement tuning
Go iris framework implements multi service Demo: start (listen to port 8084) service 2 through the interface in service 1 (listen to port 8083)
Remote access to raspberry pie at home (Part 1)
Introduction to servlet listener & filter
梳理網絡IP代理的幾大用途
Bert base Chinese Download (SMART)
PC starts multiple wechat at one time
Subscribe to Alibaba demo send business messages
C, calculation code of parameter points of two-dimensional Bezier curve
JMeter operation redis
Jiachen chapter Genesis "inner universe" joint Edition
unity常见的问题(一)
SQL exercise question 1