176461 User Manual.book


Add to my manuals
515 Pages

advertisement

176461 User Manual.book | Manualzz

MicroLogix 1500 Programmable Controllers User Manual

SCP - Scale with Parameters

Instruction Type: output

Table 15-9: Execution Time for the SCP Instruction

Data Size

word long word

When Rung Is:

True

28.44

µ s

45.59

µ s

False

0.00

µ s

0.00

µ s

The SCP instruction produces a scaled output value that has a linear relationship between the input and scaled values.

This instruction solves the equation listed below to determine scaled output.

y = m(x - x

0

) + y

0

, where:

• y = scaled output

• x = input (Input)

• m = slope =

∆ y/

∆ x

∆ y = y

1

- y

0

∆ x = x

1

- x

0

• x

0

= input start (Input min)

• x

1

= input end (Input max)

• y

0

= scaled start (Scaled min)

• y

1

= scaled end (Scaled max)

The data ranges for Start and End values are:

• -32768 to 32767 (word)

• -2,147,483,648 to 2,147,483,647 (long word).

15-8

Math Instructions

Addressing Modes and File Types can be used as shown in the following table:

Table 15-10: SCP Instruction Valid Addressing Modes and File Types

For definitions of the terms used in this table see “Using the Instruction Descriptions” on page 11-2.

Data Files Function Files

Address

Mode

1

Parameter

Address

Level

Input (x)

Input Start (x

0

)

Input End (x

1

)

Scaled Start (y

0

)

Scaled End (y

1

)

Scaled Output (y)

• •

• • • • • • • • • • • • • • • •

• • • •

• •

• • •

• •

• •

• •

• • • •

• • • • • • •

1. See Important note about indirect addressing.

Important:

• •

• • •

• • •

• • •

• • •

• •

• •

• •

• •

• •

• •

• •

You cannot use indirect addressing with: S, MG, PD, RTC, HSC,

PTO, PWM, STI, EII, BHI, MMI, DAT, TPI, CS0, and IOS files.

15-9

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

advertisement

Table of contents