车辆出入库管理系统
Abstract
Along with the productivity and the science and technology unceasing development, the Peoples Daily life and production activities a lot of use automatic control, not only save human resources, and greatly improve the production efficiency, and further promoted the productive forces to be in rapid development, and constantly enrich peoples life.
This design is based on the PLC of the ins and outs of vehicle management system, adopting LED to display the garage is full. The use of two pressure device to monitor vehicles pass in and out and complete count work, when the vehicle into after two sensors that display digital plus one, vehicle go out after two sensor make counter digital subtraction one, but when the vehicle only after a sensor without counti *51今日免费论文网|www.jxszl.com +Q: ^3^5^1^9^1^6^0^7^2^*
ng.
In order to prevent the accident count error, the system USES the repeated routine check, to enhance the system reliability.
First of all, pay attention to control the distance between the two sensors, with program verification in and out of the garage is vehicles, when people through the sensor without counting; Secondly, using logical interlock way, start with count should lock minus count, produce and counting pulse is to lock minus counting pulse, so to ensure the reliability; Finally, timely to reset processing, in order to avoid vehicles in near sensor for round motion error count.
Keywords: PLC sensor garage
一、引言
1.1 PLC的基本结构
1、中央处理单元(CPU):是PLC的控制核心。它按照PLC系统程序赋予的功能:a.接收并存储从用户程序和数据;b.检查电源、存储器、I/O以及警戒定时器的状态,并能诊断用户程序中的语法错误。
2、存储器:可编程序控制器的存储器分为系统程序存储器和用户程序存储器。存放系统软件(包括监控程序、模块化应用功能子程序、命令解释程序、故障诊断程序及其各种管理程序)的存储器称为系统程序存储器;存放用户程序(用户程序和数据)的存储器称为用户程序存储器,所以又分为用户存储器和数据存储器两部分。
3.输入接口电路:输入输出信号有开关量、模拟量、数字量三种,在我们实际涉及到的信号当中,开关量最普遍。
4.输出接口电路:可编程序控制器的输出有:继电器输出(M)、晶体管输出(T)、晶闸管输出(SSR)三种输出形式。
5.电源:PLC的电源在整个系统中起着十分重要得作用。如果没有一个良好的、可靠得电源系统是无法正常工作的,因此PLC的制造商对电源的设计和制造也十分重视。一般交流电压波动在+10%(+15%)范围内,可以不采取其它措施而将PLC直接连接到交流电网上去。如FX1S额定电压AC100V—240V,而电压允许范围在AC85V—264V之间。允许瞬时停电在10ms以下,能继续工作。
一般小型PLC的电源输出分为两部分:一部分供PLC内部电路工作;一部分向外提供给现场传感器等的工作电源。
1.2 PLC的工作原理
PLC则是采用循环扫描的工作方式。一个扫描周期主要可分为3个阶段。
1.输入刷新阶段
在输入刷新阶段,CPU扫描全部输入端口,读取其状态并写入输入状态寄存器。完成输入端刷新工作后,将关闭输入端口,转入程序执行阶段。在程序执行期间即使输入端状态发生变化,输入状态寄存器的内容也不会改变,而这些变化必须等到下一工作周期的输入刷新阶段才能被读入。
2.程序执行阶段
在程序执行阶段,根据用户输入的控制程序,从第一条开始逐步执行,并将相应的逻辑运算结果存入对应的内部辅助寄存器和输出状态寄存器。当最后一条控制程序执行完毕后,即转入输入刷新阶段。
3.输出刷新阶段
当所有指令执行完毕后,将输出状态寄存器中的内容,依次送到输出锁存电路(输出映像寄存器),并通过一定输出方式输出,驱动外部相应执行元件工作,这才形成PLC的实际输出。
由此可见,输入刷新、程序执行和输出刷新三个阶段构成PLC一个工作周期,由此循环往复,因此称为循环扫描工作方式。
显然扫描周期的长短主要取决于程序的长短。扫描周期越长,响应速度越慢。由于每个扫描周期只进行一次I/O刷新,即每一个扫描周期PLC只对输入、输出状态寄存器更新一次,所以系统存在输入输出滞后现象,这在一定程度上降低了系统的响应速度。但是由于其对I/O的变化每个周期只输出刷新一次,并且只对有变化的进行刷新,这对一般的开关量控制系统来说是完全允许的,不但不会造成影响,还会提高抗干扰能力。这是因为输入采样阶段仅在输入刷新阶段进行,PLC在一个工作周期的大部分时间是与外设隔离的,而工业现场的干扰常常是脉冲、短时间的,误动作将大大减小。但是在快速响应系统中就会造成响应滞后现象,这个一般PLC都会采取高速模块。
如表2—1为I/O口地址分配。
X0为压力传感器1#,X1为压力传感器2#,X2为复位开关K,X3为启动开关。
Y0为车辆进入信号灯,Y1为车辆离开信号灯,Y2为车库满信号灯。
2.4 PLC的I/O端口接线
图2—3为PLC的I/O端口接线。
图2-3 PLC的I/O端口接线
当车辆从传感器1经过传感器2时,计数器加1,当车辆从传感器2经过传感器1时,计数器减1。
原文链接:http://www.jxszl.com/dzxx/txgc/29531.html