356GB High-speed, High-capacity Machine Vision System CV-X Series Easy Setup Guide Control/Communication PLC-Link (MELSEC Q Series)
Contents Easy Setup Guide: Control/Communication PLC-Link (MELSEC Q Series) 1. Establishing the PLC-Link (Ethernet PLC-Link) (Built-in Ethernet Port) Page 3 2. Establishing the PLC-Link (Ethernet PLC-Link) (via Link Unit) Page 6 3. Establishing the PLC-Link (RS-232C PLC-Link) Page 10 4. Outputting the Measured Value/Judged Value (PLC-Link) Page 13 5. Controlling the Controller (PLC-Link) Page 16 Trademarks Product names, etc.
1. Establishing the PLC-Link (Ethernet PLC-Link) [MELSEC Q Series (Built-in Ethernet Port)] ✎Checking the Global Settings of the CV-X Series This section describes how to establish the PLC‐Link. [Important] If it fails, establish a one-to-one connection between the PLC and CV-X, and follow this manual to configure the settings and check the operations. Confirm that it operates properly, and change settings if necessary.
✎Configuring the Settings of the Q Series (Example of GX Works2) 1 2 3 Start GX Works2, and select [Project] > [New project]. Select "QCPU(Q mode)" for "Series" and a model*2 to use for "Type", and then press the "OK" button. *1 Programmable Controller *2 Select a model described in the CV-X user's manual. From [Navigation] on the left side of the screen, double-click [Parameter] > PLC Parameter]. ① ④ ② ③ In [Q Parameter Setting] > [Built-in Ethernet Port Setting], configure the following settings.
4 5 Select [Online] > [Write to PLC], check the target checkbox and press "Execute". Restart both the CV-X Series and the MELSEC Q Series. * Start the MELSEC Q Series first, and then start the CV‐X Series. If "Initializing PLC- Link..." appears on the lower left of the screen and disappears immediately, it indicates that the link has been established successfully. If the link establishment has failed, the message "Initializing PLC- Link...
2. Establishing the PLC-Link (Ethernet PLC-Link) [MELSEC Q Series (via Link Unit)] ✎Checking the Global Settings of the CV-X Series This section describes how to establish the PLC‐Link. [Important] If it fails, establish a one-to-one connection between the PLC and CV-X, and follow this manual to configure the settings and check the operations. Confirm that it operates properly, and change settings if necessary.
✎Configuring the Settings of the Q Series (Example of GX Works2) 1 2 3 Start GX Works2, and select [Project] > [New project]. Select "QCPU(Q mode)" for "Series" and a model*2 to use for "Type", and then press the "OK" button. *1 Programmable Controller *2 Select a model described in the CV-X user's manual. Select [Diagnostics] > [System Monitor]. Check the "Start I/O" address of the link unit for PLC-Link (used in step 4). KEYENCE CORPORATION. Vision System Division ‐7‐ www.keyence.
4 From [Navigation] on the left side of the screen, double-click [Parameter] > [Network Parameter] > [Ethernet/CC IE/MELSECNET]. Configure the following settings in [Network Parameter - Ethernet/CC IE/MELSECNET Module Configuration]. 1. Select "Ethernet" for [Network Type]. 2. Set [Start I/O No.] to the "Start I/O" address checked in step 3 on the previous page. Enter desired values for the other parameters, and select [Operation Setting] to go to [Ethernet Operation Setting].
6 Restart both the CV-X Series and the MELSEC Q Series. * Start the MELSEC Q Series first, and then start the CV‐X Series. If "Initializing PLC- Link..." appears on the lower left of the screen and disappears immediately, it indicates that the link has been established successfully. If the link establishment has failed, the message "Initializing PLCLink... *" appears repeatedly, and the error message "Failed to establish a link with the PLC" appears.
3. Establishing the PLC-Link (RS-232C PLC-Link) [MELSEC Q Series] ✎Checking the Global Settings of the CV-X Series This section describes how to establish the PLC‐Link. [Important] If it fails, follow this manual to configure the settings and check the operations. Confirm that it operates properly, and change settings if necessary. 1 On the "Global" menu, select [Communications & I/O] > [PLC-Link]. Configure the PLC‐Link settings.
✎Configuring the Q Series Settings 1 2 3 Start GX Works2, and select [Project] > [New project]. Select "QCPU(Q mode)" for "Series" and a model*2 to use for "Type", and then press the "OK" button. *1 Programmable Controller *2 Select a model described in the CV-X user's manual. In "Navigation" on the left side of the screen, right-click [Intelligent Function Module], and select [New Module]. Enter the information of the unit to add, and press "OK".
4 From [Navigation] on the left side of the screen, double-click [Intelligent Function Module] > [Link Unit Name] > [Switch Setting]. Configure the switch settings. Data Bit: 8 Parity Bit: Exist Even/odd parity: Even Sum check code: Exist Online Change: Enable Setting modifications: Enable Communication rate setting: 115200bps Communication protocol setting: MC protocol (Format 5) 5 Select [Online] > [Write to PLC], check the target checkbox and press "Execute".
4. Outputting the Measured Value/Judged Value (PLC-Link) [MELSEC Q Series] ✎Configuring the Output Settings Set the measured values/judged values to output in "Output Settings". This section describes how to assign tool measurement values/judgment values. (In the description, the following are output: 1: Total Status Value, 2: T100: Pattern Search. Pattern X Position Result, 3: T100: Pattern Search. Pattern XY Position Result, 4: T101: Area. Area Result, 5: T102: OCR.
✎Checking the Output Format/Flow for the Data Memory 1 Check the data memory and word count to use for the result output. Use "Result Output Address", "Result Ready Address" and "Result Ack Address" in [Global] > [Communications & I/O] > [PLC‐Link]. - Result Output Address: Specify the first data memory for the result data output by CV‐X. * The result data is stored starting from this address by 2 words per data item (2 words per character).
3 Representative data output procedure Operations of data output procedure depending on "Result Output Settings" configured in step 1 1. When both "Acknowledge result output completion" and "Enable Handshake" are checked Follows the above procedure, and guarantees that all result data output from CV‐X is sent to PLC. However, if the PLC repeats measurement without controlling Result Ack Address (bit), the output buffer of CV‐X overflows, and trigger input becomes impossible. 2.
5. Controlling the Controller (PLC-Link) [MELSEC Q Series] ✎Checking the Global Settings of the CV-X Series 1 On the "Global" menu, select [Communications & I/O] > [PLC-Link] to open the global "PLC-Link" settings screen. * The screen on the left shows that Mode is set to "PLC‐ Link (Ethernet)", but the settings (in the red frame) in this section (Controlling the Controller) are the same as those of "PLC‐ Link (RS‐232C)". 2 Check the setting items necessary for controller control.
✎Command Processing Flow To control the controller via PLC‐Link, use the number‐specified commands. 1 Refer to "Control/Data Output via Commands" in the user's manual to check the commands to use and the formats of the number-specified commands. Here is an example of using the PW command (command No. 24) that switches the program setting. The following must be specified to execute the PW command: Command No. (24) SD card No. (d) of the switch target program setting Setting No.
✎Command Processing Flow 2 Command execution procedure There are two methods to execute a command: "PLC Terminal" and "Polling". If "Polling" is selected, terminal control is not required but the communication for polling is required, and the command execution may be slower than "PLC Terminal". "PLC Terminal" Executes a command when the input terminal IN15 "PLC Terminal" is set.
✎ Command Execution Procedure Example: Save Settings (SS Command) Here is an example of a representative command execution procedure. This section explains an example of executing the SS (Save Settings) command, which does not use a command parameter, with Command Execute Event set to "Polling". The screens with blue frames show when the "Watch" function of GX Works2 is used for confirmation. 1 Check the SS (Save Settings) command operation. 1. Enter "12", the SS command No.
✎Command Execution Procedure Example: Switch Program Setting No. (PW) Here is an example of a representative command execution procedure. This section explains an example of executing the PW (Switch Program Setting No.) command, which uses a command parameter, with Command Execute Event set to "Polling". The screens with blue frames show when the "Watch" function of GX Works2 is used for confirmation. 1 Check the PW (Switch Program Setting No.) command operation. 1. Enter "24", the PW command No.
✎ Command Execution Procedure Example: Rewrite Judgment Conditions (DW) Here is an example of a representative command execution procedure. This section explains an example of executing the DW (Rewrite Judgment Conditions) command, which specifies numeric values as command parameters, with Command Execute Event set to "Polling". The screens with blue frames show when the "Watch" function of GX Works2 is used for confirmation. 1 Check the DW (Rewrite Judgment Conditions) command operation. 1.
✎Command Execution Procedure Example: Rewrite Registered String (CW) Here is an example of a representative command execution procedure. This section explains an example of executing the CW (Rewrite Registered String) command, which specifies a string for the command parameter, with Command Execute Event set to "Polling". The screens with blue frames show when the "Watch" function of GX Works2 is used for confirmation. 1 Check the CW (Rewrite Registered String) command operation. 1.
Copyright (c) 2014 KEYENCE CORPORATION. All rights reserved.