beautypg.com

KEYENCE CV-X Series User Manual

Page 14

background image

KEYENCE CORPORATION. Vision System Division

www.keyence.com

‐ 14 ‐

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 a 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 "Device Registration monitor" function screen of GX

Developer is used for confirmation.

1

Check the DW (Rewrite Judgment Conditions) command operation.

1. Enter "45", the DW command No., in the data memory
corresponding to the PLC Command Address (D100 in this
example), and enter the parameters in order.
The figure on the right shows an example of rewriting the
upper limit of the area of "T101" to "12345".
‐ Parameter 1 101 (Tool ID: 101)
‐ Parameter 2 105 (judgment condition item ID for "Area")

→For informa on about the judgment condi on item ID,

refer to the user's manual.

‐ Parameter 3 0 ("0" represents the upper limit )
‐ Parameter 4 12345000 (value)

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

value multiplied by 1000 (12345000).

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

single precision floating point number (12345.000).

* 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) (D002 in this example).
* The address to use is 1 word.

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
(D003 and D200 respectively in this example)
have changed.

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.