Ladder program – KEYENCE KV-D20 User Manual

Page 63

Advertising
background image

3. Examples of Ladder Programs

3

63

0001

0002

0003

0004

0005

0006

0007

0008

0009

0010

0011

0012

0013

0014

0015

0016

0017

0018

0019

0020

0021

0022

0023

HSP

0008

HSP

0006

HSP

0004

2008

2002

2002

2500

2501

1000

1001

2315

2715

0500

0501

2002

2002

DM1900

LDA

#03600

MUL

DM1402

DIV

DM0000

STA

#00500

LDA

DM1400

STA

#00720

LDA

DM1402

STA

#30000

DM1581

DW

$0041

DM1681

DW

#24030

DM1580

DW

$0061

DM1676

DW

$0100

DM1680

DW

2504

2505

2506

2507

2715

RES

2314

SET

DIFU

1000

DIFU

1001

1

2

4

3

5

6

7

8

9

10

11

Current
angle

No. of pulses
for 1 encoder
rotation

Current
No. of
pulses

Always
ON

Always ON

Cam switch
operation

Starting cam switch operation

No. of pulses for
1 encoder rotation

Initial No.
of output
relays

ON for
1 scan

Always
ON

Always
ON

Initial setting of cam switch function

Output relays for cam switch function: 0500 through 0615

Resolution of the encoder to be connected: 360 pulses/rotation

Initial setting of operator interface panel

Enable changing the screen between the operator, switch comment, and lamp comment screens.

Display the current angle.

Use the comment of TM30 as the title.

Title display

Customized lamp setting

Customized switch setting

0024

0025

0026

0027

0030

0031

ENDH

END

0028

0029

2002

#31406

DM1582

DW

#31407

DM1583

DW

#31408

DM1584

DW

#31409

DM1585

DW

#31410

DM1586

DW

#31411

DM1587

DW

#31412

DM1588

DW

#31413

DM1589

DW

#31414

DM1590

DW

#31415

DM1591

DW

#31416

DM1592

DW

#31417

DM1593

DW

#31418

DM1594

DW

#31419

DM1595

DW

#31420

DM1596

DW

#31421

DM1597

DW

#31422

DM1598

DW

$2041

DM1698

DW

$2041

DM1694

DW

$2041

DM1690

DW

$2041

DM1686

DW

$2041

DM1682

DW

$2041

DM1699

DW

$2041

DM1695

DW

$2041

DM1691

DW

$2041

DM1687

DW

$2041

DM1683

DW

$2041

DM1696

DW

$2041

DM1692

DW

$2041

DM1688

DW

$2041

DM1684

DW

$2041

DM1697

DW

$2041

DM1693

DW

$2041

DM1689

DW

$2041

DM1685

DW

#31423

DM1599

DW

12

Display the setting of the output range of the cam switch function.

Always ON

Ladder program

kv_d20_manual.p65

08.3.10, 6:09 PM

63

Advertising