beautypg.com

Command execution procedure example – KEYENCE CV-X Series User Manual

Page 13

background image

KEYENCE CORPORATION. Vision System Division

‐ 13 ‐

www.keyence.com

Command Execution Procedure Example

Rewrite Judgment Conditions (DW)

Here is an example of a command execution procedure. This section shows an example of executing the DW (Rewrite Judgment

Conditions) command which uses command parameters and specifies integer and fractional values. The screens with

blue frames

show when the "Registration monitor" function of KV STUDIO is used for confirmation.

Check the DW (Rewrite Judgment Conditions) command operation.

1. Enter "45", the DW command No., in the device

corresponding to the PLC Command number (W0F4 in

this example), and enter the parameters in order in the

devices corresponding to the Command parameter

(W0F6, W0F8, W0FA and W0FC in this example).

The figure on the right shows an example of rewriting

the lower limit of the area of "T101" to "900".

‐ Parameter 1 101 (Tool ID: 101)

‐ Parameter 2 105 (judgment condition item ID for

"Area")

→For information about the judgment condition

item ID, refer to the CV‐X Series user's manual.

‐ Parameter 3 1 (lower limit)

‐ Parameter 4 900000 (value)

→If "Decimal Point" is set to "Fixed- point", specify

the value multiplied by 1000 (900000)

→If "Decimal Point" is set to "Floating- point",

specify a single precision floating point number

(900.000).

2. Enter "1" in the device corresponding to the PLC

Command request flag (B060 in this example).

4. Check if the values of the devices corresponding to

the PLC Command complete flag and Command result

(B00 and W04 respectively in this example) have

changed.

3. The command is executed.

When the command is successful: CV‐X writes "1" into Command
complete flag, and "0" into Command result.

When the command fails: CV‐X writes "1" into Command complete
flag, and an error code into Command result.