CN109884975A - A kind of method and device that simulation PLC is communicated with AOI - Google Patents

A kind of method and device that simulation PLC is communicated with AOI Download PDF

Info

Publication number
CN109884975A
CN109884975A CN201910160308.5A CN201910160308A CN109884975A CN 109884975 A CN109884975 A CN 109884975A CN 201910160308 A CN201910160308 A CN 201910160308A CN 109884975 A CN109884975 A CN 109884975A
Authority
CN
China
Prior art keywords
plc
aoi
communicated
data
simulation
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.)
Pending
Application number
CN201910160308.5A
Other languages
Chinese (zh)
Inventor
严保生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Jingce Electronic Group Co Ltd
Wuhan Jingli Electronic Technology Co Ltd
Wuhan Jingce Electronic Technology Co Ltd
Original Assignee
Wuhan Jingce Electronic Group Co Ltd
Wuhan Jingli Electronic Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Wuhan Jingce Electronic Group Co Ltd, Wuhan Jingli Electronic Technology Co Ltd filed Critical Wuhan Jingce Electronic Group Co Ltd
Priority to CN201910160308.5A priority Critical patent/CN109884975A/en
Publication of CN109884975A publication Critical patent/CN109884975A/en
Pending legal-status Critical Current

Links

Abstract

The present invention relates to a kind of method and devices that simulation PLC is communicated with AOI.Specifically include: setting Modbus Slave module parameter is for simulating plc data;Then the EDC module of AOI system is communicated with Modbus Slave module and reads Modbus Slave module parameter, and simulative debugging PLC device is communicated with AOI system.The present invention has the advantage that 1, when customer demand changes, EDC software can also change to meet customer need.PLC is simulated by Modbus Slave simulation tool, the communication between debugging PLC and EDC substantially reduces the probability that AOI system generates bug, the stability of lifting system to test whether EDC software and AOI system are able to satisfy customer demand;2, without going to project field adjustable, debug time and project cost can be saved, promotes the efficiency of project delivery.

Description

