MicroMod 53MC5000 Owner's Manual

Add to my manuals
123 Pages

advertisement

MicroMod 53MC5000 Owner's Manual | Manualzz

CUSTOMIZATION GUIDE

Multi-Loop Process Controller

53MC5000

MICRO-DCI

MODULAR CONTROLLER

PN2497

5A

Rev. 1

MicroMod Automation, Inc.

The Company

MicroMod Automation is dedicated to improving customer efficiency by providing the most ost-effective, application-specific process solutions available. We are a highly responsive, application-focused company with years of expertise in control systems design and implementation.

We are committed to teamwork, high quality manufacturing, advanced technology and unrivaled service and support.

The quality, accuracy and performance of the Company's products result from over 100 years experience, combined with a continuous program of innovative design and development to incorporate the latest technology.

Use of Instructions

Ì Warning. An instruction that draws attention to the risk of injury or death.

Note. Clarification of an instruction or additional information.

Caution. An instruction that draws attention to the risk of the product, process or surroundings. i

Information. Further reference for more detailed information or technical details.

Although Warning hazards are related to personal injury, and Caution hazards are associated with equipment or property damage, it must be understood that operation of damaged equipment could, under certain operational conditions, result in degraded process system performance leading to personal injury or death. Therefore, comply fully with all Warning and Caution notices.

Information in this manual is intended only to assist our customers in the efficient operation of our equipment. Use of this manual for any other purpose is specifically prohibited and its contents are not to be reproduced in full or part without prior approval of MicroMod

Automation, Inc.

Licensing, Trademarks and Copyrights

MOD 30 and MOD 30ML are trademarks of MicroMod Automation, Inc.

MODBUS is a trademark of Modicon Inc.

Health and Safety

To ensure that our products are safe and without risk to health, the following points must be noted:

The relevant sections of these instructions must be read carefully before proceeding.

1. Warning Labels on containers and packages must be observed.

2. Installation, operation, maintenance and servicing must only be carried out by suitably trained personnel and in accordance with the information given or injury or death could result.

3. Normal safety procedures must be taken to avoid the possibility of an accident occurring when operating in conditions of high

4. pressure and/or temperature.

5. Chemicals must be stored away from heat, protected from temperature extremes and powders kept dry. Normal safe handling procedures must be used.

6. When disposing of chemicals, ensure that no two chemicals are mixed.

Safety advice concerning the use of the equipment described in this manual may be obtained from the Company address on the back cover, together with servicing and spares information.

All software, including des ign, appearance, algorithms and source co des, is copyrighted by MicroMod Automation, inc. and is owned by MicroMod Automation or its suppliers.

MODULAR CONTROLLER CUSTOMIZATION GUIDE

Table of Contents

1.0 Introduction To Customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1

1.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1

2.0 F-TRAN Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

2.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

2.2 Types of Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2

2.2.1 Control F-TRAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2

2.2.2 Display F-TRAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2

2.2.3 Subroutines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2

2.3 Definition of Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3

2.4 The F-TRAN Language. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4

2.4.1 General Discussion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4

2.4.2 Operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5

2.4.3 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6

2.4.4 Writing F-TRAN Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11

2.4.4.1 Reverse Polish Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11

2.4.4.2 Stack Memory Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12

2.4.5 Writing F-TRAN Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13

2.4.5.1 Assignment Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13

2.4.5.2 Comparison Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14

2.4.5.3 Conditional Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16

2.4.5.4 IF-ELSE Statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17

2.4.5.5 WHILE Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18

2.4.5.6 Case Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18

2.4.5.7 Unconditional Jump Statements Jxxx. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19

2.4.5.8 Subroutine Call Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19

2.4.5.9 End Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19

2.4.5.10 Return Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19

2.4.5.11 Display Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19

2.5 Subroutine Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22

2.6 F-TRAN Program Capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-40

2.7 Summary, F-TRAN Instruction Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-42

2.7.1 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-43

2.7.2 Assignment Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-43

2.7.3 Conditional Statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-43

2.7.4 IF Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-43

2.7.5 While Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-44

2.7.6 Case Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-44

2.8 A Programming Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-45 i

ii

MODULAR CONTROLLER CUSTOMIZATION GUIDE

3.0 F-CIM (CONTROL INTERCONNECTION MODULES) . . . . . . . . . . . . . . . . . . . . . 3-1

3.1 Configuring a F-CIM sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1

3.2 Module Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1

3.3 Configuring F-CIM sequences from the Front Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2

3.3.1 Viewing Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2

3.3.2 Erasing Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2

3.3.3 Building Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2

3.4 Custom F-CIM Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-52

3.5 F-CIM Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-54

List of Illustrations

Figure 1-1. Modular Controller Front Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

Figure 3-1. Configuring F-CIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3

Figure 3-2. F-CIM Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4

Figure 3-3. Example of Function Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-56

Figure 3-4. F-CIM Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-57

Figure 3-5. System Modules Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-58

List of Tables

Table 1. F-TRAN Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7

II

READ FIRST

MODULAR CONTROLLER CUSTOMIZATION GUIDE

WARNING

INSTRUCTION MANUALS

Do not install, maintain, or operate this equipment without reading, understanding and following the proper MicroMod Automation Inc. instructions and manuals, otherwise injury or damage may result.

Read these instructions before starting installation; save these instructions for future reference.

Contacting MicroMod Automation Inc.

Should assistance be required with any MicroMod Automation Inc. product, contact the following:

Telephone:

MicroMod Automation Inc., Rochester NY:

Phone: 1 (585) 321-9200

Fax: 1 (585) 321-9291

MicroMod Automation Inc., Southampton, PA:

Phone: 1 (215) 355-4377

Fax: 1 (215) 355-4378

E-Mail: [email protected]

MODULAR CONTROLLER CUSTOMIZATION GUIDE

1.0 INTRODUCTION TO CUSTOMIZATION

1.1 Description

The

MicroMod Automation MICRO-DCI ®

53MC5000

PCS is a microprocessor based controller that can be easily adapted for service in a variety of control applications common to industrial processes. The Controller is normally configured for a particular application by selecting one of the standard programs that are stored in ROM (read only memory) . Typically, the selected program consists of a sequence of input, output and display data assignment statements that are combined with standard subroutines and conditional statements as appropriate to configure Controller operation for a specific control application. The Controller is then customized by entering system parameters for the particular control loop, as discussed in Instruction Bulletin 53MC5000.

In the event a control application does not conform with one of the selectable standard programs provided in the 53MC5000 Controller, the Controller can be customized by use of a high-level programming language called F-TRAN (an acronym for Flexible Translator language) or through the configuration of F-CIM (Flexible Control Interconnection Modules) . This manual describes the rules for use of both of these methods by means of explanations and examples. However, because of the versatile nature of this programmable instrument, no attempt is made to cover all possible configurations or applications. In fact, the user may discover new applications by applying this simple but powerful programming method to process functions other than control.

Before any attempt is made to write a special program for the Controller, it is recommended that the programmer become thoroughly familiar with the use and operation of the instrument and any peripheral equipment involved. This will aid in understanding what functions or operations are hardware related, the limits of Controller capability, and whether or not auxiliary devices must be considered in configuration. With this knowledge, programmers need only be concerned with writing the application software peculiar to their needs.

1-1

MODULAR CONTROLLER CUSTOMIZATION GUIDE

1-2

FIGURE 1-1. Modular Controller Front Panel

Note: EMODE = Engineering Mode

MODULAR CONTROLLER CUSTOMIZATION GUIDE

2.0 F-TRAN PROGRAMMING

2.1 Description

An F-TRAN program is written as a sequence of language statements combined with necessary system routines to adapt the program to the application. The arithmetic logic unit in the Controller is capable of performing mathematical functions; such as, addition, subtraction, division, multiplication, square root, 2 x

, Y x

, and Log to the Base 2. Concise symbolic notation is used to represent the information and describe the input, output, arithmetic and logical operations involved. Typical programs include routines and instructions that handle input and output operations, perform conversions, and provide for display of selected data.

When developing the software program, the programmer must use commands that are recognized by the F-TRAN compiler. The compiler (language processor) serves to convert the source program into a machine format that the computer can use. The F-TRAN symbols are composed of "operands" representing numerical values or logical states, and "operators" representing mathematical or logical functions. In addition to the standard mathematical symbols, operators are included that perform data transformations, as discussed subsequently.

A sequence of F-TRAN language statements constitute a routine to perform a specific function.

Groups of routines and assignment statements compose the entire executable source program. In most control applications, the majority of the program can be created by selecting a series of predefined, self-contained subroutines from the subroutine library.

When errors become apparent during the development phase, correct them at once. Testing is necessary to determine if something has been overlooked. Even when a program appears to be working properly, check it carefully with test data before placing the Controller in service.

In general it is suggested that the programmer make the flow of the program proceed down the page (top to bottom). When the program has been flow charted, correlating it with the program coding is helpful. Experienced programmers may prefer to write the source program as plain language statements and then transpose that into the F-TRAN form. In either case, use comments liberally throughout the program to indicate what individual statements or groups of statements do. This technique will simplify tracking program logic.

This Customization Guide describes the syntax of the F-TRAN language . The actual procedure used to create, compile and load programs vary with the particular development environment. The three environments currently supporting this controller are the model 53HC3300D Custom Program Interface, model 53SU5000 SUPERVISOR-PC with Revision 3 Software or later and the model 53MT6000 Micro-Tools configuration tool. Refer to the respective Instruction Bulletins for these products for the detailed procedures.

2-1

MODULAR CONTROLLER CUSTOMIZATION GUIDE

2.2 Types of Programs

Unlike other MICRO-DCI instruments, the 53MC5000 Controller supports several types of F-TRAN programs.

2.2.1 Control F-TRAN

These programs are used to program the actual control strategy. Up to 20 different user written control F-TRAN programs can be stored in the controller. When they are stored, each one is assigned a Function Index (FIX) number. These numbers may be any number between 2 and 255 except for 90 - 99 which are reserved for special Fischer and Porter use. The user selects the program to run by setting the FIX parameter, B00, to the desired value. The selected program will then be executed at a rate specified by the Scan File parameter (B03). This parameter specifies the rate in 50 millisecond increments. For example, if B03 is 2, the program will execute every 100 milliseconds (ie 10 times per second). If the program is so long that it cannot be completed in the allotted time, the Scan FIle Overrun counter (B04) will be incremented and the program will continue to completion, skipping a scan. The user should increase the Scan File if overruns are common. Control F-TRAN programs can use any of the statement type listed in the following sections except for the Display Statements.

2.2.2 Display F-TRAN

These programs are used to program custom displays. Up to 70 different user written display F-

TRAN programs can be stored in the controller. When they are stored, each one is assigned a Display Index (DSPL) number. These numbers may be any number between 1 and 255. If the user loads a display program with the same number as a standard display, the users display will be used.

The controller chooses the display program to use by examining the Display Index B05. The selected program will then be executed at a rate specified by the Display Scan Index parameter

(B06). This rate at which the display program will run and update the display is then 50ms * B03 *

B06. For example, if B03 is 2 and B06 is 2, the display will update every 200 milliseconds (ie: 5 times per second). If the program is so long that it cannot be completed in the allotted time, the Display Overrun counter (B07) will be incremented and the program will continue to completion.

Display programs can process display statements in addition to the standard F-TRAN algebraic and flow control operands, operators and statements. Display statements control the placement and appearance of various text and graphical elements on the display screen. Section 2.4.5.11

explains the various display statements.

In addition to the display statements two datapoints are intimately associated with display appearance. They are B09 and L77. The CHRSET atom (B09) controls both the destination port and character appearance of text when the PRINT statements are executed. See PRINTn description for details on the character sets available.

The DFC atom (L77) indicates whether or not the display statements run time translator should be active. Display F-TRAN supports two display screen resolutions, 48x96 elements and 96x192 elements. Placement and graphical statement values are defined in terms of these elements. To eliminate the need to write separate programs for both resolutions a translator is built into the run time processing. When the translator is active (L77 = 0) it assumes all display statements are based on a 48x96 element reference. If a HiRes display (96x192 element) is present and enabled (L76 = 0)

2-2

MODULAR CONTROLLER CUSTOMIZATION GUIDE these values are double and standard character sets (B09 = 0,1) are mapped to large character sets. The DFC atom is forced to active prior to each execution of the display F-TRAN program. To write display F-TRAN for the HiRes display DFC should be set to one at the beginning of the program.

2.2.3 Subroutines

Up to 50 user written subroutines can be stored in the controller for use by both Control F-TRAN and Display F-TRAN. A subroutine is written just like a regular program except it must include a

"Return" statement ("R") just before the "End" statement ("E"). When a subroutine is loaded, the programmer assigns it a subroutine number in the range 200 - 255. F-TRAN programs can then call the subroutine by using a "G" statement. For example, G240 will cause subroutine 240 to run.

Subroutines can use any of the statement type listed in the following sections. Subroutines which use the Display Statements should only be called from Display F-TRAN programs.

2.3 Definition of Terms

The following terms are used in the discussion of the programming language.

data base — The entire group of data items that can be used in a source program. Such data may be assigned by direct configuration, computed by the program, or set by a hardware function or condition.

expression — A valid series of operands and operators which evaluate to a single value.

operand — operator —

A data element used in a program. An operand may be a measured value, a fixed parameter, or the result of a computation.

A symbol which represents an operation to be performed on one or more operands.

statement — A meaningful expression or generalized instruction in a source language that instructs the computer to perform some sequence of operations.

2.4 The F-TRAN Language

2.4.1 General Discussion

Tables 1 list the operators that are commonly used in the Controller programs. The respective operator symbols represent mathematical or logical functions and are assigned to groups according to the type of data represented by the operand. Therefore, certain operator symbols are valid functions only when they are used in the proper context; e.g., logic bits cannot be multiplied and data representing computed analog values cannot be used in AND, OR and XOR logic statements without data transformation to bit level logic.

2-3

MODULAR CONTROLLER CUSTOMIZATION GUIDE

The system operands are assigned symbols which may represent abbreviations for input or output signals, displays, parameters, etc. These symbols are easily learned and remembered. Operands that represent signals (hardware inputs) or data displays that must be assigned and/or computed in the Controller program are listed below. Many other operands take the form of program constants

(data values, computed variables, or logic status) used in the source programs or subroutines.

The operands may be used in assignment statements, mathematical computations, and decision or conditional instructions. The various operands are categorized by data types, as follows:

Logicals: L00 - L2047

type - bit data

range - logic level 0 or 1

Numeric Index: B00 - B767

type - byte data

range - 0 to 255 (integer values)

Standard Precision Number: C00 - C767

type - floating point data

range - +0.9999 x 10

38

(4 digit resolution or 1 part in

32,768)

High Precision Number: H00 - H127

type - floating point data

range - +0.99999999 x 10

38

(8-digit resolution or 1 part in

2 billion)

Alphanumerics: A00 - A319

string (ten characters maximum)

Short Alphanumeric: F00-F639

String (five character maximum)

NOTE

"C" and "H" data types are signed floating point numbers used to represent real analog values. B data items are used primarily for numeric indexes and instrument configuration.

The operators and operands are combined in a statement that defines the operation to be performed. For example, an assignment statement such as:

C01 = C20 where, the expression on the right side of the equal sign is the appropriate equation for solution of the value on the left side.

2-4

MODULAR CONTROLLER CUSTOMIZATION GUIDE

2.4.2 Operands

When writing programs for the Controller it is important to remember that the permissible operands include all the various elements described in the DATA BASE.

DATA TYPES:

Lxxx

Bxxx

Cxxx

Hxxx

Axxx

Fxxx

