Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
36 views34 pages

10 Ftran Lab

The F-TRAN Programming Lab document provides an overview of F-TRAN programming, its objectives, and the types of F-TRAN programs, including Control, Display, and Subroutines. It details the steps to create, compile, and run a simple Control F-TRAN program, including instructions for downloading and executing the program on a controller. Additionally, it introduces Reverse Polish Notation for programming and outlines the maximum storage capacities for different program types.

Uploaded by

mhaiooc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views34 pages

10 Ftran Lab

The F-TRAN Programming Lab document provides an overview of F-TRAN programming, its objectives, and the types of F-TRAN programs, including Control, Display, and Subroutines. It details the steps to create, compile, and run a simple Control F-TRAN program, including instructions for downloading and executing the program on a controller. Additionally, it introduces Reverse Polish Notation for programming and outlines the maximum storage capacities for different program types.

Uploaded by

mhaiooc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

10 F-TRAN Programming Lab

10.1 Foreword
Certain complex control strategies can not be programmed using the Flexible Control
Strategies (FCS). They need programming using F-CIM or F-TRAN. F-TRAN is the most
flexible and any complex strategy can be programmed using F_TRAN. It needs a little
programming background but does not need extensive programming experience.

10.2 Objectives
In this lab we will learn the basics of F-TRAN programming. We will also program a
simple strategy using F-TRAN. After completing this lab, you should know fundamentals
of FTRAN programming, how to edit and compile the program, build the executable
image, load the image into the controller and run the control strategy.

10.3 Introduction to F-TRAN


F-TRAN programs are classified into three types: Control F-TRAN and Display F-TRAN
and Subroutines. Details are given below:

10.3.1 Control F-TRAN:


These programs are used to program the actual control strategy. As many as 20 Control F-
TRAN programs can be stored in the controller. Each F-TRAN program is assigned a
Control Function Index number (CFIX). The valid ranges for assigning a CFIX is 2 – 255,
excluding 90 – 100. You can run one F-TRAN at a time by setting the FIX parameter at
database location B00. For example, if the value of B00 was 5, then the F-TRAN program
with Function Index number 5 will be executed.

You can also specify the execution rate of the selected F-TRAN by setting the Scan File
parameter at location B03. This rate is in increments of 50 milliseconds. For example, if
the value of B03 is 2, the F-TRAN program will be executed every 100 milliseconds.

10.3.2 Display F-TRAN:


The display F-TRAN programs are used to program custom displays. The display
F-TRAN programs are assigned a Display Function Index number (DFIX). The valid
range for assigning the DFIX is 1 – 255. The standard displays such as the loop display,
trend display, etc. also have a display index number associated with them (1-33). If you
assign a display F-TRAN program a number that is same as one of the standard displays,
the custom display will be used instead of the standard display.

10- 1
Training Manual

F-TRAN Programming Lab

The controller is capable of storing up to 70 customer displays (provided there is


sufficient memory). The controller uses a grid system to access the user defined list of
displays. Up to 64 displays can be assigned to the grid. The display assignments can be a
combination of standard displays and user created displays.

The F1 and F2 function pushbuttons on the display are used to maneuver through the
columns and rows of the display grid.

Display prams are run as a background task. Control programs are classified as
foreground tasks and take precedence over display functions. Displays, like control
programs, have an execution rate. Also like the control programs, the displays execute in
multiples of 50 milliseconds. Database location B06 is used to regulate the execution rate
of the displays.

10.3.3 Subroutines:
Subroutines can be either control or display programs. These programs are routines you
can write and then call from a main control or display F-TRAN program. Subroutines are
also assigned a Function Index number (GFIX). The range for the index number is 200 –
255. For example, if your subroutine index is 210, you can simply call it with the G (go)
statement form the F-TRAN program. This statement for this example would be: G210.

Standard control subroutines for PID functions are already programmed in the controller.
You can call these subroutines from your F-TRAN programs. Following is the list of pre-
programmed subroutines with their IDs:

G00 Setpoint Generator-0


G01 Setpoint Generator-1
G02 Setpoint Generator-2
G03 Setpoint Generator-3