A kind of method and device that simulation PLC is communicated with AOI
Technical field
The invention mainly relates to the automation defects detection field of panel, (mainly more particularly, to PLC and AOI system EDC software) between communication, be specifically related to a kind of method and device that simulation PLC is communicated with AOI.
Background technique
PLC (Programmable Logic Controller), i.e. programmable logic controller (PLC), are to aim at industrial production A kind of equipment of design, it uses programmable memory, is used for its internally stored program, executes logical operation, sequential control Deng instruction, control machinery or production process.It is the core of Industry Control.
PLC generally has communication module, for the communication between PLC or between PLC and other smart machines.It is examined in defect Survey field, for AOI automation defects detection software systems be usually deployed PC, the PC and PLC in same local area network, It is communicated by socket.
In AOI automation defects detection, PLC controls the movement of producing line.These movements include by product to be detected (supplied materials) It is put into microscope carrier, control microscope carrier moves to camera position, controls product to be detected by camera position, acquisition testing result simultaneously will be to be checked Survey product are diverted to the corresponding position OK/NG
When PLC carries out these movements, need to be communicated with EDC.When the address PLC (bit data) level is drawn high, EDC is able to detect that and executes the movements such as bat figure detection, while can also draw high the level of another corresponding address.PLC inspection When measuring the address levels and drawing high, execute next movement (such as control microscope carrier moves).In addition, some addresses are used in PLC Storing data (byte data, such as panel ID (PanelID)), EDC can read these data from PLC, patrol for subsequent In volume.Debugging PLC equipment is communicated with AOI system at present, is needed in producing line field adjustable.
Summary of the invention
It is an object of the invention to propose a kind of method and device that simulation PLC is communicated with AOI, and with the side of simulation Method carrys out the communication between debugging PLC and AOI.PLC device in existing scheme Modbus Slave simulation tool is substituted, so Afterwards by Modbus agreement, carry out the communication between debugging PLC and EDC.
Above-mentioned technical problem of the invention is mainly to be addressed by following technical proposals:
A method of simulation PLC is communicated with AOI, which is characterized in that carries out mould based on Modbus Slave module It is quasi-, it specifically includes:
Setting Modbus Slave module parameter is for simulating plc data;
The EDC module of AOI system is communicated with Modbus Slave module and is read Modbus Slave module parameter, Simulative debugging PLC device is communicated with AOI system.
In the method that a kind of above-mentioned simulation PLC is communicated with AOI, the plc data includes bit data, including is set Set Modbus tributary address, the selection of register functions code, register initial address and the continuous number of register.
In the method that a kind of above-mentioned simulation PLC is communicated with AOI, the plc data further includes byte data, including It is configured to caching integer data or string data.
In the method that a kind of above-mentioned simulation PLC is communicated with AOI, the EDC module and ModbusSlove of AOI system It is communicated based on modbus agreement.
In the method that a kind of above-mentioned simulation PLC is communicated with AOI, simulative debugging PLC device is communicated with AOI system When, communication data is recalled for checking the data frame of analysis transmitting-receiving by Modbus Slave module.
A kind of device that simulation PLC is communicated with AOI characterized by comprising
Modbus Slave module: plc data is simulated by setting Modbus Slave module parameter;
EDC module: it is arranged in AOI system, is communicated with Modbus Slave module and read Modbus Slave Module parameter, simulative debugging PLC device are communicated with AOI system.
In the device that a kind of above-mentioned simulation PLC is communicated with AOI, the plc data includes bit data, including is set Set Modbus tributary address, the selection of register functions code, register initial address and the continuous number of register.
In the device that a kind of above-mentioned simulation PLC is communicated with AOI, the plc data further includes byte data, including It is configured to caching integer data or string data.
In the device that a kind of above-mentioned simulation PLC is communicated with AOI, the EDC module and ModbusSlove of AOI system It is communicated based on modbus agreement.
In the device that a kind of above-mentioned simulation PLC is communicated with AOI, simulative debugging PLC device is communicated with AOI system When, communication data is recalled for checking the data frame of analysis transmitting-receiving by Modbus Slave module.
Therefore, the present invention has the advantage that 1, when customer demand changes (newly-increased or modification), EDC software is in order to full Sufficient customer demand can also change.Simulate PLC by Modbus Slave simulation tool, the communication between debugging PLC and EDC, It tests whether EDC software and AOI system are able to satisfy customer demand, substantially reduces the probability that AOI system generates bug, promoted The stability of system;2, Modbus Slave simulation tool is software, is analog PLC device after installing on a home pc, no With project field adjustable is gone to, debug time and project cost can be saved, promotes the efficiency of project delivery.
Detailed description of the invention
Attached drawing 1 is that the schematic diagram that connection is TCP/IP is arranged in the embodiment of the present invention.
Attached drawing 2 is the schematic diagram that the bit data of Modbus Slave parameter simulation PLC are arranged in the embodiment of the present invention.
Attached drawing 3 is the schematic diagram (son for the bit data that Modbus Slave parameter simulation PLC is arranged in the embodiment of the present invention Menu saves).
Attached drawing 4 is the schematic diagram that communication data frame is checked in the embodiment of the present invention.
Attached drawing 5 is the device of the invention hardware structural diagram.
Specific embodiment
Below with reference to the embodiments and with reference to the accompanying drawing the technical solutions of the present invention will be further described.
Embodiment:
One, the Method And Principle of this case is introduced below with reference to concrete case.The term that this case is related to is introduced first to explain.
This case mainly PLC device is emulated by Modbus Slave software module, then with AOI system EDC software module is communicated, and achievees the purpose that simulate PLC device is communicated with EDC software module, is specifically included:
1. installing Modbus Slave simulation tool.
2. setting Modbus Slave is emulated using ModbusTCP.
ModbusSlave software is opened, for convenience, the address that use is defaulted herein, function code, register number, Connection- > connect is clicked, is TCP/IP in the window setting connection of pop-up, clicks OK, as shown in Figure 1,.
3. the parameter in Modbus Slave is arranged, for simulating the bit data of PLC.
It clicks in menu " Setup " " Slave Definition..F2 " and carries out parameter setting, will pop up Fig. 2 such as and talk with Frame.Wherein: Slave ID is Modbus tributary address, and the ID value in corresponding key frame is defaulted as 1.Function is register The selection of function code, when being selected as " 01Coil Status (0x) ", can simulating the bit data of PLC, (i.e. bit data are readable It writes).It clicks File- > Save and saves bit data into file, as shown in Figure 3.
Address is register initial address.Default is since 0.
Length is the continuous number of register.10 are defaulted as, may be selected 2050 etc..
4. the parameter in Modbus Slave is arranged, for simulating the byte data of PLC.
File- > New is clicked, new files are clicked in menu " Setup " " Slave Definition..F2 " and joined Number setting, is selected as " 03HoldingRigster (4x) " for the Function in upper figure, can simulate the byte data of PLC (read-write, it can caching integer data or string data).It clicks File- > Save and saves byte data into file.
5, EDC software uses modbus agreement, establishes connection with Modbus Slave.
6, EDC software uses modbus agreement, reads and writes the data (bit/byte data) in Modbus Slave, with ModbusSlove is communicated, i.e. communication between analog PLC and EDC.
7, communication data frame is checked.
" Communication ... " in " Display " menu is clicked, communication data dialog box can be recalled, for looking into See the data frame of analysis transmitting-receiving.It is as shown in Figure 4:
Two, the present invention also provides a kind of devices that simulation PLC is communicated with AOI, comprising:
Modbus Slave module: plc data is simulated by setting Modbus Slave module parameter;
EDC module: it is arranged in AOI system, is communicated with Modbus Slave module and read Modbus Slave Module parameter, simulative debugging PLC device are communicated with AOI system.
Specific embodiment described herein is only an example for the spirit of the invention.The neck of technology belonging to the present invention The technical staff in domain can make various modifications or additions to the described embodiments or replace by a similar method In generation, however, it does not deviate from the spirit of the invention or beyond the scope of the appended claims.