In addition to the L, B, C, H, F and A type data values, it is permissible to use literal values in a program. There are three types of literals allowed. String literals contain up to 10 characters surrounded by double quotes, i.e., "STRING" equivalent to A data types. Integer literals are numeric integers between 0 and 255. These are equivalent to B data types. Numeric literals are numbers which contain a decimal point. These are equivalent to C data types. Numeric or Integer literals may be used in mathematical computations, comparisons, etc., as their corresponding data type would be used.

Standard Precision Numbers are used in the Controller programs for mathematical computations and assigned as required for signal conversion and/or data handling. Typically, these numbers represent actual system operating parameters, scaling or span factors, debias or rebias, and computed variables.

Standard Precision Numbers "C" are stored in random access memory and can be assigned 10digit (4 significant digit) floating point values between the limits of -999900000 to +9999000000 (minus sign counts as 1 digit).This limitation is the result of the readout. However, many of the constants are preassigned for use in subroutines, as analog outputs, and for analog input span and zero settings.

Similarly, many of the "H" data types(high precision) have hardware assignments;i.e., analog inputs, totals counters, pulse counters, etc. For example, ANI0 will be computed and stored in H00 in the engineering unit assigned.

2.4.3 Operators

Table 1 lists the operators that are commonly used in the MICRO-DCI instrument source programs.

The respective operator symbols represent mathematical or logical functions and are assigned to groups according to the type of data represented by the operand. When writing F-TRAN statements, certain operators are valid functions only when they are used in the proper context (e.g., logic bits cannot be multiplied and floating point numbers cannot be used in AND, OR and XOR logic statements without data transformation). F-TRAN operators and their respective functions are discussed throughout the remainder of this section.

2-5

2-6

MODULAR CONTROLLER CUSTOMIZATION GUIDE

OPERATOR

FUNCTIONS

TABLE 1. F-TRAN OPERATORS

TYPE

Add

Subtract

Multiply

Divide

Square Root

Compare

Expand

Zero

Swap

Duplicate

Equal

AND

OR

XOR

INVERT

2

X

Y

X

Contract

Log(base 2)

Abs

!

"L"

%

W

D

&

X

/

-

*

"B"

+

$

&

D

Q

!

X

Z

W

:

%

M

P

$

|

V

/

^

-

*

"C"

+

Z

W

:

%

D

$

|

:

Z

W

D

/

-

*

"H"

+

MODULAR CONTROLLER CUSTOMIZATION GUIDE

Operators + - * /

These operators may be used to effect addition,subtraction, multiplication or division operations. The respective operator performs the indicated operation on the top two operands on the stack and replaces them with the result.

^ Operator

The square root operator (^) is used to remove a C type data value from the stack, to compute the square root and then to return the computed value to stack memory.

Other mathematical calculations may then be performed.

NOTE: If the data on the stack is an H type, it must be converted to a C type before the square root operator is issued.

: Operator

Use of the compare operator (:) will cause the transformation of the B, C or H data types to a logical L. The “:” operator is used to compare two data values or two expressions.

The result of the comparison will be a “bit” type data that is set to “1" if the first data value is greater than or equal to the value of the second.

To permit direct comparison, the two data values must be the same type (i.e., two

C data values may be compared without data transformation — both are 4-digit values).

To compare a C (4-digit) to an H (8-digit) data value, the H data value must first be contracted to a 4-digit value. This requires using a contract operator ($) to follow the H data value. The $ operator will result in a data transform by the computer, but in this case the process simply changes the structure of the data not its meaning.

Z Operator

The zero operator (Z) can be used to check the last B, C, or H value on the stack.

If the last value is exactly zero (00.00), the Z operator replaces the data value

with a logical 1, which is otherwise 0. This operator can not be used with logicals

(bit type data).

% and $ Operators

The expand (%) operator permits expanding 4-digit data values to 8-digit data, or expanding byte type data (B) to 4-digit or 8-digit data values or logic type data (L) to byte data.The contract operator ($) permits contracting 8-digit data values to 4-digit or 3-digit (byte) data, or contracting a 4-digit value to a 3-digit byte.

Note: That 8-digit data values cannot be expanded and logic type data cannot be contracted. The applicable operator symbol must be placed immediately following the operand, or expression, that is to be expanded or contracted.

2-7

MODULAR CONTROLLER CUSTOMIZATION GUIDE

The following data transformations are allowable and may be used as required in programs. These operators are often required in computations involving mixed data types.

To expand a data type:

B__%

B__% %

C__%

L__%%

L__%%%

L__% converts to C__ type data converts to H__ type data converts to H__ type data converts to C__ type data converts to H__ type data

converts to B__ type data

To contract a data type:

C__$

H__$

H__$ $

H__$ $ $

C__$ $

B__$ converts to B__ type data converts to C__ type data converts to B__ type data

converts to L__ type data converts to L__ type data converts to L__ type data

V (base 2 logarithm) Operator

The V operator will remove a C data value from the stack, compute the base 2 log and place that value back on the stack.

NOTE: Since the V operator uses additional stack memory to perform the calculation, the stack must not contain more than one C value when the operator is issued.

To change a log base

The log base can be changed as follows:

Log

10 X

= 0.30103 Log

2 X

Log e X

= 0.69315 Log

2 X

M (2

X

) Operator

The M operator will remove a C data value from the stack and use it as the exponent to compute 2

X

(e.g., if C01 is 3, then 2

C01

= 8).

NOTE: As the M operator uses additional stack memory to perform the calculation, the stack must not contain more than one C value when the

M operator is issued.

P (Y

X

) Operator

Example Statement: C00 = C01 C02 P ;

In the example C01 = Y, and C02 the exponent. The P operator will remove C01 and C02 from the stack and compute Y

X

(i.e., C01

C02

). The computed value is then returned to the stack.

NOTE: As the P operator uses additional stack memory to perform the calculation, the stack must not contain more than two C values when the P operator is issued.

2-8

MODULAR CONTROLLER CUSTOMIZATION GUIDE

W and D Operators

The swap (W) and duplicate (D) operators may be used to swap and duplicate data values of the same type. For example, when a D operator is issued it will duplicate the last value on the stack, which may be an L, B, C or H type. If a W operator is issued it will swap the last two values on the stack (both must be the same data type).

Q Operator

The exactly equal operator (Q) can be used in decision statements to compare two byte values, whereby either of the two byte values can include a numeric literal. For example, to compare the last two B values on the stack — B32 2 Q ? S04.

The logical result of the comparison will cause a "0" to be placed on the stack if they are equal (no skip), and, if they are not equal, a logical "1" will replace the two values on the stack.

! Operator

The invert (!) operator can be used to invert the logic state of a bit or each bit in a byte before it is applied to the gate input, or to invert the respective gate output logic. A logic bit can take either of two states: high or logic level "1" or low or logic level "0". For example, a contact input can be assigned a logical "1" state for a closed contact and a logical "0" state for an open contact. Use of the invert operator permits altering gate functions to produce the desired logic result.

& ’ X Operators

AND, OR, and XOR operators can be used with bit and byte type data when writing statements.

Any of these three basic gate functions may be implemented by simply inserting the applicable operator in the program statement. When applied to byte data, the operation is performed on a bit by bit bases.To determine the output of a particular gate configuration for a given set of input conditions, it may be necessary to develop a Truth Table as shown in Figure 1.

When writing F-TRAN statements it must be remembered that conditional statements are always evaluated such that if the stated conditions are not met, the result is false.

Two examples (from Figure 1) are shown below.

1) AND with Input A INVERT

L15 = L20 ! L58 & ;

If L20 INVERT = 1 and L58 = 1, then the AND operator will replace a logical "1" on the stack. When the end of statement operator occurs, the bit will be removed from the stack and L15 will be set to a logical "1" if the bit is a logical "1".

2) AND INVERT

L56 L81 & ! S02

If L56 is a logical "1" and L81 is a logical "1", then the AND operator will place a logical “1" on the stack. The INVERT operator will transform this "1" to a "0", placing a "0" bit back on the stack memory. The skip decision is determined by the logic level of the bit remaining in the stack, as follows:

2-9

MODULAR CONTROLLER CUSTOMIZATION GUIDE logical "1" = skip "n" lines logical "0" = no skip

| Operator

The absolute value operator will replace the top value on the stack ("C" or "H" type only) with its absolute value. If the value is positive no change will be made. If the value is negative, it will be made positive.

@ Indirect address symbol

The indirect address symbol is not a true operator. This symbol is used to designate a "B" data point as an indirect address pointer. The value of the data point is the actual address. This capability is particularly useful when the address can vary; being determined, computed, or modified at F-TRAN execution time.

Any B data point may operate as an indirect address pointer. The number that follows the indirect address symbol, @, is the data number of the data point. The value of this point should be used as the data number of the operand. As an example, L@73 where the value of B73 is 17 would be interpreted as L17. A further example of indirect addressing as used in an F-TRAN program is shown in Figure 2. This short program demonstrates a method of zeroing out many data point locations while conserving program space.

F* Pointer addressing

Pointer addressing is similar to indirect addressing in that the value desired is from a source referenced by the contents of the indicated datapoint. Pointer address can only be used with F datapoints as the source specifier. The F datapoint containing the source of the desired data is indicated by the number following the *. The contents of this F datapoint must be a string representing a legal datapoint. An example of pointer usage

C100 = F*28 where F28 contains the character string H52, and datapoint H52 contains the numeric value 27.75 after execution C100 would contain the numeric value 27.75.

2.4.4 Writing F-TRAN Expressions

2.4.4.1 Reverse Polish Notation

The F-TRAN program is written as a sequence of statements consisting mainly of expressions for various arithmetic data assignments, calculations, or logic decisions. These expressions are composed of a valid combination of operands and operators as selected from the F-TRAN Instruction

Set. Table 1 shows the operators available and what data types they use. The sequence in which the Modular Controller performs the particular calculation is dictated by the operation of the operand stack memory (part of the central processing unit of the computer). This operand stack (also referred to as a push-down stack) is a First In-Last Out type memory limited to a maximum of 12 positions. Stack positions required are dependent on data type as defined below. The number of positions retained in stack memory will change when a statement operator results in a computation or logical evaluation.

2-10

MODULAR CONTROLLER CUSTOMIZATION GUIDE

Data Type

L and B

C

H

A

F

Positions Required

1

3

5

10

5

F-TRAN statements must be written in Reverse Polish Notation (RPN). This is a form of post fix notation (commonly used in many engineering calculators) that conforms to the following rules:

1. Expressions in RPN are always evaluated from left to right; no parenthesis - no operator precedence.

2. The operator directly follows its operands. For comparison purposes, some examples of algebraic equations restated in RPN are given below.

Algebraic Equation

A + B

RPN

AB +

A (B + C)

A - B

BC + A *

AB -

A

B

+ C AB / C +

A

+B

C

AB + C /

2.4.4.2 Stack Memory Operation

The following example statement includes a combination of operands and operators from the F-

TRAN instruction set as used for a mathematical computation.

C33 = C01 C13

*

C12 +

The equal sign directs that we execute the right hand side of the statement and then replace the previous value of C33 with the solution value. Following the equal sign, reading from left to right, the computation would be executed as follows:

“C01”

“C13”

“*”

“C12”

1) Place the value of C01 in the stack memory (level 1).

2) Place the value of C13 in the stack memory (level 1),

pushing the value of C01 down to (level 2).

3) Remove and multiply the top two values in the stack

and place the resulting value back in the stack (level 1),

leaving (level 2) clear.

4) Place the value of C12 in the stack (level 1), pushing

the product value “C01 C13 *” down to (level 2).

2-11

MODULAR CONTROLLER CUSTOMIZATION GUIDE

“+” 5) Remove and add the top two values in the stack and

place resulting sum back in the stack (level 1), leaving

(level 2) clear.

6) End of statement, therefore remove the computed value

from the stack and make that data be the value assigned

to C33.

The operators (

*

and +) used in the above example, removed the top two values from the stack and, after performing the applicable mathematical operation, replaced the answer on the top of the stack. The procedure is similar for subtraction (-) and division (/).

2.4.5 Writing F-TRAN Statements

2.4.5.1 Assignment Statements

Assignment statements provide a method of setting any accessible operand to a value determined by an arithmetic expression.

Operand = Expression

Observe, however, that when the expression on the right hand side evaluates to a different data type than the left hand side, the instrument automatically expands or contracts the value to make it compatible with the operand type. An example of some valid statements would be:

1) C40 = C41

2) C03 = H03

3) H17 = C17

Compatible values.

In this case the H type value is automatically contracted to a C type.

In this case the C type value is automatically expanded to an H type.

4) C05 = L28 In this case the L type value is automatically expanded to an C type.

Some invalid statements would be:

1) B33 = A00 (byte numeric data) = alphanumeric string

2) C33 = C01

*

C13 + C12

3) L20 = L21 L22 : ; not in RPN not valid “L” operator

If the above statements were used, the compiler would report them as errors.

NOTE

Logical or numeric data can not be transposed to string data across the equal sign; and vise versa.

2-12

MODULAR CONTROLLER CUSTOMIZATION GUIDE

2.4.5.2 Comparison Statements

Two typical data comparison statements are given below. In the 2nd statement, the logical results of the two comparisons are then used for an “AND” ("&") operation according to conventional gate logic, as shown in the Truth Table.

1) L04 = C02 C23 :

2) L05 = C07 C23 : C06 C23 H05 $

*

: & where,

C07 C23 :

C06 C23 H05 $

*

:

Expression A

Expression B

“:”

Statement 1) is interpreted as follows:

If C02 is greater than or equal to C23 the statement is true; if not the statement is false. When the compare operator is executed , either a logic level “1" bit (true) or a logic level ”0" bit (false) will be replaced in the stack; leaving level 2 clear. The end of statement operator will then set logical L04 to that logic level resulting from the data comparison.

Statement 2) will be executed as follows;—reference Figure 3B.

“C07”

“C23”

1) Places the value of C07 in the stack memory (level 1).

2) Places the value of C23 in the stack (level 1), pushing

C07 down to (level 2).

“C06”

“C23”

“H05”

3) Removes the top two values on the stack and compares

them. If C07 is greater than or equal to C23 the expression

is true; if not the statement is false. A true statement will

transform to a logical “1” and a false statement will transform

to a logical “0”. The resulting logical is returned to the stack

memory (level 1) and is called “bit A”; the logical result of

Expression A. Stack memory (level 2) is now clear.

4) Places C06 in the stack memory, pushing bit A down to

(level 2).

5) Places C23 in the stack memory, pushing C06 to

(level 2) and bit A to (level 3).

6) Places H05 on the stack memory (level 1), pushing C23

to (level 2), C06 to (level 3) and bit A to (level 4).

“$”

“*”

7) Removes the top value from the stack, transforms the

8-digit data to 4-digit data, and then places the latter value

back in stack memory (level 1).

8) Removes and multiplies the top 2 values from the stack and

places the resulting data value back in (level 1).

2-13

MODULAR CONTROLLER CUSTOMIZATION GUIDE

“:”

“&”

9) Removes and compares the top two data values from the stack

memory. If the value of “C06” is greater than or equal to

“C23 H05 $

*

”, the statement is true; if not the statement is false.

A true statement will transform to a logical “1”, and a false

statement will transform to a logical “0”. The resulting logical is

returned to the stack (level 1) and is called bit B; the logical result

of Expression B. Bit A will now move up to stack (level 2).

10) Removes and performs the “AND” operation to the top two

values from the stack and then places the logical result

(“1” or “0”) back in stack memory (level 1). The output of the

AND Gate is called bit C. As shown in the Truth Table, if bit A

and bit B are both set to logic level “1”, the output of the AND

Gate will be a logical “1”. Any other combination of A and B

will result in setting bit C to a logical “0”.

11) End of statement; removes the logic bit from the

stack and sets L05 to that logic level that results from the

“AND” operation.

