370GB High-speed, High-capacity Machine Vision System CV-X Series Easy Setup Guide RS-232C Non-procedural communication
Contents Easy Setup Guide: RS-232C Non-procedural communication 1. Connecting to a PC using RS-232C Page 3 2. Executing Commands Page 9 Page 12 Page 14 3. Troubleshooting - Connection Problems 4. Connecting PLC and CV-X via RS-232C 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. Vision System Division ‐2‐ www.keyence.
Connecting CV-X to a PC using RS-232C ✎ Connecting to a PC using RS-232C 1 Select a cable and connector from the list below according to the PC's COM port connector, and connect. For PCs with a D-SUB port, choose a 9 or 25 pin converter connector, and use it in combination with OP-26487. Connector: RJ-11 Standard: EIA RS-232 compliant modem definition 2 Configure the PC settings as necessary. From Device Manager* select "Ports (COM & LPT)".
3 Configure the CV-X communication settings. Select Global ↓ Communications & I/O ↓ RS‐232C 4 Configure settings so that communication with the PC is possible. Configure each setting so it is the same as the PC setting. KEYENCE CORPORATION. Vision System Division ‐4‐ www.keyence.
Install Tera Term and start it up. Tera Term is a free software that allows you to test non‐procedural communication. Refer to the following website for more information. (As of December 2013) http://www.vector.co.jp/soft/win95/net/se320973.html This is the start‐up screen. 6 Select "Serial", and select the port connected to CV-X. KEYENCE CORPORATION. Vision System Division ‐5‐ www.keyence.
7 8 Select Setup → Terminal. Configure the following 2 settings. Change the following 2 settings. ‐ Change the receive delimiter to CR+LF ‐ Check the Local echo box KEYENCE CORPORATION. Vision System Division ‐6‐ www.keyence.
9 The connection will be established when the above settings have been configured. Communication via commands is now possible. As a rule, use CV‐X in Run Mode. In the screenshot to the left: A "T1" command was sent, and "T1" was received from CV‐X. An "SS" command was sent, and "SS" was received 10 When data needs to be output, select the required items for RS-232C (Non-Procedural) in Output Settings.
11 Issue a T1 (Camera 1 trigger) command from Tera Term to output data. T1 command is issued T1 is received from CV‐X Then data is output. This example shows data for the following measurements: ‐ Edge X Position of +0000.000 ‐ Area of 120288 Data will be output according to the format set in the CV‐X output settings, and the same number of digits as in the preview will be output. 12 Communication content can be checked even in the CV-X using its RS-232C monitor.
✎ Executing Commands 1 Executing Commands There are 4 main types of commands. This section describes a representative example of each of the 4 types. 1. Commands that can be executed using the command only (no parameter required) Example) Save program (SS), Reset (RS) 2. Commands that require a parameter to be executed Example) Change programs (PW), Change judgment condition (DW) 3. Commands that have data replies after they are executed Example) Read programs (PR), Read execute condition (EXR) 4.
3 2. Commands that require a parameter to be executed Example: The Change programs (PW) command is executed in the following way. When PW, the SD Card No., and the Program Setting No. are sent as the command, the Program Settings are changed. Then, CV‐X replies with PW. The following is an example of changing to Program Setting No. 1 of SD1. Written in the manual. 4 The SD Card number can be checked on the screen. 3.
5 4. Triggers executed using commands Example: Triggers executed by commands are executed in the following way. Trigger 1 is executed in this example. When no output items are set in RS‐232C (Non‐Procedural) in Output Settings and T1 is sent, a trigger is input, and only T1 is received as a reply. When output items are set in Output Settings, T1 is received as a reply, and then the required data are output. When Output Settings are not configured. Written in the manual.
✎ Troubleshooting 1 The command fails ⇒ There is no reply from CV-X or the reply contains corrupted text. If no reply (including an error) is received, or the reply contains corrupted text when commands are sent from Tera Term: Example of no reply The CV‐X and PC Baud Rate, Stop Bit, Parity, and other settings may not be the same. Have the Tera Term serial communication settings checked, and confirm that they are the same as the CV‐X settings.
3 Error example details When parameters are required for a command (E.g. the PW command), the parameters must be separated using commas. ‐ In example A, the command is successful, as the commas separate the parameters correctly, and correct parameters are specified. ‐ In example B, error code 02 (the received command is not available) has been received, as the command contains no commas and could not be processed.
✎Connecting PLC and CV-X via RS-232C 1 Select a cable and connector from the list below according to the type of PLC, and connect. - When connecting to the Keyence KV-L20 Series or MELSEC FX Series OP-26486+OP-26487 - When connecting to SYSMAC CJ/CS1 (for 9 pin connectors) OP-84384+OP-26487 We recommend using PLC-Link to communicate with PLC.
Copyright (c) 2014 KEYENCE CORPORATION. All rights reserved.