Owner's manual
KEYENCE CORPORATION. Vision System Division
‐ 18 ‐ www.keyence.com
✎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 "Registration monitor" function of KV STUDIO is used for
confirmation.
1
Check the CW (Rewrite Registered String) command operation.
1. Enter "43", the CW command No., in the data memory
corresponding to the PLC Command Address (DM100 in
this example), and enter the parameters in order. The
figure on the right shows an example of rewriting the
judgment string of "T102: OCR tool" to "ABCDE".
‐ Par
ameter 1 102 (Tool ID: 102)
‐ Par
ameter 2 1 (In the case of "OCR": Always 1)
‐ Par
ameter 3 1 (Specify in string)
‐ Par
ameter 4 65 (ASCII code for "A")
‐ Par
ameter 5 66 (ASCII code for "B")
‐ Par
ameter 6 67 (ASCII code for "C")
‐ Par
ameter 7 68 (ASCII code for "D")
‐ Par
ameter 8 69 (ASCII code for "E")
‐ Par
ameter 9 0 (Always 0 at the end of the string)
* The
address to use is 1 word for Command No. and 2
words for other parameters.
2. Enter 1 in the data memory corresponding to the PLC
Command Execution Address (bit) (DM002 in this
example).
* The address to use is 1 word.
When the command is successful: CV‐X writes "1" into Command
Complete Address (bit), and "0" into Command Result Address.
When the command fails: CV‐X writes "1" into Command Complete
Address (bit), and an error code into Command Result Address.
3. The command is executed.
4. Check if the values of the data memory corresponding to
the PLC Command Complete Address (bit) and Command
Result Address (DM003 and DM200 respectively in this
example) have changed.