基于PLC的液體混合控制系統(tǒng)的設計【含CAD圖紙、說明書】
基于PLC的液體混合控制系統(tǒng)的設計【含CAD圖紙、說明書】,含CAD圖紙、說明書,基于,plc,液體,混合,控制系統(tǒng),設計,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 運行時,是通過執(zhí)行反映控制要求的用戶程序來完成控制任務的,需 要執(zhí)行眾多的操作,但 CPU 不可能同時去執(zhí)行多個操作,它只能按分時操作 (串行工作)方式,每一次執(zhí)行一個操作,按順序逐個執(zhí)行。由于 CPU 的運算 處理速度很快,所以從宏觀上來看,PLC 外部出現(xiàn)的結果似乎是同時(并行)完 成的。這種串行工作過程稱為 PLC 的掃描工作方式。用掃描工作方式執(zhí)行用戶程 序時,掃描是從第一條程序開始,在無中斷或跳轉控制的情況下,按程序存儲順 序的先后,逐條執(zhí)行用戶程序,直到程序結束。然后再從頭開始掃描執(zhí)行,周而 復始重復運行。 PLC 的掃描工作方式與電器控制的工作原理明顯不同。電器控制裝置采用硬 邏輯的并行工作方式,如果某個繼電器的線圈通電或斷電,那么該繼電器的所有 7 常開和常閉觸點不論處在控制線路的哪個位置上,都會立即同時動作;而 PLC 采 用掃描工作方式(串行工作方式),如果某個軟繼電器的線圈被接通或斷開,其 所有的觸點不會立即動作,必須等掃描到該時才會動作。但由于 PLC 的掃描速度 快,通常 PLC 與電器控制裝置在 I/O 的處理結果上并沒有什么差別。 2掃描工作過程 PLC 的掃描工作過程除了執(zhí)行用戶程序外,在每次掃描工作過程中還要完成 內(nèi)部處理、通信服務工作。整個掃描工作過程包括內(nèi)部處理、通信服務、輸入采 樣、程序執(zhí)行、輸出刷新五個階段。整個過程掃描執(zhí)行一遍所需的時間稱為掃描 周期。掃描周期與 CPU 運行速度、 PLC 硬件配置及用戶程序長短有關,典型值 為 1 100ms。在內(nèi)部處理階段,進行 PLC 自檢,檢查內(nèi)部硬件是否正常,對 監(jiān)視定時器(WDT)復位以及完成其它一些內(nèi)部處理工作。在通信服務階段, PLC 與其它智能裝置實現(xiàn)通信,響應編程器鍵入的命令,更新編程器的顯示內(nèi)容 等。 當 PLC 處于停止(STOP)狀態(tài)時,只完成內(nèi)部處理和通信服務工作。 當 PLC 處于運行(RUN)狀態(tài)時,除完成內(nèi)部處理和通信服務工作外,還 要完成輸入采樣、程序執(zhí)行、輸出刷新工作。 PLC 的掃描工作方式簡單直觀,便于程序的設計,并為可靠運行提供了保障。 當 PLC 掃描到的指令被執(zhí)行后,其結果馬上就被后面將要掃描到的指令所利用, 而且還可通過 CPU 內(nèi)部設置的監(jiān)視定時器來監(jiān)視每次掃描是否超過規(guī)定時間, 避免由于 CPU 內(nèi)部故障使程序執(zhí)行進入死循環(huán)。 3PLC 執(zhí)行程序的過程及特點 PLC 執(zhí)行程序的過程分為三個階段,即輸入采樣階段、程序執(zhí)行階段、輸出 刷新階段。 (1) 輸入采樣階段 在輸入采樣階段,PLC 以掃描工作方式按順序對所有輸入端的輸入狀態(tài)進行 采樣,并存入輸入映象寄存器中,此時輸入映象寄存器被刷新。接著進入程序處 理階段,在程序執(zhí)行階段或其它階段,即使輸入狀態(tài)發(fā)生變化,輸入映象寄存器 的內(nèi)容也不會改變,輸入狀態(tài)的變化只有在下一個掃描周期的輸入處理階段才能 被采樣到。 (2) 程序執(zhí)行階段 8 在程序執(zhí)行階段,PLC 對程序按順序進行掃描執(zhí)行。若程序用梯形圖來表示, 則總是按先上后下,先左后右的順序進行。當遇到程序跳轉指令時,則根據(jù)跳轉 條件是否滿足來決定程序是否跳轉。當指令中涉及到輸入、輸出狀態(tài)時,PLC 從 輸入映像寄存器和元件映象寄存器中讀出,根據(jù)用戶程序進行運算,運算的結果 再存入元件映象寄存器中。對于元件映象寄存器來說,其內(nèi)容會隨程序執(zhí)行的過 程而變化。 (3) 輸出刷新階段 當所有程序執(zhí)行完畢后,進入輸出處理階段。在這一階段里,PLC 將輸出映 象寄存器中與輸出有關的狀態(tài)(輸出繼電器狀態(tài))轉存到輸出鎖存器中,并通過 一定方式輸出,驅動外部負載。因此,PLC 在一個掃描周期內(nèi),對輸入狀態(tài)的采 樣只在輸入采樣階段進行。當 PLC 進入程序執(zhí)行階段后輸入端將被封鎖,直到下 一個掃描周期的輸入采樣階段才對輸入狀態(tài)進行重新采樣。這方式稱為集中采樣, 即在一個掃描周期內(nèi),集中一段時間對輸入狀態(tài)進行采樣。 在用戶程序中如果對輸出結果多次賦值,則最后一次有效。在一個掃描周期 內(nèi),只在輸出刷新階段才將輸出狀態(tài)從輸出映象寄存器中輸出,對輸出接口進行 刷新。在其它階段里輸出狀態(tài)一直保存在輸出映象寄存器中。這種方式稱為集中 輸出。對于小型 PLC,其 I/O 點數(shù)較少,用戶程序較短,一般采用集中采樣、集 中輸出的工作方式,雖然在一定程度上降低了系統(tǒng)的響應速度,但使 PLC 工作時 大多數(shù)時間與外部輸入/輸出設備隔離,從根本上提高了系統(tǒng)的抗干擾能力,增 強了系統(tǒng)的可靠性。 而對于大中型 PLC,其 I/O 點數(shù)較多,控制功能強,用戶程序較長,為提高 系統(tǒng)響應速度,可以采用定期采樣、定期輸出方式,或中斷輸入、輸出方式以及 采用智能 I/O 接口等多種方式。從上述分析可知,當 PLC 的輸入端輸入信號發(fā) 生變化到 PLC 輸出端對該輸入變化作出反應,需要一段時間,這種現(xiàn)象稱為 PLC 輸入輸出響應滯后。對一般的工業(yè)控制,這種滯后是完全允許的。應該注 意的是,這種響應滯后不僅是由于 PLC 掃描工作方式造成,更主要是 PLC 輸入 接口的濾波環(huán)節(jié)帶來的輸入延遲,以及輸出接口中驅動器件的動作時間帶來輸出 延遲,同時還與程序設計有關。滯后時間是設計 PLC 應用系統(tǒng)時應注意把握的一 個參數(shù)。 9 二組成及作用 1CPU 運算和控制中心 起“心臟 ”作用。當從編程器輸入的程序存入到用戶程序存儲器中,然后 CPU 根據(jù)系統(tǒng)所賦予的功能(系統(tǒng)程序存儲器的解釋編譯程序),把用戶程序翻譯成 PLC 內(nèi)部所認可的用戶編譯程序。輸入狀態(tài)和輸入信息從輸入接口輸進,CPU 將之存入工作數(shù)據(jù)存儲器中或輸入映象寄存器。然后由 CPU 把數(shù)據(jù)和程序有機 地結合在一起。把結果存入輸出映象寄存器或工作數(shù)據(jù)存儲器中,然后輸出到輸 出接口、控制外部驅動器。CPU 由控制器、運算器和寄存器組成。這些電路集成 在一個芯片上。CPU 通過地址總線、數(shù)據(jù)總線與 I/O 接口電路相連接。 2存儲器 具有記憶功能的半導體電路。分為系統(tǒng)程序存儲器和用戶存儲器。系統(tǒng)程序 存儲器用以存放系統(tǒng)程序,包括管理程序,監(jiān)控程序以及對用戶程序做編譯處理 的解釋編譯程序。由只讀存儲器、ROM 組成。廠家使用的,內(nèi)容不可更改,斷 電不消失。用戶存儲器:分為用戶程序存儲區(qū)和工作數(shù)據(jù)存儲區(qū)。由隨機存取存 儲器(RAM)組成。用戶使用的。斷電內(nèi)容消失。常用高效的鋰電池作為后備電 源,壽命一般為 35 年。 3輸入/輸出接口 (1)輸入接口 光電耦合器由兩個發(fā)光二極度管和光電三極管組成。發(fā)光二級管:在光電耦 合器的輸入端加上變化的電信號,發(fā)光二極管就產(chǎn)生與輸入信號變化規(guī)律相同的 光信號。光電三級管:在光信號的照射下導通,導通程度與光信號的強弱有關。 在光電耦合器的線性工作區(qū)內(nèi),輸出信號與輸入信號有線性關系。輸入接口電路 工作過程:當開關合上,二極管發(fā)光,然后三極管在光的照射下導通,向內(nèi)部電 路輸入信號。當開關斷開,二極管不發(fā)光,三極管不導通。向內(nèi)部電路輸入信號。 也就是通過輸入接口電路把外部的開關信號轉化成 PLC 內(nèi)部所能接受的數(shù)字信 號。 (2)輸出接口 PLC 的繼電器輸出接口電路工作過程:當內(nèi)部電路輸出數(shù)字信號 1,有電流 流過,繼電器線圈有電流,然后常開觸點閉合,提供負載導通的電流和電壓。當 10 內(nèi)部電路輸出數(shù)字信號 0,則沒有電流流過,繼電器線圈沒有電流,然后常開觸 點斷開,斷開負載的電流或電壓。也就是通過輸出接口電路把內(nèi)部的數(shù)字電路化 成一種信號使負載動作或不動作。 4編程器 編程器分為兩種,一種是手持編程器,方便。我們實驗室使用的就是手持編 程器。二種是通過 PLC 的 RS232 口。與計算機相連。然后敲擊鍵盤。通過 NSTP-GR 軟件(或 WINDOWS 下軟件)向 PLC 內(nèi)部輸入程序。
收藏