【正文】
is is the program that describes the control of the example shown before. The sequence can be defined by 25 bytes. These bytes can be divided in five strings with 5 bytes each that define each step of the sequence (Figs. 9 and 10). 7. Conclusion The controller developed for this work (Fig. 11) shows that it is possible to create a very useful programmable controller based on microcontroller. External memories or external timers were not used in case to explore the resources that the microcontroller offers inside. Outside the microcontroller, there are only ponents to implement the outputs, inputs, analog input, display for the interface and the serial munication. Using only the internal memory, it is possible to control a pneumatic system that has a sequence with 48 steps if all the resources for all steps are used, but it is possible to reach sixty steps in the case of a simpler system. The programming of the controller does not use PLC languages, but a configuration that is simple and intuitive. With electropneumatic system, the programming follows the same technique that was used before to design the system, but here the designer work s directly with the states or steps of the system. With a very simple machine language the designer can define all the configuration of the step using four or five bytes. It depends only on his experience to use all the resources of the controller. The controller task is not to work in the same way as a mercial PLC but the purpose of it is to be an example of a versatile controller that is designed for a specific area. Because of that, it is not possible to say which one works better。它不需要為了獲取微控制器里的資源而安裝外部記憶器或外部的定時(shí)器。 圖 7 電氣圖表舉例 圖 8 電氣圖表舉例 另外的一些輔助設(shè)施也包括在這個(gè)系統(tǒng)中 ,比如自動(dòng)機(jī)械 / 手動(dòng)調(diào)控器,他們可以使系統(tǒng)不斷的循環(huán)工作;兩個(gè)開始控制鍵 ,他們能讓操作員手動(dòng)控制系統(tǒng)的開始和停止,這樣就減少了發(fā)生意外事件的危險(xiǎn)。第四步,主動(dòng)器 D 快速往返來回運(yùn)動(dòng)一次。 4. 3 接口 程序運(yùn)行序列可以用控制器的接口來編程。它有足夠的插孔,線路連續(xù)通訊 EEPROM 記憶解救系統(tǒng)的所有結(jié)構(gòu)和步驟的序列。這也就是說發(fā)動(dòng)機(jī)的每一次運(yùn)動(dòng)變化都是系統(tǒng)的一個(gè)新的狀態(tài),而兩個(gè)不同狀態(tài)之間的轉(zhuǎn)變叫做步驟。 針對(duì)這種情況可行的一種辦法是創(chuàng)建一個(gè)可提供特定尺寸和功能的控制器[3, 4]。 PLC 的感應(yīng)器和開關(guān)是輸入端,而發(fā)動(dòng)機(jī)的直接控制閥是輸 出端,其中有一個(gè)內(nèi)部程序操控所有運(yùn)行必需的邏輯,模擬其他的裝置如計(jì)算器、定時(shí)器等,對(duì)整個(gè)系統(tǒng)的運(yùn)行狀態(tài)進(jìn)行控制。這是就需要另一種方法可以節(jié)省時(shí)間,產(chǎn)生清晰線路,能夠防止偶然的信號(hào)交疊和線路堵塞。 不同于傳統(tǒng)的 PLC,這種控制器的工作目的是成為特定領(lǐng)域設(shè)計(jì)的多用控制器。 ? 交互工作模式: 在主要的程序中,使用者可以根據(jù)指導(dǎo)發(fā)出信號(hào)來進(jìn)行具體步驟的操作 ? LCD 平臺(tái)可以顯示系統(tǒng)工作的狀態(tài),衡量輸入,輸出,計(jì)時(shí)器和運(yùn)行的數(shù)據(jù)等。它由四個(gè)主動(dòng)器組成。但是現(xiàn)在還它還不是一個(gè)完整的系統(tǒng),因?yàn)樗€缺少一些輔助設(shè)施,(圖中沒有顯示)。一般情況下,使用者可以在接口上運(yùn)行一個(gè)模擬程序?qū)ふ疫壿嬌系腻e(cuò)誤同之前所述的一樣,新的編程允許每一步驟的結(jié)構(gòu)被分割。 each string has the configuration of one step of the process. There are two bytes for the inputs, one byte for the outputs and two more for the other configurations and auxiliary functions of the step. After programming, this sequence of strings is saved inside of a nonvolatile memory of the microcontroller, so they can be read and executed. The controller task is not to work in the same way as a conventional PLC, but the purpose of it is to be an example of a versatile controller that is design for an specific area. A conventional PLC process the control of the system using a cycle where it makes an image of the inputs, execute all the conditions defined by the configuration programmed inside, and then update the state of the outputs. This controller works in a different way, where it read the configuration of the step, wait the condition of inputs to be satisfied, then update the state or the outputs and after that jump to the next step and start the process again. It can generate some limitations, as the fact that this controller cannot execute, inside the program, movements that must be repeated for some time, but this problem can be solved with some external logic ponents. Another limitation is that the controller cannot be applied on systems that have no sequence. These limitations are a characteristic of the system that must be analyzed for each application. 4. Characteristics of the controller The controller is based on the MICROCHIP microcontroller PIC16F877 [6,7] with 40 pins, and it has all the resources needed for this project .It has enough pins for all the ponents, serial munication implemented in circuit, EEPROM memory to save all the configuration of the system and the sequence of steps. For the execution of the main program, it offers plete resources as timers and interruptions. The list of resources of the controller was created to explore all the capacity of the microcontroller to make it as plete as possible. During the step, the program chooses how to use the resources reading the configuration string of the step. This string has two bytes for digital