359GB High-speed, High-capacity Machine Vision System CV-X Series Easy Setup Guide Control/Communication PLC-Link (SYSMAC CJ Series)
Contents Easy Setup Guide: Control/Communication PLC-Link (SYSMAC CJ Series) Establishing the PLC-Link (Ethernet PLC-Link) Page 3 Establishing the PLC-Link (RS-232C PLC-Link) Page 7 Outputting the Measured Value/Judged Value (PLC-Link) Page 11 Controlling the Controller (PLC-Link) Page 14 Trademarks Product names, etc. noted in this document are registered trademarks or trademarks of their respective companies. The ™ mark and ® mark have been omitted in this manual. KEYENCE CORPORATION.
1. Establishing the PLC-Link (Ethernet PLC-Link) [SYSMAC CJ Series] ✎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 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 CJ Series (Example of CX Programmer) 1 2 3 Start CX Programmer, and select [Project] > [New project]. Select a model*1 to use for "Device Type", and then press the "OK" button. *1 Select a model described in the CV-X user's manual. Select [PLC] > [Auto Online] > [Direct Online], and then select "Connect" - "Yes" to connect to PLC. KEYENCE CORPORATION. Vision System Division ‐4‐ www.keyence.
4 Open [IO Table and Unit Setup] on the left side of the screen, and register the Ethernet link unit in an empty slot. Double-click the registered Ethernet link unit (CJ1W-ETN21 in this example) to edit the parameters. Configure the following settings in [Edit Parameters]. 1. For [FINS/UDP Port], select "9600", the default value (the default value is also 9600 for CV-X). 2. Set [IP Address/Subnet Mask]. Enter the "IP Address" set in CV-X Global Settings. 3. Enter the CV-X NODE No.
Restart both the CV-X Series and the SYSMAC CJ Series. * Start the SYSMAC CJ 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... *" appears repeatedly, and the error message "Failed to establish a link with the PLC" appears.
2. Establishing the PLC-Link (RS-232C PLC-Link) [SYSMAC CJ 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 Settings of the CJ Series (Example of CX Programmer) 1 2 3 Start CX Programmer, and select [Project] > [New project]. Select a model*1 to use for "Device Type", and then press the "OK" button. *1 Select a model described in the CV-X user's manual. Select [PLC] > [Auto Online] > [Direct Online], and then select "Connect" - "Yes" to connect to PLC. KEYENCE CORPORATION. Vision System Division ‐8‐ www.keyence.
4 Open [IO Table and Unit Setup] on the left side of the screen, and register the serial communication unit in an empty slot. Double-click the registered serial communication unit (CJ1W-SCU41 in this example) to edit the 【Note】 "User settings" and "Defaults" can be selected, but if you choose "Defaults", the items below will automatically return to their default setting (standard setting) if they are changed. Be sure to use "User settings". These specifications only apply to CX Programer Ver.
6 Restart both the CV-X Series and the SYSMAC CJ Series. * Start the SYSMAC CJ 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... *" appears repeatedly, and the error message "Failed to establish a link with the PLC" appears.
3. Outputting the Measured Value/Judged Value (PLC-Link) [SYSMAC CJ 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.
4. Controlling the Controller (PLC-Link) [SYSMAC CJ 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 settings. The following must be specified to execute the PW command: Command No. (24) SD card No. (d) of the switch target program settings Setting No.
✎ Command Processing Flow 2 Command execution procedure There are two methods for executing 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 "Memory" → "D" is selected, and the memory area monitor display is used in CX Programmer for confirmation (double‐click the memory area to enter a value).
✎ 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 "Memory" → "D" is selected, and the memory area monitor display is used in CX Programmer (double‐click the memory area to enter a value).
✎ 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 "Memory" → "D" is selected, and the memory area monitor display is used in CX Programmer (double‐click the memory area to enter a value).
✎ 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".
Copyright (c) 2014 KEYENCE CORPORATION. All rights reserved.