KEYENCE LK-CC100/DN100 User Manual

Page 55

Advertising
background image

3-19

3

3 Connecting to DeviceNet

Programming a control input

Create the ladder program as follows.

1

Check the status.

• Verify the SYSTEM_ERR_FLAG is OFF and READY_FLAG is ON.

• To request a program change, verify CHG_PRG_ENBLE is ON.

• Verify ***_ACQ is OFF.

2

Set the control parameter.

To request a program change, store the program number in SET_PRG_NUM.

3

Send the control input request.

Change the request signal to control ***_REQ from OFF

 ON.

The request is sent to the LK-DN100 at the rising edge of ***_REQ.

4

Check the control input status.

When the LK-DN100 receives the control input and completes the execution

requested, ***_ACQ turns ON.

When ***_ACQ turns ON, verify ***_ERR and make sure the request was processed

normally.

5

Check the control input result.

• For a program change request, wait for CUR_PRG_NUM to change.

• For a control request that causes ***_STATE to change, wait for ***_STATE to

change.

• For all other requests, wait for input response time (T2).

Refer to the LK-G5000 series User's Manual for details on input response time (T2).

6

Disable the control input request.

Disable the control input request by changing ***_REQ from ON

 OFF.

7

Store the counter value.

Store the current counter value (COUNTER_LO and COUNTER_HI).

8

Check for counter value updates.

Wait until the current counter value, stored in Step 7, changes.

9

Acquire data.

Acquire the required data.

Reference

Advertising