Speak with authority, quality is trustworthy.

Open the concept and design of PLC

by:Coolmay     2020-08-17
At present, the domestic user chooses programmable controller ( PLC) Still is given priority to with foreign products, an important reason for this situation is caused by Europe, America, Japan and other developed industrial countries mastered the core technology of high-end PLC, its hard software technology for users is completely closed, user can only learn from the perspective of application of PLC, and cannot participate in the development of PLC [ 1 - 2] 。 In recent years, IEC61131 - 3 the promulgation and implementation of international standards for the PLC manufacturer provides a unified software development principles, open the development of high-performance single-chip microcomputer technology, provides the material basis for the effective [for hardware development 3] 。 In this context, open PLC system both scientific research and promote the development of PLC industry has a positive practical significance. PLC is a specialized in industrial control computer, its hardware is mainly composed of the CPU, memory, input/output interface, etc [ 4] , its hardware structure is shown in figure 1. 1 open open PLC programmable controller hardware structure using CPU + + peripheral module interface, the interface is designed according to the standard, greatly improve the openness of PLC, make its can be easily connected to the system. Programming language IEC61131 - follow international standards 3, and will be based on the PLC programming software of PC as the preferred programming tools. System hardware part adopts high performance STC89C51 51 kernel processor, its modular design, using filter, isolating circuit, in order to reduce costs. STC89C51RC main circuit: micro controller, switch input circuit, relay output circuit, a transistor output circuit, RS232 communication interface circuit, power circuit, clock reset circuit and USB communication interface circuit, PLC controller hardware system block diagram as shown in figure 2, software using c + + Builder, Borland company integrated development software through the integrated platform for 51 kernel processor to interpret instruction set, compile, and make the ladder diagram is converted into a language can be 51 kernel processor identification code. Part 2 programmable controller MCU of the system hardware design circuit diagram is shown in figure 3. The USB communication part choose Philips company PDIUSBD12 [ 5] The chip as a USB device in the system, chip integrates high performance USB interface circuit, SIE, FIFO memory, transceiver, and voltage regulator, etc. , can be with any external controller or microprocessor to realize high speed parallel communication, its rate of 2 Mb/s, can fully meet the design requirements of the data transmission speed. The USB communication interface module circuit as shown in figure 4. 3 the system software design system software structure as shown in figure 5. Editor module provides users with diagram, system environment, receives the user's input ladder diagram program, and store it to the corresponding files. Ladder diagram is a graphic language, language will directly on the compilation is very difficult, so is not directly on the ladder diagram program compiled, but its first translated into instruction text form of language, and then compile the language of instruction. Graphics language compile the solution of the problem, improve the utilization rate of the code [ 6 - 7] 。 By extracting the data in the data structure, C programming language form file, through C51 compiler, linker, converters, compile, link, the transformation process, generate can run on the PLC hardware executable file. 3. 1 user interface the PLC user interface is an important part of realizing programmable man-machine interaction, it takes the form of ladder diagram language inputting user control procedures, in binary form via a serial port to download to the PLC hardware, the trapezoidal diagram of user programming area is shown in figure 6. PLC before the logic operation, must be the external signal sampling [ 8] , to realize the function of the instruction, the first to set up the external I/O addresses in the ladder diagram, the system can only be used in the user program to the I/O address and MCU pin. This design in the I/O setup dialog design as shown in table 1 at the bottom of the data processing function. 3. 2 USB communication PDIUSBD12 as complete interrupt-driven firmware design, when the CPU when handling the foreground tasks, the USB transmission can undertake in the background; Background interrupt service program and the foreground of data exchange between the main program loop can be done by event flags and data buffers. When PDIUSBD12 received a packet from a USB, which produces an interrupt request to the CPU, CPU interrupt immediately response. In the interrupt service routine, firmware packets from PDIUSBD12 internal buffer will be moved to the circulation data buffer, and PDIUSBD12 internal buffer reset, in order to receive a new packet, the CPU can continue to perform at the front of the current task until completion. Based on PDIUSBD12 endpoint 1 command transmission and response, endpoint 1 each receiving computer send come over 8 B instruction, the instruction format as shown in table 2. Receives the hexadecimal code, for example, 50, 52 01 00 00 03 07 00 said 24 c01 device from 3 bytes read 7 bytes of data. 52 h R the ASCII code, 57 h ASCII code for the W. The endpoint 2 used for the transmission of data. Understanding of PLC is presented in this paper on the basis of the research status at home and abroad and the market demand, puts forward the concept of research and development of the open PLC, completed the PLC C51 module implementation scheme of the design of the integrated development system, introduces the USB communication mode field of PLC, the design of ladder diagram editor provides a platform of ladder diagram editor, realize the basic logic instruction of PLC, computer and USB communication controller.
Shenzhen Coolmay Technology Co., Ltd. have now decided to extend our company in other countries.
is making its name in professional programmable control systems all over the world, and with Shenzhen Coolmay Technology Co., Ltd. taking great care to make an excellent product & actively involved in keeping the industry well-regulated, it's a product that should make its way into your plc controller price.
Lucky to know that you are not alone in the face of programmable control systems issue. Let Shenzhen Coolmay Technology Co., Ltd. be your selected plc manufacturers expert in providing first class to help you out.
Chat Online
Chat Online
Chat Online inputting...
Sign in with: