基于PLC的液体混合控制系统的设计【含CAD图纸、说明书】
基于PLC的液体混合控制系统的设计【含CAD图纸、说明书】,含CAD图纸、说明书,基于,plc,液体,混合,控制系统,设计,cad,图纸,说明书,仿单
1 外文资料翻译 PLC THEORY AND COMPOSITION I Principle of work 1.Scanning works When the PLC is running, through the implementation of the reflecting control requirements of the user program to complete the control task, the need to perform numerous operations, but the CPU can not simultaneously to perform multiple operations, it is only by time-sharing operation (serial work) way Each time an action is performed, sequentially, the Executive. As the CPUs processing speed is fast enough that from a macro point of view, PLC exterior appearance of the results seem to be at the same time (parallel) completion. This serial work process is known as PLCs scanning work. With a scanning manner the user program, the scan is from the first program started, without interruption or jump under the control, according to the procedure stored in the order of the sequence, one by one implementation of the user program until the program ends. And then start scanning the implementation of the cycle to repeat run. PLC scanning work and electrical control works significantly different. Electrical control devices using hard logic of parallel work, if a relay coils or power, then the relay all the normally open, and normally closed contact, whether in a control circuit which position, will immediately and simultaneously move ; the PLC using the scanning mode (serial works), if a soft relay coil is connected or disconnected, all of its contacts will not immediately move, have to wait for scan to the time before action. However, PLCs scan rate, typically PLC and electrical control devices in the I / O processing results on no difference. 2 .PLC scanning process PLC scanning work process in addition to the implementation of user procedures, 2 in each scanning process must complete the internal processing, communications services. The whole scanning process including internal processing, communications services, input sampling, program execution, the output refresh the five stages. The whole process scan execution once the time called the scanning cycle. Scanning cycle and the CPU speed, PLC hardware configuration and user program the length of the typical value of 1 100ms. In the internal processing stage, for PLC self-test to check the internal hardware is normal, and watchdog timer (WDT) reset and the completion of some other internal processing. In the communication service stage, PLC and other intelligent devices for communication, respond to programmer type command, update the programmer display content. When the PLC is in stop (STOP) state, the only complete internal processing and communication services. When the PLC is running (RUN) state, in addition to the completion of internal processing and communication services, but also the completion of input sampling, program execution, the output refresh work.PLC scanning work is simple and intuitive, easy to program design, and reliable operation provided a guarantee. When the PLC scans the instruction is executed, the results soon to be followed will be scanned into the instruction by the use, but also by CPU internal settings of the watchdog timer to monitor every scan exceeded the allotted time, to avoid the CPU internal fault makes a program run into the dead cycle. 3 .PLC implementation procedures and Features PLC implementation of the program is divided into three stages, namely the input sampling stage, the program execution phase, the output refresh period. (1)Input sampling phase The input sampling stage, PLC to scan work order for all input input state is sampled and stored input image register, then enter the image register is refreshed.Then enter the procedure phase, the program implementation phase or other phases, even if the input state changes, enter the mapping register contents do not change, enter the state changes only the next scan cycle of the input processing stage to Pi sampled. (2)Program implementation phase 3 In the program implementation phase, PLC on the program in order to scan implementation. If the program uses ladder to represent, will always press on first post, the first left and right order. When the encounter program jump, then under the jump conditions are met to decide whether the procedures jump. When the instructions relating to the input, output, state, PLC from the input image register and component mapping register read, the user process operations, operation results and then into element mapping register. The component mapping register, its contents will be with the program execution process of change. (3)Output refresh period When all programs finished, enter the output of processing stage. In this phase, PLC output image register and the output of the state (output relay state) dump the output latch and through a certain way of output, and drive an external load. Thus, PLC in a scan cycle, the input state of the sample only in the input sampling stage. When the PLC into the program execution phase input will be blocked until the next scan cycle of the input sampling phase Caidui input state re-sampling. This approach is called concentrated sample, that is, a scan cycle, a period of time on the input state is sampled. In the user program if the output number assigned, the last time effectively. In a scan cycle, only the output refresh stage, the output state from the output image register output, the output interface refresh. In other stages the output state has been preserved in the output image register. This is called concentrated output. For small PLC, the I / O points less, the user program is shorter, generally concentrated sample, concentrate the output of work, although to some extent reduce the system response speed, but makes PLC work most of the time with the outside input / output device isolation, fundamentally enhance High anti-jamming capabilities, increased system reliability. For medium and large PLC, the I / O points more, controlling function, the user program is longer, to improve the speed, you can use regular sampling, periodic output mode, or interrupt input, output mode and the use of smart I / O interfaces and other means. From the above analysis shows, when the PLC input of the input signal changes to a PLC output to the input to respond to changes, take some time, a 4 phenomenon known as the PLC input / output response lag. General industrial control, this delay is entirely permissible. It should be noted that this response delay is not only because PLC scanning means to cause, more important is the PLC input interface of the filter sectors of the input delay, and output interface to drive the devices 动作 time to effect the output delay, and also with program design. Lag time is designed to PLC applications should pay attention to a parameter. II Composition and function 1 .CPU operation and control center From the heart for use. When from the programming input of the program into the user program memory, then CPU according to the system given the function (system program memory explanation compiler), the user program translated into the PLC within the authorized user compiler. Input state and input information from the input interface input into, CPU will be the stored working data memory, or input mapping registers. Then by the CPU to the data and procedures organically together. The results into the output image register or working data memory, and then output to the output interface, control external drive. CPU from the controller, ALU and registers. These circuits in a single chip. CPU through the address bus, data bus and I / O interface circuit is connected. 2.Memory A memory semiconductor circuit. Into the system program memory and user memory. System program memory for storing system programs, including management procedures, control procedures and the user program to do build processing explanation compiler. By the read-only memory, ROM form. Manufacturers to use, the content can not be changed, power does not disappear. User memory: is divided into user program memory area and working data store. By the random access memory (RAM) component. Users. Power is erased. Common and efficient lithium batteries as a backup power supply, life is generally 3 to 5 years. 3 .Input / Output Interface 5 (1) input interface Optocoupler consists of two light emitting extreme control and optical transistor component. LEDs: the optical coupler input with changes in electrical signals, light emitting diodes to produce the input signal changes of the same optical signal. Optical three tubes: In the light signals irradiation conduction, conduction level and the optical signal to the strength. In Optocoupler the linear region, the output signal and input signal had a linear relationship. Input interface circuit process: When the switch is closed, diode LED, and Transistor in the light irradiation turn to the internal circuit input signal. When the switch is open, the diode does not shine, transistors are off. To the internal circuit input signal. That is, through the input interface circuit to an external switch signal into a PLC within acceptable digital signal. (2) output interface PLC relay output interface circuit process: When the internal circuit output digital signal 1, a current flows through the relay coil with current, and normally open contact closure to provide load conduction current and voltage. When the internal circuit output digital signal 0, no current flows through the relay coil is not current, and normally open contact disconnect, disconnect the load current or voltage. That is, the output interface circuit to the internal digital circuit into a signal to the load movement or action. 4. Programmers Programmers are divided into two types, one is hand-held programmer and convenient. Our laboratory is hand-held programmer. Two through the PLCs RS232 port. Connected to the computer. Then tap the keyboard. By NSTP-GR software (or WINDOWS next software) to the PLC within the input program. 6 PLC 原理及组成 一工作原理 1扫描工作原理 当 PLC 运行时,是通过执行反映控制要求的用户程序来完成控制任务的,需 要执行众多的操作,但 CPU 不可能同时去执行多个操作,它只能按分时操作 (串行工作)方式,每一次执行一个操作,按顺序逐个执行。由于 CPU 的运算 处理速度很快,所以从宏观上来看,PLC 外部出现的结果似乎是同时(并行)完 成的。这种串行工作过程称为 PLC 的扫描工作方式。用扫描工作方式执行用户程 序时,扫描是从第一条程序开始,在无中断或跳转控制的情况下,按程序存储顺 序的先后,逐条执行用户程序,直到程序结束。然后再从头开始扫描执行,周而 复始重复运行。 PLC 的扫描工作方式与电器控制的工作原理明显不同。电器控制装置采用硬 逻辑的并行工作方式,如果某个继电器的线圈通电或断电,那么该继电器的所有 7 常开和常闭触点不论处在控制线路的哪个位置上,都会立即同时动作;而 PLC 采 用扫描工作方式(串行工作方式),如果某个软继电器的线圈被接通或断开,其 所有的触点不会立即动作,必须等扫描到该时才会动作。但由于 PLC 的扫描速度 快,通常 PLC 与电器控制装置在 I/O 的处理结果上并没有什么差别。 2扫描工作过程 PLC 的扫描工作过程除了执行用户程序外,在每次扫描工作过程中还要完成 内部处理、通信服务工作。整个扫描工作过程包括内部处理、通信服务、输入采 样、程序执行、输出刷新五个阶段。整个过程扫描执行一遍所需的时间称为扫描 周期。扫描周期与 CPU 运行速度、 PLC 硬件配置及用户程序长短有关,典型值 为 1 100ms。在内部处理阶段,进行 PLC 自检,检查内部硬件是否正常,对 监视定时器(WDT)复位以及完成其它一些内部处理工作。在通信服务阶段, PLC 与其它智能装置实现通信,响应编程器键入的命令,更新编程器的显示内容 等。 当 PLC 处于停止(STOP)状态时,只完成内部处理和通信服务工作。 当 PLC 处于运行(RUN)状态时,除完成内部处理和通信服务工作外,还 要完成输入采样、程序执行、输出刷新工作。 PLC 的扫描工作方式简单直观,便于程序的设计,并为可靠运行提供了保障。 当 PLC 扫描到的指令被执行后,其结果马上就被后面将要扫描到的指令所利用, 而且还可通过 CPU 内部设置的监视定时器来监视每次扫描是否超过规定时间, 避免由于 CPU 内部故障使程序执行进入死循环。 3PLC 执行程序的过程及特点 PLC 执行程序的过程分为三个阶段,即输入采样阶段、程序执行阶段、输出 刷新阶段。 (1) 输入采样阶段 在输入采样阶段,PLC 以扫描工作方式按顺序对所有输入端的输入状态进行 采样,并存入输入映象寄存器中,此时输入映象寄存器被刷新。接着进入程序处 理阶段,在程序执行阶段或其它阶段,即使输入状态发生变化,输入映象寄存器 的内容也不会改变,输入状态的变化只有在下一个扫描周期的输入处理阶段才能 被采样到。 (2) 程序执行阶段 8 在程序执行阶段,PLC 对程序按顺序进行扫描执行。若程序用梯形图来表示, 则总是按先上后下,先左后右的顺序进行。当遇到程序跳转指令时,则根据跳转 条件是否满足来决定程序是否跳转。当指令中涉及到输入、输出状态时,PLC 从 输入映像寄存器和元件映象寄存器中读出,根据用户程序进行运算,运算的结果 再存入元件映象寄存器中。对于元件映象寄存器来说,其内容会随程序执行的过 程而变化。 (3) 输出刷新阶段 当所有程序执行完毕后,进入输出处理阶段。在这一阶段里,PLC 将输出映 象寄存器中与输出有关的状态(输出继电器状态)转存到输出锁存器中,并通过 一定方式输出,驱动外部负载。因此,PLC 在一个扫描周期内,对输入状态的采 样只在输入采样阶段进行。当 PLC 进入程序执行阶段后输入端将被封锁,直到下 一个扫描周期的输入采样阶段才对输入状态进行重新采样。这方式称为集中采样, 即在一个扫描周期内,集中一段时间对输入状态进行采样。 在用户程序中如果对输出结果多次赋值,则最后一次有效。在一个扫描周期 内,只在输出刷新阶段才将输出状态从输出映象寄存器中输出,对输出接口进行 刷新。在其它阶段里输出状态一直保存在输出映象寄存器中。这种方式称为集中 输出。对于小型 PLC,其 I/O 点数较少,用户程序较短,一般采用集中采样、集 中输出的工作方式,虽然在一定程度上降低了系统的响应速度,但使 PLC 工作时 大多数时间与外部输入/输出设备隔离,从根本上提高了系统的抗干扰能力,增 强了系统的可靠性。 而对于大中型 PLC,其 I/O 点数较多,控制功能强,用户程序较长,为提高 系统响应速度,可以采用定期采样、定期输出方式,或中断输入、输出方式以及 采用智能 I/O 接口等多种方式。从上述分析可知,当 PLC 的输入端输入信号发 生变化到 PLC 输出端对该输入变化作出反应,需要一段时间,这种现象称为 PLC 输入输出响应滞后。对一般的工业控制,这种滞后是完全允许的。应该注 意的是,这种响应滞后不仅是由于 PLC 扫描工作方式造成,更主要是 PLC 输入 接口的滤波环节带来的输入延迟,以及输出接口中驱动器件的动作时间带来输出 延迟,同时还与程序设计有关。滞后时间是设计 PLC 应用系统时应注意把握的一 个参数。 9 二组成及作用 1CPU 运算和控制中心 起“心脏 ”作用。当从编程器输入的程序存入到用户程序存储器中,然后 CPU 根据系统所赋予的功能(系统程序存储器的解释编译程序),把用户程序翻译成 PLC 内部所认可的用户编译程序。输入状态和输入信息从输入接口输进,CPU 将之存入工作数据存储器中或输入映象寄存器。然后由 CPU 把数据和程序有机 地结合在一起。把结果存入输出映象寄存器或工作数据存储器中,然后输出到输 出接口、控制外部驱动器。CPU 由控制器、运算器和寄存器组成。这些电路集成 在一个芯片上。CPU 通过地址总线、数据总线与 I/O 接口电路相连接。 2存储器 具有记忆功能的半导体电路。分为系统程序存储器和用户存储器。系统程序 存储器用以存放系统程序,包括管理程序,监控程序以及对用户程序做编译处理 的解释编译程序。由只读存储器、ROM 组成。厂家使用的,内容不可更改,断 电不消失。用户存储器:分为用户程序存储区和工作数据存储区。由随机存取存 储器(RAM)组成。用户使用的。断电内容消失。常用高效的锂电池作为后备电 源,寿命一般为 35 年。 3输入/输出接口 (1)输入接口 光电耦合器由两个发光二极度管和光电三极管组成。发光二级管:在光电耦 合器的输入端加上变化的电信号,发光二极管就产生与输入信号变化规律相同的 光信号。光电三级管:在光信号的照射下导通,导通程度与光信号的强弱有关。 在光电耦合器的线性工作区内,输出信号与输入信号有线性关系。输入接口电路 工作过程:当开关合上,二极管发光,然后三极管在光的照射下导通,向内部电 路输入信号。当开关断开,二极管不发光,三极管不导通。向内部电路输入信号。 也就是通过输入接口电路把外部的开关信号转化成 PLC 内部所能接受的数字信 号。 (2)输出接口 PLC 的继电器输出接口电路工作过程:当内部电路输出数字信号 1,有电流 流过,继电器线圈有电流,然后常开触点闭合,提供负载导通的电流和电压。当 10 内部电路输出数字信号 0,则没有电流流过,继电器线圈没有电流,然后常开触 点断开,断开负载的电流或电压。也就是通过输出接口电路把内部的数字电路化 成一种信号使负载动作或不动作。 4编程器 编程器分为两种,一种是手持编程器,方便。我们实验室使用的就是手持编 程器。二种是通过 PLC 的 RS232 口。与计算机相连。然后敲击键盘。通过 NSTP-GR 软件(或 WINDOWS 下软件)向 PLC 内部输入程序。 XXX学院本科毕业设计(论文)第VI页基于PLC的液体混合控制系统的设计摘 要 可编程序控制器(PLC)是一种新型的通用的自动控制装置,它将传统的继电器控制技术、计算机技术和通讯技术融为一体,是功能加强、编程简单、使用方便以及体积小、重量轻、功耗低等一系列优点。PLC的应用领域已经拓宽到了各个领域,PLC的发展历程在工业生产过程中,大量的开关量顺序控制,它按照逻辑条件进行顺序动作,并按照逻辑关系进行连锁保护动作的控制,及大量离散量的数据采集。在传统上,这些功能是通过气动或电气控制系统来实现的。PLC最基本最广泛的用于开关量的逻辑控制,它取代传统的继电器电路,实现逻辑控制,顺序控制,既可用于单台设备的控制,也可用于多机群控及自动化流水线。如注塑机,印刷机,订书机,组合智能窗帘,磨床,包装等。目前,PLC在国内外已广泛应用于钢铁,石油,化工,电力,建材,机械制造,汽车,轻纺,交通运输,环保及文化娱乐等各个行业,使用广泛。 本文以三种液体的混合灌装控制为例,将三种液体按一定比例混合,在电动机搅拌后要达到控制要求才能将混合的液体输出容器,并形成循环状态。液体混合系 统的控制设计考虑到其动作的连续性以及各个被控设备动作之间的相互关联性,针对不同的工作状态,进行相应的动作控制输出,从而实现液体混合系统从第一种液体加入到混合完成输出的这样一个周期控制工作的程序实现。设计以液体混 合控制系统为中心,从控制系统的硬件系统组成、软件选用到系统的设计过程(包括设计方案、设计流程、设计要求、梯形图设计、外部连接通信等),旨在对其中的设计及制作过程做简单的介绍和说明。 关键词 PLC 控制 液体混合 说明I The design of liquid mixing control system based on PLC ABSTRACT With development of all kind of science technology and global economy, Pneumatic manipulator is a automated devices that can mimic the human hand and arm movements to do something,aslo can according to a fixed procedure to moving objects or control tools. It can replace the heavy labor in order to achieve the production mechanization and automation, and can work in dangerous working environments to protect the personal safety.Therefore widely used in machine building, metallurgy, electronics, light industry and atomic energy sectors.Theinvertedpendulumisatypicalhighordersystem,withmultivariable,non-linear, strong-coupling,fleetandabsolutelyinstable.Itisrepresentativeasanidealmodeltoprovenewcontroltheoryandtechniques.Duringthecontrolprocess,pendulumcaneffectivelyreflectmanykeyproblemssuchasequanimity,robust,follow-upandtrack,therefore.Thispaperstudiesacontrolmethodofdoubleinvertedpendulum.Firstofall,themathematicalmodelofthedoubleinvertedpendulumisestablished.Themakeacontroldesigntodoubleinvertedpendulumonthemathematicalmodel,anddeterminethesystemperformanceindexweightmatrix,byusinggeneticalgorithminordertoattainthesystemstatefeedbackcontrolmatrix.Finally,thesimulationofthesystemismadeby.Afterseveraltestmatrixvaluetheresultsarenotsatisfactoryresponse,thenweoptimizematrixbyusingGeneticAlgorithm.Simulationresultsshow:ThesystemresponsecanmeetthedesignrequirementseffectivelyafterGeneticAlgorithmoptimization.Small twisted paper broken machine for meat.thesystemstatefeedbackcontrolmatrix. Keywords PLC cylinder pneumatic Fout degrees of freedom 目录第一章 绪论1 1.1 课题的研究背景和历史意义3 1.2 选题的目的和意义4第二章 液体混合控制系统PLC控制系统的设计5 2.1 PLC简介6 2.1.1 PLC的定义8 2.1.2 PLC的用途9 2.2 PLC的组成11 2.2.1中央处理单元13 2.2.2存储器14 2.2.3输入输出单元16 2.2.4通讯接口17 2.2.5智能接口模块18 2.2.6编程装置19 2.2.7电源19 第三章 控制系统设计20 3.1 硬件设计20 3.2 混合装置的基本组成20 3.3 液体混合装置电气原理图的绘制21 3.4 PLCI/O点分配及外部硬件接线图22 3.5液体混合系统运行流程图22结论23致谢24参考文献257XXX学院本科毕业设计(论文)第7页
收藏