Claims (10)

1. a kind of method that simulation PLC is communicated with AOI, which is characterized in that it is simulated based on Modbus Slave module, It specifically includes:
Setting Modbus Slave module parameter is for simulating plc data;
The EDC module of AOI system is communicated with Modbus Slave module and is read Modbus Slave module parameter, simulation Debugging PLC equipment is communicated with AOI system.
2. a kind of method that simulation PLC is communicated with AOI according to claim 1, which is characterized in that the PLC number According to including bit data, including setting Modbus tributary address, the selection of register functions code, register initial address and post The continuous number of storage.
3. a kind of method that simulation PLC is communicated with AOI according to claim 1, which is characterized in that the PLC number According to further including byte data, including it is configured to caching integer data or string data.
4. a kind of method that simulation PLC is communicated with AOI according to claim 1, which is characterized in that AOI system EDC module is based on modbus agreement with ModbusSlove and is communicated.
5. a kind of method that simulation PLC is communicated with AOI according to claim 1, which is characterized in that simulative debugging When PLC device is communicated with AOI system, communication data is recalled for checking the data of analysis transmitting-receiving by Modbus Slave module Frame.
6. a kind of device that simulation PLC is communicated with AOI characterized by comprising
Modbus Slave module: plc data is simulated by setting Modbus Slave module parameter;
EDC module: it is arranged in AOI system, is communicated with Modbus Slave module and read Modbus Slave module Parameter, simulative debugging PLC device are communicated with AOI system.
7. a kind of device that simulation PLC is communicated with AOI according to claim 6, which is characterized in that the PLC number According to including bit data, including setting Modbus tributary address, the selection of register functions code, register initial address and post The continuous number of storage.
8. a kind of device that simulation PLC is communicated with AOI according to claim 6, which is characterized in that the PLC number According to further including byte data, including it is configured to caching integer data or string data.
9. a kind of device that simulation PLC is communicated with AOI according to claim 6, which is characterized in that AOI system EDC module is based on modbus agreement with ModbusSlove and is communicated.
10. a kind of device that simulation PLC is communicated with AOI according to claim 6, which is characterized in that simulative debugging When PLC device is communicated with AOI system, communication data is recalled for checking the data of analysis transmitting-receiving by Modbus Slave module Frame.
CN201910160308.5A 2019-03-04 2019-03-04 A kind of method and device that simulation PLC is communicated with AOI Pending CN109884975A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910160308.5A CN109884975A (en) 2019-03-04 2019-03-04 A kind of method and device that simulation PLC is communicated with AOI

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910160308.5A CN109884975A (en) 2019-03-04 2019-03-04 A kind of method and device that simulation PLC is communicated with AOI

Publications (1)

Publication Number Publication Date
CN109884975A true CN109884975A (en) 2019-06-14

Family

ID=66930505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910160308.5A Pending CN109884975A (en) 2019-03-04 2019-03-04 A kind of method and device that simulation PLC is communicated with AOI

Country Status (1)