The “skip” instruction, Sxxx, may be used either when comparing two data values, when comparing two expressions, when checking the status of a logical, or when testing whether a data value is zero. When the statement evaluates true (1), the skip will be executed. The status of a logical can be tested by entering a statement such as:

L24 ? S05

If L24 is a logical “1”, the statement will evaluate true. The skip can be any number of lines either forward or backward. When L24 is a logical “0” (or false), the next statement will be executed (no skip). This logic can be altered by using the invert (!) operator to follow the operand as shown in the following example:

L24 ! ? S05

Backward skips (negative number of lines) count back from the statement or line. The instruction will be counted. S-115 will execute the 114th line ahead of the statement.

In this case if L24 is logical “0”, inverting it will make the statement true (skip). A comparison can be made to check whether a data value is zero. For example:

C02 Z ? S03

This statement means - if C02 is exactly zero, skip the Next 3 program statements.

2-14

MODULAR CONTROLLER CUSTOMIZATION GUIDE

The stack memory will operate as follows:

“C02”

“Z”

“?”

1) Places the value of C02 in stack memory (level 1).

2) Removes the value on the top of the stack and compares it

with zero (00.00). If the data value (C02) is exactly zero the

statement is true. This results in a data transform to a logical

“1” which is returned to the stack (level 1). Conversely, if the

statement is false (data value not exactly zero), then the

“Zero Check” will transform to a logical “0” which is placed in

stack memory (level 1).

“Zero Check” will result in a transform to a logical “0” which

is placed in stack memory (level 1).

3) The interrogation comment is ignored by the computer and

can be omitted when writing program statements in F-TRAN.

“S03” 4) Removes the logic bit on the top of the stack and if it is a

“logical 1” (true), skips 3 statements. If the statement is logical

“0” (false), it proceeds to the next statement.

2.4.5.3 Conditional Statements

The flow of the program can be made to follow one of two paths by employing a decision statement. As shown in Figure 5, the decision block is indicated by using a diamond in the flowchart.

Logically, a skip instruction is useful when comparing two floating point expressions (i.e., two totals; a byte and a literal; etc.).

Logical expressions can also be used to: set a discrete logic bit to a particular state; to cause “n” program statements to be skipped when a particular condition occurs; etc.

Conditional statements are instructions to the computer which, depending on the condition of one or more numerical expressions of logic states, cause the more proper one of two actions to be selected. Therefore, the statement commands a conditional transfer (skip) of program sequence as dictated by the status of a switch contact or the result of some mathematical operation. The resulting logic state determines whether or not the conditional statement will cause a skip to another instruction. For example:

Logical Decision , < L expression> Sxx

L24 ? S02

If L24 is logic level “1”, skip the next two program statements. If the status of L24 is logical “0”, execute the next instruction.

Comparisons , <expression> <expression> Sxx

“B”, “C”, or “H” type expressions can be used in conditional statements, e.g.,

(expression) > (expression). The implied comparison will result in a data transform to a logic bit. If the resulting logical is a level “1” (true statement), the skip instruction will be executed.

C00>C01 ? S06

2-15

MODULAR CONTROLLER CUSTOMIZATION GUIDE

If the value of C00 is greater than or equal to the value of C01, a logical “1” is placed in the stack memory. A skip will be executed only if the bit returned to memory is a “1”.

Certain symbols can be used in F-TRAN statements to make them easier to read. These include ?

and >. These symbols are ignored by the computer. For example, if the statement above was written without using these symbols it would appear as follows:

C00 C01 S06

2.4.5.4 IF-ELSE Statements

Logical IF statements are used to select one of two alternative branches of action which will occur in execution of the program, depending on whether or not a specific condition is met. The use of

“braces” following the conditional statement eliminates the need to count the number of lines to be skipped in the program. Use of the ELSE statement is optional. A second IF statement can be used to cause a conditional branch to follow the primary conditional statement . This program would appear as shown in the example program that follows. Note that when writing the program, indentations are used to indicate the operation(s) to be performed when the conditional statement evaluates true. When the statement evaluates false, a skip will occur to the closing brace of the respective conditional statement. This indentation system is used to make the program easier to read.

NOTE “IF” statement arguments must be a logical expression or be a single implied compare.

Example Program:

IF L25

{

C30 = C30 B03 % 10 % / +

IF C30>C12

{

L25 = 0

L26 = 1

C101 = C13

C30 = 0

}

}

2-16

MODULAR CONTROLLER CUSTOMIZATION GUIDE

2.4.5.5 WHILE Statement

When it is necessary to have an operation execute repeatedly while a particular condition is true

(i.e., = 1). the condition, in a WHILE statement, is specified in a logical expression. The operation is specified within brackets in the statement. The operation must modify the logical expression to exit the operation.

WHILE 10> B27

{

B27 = B27 1 +

}

2.4.5.6 Case Statements

Sometimes it is convenient to organize a program so that one out of a group of possible alternative program sections is executed, depending on the value of an index number. In F-TRAN this function is performed by the CASESOF statement.

When the CASESOF statement is encountered during F-TRAN execution, the value of the "B" datapoint is obtained and compared against the subsequent CASE values. When a match is found the section of code enclosed in brackets immediately after the CASE statement is executed. If none matching CASE is found the OTHERWISE code is executed. All CASESOF statements must contain an OTHERWISE. The OTHERWISE need not contain any code.

CASESOF B80

CASE 1

{

C100 = 1.0

CASE 2

}

{

C100 = 10.0

CASE 3

}

{

C100 = 100.0

}

OTHERWISE

{

}

NOTE

CASESOF statements must use an explicit Bxx (i.e., no computed values).

2-17

MODULAR CONTROLLER CUSTOMIZATION GUIDE

2.4.5.7 Unconditional Jump Statements Jxxx

The unconditional jump statement is used to control the transfer of operations from one point to another in the program (or subroutine). The unconditional jump instructs the computer to depart from the regular sequence of instruction execution and jump to another point in the program. The unconditional jump can be any number of lines either forward or backward.

NOTE: Backward jumps (negative numbers) count back from the statement or line.

(J-115 will execute the 114th line ahead of the statement).

2.4.5.8 Subroutine Call Statement

A subroutine call statement can be inserted in programs to cause the computer to depart from the program and perform one of the subroutines stored in the Subroutine Library. When the subroutine is concluded, the program execution is resumed. As previously discussed, the Subroutine Library is indexed to identify the individual subroutines (Ref: G000 - Gxxx). To call a particular subroutine, list the applicable subroutine index number in the program.

2.4.5.9 End Statement

At the end of the F-TRAN program a final statement must be used to indicate that program execution is complete. The end statement, E, performs this operation and can be used only once in the program.

2.4.5.10 Return Statement

Return statement "R" must be used in F-TRAN subroutine to indicate that the subroutine is complete and that execution should continue with the statement following the subroutine call. The last statement in the subroutine must be an "E" and the statement before the "E" must be an "R".

2.4.5.11 Display Statements

NOTE

Display Statements may only be used in Display F-TRAN programs. If used in a Control F-TRAN program,they will be ignored.

Keywords on the operation of F-TRAN operators.

MOVXY

MOVXY <x coordinate> <y coordinate>

This command positions the cursor to the specified x-y coordinates. The cursor specifies the upper left corner of a character cell. Drawing commands (vbar, hbar, htrend, vtrend) are also relative to the current cursor position. See the individual command for details. The "x" direction is from left to right with values of 0-47. The "y" direction is from top to bottom with values of 0-95. Both x and y coordinates must be "B" type expressions.

For example:

MOVXY 16 35

MOVXY B30 35

MOVXY B17 B20 16

*

8 +

2-18

MODULAR CONTROLLER CUSTOMIZATION GUIDE

VBAR

HBAR

CLEAR

PRINTn

VBAR <height> <max. height> <width>

This function draws a vertical bargraph at the current x, y coordinates.

Height is the actual desired height in dots. Maximum height is the maximum height the bar can be in dots. Width is the width of the bar in dots. These three parameters must be "B" type expressions.

For example:

VBAR C00 100.0 / 64.0

*

$ 64 2

VBAR 100 B20 B21

HBAR <width> <max. width> <height>

This function draws a horizontal bargraph at the current x, y coordinates.

Width is the actual desired width in dots. Maximum width is the maximum width the bar can be in dots. Height is the height of the bar in dots. These three parameters must be "B" type expression.

CLEAR

This command erases the entire screen and moves the cursor to the 0 0 location.

This command outputs to the display the value of the designated datapoint or literal expression. It also updates the cursor position to be the point following the last character printed. The number of characters to be printed is based on the type of data to be printed, the cursor position and the character set designated. When the cursor x position is less than one character position from the right edge of the screen before all characters are printed the command is terminated. L and B datatypes have a fixed number of characters, one and three respectfully. A and F datatypes print as many characters as they contain, 0 to 10 or 0 to 5 respectfully. C and H datatypes are printed as 10 characters or as specified by the n parameter (5-9).

PRINT A12 - will print the contents of A12

PRINT “HI” - will print the string HI

PRINT F

*

5 - will print the value of the datapoint pointed to by the value of F5

PRINT C170 - will print the value of C170 as a 10 character string

PRINT ’B10’ - will print the ASCII character represented by the value in B10

PRINT5 H22 - will print the value of H22 as a 5 character string

Characters written to the display screen are defined in a rectangular area referred to as a cell. The 53MC5xxxB provides four cell sizes (character sets) 6x8, 4x8, 12x16 and 8x16. The 53MC5xxxA only supports the first two cell sizes. When a character is written to the display it replaces the entire cell area. Cell selections for controller display are specified by the following values of B09:

0 - 6x8

1 - 4x8

2 - 6x8 (user defined)

3 - 12x16

4 - 8x16

* To print in reverse video add 128 to value.

Refer to the Appendices Section for Character Sets.

2-19

MODULAR CONTROLLER CUSTOMIZATION GUIDE

INPUT

SCREEN

PUTDOT

CLRDOT

HTREND

INPUT <string expression>

This command transfers the value of the datapoint specified by the string expression to the engineering mode modify line and forces the unit into engineering modify mode.

Each invocation initializes the modify buffers therefore it must be invoked by a one shot operation to avoid continual re-initialization of the buffer’s value.

INPUT F20 - will permit modification of the value in the datapoint specified by F20

INPUT “C15” - will permit modification of the value of C15

INPUT A7 - will permit modification of the value in the datapoint specified by A07

INPUT “F20” - will permit modification of the value of F20

INPUT F@12 - will permit modification of the value in the datapoint specified by

"F" datapoint specified by B12

This command draws the screen image specified by the screen number. A screen is a predefined 48 x 96 element cell. With run-time translation active, screens are expanded to 96 x 192 to fill a HiRes display. With run-time translation inactive, the

48 x 96 cell is drawn with the current cursor position as the upper left corner. Screens are designed and defined as a part of the program development process.

SCREEN <screen-number>

This command draws the screen image specified by screen-number.

Screen-number must be a B type expression.

SCREEN&<screen-number>

This command works the same as the screen command except the image is

"AND"ed with current screen contents.

SCREENX<screen-number>

This command works the same as the screen command except the image "OR"ed with current screen contents.

SCREEN’<screen-number>

This command works the same as the screen command except the image "Exclusive

OR"ed with current screen contents.

PUTDOT<x coordinate><y coordinate>

This command turns on the dot at the specified coordinate.

Both the <x coordinate> and <y coordinate> parameters must be B type expressions.

CLRDOT<x coordinate><y coordinate>

This command turns off the dot at the specified coordinate.

Both the <x coordinate> and <y coordinate> parameters must be B type expressions.

HTREND <0-7>

This command draws the designated trend. It treats the current cursor position as the 0,0 origin. The time line increases toward the left. Maximum vertical plot above origin is specified by the height parameter in the corresponding trend module.

This overwrites current screen contents.

2-20

MODULAR CONTROLLER CUSTOMIZATION GUIDE

VTREND

VTREND <0-7>

This command draws the designated trend. It locates the origin of the plot at "0", cursor "y". The time line increases in the down direction. Maximum horizontal plot to the right of origin is specified by the height parameter in the corresponding trend module. This overwrites current screen contents.

2-21

MODULAR CONTROLLER CUSTOMIZATION GUIDE

2.5 Subroutine Library

G00 - Setpoint Generator-0

G01 - Setpoint Generator-1

G02 - Setpoint Generator-2

G03 - Setpoint Generator-3

G04 - Deviation/Alarm Calculation-0

G05 - Deviation/Alarm Calculation-1

G06 - Deviation/Alarm Calculation-2

G07 - Deviation/Alarm Calculation-3

G08 - PID-0

G09 - PID-1

G10 - PID-2

G11 - PID-3

G12 - Auto/Manual Switch-0

G13 - Auto/Manual Switch-1

G14 - Auto/Manual Switch-2

G15 - Auto/Manual Switch-3

G22 - Display Handler

2-22

MODULAR CONTROLLER CUSTOMIZATION GUIDE

G00

SETPOINT GENERATOR - 0

INPUTS

PARAMETERS

REMOTE SETPOINT

REMOTE SP ENABLE

SETPOINT TRACK INPUT

SETPOINT TRACK SWITCH

SETPOINT TRACK ENABLE

REMOTE GAIN

REMOTE BIAS

INSTRUMENT RANGE

SETPOINT HI LIMIT

SETPOINT LOW LIMIT

RSP0

RE0

STV0

SWSPT0

STE0

K10

B10

IR0

SH0

SL0

OUTPUTS

SETPOINT TRACK STATUS

REMOTE STATUS

SPTS0

RMT0

C120

L115

C128

L116

L118

C113

C112

C115

C125

C126

L104

L108

Description:

This subroutine selects one of three signals to load into SP. The signal selected is either the Setpoint Track Value (STV), the Remote Setpoint (RSP) after being multiplied by K1 and biased by B1 or the Setpoint Pushbutton Value. If the Setpoint

Track Switch (SWSPT) is zero (0) then SP = STV when Setpoint Tracking is enabled

(STE=1). When the previous condition is not in effect SP will equal (RSP x K1) + B1 if Remote Enable = 1 and the R/L pushbutton has set the Remote Switch to 1. When none of the previous conditions are in effect the signal comes directly from the setpoint increase and decrease pushbuttons.

2-23

MODULAR CONTROLLER CUSTOMIZATION GUIDE

G01

SETPOINT GENERATOR - 1

INPUTS

PARAMETERS

REMOTE SETPOINT

REMOTE SP ENABLE

SETPOINT TRACK INPUT

SETPOINT TRACK SWITCH

SETPOINT TRACK ENABLE

REMOTE GAIN

REMOTE BIAS

INSTRUMENT RANGE

SETPOINT HI LIMIT

SETPOINT LOW LIMIT

RSP1

RE1

STV1

SWSPT1

STE1

K11

B11

IR1

SH1

SL1

C156

L139

C164

L140

L142

C149

C148

C151

C161

C162

OUTPUTS

SETPOINT TRACK STATUS

REMOTE STATUS

SPTS1

RMT1

L128

L132

Description:

This subroutine selects one of three signals to load into SP. The signal selected is either the Setpoint Track Value (STV), the Remote Setpoint (RSP) after being multiplied by K1 and biased by B1 or the Setpoint Pushbutton Value. If the Setpoint

Track Switch (SWSPT) is zero (0) then SP = STV when Setpoint Tracking is enabled

(STE=1). When the previous condition is not in effect SP will equal (RSP x K1) + B1 if Remote Enable = 1 and the R/L pushbutton has set the Remote Switch to 1. When none of the previous conditions are in effect the signal comes directly from the setpoint increase and decrease pushbuttons.

2-24

MODULAR CONTROLLER CUSTOMIZATION GUIDE

G02

SETPOINT GENERATOR - 2

