beautypg.com

2 user memory, 1 program capacity, Maximum number of lines in a program – KEYENCE Visual KV Series User Manual

Page 28: Calculating the byte count used

background image

1.2 User Memory

3-4

1

Chapter 1 Programming

1.2

User Memory

This section describes the allowable size (capacity) of a program which can be
created in the Visual KV Series.

1.2.1

Program Capacity

When a user program is created for the Visual KV Series, the maximum number of
steps a program can contain using the mnemonic diagram varies based on the byte
count of the instructions used. The instruction byte count is determined individually
for each instruction.

➮ For more about byte counts for each instruction, refer to "2.1 Instruction List" (p.3-34).

Maximum number of lines in a program

In the KV-10xx/16xx, a program with approximately 2,000 steps can be written. In
the KV-24xx/40xx, a program with approximately 4,000 steps can be written.

Total byte count of the memory used by instructions

6,000 bytes / 12,000

bytes

Total byte count of the memory used by objects of instructions

12,000

bytes / 24,000 bytes

* In the description above, a value on the left side indicates the byte count for

the KV-10xx/16xx, while a value on the right side indicates the byte count for
the KV-24xx/40xx.

* The memory occupied by objects indicates the memory required to execute a

program when operation is started.

For example, the allowable number of steps to be written can be calculated from the
memory occupied by the instructions as follows.

12,000 bytes / 3 bytes (average byte count of an instruction) = 4,000 steps

Note: If either the memory occupied by the instructions or the memory occupied by
objects of a program exceeds the specified memory capacity, the program cannot
be written or executed.

Calculating the byte count used

The byte count used in this program can be calculated as shown in the table below.

T000

0500

0000

0500

#00020

T000

Line No.

Instruction

Operand

Byte count

Number of objects

00000

LD

0000

3

5

00001

OR

0500

3

4

00002

TMR

000#00020

2

7

00003

ANB

T000

3

8

00004

OUT

0500

3

8

Total

14 bytes

32 bytes

KVNKA Chap 01P.p65

08.3.11, 11:49 AM

4