基于单片机的数控机床控制系统设计

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

摘要

本课题研究的数控机床控制系统主要分为上、下位机。上位机为一块PC104,主要作用是运行整个数控软件,通过控制面板输入控制命令,通过输出端口来控制各个电机的运行,并将机床的加工信息在LCD屏上显示出来。下位机就是本课题所要设计的控制面板,它是一个单片机系统,将控制面板的输入信息传到上位机,并从上位机接收信息用LED来显示机床的运行状态。

该系统的总体功能够通过通讯协议完成单片机和上位机之间的通讯,该协议说明用户按了哪些键。开机后,上位机(PC104)给单片机发送信息,单片机接收到信息后在控制面板上用LED显示机床的状态,用户操作时按控制面板上的按键或转动波动开关,单片机向上位机发送信息告诉上位机用户对机床的操作和对加工过程的一些配置。上位机根据下位机传送的信息来控制机床的运行,同时也向单片机传送必要的信息。

本控制面板(下位机)分为上下两部分。上面一块称为MDI面板,下面称为机床操作面板。MDI面板上都是按键,其功能为:数控软件的软按键(虚拟button,由两个左右方向键和F1,F2,F3,F4,F5等按键组成);文字代码编辑、插入、删除、查看翻页以及几个功能键(诊断,图形,系统设定等)。下面机床操作面板除了按键外,还有几个波段开关,起停开关以及一些LED灯。按键的功能是实现机床的操作命令,如打开照明灯,主轴的正转、反转,刀具回零点等。波段开关的功能分别为设置主轴倍率、进给倍率、快速倍率、方式选择。快停开关为数控机床启动、停止、急停,LED 灯显示数控机床状态。本系统设计包括:

1、单片机与上位机通信协议的设计。

2、多按键的设计。

3、单片机的抗干扰措施及MAX1232的使用的设计。

4、用MAX1232芯片和上位机进行串口通信的设计。

5、单片机I/O口的扩展的设计。

6、变量的定义设计。

7、灯亮程序的设计。

8、接收程序的设计。

关键词:单片机控制系统按键

Abstract

CNC machine tool control system of this research project is mainly divided into upper and lower machine. The host computer to the PC104 a main role is to run the CNC software, control commands via the control panel input and output ports to control the operation of each motor, and the machining information to be displayed on the LCD screen. Lower machine is subject to design control panel, which is a single-chip system, the control panel to input information to the host computer, and receive information from the host computer with LED display machine running status.

The overall function of the system enough to complete the communication between the microcontroller and the host computer through the communication protocol of the agreement shows the user which key was pressed. Boot the host machine (PC104) to send information to the microcontroller, MCU receives the information on the control panel with LED display machine status, user actions on the control panel button or turn the fluctuations switch, the microcontroller up the machine to send information to tell the host computer users on the machine tool operations and processing configuration. The host computer modem to send the information to control the operation of the machine, but also the necessary information to send to the microcontroller.

The control panel (machine) divided into two parts. Above one known as the MDI panel, hereafter referred to as a machine operator panel. Are keys on the MDI panel and its functions are: CNC software soft buttons (the button virtual, composed by the two left and right arrow keys and F1, F2, and F3, the F4, F5, and other key); text code editor, insert, delete, view page as well as several function keys (diagnostic, graphics, system settings, etc.). The following machine operator panel button outside, there are several band switch with the switch and some LED lights. The button's function is a machine tool operation command, such as turn on the lights, the spindle forward and reverse, the tool back to 0:00 and so on. Band switch function to set the spindle override and feed override, rapid override options. Quick stop switch to start, stop, emergency stop and LED lights display the CNC machine tools for CNC machine tools. The system design includes: 1, MCU and host computer communication protocol design.

2, a multi-button design.

3, anti-jamming measures microcontroller and MAX1232 use design.

4, the MAX1232 chip and the host computer serial communication design.

相关文档
最新文档