G04 Deviation/Alarm Calculaion-0


G05 Deviation/Alarm Calculaion-1
G06 Deviation/Alarm Calculaion-2
G07 Deviation/Alarm Calculaion-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

10- 2
Training Manual

F-TRAN Programming Lab

The maximum number for each of the program types:

Control F-TRAN programs 20


Display F-TRAN programs 70
User written F-TRAN subroutines 50

10.3.4 Reverse Polish Notation:


The statements in the F-TRAN program are executed in a sequence. The sequence in
which the controller performs a calculation in a statement is dictated by the push-down
stack operation. To accomplish this, the statements in F-TRAN program are written with
a method called Reverse Polish Notation (RPN). This is a special method and is different
from the standard way of executing the calculation in a statement. To understand this,
consider the following examples:

Example 1:
Operands: A and B
Operators: Addition (+)
Standard or Algebraic notation: Calculation: A+B
Reverse Polish Notation: AB +

Example 2:
Operands: A, B and C
Operators: Multiplication (*) and Addition (+)
Standard or Algebraic notation: Calculation: A*(B+C)
Reverse Polish Notation: BC + A *

In Reverse Polish Notation, the operands are written first followed by the operator as in
the example above.

10- 3
Training Manual

F-TRAN Programming Lab

10.4 Instructions
10.4.1 Part 1 – A simple F-TRAN Program
We will program a simple Control F-TRAN program in this part of the lab. We will begin
by just moving data around. The process variable for Control Loop 0 is stored in database
location C100. The value for Analog Output 0 is stored at C000.

# Your controller should have a loop back wire attached between analog output and
analog input. To do this connect terminal 2 to terminal 10 and terminals 5 to 12
The purpose of this is to use the analog output to drive the analog input. The analog
input will in turn be assigned to the process variable.

1. Create a new Control F-TRAN program:

• To create/edit a new control F-TRAN program, right mouse click Control within
the F-TRAN Programs folder in the project tree as shown in the next figure:
Figure 10 .1.
Project Explorer

• A sub menu will be displayed as shown in the figure above.


• Select New from this sub menu. The Open FTRAN File dialog box will be
displayed as shown in the next figure:
• Enter a name for the F-TRAN program. We will call it Ftran1. Type Ftran1 in the
file name field as shown in the next figure.

10- 4
Training Manual

F-TRAN Programming Lab

Figure 10 .2.
New F-TRAN File

• Click on the OK button on this dialog box.


• The Ftran editor window will open as shown in the next figure:
Figure 10 .3.
F-TRAN Editor

10- 5
Training Manual

F-TRAN Programming Lab

# The editor contains an area where the program statements can be entered. The editor
also has the following buttons:
Close – for closing the editor
Save – for saving the program to the disk
Compile – for compiling the program that is shown in the editor
Assign FIX – for assigning a Function Index number for the compiled program
Also notice that there is one line of program code already in the editor. This is the F-
TRAN statement E. Every F-TRAN program whether it is a control, display or subroutine
requires an E at the end of the program. This is required by the compiler and indicates the
end of the program. The program will not compile without this statement at the end.

2. Enter the program code:

• Position the cursor ahead of the E statement and enter the following program line:
C100 = H000
• Refer to the following figure:
Figure 10 .4.
A Simple F-TRAN
Program

3. Save the program:

• Click on the Save button to save the program.

4. Compile the program:

• Click on the Compile button to compile the program

10- 6
Training Manual

F-TRAN Programming Lab

Figure 10 .5.
F-TRAN editor

• The program should compile without errors. A message stating “Compile


completed with no Errors” will be displayed. Click OK to acknowledge and
remove the message.

5. Assign a Function Index to the program: Next we must assign a Function Index (FIX)
to the program. The Function Index is used to tell the controller which program you wish
to execute.

• Click on the Assign FIX button on the editor. An input box (Text Edit) as shown
in the figure below will appear next.
• Enter a value of 2 as the FIX for our program and then click on the OK button.
Figure 10.6.
F-TRAN FIX

6. Close the editor: Click on the Close button next to close the editor. You will be returned
to the Micro-Tools Project Manager window as shown in the next figure.

