CN202649713U - Communication control system based on machine vision of LabVIEW and PLC - Google Patents
Communication control system based on machine vision of LabVIEW and PLC Download PDFInfo
- Publication number
- CN202649713U CN202649713U CN 201220061373 CN201220061373U CN202649713U CN 202649713 U CN202649713 U CN 202649713U CN 201220061373 CN201220061373 CN 201220061373 CN 201220061373 U CN201220061373 U CN 201220061373U CN 202649713 U CN202649713 U CN 202649713U
- Authority
- CN
- China
- Prior art keywords
- plc
- labview
- communication
- control system
- machine vision
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Communication Control (AREA)
Abstract
The utility model discloses a communication control system based on machine vision of LabVIEW and a PLC. A technical scheme is as follows: the LabVIEW is used as a monitoring platform for an end user, an M file subprogram is called by MATLAB Script, a CCD camera collects images, operations of image processing, data analysis and the like are carried out, and a control signal is determined to enter into a corresponding branch structure to enable a Mitsubishi PLC to execute a corresponding action. Thus the capacity of building a science and engineering system is enhanced, a convenient way for realizing instrument programming and a data collecting system is provided, and work efficiency is greatly improved.
Description
Technical field
The utility model relates to a kind of plc communication control system, particularly a kind of machine vision and Mitsubishi PLC communication control system based on LabVIEW.
Background technology
Scientific research and statistics show that the human information that obtains from the external world has 75% to come from vision system approximately, that is to say, human most information all obtains from image.Image most important, the abundantest, quantity of information that to be people experienced since the birth are obtained the best part.And machine vision is mainly simulated people's visual performance with computing machine, and information extraction from the image of objective things is processed and understood, and final being used for actually detected, measures and control.The characteristics of machine vision technique maximum be speed fast, contain much information, function is many.Along with the continuous appearance of new electric elements and the development of computer technology, Electrical Control Technology is also in sustainable development.Modern Electrical Control Technology combines many scientific and technological achievements such as computing machine, automatically control, electronic technology and precision measurement just, and obtains develop rapidly.Programmable logic controller (PLC) is a kind of universal controller that is adapted to industrial environment, it gets up the advantages such as convenient and simple for operation understandable, cheap of the advantages such as the complete function of computing machine, versatility and dirigibility are good and relay control system, not only increased the functions such as arithmetical operation, data-switching, process control, data communication, can also finish large-scale and complicated control and appoint.
LabVIEW is a kind of patterned programming language, and it is integrated and the repertoire of the hardware that satisfies GPIB, VXI, RS-232 and RS-485 agreement and data acquisition cartoon letters.LabVIEW is as an instrument towards the final user, can embed easily MATLAB language application image processes, strengthen the ability that makes up the Science and engineering system, the convenient way that realizes instrument programming and data acquisition system (DAS) is provided, use it to carry out principle research, design, test and when realizing instrument system, greatly improve the work work efficiency.
The utility model content
The technical problems to be solved in the utility model has provided a kind of based on the machine vision of LabVIEW and the communication control system of PLC.In system's operational process, LabVIEW realizes that on the one hand Machine Vision Detection link and PLC carry out the data communication of link, on the other hand as an OO instrument, embed MATLAB and carry out the operation obtaining informations such as mathematical statistics, digital signal processing and image processing, judge, send control information.
The technical solution of the utility model is to comprise: hardware formation, communication protocol, LabVIEW program design.
Hardware consists of the programming port RS-422 interface that comprises the mitsubishi FX2N series of PLC, the serial communication port RS-232C interface that PC is used, and realize the adaptive download cable communication of SC-09 of communication between the two.
Communication protocol comprises data layout, communication control character, communications command, communication format, transmission course, address translation.Described data layout comprises 1 start bit, 7 bit data positions, and parity check bit adopts even parity check, 1 position of rest; Data are take frame as the unit sending and receiving; And the PLC of mitsubishi FX2N series and the communications speed between the computing machine are made as 9600bps.Described communication control character has been used 5 communication control characters; Control character ENQ (05H), ACK (06H) and NAK (15H) consist of the monocase frame, remaining character frame when sending or receive with control character STX (02H) and ETX (03H) respectively as beginning flag and the end mark of this frame.Described communications command comprises read command, write order, the logical order of pressure, forces disconnected order.Described communication format comprises that PC sends the structure of message and the response message structure that PLC sends to PC to PLC.Described PC is a multiword symbol frame to the structure that PLC sends message, and it is comprised of start character, order number, element first address (data segment), end character and verification five parts.Described PLC is divided into read command response message structure and write order response message structure to the response message structure that PC sends; The data of the response message data segment of read command for reading, data account for two bytes, divide upper the next; The response message of write order is without data segment, with ACK and NAK as response content.Described transmission course adopts response mode communication, and loading error occurring is then organized repeating transmission; And PLC is according to the order of PC, and tissue is retransmitted automatically behind the END statement of each scan round end, need not the user at PLC one side's coding.Described address translation is the address algorithm of read-write software: address=address32+1000h; Address algorithm during equipment is forced: address=address/8+100h.
Described LabVIEW program design comprises serial ports initialization, the use of MATLAB Script, action executing.Described serial ports initialization is configured according to the standard traffic parameter of Fx series of PLC: baud rate is 9600bit/s; Data bit is 7; Parity check system adopts even parity check; Position of rest is 1.The use of described MATLAB Script refers to the M file routine to fruit image processing classification in MATLAB is write MATLAB Script, and the classification results of program operation is delivered among the Case Structure (branched structure).Described action executing is finished by " VISA writes ", " VISA reads ", " VISA closes " function, carries out according to the form of mitsubishi FX2N series PLC Programming port communications agreement, uses the array form, and the array attribute form is changed into " ASCII character "; And in process flow diagram, used a millisecond waiting timer; Returned the byte number of data in the input-buffer of serial ports by attribute node " PropertyNode ".
The communication control system that the utility model provides has been realized based on the machine vision of LabVIEW and mitsubishi FX2N type plc communication control technology, utilize machine vision to obtain image information, MATLAB routine processes and analysis of image data that LabVIEW embeds, carry out control action by PLC, thereby strengthen the ability that makes up the Science and engineering system, the convenient way that realizes instrument programming and data acquisition system (DAS) is provided, has greatly increased work efficiency.
Description of drawings
Fig. 1 is that communication of the present utility model realizes schematic diagram
Fig. 2 is communication response mode synoptic diagram of the present utility model
Fig. 3 is LabVIEW signal procedure process flow diagram of the present utility model.
Embodiment
Below in conjunction with accompanying drawing the utility model is described in further detail.
Abundant cooperation by hardware and software of the present utility model has realized machine vision and mitsubishi FX2N type plc communication control technology based on LabVIEW.
At hardware aspect, because the programming port that the mitsubishi FX2N series of PLC carries is the RS-422 interface, the used serial communication port of PC then is the RS-323C interface, and the signal transmission form of these two kinds of serial data interfaces is different.The utility model has been realized conversion between two kinds of different signal transmission forms by the SC-09 cable.
Aspect software, be described as follows:
Use MATLAB Script in LabVIEW, this node is that provide among the LabVIEW and DLL (dynamic link library) MATLAB.In the LabVIEW environment, use the MATLAB instruction node, can compile, move the MATLAB program.The utility model can realize PC and image acquisition video camera be connected the parameter setting and image is processed, the M file routine of data analysis writes MATLAB Script, program when operation LabVIEW program among the meeting Automatically invoked MATLAB running software MATLAB Script is finished corresponding processing, and a result who processes is delivered among the Case Structure (branched structure), finish corresponding subsequent treatment action.
Adopt as shown in Figure 2 response mode to communicate by letter between PC and the FX series of PLC, loading error occurring is then organized repeating transmission.PLC is according to the order of PC, and tissue is retransmitted automatically behind the END statement of each scan round end, need not the user at PLC one side's coding.
In the LabVIEW programming, at first serial ports is carried out initialization as shown in Figure 3, then send request signal " ENQ " to PLC, after the correct answer " ACK " that obtains PLC, PC reads or write operation PLC, close serial ports behind the sign off, as mistake occurs and just enter " mistake processing ".
Wherein serial ports needs to be configured according to the standard traffic parameter of Fx series of PLC: baud rate is 9600bit/s; Data bit is 7; Parity check system adopts even parity check; Position of rest is 1.
After finishing the serial ports configuration, next step writes character to serial ports exactly, the action in this step is finished by " VISA writes " function, the data that write must be carried out according to the form (message format) of mitsubishi FX2N series PLC Programming port communications agreement, and the array attribute form is changed into " ASCII character ".After serial ports sent the data to PLC, serial ports and PLC needed the time executive routine, had therefore used a millisecond waiting timer at this.Detecting current serial ports input word joint number can be by finishing in the attribute node " PropertyNode ", the major function of this node is to return the byte number of data in the input-buffer of serial ports, before using " VISA reads " function to read serial ports, can detect the byte number that exists in the current serial ports input-buffer with VISA Bytes at Serial Port node first, the byte number of then specifying " VISA reads " node to read from the serial ports input-buffer thus can guarantee once the data in the serial ports input-buffer all to be read.Next step is for reading serial ports buffer memory action again, and this step is finished by " VISA reads " function, and major function is the data that read in the equipment of " VISA resource name port " appointment by total amount of byte port designated length.Final step is exactly to close the serial port resource that takies after finishing transmission and reading, this step action is finished by VISA node " VISA closes ", the major function of this node is for closing the equipment connection by " VISA resource name port " appointment, can be used for closing a serial ports of having opened, thereby discharge LabVIEW taking this serial port resource.
Although the utility model with preferred embodiment openly as above; but it is not to limit the present invention; any person skilled in the art; without departing from the spirit and scope of the present invention; all can do various changes and modification, so protection scope of the present invention should be with being as the criterion that claims were defined.
Claims (2)
1. one kind based on the machine vision of LabVIEW and the communication control system of PLC, it is characterized in that: comprise hardware formation, communication protocol, LabVIEW program, image information is obtained in acting as that described hardware consists of, and establishing criteria sends control signal to PLC, and acting as of communication protocol realizes PLC and the direct exchanges data of LabVIEW.
2. communication control system as claimed in claim 1, it is characterized in that described hardware consists of the programming port RS-422 interface that comprises FX2N type PLC, the serial communication port RS-232C interface that PC is used, and realize the adaptive download cable communication of SC-09 of communication between the two.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201220061373 CN202649713U (en) | 2012-02-24 | 2012-02-24 | Communication control system based on machine vision of LabVIEW and PLC |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201220061373 CN202649713U (en) | 2012-02-24 | 2012-02-24 | Communication control system based on machine vision of LabVIEW and PLC |
Publications (1)
Publication Number | Publication Date |
---|---|
CN202649713U true CN202649713U (en) | 2013-01-02 |
Family
ID=47418799
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201220061373 Expired - Fee Related CN202649713U (en) | 2012-02-24 | 2012-02-24 | Communication control system based on machine vision of LabVIEW and PLC |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN202649713U (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107894746A (en) * | 2017-11-28 | 2018-04-10 | 广东奥瑞特新能源设备科技有限公司 | A kind of PLC of mixing plant and the communication means of computer |
CN109341594A (en) * | 2018-09-13 | 2019-02-15 | 深圳市卓精微智能机器人设备有限公司 | A method of socket burnt-in seat orientation angles are judged automatically based on CCD vision |
-
2012
- 2012-02-24 CN CN 201220061373 patent/CN202649713U/en not_active Expired - Fee Related
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107894746A (en) * | 2017-11-28 | 2018-04-10 | 广东奥瑞特新能源设备科技有限公司 | A kind of PLC of mixing plant and the communication means of computer |
CN109341594A (en) * | 2018-09-13 | 2019-02-15 | 深圳市卓精微智能机器人设备有限公司 | A method of socket burnt-in seat orientation angles are judged automatically based on CCD vision |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100511171C (en) | Test approach for debugging serial port function with single board and system thereof | |
CN103559152A (en) | Device and method for CPU (central processing unit) to access local bus on basis of PCIE (peripheral component interface express) protocol | |
CN105357070A (en) | FPGA-based ARINC818 bus analysis and test apparatus | |
CN102662835A (en) | Program debugging method of embedded system and embedded system | |
CN1991784A (en) | On-line debugging method for SoC system using HDL to expand serial port | |
CN103853642A (en) | Injection type simulation system for infrared digital image based on USB3.0 and method thereof | |
CN101957787A (en) | Method for debugging blade server by using BMC module | |
CN108197699A (en) | Debugging module for convolutional neural network hardware accelerator | |
CN110703741A (en) | Multifunctional communication debugging equipment | |
CN202649713U (en) | Communication control system based on machine vision of LabVIEW and PLC | |
CN105653461A (en) | System for converting single USB interface into plurality of UART debugging interfaces | |
CN109032860A (en) | A kind of ARINC429 bus general purpose simulation system and emulation mode | |
CN110209605A (en) | The register reading/writing method and calculating equipment of PCIE Cardbus NIC Cardbus | |
CN213277033U (en) | Multiprocessor industrial Internet of things gateway for educational training | |
CN106200448B (en) | A kind of long-range mapped system of industry interface implementation | |
CN103514073B (en) | Serial port communication system based on LabVIEW passive receiving type | |
CN108153226A (en) | A kind of PLC device of novel real-time, interactive | |
CN207623778U (en) | A kind of board interface test device | |
CN202600127U (en) | Wiring judgment controlling machine for power transformer test wiring simulation system | |
CN115309455A (en) | Three-dimensional scanner processing system and data processing method thereof | |
CN109614094A (en) | A kind of GPU glCallList view model based on UML | |
CN105843157B (en) | PLC system and its working method with teledata trace trap function | |
CN106774032A (en) | A kind of instrument conversion equipment and its implementation based on ARM and visual identity | |
CN107992025A (en) | A kind of test system | |
CN107809345A (en) | Gateway data verifies instrument, the method and apparatus for verifying gateway data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20130102 Termination date: 20180224 |
|
CF01 | Termination of patent right due to non-payment of annual fee |