INPUTS

PARAMETERS

REMOTE SETPOINT

REMOTE SP ENABLE

SETPOINT TRACK INPUT

SETPOINT TRACK SWITCH

SETPOINT TRACK ENABLE

REMOTE GAIN

REMOTE BIAS

INSTRUMENT RANGE

SETPOINT HI LIMIT

SETPOINT LOW LIMIT

RSP2

RE2

STV2

SWSPT2

STE2

K12

B12

IR2

SH2

SL2

OUTPUTS

SETPOINT TRACK STATUS

REMOTE STATUS

SPTS2

RMT2

C192

L163

C200

L164

L166

C185

C184

C187

C197

C198

L152

L156

Description:

This subroutine selects one of three signals to load into SP. The signal selected is either the Setpoint Track Value (STV), the Remote Setpoint (RSP) after being multiplied by K1 and biased by B1 or the Setpoint Pushbutton Value. If the Setpoint

Track Switch (SWSPT) is zero (0) then SP = STV when Setpoint Tracking is enabled

(STE=1). When the previous condition is not in effect SP will equal (RSP x K1) + B1 if Remote Enable = 1 and the R/L pushbutton has set the Remote Switch to 1. When none of the previous conditions are in effect the signal comes directly from the setpoint increase and decrease pushbuttons.

2-25

MODULAR CONTROLLER CUSTOMIZATION GUIDE

G03

SETPOINT GENERATOR - 3

INPUTS

PARAMETERS

REMOTE SETPOINT

REMOTE SP ENABLE

SETPOINT TRACK INPUT

SETPOINT TRACK SWITCH

SETPOINT TRACK ENABLE

REMOTE GAIN

REMOTE BIAS

INSTRUMENT RANGE

SETPOINT HI LIMIT

SETPOINT LOW LIMIT

RSP3

RE3

STV3

SWSPT3

STE3

K13

B13

IR3

SH3

SL3

OUTPUTS

SETPOINT TRACK STATUS

REMOTE STATUS

SPTS3

RMT3

C228

L187

C236

L188

L190

C221

C220

C223

C233

C234

L176

L180

Description:

This subroutine selects one of three signals to load into SP. The signal selected is either the Setpoint Track Value (STV), the Remote Setpoint (RSP) after being multiplied by K1 and biased by B1 or the Setpoint Pushbutton Value. If the Setpoint

Track Switch (SWSPT) is zero (0) then SP = STV when Setpoint Tracking is enabled

(STE=1). When the previous condition is not in effect SP will equal (RSP x K1) + B1 if Remote Enable = 1 and the R/L pushbutton has set the Remote Switch to 1. When none of the previous conditions are in effect the signal comes directly from the setpoint increase and decrease pushbuttons.

2-26

INPUTS

PARAMETERS

OUTPUTS

MODULAR CONTROLLER CUSTOMIZATION GUIDE

NAME

SETPOINT

PROCESS VARIABLE

SETPOINT SLEW RATE

CONTROL ZONE

ALARM INDEX

ALARM LIMIT 1

ALARM LIMIT 2

ALARM DEADBAND

DEVIATION

ALARM A

ALARM B

G04

DEVIATION/ALARM CALCULATION - 0

SYMBOL

SP0

PV0

T10

CZ0

AIX0

PL10

PL20

ADB0

DATAPOINT

C101

C100

C117

C114

B335

C103

C104

C105

DV0

PA10

PA20

C121

L110

L111

Description:

This subroutine calculates and loads the deviation value based on setpoint (SP) and process variable (PV). Before the calculation is performed the setpoint value is conditioned so as not to exceed the rate of change limit specified by T1. If the calculated deviation falls within the CZ value, then deviation is forced to 0.0. This module also determines if alarm conditions exist based on AIX, PL1, PL2 and ADB.

Results of the alarm tests are loaded to PA1 and PA2. Refer to Section 4.1.6 of

Instruction Bulletin 53MC5000 for an explanation of AIX values.

2-27

MODULAR CONTROLLER CUSTOMIZATION GUIDE

G05

DEVIATION/ALARM CALCULATION - 1

INPUTS

PARAMETERS

NAME

SETPOINT

PROCESS VARIABLE

SETPOINT SLEW RATE

CONTROL ZONE

ALARM INDEX

ALARM LIMIT 1

ALARM LIMIT 2

ALARM DEADBAND

OUTPUTS

DEVIATION

ALARM A

ALARM B

SYMBOL

SP1

PV1

T11

CZ1

AIX1

PL11

PL21

ADB1

DV1

PA11

PA21

DATAPOINT

C137

C136

C153

C150

B340

C139

C140

C141

C157

L134

L135

Description:

This subroutine calculates and loads the deviation value based on setpoint (SP) and process variable (PV). Before the calculation is performed the setpoint value is conditioned so as not to exceed the rate of change limit specified by T1. If the calculated deviation falls within the CZ value, then deviation is forced to 0.0. This module also determines if alarm conditions exist based on AIX, PL1, PL2 and ADB.

Results of the alarm tests are loaded to PA1 and PA2. Refer to Section 4.1.6 of

Instruction Bulletin 53MC5000 for an explanation of AIX values.

2-28

INPUTS

PARAMETERS

OUTPUTS

MODULAR CONTROLLER CUSTOMIZATION GUIDE

NAME

SETPOINT

PROCESS VARIABLE

SETPOINT SLEW RATE

CONTROL ZONE

ALARM INDEX

ALARM LIMIT 1

ALARM LIMIT 2

ALARM DEADBAND

DEVIATION

ALARM A

ALARM B

G06

DEVIATION/ALARM CALCULATION - 2

SYMBOL

SP2

PV2

T12

CZ2

AIX2

PL12

PL22

ADB2

DATAPOINT

C173

C172

C189

C186

B345

C175

C176

C177

DV2

PA12

PA22

C193

L158

L159

Description:

This subroutine calculates and loads the deviation value based on setpoint (SP) and process variable (PV). Before the calculation is performed the setpoint value is conditioned so as not to exceed the rate of change limit specified by T1. If the calculated deviation falls within the CZ value, then deviation is forced to 0.0. This module also determines if alarm conditions exist based on AIX, PL1, PL2 and ADB.

Results of the alarm tests are loaded to PA1 and PA2. Refer to Section 4.1.6 of

Instruction Bulletin 53MC5000 for an explanation of AIX values.

2-29

MODULAR CONTROLLER CUSTOMIZATION GUIDE

G07

DEVIATION/ALARM CALCULATION - 3

INPUTS

PARAMETERS

NAME

SETPOINT

PROCESS VARIABLE

SETPOINT SLEW RATE

CONTROL ZONE

ALARM INDEX

ALARM LIMIT 1

ALARM LIMIT 2

ALARM DEADBAND

OUTPUTS

DEVIATION

ALARM A

ALARM B

SYMBOL

SP3

PV3

T13

CZ3

AIX3

PL13

PL23

ADB3

DV3

PA13

PA23

DATAPOINT

C209

C208

C225

C222

B350

C211

C212

C213

C229

L182

L183

Description:

This subroutine calculates and loads the deviation value based on setpoint (SP) and process variable (PV). Before the calculation is performed the setpoint value is conditioned so as not to exceed the rate of change limit specified by T1. If the calculated deviation falls within the CZ value, then deviation is forced to 0.0. This module also determines if alarm conditions exist based on AIX, PL1, PL2 and ADB.

Results of the alarm tests are loaded to PA1 and PA2. Refer to Section 4.1.6 of

Instruction Bulletin 53MC5000 for an explanation of AIX values.

2-30

MODULAR CONTROLLER CUSTOMIZATION GUIDE

INPUTS

PARAMETERS

OUTPUTS

NAME

PROCESS VARIABLE

DEVIATION

RESET FEEDBACK

CONTROL TRACK

COMMAND

PROPORTIONAL BAND

RESET TIME

RATE TIME

OUTPUT HIGH LIMIT

OUTPUT LOW LIMIT

MANUAL RESET

INSTRUMENT RANGE

FEED FORWARD

REVERSE SWITCH

CONTROL OUTPUT

SYMBOL

PV0

DV0

RF0

CTC0

PB0

TR0

TD0

OH0

OL0

MR0

IR0

FF0

RSW0

CO0

DATAPOINT

C100

C121

C127

L123

C106

C107

C108

C109

C110

C111

C115

C122

L106

C123

G08

PID - 0

Description:

This subroutine computes a control output signal based on the above listed inputs and parameters. The result is available as a database parameter CO. When the control track command is zero,the module output will track the reset feedback by back calculating the integrator term. When CTC is 1, the reset feedback is used by the integrator to calculate the next output and should reflect the value (scaled

0-100%) of the value of the final control element. For standard PID controller operation, reset feedback should equal OUT and control track command should equal AUT.

2-31

MODULAR CONTROLLER CUSTOMIZATION GUIDE

G09

PID - 1

INPUTS

PARAMETERS

OUTPUTS

NAME

PROCESS VARIABLE

DEVIATION

RESET FEEDBACK

CONTROL TRACK

COMMAND

PROPORTIONAL BAND

RESET TIME

RATE TIME

OUTPUT HIGH LIMIT

OUTPUT LOW LIMIT

MANUAL RESET

INSTRUMENT RANGE

FEED FORWARD

REVERSE SWITCH

CONTROL OUTPUT

SYMBOL

PV1

DV1

RF1

CTC1

PB1

TR1

TD1

OH1

OL1

MR0

IR1

FF1

RSW1

CO1

DATAPOINT

C136

C157

C163

L147

C142

C143

C144

C145

C146

C147

C151

C158

L130

C159

Description:

This subroutine computes a control output signal based on the above listed inputs and parameters. The result is available as a database parameter CO. When the control track command is zero,the module output will track the reset feedback by back calculating the integrator term. When CTC is 1, the reset feedback is used by the integrator to calculate the next output and should reflect the value (scaled

0-100%) of the value of the final control element. For standard PID controller operation, reset feedback should equal OUT and control track command should equal AUT.

2-32

MODULAR CONTROLLER CUSTOMIZATION GUIDE

INPUTS

PARAMETERS

OUTPUTS

NAME

PROCESS VARIABLE

DEVIATION

RESET FEEDBACK

CONTROL TRACK

COMMAND

PROPORTIONAL BAND

RESET TIME

RATE TIME

OUTPUT HIGH LIMIT

OUTPUT LOW LIMIT

MANUAL RESET

INSTRUMENT RANGE

FEED FORWARD

REVERSE SWITCH

CONTROL OUTPUT

SYMBOL

PV2

DV2

RF2

CTC2

PB2

TR2

TD2

OH2

OL2

MR2

IR2

FF2

RSW2

CO2

DATAPOINT

C172

C193

C199

L171

C178

C179

C180

C181

C182

C183

C187

C194

L154

C195

G10

PID - 2

Description:

This subroutine computes a control output signal based on the above listed inputs and parameters. The result is available as a database parameter CO. When the control track command is zero,the module output will track the reset feedback by back calculating the integrator term. When CTC is 1, the reset feedback is used by the integrator to calculate the next output and should reflect the value (scaled

0-100%) of the value of the final control element. For standard PID controller operation, reset feedback should equal OUT and control track command should equal AUT.

2-33

MODULAR CONTROLLER CUSTOMIZATION GUIDE

G11

PID - 3

INPUTS

PARAMETERS

OUTPUTS

NAME

PROCESS VARIABLE

DEVIATION

RESET FEEDBACK

CONTROL TRACK

COMMAND

PROPORTIONAL BAND

RESET TIME

RATE TIME

OUTPUT HIGH LIMIT

OUTPUT LOW LIMIT

MANUAL RESET

INSTRUMENT RANGE

FEED FORWARD

REVERSE SWITCH

CONTROL OUTPUT

SYMBOL

PV3

DV3

RF3

CTC3

PB3

TR3

TD3

OH3

OL3

MR3

IR3

FF3

RSW3

CO3

DATAPOINT

C208

C229

C235

L195

C214

C215

C216

C217

C218

C219

C223

C230

L178

C231

Description:

This subroutine computes a control output signal based on the above listed inputs and parameters. The result is available as a database parameter CO. When the control track command is zero,the module output will track the reset feedback by back calculating the integrator term. When CTC is 1, the reset feedback is used by the integrator to calculate the next output and should reflect the value (scaled

0-100%) of the value of the final control element. For standard PID controller operation, reset feedback should equal OUT and control track command should equal AUT.

2-34

INPUTS

PARAMETERS

OUTPUTS

MODULAR CONTROLLER CUSTOMIZATION GUIDE

NAME

CONTROL OUTPUT

AUTO ENABLE

OUTPUT TRACK VALVE

OUTPUT TRACK SWITCH

OUTPUT TRACK ENABLE

HARD MANUAL LIMIT

OUTPUT HIGH LIMIT

OUTPUT LOW LIMIT

OUTPUT SLEW RATE

OUTPUT

OUTPUT TRACK STATUS

AUTO STATUS

SYMBOL

CO0

AE0

OTV0

SWOTV0

OTE0

HML0

OH0

OL0

T30

G12

AUTO/MANUAL SWITCH - 0

DATAPOINT

C123

L114

C129

L117

L119

L122

C109

C110

C118

OUT0

OVTS0

AUT0

C102

L105

L107

Description:

The AUTO/MAN Switch selects one of three signals to load into OUT. The signal selected is either the Output Tracking Value (OTV), the Auto Value (CO) or the

Manual Pushbutton Value. If the Output Tracking Switch (SWOUT) is zero (0) then

OUT = OTV when Output Tracking is enabled (OTE = 1). When the previous condition is not in effect OUT will equal CO if Auto Enable = 1 and the A/M pushbutton has set the Auto Switch to 1. When neither previous condition is in effect the selected signal comes directly from the output increase and decrease pushbuttons.

2-35

MODULAR CONTROLLER CUSTOMIZATION GUIDE

G13

AUTO/MANUAL SWITCH - 1

INPUTS

PARAMETERS

NAME

CONTROL OUTPUT

AUTO ENABLE

OUTPUT TRACK VALVE

OUTPUT TRACK SWITCH

OUTPUT TRACK ENABLE

HARD MANUAL LIMIT

OUTPUT HIGH LIMIT

OUTPUT LOW LIMIT

OUTPUT SLEW RATE

OUTPUTS

OUTPUT

OUTPUT TRACK STATUS

AUTO STATUS

SYMBOL

CO1

AE1

OTV1

SWOTV1

OTE1

HML1

OH1

OL1

T31

OUT1

OVTS1

AUT1

DATAPOINT

C159

L138

C165

L141

L143

L146

C145

C146

C154

C138

L129

L131

Description:

The AUTO/MAN Switch selects one of three signals to load into OUT. The signal selected is either the Output Tracking Value (OTV), the Auto Value (CO) or the

Manual Pushbutton Value. If the Output Tracking Switch (SWOUT) is zero (0) then

OUT = OTV when Output Tracking is enabled (OTE = 1). When the previous condition is not in effect OUT will equal CO if Auto Enable = 1 and the A/M pushbutton has set the Auto Switch to 1. When neither previous condition is in effect the selected signal comes directly from the output increase and decrease pushbuttons.

2-36

INPUTS

PARAMETERS

OUTPUTS

MODULAR CONTROLLER CUSTOMIZATION GUIDE

NAME

CONTROL OUTPUT

AUTO ENABLE

OUTPUT TRACK VALVE

OUTPUT TRACK SWITCH

OUTPUT TRACK ENABLE

HARD MANUAL LIMIT

OUTPUT HIGH LIMIT

OUTPUT LOW LIMIT

OUTPUT SLEW RATE

OUTPUT

OUTPUT TRACK STATUS

AUTO STATUS

SYMBOL

CO2

AE2

OTV2

