当前位置:网站首页>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
边栏推荐
- Install nngraph
- Summary of JVM knowledge points - continuously updated
- Golang realizes regular matching: the password contains at least one digit, letter and special character, and the length is 8-16
- Read the data in Presto through sparksql and save it to Clickhouse
- unity常见的问题(一)
- World Book Day: I'd like to recommend these books
- (1) Openjuterpyrab comparison scheme
- Important knowledge of network layer (interview, reexamination, term end)
- Web17 -- use of El and JSTL
- SSL certificate refund instructions
猜你喜欢
Redis deployment of cloud native kubesphere
将新增和编辑的数据同步更新到列表
产品开发都应该知道的8个网站,增强工作体验
Kubernets Getting started tutoriel
Custom nail robot alarm
The project file '' has been renamed or is no longer in the solution, and the source control provider associated with the solution could not be found - two engineering problems
有趣的IDEA插件推荐,给你的开发工作增添色彩
Customize classloader and implement hot deployment - use loadclass
Jupiter notebook installation
R语言中dcast 和 melt的使用 简单易懂
随机推荐
Go language mapping operation
Keyword interpretation and some APIs in RT thread
只是不断地建构平台,不断地收拢流量,并不能够做好产业互联网
SSL certificate refund instructions
4.22学习记录(你一天只做了水题是吗)
Use compressorjs to compress pictures, optimize functions, and compress pictures in all formats
Deploying MySQL in cloud native kubesphere
Introduction to servlet listener & filter
Unable to create servlet under SRC subfile of idea
There is no need to crack the markdown editing tool typora
The El table horizontal scroll bar is fixed at the bottom of the visual window
Can I take the CPDA data analyst certificate for 0 foundation
decast id.var measure.var数据拆分与合并
C, calculation code of parameter points of two-dimensional Bezier curve
PC starts multiple wechat at one time
Translation of multi modal visual tracking: review and empirical comparison
Van uploader upload picture implementation process, using native input to upload pictures
MySQL supports IP access
Introduction to kubernetes
精度、速度完美平衡,最新图像分割SOTA模型重磅发布!!!