7. Build the program: The next step is to link all the programs together into a single file
which can be loaded into the controller. This file is referred to as the FTRAN Image file.

10- 7
Training Manual

F-TRAN Programming Lab

• Left click on the controller folder in the project tree to select it. A menu will be
displayed on the right hand side of the project window.
• Right mouse click on the F-TRAN Image item in the menu. A drop down menu as
shown in the next figure will appear.
Figure 10 .7.
F-TRAN Build

• Select Build from this menu to build the image. The Build window will be
displayed next as shown below: This window has several buttons for features to
choose from.
• Select the Control F-TRAN Programs features from the options available from this
window by clicking the square button. To the right of this selection is another
button with 3 dots on it. Click on it.
Figure 10.8.
Build components
Selection

10- 8
Training Manual

F-TRAN Programming Lab

• A window as shown in the next figure, will pop up next. This window has two
lists. There is a list of files to include (right side) in the build and a list of files to
exclude (left side).
Figure 10.9.
F-TRAN Files for
the build

• You should be able to see the file Ftran1 in the list on the left. Select this file by
clicking on it and then click the Add button. This will move the file to the Include
side of the window.
Figure 10 .10.
F-TRAN Files for
the build

• You should now see this file moved to the Include list on the right as shown in the
above figure. Click OK to complete the operation.
Figure 10.11.
F-TRAN Build

• You will be returned to the Build window as shown in the above figure. Note that
the Build window now indicates that the file has been selected; 1 of 1 Selected.
See above figure. We are now ready to build.
• Click on OK on the Build window to build the image file.

10- 9
Training Manual

F-TRAN Programming Lab

• Micro-Tools will build this file and an indicator as shown in the next figure will
appear showing the progress.
Figure 10.12.
F-TRAN Build

• After the file is built, a dialog box as shown in the next figure will be displayed.
This dialog box will show the amount of memory used by the program. Since our
program consisted of only 2 lines, it uses less than 1% of the memory and the
above dialog box will display 0%.
Figure 10.13.
F-TRAN Build

• Click on the YES button to view the results of the build. The Build status window
will be displayed next as shown in the figure below: This window will show the
results and the status of the build.
Figure 10.14.
F-TRAN Build
Status

• Click on the OK button if there are not indicated errors with the build.

8. Download the program into the controller:

# The download procedure requires that a controller be present and communicating with
the MicroDCI Communication Services. It also requires that the controller name match
that of the controller folder. If either of these two conditions is missing, an error
message will be generated.
• With the controller still selected in the Project Manager, right mouse click on the
F-TRAN Image menu item on the right side of the project window as shown in the
next figure. Select Download from the pop up sub menu.

10- 10
Training Manual

F-TRAN Programming Lab

Figure 10.15.
Download F-TRAN

• A message box as shown in the next figure will be displayed indicating that it is
downloading F-TRAN programs.
Figure 10.16.
Download F-TRAN

• When the download starts, a bar indicator as shown in the next figure will be
displayed. The controller will placed in suspend mode before down loading the
program. The controller will have the MicroDCI logo displayed while in the
suspend mode.
Figure 10.17.
Download F-TRAN

Figure 10.18.
Download F-TRAN

• Following the down load operation, you will be prompted with a question
regarding the Program Reference file. Reference files are used with our Softnet
“virtual” controllers and should be answered NO as we are using real controllers

10- 11
Training Manual

F-TRAN Programming Lab

• After the download is complete, a message box will be displayed indicating


“Download Completed Successfully!” as shown in the next figure.
Figure 10.19.
Download F-TRAN

9. Run the program: When the download is complete, we must tell the controller to execute
the program.

• From the Project Window, right click on the Database menu item as shown in the
next figure.
• A popup menu will appear. Select Edit Online from the menu.

Figure 10.20.
Database Edit
Online

• This will begin an online configuration session with the controller and the database
window will be displayed as shown below:

10- 12
Training Manual

F-TRAN Programming Lab

Figure 10.21.
Function Index-
Custom

• Click on the Function Index drop-down menu from the database window as
shown in the above figure and select Custom from the resulting menu.
• A small popup window will appear as shown below with the ability to enter a
value. Enter the value 2 in this window and then click on the OK button.
Figure 10.22.
F-TRAN Function
Index

• The controller will begin executing the new program. Notice that the Function
Index field on the database window displays Custom.

10. Test the program: We can test the program from the database window using the data
tables.

• Click on the Data Tables button on the database window as shown in the next
figure to display the data tables.

10- 13
Training Manual

F-TRAN Programming Lab

Figure 10.23.
Database Window

• The Database Values window will be displayed next as shown in the next figure.
This window displays all the database values of the controller. The database values
are classified as their data type and each data type is shown in a separate tab.

• Select the C VALUES tab. Select the C0 data table entry. The current value for
C0 is displayed in the list and also at the bottom right of this window. See the next
figure. We will test the database by entering a value for this data point C0 and then
view H0 to make sure it is the same
• Enter a new value (50.0) in the windows lower right corner and press the Enter
key on the keyboard. The value at C0 should now show 50.0. Press the Refresh
button in the left bottom of this window to see the change.

10- 14
Training Manual

F-TRAN Programming Lab

Figure 10.24.
Data Tables

• Select the H VALUES tab. Since the analog output of our controller is looped
back to the input, our analog input value (H000) should now read a value of 50.0.
Our control program instruction was to assign the database value of H000 to
database location C100. We can see if the program worked by looking at the value
of C100 in the Data Tables. Both locations should be the same. If we change the
value at C000, we should see the same value at C100. See next figure:
Figure 10.25.
Data Tables

10- 15
Training Manual

F-TRAN Programming Lab

• Try different values for C0 and make sure H0 changes to that value.

10.4.2 Part II – A more advanced F-TRAN Program


The Part I was intended to demonstrate the procedure for creating, compiling, building,
downloading and running an F-TRAN program. This demonstration is hardly adequate to
perform any real functions. This part of the lab is intended to add some more of the
mechanics of F-TRAN programming.

We will program a simple PID control function and some associated functions. We will
also use some of the pre-existing subroutines in our program. In this program we will
perform the PID with Remote setpoint. We will also set Reset Feedback Equal to Last
Output and set Reset Tracking Based on Auto-Manual Selection of the control loop.

1. Create a new F-TRAN program:

• Follow the steps explained in Part I of this manual and create a new F-TRAN
program. Give it a name Ftran2.
• Enter the program instructions given in the next figure in the F-TRAN editor.

\ ***** This is a header *****\


Figure 10.26.
Control F-TRAN
#define ANI0 H000
Program
#define ANI1 H001
#define ANO0 C000
#define PV C100
#define OUT C102
#define RSP C120
#define RF C127
#define AUT L107
#define CTC L123
#define SPGEN G000
#define DVGEN G004
#define PID G008
#define AMSW G012
#define DISPLAYS G022

PV = ANI0 \ Read Process Variable From ANI0 \


RSP = ANI1 \ Read Remote Setpoint From ANI1 \
RF = OUT \ Set Reset Feedback Equal to Last
Output \
CTC = AUT \ Set Reset Tracking Based on Auto-
Manual Selection \
SPGEN \ Setpoint Generator Subroutine \

10- 16
Training Manual

F-TRAN Programming Lab

DVGEN \Deviation Generator Subroutine \


PID \PID Control Calculation Subroutine \
AMSW \Auto-Manual Selector Subroutine \
ANO0 = OUT \Copy Control Output to the hardware
Output \
DISPLAYS \ Execute the Display Handler
Subroutine \
E \ End the program \

# Look at the above program list: There are several new concepts in this program:
• First of all there is the comment line at the beginning and comment lines for
several of the program lines. Any ASCII text between backslashes is considered a
comment and is ignored by the compiler. In the above figure, the program code is
given bold text where as the comments are in regular text. This only
done to identify the program from the comments. This is not normally done in the
program.
• It is a good programming practice to include the comments so that you can identify
what each line of code is for. It makes the program more interpretable.
• The second new concept is the #define command. The #define command allows
you to assign an acronym (name) to a particular database location. This will help
to make your programs more readable. The #define command must be written in
lower case characters. The names can be any length but the first eight characters
must be unique. The first character must also not be a numeric value.
• Separate the #define from the Name with at least a space. Also separate the Name
from the database location with a space.
• In the above program, there are 2 sections: one section with the #define statements
for assigning names for the data-points and the second section that contains the
program statements.

2. Save and Compile the program – follow the same procedure as in Part I to save and
compile the program. Assign a Function Index number (FIX) of 2 for this program.

10- 17
Training Manual

F-TRAN Programming Lab

10.4.3 Part III – Display F-TRAN Program


The next step is to make a display for displaying the process parameters.

Requirement: Build a custom display that has both static and dynamic objects. Show the
process variable as a tank level. Show also the output in the display. The completed
runtime display should look like the following figure:

Figure 10.27.
Custom Display

There are two different approaches to this requirement:

1. Build both static and dynamic part of the display in Display F-TRAN.
2. Build the static part of the display using the MC5 Screen Editor. Build the dynamic
part of the display using Display F-TRAN. Combine both the static display and the
display F-TRAN by referencing the static display in the display F-TRAN.
We will use both the approaches in this lab. First let us consider the first option. We will
write a Display F-TRAN program to build the entire display.

The steps involved in programming this display are:

• Build the static parts like the text, empty tank, valves and the flow lines
• Build the dynamic parts like the vertical bar-graph to represent the tank level and
numeric displays to show the process value and output.

3. Create a new Display F-TRAN program:

10- 18
Training Manual

F-TRAN Programming Lab

Open the Project Explorer and select the Controller from the project tree. The Controller
folder will expand as shown in the next figure. Right mouse click on the Display sub-
folder. Select New from the popup menu.

Figure 10.28.
New Display
F-TRAN Program

• The Open FRAN File dialog box will be displayed as shown in the next figure:
Figure 10 .29.
New Display
F-TRAN Program

• Type a name for your display F-TRAN file. Enter the name Dftran1 in the File
Name field and then click on the OK button. See the above figure.

10- 19
Training Manual

F-TRAN Programming Lab

Figure 10.30.
New Display
F-TRAN Program

• Enter the following program instructions (as shown in the next figure) using editor
and then save the file by clicking on the Save button on the editor.
• The static and dynamic parts of the program are labeled by the comment
statements in this code.

\*************************************************\
Figure 10.31. \***** THIS IS THE TANK FILLING DEMO DISPLAY *****\
New Display
\*************************************************\
F-TRAN Program
\**** Static portion of the display *****\
CLEAR \ Clear the screen \

MOVXY 11 12 \ Draw the fill pipe \


HBAR 32 32 1
MOVXY 11 20
VBAR 8 8 1

MOVXY 9 21 \ Draw the fill pipe arrow \


HBAR 4 4 1
MOVXY 10 22
HBAR 2 2 1
PUTDOT 11 23

MOVXY 29 14 \ Draw the fill valve \


VBAR 4 4 1
MOVXY 30 13
VBAR 2 2 1
MOVXY 32 13
VBAR 2 2 1
MOVXY 33 14
VBAR 4 4 1
MOVXY 4 58 \ Draw the Tank \
VBAR 32 32 2

10- 20
Training Manual

F-TRAN Programming Lab

MOVXY 17 58
VBAR 32 32 2
MOVXY 4 58
HBAR 14 14 2

MOVXY 11 76 \ Draw the drain pipe \


VBAR 18 18 1

MOVXY 9 77 \ Draw the drain pipe arrow \


HBAR 4 4 1
MOVXY 10 78
HBAR 2 2 1
PUTDOT 11 79

MOVXY 9 66 \ Draw the drain valve \


HBAR 4 4 1
MOVXY 10 67
HBAR 2 2 1
MOVXY 10 69
HBAR 2 2 1
MOVXY 9 70
HBAR 4 4 1
MOVXY 11 68 \ Draw the drain valve actuator \
HBAR 3 3 1
MOVXY 15 70
VBAR 4 4 1
MOVXY 16 69
VBAR 2 2 1

MOVXY 20 28 \ Draw the level indicator ticks \


HBAR 2 2 1
MOVXY 20 56
HBAR 2 2 1
MOVXY 23 16 \ Print legend information \
PRINT "HV801"
MOVXY 18 72
PRINT "PERCENT"
MOVXY 3 83
PRINT "TO "
PRINT "REACTOR1"

\Dynamic Portion of the display\

B09 = 1 ; \ USE CHARACTER SET 1 \


B10 = 0 \ SET KEYBOARD CONTROL
POINTER TO LOOP 0 \
MOVXY 10 1
PRINT A00 \ DISPLAY LOOP0 TAG NAME \
MOVXY 25 25
PRINT C115 \ DISPLAY LOOP0 UPPER
LIMIT \
MOVXY 27 36
PRINT C100 \ DISPLAY LOOP0 PROCESS
VARIABLE \
MOVXY 27 44
PRINT A01 \ DISPLAY LOOP 0 ENGINEERING

10- 21
Training Manual

F-TRAN Programming Lab

UNITS \
MOVXY 25 55
PRINT C116 \ DISPLAY LOOP 0 LOWER
LIMIT \
MOVXY 6 56
VBAR C100 100.0 / 30.0 * $ 30 11 \ DRAW TANK FILLING BASED
ON PROCESS VARIABLE \
MOVXY 22 65
PRINT C102 $ \ DISPLAY LOOP 0 PROCESS
OUTPUT \
E \ End of Program \

• Compile the program by clicking on the Compile button on the editor. Assign a
Display Function Index of 50 to this program when prompted.
Figure 10.32.
Display F-TRAN
FIX Number

• Click on the OK button after typing the FIX number. Click the Close button on the
editor to close the editor.

4. Build the F-TRAN programs: We will next build both the Control and Display F-TRAN
programs.

• Select the controller from the project tree and then click on the F-TRAN Image
item from the window on the right as shown in the next figure.
• Right-click on the F-TRAN Image item to display a sub-menu as shown below:
Figure 10.33.
F-TRAN Build

• Select the item Build from this menu to build the programs. The Build option
menu will be displayed as shown in the next figure:

Figure 10.34.
F-TRAN Build

10- 22
Training Manual

F-TRAN Programming Lab

• Select the Control F-TRAN Programs options by clicking on the button beside it.
Click on the button with the 3 dots. A list box, as shown below, will be displayed
showing the available Control F-TRAN programs. Select Ftran2 from the Exclude
list on the left and then click on the Add button to add this program to the Include
list.
Figure 10.35.
F-TRAN Build

• The selected file will be added to the Include list on the right as shown in the next
figure.
Figure 10.36.
F-TRAN Build

• Click the OK button on this menu to accept the selection. Now the Build Options
menu will be redisplayed as shown in the next figure.

10- 23
Training Manual

F-TRAN Programming Lab

Figure 10.37.
F-TRAN Build

• Click on the Display F-TRAN Programs button. Click on the associated dotted
button next to it. The display selection lists will be displayed next. Select Dftran1
from the list on the left. Select Add to include this file in the list on the right as
shown in the next figure:
Figure 10.38.
F-TRAN Build

• Click on the OK button to accept the selection. The Build Options menu will
redisplay as shown below with the files selection.
Figure 10.39.
F-TRAN Build

• Click on the OK button on this menu to start building. After the build is
successfully completed, a message box as shown in the next figure will be
displayed.
Figure 10.40.
F-TRAN Build

• Click on the YES button on this message box to view the Build Status.

10- 24
Training Manual

F-TRAN Programming Lab

Figure 10.41.
F-TRAN Build
Status

• Click on the OK button on the Build Status window.

10- 25
Training Manual

F-TRAN Programming Lab

5. Download the programs tot he controller:

• Select the F-TRAN Image item form the Project Explorer again as shown in the
above figure and right-click on it.
Figure 10.42.
F-TRAN Download

• Select Download from the menu. An information box as shown in the next figure
will be displayed after successful download.
Figure 10.43.
Download F-TRAN