SWOTV2

OTE2

HML2

OH2

OL2

T32

G14

AUTO/MANUAL SWITCH - 2

DATAPOINT

C195

L162

C201

L165

L167

L170

C181

C182

C190

OUT2

OVTS2

AUT2

C174

L153

L155

Description:

The AUTO/MAN Switch selects one of three signals to load into OUT. The signal selected is either the Output Tracking Value (OTV), the Auto Value (CO) or the

Manual Pushbutton Value. If the Output Tracking Switch (SWOUT) is zero (0) then

OUT = OTV when Output Tracking is enabled (OTE = 1). When the previous condition is not in effect OUT will equal CO if Auto Enable = 1 and the A/M pushbutton has set the Auto Switch to 1. When neither previous condition is in effect the selected signal comes directly from the output increase and decrease pushbuttons.

2-37

MODULAR CONTROLLER CUSTOMIZATION GUIDE

G15

AUTO/MANUAL SWITCH - 3

INPUTS

PARAMETERS

NAME

CONTROL OUTPUT

AUTO ENABLE

OUTPUT TRACK VALVE

OUTPUT TRACK SWITCH

OUTPUT TRACK ENABLE

HARD MANUAL LIMIT

OUTPUT HIGH LIMIT

OUTPUT LOW LIMIT

OUTPUT SLEW RATE

OUTPUTS

OUTPUT

OUTPUT TRACK STATUS

AUTO STATUS

SYMBOL

CO3

AE3

OTV3

SWOTV3

OTE3

HML3

OH3

OL3

T33

OUT3

OVTS3

AUT3

DATAPOINT

C231

L186

C237

L189

L191

L194

C217

C218

C226

C210

L177

L179

Description:

The AUTO/MAN Switch selects one of three signals to load into OUT. The signal selected is either the Output Tracking Value (OTV), the Auto Value (CO) or the

Manual Pushbutton Value. If the Output Tracking Switch (SWOUT) is zero (0) then

OUT = OTV when Output Tracking is enabled (OTE = 1). When the previous condition is not in effect OUT will equal CO if Auto Enable = 1 and the A/M pushbutton has set the Auto Switch to 1. When neither previous condition is in effect the selected signal comes directly from the output increase and decrease pushbuttons.

2-38

PARAMETERS

OUTPUTS

MODULAR CONTROLLER CUSTOMIZATION GUIDE

NAME

NUMBER OF DISPLAY

GROUPS

NUMBER OF

SCREENS/GROUP

CURRENT DISPLAY

CURRENT DISPLAY STATE

DISPLAY LIST

DISPLAY PROGRAM

SYMBOL

MDG

MDS

CDP

CDS

DSPL

G22

DISPLAY HANDLER

DATAPOINT

B17

B18

B19

B20

B21 thru B84

B05

Description:

This subroutine sequences through a selected list of displays based on operation function keys F1 and F2. See Instruction Bulletin 53MC5000 for operational details.

It also clears the horn bit if silence bit is active.

2-39

MODULAR CONTROLLER CUSTOMIZATION GUIDE

2.6 F-TRAN Program Capacity

Program capacity has two aspects. It refers to that portion of non-volatile memory which can be loaded with; Control F-TRAN programs, Display F-TRAN programs, User written F-TRAN subroutines, Custom static screen images, Custom character set, the F-CIM program and User written

F-CIM modules. In addition it refers to the maximum number of resident entities at any one time.

The following table indicates the maximum number for each usage of the program space.

Control F-TRAN programs

Display F-TRAN programs

User written F-TRAN subroutines

Custom static screen images

F-CIM programs

20

70

56

20

1

F-CIM modules are special User written F-TRAN subroutines and thus are counted as the same. A

Custom character set is a special implementation of the first Custom static screen image (SCREEN0) and is therefore counted as a screen.

The total amount of memory reserved for programming entities is 15,872 bytes. This portion of memory is allocated to individual entities during a procedure referred to as linking. Linking takes those individually generated programming entities listed in an input file and combines them into a single downloadable file.

The procedures for generating individual programming entities and linking, and then downloading them is explained in the documentation supplied with the various program generation tools. The procedures in general can be summarized as follow:

A. Programs, Subroutines and F-CIM modules

1. Using an editor such as EDLIN on a MS-DOS compatible computer, generate a program as a text file.

2. Using the preprocessor (FPP) and appropriate compiler (CPILE6) generate a

HEX output file.

B. Static screens and Custom character set

1. Using MC5DRAW program on a MS-DOS compatible computer to generate either a screen or character set output HEX file.

C. Make downloadable program file

1. Using LINKPRGM program on a MS-DOS compatible computer generate the

HEX output file.

D. Load program

1. Using DOWNLOADP program on a MS-DOS compatible computer connected to the units Configurer port or Datalink port load the LINKPRGM output file into the unit.

2-40

MODULAR CONTROLLER CUSTOMIZATION GUIDE

A user friendly interface for performing these activities is provide in the 53SU5000 SUPERVISOR-PC and 53HC3300C CUSTOM PROGRAM INTERFACE Instruction Bulletins. Both of these bulletins contain the individual computer programs mentioned.

2-41

MODULAR CONTROLLER CUSTOMIZATION GUIDE

2.7 Summary, F-TRAN Instruction Set

LEGENDS: Symbols used in this discussion.

< >Used to enclose an expression

| Separates possible alternatives

Expressions — combination of operators and operands

Rule: Reverse Polish Notation

Legitimate expressions are defined as follows:

B expression = < B operand > | < B expression B expression B operator >|

< C operand $ > | < H operand $ $ > | < B literal >

C expression = < C operand > | < B expression % > | < H operand $ > |

< C expression C expression C operator > | < C literal >

H expression = < H operand > | < C expression % > |

< B expression % % >

L expression = < L operand > | < L expression L unary operator > |

< L expression L expression L binary operator > |

< C expression C expression : > |

< B expression B expression : > | < B expression Q > |

< H expression H expression : > | < B expression Z > |

< C expression Z > | < H expression Z >

A expression = < A operand > | < A literal >

F expression = < F operand > | < F literal >

NOTE : A binary operator requires two operands (such as an AND gate);

a unary operator requires only one operand (such as an

INVERT).

NOTE: The expression on the right side must be an operand (i.e., no

computed data).

2-42

MODULAR CONTROLLER CUSTOMIZATION GUIDE

2.7.1 Statements

Composed of operands and expressions

2.7.2 Assignment Statements

NOTE: In cases where the right side of the statement is a different type

than the left side, the instrument will truncate or expand the

right side to make it compatible.

B operand = < B expression > | < C expression > | < H expression > | < L expression >

C operand = < C expression > | < B expression > | < H expression > | < L expression >

H operand = < H expression > | < C expression > | < B expression > | < L expression >

L operand = < L expression > | < B expression > | < C expression > | < H expression >

A operand = < A expression > | < F expression >

F operand = < F expression > | < A expression >

2.7.3 Conditional Statements

1) < Logical expression > Sxxx

2) < B expression > < B expression > Sxxx

3) < C expression > < C expression > Sxxx

4) < H expression > < H expression > Sxxx

2.7.4 IF Statements

IF < logical expression >

{

}

ELSE (optional)

{

}

2-43

MODULAR CONTROLLER CUSTOMIZATION GUIDE

2.7.5 While Statements

WHILE < logical expression >

{

}

2.7.6 Case Statements

CASESOF < B operand >

CASE

{

}

CASE

{

}

.

.

.

OTHERWISE

{

}

2-44

MODULAR CONTROLLER CUSTOMIZATION GUIDE

2.8 A Programming Example

The following is a program text file that illustrates the use of the F-TRAN language in building a simple single loop controller. This text is converted to the run time program using the

MicroMod programming utilities (FPP, CPILE6, LINK) available in 53HC3300C or with 53SU5000 Rev. 3.

#define

AI0 H00

#define

AI1 H01

#define

AO0 C00

#define

PV C100

#define

OUT C102

#define

RSP C120

#define

RFC 127

#define

AUT L107

#define

CTC L123

#define

SPGEN G00

#define

DVGEN G04

#define PID

G08

#define

AMSW G12

#define

DISPL G22

PV = AI0

\READ PROCESS VARIABLE FROM AI0\

RSP = AI1

\READ REMOTE SETPOINT FROM AI1\

RF = OUT

\SET RESET FEEDBACK EQUAL TO LAST OUTPUT\

CTC = AUT

\SET RESET TRACKING BASED ON AUTO-MANUAL SELECTION\

SPGEN

\SETPOINT GENERATOR SUBROUTINE\

DVGE

N \DEVIATION GENERATOR SUBROUTINE\

PID

\PID CONTROLLER CALCULATION SUBROUTINE\

AMSW

\AUTO-MANUAL SELECTOR SUBROUTINE\

DISPL

\DISPLAY SEQUENCING SUBROUTINE\

AO0 = OUT

\COPY CONTROL OUTPUT TO OUTPUT HARDWARE\

E

2-45

MODULAR CONTROLLER CUSTOMIZATION GUIDE

3.0 F-CIM (CONTROL INTERCONNECTION MODULES)

Control Interconnection Modules provide a method of customizing the 53MC5000 (Extended Functionality) controller that is more flexible than the FIX 1 Flexible Control Strategy but not as flexible as

F-TRAN programming.

F-CIM loop generation is a building block method for implementing control configurations. F-CIM programing does not require knowledge of computer languages or programming experience. Control

Strategies are implemented by choosing prewritten modules from the module library and interconnecting them to perform the desired function.

When the Function Index B00 is set to 99 a sequence of up to 100 modules is continuously executed at the rate specified by SCAN B03.

Each F-CIM is defined in the Module Library in this chapter. The modules include:

• General Modules: read write display

• Numerical Operations: pre-written selectable equations add, subtract, multiply, divide square root log (base2)

X to the power Y absolute value

• Logical Operations:

AND

OR

EXCLUSIVE OR

• Control Modules: setpoint generator process variable deviation

PID algorithm auto/manual switching

There is a page in this chapter for each F-CIM; these pages list the inputs and outputs available, as well as allowable associated database parameters. A function block diagram is also shown.

To use F-CIM programming:

1. Define the process control function to be implemented.

2. Become familiar with the capabilities of the function blocks in the Module Library in this chapter.

3. Draw a function block diagram using these function blocks.

4. Enter data on a work sheet. (Blank worksheets are provided in the back of the manual.)

5. Enter the function block input values and parameters into the database.

A sample F-CIM program is shown in Section 3.4.

3-1

MODULAR CONTROLLER CUSTOMIZATION GUIDE

3.1 Configuring a F-CIM sequence

F-CIM sequences can be configured using four different methods:

1. From the controller’s front panel using the procedure described in Section 3.3.

2. From a PC compatible computer running the MC5FIG.EXE program included with the

model 53HC3300D software package. Refer to Instruction Bulletin 53HC3300 for the

exact procedure.

3. From the Engineer Mode of a model 53SU5000 SUPERVISOR-PC Operator’s Station.

Refer to Instruction Bulletin 53SU5000 for the exact procedure.

4. Using the model 53MT6000 Micro-Tools configuration tool.

3.2 Module Library (

Refer to Figure 3-2

)

The modules shown in this section are available for use in F-CIM sequences. F-CIM modules are available in two different types, reusable and non-reusable. The reusable modules have no database parameters associated with them and can be used as often as required in the sequence. Non-reusable modules have additional parameters and may only be used once. Information on the individual modules indicate which type it is.

Each module may have up to four inputs:

S n-1

- This input is the output of the previous step.

A, B and C - These inputs can be configured to any of the following data points:

H00 - H255, C00 - C539, B00 - B511, L00 - L999, or S00 - S99 (Step outputs) or to a numeric value (refer to Instruction Bulletin 53MC5000).

Some modules require that the A, B and C inputs point only to certain types of data while others can point to any data type. The AIN, BIN and CIN columns in Figure 3-2 indicate when the following restrictions apply.

Y - Any H,C,B,L or S type or numeric value is permitted.

C - Must be C00 - C539 or S00 - S999 or numeric value.

X - This input is not used

3.3 Configuring F-CIM sequences from the Front Panel

(Refer to Figure 3-1)

The Controller’s Engineer Mode provides a method of configuring an F-CIM sequence.

Engineer Mode is entered by pressing the "MODE" button. The F2 key is then used to sequence through "CONFIGURE", "PROGRAM", and "DISPLAY". Pressing the F3 key when "PROGRAM" is displayed selects the F-CIM editor.

Note:

If a PROGRAM KEY (Password) has been configured the key must be entered before proceeding.

Up to 100 steps of the sequence can now be displayed, built, or erased using the "VIEW", "BUILD", and "ERASE" keys.

3.3.1 Viewing Steps

Selecting VIEW (pressing F3 when VIEW is displayed) will display three numbers on the bottom of the display (i.e., 00 042 0.0). The first number represents the step being displayed. The second is the

F-CIM code and the third displays the active output value of the step. The UP and DOWN arrow keys can now be used to sequence through each step. The controller remains in normal operation.

3-2

MODULAR CONTROLLER CUSTOMIZATION GUIDE

3.3.2 Erasing Steps

Selecting ERASE (pressing F3 when ERASE is displayed) causes the following line to appear: n SURE? Y

Pressing F1 (i.e., selecting NO) just returns to the "ERASE" level.

Pressing F3 (i.e., selecting YES) causes all 100 steps to be set to F-CIM 42 which is a "do nothing"

module and sets B00 to 0 .

Pressing F1 returns to the VIEW level.

3.3.3 Building Steps

Selecting BUILD (pressing F3 when BUILD is displayed) causes a display line to appear at the bottom of the display.

STEP?

The four arrow keys can now be used to indicate the step number that is to be edited. When the step number is correct, pressing F3 causes the main editing screen to appear. The UP and DOWN arrows can be used to scroll though the steps. The F1 key returns to BUILD level. The F2 key steps though the REPLACE, INSERT, and DELETE sub-functions. F3 selects the sub-function being displayed.

REPLACE - Allows the currently displayed step to be edited.

INSERT - Moves the current step and all following steps down by one and allows the new current

step to be edited.

DELETE - Deletes the current step and shifts the following steps up. Automatically adjusts step

references.

3-3

MODULAR CONTROLLER CUSTOMIZATION GUIDE

3-4

Figure 3-1. Configuring F-CIM

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM Sn-1 AIN BIN CIN TYPE

SWITCH

COMP

J - K

SP0

PID0

AM0

DEV0

SP1

PID1

AM1

DEV1

SP2

PID2

AM2

DEV2

ADD

SUB

MUL

DIV

SQRT

LOG2

YPOWX

ABS

LINV

LAND

LOR

LXOR

WRITE

READ

Ax+ B

SP3

PID3

AM3

DEV3

DISP

MATHA

MATHB

MATHC

MATHD

MATHE

MATHF

MATHG

MATHH

EMATHA

EMATHB

64

61

63

67

54

51

53

57

84

83

82

44

41

43

47

91

90

89

88

87

86

85

95

94

93

92

99

98

97

96

102

103

104

105

106

107

52

62

74

71

73

77

22

100

101

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

Y

X

Y

Y

Y

X

Y

Y

X

Y

Y

Y

Y

Y

Y

Y

Y

Y

C

X

Y

Y

X

X

C

X

C

C

C

C

Y

Y

Y

Y

Y

Y

Y

Y

X

Y

Y

Y

X

Y

Y

Y

Y

Y

X

X

Y

Y

X

Y

Y

X

Y

Y

X

Y

X

Y

X

C

X

X

X

X

X

C

X

X

C

X

C

Y

Y

Y

Y

Y

Y

Y

Y

X

Y

Y

Y

Y

Y

X

N

N

N

N

N

N

N

N

R

R

R