Country Link
CN (1) CN109884975A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201611379U (en) * 2009-12-02 2010-10-20 杭州国芯科技股份有限公司 Integrated circuit system test device
CN102495580A (en) * 2011-11-25 2012-06-13 中国一冶集团有限公司 Construction field PLC debugging analog device and analog method thereof
CN204404556U (en) * 2014-12-25 2015-06-17 安阳钢铁股份有限公司 A kind of Novel hot-air furnace control system based on MODBUS TCP/IP communication mode
CN107144992A (en) * 2017-06-23 2017-09-08 武汉精测电子技术股份有限公司 Full-automatic LCD detecting and controlling systems and method based on AOI technologies
CN107332897A (en) * 2017-06-26 2017-11-07 武汉精测电子技术股份有限公司 A kind of management system, the method and device of automatic optical detecting system software
CN107920207A (en) * 2017-12-15 2018-04-17 武汉精测电子集团股份有限公司 The image delivering system and method for AOI system are improved based on PPC softwares
CN107979649A (en) * 2017-12-15 2018-05-01 武汉精测电子集团股份有限公司 The more wire body multistation system and methods of AOI based on Inline servers
CN108121290A (en) * 2018-02-06 2018-06-05 广州今宏信息科技有限公司 Virtual emulation debug circuit based on PLC

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201611379U (en) * 2009-12-02 2010-10-20 杭州国芯科技股份有限公司 Integrated circuit system test device
CN102495580A (en) * 2011-11-25 2012-06-13 中国一冶集团有限公司 Construction field PLC debugging analog device and analog method thereof
CN204404556U (en) * 2014-12-25 2015-06-17 安阳钢铁股份有限公司 A kind of Novel hot-air furnace control system based on MODBUS TCP/IP communication mode
CN107144992A (en) * 2017-06-23 2017-09-08 武汉精测电子技术股份有限公司 Full-automatic LCD detecting and controlling systems and method based on AOI technologies
CN107332897A (en) * 2017-06-26 2017-11-07 武汉精测电子技术股份有限公司 A kind of management system, the method and device of automatic optical detecting system software
CN107920207A (en) * 2017-12-15 2018-04-17 武汉精测电子集团股份有限公司 The image delivering system and method for AOI system are improved based on PPC softwares
CN107979649A (en) * 2017-12-15 2018-05-01 武汉精测电子集团股份有限公司 The more wire body multistation system and methods of AOI based on Inline servers
CN108121290A (en) * 2018-02-06 2018-06-05 广州今宏信息科技有限公司 Virtual emulation debug circuit based on PLC

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
XKB1956: "《Modbus RTU Slave协议设备的仿真软件的使用》", 18 March 2011 *
宋长发: "《电子组装技术》", 31 March 2010 *

Similar Documents

Publication Publication Date Title
CN102353865B (en) Automatic testing device and method universally used for multiple bus processor modules
CN105866575B (en) Vehicle-mounted display comprehensive testing device and testing method
CN105068929A (en) Test script generation method, test script generation device, testing method, testing device and testing system
CN104156224B (en) A kind of software building continuous integrating method and system
CN104518924A (en) Method and system for automated test and result comparison
CN102662835B (en) A kind of program debugging method for embedded system and embedded system
CN101488028B (en) System and method for testing CAN bus automobile instrument
CN103809499A (en) Remote Monitoring Systems And Related Methods And Recording Mediums Using The Same
CN104780407A (en) Automatic testing method and automatic testing system for set top box
CN103631688A (en) Method and system for testing interface signal
CN105279092A (en) Software testing method and apparatus
CN102707712B (en) Electronic equipment fault diagnosis method and system
CN109814478B (en) Virtual debugging system based on iOpenWorks
CN102521087A (en) System and method for remotely obtaining real-time graded debugging information of kernel module
CN103062865B (en) Device and method for detecting communication quality of indoor unit and outdoor unit of air-conditioning unit
CN104678292A (en) Test method and device for CPLD (Complex Programmable Logic Device)
CN109884975A (en) A kind of method and device that simulation PLC is communicated with AOI
CN204789978U (en) Smart electric meter trouble snatchs test equipment
CN100391290C (en) Method of testing with integrated test tools
CN202230152U (en) General automatic test device for multibus processor modules
CN102063367B (en) Off-line analysis method and device aiming at computer crash program
CN101539766B (en) Program debugging method and device thereof
CN203573309U (en) Testing structure for embedded system memory
CN104925097A (en) Train display communication test system and method
CN107943008B (en) Automated diagnosis test method based on VT system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination