Mitsubishi Electric MELSENSOR Vision Sensor VS20 Series Connection Manual
PDF
Документ
Реклама
Реклама
Vision Sensor VS20 Connection Guide -VS20M-11F310 -VS20M-12F410 -VS20M-13F410 -VS20C-12F410 -VS20C-13F410 This product was manufactured by Cognex Corporation. *Note that the warranty on this product differs from that on other programmable controller products. SAFETY PRECAUTIONS (Read these precautions before using this product.) Before using this product, please read this manual and the relevant manuals carefully and pay full attention to safety to handle the product correctly. The precautions given in this manual are concerned with this product only. For the safety precautions of the programmable controller system, refer to the user's manual for the CPU module used. In this manual, the safety precautions are classified into two levels: " WARNING" and " CAUTION". WARNING Indicates that incorrect handling may cause hazardous conditions, resulting in death or severe injury. CAUTION Indicates that incorrect handling may cause hazardous conditions, resulting in minor or moderate injury or property damage. Under some circumstances, failure to observe the precautions given under " CAUTION" may lead to serious consequences. Observe the precautions of both levels because they are important for personal and system safety. Make sure that the end users read this manual and then keep the manual in a safe place for future reference. [Installation Precautions] WARNING ● Before touching the Vision Sensor, be sure to touch an electric conductor such as grounded metal to discharge the static electricity from your body. Otherwise, damage or faulty operation of the Vision Sensor may occur. ● Be sure to install the I/O connector module to the main module. If not installed, dust/water-proof performance may not obtained. [Installation Precautions] CAUTION ● IP protection rating is guaranteed only when all the connectors are connected with cables or sealed with sealing caps. ● The cable is designed to connect with its key aligned with the keyway of the connector on the Vision Sensor. It may be damaged if you try to connect it forcibly. [Wiring Precautions] CAUTION ● Use only 24 V DC and observe the indicated polarity. Otherwise, fire or damage may result. ● The frame ground terminal of the I/O module and the shield ground of each connector (RS232 OUT port and SENSOR port) are internally conducting. The system ground is designed on the condition that a ground connection is provided. The ground potential may affect the vision system and peripheral devices such as sequencer via cables. For safe operation, it is recommended to connect all the ground connections securely. 1 [Startup and Maintenance Precautions] CAUTION ● Do not clean the Vision Sensor VS20 with highly irritating or corrosive solvent such as caustic alkali solution, methyl ethyl ketone (MEK), and gasoline. Doing so may cause a fault. 2 CONTENTS SAFETY PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 CHAPTER 1 1.1 THE SLMP SCANNER CONNECTION 4 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Example of system configuration for connecting the vision sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Basic Operations of the SLMP Scanner Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Basic operation flow of the SLMP scanner connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Basic operations of the SLMP scanner connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Data blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Timing chart of the SLMP scanner connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.3 Vision Sensor Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.4 Setting the Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.5 Execute Programmable Controller and Vision Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 1.6 Checking Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 CONTENTS Connecting and wiring of the vision sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2 Make the vision sensor online . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Set the trigger to the vision sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Check inspection results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.7 Contents in Data Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 CHAPTER 2 2.1 I/O CONNECTION 29 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Example of system configuration for connecting the vision sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Connecting and wiring of the vision sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.2 Vision Sensor Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.3 Setting the Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 2.4 Execute Programmable Controller and Vision Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 2.5 Checking Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Make the vision sensor online . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Set the trigger to the vision sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Check inspection results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 REVISIONS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 TRADEMARKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46 3 1 THE SLMP SCANNER CONNECTION 1.1 Introduction This chapter describes the procedures for connecting the Vision Sensor VS20 to a MELSEC programmable controller and controlling the vision sensor with a SLMP Scanner Connection. Example of system configuration for connecting the vision sensor Personal computer (GX Works3/In-Sight Explorer) Ethernet cable USB cable MELSEC iQ-R Programmable controller Ethernet cable Switching hub Vision sensor main unit 24 V DC power supply Power supply Ethernet cable (COGNEX product) 4 1 THE SLMP SCANNER CONNECTION 1.1 Introduction Power and I/O breakout cable (COGNEX product) 100 V power supply Required modules and devices 1 ■Mitsubishi Electric products MELSEC iQ-R Programmable controller • CPU module: R04CPU Vision Sensor VS20 • VS20M-13F410 GX Works3 (Engineering software for programmable controller) In-Sight Explorer (Setup tool for Vision Sensor) ■COGNEX products Ethernet cable Power and I/O breakout cable ■Commercial products Switching hub Ethernet cable USB cable 24 V DC power supply 1 THE SLMP SCANNER CONNECTION 1.1 Introduction 5 Connecting and wiring of the vision sensor 1. 2. 3. Verify that the 24 V DC power supply being used is unplugged and not receiving power. Optionally, connect the I/O or serial wires to an appropriate device (for example, a programmable controller). Attach the power and I/O breakout cable’s [24 V DC] (Red wire) and [GND] (Black wire) to the corresponding terminals on the power supply. 4. Connect the power and I/O breakout cable’s M12 connector to the vision sensor’s power, I/O and RS-232 connector. 5. Turn on the 24 V DC power supply switch. Precautions • When connecting the vision sensor and programmable controller, simultaneously turn on the vision sensor and programmable controller, or first turn on the programmable controller. • Cut unused wires or protect them with insulating materials. Keep all bare wires separated from the 24 V DC wire. • All cable connectors are “keyed” to fit the connectors on the vision sensor. Do not force the connections or damage may occur. 6 1 THE SLMP SCANNER CONNECTION 1.1 Introduction 1.2 Basic Operations of the SLMP Scanner Connection 1 Basic operation flow of the SLMP scanner connection Programmable controller Vision sensor Reading control area Reading CPU device Set poll interval Reading CPU device Reading control area Set the trigger instruction Bit of CPU device to ON with the programmable controller Trigger ON Reading control area Import Updating the status bit block and output word block Inspection While the trigger is on, communication between data import and the completion of inspection is performed regardless of the poll interval. Reading the control area using the vision sensor and accepting the trigger Writing status Writing status Updating the status bit block and output word block Writing inspection results Updating the status bit block and output word block Reading control area The vision sensor sends the inspection results, and the “Inspection Completed” status and the “Results Valid” status. Basic operations of the SLMP scanner connection In the SLMP Scanner Connection, the vision sensor reads control bit blocks from the programmable controller at the poll interval set with In-Sight Explorer, and the processing is performed responding to the change of the bit information in the control bit blocks. The processing status is written to the corresponding bit in the status bit block. To control the vision sensor, assign the devices of the programmable controller to each of the defined data blocks (including control bit blocks) and use them. The following shows the functions of six data blocks. Data Blocks Contents Control bit block This block is used to perform control instructions (such as trigger) to the vision sensor, using bit information. The vision sensor is controlled by turning on and off the devices set to the control bit block using the programmable controller. Status bit block This block indicates the status of the vision sensor, and can be checked with bit information. Input word block This block is used to input application data (including parameters for inspection) from the programmable controller, and uses word information. Output word block The vision sensor uses this block to output application data (including inspection results) to the programmable controller. This block uses word information. String command word block This block is used to set commands (string commands) to control the vision sensor. This block uses word information. String command result word block This block is used to output the results controlled by the commands. This block uses word information. The next section shows the data blocks and the timing chart of the SLMP Scanner Connection. 1 THE SLMP SCANNER CONNECTION 1.2 Basic Operations of the SLMP Scanner Connection 7 Data blocks The following shows the six data blocks defined to control the vision sensor. Control Bit Blocks Bit 7 Bit 6 Set Offline Reserved Bit 5 Bit 15 Bit 14 Bit 22 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Execute Command Inspection Results Ack Buffer Results Enable Trigger Trigger Enable Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 21 Bit 20 Bit 19 Bit 18 Bit 17 Bit 16 Clear Exposure Complete Clear Error Initiate String Command Set User Data Reserved Bit 23 Reserved Bit 31 Bit 30 Bit 29 Bit 28 Bit 27 Bit 26 Bit 25 Bit 24 Soft Event 7 Soft Event 6 Soft Event 5 Soft Event 4 Soft Event 3 Soft Event 2 Soft Event 1 Soft Event 0 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Missed Acq Reserved Trigger Ack Trigger Ready Status Bit Blocks Bit 7 Bit 6 Online Offline Reason Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Error Command Failed Command Completed Command Executing Results Valid Results Buffer Overrun Inspection Completed System Busy Bit 23 Bit 22 Bit 21 Reserved Bit 20 Bit 19 Bit 18 Bit 17 Bit 16 Job Pass Exposure Complete String Command Error String Command Ack Set User Data Ack Bit 31 Bit 30 Bit 29 Bit 28 Bit 27 Bit 26 Bit 25 Bit 24 Soft Event Ack 7 Soft Event Ack 6 Soft Event Ack 5 Soft Event Ack 4 Soft Event Ack 3 Soft Event Ack 2 Soft Event Ack 1 Soft Event Ack 0 Input Word Blocks Word 0 Word 1 Word 2..N Command Reserved User Data Output Word Blocks Word 0 Word 1 Word 2 Word 3 Word 4 Word 5..N Current Job ID Error Code Acquisition ID Inspection ID Inspection Result Code Inspection Results String Command Word Blocks Word 0 Word 1..N String Command Length String Command String Command Result Word Blocks 8 Word 0 Word 1 Word 2..N Result Code String Command Result Length String Command Result 1 THE SLMP SCANNER CONNECTION 1.2 Basic Operations of the SLMP Scanner Connection For details of the data block functions to control the vision sensor, refer to In-Sight Explorer's HELP. Set “SLMP” as a keyword in HELP and refer to the explanation of data blocks. 1 1 THE SLMP SCANNER CONNECTION 1.2 Basic Operations of the SLMP Scanner Connection 9 Timing chart of the SLMP scanner connection The following shows a timing chart when [Trigger] of the control bit block is turned on from the programmable controller. To enable the trigger from the programmable controller, turn on [Trigger Enable] of the control bit block. When [Trigger] of the control bit block is turned on from the programmable controller while [Trigger Ready] of the status bit block is on, the status of the vision sensor is output to [Trigger Ack], [Acquiring], [System Busy], and [Inspection Completed] by the status bit block. [Inspection Completed] changes (toggles) the status at every completion. Turn ON/OFF with the programmable controller (Program). Trigger Enable Trigger Turn ON/OFF the vision sensor automatically. Trigger Ready Trigger Ack Read image processing Processing Processing System Busy Inspection Completed When the inspection is completed, the ON/OFF status is inverted. • Program example Program example is shown below. 10 1 THE SLMP SCANNER CONNECTION 1.2 Basic Operations of the SLMP Scanner Connection 1.3 Vision Sensor Setting 1 Setting an IP address to the personal computer Set the IP address 192.168.3.3 to the personal computer. Connecting of the vision sensor Start In-Sight Explorer to set the vision sensor. 1. Start the In-Sight Explorer software. Click [Add]. 2. Add the vision sensor to the network. Set the sensor and device to the network as shown left. • IP Address: 192.168.3.1 • Subnet Mask: 255.255.255.0 Click [Apply]. 1 THE SLMP SCANNER CONNECTION 1.3 Vision Sensor Setting 11 3. Connect to the vision sensor. Click [Connect] to connect to the vision sensor. 12 1 THE SLMP SCANNER CONNECTION 1.3 Vision Sensor Setting Creating a new job 1. 1 Create a new job. As an example, configure the setting of an inspection to see if there is a “CE” mark on the inspection object. Select [New Job]. 2. Adjust the lens so that the lens captures an inspection target in [Set Up Image], and configure the settings to acquire the image. Select [Set Up Image]. Select [Live Video] to adjust the image. After adjusting the image, select [Live Camera] again. Select “Industrial Ethernet”. 1 THE SLMP SCANNER CONNECTION 1.3 Vision Sensor Setting 13 3. Set a tool. Select [Locate Part]. Select “Pattern”. 4. Set a model on the position to be detected. Set the model. (Select “CE” mark) Click [OK]. 14 1 THE SLMP SCANNER CONNECTION 1.3 Vision Sensor Setting Communication setting 1. 1 Configure the communication setting (SLMP scanner). Select [Communication]. Select [Add Device]. 2. Add the SLMP Scanner to the communication. Configure the device setting as shown left. • Device: PLC/Motion Controller • Manufacturer: Mitsubishi • Protocol: SLMP Scanner Click [OK]. 1 THE SLMP SCANNER CONNECTION 1.3 Vision Sensor Setting 15 3. Set the SLMP Scanner. Configure the settings as shown left. • Controller Type: iQ-R/Q/L Series (3E Frame) • IP Address: 192.168.3.2 • Host Port: 12289 (Port No. of the Ethernet parameter set in GX Works3) • Timeout (ms): 1000 • Poll interval (ms): 100 • SLMP response from the programmable controller may be delayed due to on-line operation to the programmable controller, etc., making connections disconnected in some cases, so ensure a sufficient margin for the timeout time. • Shortening the poll interval also shortens the interval to monitor the programmable controller status. Assigning devices 16 1 THE SLMP SCANNER CONNECTION 1.3 Vision Sensor Setting Select [Device Addressing]. Set a selected device, offset, and the number of devices to each of the six data blocks as shown left. For control contents of when the device is assigned to each data block, refer to Page 25 Contents in data blocks. Outputting to the programmable controller 1. 1 Set data to be output from the vision sensor to the programmable controller. As an example, set PASS, FAIL, and the number of inspection to the output word block (D1015 to D1017). Click [Add]. 2. Select the data to be output to the programmable controller. Select “Pattern_1 inspection result (PASS/FAIL)”. Select “Job.Inspection_Count”. Click [OK]. 3. Display the output result to the programmable controller. Device Address: D1015 to D1017 Message size (words): 3 Items corresponding to the device address can be changed by using the [Up] and [Down]. As an example, sort as above for easy viewing. 1 THE SLMP SCANNER CONNECTION 1.3 Vision Sensor Setting 17 Saving the job 1. Name the created job. Select [Save Job]. Click [Save As...]. 2. Input the file name and save the job. Set “1TestSLMP” in “File name”. Click [Save]. 18 1 THE SLMP SCANNER CONNECTION 1.3 Vision Sensor Setting 1.4 Setting the Programmable Controller 1 Setting the programmable controller Start GX Works3 to set the programmable controller. 1. Start GX Works3. Start GX Works3 and create a new project. On the newly created screen, configure the settings as shown left. Series: RCPU Type: R04 Program Language: Ladder Click [OK]. Click [OK]. 1 THE SLMP SCANNER CONNECTION 1.4 Setting the Programmable Controller 19 2. Configure the parameter settings. Double-click [Module Parameter] in the Navigation window. Set [Module Parameter] of R04CPU as shown left. IP Address: 192.168.3.2 Enable/Disable Online Change: Enable All (SLMP) Communication Data Code: Binary Click [External Device Configuration]. 3. Configure the Open setting. 20 1 THE SLMP SCANNER CONNECTION 1.4 Setting the Programmable Controller Select “SLMP Connection Module” from the module list and paste by drag&drop. Select “TCP” in “Protocol”. Input “12289” to “Port No.”. Click [Close with Reflecting the Setting]. 4. End Setting. Click [Apply] and end the settings. 1 The user has to set parameters for communication for the programmable controller, and does not need to create a program for communication. 1 THE SLMP SCANNER CONNECTION 1.4 Setting the Programmable Controller 21 1.5 Execute Programmable Controller and Vision Sensor Execute the programmable controller 1. Start the programmable controller. Click [Write to PLC]. 2. Write the parameters. Select [Parameter + Program]. Click [Execute]. After writing the parameters is completed, reset and run the programmable controller. Execute the vision sensor Turn OFFON the power supply of the vision sensor and restart it. 22 1 THE SLMP SCANNER CONNECTION 1.5 Execute Programmable Controller and Vision Sensor 1.6 Checking Operations 1 Control the vision sensor using the programmable controller and check the operations. Make the vision sensor online Make the vision sensor online and start the communication with the programmable controller. Select [Communication]. Select [Online]. Check that “Connected.” is displayed for the SLMP Scanner. Set the trigger to the vision sensor Set the trigger to the vision sensor, and acquire inspection results. Open [Online][Monitor][Device/Buffer Memory Batch Monitor] in GX Works3 to display devices. 1. Display devices. Input “D1000” in [Device Name] and monitor the contents of the data block. 1 THE SLMP SCANNER CONNECTION 1.6 Checking Operations 23 2. Set the trigger. To enable the trigger from the programmable controller, turn “ON” the “Network Trigger Enable” bit (D1000.0) of the control bit block. When the “Network Trigger Enable” bit (D1000.0) is “OFF”, the vision sensor does not operate even though the trigger is ON. Check inspection results Check inspection results. Turn “ON” the “Trigger” bit (D1000.1) of the control bit block. (a) Inspection Completed: The vision sensor is triggered and an search result is output. As the inspection result, the format output data set with the SLMP Scanner of In-Sight Explorer is output. (b) D1015 = Pattern_1 PASS (c) D1016 = Pattern_1 FAIL (d) D1017 = Inspection count When the inspection is completed, the “Inspection Completed” bit (D1002.9) of the status bit block changes (toggles). To set the trigger to the vision sensor again, turn “ON” D1000.1. (a) (b) (c) 24 1 THE SLMP SCANNER CONNECTION 1.6 Checking Operations (d) 1.7 Contents in Data Blocks 1 Contents in data blocks Set a start device and the number of devices to each data block with In-Sight Explorer. The start device types (such as D, M, and X) and the start devices can be changed. The number of devices, excluding the ones for the control bit block and status bit block, can be changed. The control details set to each data block are fixed in the system. The following shows the control details of the six data blocks where devices have been assigned. Function Start device Number of devices Control bit block (Control) D1000 2 Status bit block (Status) D1002 2 Input word block (Input block) Output word block (Output block) D1010 8 String command word block (Command) String command result word block (Command result) 1 THE SLMP SCANNER CONNECTION 1.7 Contents in Data Blocks 25 ■Device assignment to be used control bit block Classification Device Control details (Application) Supplement Control bit block D1000.0 Network Trigger Enable The trigger is enabled by turning on this “trigger” bit and is disabled by clearing this bit. D1000.1 Trigger The following conditions need to be satisfied to enable the trigger. • The vision sensor is online when the Network Trigger Enable bit is on. • In the setting of In-Sight Explorer, “Industrial Ethernet” is set for the [Trigger] parameter. D1000.2 Buffer Result Enable D1000.3 Inspection Result ON Acknowledgment D1000.4 Job Load Trigger D1000.5 Reserved Store an ID of the job to be loaded to the Job Load ID of the input word block and turn it on. D1000.6 D1000.7 SetOffline D1000.8 Reserved The vision sensor goes offline when this bit is turned on. D1000.9 D1000.A D1000.B D1000.C D1000.D D1000.E D1000.F D1001.0 Set User Data D1001.1 Send Native Mode Command D1001.2 Clear Error D1001.3 Clear Image Complete Signal D1001.4 Reserved This bit turns offon when the user data of the input word block is updated. The error code of the output word block is cleared when this bit turns ON. D1001.5 D1001.6 D1001.7 26 D1001.8 Soft Event 0 Trigger It cannot be used with this model. D1001.9 Soft Event 1 Trigger It cannot be used with this model. D1001.A Soft Event 2 Trigger It cannot be used with this model. D1001.B Soft Event 3 Trigger It cannot be used with this model. D1001.C Soft Event 4 Trigger It cannot be used with this model. D1001.D Soft Event 5 Trigger It cannot be used with this model. D1001.E Soft Event 6 Trigger It cannot be used with this model. D1001.F Soft Event 7 Trigger It cannot be used with this model. 1 THE SLMP SCANNER CONNECTION 1.7 Contents in Data Blocks ■Device assignment to be used status bit block Classification Device Control Details (Application) Supplement Status Bit Blocks D1002.0 Network Trigger Ready This bit turns on when the trigger can be input. D1002.1 Trigger ON Acknowledgment This bit notifies that the trigger ON is acknowledged. This bit remains ON until the “trigger” bit is cleared. D1002.2 Reserved D1002.3 Importing Failed This bit turns on when importing an image failed. This bit is cleared when importing an image is properly completed. D1002.4 Offline Reason 0: Online status 1: Offline operation from the program 2: Offline operation from the discrete signal input 3: Offline operation from the communication D1002.7 Online This bit turns on when the vision sensor is online. D1002.8 System Busy This bit turns on during inspection processing. D1002.9 Inspection Completed This bit changes (toggles) the status when inspection is completed. D1002.5 D1002.6 D1002.A Result Buffer Overrun D1002.B Results Valid D1002.C Job Loading D1002.D Job Load Complete D1002.E Job Load Failed D1002.F Fault D1003.0 Set User Data Trigger Acknowledgment D1003.1 Send Native Mode Command Trigger Acknowledgment D1003.2 Native Mode Command Error D1003.3 Imaging Completed D1003.4 Job Pass 1 It cannot be used with this model. It cannot be used with this model. D1003.5 D1003.6 D1003.7 D1003.8 Soft Event 0 Trigger Acknowledgment It cannot be used with this model. D1003.9 Soft Event 1 Trigger Acknowledgment It cannot be used with this model. D1003.A Soft Event 2 Trigger Acknowledgment It cannot be used with this model. D1003.B Soft Event 3 Trigger Acknowledgment It cannot be used with this model. D1003.C Soft Event 4 Trigger Acknowledgment It cannot be used with this model. D1003.D Soft Event 5 Trigger Acknowledgment It cannot be used with this model. D1003.E Soft Event 6 Trigger Acknowledgment It cannot be used with this model. D1003.F Soft Event 7 Trigger Acknowledgment It cannot be used with this model. ■Device Assignment to be Used Output Word Blocks Classification Device Control Details (Application) Output Word Blocks D1010 Loaded Job ID D1011 Error Code D1012 Image Import ID D1013 Inspection Result ID D1014 Image Inspection Result Code D1015 to D1021 Inspection Result Supplement These devices store the data that has been specified with the format output data and is to be output from the vision sensor. In this example these are as shown below. • D1015: Pattern_1.PASS • D1016: Pattern_1.FAIL • D1017: Job Inspection Count 1 THE SLMP SCANNER CONNECTION 1.7 Contents in Data Blocks 27 MEMO 28 1 THE SLMP SCANNER CONNECTION 1.7 Contents in Data Blocks 2 2.1 I/O CONNECTION Introduction 2 This chapter describes the procedures for connecting the Vision Sensor VS20 to a MELSEC programmable controller and controlling the vision sensor with I/O. Example of system configuration for connecting the vision sensor Personal computer (GX Works3/In-Sight Explorer) Ethernet cable USB cable MELSEC iQ-R Programmable controller Switching hub I/O Vision sensor main unit 24 V DC power supply Power supply Ethernet cable (COGNEX product) Power and I/O breakout cable (COGNEX product) 100 V power supply 2 I/O CONNECTION 2.1 Introduction 29 Required modules and devices ■Mitsubishi Electric products MELSEC iQ-R Programmable controller • CPU module: R04CPU • Input module: RX40C7 • Output module: RY40NT5P Vision Sensor VS20 • VS20M-13F410 GX Works3 (Engineering software for programmable controller) In-Sight Explorer (Setup tool for Vision Sensor) ■COGNEX products Ethernet cable Power and I/O breakout cable ■Commercial products Switching hub 30 2 I/O CONNECTION 2.1 Introduction Ethernet cable USB cable 24 V DC power supply Connecting and wiring of the vision sensor Ethernet cable connection 1. Connect the Ethernet cable’s M12 connector to the vision sensor’s Ethernet connector. 2. Connect the Ethernet cable’s RJ-45 connector to the switching hub or personal computer, as applicable. 2 2 I/O CONNECTION 2.1 Introduction 31 Connect the power and I/O breakout cable Precautions • When connecting the vision sensor and programmable controller, simultaneously turn on the vision sensor and programmable controller, or first turn on the programmable controller. • Cut unused wires or protect them with insulating materials. Keep all bare wires separated from the 24 V DC wire. 1. 2. Verify that the 24 V DC power supply being used is unplugged and not receiving power. Connect the wires of the power and I/O breakout cable, I/O module and power supply as shown below. Trigger (Orange) General input 0 (Violet) High-speed output 0 (Blue) High-speed output 1 (Grey) High-speed output 2 (Yellow) High-speed output 3 (White/Brown) Input common (White/Violet) Output common (Green) 24 V DC (Red) GND (Black) Power and I/O breakout cable 24 V DC power supply 32 3. Connect the power and I/O breakout cable’s M12 connector to the vision sensor’s Power, I/O and RS-232 connector. 4. Turn on the 24 V DC power supply switch. 2 I/O CONNECTION 2.1 Introduction 2.2 Vision Sensor Setting Setting an IP address to the personal computer 2 Set the IP address 192.168.3.3 to the personal computer. Connecting of the vision sensor Start In-Sight Explorer to set the vision sensor. 1. Start the In-Sight Explorer software. Click [Add]. 2. Add the vision sensor to the network. Add the sensor and device to the network as shown left. • IP Address: 192.168.3.1 • Subnet Mask: 255.255.255.0 Click [Apply]. 2 I/O CONNECTION 2.2 Vision Sensor Setting 33 3. Connect to the vision sensor. Click [Connect] to connect to the vision sensor. 34 2 I/O CONNECTION 2.2 Vision Sensor Setting Creating a new job 1. Create a new job. As an example, configure the setting of an inspection to see if there is a “CE” mark on the inspection object. Select [New Job]. 2 2. Adjust the lens so that the lens captures an inspection target in [Set Up Image], and configure the settings to acquire the image. Select [Set Up Image]. Select [Live Video] to adjust the image. After adjusting the image, select [Live Video] again. Set the type of trigger to “Camera”. 2 I/O CONNECTION 2.2 Vision Sensor Setting 35 3. Set a tool. Select [Locate Part]. Select [Pattern]. 4. Set a model on the position to be detected. Set the model. (Select “CE” mark) Click [OK]. 5. Set the name of the set pattern. Input an arbitrary name in the tool name. (In this guide it will remain the default “Pattern_1”.) 36 2 I/O CONNECTION 2.2 Vision Sensor Setting Inputting from the programmable controller Set the input data from the programmable controller. Select [Inputs]. Set the Direct 0 signal type to “Online/Offline”. 2 Outputting to the programmable controller 1. Set the data to be output to the programmable controller. Select [Outputs]. Check [De-Energize While Offline]. Configure the settings for Direct 0 to 2 as shown left. Click [Details] of Direct 3. 2. Set output details. Set the ON time of the signal to turn ON when processing is completed. • Range: 1-1000 ms Click [OK]. 2 I/O CONNECTION 2.2 Vision Sensor Setting 37 Saving the job 1. Name the created job and save it. Select [Save Job]. Check [Start the Sensor in Online Mode]. Click [Save As]. 2. Input the file name and save the job. Set any file name. Click [Save]. 38 2 I/O CONNECTION 2.2 Vision Sensor Setting 2.3 Setting the Programmable Controller Setting the programmable controller 2 Start GX Works3 to set the programmable controller. 1. Start GX Works3. Start GX Works3 and create a new project. On the newly created screen, configure the settings as shown left. Series: RCPU Type: R04 Click [OK]. Click [OK]. 2 I/O CONNECTION 2.3 Setting the Programmable Controller 39 2. Configure the parameter settings. Double-click “System Parameter” in the Navigation window. 3. Set I/O module. Select [I/O Assignment Setting]. Set “RX40C7” for slot 0 and “RY40NT5P” for slot 1. Click [OK]. 40 2 I/O CONNECTION 2.3 Setting the Programmable Controller Creating program As applicable, create a program using the following I/O signals. Signal Signal Name Contents Remarks X0 Pattern_1 PASS It turns on when the captured image matches the model (feature) set in Pattern_1. ON: Pattern match OFF: Pattern mismatch or capture not implemented When the vision sensor is not in the online status, this signal turns off. X1 Pattern_1 FAIL It turns on when the captured image differs from the model (feature) set in Pattern_1. ON: Pattern mismatch OFF: Pattern match or capture not implemented When the vision sensor is not in the online status, this signal turns off. X2 Online It turns on when the vision sensor is online. ON: Online OFF: Offline, or discrete online X3 Job completion It turns ON for the set time when image capture processing is completed. For the setting of ON time, refer to Page 37 Outputting to the programmable controller. Y10 Trigger When the trigger setting of the vision sensor is set to [Camera], image capture is executed with OFFON. To execute again, please set it to ONOFF once, then OFFON. It becomes enabled only when the vision sensor is online. Y12 Online request Turn on when making the vision sensor online in discrete online status. Turn off when making the vision sensor the discrete online status. If the vision sensor is in the offline status, it will not go online even if it is turned on. 2 The timing chart is shown below. Online request (Y12) Turn ON/OFF with the programmable controller (Program). Trigger (Y10) Turn ON/OFF the vision sensor automatically. Online status (X2) Import/inspection processing of the vision sensor image Processing (1) Processing (1) Job end (X3) Pattern_1 PASS (X0) Pattern_1 FAIL (X1) Match Mismatch (1) Turn on the set time. 2 I/O CONNECTION 2.3 Setting the Programmable Controller 41 • Program example Program example is shown below. The CPU devices used in the program example are as follows. For the I/O signals, refer to the previous page. 42 Signal Signal Name Contents Remarks M0 Online command During the on status, Y12 turns on, becoming the online status. M1 Trigger directive At OFFON, Y10 is turned ON, and image capture is executed. M10 Pattern_1 PASS It turns on when the captured image matches the model (feature) set in Pattern_1. ON: Pattern match OFF: Pattern mismatch, or capture not implemented It becomes the same status as X0. M11 Pattern_1 FAIL It turns on when the captured image differs from the model (feature) set in Pattern_1. ON: Pattern match OFF: Pattern mismatch, or capture not implemented It becomes the same status as X1. 2 I/O CONNECTION 2.3 Setting the Programmable Controller 2.4 Execute Programmable Controller and Vision Sensor 2 Execute the programmable controller 1. Start the programmable controller. Click [Write to PLC]. 2. Write the parameters. Select [Parameter + Program]. Click [Execute]. After writing the parameters is completed, reset and run the programmable controller. Execute the vision sensor Turn OFFON the power supply of the vision sensor and restart it. 2 I/O CONNECTION 2.4 Execute Programmable Controller and Vision Sensor 43 2.5 Checking Operations Control the vision sensor using the programmable controller and check the operations. Make the vision sensor online Turn on the programmable controller online command (M0) and shift the vision sensor from the discrete online status to the online status. Set the trigger to the vision sensor Turn on the trigger command (M1) of the programmable controller and trigger it to the vision sensor. Check inspection results Pattern_1 PASS (M10) turns on if the inspection subject matches the model set in Pattern_1, and Pattern_1 FAIL (M11) turns on if the inspection subject does not match. Open [Online][Monitor][Device/Buffer Memory Batch Monitor] in GX Works3 to display devices. Input “M0” in [Device Name]. Check M10 and M11. 44 2 I/O CONNECTION 2.5 Checking Operations REVISIONS *The manual number is given on the bottom left of the back cover. Revision date * Manual number Description June 2017 BCN-P5999-0861-A First edition Japanese manual number: BCN-P5999-0860-A This manual confers no industrial property rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual. 2017 MITSUBISHI ELECTRIC CORPORATION 45 TRADEMARKS The following are registered trademarks of Cognex Corporation: Cognex, 2DMAX, Advantage, AlignPlus, Assemblyplus, Check it with Checker, Checker, Cognex Vision for Industry, Cognex VSOC, CVL, DataMan, DisplayInspect, DVT, EasyBuilder, Hotbars, IDMax, In-Sight, Laser Killer, MVS-8000, OmniView, PatFind, PatFlex, PatInspect, PatMax, PatQuick, SensorView, SmartView, SmartAdvisor, SmartLearn, UltraLight, Vision Solutions, VisionPro, VisionView The following are trademarks of Cognex Corporation: The Cognex logo, 1DMax, 3D-Locate, 3DMax, BGAII, CheckPoint, Cognex VSoC, CVC-1000, FFD, iLearn, In-Sight (design insignia with cross-hairs), In-Sight 2000, InspectEdge, Inspection Designer, MVS, NotchMax, OCRMax, PatMax RedLine, ProofRead, SmartSync, ProfilePlus, SmartDisplay, SmartSystem, SMD4, VisiFlex, Xpand Ethernet is a registered trademark of Fuji Xerox Co., Ltd. in Japan. The company names, system names and product names mentioned in this manual are either registered trademarks or trademarks of their respective companies. In some cases, trademark symbols such as '' or '' are not specified in this manual. 46 BCN-P5999-0861-A Cognex Corporation www.cognex.com BCN-P5999-0861-A(1706) HEAD OFFICE : TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN NAGOYA WORKS : 1-14 , YADA-MINAMI 5-CHOME , HIGASHI-KU, NAGOYA , JAPAN When exported from Japan, this manual does not require application to the Ministry of Economy, Trade and Industry for service transaction permission. Specifications subject to change without notice. ">
/
Изтегляне
Само приятелско напомняне. Можете да видите документа точно тук. Но най-важното е, че нашият AI вече го е прочел. Той може да обясни сложни неща на прост език, да отговори на вашите въпроси на всеки език и да ви помогне бързо да навигирате дори в най-дългите или най-сложните документи.
Реклама