N

R

R

R

R

R

R

R

R

R

R

R

R

R

R

R

N

N

N

N

N

N

N

N

N

N

N

N

N

N

N

N

N

N

Y

Y

X

Y

Y

Y

X

X

X

Y

X

Y

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

Y

Y

Y

Y

X

Y

Y

Y

Y

Y

Y

Y

Y

X

X

Y

Y

X

ADD

SUBTRACT

MULTIPLY

DIVIDE

SQUARE ROOT

LOG2

Y TO THE POWER OF X

ABSOLUTE VALUE

LOGICAL INVERSION

LOGICAL AND

LOGICAL OR

LOGICAL EXCLUSIVE OR

WRITE PARAM TO A, POINTER P

READ PARAM A TO X

(Ax) + B

IF (BIN) ; X= AIN

HIGH/LOW COMPARATOR W/HYSTERESIS

LOGIC J - K LATCH

SET POINT GENERATOR FOR LOOP 0

PID CALCULATION FOR LOOP 0

AUTO MANUAL SELECTOR FOR LOOP 0

DEVIATION CALCULATION FOR LOOP 0

SET POINT GENERATOR FOR LOOP 1

PID CALCULATION FOR LOOP 1

AUTO MANUAL SELECTOR FOR LOOP 1

DEVIATION CALCULATION FOR LOOP 1

SET POINT GENERATOR FOR LOOP 2

PID CALCULATION FOR LOOP 2

AUTO MANUAL SELECTOR FOR LOOP 2

DEVIATION CALCULATION FOR LOOP 2

SET POINT GENERATOR FOR LOOP 3

PID CALCULATION FOR LOOP 3

AUTO MANUAL SELECTOR FOR LOOP 3

DEVIATION CALCULATION FOR LOOP 3

DISPLAY MANAGER

MATH BLOCK

MATH BLOCK

MATH BLOCK

MATH BLOCK

MATH BLOCK

MATH BLOCK

MATH BLOCK

MATH BLOCK

EXTENDED MATH BLOCK

EXTENDED MATH BLOCK

Figure 3-2. F-CIM Directory

3-5

3-6

MODULAR CONTROLLER CUSTOMIZATION GUIDE

[ THIS PAGE LEFT INTENTIONALLY BLANK ]

PARAMETERS

OUTPUTS

MODULAR CONTROLLER CUSTOMIZATION GUIDE

NAME

NUMBER OF DISPLAY

GROUPS

NUMBER OF

SCREENS/GROUP

CURRENT DISPLAY

CURRENT DISPLAY STATE

DISPLAY LIST

DISPLAY PROGRAM

SYMBOL

MDG

MDS

CDP

CDS

DSPL

F-CIM 22

DISPLAY HANDLER

NOT REUSABLE

DATAPOINT

B17

B18

B19

B20

B21 thru B84

B05

Description:

This module sequences through a selected list of displays based on operation function keys F1 and F2. See Instruction Bulletin for operational details. It also clears the horn bit if silence bit is active.

3-7

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 41

PID - 0

NOT REUSABLE

INPUTS

S n-1

A

B

C

PARAMETERS

OUTPUTS

S n

NAME

DEVIATION

[unused]

RESET FEEDBACK

CONTROL TRACK COM-

MAND

PROPORTIONAL BAND

RESET TIME

RATE TIME

OUTPUT HIGH LIMIT

OUTPUT LOW LIMIT

MANUAL RESET

INSTRUMENT RANGE

FEED FORWARD

REVERSE SWITCH

CONTROL OUTPUT

SYMBOL

DV0

RF0

CTC0

PB0

TR0

TD0

OH0

OL0

MR0

IR0

FF0

RSW0

CO0

DATAPOINT

C121

C127

L123

C106

C107

C108

C109

C110

C111

C115

C122

L106

C123

Description:

This module computes a control output signal based on the above listed inputs and parameters.

The result is simultaneously available as the module output Sn and as a database parameter CO.

The A, B, and C inputs can be any L,B, C[S], or H type datapoint. When the control track command

(C) input is less than one, the module output will track the reset feedback input (B) by back calculating the integrator term. When (C) input is greater than or equal to 1 the reset feedback is used by the integrator to calculate the next output and should reflect the value (scaled 0-100%) of the value of the final control element. For standard PID controller reset feedback, (B) should be OUT and control track command should be AUT.

3-8

INPUTS

B

C

S n-1

A

PARAMETERS

OUTPUTS

S n

MODULAR CONTROLLER CUSTOMIZATION GUIDE

NAME

CONTROL OUTPUT

AUTO ENABLE

OUTPUT TRACK VALVE

OUTPUT TRACK SWITCH

OUTPUT TRACK ENABLE

HARD MANUAL LIMIT

OUTPUT HIGH LIMIT

OUTPUT LOW LIMIT

OUTPUT SLEW RATE

OUTPUT

OUTPUT TRACK STATUS

AUTO STATUS

SYMBOL

CO0

AE0

OTV0

SWOTV0

OTE0

HML0

OH0

OL0

T30

F-CIM 43

AUTO/MANUAL SWITCH - 0

NOT REUSABLE

DATAPOINT

C123

L114

C129

L117

L119

L122

C109

C110

C118

OUT0

OVTS0

AUT0

C102

L105

L107

Description:

This module selects one of three signals to load into OUT and become its output

(S n

). The signal selected is either the Output Tracking Value (B), the Auto Value

(S n-1

) or the Manual Pushbutton Value. If the Output Tracking Switch (C) is less than 1, then S n

= B when Output Tracking is enabled (OTE = 1). When the previous condition is not in effect S n

will equal S n-1

if Auto Enable (A) is

≥1 and the

A/M pushbutton has set the Auto Switch to 1. When neither previous condition is in effect the selected signal comes directly from the output increase and decrease pushbuttons.

3-9

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 44

SETPOINT GENERATOR - 0

NOT REUSABLE

NAME

INPUTS

S n-1

A

B

C

PARAMETERS

REMOTE SETPOINT

REMOTE SP ENABLE

SETPOINT TRACK INPUT

SETPOINT TRACK SWITCH

SETPOINT TRACK ENABLE

REMOTE GAIN

REMOTE BIAS

INSTRUMENT RANGE

SETPOINT HI LIMIT

SETPOINT LOW LIMIT

OUTPUTS

S n

SETPOINT

SETPOINT TRACK STATUS

REMOTE STATUS

REMOTE SWITCH

SYMBOL

RSP0

RE0

STV0

SWSPT0

STE0

K10

B10

IR0

SH0

SL0

SP0

SPTS0

RMT0

SWR0

DATAPOINT

C120

L115

C128

L116

L118

C113

C112

C115

C125

C126

C101

L104

L108

L113

Description:

This module selects one of three signals to load into SP and become its output (Sn). The signal selected is either the Setpoint Tracking Value (B), the Remote Setpoint Value (Sn-1) multiplied by K1 and biased by B1, or the Setpoint pushbutton value. If the Setpoint Track Switch (C) is less than 1, then Sn=B when Setpoint Tracking is enabled (STE=1). When the previous condition is not in effect Sn will equal Sn-1 x K1 + B1 if RemoteEnable (A) is greater than or equal to 1 and the R/L pushbutton has set Remote Switch to1. When none of the previous conditions are in effect the selected signal comes directly from the setpoint increase and decrease pushbuttons.

3-10

INPUTS

S n-1

A

PARAMETERS

OUTPUTS

S n

MODULAR CONTROLLER CUSTOMIZATION GUIDE

NAME

SETPOINT

PROCESS VARIABLE

SETPOINT SLEW RATE

CONTROL ZONE

ALARM INDEX

ALARM LIMIT 1

ALARM LIMIT 2

ALARM DEADBAND

DEVIATION

ALARM A

ALARM B

TRUE SETPOINT

F-CIM 47

DEVIATION/ALARM CALCULATION - 0

NOT REUSABLE

SYMBOL

SP0

PV0

T10

C20

AIX0

PL10

PL20

ADB0

DATAPOINT

C101

C100

C117

C114

B335

C103

C104

C105

DV0

PA10

PA20

TSP0

C121

L110

L111

C119

Description:

This module calculates and loads the deviation value based on setpoint (S n

) and process variable (A). Before the calculation is performed the setpoint value is conditioned so as not to exceed the rate of change limit specified by T1. If the calculated deviation falls within the CZ value, then deviation is forced to 0.0. This module also determines if alarm conditions exist based on AIX, PL1, PL2 and

ADB. Results of the alarm tests are loaded to PA1 and PA2. Refer to Section

4.1.6 of Instruction Bulletin 53MC5000 for an explanation of AIX values.

3-11

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 51

PID - 1

NOT REUSABLE

INPUTS

S n-1

A

B

C

PARAMETERS

OUTPUTS

S n

NAME

DEVIATION

[unused]

RESET FEEDBACK

CONTROL TRACK COM-

MAND

PROPORTIONAL BAND

RESET TIME

RATE TIME

OUTPUT HIGH LIMIT

OUTPUT LOW LIMIT

MANUAL RESET

INSTRUMENT RANGE

FEED FORWARD

REVERSE SWITCH

CONTROL OUTPUT

SYMBOL

DV1

RF1

CTC1

PB1

TR1

TD1

OH1

OL1

MR0

IR1

FF1

RSW1

CO1

DATAPOINT

C157

C163

L147

C142

C143

C144

C145

C146

C147

C151

C158

L130

C159

Description:

This module computes a control output signal based on the above listed inputs and parameters.

The result is simultaneously available as the module output Sn and as a database parameter CO.

The A, B, and C inputs can be any L,B, C[S], or H type datapoint. When the control track command input is less than one, the module output will track the reset feedback input (B) by back calculating the integrator term. When (C) input is greater than or equal to 1 the reset feedback is used by the integrator to calculate the next output and should reflect the value (scaled 0-100%) of the value of the final control element. For standard PID controller reset feedback, (B) should be OUT and control track command should be AUT.

3-12

Function:

6

7

8

9

10

11

15#

16#

17#

18#

19#

20

21

3

4

C

0

1

2

5

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 52

EXTENDED MATH A

NOT REUSABLE

S n

S n-1

C354 * S n-1

+ C355

C354 * S n-1

+ C355 * A + C356 * B

C354 * S n-1

* A * B + C355

C354 ∗Sn−1

+ C355*B

A

C354 * S n-1

+

C355 ∗A

+ C356

B

C354

Sn−1∗A

B

+ C355

C354 +Sn−1

C355

+ A

* C356

C354 * ABS(S n-1

) + C355

C354 * S n-1

(C355 * A + C356)

C354 * 2

(C355 * Sn-1 + C356)

C354 * LOG (C355 * S n-1

) + C356

Piecewise Characterizer

Third Order Polynomial

Eleventh Order Polynomial

Linear Flow Compensation

SQRT Flow Compensation

C354 < S n-1

< C355

(C355 * B) < S n-1

< (C356 * A)

Description:

This module provides 18 different mathematical functions. The function to be used is selected based on the C input.

# Refer to Instruction Bulletin 53MC5000 Section 4.4.

3-13

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 53

AUTO/MANUAL SWITCH - 1

NOT REUSABLE

INPUTS

B

C

S n-1

A

PARAMETERS

NAME

CONTROL OUTPUT

AUTO ENABLE

OUTPUT TRACK VALVE

OUTPUT TRACK SWITCH

OUTPUT TRACK ENABLE

HARD MANUAL LIMIT

OUTPUT HIGH LIMIT

OUTPUT LOW LIMIT

OUTPUT SLEW RATE

OUTPUTS

S n

OUTPUT

OUTPUT TRACK STATUS

AUTO STATUS

SYMBOL

CO1

AE1

OTV1

SWOTV1

OTE1

HML1

OH1

OL1

T31

OUT1

OVTS1

AUT1

DATAPOINT

C159

L138

C165

L141

L143

L146

C145

C146

C154

C138

L129

L131

Description:

This module selects one of three signals to load into OUT and become its output

(S n

). The signal selected is either the Output Tracking Value (B), the Auto Value

(S n-1

) or the Manual Pushbutton Value. If the Output Tracking Switch (C) is less than 1, then S n

= B when Output Tracking is enabled (OTE = 1). When the previous condition is not in effect S n

will equal S n-1

if Auto Enable (A) is ≥ 1 and the

A/M pushbutton has set the Auto Switch to 1. When neither previous condition is in effect the selected signal comes directly from the output increase and decrease pushbuttons.

3-14

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 54

SETPOINT GENERATOR - 1

NOT REUSABLE

INPUTS

S n-1

A

B

C

PARAMETERS

OUTPUTS

S n

REMOTE SETPOINT

REMOTE SP ENABLE

SETPOINT TRACK INPUT

SETPOINT TRACK SWITCH

SETPOINT TRACK ENABLE

REMOTE GAIN

REMOTE BIAS

INSTRUMENT RANGE

SETPOINT HI LIMIT

SETPOINT LOW LIMIT

SETPOINT TRACK STATUS

REMOTE STATUS

REMOTE SWITCH

RSP1

RE1

STV1

SWSPT1

STE1

K11

B11

IR1

SH1

SL1

SPTS1

RMT1

SWR1

C156

L139

C164

L140

L142

C149

C148

C151

C161

C162

L128

L132

L137

Description:

This module selects one of three signals to load into SP and become its output

(S n

). The signal selected is either the Setpoint Tracking Value (B), the Remote

Setpoint Value (S n-1

) multiplied by K1 and biased by B1, or the Setpoint pushbutton value. If the Setpoint Track Switch (C) is less than 1, then S n

=B when Setpoint

Tracking is enabled (STE=1). When the previous condition is not in effect S n

will equal S n-1

x K1 + B1 if RemoteEnable (A) is greater than or equal to 1 and the

R/L pushbutton has set Remote Switch to1. When none of the previous conditions are in effect the selected signal comes directly from the setpoint increase and decrease pushbuttons.

3-15

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 57

DEVIATION/ALARM CALCULATION - 1

NOT REUSABLE

INPUTS

S n-1

A

PARAMETERS

NAME

SETPOINT

PROCESS VARIABLE

SETPOINT SLEW RATE

CONTROL ZONE

ALARM INDEX

ALARM LIMIT 1

ALARM LIMIT 2

ALARM DEADBAND

OUTPUTS

S n

DEVIATION

ALARM A

ALARM B

TRUE SETPOINT

SYMBOL

SP1

PV1

T11

C21

AIX1

PL11

PL21

ADB1

DV1

PA11

PA21

TSP1

DATAPOINT

C137

C136

C153

C150

B340

C139

C140

C141

C157

L134

L135

C155

Description:

This module calculates and loads the deviation value based on setpoint (S n

) and process variable (A). Before the calculation is performed the setpoint value is conditioned so as not to exceed the rate of change limit specified by T1. If the calculated deviation falls within the CZ value, then deviation is forced to 0.0. This module also determines if alarm conditions exist based on AIX, PL1, PL2 and

ADB. Results of the alarm tests are loaded to PA1 and PA2. Refer to Section

4.1.6 of Instruction Bulletin 53MC5000 for an explanation of AIX values.

3-16

INPUTS

S n-1

A

B

C

PARAMETERS

OUTPUTS

S n

MODULAR CONTROLLER CUSTOMIZATION GUIDE

NAME

DEVIATION

[unused]

RESET FEEDBACK

CONTROL TRACK COM-

MAND

PROPORTIONAL BAND

RESET TIME

RATE TIME

OUTPUT HIGH LIMIT

OUTPUT LOW LIMIT

MANUAL RESET

INSTRUMENT RANGE

FEED FORWARD

REVERSE SWITCH

CONTROL OUTPUT

SYMBOL

DV2

RF2

CTC2

PB2

TR2

TD2

OH2