• Following the down load operation, you will be prompted with a question
regarding the Program Reference file. Reference files are used with our Softnet
“virtual” controllers and should be answered NO as we are using real controllers.

Figure 10.44.
F-TRAN Download

• The controller will placed in suspend mode before down loading program. The
controller will have the MicroDCI logo displayed while in the suspend mode.

10- 26
Training Manual

F-TRAN Programming Lab

Figure 10.45.
Suspended Mode

6. Edit the controller’s database online to run the F-TRAN Programs:

• Select the Database item from the Project Explorer as shown in the next figure and
then right-click on it.

Figure 10.46.
Database Edit
Online

• Select Edit Online from the resulting menu to edit the controller’s database online.
The Database window will launch as shown in the next figure:

10- 27
Training Manual

F-TRAN Programming Lab

Figure 10.47.
F-TRAN Function
Index

• Select the Function Index from this window by clicking on the drop-down menu as
shown in the above figure.
• Select Custom from the drop-down menu. The Select FIX window will be
displayed next as shown in the next figure:
Figure 10.48.
F-TRAN Function
Index

• Enter a value of 2 (remember we assigned the value 2 for the FIX number for our
Control F-TRAN) and then click on the OK button.
• The Controller will now be running the F_TRAN Programs we downloaded. But
notice that the display we built is not displayed on the controller (Try pressing F1
and F2 keys on the front!). To show the display we built, we need to include it in
the display list. To do this, click on the DISPLAY button on the Database window.
The Display Handler window will be displayed as shown in the next figure:
Figure 10.49.
Display handler

• Remember we assigned the Display F-TRAN program, a FIX number of 50! This
FIX number will be our display ID for our Tank display. We will be assigning one
of the Row positions for our display. The simplest thing to do is to assign one of
the already existing positions like Row 1.
• Click on the display name for Row 1 as shown in the figure. That position will be
selected and the Display Handler window will look like the next figure:

10- 28
Training Manual

F-TRAN Programming Lab

Figure 10.50.
Display handler

• Type the value 50 and then press the Enter key on your keyboard. The Display
handler will redisplay as shown in the next figure.
Figure 10.51.
Display handler

• Click on the Save button on the Display Handler window and then on the OK
button. The Save button will right the display changes to the controller’s database.
• Press the F2 key on the front of the controller to select the Tank display. The
controller now should display your custom display as shown in the next figure:
Figure 10.52.
F-TRAN Custom
display

10- 29
Training Manual

F-TRAN Programming Lab

• Test the program by changing the setpoint, output and the input values. Try also
changing the setpoint and the control modes.

10- 30
Training Manual

F-TRAN Programming Lab

10.4.4 Part IV – Display F-TRAN with Static Display:


In this part of the lab, we will create a static display with the help of the Display Editor in
Micro-Tools and write a Display F-TRAN program just for the dynamic parts of the
display. We will then reference the static display in the display F-TRAN.

Hints:

• This part of the lab does not have detailed instructions. Use the hints below to do
this lab:
• The static display should look like the next figure:
Figure 10.53.
Static Display

• The code for the Display F-TRAN program for the dynamic part is given in the
next figure. Assign a FIX of 51 for this program.
• This program has a line: SCREEN0. This is the static screen you will build. Assign
a FIX of 0 for this screen. Use the low resolution mode to create the screen. You
do not have to name the display screen!
• Rebuild like before and download it to the controller.
• Modify the Display Handler in the Database Window in online mode to include the
custom display. The Display Function Index for this display is 51 (the FIX
assigned to the display F-TRAN program).

10- 31
Training Manual

F-TRAN Programming Lab

Figure 10 .54.
Static Display

10- 32
The Company’s policy is one of continuous product
improvement and the right is reserved to modify
specifications contained herein without notice.
©2004 MicroMod Automation, Inc.

IB-MICRODCI-TUT, Issue 1 02/05


MicroMod Automation, Inc. MicroMod Automation, Inc.
75 Town Centre Drive 928 Jaymor Road
Rochester, NY 14623 Southampton, PA 18966
Tel: (800) 480-1975 Tel: (215) 355 4377
Fax: (585) 321-9291 Fax: (215) 355-4378

You might also like