Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 60 of 70

SLC 500 Instruction Set Reference Manual, pages 591 to 600

Pages 591 to 600 of 694

The original document is the PDF (7.2 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Allen-Bradley 1747-L514

Page 591

Memory Usage

C-11

SLC 5/02 Memory Usage Example

1747-L524 series C processor, 30-slot configuration, (15) 1746-IA16, (10) 1746-OA8, (1) 1747-DCM full configuration, (1) 1746-NI4, (1) 1746-NIO4I 50

XIC and XIO

50 x 1.00

=

50.00

15

OTE instructions

15 x 0.75

=

11.25

5

TON instructions

5 x 1.00

=

5.00

3

GRT instructions

3 x 1.50

=

4.50

1

SCL instruction

1 x 1.75

=

1.75

1

TOD instruction

1 x 1.00

=

1.00

3

MOV instructions

3 x 1.50

=

4.50

10

CTU instructions

10 x 1.00

=

10.00

10

RES instructions

10 x 1.00

=

10.00

Instruction Usage

98.00

30 rungs

30 x 0.375

=

11.25

100 data words

100 x 0.250

=

25.00

10 is highest data table file number

10 x 1.00

=

10.00

4 is highest program file number

4 x 2.00

=

8.00

User Program Total

163.50

49

I/O data words

49 x 0.75

=

36.75

30 slot

30 x 0.75

=

22.50

Overhead

204.00

I/O Configuration Total

263.25

Estimated total memory usage:

426.75 (round to 427)

4096 - 290 = 3806 instruction words remaining in the processor

Publication 1747-RM001G-EN-P - November 2008

Page 592

C-12

Memory Usage

User Word Comparison Between SLC 5/03 (and higher) Processors and the SLC 5/02 Processor

The SLC 5/03 (and higher) processors and the SLC 5/02 processor accumulate user words differently during the creation of a user program. The SLC 5/02 processor is generally more efficient in its word usage than the SLC 5/03 (and higher) processors. However, the SLC 5/02 processor word usage is difficult to estimate since it is tied to the architecture of the microprocessor. The SLC 5/03 (and higher) processors accumulates words in a way that is easier to understand and estimate than the SLC 5/02 processor. The SLC 5/03 (and higher) processors accumulate words similar to a PLC-5. See page C-1 for user memory capacities for the various SLC processors. It is important to realize that this does not mean that a 16k, SLC 5/03 processor can hold a user program that is three times larger than an equivalent SLC 5/02 program. Use the information below to determine the SLC 5/03 user program size based on existing SLC 5/02 programs.

Instruction Words Some instructions use the same amount of memory, while other instructions do not use the same amount of memory. For example, a CTU instruction always uses 1 word. However, an ADD instruction in an SLC 5/02 processor uses 1.5 words; in a SLC 5/03 (or higher) processor an ADD instruction uses 3 words. Also note additional differences below:

Table C.4 Memory Usage Condition

SLC 5/02 Words

SLC 5/03 Words

SLC 5/04 and SLC 5/05 Words

Each rung

0.375

1

1

Each additional Program File 1

5

5

Each additional Data File

1

5

5

Each I/O Slot

0.75

3

3

Overhead

216

236

250

Exact program content determines the program size difference. An SLC 5/03 program consumes 20% to 150% more instruction words than its SLC 5/02 equivalent.

Publication 1747-RM001G-EN-P - November 2008

Page 593

Memory Usage

C-13

Data Words Files 0 and 1 In the SLC 5/02 processor, each I/O data word consumes 0.75 words of memory. In the SLC 5/03 processor, each I/O data word consumes 3 words of data.

File 2 The status file word usage is contained in the overhead values for both the SLC 5/02 and SLC 5/03 processors.

File 3 to 255 In the SLC 5/02 processor, 4 data words consume the same amount of memory as 1 instruction word. This is why the SLC 5/02 processor is said to offer 4K of Instruction words or 16K of Data words. This dynamic amount of Data word storage is due to the architecture of the SLC 5/02’s microprocessor.

The following table shows memory usage times for the SLC 5/03, SLC 5/04, and SLC 5/05 processors. Instructions that support floating point are included within this table. When using a SLC 5/03 processor, it is important to remember that 1 instruction word equals 1 data word.

SLC 5/03, SLC 5/04, and SLC 5/05 Processor

Table C.5 SLC 5/03, SLC 5/04 and SLC 5/05 List of Instructions

OS302, OS401, OS501 Series C, FRN 10+

Page

OS302, OS401, OS501 Series C

ABS

•

Instruction Type

OS302, OS401, OS501

OS300 ABS

Name

•

•

•

•

2.00

Test Buffer for Line

ASCII

10-6

•

•

•

•

2.00

Absolute

Math

4-24

•

•

•

2.00

Absolute

Math

4-24

FP = floating point

ABL

Memory Usage (user words)

OS301, OS400

Applies to SLC

Mnemonic

FP

ACB

•

•

•

•

2.00

Number of Characters in Buffer

ASCII

10-7

ACI

•

•

•

•

2.00

String to Integer

ASCII

10-8

Publication 1747-RM001G-EN-P - November 2008

Page 594

C-14

Memory Usage

Table C.5 SLC 5/03, SLC 5/04 and SLC 5/05 List of Instructions (Continued) Instruction Type

Page

OS302, OS401, OS501 Series C, FRN 10+

Name

OS302, OS401, OS501 Series C

Memory Usage (user words)

OS302, OS401, OS501

Applies to SLC

OS301, OS400

Mnemonic

ACL

•

•

•

•

2.00

ASCII Clear Receive and/or Send Buffer

ASCII

10-9

ACN

•

•

•

•

3.00

String Concatenate

ASCII

10-11

•

•

•

2.00

Arc Cosine

Math

4-29

•

•

•

3.00, 4.00

Add

Math

4-5

•

•

•

4.00

Add

Math

4-5

OS300

FP = floating point

ACS ADD ADD

•

•

FP

AEX

•

•

•

•

4.00

String Extract

ASCII

10-12

AHL

•

•

•

•

4.00

ASCII Handshake Lines

ASCII

10-13

AIC

•

•

•

•

2.00

Integer to String

ASCII

10-14

•

•

•

•

3.00

And

Data Handling

5-20

ARD

•

•

•

•

3.00

ASCII Read Characters

ASCII

10-15

ARL

•

•

•

•

3.00

ASCII Read Line

ASCII

10-17

ASC

•

•

•

•

4.00

String Search

ASCII

10-18

•

•

•

2.00

Arc Sine

Math

4-29

•

•

•

3.00

ASCII String Compare

ASCII

10-19

•

•

•

2.00

Arc Tangent

Math

4-30

AND

ASN

•

FP

ASR ATN

• FP

AWA

•

•

•

•

3.00

ASCII Write with Append

ASCII

10-20

AWT

•

•

•

•

3.00

ASCII Write

ASCII

10-22

BSL

•

•

•

•

•

3.00

Bit Shift Left

Application Specific

7-4

BSR

•

•

•

•

•

3.00

Bit Shift Right

Application Specific

7-4

BTR

•

•

5.00

Block Transfer Read

Block Transfer

8-1

BTW

•

•

5.00

Block Transfer Write

Block Transfer

8-1

•

73.00

ControlNet Explicit Message

Communication

12-45

CEM CLR CLR

• FP

COP COS

•

•

•

FP

CPT

•

•

•

3.00, 1.00

Clear

Math

4-12

•

•

•

1.00

Clear

Math

4-12

•

•

•

3.00

File Copy

Data Handling

5-13

•

•

•

2.00

Cosine

Math

4-30

•

•

•

(1)

Compute

Math

4-25

CTD

•

•

•

•

•

1.00

Count Down

Basic

2-14

CTU

•

•

•

•

•

1.00

Count Up

Basic

2-13

Publication 1747-RM001G-EN-P - November 2008

Page 595

Memory Usage

C-15

Table C.5 SLC 5/03, SLC 5/04 and SLC 5/05 List of Instructions (Continued)

OS302, OS401, OS501

OS302, OS401, OS501 Series C

OS302, OS401, OS501 Series C, FRN 10+

•

•

2.00

Decode 4 to 1 of 16

Data Handling

5-10

•

•

•

•

2.00

Double Divide

Math

4-11

•

•

6.00

Diagnostic Detect

Application Specific

7-18

•

•

2.00

Degree

Data Handling

5-8

•

74.00

DeviceNet Explicit Message

Communication

12-52

FP

•

DEM DIV

•

•

FP

•

•

•

3.00, 4.00

Divide

Math

4-9

•

•

•

4.00

Divide

Math

4-9

•

64.00

Ethernet/IP Explicit Message

Communication

12-58

•

•

2.00

Encode 1 of 16 to 4

Data Handling

5-11

EEM ENC EQU EQU

Page

•

DDT

DIV

Instruction Type

•

DDV DEG

Name

•

FP = floating point

DCD

Memory Usage (user words)

OS301, OS400

Applies to SLC

OS300

Mnemonic

• FP

•

•

•

•

3.00

Equal

Comparison

3-2

•

•

•

•

3.00

Equal

Comparison

3-2

•

•

6.00

File Bit Comparison

Application Specific

7-18

FBC FFL

•

•

•

•

•

3.00

FIFO Load

Data Handling

5-26

FFU

•

•

•

•

•

4.00

FIFO Unload

Data Handling

5-26

FLL

•

•

•

•

•

3.00

Fill File

Data Handling

5-13

FRD

•

•

•

•

•

2.00

Convert from BCD

Data Handling

5-5

GEQ

•

•

•

•

•

3.00

Greater Than or Equal

Comparison

3-4

•

•

•

•

3.00

Greater Than or Equal

Comparison

3-4

•

•

•

•

3.00

Greater Than

Comparison

3-3

•

•

•

•

3.00

Greater Than

Comparison

3-3

GEQ

FP

GRT GRT

• FP

IID

•

•

•

•

•

2.00

I/O Interrupt Disable

Interrupt

11-32

IIE

•

•

•

•

•

2.00

I/O Interrupt Enable

Interrupt

11-32

IIM

•

•

•

•

•

6.00

Immediate Input with Mask

Program Flow Control 6-8

INT

•

•

•

•

•

1.00

Interrupt Subroutine

Interrupt

IOM

•

•

•

•

•

6.00

Immediate Output with Mask

Program Flow Control 6-9

JMP

•

•

•

•

•

1.00

Jump to Label

Program Flow Control 6-2

JSR

•

•

•

•

•

1.00

Jump to Subroutine

Program Flow Control 6-3

LBL

•

•

•

•

•

2.00

Label

Program Flow Control 6-2

LEQ

•

•

•

•

•

3.00

Less Than or Equal

Comparison

11-34

3-3

Publication 1747-RM001G-EN-P - November 2008

Page 596

C-16

Memory Usage

Table C.5 SLC 5/03, SLC 5/04 and SLC 5/05 List of Instructions (Continued)

LES

• FP

Page

OS302, OS401, OS501 Series C, FRN 10+

LES

Instruction Type

OS302, OS401, OS501 Series C

OS300 FP

Name

•

•

•

•

3.00

Less Than or Equal

Comparison

3-3

•

•

•

•

3.00

Less Than

Comparison

3-3

•

•

•

•

3.00

Less Than

Comparison

3-3

FP = floating point

LEQ

Memory Usage (user words)

OS302, OS401, OS501

Applies to SLC

OS301, OS400

Mnemonic

LFL

•

•

•

•

•

3.00

LIFO Load

Data Handling

5-28

LFU

•

•

•

•

•

3.00

LIFO Unload

Data Handling

5-28

LIM

•

•

•

•

•

1.00

Limit Test

Comparison

3-5

•

•

•

•

1.00

Limit Test

Comparison

3-5

LIM

FP

LN

FP

•

•

•

2.00

Natural Log

Math

4-31

LOG

FP

•

•

•

2.00

Log to the Base 10

Math

4-31

MCR

•

•

•

•

•

1.00

Master Control Reset

Program Flow Control 6-6

MEQ

•

•

•

•

•

4.00

Masked Comparison for Equal

Comparison

3-4

MOV

•

•

•

•

•

2.00

Move

Data Handling

5-17

•

•

•

•

2.00

Move

Data Handling

5-17

MOV

FP

MSG

•

•

•

•

•

20.00

Message

Communication

12-5

MUL

•

•

•

•

•

3.00

Multiply

Math

4-8

•

•

•

3.00

Multiply

Math

4-8

MUL

FP

MVM

•

•

•

•

•

3.00, 4.00

Masked Move

Data Handling

5-18

NEG

•

•

•

•

•

3.00

Negate

Data Handling

5-24

•

•

•

3.00

Negate

Data Handling

5-24

•

•

•

•

3.00

Not Equal

Comparison

3-2

•

•

•

•

3.00

Not Equal

Comparison

3-2

NEG

FP

NEQ NEQ

• FP

NOT

•

•

•

•

•

3.00

Not

Data Handling

5-23

OR

•

•

•

•

•

3.00

Or

Data Handling

5-21

OTE

•

•

•

•

•

1.00

Output Energize

Basic

2-4

OTL

•

•

•

•

•

1.00

Output Latch

Basic

2-4

OTU

•

•

•

•

•

1.00

Output Unlatch

Basic

2-4

PID

•

•

•

•

•

26.00

Proportional Integral Derivative

PID

9-1

•

•

•

2.00

Radian

Data Handling

5-9

•

•

•

1.00

I/O Refresh

Program Flow Control 6-10

RAD REF

FP •

•

Publication 1747-RM001G-EN-P - November 2008

Page 597

Memory Usage

C-17

Table C.5 SLC 5/03, SLC 5/04 and SLC 5/05 List of Instructions (Continued) Page

2-20

OS302, OS401, OS501 Series C, FRN 10+

Instruction Type

OS302, OS401, OS501 Series C

Name

OS302, OS401, OS501

Memory Usage (user words)

OS301, OS400

Applies to SLC

OS300

Mnemonic

RES

•

•

•

•

•

1.00

Reset

Basic

RET

•

•

•

•

•

1.00

Return from Subroutine

Program Flow Control 6-3

RHC

•

•

2.00

Read High Speed Clock

Application Specific

7-17

RMP

•

•

2.00

Ramp

Math

4-20

•

3.00

Read Program Checksum

Application Specific

7-23

FP = floating point

RPC RPI

•

•

•

•

•

2.00

Reset Pending Interrupt

Interrupt

11-34

RTO

•

•

•

•

•

1.00

Retentive Timer

Basic

2-11

SBR

•

•

•

•

•

1.00

Subroutine

Program Flow Control 6-3

•

•

•

4.00

Scale Data

Math

4-15

•

•

•

6.00

Scale with Parameters

Math

4-13

SCL

FP

SCP SCP

FP

•

•

•

6.00

Scale with Parameters

Math

4-13

SIN

FP

•

•

•

2.00

Sine

Math

4-32

SQC

•

•

•

•

•

5.00

Sequencer Compare

Application Specific

7-6

SQL

•

•

•

•

•

4.00

Sequencer Load

Application Specific

7-12

SQO

•

•

•

•

•

5.00

Sequencer Output

Application Specific

7-6

SQR

•

•

•

•

•

2.00, 3.00

Square Root

Math

4-12

•

•

•

3.00

Square Root

Math

4-12

SQR

FP

STD

•

•

•

•

•

1.00

Selectable Timer Interrupt Disable

Interrupt

11-16

STE

•

•

•

•

•

1.00

Selectable Timer Interrupt Enable

Interrupt

11-16

STS

•

•

•

•

•

3.00

Selectable Timer Interrupt Start

Interrupt

11-17

SUB

•

•

•

•

•

3.00

Subtract

Math

4-5

•

•

•

4.00

Subtract

Math

4-5

SUB

FP

SUS

•

•

•

•

•

2.00

Suspend

Program Flow Control 6-8

SVC

•

•

•

•

•

1.00

Service Communication

Communication

12-3

•

•

•

2.00

SWAP

Math

4-28

•

•

•

2.00

Tangent

Math

4-32

•

•

3.00

Compute Time Difference

Application Specific

7-17

SWP TAN

FP

TDF TND

•

•

•

•

•

1.00

Temporary End

Program Flow Control 6-7

TOD

•

•

•

•

•

2.00

Convert to BCD

Data Handling

5-2

Publication 1747-RM001G-EN-P - November 2008

Page 598

C-18

Memory Usage

Table C.5 SLC 5/03, SLC 5/04 and SLC 5/05 List of Instructions (Continued) Page

OS302, OS401, OS501 Series C, FRN 10+

Instruction Type

OS302, OS401, OS501 Series C

Name

OS302, OS401, OS501

Memory Usage (user words)

OS301, OS400

Applies to SLC

OS300

Mnemonic

TOF

•

•

•

•

•

1.00

Timer Off-delay

Basic

2-10

TON

•

•

•

•

•

1.00

Timer On-delay

Basic

2-9

XIC

•

•

•

•

•

1.00

Examine If Closed

Basic

2-3

XIO

•

•

•

•

•

1.00

Examine If Open

Basic

2-3

XOR

•

•

•

•

•

3.00

Exclusive Or

Data Handling

5-22

•

•

•

3.00

X to the Power of Y

Math

4-33

FP = floating point

XPY (1)

FP

To calculate the memory usage, do the following: Take 2 plus the number of instruction words for each operation performed plus the number of operations performed in the compute. For example, 2 + ADD + SUB + 2 =10.

Publication 1747-RM001G-EN-P - November 2008

Page 599

Memory Usage

C-19

Estimating Total Memory Usage of Your System Using an SLC 5/03, SLC 5/04, or SLC 5/05 Processor

__________

1. Add the total number of data file words used (excluding the status file and I/O data words) and enter the result.

__________

2. Multiply the total number of I/O data words by 3 and enter the result.

__________

3. Multiply the total number of I/O slots, used or unused, by 3 and enter the result.

__________

4. To account for processor overhead, enter 236.

__________

5. Multiply the highest numbered program file used by 5 and enter the result.

__________

6. Multiply the highest numbered program file used by 5 and enter the result.

Subtotal: __________

7. Add steps 1 through 6. Enter this as the subtotal (additional 4K word usage).

4096 - (step 7 value)

8. Subtract the value in step 7 from 4096; if the result is positive, enter 12,288 in step 14. If the result is negative, subtract the absolute value from 12,288 and enter the result in step 14. (This decreases the value.)

__________ __________

9. Calculate the total number of words used by the instructions in your program and enter the result. Refer to Table C.5 on page C-13.

__________

10. Add the total number of rungs (1 word per rung) and enter the result.

__________

11. Add 1 word for each indexed address reference and enter the result.

__________

12. Add 2 words per rung for each rung that contains an indexed address reference and enter the result

Subtotal: __________

13. Add steps 9 through 12 and enter the result.

__________

14. Enter the result from step 8. This is the available memory.

__________

15. Enter the result from step 13. This is the total number of words used.

Total: __________

16. Subtract step 15 from step 14. This number is the amount of memory available to your system.

Publication 1747-RM001G-EN-P - November 2008

Page 600

C-20

Memory Usage

SLC 5/03, SLC 5/04, or SLC 5/05 Memory Usage Example

1747-L532 processor, 30-slot configuration, (15) 1746-IA16, (10) 1746-OA8, (1) 1747-DCM full configuration, (1) 1746-NI4, (1) 1746-NIO4I 100 data words

100 x 1.00

= 100.00

49

I/O data words

49 x 3.00

= 147.00

30 slot

30 x 3.00

= 90.00

Overhead

236.00

10 is the highest data table file number

10 x 5.00

= 50.00

4 is the highest program file number

4 x 5.00

= 20.00

Subtotal

643.00

Account for additional 4K data space 4096 - 643 = 3453 (result is positive; therefore 12,288 words are available) 50

XIC and XIO

50 x 1.00

= 50.00

15

OTE instructions

15 x 1.00

= 15.00

5

TON instructions

5 x 1.00

= 5.00

3

GRT instructions

3 x 3.00

= 9.00

1

SCL instruction

1 x 4.00

= 4.00 t

TOD instruction

1 x 2.00

= 2.00

3

MOV instructions

3 x 2.00

= 6.00

10

CTU instructions

10 x 1.00

= 10.00

10

RES instructions

10 x 1.00

= 10.00

Instruction USage 30 rungs

0 indexed address

0 indexed address reference

30 x 1.00

= 30.00 = 0.00 0.00

Subtotal

141.00

Available memory

12,288.00

Words used Estimated total memory available:

Publication 1747-RM001G-EN-P - November 2008

111.00

- 141.00 12,147.00