OL2

MR2

IR2

FF2

RSW2

CO2

DATAPOINT

C193

C199

L171

C178

C179

C180

C181

C182

C183

C187

C194

L154

C195

F-CIM 61

PID - 2

NOT REUSABLE

Description:

This module computes a control output signal based on the above listed inputs and parameters.

The result is simultaneously available as the module output S n

and as a database parameter

CO. The A, B, and C inputs can be any L,B, C[S], or H type datapoint. When the control track command input is less than one, the module output will track the reset feedback input (B)by back calculating the integrator term. When (C) input is greater than or equal to 1 the reset feedback is used by the integrator to calculate the next output and should reflect the value (scaled 0-100%) of the value of the final control element. For standard PID controller reset feedback, (B) should be OUT and control track command should be AUT.

3-17

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 62

EXTENDED MATH B

NOT REUSABLE

Function:

6

7

8

9

10

11

15#

16#

17#

18#

19#

20

21

3

4

C

0

1

2

5

S n

S n-1

C366 * S n-1

+ C367

C366 * S n-1

+ C367 * A + C368 * B

C366 * S n-1

* A * B + C367

C366 ∗Sn−1

+ C367*B

A

C366 * S n-1

+

C367 ∗A

+ C368

B

C366

Sn−1∗ A

+ C367

B

C366 +Sn−1

C367

+ A

* C368

C366 * ABS(S n-1

) + C367

C366 * S n-1

(C367 * A + C368)

C366 * 2

(C367 * Sn-1 + C368)

C366 * LOG (C367 * S n-1

) + C368

Piecewise Characterizer

Third Order Polynomial

Eleventh Order Polynomial

Linear Flow Conpensation

SQRT Flow Compensation

C366 < S n-1

< C367

(C367 * B) < S n-1

< (C368 * A)

Description:

This module provides 18 different mathematical functions. The function to be used is selected based on the C input.

# Refer to Instruction Bulletin 53MC5000 Section 4.4.

3-18

INPUTS

B

C

S n-1

A

PARAMETERS

OUTPUTS

S n

MODULAR CONTROLLER CUSTOMIZATION GUIDE

NAME

CONTROL OUTPUT

AUTO ENABLE

OUTPUT TRACK VALVE

OUTPUT TRACK SWITCH

OUTPUT TRACK ENABLE

HARD MANUAL LIMIT

OUTPUT HIGH LIMIT

OUTPUT LOW LIMIT

OUTPUT SLEW RATE

OUTPUT

OUTPUT TRACK STATUS

AUTO STATUS

SYMBOL

CO2

AE2

OTV2

SWOTV2

OTE2

HML2

OH2

OL2

T32

F-CIM 63

AUTO/MANUAL SWITCH - 2

NOT REUSABLE

DATAPOINT

C195

L162

C201

L165

L167

L170

C181

C182

C190

OUT2

OVTS2

AUT2

C174

L153

L155

Description:

This module selects one of three signals to load into OUT and become its output

(S n

). The signal selected is either the Output Tracking Value (B), the Auto Value

(S n-1

) or the Manual Pushbutton Value. If the Output Tracking Switch (C) is less than 1, then S n

= B when Output Tracking is enabled (OTE = 1). When the previous condition is not in effect S n

will equal S n-1

if Auto Enable (A) is

≥ 1 and the

A/M pushbutton has set the Auto Switch to 1. When neither previous condition is in effect the selected signal comes directly from the output increase and decrease pushbuttons.

3-19

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 64

SETPOINT GENERATOR - 2

NOT REUSABLE

NAME

INPUTS

S n-1

A

B

C

PARAMETERS

REMOTE SETPOINT

REMOTE SP ENABLE

SETPOINT TRACK INPUT

SETPOINT TRACK SWITCH

SETPOINT TRACK ENABLE

REMOTE GAIN

REMOTE BIAS

INSTRUMENT RANGE

SETPOINT HI LIMIT

SETPOINT LOW LIMIT

OUTPUTS

S n

SETPOINT

SETPOINT TRACK STATUS

REMOTE STATUS

REMOTE SWITCH

SYMBOL

RSP2

RE2

STV2

SWSPT2

STE2

K12

B12

IR2

SH2

SL2

SP2

SPTS2

RMT2

SWR2

DATAPOINT

C192

L163

C200

L164

L166

C185

C184

C187

C197

C198

C173

L152

L156

L161

Description:

This module selects one of three signals to load into SP and become its output

(S n

). The signal selected is either the Setpoint Tracking Value (B), the Remote

Setpoint Value (S n-1

) multiplied by K1 and biased by B1, or the Setpoint pushbutton value. If the Setpoint Track Switch (C) is less than 1, then Sn=B when Setpoint Tracking is enabled (STE=1). When the previous condition is not in effect S n will equal S n-1

x K1 + B1 if RemoteEnable (A) is greater than or equal to 1 and the

R/L pushbutton has set Remote Switch to1. When none of the previous conditions are in effect the selected signal comes directly from the setpoint increase and decrease pushbuttons.

3-20

INPUTS

S n-1

A

PARAMETERS

OUTPUTS

S n

MODULAR CONTROLLER CUSTOMIZATION GUIDE

NAME

SETPOINT

PROCESS VARIABLE

SETPOINT SLEW RATE

CONTROL ZONE

ALARM INDEX

ALARM LIMIT 1

ALARM LIMIT 2

ALARM DEADBAND

DEVIATION

ALARM A

ALARM B

TRUE SETPOINT

F-CIM 67

DEVIATION/ALARM CALCULATION - 2

NOT REUSABLE

SYMBOL

SP2

PV2

T12

C22

AIX2

PL12

PL22

ADB2

DATAPOINT

C173

C172

C189

C186

B345

C175

C176

C177

DV2

PA12

PA22

TSP2

C193

L158

L159

C191

Description:

This module calculates and loads the deviation value based on setpoint (S n

) and process variable (A). Before the calculation is performed the setpoint value is conditioned so as not to exceed the rate of change limit specified by T1. If the calculated deviation falls within the CZ value, then deviation is forced to 0.0. This module also determines if alarm conditions exist based on AIX, PL1, PL2 and

ADB. Results of the alarm tests are loaded to PA1 and PA2. Refer to Section

4.1.6 of Instruction Bulletin 53MC5000 for an explanation of AIX values.

3-21

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 71

PID - 3

NOT REUSABLE

INPUTS

S n-1

A

B

C

PARAMETERS

OUTPUTS

S n

NAME

DEVIATION

[unused]

RESET FEEDBACK

CONTROL TRACK COM-

MAND

PROPORTIONAL BAND

RESET TIME

RATE TIME

OUTPUT HIGH LIMIT

OUTPUT LOW LIMIT

MANUAL RESET

INSTRUMENT RANGE

FEED FORWARD

REVERSE SWITCH

CONTROL OUTPUT

SYMBOL

DV3

RF3

CTC3

PB3

TR3

TD3

OH3

OL3

MR3

IR3

FF3

RSW3

CO3

DATAPOINT

C229

C235

L195

C214

C215

C216

C217

C218

C219

C223

C230

L178

C231

Description:

This module computes a control output signal based on the above listed inputs and parameters.

The result is simultaneously available as the module output S n

and as a database parameter

CO. The A, B, and C inputs can be any L,B, C[S], or H type datapoint. When the control track command input is less than one, the module output will track the reset feedback input (B) by back calculating the integrator term. When (C) input is greater than or equal to 1 the reset feedback is used by the integrator to calculate the next output and should reflect the value (scaled 0-100%) of the value of the final control element. For standard PID controller reset feedback, (B) should be OUT and control track command should be AUT.

3-22

INPUTS

B

C

S n-1

A

PARAMETERS

OUTPUTS

S n

MODULAR CONTROLLER CUSTOMIZATION GUIDE

NAME

CONTROL OUTPUT

AUTO ENABLE

OUTPUT TRACK VALVE

OUTPUT TRACK SWITCH

OUTPUT TRACK ENABLE

HARD MANUAL LIMIT

OUTPUT HIGH LIMIT

OUTPUT LOW LIMIT

OUTPUT SLEW RATE

OUTPUT

OUTPUT TRACK STATUS

AUTO STATUS

SYMBOL

CO3

AE3

OTV3

SWOTV3

OTE3

HML3

OH3

OL3

T33

F-CIM 73

AUTO/MANUAL SWITCH - 3

NOT REUSABLE

DATAPOINT

C231

L186

C237

L189

L191

L194

C217

C218

C226

OUT3

OVTS3

AUT3

C210

L177

L179

Description:

This module selects one of three signals to load into OUT and become its output

(S n

). The signal selected is either the Output Tracking Value (B), the Auto Value

(S n-1

) or the Manual Pushbutton Value. If the Output Tracking Switch (C) is less than 1, then S n

= B when Output Tracking is enabled (OTE = 1). When the previous condition is not in effect S n

will equal S n-1

if Auto Enable (A) is ≥ 1 and the

A/M pushbutton has set the Auto Switch to 1. When neither previous condition is in effect the selected signal comes directly from the output increase and decrease pushbuttons.

3-23

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 74

SETPOINT GENERATOR - 3

NOT REUSABLE

NAME

INPUTS

S n-1

A

B

C

PARAMETERS

REMOTE SETPOINT

REMOTE SP ENABLE

SETPOINT TRACK INPUT

SETPOINT TRACK SWITCH

SETPOINT TRACK ENABLE

REMOTE GAIN

REMOTE BIAS

INSTRUMENT RANGE

SETPOINT HI LIMIT

SETPOINT LOW LIMIT

OUTPUTS

S n

SETPOINT

SETPOINT TRACK STATUS

REMOTE STATUS

REMOTE SWITCH

SYMBOL

RSP3

RE3

STV3

SWSPT3

STE3

K13

B13

IR3

SH3

SL3

SP3

SPTS3

RMT3

SWR3

DATAPOINT

C228

L187

C236

L188

L190

C221

C220

C223

C233

C234

C209

L176

L180

L185

Description:

This module selects one of three signals to load into SP and become its output

(S n

). The signal selected is either the Setpoint Tracking Value (B), the Remote

Setpoint Value (S n-1

) multiplied by K1 and biased by B1, or the Setpoint pushbutton value. If the Setpoint Track Switch (C) is less than 1, then S n

=B when Setpoint

Tracking is enabled (STE=1). When the previous condition is not in effect S n

will equal S n-1

x K1 + B1 if RemoteEnable (A) is greater than or equal to 1 and the

R/L pushbutton has set Remote Switch to1. When none of the previous conditions are in effect the selected signal comes directly from the setpoint increase and decrease pushbuttons.

3-24

INPUTS

S n-1

A

PARAMETERS

OUTPUTS

S n

MODULAR CONTROLLER CUSTOMIZATION GUIDE

NAME

SETPOINT

PROCESS VARIABLE

SETPOINT SLEW RATE

CONTROL ZONE

ALARM INDEX

ALARM LIMIT 1

ALARM LIMIT 2

ALARM DEADBAND

DEVIATION

ALARM A

ALARM B

TRUE SETPOINT

F-CIM 77

DEVIATION/ALARM CALCULATION - 3

NOT REUSABLE

SYMBOL

SP3

PV3

T13

C23

AIX3

PL13

PL23

ADB3

DATAPOINT

C209

C208

C225

C222

B350

C211

C212

C213

DV3

PA13

PA23

TSP3

C229

L182

L183

C227

Description:

This module calculates and loads the deviation value based on setpoint (S n

) and process variable (A). Before the calculation is performed the setpoint value is conditioned so as not to exceed the rate of change limit specified by T1. If the calculated deviation falls within the CZ value, then deviation is forced to 0.0. This module also determines if alarm conditions exist based on AIX, PL1, PL2 and

ADB. Results of the alarm tests are loaded to PA1 and PA2. Refer to Section

4.1.6 of Instruction Bulletin 53MC5000 for an explanation of AIX values.

3-25

F-CIM 82

J-K LATCH

REUSABLE

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

IF S n-1

< 1.0 & A< 1.0

S n

= S n

IF S n-1

≥1 & A ≥1

S n

= not S n

IF S n-1

≥1 & A <1.0

S n

= 1.0

IF S n-1

<1.0 & A >1.0

S n

= 0.0

Description:

This function acts as a classic J-K Latch. When both inputs are less than 1 its result remains unchanged. When both inputs are greater or equal to 1 its result toggles between 0.0 and 1.0. If the only input S n-1

is greater or equal to 1.0 its result is 1.0, and if the only input A is greater or equal to 1 its result is 0.0.

3-26

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 83

COMPARITOR

REUSABLE

IF S n-1

≥A or S n-1

≤B

IF A-C 1

≥S

S n

= 1 n-1

or B + C

≥S n-1

S n

= 0

Description:

This function acts as a comparitor with hysteresis. When the S n-1

value exceeds the value of the A input or the S n-1

value is exceeded by the value of the B input the result of the module will equal 1.0. The result will remain 1.0 until it falls below the A value minus the C value or rises above the B value plus the C value.

3-27

F-CIM 84

SWITCH

REUSABLE

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

IF B ≥1

S n

= A

ELSE

S n

= S n-1

Description:

If the B input is greater than or equal to 1.0, the result of this module is the A input; otherwise the result is the result of the previous step. The A and B inputs can be any L, B, C[S], or H data type.

3-28

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 85

AX + B

REUSABLE

S n

= A

*

S n-1

+ B

Description:

The result of this module is a linear scaling of the result of the previous step.

A and B can be any C data type or step result.

3-29

F-CIM 86

READ

REUSABLE

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

S n

= A

Description:

The READ module copies any L, B, C[S], or H data base parameter into the step result.

3-30

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 87

WRITE

REUSABLE

IF B ≥ 1

A = S n-1

S n

= S n-1

Description:

The WRITE module copies the result of the previous step to data base parameter specified by the

A input whenever the B input is greater than or equal to one. The result of previous step becomes the result of this step.

3-31

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 88

LOGICAL EXCLUSIVE OR

REUSABLE

Function:

IF S n-1

≥ 1 and A < 1

S n

= 1.0

IF S n-1

< 1 and A

≥ 1

S n

= 1.0

ELSE

S n

= 0.0

Description:

This module produces an output of 1.0 if one and only one of the A and X inputs have values that are greater than or equal to 1.0. The A input can be any L,B,C [S], or H type data.

3-32

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 89

LOGICAL OR

REUSABLE

IF (S n-1

≥ 1 or A ≥ 1)

S n

= 1.0

ELSE

S n

= 0.0

Description:

This module produces an output of 1.0 if either or both of the A and X inputs have values that are greater than or equal to 1.0. The A input can be any L,B,C [S], or H type data.

3-33

F-CIM 90

LOGICAL AND

REUSABLE

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

IF (S n-1

≥ 1 and A ≥ 1)

S n

= 1.0

ELSE

S n

= 0.0

Description:

This module produces an output of 1.0 if both the A and X inputs have values that are greater than or equal to 1.0. The A input can be any L,B,C (S), or H type data.

3-34

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 91

LOGICAL INVERT

REUSABLE

IF S n-1

≥ 1

S n

= 0

ELSE

S n

= 1

Description:

This module produces an output of 0.0 if the input has a value greater than or equal to 1. If the output is less than 1 the output is 0.0.

3-35

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 92

ABSOLUTE VALUE

REUSABLE

Function:

S n

= | S n-1

|

Description:

This module produces an output with the same magnitude as the A input, but with a positive sign.

The A input must be C00 - C639 or S00 - S99.

3-36

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 93

EXPONENTIAL

REUSABLE

S n

= A

B

Description:

The output of this module is the value of A raised to the power specified by the B input. Both A and

B must be C00 - C639 or S00 - S99.

3-37

F-CIM 94

