Spectrum Controls 1746sc-INI4vi User Manual

Page 45

Advertising
background image

Chapter 5: Ladder Program Examples

41

User-Defined Scaling

Your input module was designed to work directly with applications
requiring special data scaling—without an intermediate scaling
operation.

Example — Suppose your input module is in slot 3, and you have a
pressure sensor with a 4–20 mA range connected to channel 0. The
following figures show you how to use the User-Defined Scaling data
format to send specially scaled data (100 to 9999 in this example) to a
simple display-only operator interface:

Figure 14. User-defined scaling example.

4–20 mA
Pressure
Sensor

CPU

1746sc-INI4i
Analog Input
Module (slot 3)

Simple display-only
Operator Interface

Analog Input Signal (channel 0)

Specially

scaled data

(e.g., 100–9999)

Figure 15. Programming for user-defined scaling example.

Rung 2:0

First Pass Bit

s:1
] [
15

COP
COPY FILE
Source #N10:0
Dest #O:3.0
Length 6

Initialize Module

END

Rung 2:1

Figure 16. Data table for user-defined scaling example.

address 15 data 0 address 15 data 0
N10:0 0000 0000 0100 1011 N10:3 0000 0000 0000 0000
N10:1 0000 0000 0000 0000 N10:4 0000 0000 0110 0100 (100 gallons)
N10:2 0000 0000 0000 0000 N10:5 0010 0111 0000 1111 (9999 gallons)

In this example, the operator interface is programmed to read I:3.0
(channel 0 data word).

Advertising