LOG BASE TWO

REUSABLE

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

S n

= lg

2

(S n-1

)

Description:

The output of this module is the base two logarithm of the output of the previous step.

3-38

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 95

SQUARE ROOT

REUSABLE

S n

= S n-1

Description:

The output of this module is the square root of the output of the previous step.

3-39

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 96

TWO INPUT DIVIDER

REUSABLE

Function:

S n

= A/B

Description:

The output of this module is the quotient of the A input divided by the B input. The A and B inputs must be of the same type and can be B, C [S], or H.

3-40

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 97

TWO INPUT MULTIPLIER

REUSABLE

S n

= S n-1

x A

Description:

The output of this module is the product of the A input and the output of the previous step. The A input must be any C type data C00 to C639.

3-41

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 98

TWO INPUT SUBTRACTOR

REUSABLE

Function:

S n

= A - B

Description:

The output of this module is the difference of the A input minus the B input. The A and B inputs must be of the same data type; B, C [S], H.

3-42

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

F-CIM 99

TWO INPUT ADDER

REUSABLE

S n

= S n-1

+ A

Description:

The output of this module is the sum of the A input and the output of the previous step. The A input must be any C type data C00 to C639 or the output of any step S00 to S99.

3-43

F-CIM 100

MATH A

NOT REUSABLE

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

5

6

2

3

4

C

0

1

7

8

9

10

11

20

21

S n

S n-1

C76 * S n-1

+ C77

C76 * S n-1

+ C77 * A + C78 * B

C76 * S n-1

* A * B + C77

C76

Sn−1

+ C77*B

A

C76 * S n-1

+

C77 ∗A

+ C78

B

C76 ∗Sn−1∗A

+ C77

B

C76

+Sn−1

C77 +A

* C78

C76 * ABS(S n-1

) + C77

C76 * S n-1

(C77 * A + C78)

C76 * 2

(C77 * Sn-1 + C78)

C76 * LOG (C77 * S n-1

) + C78

C76 < S n-1

< C77

(C77 * B) < S n-1

< (C78 * A)

Description:

This module provides 12 different mathematical functions. The function to be used is selected based on the C input.

3-44

Function:

5

6

2

3

4

C

0

1

7

11

20

21

8

9

10

MODULAR CONTROLLER CUSTOMIZATION GUIDE

S n

S n-1

C79 * S n-1

+ C80

C79 * S n-1

+ C80 * A + C81 * B

C79 * S n-1

* A * B + C80

C79

Sn−1

A

+ C80*B

C79 * S n-1

+

C80

A

B

+ C81

C79 ∗Sn−1∗ A

+ C80

B

C79 +Sn−1

C80 +A

* C81

C79 * ABS(S n-1

) + C80

C79 * S n-1

(C80 * A + C81)

C79 * 2

(C80 * Sn-1 + C81)

C79 * LOG (C80 * S n-1

) + C81

C79 < S n-1

< C80

(C80 * B) < S n-1

< (C81 * A)

F-CIM 101

MATH B

NOT REUSABLE

Description:

This module provides 12 different mathematical functions. The function to be used is selected based on the C input.

3-45

F-CIM 102

MATH C

NOT REUSABLE

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

5

6

2

3

4

C

0

1

7

8

9

10

11

20

21

S n

S n-1

C82 * S n-1

+ C83

C82 * S n-1

+ C83 * A + C84 * B

C82 * S n-1

* A * B + C83

C82

Sn−1

+ C83*B

A

C82 * S n-1

+

C83 ∗A

+ C84

B

C82 ∗Sn−1∗ A

+ C83

B

C82

+Sn−1

C83 +A

* C84

C82 * ABS(S n-1

) + C83

C82 * S n-1

(C83 * A + C84)

C82 * 2

(C83 * Sn-1 + C84)

C82 * LOG (C83 * S n-1

) + C84

C82 < S n-1

< C83

(C83 * B) < S n-1

< (C84 * A)

Description:

This module provides 12 different mathematical functions. The function to be used is selected based on the C input.

3-46

Function:

5

6

2

3

4

C

0

1

7

11

20

21

8

9

10

MODULAR CONTROLLER CUSTOMIZATION GUIDE

S n

S n-1

C85 * S n-1

+ C86

C85 * S n-1

+ C86 * A + C87 * B

C85 * S n-1

* A * B + C86

C85

Sn−1

A

+ C86*B

C85 * S n-1

+

C86

A

B

+ C87

C85 ∗Sn−1∗ A

+ C86

B

C85 +Sn−1

C86 +A

* C87

C85 * ABS(S n-1

) + C86

C85 * S n-1

(C86 * A + C87)

C85 * 2

(C86 * Sn-1 + C87)

C85 * LOG (C86 * S n-1

) + C87

C85 < S n-1

< C86

(C86 * B) < S n-1

< (C87 * A)

F-CIM 103

MATH D

NOT REUSABLE

Description:

This module provides 12 different mathematical functions. The function to be used is selected based on the C input.

3-47

F-CIM 104

MATH E

NOT REUSABLE

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

5

6

2

3

4

C

0

1

7

8

9

10

11

20

21

S n

S n-1

C88 * S n-1

+ C89

C88 * S n-1

+ C89 * A + C90 * B

C88 * S n-1

* A * B + C89

C88

Sn−1

+ C89*B

A

C88 * S n-1

+

C89 ∗A

+ C90

B

C88 ∗Sn−1∗ A

+ C89

B

C88

+Sn−1

C89 +A

* C90

C88 * ABS(S n-1

) + C89

C88 * S n-1

(C89 * A + C90)

C88 * 2

(C89 * Sn-1 + C90)

C88 * LOG (C89 * S n-1

) + C90

C88 < S n-1

< C89

(C89 * B) < S n-1

< (C90 * A)

Description:

This module provides 12 different mathematical functions. The function to be used is selected based on the C input.

3-48

Function:

5

6

2

3

4

C

0

1

7

11

20

21

8

9

10

MODULAR CONTROLLER CUSTOMIZATION GUIDE

S n

S n-1

C91 * S n-1

+ C92

C91 * S n-1

+ C92 * A + C93 * B

C91 * S n-1

* A * B + C92

C91

Sn−1

A

+ C92*B

C91 * S n-1

+

C92

A

B

+ C93

C91 ∗Sn−1∗ A

+ C92

B

C91 +Sn−1

C92 +A

* C93

C91 * ABS(S n-1

) + C92

C91 * S n-1

(C92 * A + C93)

C91 * 2

(C92 * Sn-1 + C93)

C91 * LOG (C92 * S n-1

) + C93

C91 < S n-1

< C92

(C92 * B) < S n-1

< (C93 * A)

F-CIM 105

MATH F

NOT REUSABLE

Description:

This module provides 12 different mathematical functions. The function to be used is selected based on the C input.

3-49

F-CIM 106

MATH G

NOT REUSABLE

Function:

MODULAR CONTROLLER CUSTOMIZATION GUIDE

5

6

2

3

4

C

0

1

7

8

9

10

11

20

21

S n

S n-1

C94 * S n-1

+ C95

C94 * S n-1

+ C95 * A + C96 * B

C94 * S n-1

* A * B + C95

C94

Sn−1

+ C95*B

A

C94 * S n-1

+

C95 ∗A

+ C96

B

C94 ∗Sn−1∗ A

+ C95

B

C94

+Sn−1

C95 +A

* C96

C94 * ABS(S n-1

) + C95

C94 * S n-1

(C95 * A + C96)

C94 * 2

(C95 * Sn-1 + C96)

C94 * LOG (C95 * S n-1

) + C96

C94 < S n-1

< C95

(C95 * B) < S n-1

< (C96 * A)

Description:

This module provides 12 different mathematical functions. The function to be used is selected based on the C input.

3-50

Function:

5

6

2

3

4

C

0

1

7

11

20

21

8

9

10

MODULAR CONTROLLER CUSTOMIZATION GUIDE

S n

S n-1

C97 * S n-1

+ C98

C97 * S n-1

+ C98 * A + C99 * B

C97 * S n-1

* A * B + C98

C97

Sn−1

A

+ C98*B

C97 * S n-1

+

C98

A

B

+ C99

C97 ∗Sn−1∗ A

+ C98

B

C97 +Sn−1

C98 +A

* C99

C97 * ABS(S n-1

) + C98

C97 * S n-1

(C98 * A + C99)

C97 * 2

(C98 * Sn-1 + C99)

C97 * LOG (C98 * S n-1

) + C99

C97 < S n-1

< C98

(C98 * B) < S n-1

< (C99 * A)

F-CIM 107

MATH H

NOT REUSABLE

Description:

This module provides 12 different mathematical functions. The function to be used is selected based on the C input.

3-51

MODULAR CONTROLLER CUSTOMIZATION GUIDE

3.4 Custom F-CIM Module

A custom F-CIM module is a custom F-TRAN subroutine which follows specific rules. The user can write either reusable or non-reusable F-CIM modules. If database values are treated as temporarily stored, the module is reusable . If any database value is retained (must remain unchanged between successful control scans), the module is non-reusable.

The rules for a F-CIM are as follows:

• The output of the module must be in datapoint C255 when the R (return) command is encountered.

• The S n-1

input is contained in C255; and F253, F254 and F255 contain the database name which is to be used as the A, B and C inputs respectively.

The following example is the F-TRAN program which is F-CIM85.

\F-CIM85\

\REUSABLE\

\INPUTS\

\X\

\A\

\B\

C255 = C255 F

*

253

*

F

*

254 +\S n

= AX + B\

R

To have a single F-CIM perform the PID controller operation,replace F-CIM’s 41, 43, 44 and 47 with the following custom F-CIM. This user defined module uses the F-TRAN control subroutines

G0, G4, G8 and G12 together to produce the control operation. The standard F-CIM’s use the subroutines individually and require four steps to realize the PID control operation. Generating this custom F-CIM reduces flexibility, but saves the user three steps in the program.

The following example of a custom F-CIM replaces standard F-CIM’s 41, 43, 44 and 47.

3-52

MODULAR CONTROLLER CUSTOMIZATION GUIDE

\F-CIM CUSTOM200\

\NON-REUSABLE\

\INPUTS\

\X PV\

\A REMOTE SP\

\B FEEDFORWARD\

\C REMOTE ENA\

C100 = C255

C120 = F

*

253

C122 = F

*

254

L115 = F

*

255

L123 = L107

C127 = C102

G00

G04

G08

G12

C255 = C102

R

3-53

MODULAR CONTROLLER CUSTOMIZATION GUIDE

3.5 F-CIM Example

1: Define the process control function to be implemented:

Produce a single loop PID controller with output tracking on closure of contact input 1, setpoint tracking of process variable when not in automatic control and remote setpoint disabling on closure of contact input 0. With the process variable coming from analog input 0, the remote setpoint is from analog input 1 and the output tracking signal from analog input 2.

2: Become familiar with the capabilities of the F-CIM modules.

3: Draw a function block diagram using these function blocks: An example of a function block diagram is shown in Figure 3-3. In Figure 3-3 the reference modules are shown in addition to the program diagram, for user’s convenience.

4: Enter data on a work sheet. The worksheet for this example is shown below.

3-54

MODULAR CONTROLLER CUSTOMIZATION GUIDE

5: Enter the function block input values and parameters into the database. The methods for entering parameters are described in IB53MC5000 section 3.4.2.

In this example:

STEP 0 is F-CIM 86 because use of a remote setpoint is planned. The setpoint generator F-CIM 044 can only accept as its remote setpoint input the output from the previous step (S n-1

). F-CIM 86 reads output from AI 1 and provides it as the setpoint input to F-CIM 044.

STEP 1 is F-CIM 44, the setpoint generator, also receives as input:

• A = the remote setpoint enable from DI 0 [L000]

• B = setpoint track input AI 0, allowing the setpoint to track the PV in manual

• C = setpoint track switch

The step output is the setpoint, which in turn, is an input to the next module.

STEP 2 is F-CIM 47, Deviation/Alarm Calculation. In addition to the setpoint from the previous step this module receives as input:

• A= the measured process variable from AI 0 [H000].

This module determines the deviation between the setpoint and the process variable. This deviation is the output of this step and becomes the input to F-CIM 041.

STEP 3 is F-CIM 041, a PID controller. In addition to the deviation it receives as its input:

• B = reset feedback originating as the output from the auto/manual switch.

• C = control track command which is the auto status output from the auto/manual switch [L107].

The output from the PID module is the control output [C123]. This is an input for the auto/manual switch.

STEP 4 is F-CIM 043, the auto/manual switch. In addition to control output from the PID controller, this receives as input:

• A = is set to a fixed constant = 1, allowing the auto/manual pushbutton to control the auto/manual switch

• B = output track value from AI 2 [H002]

• C = output track switch from DI 1 [L001]

• The S n

output of the auto/manual switch is the output which will be read by the next step.

STEP 5 is F-CIM 087, the write module. This copies the result of the previous step to A which is data base parameter C00. This output drives the final control element

STEP 6 is F-CIM 022, display handler, which allows changing displays using the pushbuttons on the front of the controller. If F-CIM 022 is used, it should always be the last step.

Refer to Figure 3-4 for an F-CIM Overview, and Figure 3-5 for a Database Modules Overview.

3-55

MODULAR CONTROLLER CUSTOMIZATION GUIDE

3-56

Figure 3-3. Example of Function Block Diagram

(The referenced I/O modules are shown in addition to the program diagram, for user’s convenience.)

MODULAR CONTROLLER CUSTOMIZATION GUIDE

[ THIS PAGE LEFT INTENTIONALLY BLANK ]

3-57

MODULAR CONTROLLER CUSTOMIZATION GUIDE

3-58

Figure 3-4a. F-CIM Overview

MODULAR CONTROLLER CUSTOMIZATION GUIDE

Figure 3-4b. F-CIM Overview

3-59

MODULAR CONTROLLER CUSTOMIZATION GUIDE

3-60

Figure 3-5a. Database Modules Overview

Refer to Instruction Bulletin 53MC5000 Section 4.1

MODULAR CONTROLLER CUSTOMIZATION GUIDE

Figure 3-5b. Database Modules Overview

Refer to Instruction Bulletin 53MC5000 Section 4.1

3-61

3-62

MODULAR CONTROLLER CUSTOMIZATION GUIDE

MODULAR CONTROLLER CUSTOMIZATION GUIDE

3-63

MODULAR CONTROLLER CUSTOMIZATION GUIDE

APPENDIX 0

CHARACTER SET 0

Character Set 0 is applicable to PRINTn display statement found in Section 2.4.5.11.

Appendix 0 - 1

Appendix 0 - 2

MODULAR CONTROLLER CUSTOMIZATION GUIDE

MODULAR CONTROLLER CUSTOMIZATION GUIDE

Appendix 0 - 3

Appendix 0 - 4

MODULAR CONTROLLER CUSTOMIZATION GUIDE

MODULAR CONTROLLER CUSTOMIZATION GUIDE

APPENDIX 1

CHARACTER SET 1

Character Set 1 is applicable to PRINTn display statement found in Section 2.4.5.11.

Appendix 1 - 1

Appendix 1 - 2

MODULAR CONTROLLER CUSTOMIZATION GUIDE

MODULAR CONTROLLER CUSTOMIZATION GUIDE

Appendix 1 - 3

The Company’s policy is one of continuous product improvement and the right is reserved to modify the information contained herein without notice, or to make engineering refinements that may not be reflected in this bulletin.

Micromod Automation assumes no responsibility for errors that may appear in this manual.

© 2004 MicroMod Automation, Inc. Printed in USA

MicroMod Automation, Inc.

75 Town Center Drive

Rochester, NY USA 14623

Tel. 585-321-9200

Fax 585-321-9291 www.micromodautomation.com

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