fst user manual

100
Flow Computer Division Website: www.EmersonProcess.com/flow Form Number A4625 Part Number D301058X012 January 2004 Function Sequence Table (FST) User Manual

Upload: kamal-zulfaqqa

Post on 25-Oct-2015

275 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: FSt User Manual

Flow Computer Division

Website: www.EmersonProcess.com/flow

Form Number A4625 Part Number D301058X012 January 2004

Function Sequence Table (FST)

User Manual

Page 2: FSt User Manual

FST User Manual

ii Rev 01/04

Revision Tracking Sheet January 2004

This manual is periodically altered to incorporate new or updated information. The date revision level of each page is indicated at the bottom of the page opposite the page number. A major change in the content of the manual also changes the date of the manual, which appears on the front cover. Listed below is the date revision level of each page.

Page Revision All Pages 01/04

FloBoss and ROCLINK are marks of one of the Emerson Process Management companies. The Emerson logo is a trademark and service mark of Emerson Electric Co. All other marks are the property of their respective owners.

This product may be covered under pending patent applications.

© Fisher Controls International, LLC. 1991-2003. All rights reserved.

While this information is presented in good faith and believed to be accurate, Fisher Controls does not guarantee satisfactory results from reliance upon such information. Nothing contained herein is to be construed as a warranty or guarantee, express or implied, regarding the performance, merchantability, fitness or any other matter with respect to the products, nor as a recommendation to use any product or process in conflict with any patent. Fisher Controls reserves the right, without notice, to alter or improve the designs or specifications of the products described herein.

Page 3: FSt User Manual

FST User Manual

Rev 01/04 Table of Contents iii

TABLE OF CONTENTS

Table of Contents ........................................................................................................... iii

Section 1 – Introduction .............................................................................................. 1-1

1.1 FST INTRODUCTION...................................................................................................................1-1

1.2 FST REGISTERS..........................................................................................................................1-3

1.3 BASIC RULES..............................................................................................................................1-5

1.4 FST STORAGE AND RESTART.....................................................................................................1-5

Section 2 – ROCLINK for Windows FST ................................................................. 2-1

2.1 FST EDITOR...............................................................................................................................2-1

2.2 WORKING WITH AN FST.............................................................................................................2-3

2.3 FUNCTION STRUCTURE...............................................................................................................2-7

2.4 MONITOR AND TRACE MODES .................................................................................................2-13

Section 3 – ROCLINK 800 FST.................................................................................. 3-1

3.1 FST EDITOR...............................................................................................................................3-1

3.2 WORKING WITH AN FST.............................................................................................................3-2

3.3 FUNCTION STRUCTURE...............................................................................................................3-6

3.4 MONITOR AND TRACE MODE .....................................................................................................3-8

Section 4 – Command Library.................................................................................... 4-1

4.1 MATHEMATICAL COMMANDS.....................................................................................................4-3

4.2 LOGICAL COMMANDS.................................................................................................................4-5

4.3 COMPARISON COMMANDS..........................................................................................................4-7

4.4 TIME-RELATED COMMANDS ......................................................................................................4-8

4.5 CONTROL-RELATED COMMANDS ...............................................................................................4-9

4.6 DATABASE COMMANDS .............................................................................................................4-9

4.7 MISCELLANEOUS COMMANDS..................................................................................................4-14

Page 4: FSt User Manual

FST User Manual

iv Table of Contents Rev 01/04

Section 5 – Command Examples.................................................................................5-1

5.1 ROCLINK FOR WINDOWS COMMAND EXAMPLES .................................................................... 5-1

5.2 ROCLINK 800 COMMAND EXAMPLES ................................................................................... 5-10

Section 6 – ROCLINK for Windows Argument Library.........................................6-1

Section 7 – FST Examples ...........................................................................................7-1

7.1 ROCLINK FOR WINDOWS FST EXAMPLES .............................................................................. 7-1

7.2 ROCLINK 800 FST EXAMPLES................................................................................................ 7-7

Index .............................................................................................................................. I-1

Page 5: FSt User Manual

FST User Manual

Rev 01/04 Introduction 1-1

SECTION 1 – INTRODUCTION

1.1 FST Introduction The Function Sequence Table (FST) capability is provided by table-driven software that allows you to define and perform a set of specific actions to be taken when a set of conditions exists. FSTs can be written specifically for applications that require special control features, such as logic sequencing capability. For example, you can use an FST for emergency shutdown control when a parameter exceeds a low or high limit or in any application that requires logic sequencing capability. FSTs are programmed and configured using the FST Editor, which is embedded in the ROCLINK™ for Windows and ROCLINK 800 configuration software.

An FST defines the Input-to-Output (I/O) relationships in the Remote Operations Controller (ROC) or FloBoss™ through a set of user-selected instructions, called Functions. Functions, which define the specific actions to be performed, are executed in their specified sequence. The Functions are normally executed in top-to-bottom order; however, the sequence may be altered by certain decision-making functions.

An FST is built from a library of Commands that provide mathematical and logical operations, database access operations, historical commands, testing, and branching operations, and control-related operations.

Table 1-1 displays the ROC and FloBoss devices and their FST capabilities.

Table 1-1. Devices, Software, and FST Functionality

ROCLINK 800

ROC or FloBoss Maximum Number of FSTs

Maximum Byte Size per FST

Maximum Line Length*

FloBoss 103 2 3000 300 FloBoss 407 4 8000** 300 ROC809 6 3000 500

ROCLINK for Windows

ROC or FloBoss Maximum Number of FSTs

Maximum Byte Size per FST

Maximum Line Length

FloBoss 407 4 8000** 300 FloBoss 500-Series 2 4000 300 ROC300-Series 4 8000** 300 * Maximum Line Length is a limit of the FST Editor. ** Total FST space in ROC300-series and FloBoss 407 units is 8000 bytes. Individual FST size is

not limited, but the sum of all FSTs cannot exceed 8000 bytes.

Each FST may consist of as many functions as can fit into the memory reserved for the FSTs. Reserved memory is pre-determined by the ROC or FloBoss with a set amount of line lengths allocated for each FST. The byte size of an FST displays in the Code Size field on the FST Registers > Advanced tab.

Page 6: FSt User Manual

FST User Manual

1-2 Introduction Rev 01/04

Each individual FST in a ROC809 unit executes up to ten instructions in any given 100 msec interval. However, it does not guarantee that 10 instructions will execute for a given FST within a 100 msec interval. Factors that affect this include processor load (during the interval), instruction, and argument type (constant or value from other tasks, such as meter runs). When six FSTs are running, the maximum number of steps executed would be 60.

Each FST in a FloBoss 103 unit executes a configurable number of instructions per second. By default, the FST executes 20 instructions per execution period. If an FST has 30 sequential instructions, the first 20 instructions execute during the current execution period and remaining 10 instructions execute during the next execution period. To configure the number of instructions executed, select ROC > Information. In the Device Information screen, enter a value between 1 and 100 in the FST Execution Instructions per Cycle field and click Apply. Cycle is the execution period, which is 1 second in a FloBoss 103.

The new number of instructions to execute takes effect the next execution period. Restart is not required.

Each FST in a FloBoss 500-series unit executes up to ten instructions in any given 100 msec interval. That does not guarantee that 10 instructions will execute for a given FST within a 100 msec interval. Factors that affect this include processor load (during the interval), instruction, and argument type (constant or value from other tasks, such as meter runs). When two FSTs are running, the maximum number of steps executed would be 20.

Each FST in a ROC300-series and FloBoss 407 unit executes as many instructions of FST code as processor free time allows every 100 msec. When a time slice completes, another task is given the opportunity to execute. If the FST task does not complete in the allotted time, the FST task uses whatever time is left over from other tasks to attempt to complete the sequence of functions. If the FST task executes in less than time allotted, the remaining time can be used by the operating system to perform other tasks.

Because of the potential loading increase on the system, it is recommended that you monitor the Master Processor Unit (MPU) loading to ensure that the FST is not consuming too much of the MPU’s resources.

NOTE: It is good practice to insert WAIT (WT) commands or make sure an END command is encountered to reduce processor loading.

As the sequence of functions executes, two memory locations store intermediate results from one function to the next.

♦ One location, called the Results Register (RR), stores a floating-point value referred to as the Signal Value Analog (SVA).

♦ The other location, called the Compare Flag (CF), stores a discrete value called the Signal Value Discrete (SVD).

Depending on the function, the Results Register (RR) and the Compare Flag (CF) may be loaded, stored, tested, modified, or left unchanged.

Page 7: FSt User Manual

FST User Manual

Rev 01/04 Introduction 1-3

1.2 FST Registers The FST Registers screen allows you to enter values into the Function Sequence Table Registers.

These Registers can be written to by the FST, using the Save (SAV) command, or read from, using the Value (VAL) command. In this way, Registers can be used to store calculated values and values can pass from one FST to another. Registers also allow you to enter specific values to be used by the FST.

Figure 1-1. ROCLINK for Windows FST Registers

Figure 1-2. ROCLINK 800 FST Registers (ROC809 Shown)

1. Select Configure > Control > FST Registers.

2. Use the FST drop-down list box to select the FST.

3. Enter the FST Tag as a 10-character name identifying the FST Register point (optional).

In the ROCLINK 800 software, the Version number and Description of the FST displays.

4. FST Status shows the current state and allows for the starting, restarting, or storing of the FST associated with this FST Register point. This turns the associated FST on or off by selecting or deselecting the correct radio button and clicking Apply. When debugging, the FST may also be enabled through the RF parameter (1=enable) at the right side of the screen in FST Monitor mode.

5. Enter Registers R1 to R10, which can be used to store floating-point values. You may assign a Tag to each register or leave the numbered default.

By default, FSTs automatically write and read all results to and from the Results Register (RR), unless you manually tell the FST in the Argument fields to store or acquire the value from Register R1 through R10. The FST Registers can store calculated or manually-entered values and can pass data from one FST to another. That is, the FST can write values to the Registers and the FST can also read the values stored in the FST Register storage points. These Registers may be read from, or written to, any FST configured for the ROC or FloBoss and are referred to as Register R1 through Register R10.

Page 8: FSt User Manual

FST User Manual

1-4 Introduction Rev 01/04

6. Click the Advanced tab.

Figure 1-3. ROCLINK for Windows FST Registers – Advanced

Figure 1-4. ROCLINK 800 FST Registers – Advanced

7. The Timer #1 to #4 are countdown timers used to signal that a certain period or time has elapsed. You set the time, and the time is then updated by the FST. These four timers, when set greater than “0,” decrement by 1 every 100 msec. Branching can be performed based on the timers reaching “0,” and use of the Check Timer (CT) function.

8. Set the Misc #1 to #4 unsigned 8-bit integers (with valid decimal values of 0 to 255) that are used for global storage by the FST.

9. Set the Execution Delay between the executions of successive FST command steps. The default is 0 seconds; the minimum delay you can specify is 0.1 seconds.

10. The Results Register (RR), or Signal Value Analog (SVA), is a special-purpose register that stores the floating point result from the most current command executed. Normally, the value is determined by the FST and would only be set by you in Trace mode.

11. The Compare Flag (CF), or Signal Value Discrete (SVD), is a special-purpose 8-bit register that stores an integer representing the numbers 0 through 255. The Compare Flag is manipulated by the logic functions. Normally, the value is determined by the FST and would only be set by you in Trace mode.

12. The Mesg #1 and Mesg #2 is a 30-character field for storing a message that will display in the FST Message area. Msg Data #1 and Msg Data #2 display any values associated with the messages.

The Code Size Bytes is the number of bytes used by the FST. The Code Size is read-only device-specific parameter. Refer to Table 1-1, Devices, Software, and FST Functionality, on page 1-1.

The Code Pointer Byte field is the display of the offset of the next function to be executed from the beginning of its memory segment. Values are device specific. Refer to Table 1-1, Devices, Software, and FST Functionality, on page 1-1. This value normally changes too rapidly, unless the FST is at a Wait (WT) statement or in Trace mode. It is used for debugging purposes.

NOTE: Use FST Monitor within the FST Editor to monitor these operations.

Page 9: FSt User Manual

FST User Manual

Rev 01/04 Introduction 1-5

1.3 Basic Rules Several rules should be followed when creating FSTs.

♦ An END command is required at the end of every FST. The END command tells the FST to return to the top of the first STEP and begin to run from the first line at STEP 0. However, you can use a branching function to force the FST to immediately return to STEP 0 if you do not desire to wait for the next execution cycle to begin.

♦ The first blank line found in an FST is automatically converted to the END command. Any commands following a blank line are lost.

♦ Only one END command can be present in an FST. ♦ Use Wait states (WT command) to suspend operation of the FST whenever possible to reduce

MPU processor overload, especially in a loop in which a condition is being repeatedly checked.

♦ Be sure to configure the I/O parameters before referencing them in an FST. ♦ When using any branching command (GO, <, >, <=, >=, ==), make sure that you have defined

the LABEL that you are referencing with the command.

1.4 FST Storage and Restart This section details what FST configuration data is stored when a write to Internal Configuration Memory (EEPROM) is performed, and what happens to the FST after a Cold Start, Warm Start, power outage, other restart, or after upgrading the ROC or FloBoss firmware.

NOTE: In this section, the term restart includes a Warm Start or restart after power outage only.

FloBoss 103

♦ Flash Memory Save Configuration – FSTs are permanently saved to memory. ♦ Restarts – If an FST is saved to memory and it is active (running) when a restart occurs, FSTs

automatically restart at the beginning STEP. ♦ Cold Start – On a Cold Start, FST Registers will be cleared, but will be restored from Internal

Config Memory if valid. However, if you perform a “Cold Start & Clear FSTs” or a “Cold Start & Clear ALL” type of Cold Start, FSTs are permanently deleted from Internal Config Memory.

♦ Upgrading Firmware – If an FST is saved to memory and it is active (running) when a firmware upgrade occurs, FSTs will be turned off and need to be manually restarted.

Page 10: FSt User Manual

FST User Manual

1-6 Introduction Rev 01/04

ROC300-Series – ROCPAC If you disable an FST and then restart it, the FST will start executing from where it left off. The FST can be forced to restart from the beginning by setting the Run Flag to a value of 2.

♦ Write to EEPROM – FSTs are NOT saved and must be saved to a disk file using FST > Write.

♦ Restarts – If an FST is active (running) when a restart occurs, you must MANUALLY restart FSTs.

♦ Cold Start – On a Cold Start, FST Registers will be cleared, but will be restored from EEPROM (Internal Config Memory) if valid and FSTs must be MANUALLY restarted. However, if you perform a “Restore Config & Clear FSTs” or a “Restore Config & Clear All of the Above” type of Cold Start, the FSTs are permanently cleared from EEPROM memory.

♦ Upgrading Firmware – Unavailable.

ROC300-Series – FlashPAC If you disable an FST and then restart it, the FST will start executing from where it left off. The FST can be forced to restart from the beginning by setting the Run Flag to a value of 2.

♦ Write to EEPROM – FST point parameters (Registers and Run Flag) are permanently saved to memory. FST executable code is not saved to Config Memory.

♦ Restarts – If FST point type is saved to memory and it is active (running) when a restart occurs, FSTs automatically restart at the beginning STEP.

♦ Cold Start – On a Cold Start, FST Registers will be cleared, but will be restored from EEPROM (Internal Config Memory) if valid. However, if you perform a “Restore Config & Clear FSTs” or a “Restore Config & Clear All of the Above” type of Cold Start, the FSTs are permanently cleared from memory.

♦ Upgrading Firmware – If FST point type is saved to memory and it is active (running) when a firmware upgrade occurs, FSTs automatically restart at the beginning STEP.

FloBoss 407 – Version 1.03 or Less If you disable an FST and then restart it, the FST will start executing from where it left off. The FST can be forced to restart from the beginning by setting the Run Flag to a value of 2.

♦ Write to Config Memory – FSTs are NOT saved and must be saved to a disk file using FST > Write.

♦ Restarts – If an FST is active (running) when a restart occurs, you must MANUALLY restart FSTs.

♦ Cold Start – On a Cold Start, FST Registers will be cleared, but will be restored from Internal Config Memory (EEPROM) if valid and FSTs must be MANUALLY restarted. However, if you perform a “Restore Config & Clear FSTs” or a “Restore Config & Clear All of the Above” type of Cold Start, the FSTs are permanently cleared from Internal Config Memory.

♦ Upgrading Firmware – If an FST is active (running) when a firmware upgrade occurs, you must MANUALLY restart FSTs.

Page 11: FSt User Manual

FST User Manual

Rev 01/04 Introduction 1-7

FloBoss 407 – Version 1.04 or Greater If you disable an FST and then restart it, the FST will start executing from where it left off. The FST can be forced to restart from the beginning by setting the Run Flag to a value of 2.

♦ Write to Config Memory – FST point parameters (Registers and Run Flag) are permanently saved to memory. FST executable code is not saved to Config Memory.

♦ Restarts – If a FST Point Type is saved to memory and it is active (running) when a restart occurs, FSTs automatically restart at the beginning STEP.

♦ Cold Start – On a Cold Start, FST Registers will be cleared, but will be restored from Internal Config Memory if valid. However, if you perform a “Restore Config & Clear FSTs,” “Cold Start & Clear FSTs,” “Cold Start & Clear ALL,” or a “Restore Config & Clear All of the Above” type of Cold Start, the FSTs are permanently cleared from memory.

♦ Upgrading Firmware – If a FST Point Type is saved to memory and it is active (running) when a firmware upgrade occurs, FSTs automatically restart at the beginning STEP.

FloBoss 500-Series

♦ Write to Internal Config Memory – FSTs are permanently saved to memory. ♦ Restarts – If an FST is saved to memory and it is active (running) when a restart occurs, FSTs

automatically restart at the beginning STEP. ♦ Cold Start – On a Cold Start, FST Registers will be cleared, but will be restored from Internal

Config Memory if valid. However, if you perform a “Restore Config & Clear FSTs” or a “Restore Config & Clear All of the Above” type of Cold Start, the FSTs are permanently cleared from Internal Config Memory.

♦ Upgrading Firmware – If an FST is saved to memory and it is active (running) when a firmware upgrade occurs, FSTs automatically restart at the beginning STEP.

ROC809

♦ Write to Internal Config Memory – FSTs are permanently saved to memory. ♦ Restarts – If an FST is saved to memory and it is active (running) when a restart occurs, FSTs

automatically restart at the beginning STEP. ♦ Cold Start – On a Cold Start, FST Registers will be cleared, but will be restored from Internal

Config Memory if valid. However, if you perform a “Cold Start & Clear FSTs” or a “Cold Start & Clear ALL” type of Cold Start, the FSTs are permanently cleared from Internal Config Memory.

♦ Upgrading Firmware – If an FST is saved to memory and it is active (running) when a firmware upgrade occurs, FSTs will be turned off and need to be MANUALLY restarted.

Page 12: FSt User Manual

FST User Manual

1-8 Introduction Rev 01/04

Page 13: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK for Windows FST 2-1

SECTION 2 – ROCLINK FOR WINDOWS FST

2.1 FST Editor Using the FST Editor, FSTs are created, compiled, and downloaded to the ROC or FloBoss. The FST Editor consists primarily of a Workspace and menus, similar in structure to “spreadsheet” programs. The FST Editor also allows monitoring and tracing of an FST while it is running.

Select Utilities > FST Editor or click the FST Editor button. The FST Editor opens a new window, such as shown in Figure 2-1.

Figure 2-1. FST Editor

The FST Editor provides a Workspace, menus, and buttons for creating a Function Sequence Table. Figure 2-1 shows the FST Editor Workspace display. The Title Bar, at the top of the Workspace window, identifies the FST being created or edited. In Figure 2-1, the Title Bar shows “Function Sequence Table 1 (50dd.fst): On Line.”

The Workspace area is divided into rows and columns with the intersection called a “Cell.” Cells are denoted by a box containing the cursor and a dark black line around the cell. Use <Tab> and the arrow keys to move between cells, or go directly to a cell by clicking it with the mouse.

FST Menu BarFST Button Bar

Function Structure

Workspace

Title Bar

CellHeader Line

Output(Compiled FST)

Page 14: FSt User Manual

FST User Manual

2-2 ROCLINK for Windows FST Rev 01/04

The Header Line of the Workspace contains the Function Structure column names. The STEP column contains the numbers that correspond to the number of rows or steps available in the Workspace. The Workspace view is populated with the actual FST data manually, when a *.FST file is opened, or when ROC or FloBoss memory is read. The View > Workspace shortcut is <Ctrl + W>.

The LABEL, CMD, ARGUMENT1, and ARGUMENT2 columns correspond to the structure of the functions. Refer to Section 2.3, Function Structure, on page 2-7.

Table 2-1. Workspace and Output Keystrokes

Key Action → Move cursor to the right cell or character. ← Move cursor to the left cell or character. ↑ Move cursor to the cell above it. ↓ Move cursor to the cell below it.

Alt + 1 View Output. Alt + Ctrl + C View Commands. Alt + Ctrl + P View Parameters. Alt + Ctrl + T View Tags. Backspace Delete the previous character. Ctrl + End Display last entry in Workspace.

Ctrl + Home Display beginning of Workspace. Ctrl + Tab Return to the ROCLINK for Window On Line view. Ctrl + W View Workspace. Delete Delete character in front of the cursor position.

End Move cursor to ending cell of the row. Enter Process saves contents of cell entry and moves to the next cell. Esc Cancel entry and display original or prior contents of the cell. F1 Help. F5 Go to line number you enter. F9 View Commands and Tags. F10 View Commands and Parameters.

Home Move cursor to beginning cell of the row. Page Down Display next page of Workspace.

Page Up Display previous page of Workspace. Tab Move to the next cell.

Page 15: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK for Windows FST 2-3

2.2 Working with an FST This section details how to work with FSTs.

2.2.1 Creating an FST An FST can be created directly from a ROC or FloBoss. Depending on whether you select to create an FST from the ROC or from a disk file, the process of creating an FST is somewhat different.

Use the following steps to create an FST using an on-line ROC or FloBoss: 1. Connect the ROC or FloBoss to the computer running ROCLINK for Windows software. 2. Select Utilities > FST Editor. 3. Select File > Select > FST 1, FST 2, FST 3, or FST 4 (device dependent). This is the FST

that you create. 4. Fill in each STEP with the appropriate values. The LABEL fields are optional and are

generally only used when the STEP branches to another STEP using the GO command. 5. Select a command (CMD) using F9, or type the command. 6. Select ARGUMENT1 using F9. The Tag automatically displays. 7. Select the Parameter using F10. 8. Select ARGUMENT2 using F9. The Tag automatically displays. 9. Select the Parameter using F10.

10. Enter the END command at the end of your FST.

2.2.1.1 Creating an FST Using an Existing File Use the following steps to create an FST using an existing disk file:

1. Connect the ROC or FloBoss to the PC running ROCLINK for Windows software if you are creating an FST from the device.

2. Select Utilities > FST Editor. 3. Select File > Read FST > From File or From ROC. 4. Open an existing FST file with the .FST extension. 5. Fill in each STEP with the appropriate values. The LABEL fields are optional and are

generally only used when the STEP branches to another STEP using the GO command. 6. Select a command (CMD) using F9, or type the command. 7. Select ARGUMENT1 using F9. The Tag automatically displays. 8. Select the Parameter using F10. 9. Select ARGUMENT2 using F9. The Tag automatically displays.

10. Select the Parameter using F10. 11. Enter the END command at the end of your FST.

Page 16: FSt User Manual

FST User Manual

2-4 ROCLINK for Windows FST Rev 01/04

2.2.1.2 Creating an FST Using an ASCII Text Editor To edit an FST file using an ASCII text editor before loading into a ROC or FloBoss:

1. Open an existing FST file with the .FST extension in an ASCII text editor. Note that the text editor must not convert or add any characters, such as converting tab characters to spaces.

2. When adding new lines (functions) to the FST, use line copy to make sure all lines have the correct length. Any other editing should be done in an overstrike mode to keep lines the correct length.

3. Save the text file as a pure ASCII file with the extension *.FST.

4. Start the FST Editor.

5. Select File > Read > From File.

6. Select the File name and click Open. Verify that the FST is complete and edit if necessary. Do not forget the END command. Save the file for downloading to the ROC or FloBoss.

2.2.2 Compiling (Build) and Viewing an FST When you perform a Compile, the contents of the Workspace are encoded into the proper format for use by the ROC or FloBoss and downloaded to ROC memory. You may stop the Compile and view the code by pressing <Pause>.

NOTE: To Compile, a cell must be selected, but not activated. Cells are selected when the box contains the cursor and a dark line appears around the cell.

To build and compile an FST:

1. Select Build > Compile or click the Compile button.

The compiled file displays in the Output FST field. If invalid points exist in the FST during compilation, you receive an error indicating which Point Number is missing. The Output compiled FST field displays the errors so that the error can be corrected before the FST is downloaded. NOTE: If compilation completes without detecting any errors, you can download the FST

to the ROC or FloBoss memory.

2. Click Yes to download the FST to flash memory in the ROC or FloBoss.

3. Enter a Version Control number and a brief Description of the FST.

4. Click OK to save the FST.

After the FST is compiled, the Output view is populated with data when a Compile operation is performed or when an FST is read from the ROC or FloBoss. The View > Output shortcut is <Alt +1>.

An execution error occurs when the FST references a Point Number that has been removed or changed. Execution errors are indicated when:

♦ Status is set to Off and execution of the FST is halted. ♦ You perform a Compile. The error displays in the Output field. ♦ You open an FST from a ROC, FloBoss, or disk file.

Page 17: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK for Windows FST 2-5

2.2.3 Saving an FST To save the FST as an individual disk file:

1. Select FST > Write or click the Write to file button in the FST Editor.

2. Enter the File name and click Save. The FST file will be saved with an .fst extension.

2.2.4 Starting an FST Once an FST is compiled (Build > Compile) without errors and is downloaded to the ROC or FloBoss, the FST must be started in order to run.

1. Connect the ROC or FloBoss to the PC running ROCLINK for Windows software.

2. Select Configure > Control > FST Register.

3. Select the desired FST from the drop-down list box.

4. Select the FST Status radio button.

5. Click Apply and click OK.

2.2.5 Stopping an FST To stop the execution of an FST:

1. Connect the ROC or FloBoss to the PC running ROCLINK for Windows software.

2. Select Configure > Control > FST Register.

3. Select the desired FST from the drop-down list box.

4. De-select the FST Status radio button.

5. Click Apply.

6. Click OK.

2.2.6 Deleting an FST (Kill) To permanently delete an FST:

1. Select FST > Kill.

2. Select the desired FST (FST1 – FST4).

Page 18: FSt User Manual

FST User Manual

2-6 ROCLINK for Windows FST Rev 01/04

2.2.7 Reading, Writing, Selecting, and Closing an FST The FST menu allows you to select FSTs to Read, Write, Select, Close, and Print.

Select FST > Read > From ROC to retrieve the contents of the ROC or FloBoss memory and load the FST in the selected Workspace.

Select FST > Read > From File to retrieve the contents of a disk file and display the FST in the selected Workspace.

NOTE: If invalid points exist in the FST, you receive an error indicating which Point Number is missing.

NOTE: The Output view is populated with data when a Compile operation is performed or when an FST is read from the ROC or FloBoss. The Output shortcut is <Alt +1>.

Select FST > Write to save the current Workspace contents to a disk file (saves one FST at a time).

Select FST > Select and the FST number to creating or modifying an FST. Each number on the button indicates which FST you are opening.

Select FST > Close to close the selected FST if more than on FST is open or exit the FST Editor when only one FST is open.

2.2.8 Printing an FST You can print an FST in two ways:

Use FST > Print Step to print the Workspace contents and include the STEP numbers.

Use FST > Print IP to print the Workspace contents and includes Instruction Pointers (used in Trace mode). The Instruction Pointer (IP) indicates the location in ROC or FloBoss memory of the next function to be executed. An IP listing and printed copy can be used with the Trace mode to assist in debugging and troubleshooting an FST.

2.2.9 Altering an FST – Edit Menu The FST Edit menu is used to manipulate data within the Workspace cells.

Select Edit > Insert places a blank line in the Workspace before the current line, which allows a function to be added to the FST between two existing functions.

Select Edit > Delete to delete the current line from the Workspace.

Select Edit > Erase to erase the contents of the current Workspace.

Select Edit > Goto to go to the STEP specified. This is a quick way of moving from one place to another and is especially useful in long FSTs.

Select Edit > Listing to list the FST number, Name, Size, Date, Time, Version Number, and Operator ID of the FSTs contained in the ROC or FloBoss. The Listing option displays information detailing each FST loaded in ROC memory. Refer to Figure 2-2.

Page 19: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK for Windows FST 2-7

Figure 2-2. FST Listing

2.3 Function Structure Each function consists of a STEP number, a LABEL, a command (CMD), and up to two Arguments (ARGUMENT1 and ARGUMENT2).

STEP LABEL CMD ARGUMENT 1 ARGUMENT 2 0

The FST program provides the STEP numbers (0-299 or 0-499) for each FST. You complete the other fields in the structure to build a function.

NOTE: Do not skip any STEPs. The FST program treats a blank STEP as the END of a program and will not compile correctly.

2.3.1 Label Structure The LABEL field allows you to uniquely identify a function and consists of up to six alphanumeric characters in any combination. A LABEL identifies the action being performed by the function. For example, the LABEL “PUMPON” describes a function that activates a pump.

LABELs enable branching, the ability to direct the execution to a function other than the next function in the sequence. For example, after completion of a given program STEP, a GO command that has a LABEL provided in ARGUMENT1 directs the program to advance to the branch identified by the LABEL and to perform the functions defined there.

STEP LABEL CMD ARGUMENT 1 ARGUMENT 2 0 GO PMPOFF 1 PUMPON DO @IO A6, DO Default 1 2 PMPOFF DO @IO A7, DO Default 0

In the example above, the program is instructed to GO to the LABEL PMPOFF as established by ARGUMENT 1 in STEP 0. STEP 0 jumps to STEP 1, where the LABEL PMPOFF is located.

LABELs not referenced by an Argument are discarded when the FST is downloaded to the device. Use LABELs only to enhance readability. LABELs remain with the FST when it is saved to a disk file.

Page 20: FSt User Manual

FST User Manual

2-8 ROCLINK for Windows FST Rev 01/04

2.3.2 Command Structure – CMD The FST command (CMD) field specifies the action to be taken by a function and is identified by a one, two, or three-character mnemonic. A list is available in each Command cell that shows the function commands and provides a brief description of how they operate on the RR, CF, and Argument values. Commands may also be typed in directly. Refer to Section 4, Command Library, for a definition of each command.

STEP LABEL CMD ARGUMENT 1 ARGUMENT 2 0 GO PMPOFF . .

12 PMPOFF VAL 3

In this example, the command (CMD) GO is present.

The FST Commands menu, shown in Figure 2-3 and Figure 2-4, provides a list of the commands (for the CMD cells) used in creating functions. The list shows the command mnemonic and action for each command. Refer to Section 4, Command Library, for a definition of each command.

You can select commands in the following ways: ♦ Select View > Commands. ♦ Click the Command button. ♦ Press the Commands shortcut <Alt + Ctrl + C>. ♦ Double-click the CMD tab in the Listing dialog. ♦ Click the F9 or F10 button. ♦ Press <F9> or <F10>.

Figure 2-3. Command Pop-up

Figure 2-4. Commands Menu Listing

The cursor keys provide movement within the list and <Esc> removes the list from the Workspace. In the pop-up (Figure 2-3), double-click on an item to choose it and place it in the active cell in the Workspace. In the menu listing (Figure 2-4), double-click on an item to choose it and place it in the active cell in the Workspace or drag and drop the item onto the active cell. Click the X to close the listing.

Page 21: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK for Windows FST 2-9

2.3.3 Argument Structure Depending on the command, arguments can be references to parameters in the ROC or FloBoss (TLPs), numerical constants, or ASCII characters.

NOTE: Refer to Section 6, ROCLINK for Windows Argument Library, for details concerning specific argument structures.

Table 2-2 lists mnemonics and their descriptions for the pre-defined point types used with FST programs. The @ symbol in each mnemonic indicates the point type has been pre-defined in the FST software and must be included in any reference to point types.

STEP LABEL CMD ARGUMENT 1 ARGUMENT 2 0 @IOA1,Tag Name, EU 100

After pressing F9 to select the ARGUMENT Point Type and Point Number (@IOA1,Tag Name), press F10 to select the corresponding Parameter (EU) that you desire to monitor, read, store, or alter (write). In the previous example, @IOA1 is the Point Type, Point Number, and Tag Name, and EU is the Parameter.

Table 2-2. Pre-defined Point Type Mnemonics

Mnemonic Description @AGA American Gas Association Flow Calculation @CLK Real-time Clock @COM Communication Ports @FLG ROC Flags @FLW Meter Flow (FloBoss 103 and FloBoss 500-Series) @FST Function Sequence Table Registers @IO Physical I/O @MVS Multi-variable Sensor (FloBoss 407 only) @PID Proportional/Integral/Derivative Control @PWR Power Control Tag (FloBoss 103 and FloBoss 500-Series) @RUN Meter Run @SFP Softpoints @SMP Meter Calibration and Sampler (FloBoss 103 and FloBoss 500-Series) @SYS System Parameters @TNK Tank Management (ROC300-Series with ROCPAC only) @XRN Extra Meter Run

Page 22: FSt User Manual

FST User Manual

2-10 ROCLINK for Windows FST Rev 01/04

2.3.3.1 Tags The Tags option provides a list of the Tag names, as shown in Figure 2-5 and Figure 2-6, for each point configured in the ROC or FloBoss. Refer to Table 2-2. You can select Tags in the following ways:

♦ Select View > Tags. ♦ Click the Tags button. ♦ Press the Tags shortcut <Alt + Ctrl + T>. ♦ Press <Shift + @> while in an Argument field. ♦ Click the F9 button. ♦ Press <F9>.

Figure 2-5. Tags Pop-up

Figure 2-6. Tags Menu Listing

The cursor keys provide movement within the list and <Esc> removes the list from the Workspace. In the pop-up (Figure 2-5), double-click on an item to choose it and place it in the active cell in the Workspace. In the menu listing (Figure 2-6), double-click on an item to choose it and place it in the active cell in the Workspace or drag and drop the item onto the active cell. When you add a Tag, the Parameter dialog automatically displays. Click the X to close the listing.

Page 23: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK for Windows FST 2-11

2.3.3.2 Parameters The Parameters menu, shown in Figure 2-7 and Figure 2-8 provides a list of the Parameters available for each of the ROC point types listed. ROC point Parameters are used in Command Arguments to further define the action to be taken. For each point type, a different list of Parameters displays.

You can select Parameters in the following ways: ♦ Select View > Parameters. ♦ Click the Parameters button. ♦ Click the F10 button while in an Argument field. ♦ Press the Parameters shortcut <Alt + Ctrl + P>. ♦ Press <F10>.

Figure 2-7. Parameters Pop-up

Figure 2-8. Parameters Menu Listing

The cursor keys provide movement within the list and <Esc> removes the list from the Workspace. In the pop-up (Figure 2-7), double-click on an item to choose it and place it in the active cell in the Workspace. In the menu listing (Figure 2-8), double-click on an item to choose it and place it in the active cell in the Workspace or drag and drop the item onto the active cell. Click the X to close the listing.

Page 24: FSt User Manual

FST User Manual

2-12 ROCLINK for Windows FST Rev 01/04

2.3.4 Function Example The command, its associated arguments, and a Label (optional) make up a function. In the example shown in Figure 2-9, the argument @IOB9, Tank Level, EU, used with the VAL command, returns to the implied Results Register (RR) the real-time Value of a Tank Level in scaled engineering units (EU). The parts of this argument are as follows:

The argument structure begins with the mnemonic @IO, followed by the slot Point Number (B9) location of the physical input within the ROC or FloBoss. The Point Number indicates the location of the point (such as rack and module number) in the ROC or FloBoss. The Point Number is automatically assigned by the ROC or FloBoss and cannot be edited. Each input or output has a unique Point Number to identify the I/O.

The Point Tag for the physical input comes next. Tank Level is the user-assigned Tag for Point Number B9. The Point Tag is assigned in the I/O parameter screens of ROCLINK for Windows software.

Last is the desired Parameter of the Point Type. In the following example, EU is the Parameter. This Parameter specifies the current process value for input B9 scaled in engineering units.

User-defined Tags are created by entering and configuring points in ROCLINK for Windows software I/O point displays. For example: “@IOB9, Tank Level, EU” is the Discrete Input located at Point Number B9 with a Tag name of Tank Level.

NOTE: The Tag must be unique for the ROC or FloBoss to use it for the shorthand notation feature. If there are duplicate Tag names, the FST Editor selects the first one in the list.

In the example shown in Figure 2-9, the @IO point type is combined with a LABEL (CKHIAL) and CMD (VAL) to create a function. The Step 0 function writes the current process value (VAL) of the Tank Level, in EUs, to the Results Register, RR.

STEP 1 compares the RR value from STEP 0 with the HIAL (high alarm) value configured for the Tank Level point. If the RR value is greater than or equal to (>=) HIAL, the program branches to the PUMPON LABEL. The LABEL CKHIAL (check high alarm) allows another function to branch to this function. For example, the ARGUMENT2 PUMPON indicates that the FST branches to the Step labeled PUMPON.

STEP LABEL CMD ARGUMENT1 ARGUMENT2

0 CKHIAL VAL @IOB9, TANK LEVEL, EU (DI) 1 >= @IOB9, TANK LEVEL, HIAL (DI) PUMPON (LABEL)

Figure 2-9. Branch Function Example

In Figure 2-9, when the value RR from the first command equals or exceeds (>=) the high alarm value (HIAL condition is met), the FST branches to the PUMPON function to turn the pump on.

NOTE: Refer to Section 7, FST Examples, for additional examples.

Page 25: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK for Windows FST 2-13

2.4 Monitor and Trace Modes Two other modes of operation are available for the FST Editor: Monitor and Trace. Monitor mode allows for continual viewing of the present contents of the FST structure in the ROC or FloBoss, as it is modified. Trace mode allows you to examine execution of an FST one STEP at a time for debugging purposes.

Table 2-3 displays the keystrokes used in Monitor and Trace mode.

Table 2-3. Monitor and Trace Mode Keystrokes

Key Action Key Action → Move cursor to the right cell. Ctrl + R View Registers. ← Move cursor to the left cell. Ctrl + S View Miscellaneous Registers. ↑ Move cursor to the cell above it. End Move cursor to the right-most cell. ↓ Move cursor to the cell below it. F1 Help.

Ctrl + End Display last entry in Workspace. F6 Execute current FST command. Ctrl + Home Display beginning of Workspace. Home Move cursor to the left-most cell.

Ctrl + I View Timer. Page Down Display next page of Workspace. Ctrl + M View Messages. Page Up Display previous page of Workspace. Ctrl + O View General.

2.4.1 Monitoring an FST When on-line and in FST Monitor mode, use the Monitor menu to select which FST to Monitor, turn Trace mode on and off, Close the FST, Monitor Registers, Monitor Timers, Monitor Miscellaneous Registers, Monitor Messages, Monitor Compare Flag options, and Pause or Resume an FST.

To start the Monitor mode, select the desired FST from the Monitor menu. Table 2-3 lists the keys and subsequent actions for the Monitor mode.

Figure 2-10. FST Monitor Display

Page 26: FSt User Manual

FST User Manual

2-14 ROCLINK for Windows FST Rev 01/04

Notice that the Help Status Line at the top of the Monitor display indicates that Monitor mode is ON and Trace mode is OFF. Refer to Figure 2-10.

The Misc. Reg, Messages, and the Registers windows reflect values from the on-line Configure > Control > FST Register screens. General displays various Compare Flag options and are defined in the FST Registers > Advanced screen. Use the View menu to display or close these pop-up windows.

NOTE: You cannot edit fields while in Monitor mode. Use the General and Advanced tabs in the Configure > Control > FST Registers screen to edit necessary fields.

2.4.1.1 Registers – Monitor FST Select View > Registers to display the ten floating-point Registers used for global storage among the four FSTs. The global Registers can store calculated or manually-entered values and can pass data from one table to another. These Registers may be read from or written to any FST and are referred to as Register # 1 to Register # 10. FST Registers are defined in the FST Registers Parameters screen.

RR – The Results Register or accumulator, sometimes referred to as the Signal Value Analog (SVA), is passed between functions or FSTs.

Register 1 to Register 10 – Ten floating-point Registers for each FST. The floating-point Registers are used for global storage, and Register contents can be called into any of the FSTs configured for a ROC or FloBoss.

2.4.1.2 Timers – Monitor FST Select View > Timer to display the four Timers. FST Timers are defined in the FST Registers Parameters Advanced screen. The sequence of functions is executed at the frequency defined in the Timer Data parameter fields.

Timer 1 through Timer 4 – When set greater than “0”, they decrement by “1” every 100-milliseconds. When the timer reaches “0,” the FST branches to the LABEL specified in the Timer function. The Timer values are determined by the FST. A Timer can be set using the Set Timer (ST) command or by saving the RR (Results Register) directly to the timer parameter using the SAV command. The Check Timer (CT) command is used to compare the timer to “0.” When greater than “0,” it branches to the desired LABEL.

2.4.1.3 Misc. Reg – Monitor FST Select View > Misc. Regs to display the four unsigned integers (8-bit bytes with valid decimal values of 0 to 255) that are used for global storage by the FST. FST Miscellaneous Registers are defined in the FST Registers Parameters Advanced screen.

Misc. Reg 1 through Misc. Reg 4 – Single-byte Registers that can be written to, and the value can be used by the FST. Valid value is 0 to 255.

2.4.1.4 Messages – Monitor FST Select View > Messages to display the 30-character field for storing a message. FST Messages are defined in the FST Registers Parameters Advanced screen.

Message 1 – Character field for storing a message. The message can display on the Local Display Panel.

Page 27: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK for Windows FST 2-15

Message 2 – Not used by the FST. A value can be written to Message 2 using the FST Registers point or a ROC Display field and viewed while monitoring or tracing the FST.

2.4.1.5 Others – Monitor FST Select View > Others to display various Compare Flag options. FST Others options are defined in the FST Registers Parameters Advanced screen.

CF – Compare Flag, often referred to as the Signal Value Discrete (SVD), is an 8-bit integer representing the numbers 0 through 255 and stores a discrete value.

CF (Bny) – The Compare Flag displays as both the integer value and the binary value (bit 7 to the left and bit 0 to the right).

RF – Run Flag. ♦ 0 – FST is not running. ♦ 1 – FST is running. ♦ 2 – Restart from beginning. ♦ 5 – FST has shut down due to an invalid Point Number reference. ♦ 8 – FST Editor program initiates Trace mode. ♦ 9 – FST in the ROC or FloBoss is busy processing.

IP – Instruction Pointer. Indicates the location in ROC or FloBoss memory of the next function to be executed. One storage location is used for each byte that stores the function.

Size – The number of bytes reserved and used for the FST program in bytes. Equivalent to the end pointer value minus the start pointer value.

Brk – Indicates the size of the next function to be executed. The delay, in 100-millisecond intervals, between the execution of successive FST commands or functions.

Page 28: FSt User Manual

FST User Manual

2-16 ROCLINK for Windows FST Rev 01/04

2.4.2 Trace On – Monitor FST When on-line, the FST Editor uses a Trace mechanism that provides the ability to debug an FST (Monitor > Trace On). Trace executes the FST command indicated by the Instruction Pointer (IP), moves the Instruction Pointer to the next FST command to be executed, and then stops. You are given the opportunity to examine the results of the FST command and determine the next FST command to be executed. The location of the action depends on the nature of the command. The action may be traced to the history log, I/O value, Point Numbers, Softpoint, and so on.

The command executed is determined by comparing the Instruction Pointer (IP) shown on the Monitor screen to a printout of all Instruction Pointers and their corresponding commands. Trace thereby verifies proper execution and sequencing of commands.

NOTE: Before entering Trace mode, print out an Instruction Pointer listing of the FST.

Press <F6> to execute the next command. The current command displays in red.

After entering Trace mode from a newly compiled FST, the FST starts at the first STEP. After entering Trace mode from an executing FST, the FST starts at the STEP being executed. A value can be entered into the Instruction Pointer (IP) field to manually jump to another STEP.

NOTE: When you attempt to Trace an FST that contains WT, BRK, ST, or CT commands, a pause in the sequencing can occur until the command conditions are met.

Trace commands include:

♦ Select Monitor > Trace On to turn on Trace mode. ♦ Select Monitor > Pause to stop the FST at the current command. ♦ Select Monitor > Resume to start the FST at the current command. ♦ Select Monitor > Trace Off to turn off Trace mode.

2.4.3 Troubleshooting an FST An execution error occurs when the FST references a Point Number that has been removed or changed.

If an error occurs during the compile process (Build > Compile), the Output field lists the error type and the cell in question turns red.

In Monitor mode, execution errors are indicated through the Run Flag Status (RF). 0 – FST is not running. 1 – FST is running. 2 – Restart from beginning. 5 – Indicates FST has shut down due to an invalid point reference. 8 – FST Editor initiates the Trace mode. 9 – Indicates that the FST in the ROC or FloBoss is processing.

Use the Print function to print the FST for troubleshooting.

Page 29: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK 800 FST 3-1

SECTION 3 – ROCLINK 800 FST

3.1 FST Editor Using the FST Editor, FSTs are created, compiled, debugged, and downloaded to the device. The FST Editor consists primarily of a Workspace and menus, similar in structure to spreadsheet programs. The FST Editor also allows monitoring and tracing of an FST while it is running.

Select Utilities > FST Editor or click the FST Editor button to launch the FST Editor.

Figure 3-1. FST Editor

The FST Editor provides a Workspace, menus, and buttons for creating a Function Sequence Table. The Title Bar at the top of the Workspace window identifies the FST being created or edited. In Figure 3-1, the Title Bar shows “Function Sequence Table 1 – Workspace.”

The Workspace area is a table, divided into rows and columns with the intersection called a Cell. You can use <Tab> and the arrow keys to move between cells, or you can go directly to a cell by clicking it with the mouse. Cells are denoted by a box containing the cursor and a thick gray line around the cell.

The Header Line of the Workspace contains the function structure column names. The STEP column contains the numbers that correspond to the number of rows or Steps available in the Workspace.

The LABEL, CMD, ARGUMENT1, and ARGUMENT2 columns correspond to the structure of the functions.

FST Button BarFST Tool BarSelected FST

Workspace

Title Bar

CellHeader Line

Output(Compiled FST)

FST Menu Bar

Page 30: FSt User Manual

FST User Manual

3-2 ROCLINK 800 FST Rev 01/04

Table 3-1. Workspace and Output Keystrokes

Key Action

→ Move cursor to the right cell or character. ← Move cursor to the left cell or character. ↑ Move cursor to the cell above it. ↓ Move cursor to the cell below it.

Backspace Delete the previous character. Ctrl + Home Display beginning of Workspace. Ctrl + End Display last entry in Workspace.

Delete Delete character in front of the cursor position. End Move cursor to the right-most position within the cell.

Enter Process saves contents of cell entry and moves to the next cell. Esc Undo entry and display original or prior contents of the cell. F1 Help.

Home Move cursor to the left-most position within the cell. Page Down Display next page of Workspace.

Page Up Display previous page of Workspace. Tab Move to the next cell.

3.2 Working with an FST This section details how to work with FSTs.

3.2.1 Creating an FST An FST can be created directly (by entering the steps in a blank workspace) or by editing an existing file from a device or from a disk file. FSTs can also be created with an ASCII text editor.

Use the following steps to create an FST while on-line with a ROC or FloBoss:

1. Connect the ROC or FloBoss to the computer running ROCLINK 800 software.

2. Select Utilities > FST Editor.

3. Select the tab of the FST you wish to create (FST 1, FST 2, FST 3, FST 4, FST 5, or FST 6). The number of FSTs available is device dependent.

4. Fill in each STEP with the appropriate Labels, Commands, Tags, and Arguments.

♦ The Label fields are optional and are manually typed.

♦ When you select the field for the Command, the select button appears. If you click the button, a display of commands from which to choose appears. You may type in the 3-character command.

♦ Depending upon which Command was chosen, the Argument fields prompt you to type in a Label, choose a TLP, or enter some other data.

5. Enter the END command at the end of your FST.

Page 31: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK 800 FST 3-3

3.2.1.1 Creating an FST from an Existing File Use the following steps to create an FST by editing an existing FST. You may use either a FST from the device or a FST file on your PC. If you are using a file from the device, connect the ROC or FloBoss to the computer running ROCLINK 800 software.

1. Select Utilities > FST Editor.

2. Select File > Read > From File or File > Read > From Device.

3. Open an existing FST file with the .FST extension.

4. Edit each STEP with the appropriate Command, Tag, and Arguments.

♦ The Label fields are optional and are manually typed.

♦ When you select the field for the Command, the select button appears. If you click the button, a display of commands from which to choose appears. You may also type in the 3-character command.

♦ Depending upon which Command was chosen, the Argument fields prompt you to type in a Label, choose a TLP, or enter some other data.

5. Verify the END command is at the end of your FST.

3.2.1.2 Creating an FST using an ASCII Text Editor To edit an FST file using an ASCII text editor before loading into a ROC or FloBoss:

1. Open an existing FST file with the .FST extension in an ASCII text editor. Note that the text editor must not convert or add any characters, such as converting tab characters to spaces.

2. When adding new lines (functions) to the FST, use line copy to make sure all lines have the correct length. Any other editing should be done in an overstrike mode to keep lines the correct length.

3. Save the text file as a pure ASCII file with the extension *.FST.

4. Start the FST Editor.

5. Select File > Read > From File.

6. Select the File name and click Open. Verify that the FST is complete, edit if necessary, enter the END command, and save the file for downloading to the ROC or FloBoss.

Page 32: FSt User Manual

FST User Manual

3-4 ROCLINK 800 FST Rev 01/04

3.2.2 Compiling (Build) and Viewing an FST When you perform a Compile, the contents of the Workspace are encoded into the proper format for use by the ROC or FloBoss and downloaded to ROC memory. You may stop the Compile and view the code by pressing <Pause>.

To build and compile an FST:

1. Select FST Build > Compile or click the Build button to encode the FST into the proper format for use by the ROC or FloBoss memory.

The compiled file displays in the Output FST field. If invalid points exist in the FST during compilation, you receive an error indicating which Point Number is missing. The Output compiled FST field displays the errors so that the error can be corrected before the FST is downloaded.

NOTE: If an error occurs during the compile process, the Output field lists the error type and the cell in question turns red.

Execution errors are indicated when: ♦ Status is set to Off and execution of the FST is halted. ♦ You perform a Compile. The error displays in the Output field. ♦ You open an FST from a ROC, FloBoss, or disk file.

In Trace mode, you can view at which Instruction Pointer (IP) the FST failed. Use the Print function to print the FST for troubleshooting.

3.2.3 Downloading the FST to the ROC or FloBoss To download the FST to ROC or FloBoss memory:

1. Click the Download button on the toolbar or select File > Download.

2. Enter the Version number and Description of the FST, for later identification, and click OK.

3.2.4 Saving an FST To save the FST as an individual disk file:

1. Select FST > Save as or click the Write to file button in the FST Editor.

2. Enter the File name and click Save. The FST file will be saved with an .fst extension.

Page 33: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK 800 FST 3-5

3.2.5 Starting the FST Once an FST is compiled (Build > Compile) without errors and is downloaded to the ROC or FloBoss, the FST must be started in order to run.

1. Connect the ROC or FloBoss to the computer running ROCLINK 800 software.

2. Select Configure > Control > FST Register.

3. Select the desired FST from the drop-down list box.

4. Select the Status Enabled radio button.

5. Click Apply.

6. Click OK.

3.2.6 Stopping an FST To stop the execution of an FST:

1. Connect the ROC or FloBoss to the computer running ROCLINK 800 software.

2. Select Configure > Control > FST Register.

3. Select the desired FST from the drop-down list box.

4. Select the FST Status Disabled radio button.

5. Click Apply.

6. Click OK.

3.2.7 Deleting an FST (Clear) To permanently delete an FST:

1. Select FST > Clear.

2. Select the desired FST (FST1 – FST6).

3.2.8 Reading, Writing, Selecting, and Closing an FST The FST menu allows you to select FSTs to Read, Write, Select, Close, and Print.

Select FST > Read > From Device to retrieve the contents of the ROC or FloBoss memory and load the FST in the selected Workspace.

Select FST > Read > From File to retrieve the contents of a disk file and display the FST in the selected Workspace.

NOTE: If invalid points exist in the FST, you receive an error indicating which Point Number is missing.

NOTE: The Output view is populated with data when a Compile operation is performed or when an FST is read from the ROC or FloBoss.

Page 34: FSt User Manual

FST User Manual

3-6 ROCLINK 800 FST Rev 01/04

Select FST > Save as to save the current Workspace contents to a disk file (saves one FST at a time).

Select FST > Close to close the selected FST if more than on FST is open or exit the FST Editor when only one FST is open.

3.2.9 Printing an FST In the FST Editor, select FST > Print Preview to print an FST or export it to a file.

When the Print Preview screen appears, click the Print button to send the FST to a printer. You may also select the PDF, Excel, or RTF buttons to export the FST as a file in those formats.

A printed FST can help you in troubleshooting.

3.2.10 Altering an FST – Edit Menu The FST Editor Edit menu provides options for altering a FST.

Select Edit > Insert Step to place a blank line in the Workspace before the current line. Use this option to add a function between two existing functions.

Select Edit > Delete Step to delete the current line from the Workspace.

Select Edit > Erase Workspace to erase the contents of the current Workspace permanently. You can save the FST to a file before you erase the Workspace.

Even though the Cut, Copy, and Paste buttons are not available, you can use <Ctrl + X>, <Ctrl + C>, and <Ctrl + V> to perform these functions when copying entire steps or blocks of steps.

3.3 Function Structure Each function consists of a STEP number, a LABEL (optional), a command (CMD), and up to two Arguments (ARGUMENT1 and ARGUMENT2).

STEP LABEL CMD ARGUMENT 1 ARGUMENT 2 0

The FST program provides the STEP numbers for each FST. You complete the other fields in the structure to build a function.

NOTE: Do not skip any Steps. The FST program treats a blank STEP as the END of a program and will not compile correctly.

Page 35: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK 800 FST 3-7

3.3.1 Label Structure The LABEL field allows you to uniquely identify a function and consists of up to six alphanumeric characters in any combination. A LABEL identifies the action being performed by the function. For example, the LABEL “PUMPON” describes a function that activates a pump.

LABELs enable branching, the ability to direct the execution to a function other than the next function in the sequence. For example, after completion of a given program STEP, a GO command that has a LABEL provided in ARGUMENT1 directs the program to advance to the branch identified by the LABEL and to perform the functions defined there.

STEP LABEL CMD ARGUMENT 1 ARGUMENT 2 0 GO PMPOFF 1 PUMPON DO DOU 4-1 1 2 PMPOFF DO DOU 4-2 0

In the example above, the program is instructed to GO to the LABEL PMPOFF as established by ARGUMENT 1 in STEP 0. STEP 0 jumps to STEP 2, where the LABEL PMPOFF is located.

LABELs not referenced by an Argument are discarded when the FST is downloaded to the device. Use LABELs only to enhance readability. LABELs remain with the FST when it is saved to a disk file.

3.3.2 Command Structure – CMD The FST command (CMD) field specifies the action to be taken by a function. A drop-down list is available in each Command cell that shows the function commands and provides a brief description of how they operate on the RR, CF, and Argument values. Commands may also be typed in directly. This example shows the use of the command (CMD) GO. Refer to Section 4, Command Library, for a definition of each command.

STEP LABEL CMD ARGUMENT 1 ARGUMENT 2 0 GO PMPOFF .

.

12 PMPOFF VAL 3

3.3.3 Argument Structure Depending on the command, arguments can be references to parameters in the ROC or FloBoss (TLPs), numerical constants, or ASCII characters.

Once the Command has been selected, the Argument cell requires either typing a numerical constant or ASCII text or clicking the TLP button for data selection.

Depending on whether you have selected TLP as number or as text in the Tools > Options dialog box of the main ROCLINK 800 application, the TLP appears in the argument structure as the TLP numbers or a text abbreviation of the Type, Point number and Parameter. For example, the text abbreviation of the status parameter of Discrete Input module 4 channel 1 would be DIN4-1,STATUS. The Data #3 parameter for Softpoint 3 would be SFP 3,DATA3.

Page 36: FSt User Manual

FST User Manual

3-8 ROCLINK 800 FST Rev 01/04

3.3.4 Function Examples The command, its associated arguments, and a Label (optional) make up a function. In this example, the Value (VAL) command in Step 0 writes the current process value of Analog Input (module 3, channel 1) in EUs to the Result Register (RR), which is implied. The Label in this example serves as a comment only, as no other function branches to it.

STEP LABEL CMD ARGUMENT1 ARGUMENT2 0 CKHIAL VAL AIN 3-1,EU 1 >= AIN 3-1,HIAL PUMPON

In the example above, when the value RR from Step 1 equals or exceeds (>=) the High Alarm value (VAL) in Step 2 and the High Alarm limit (HIAL) condition is met, the FST branches to the PUMPON function to turn the pump on.

NOTE: Refer to Section 7, FST Examples, for additional examples.

3.4 Monitor and Trace Mode Two other modes of operation are available for the FST Editor: Monitor and Trace. Monitor mode allows for continual viewing of the present contents of the FST structure in the device as it is modified. Trace mode allows you to examine execution of an FST one STEP at a time for debugging purposes.

Table 3-2. Monitor and Trace Mode Keystrokes

Key Action Key Action ↑ Move cursor to the cell above it. End Move cursor to the right-most cell. ↓ Move cursor to the cell below it. F1 Help.

Ctrl + End Display last entry in Workspace. F6 Execute current FST command. Ctrl + Home Display beginning of Workspace. Home Move cursor to the left-most cell. Page Down Display next page of Workspace. Page Up Display previous page of Workspace.

3.4.1 Monitor Mode When on-line, use FST Monitor mode to select which FST to Monitor, turn Trace mode on and off, Close the FST, Pause or Resume an FST and Monitor Registers, Timers, Miscellaneous Registers, Messages, and Compare Flag options.

To start Monitor mode to display the selected FST, select the desired FST from the Monitor menu while on-line with the ROC or FloBoss unit.

NOTE: You cannot edit fields while in Monitor mode. Use the FST Registers General and Advanced tab in the FST Parameters screen to edit necessary fields.

The Help Status Line at the top of the Monitor display indicates that Monitor mode is ON and Trace mode is OFF.

Page 37: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK 800 FST 3-9

The Parameter and Data fields include:

CF – Compare Flag, often referred to as the Signal Value Discrete (SVD), is an 8-bit integer representing the numbers 0 through 255.

CF Bny – The Compare Flag displays as both the integer value and the binary value (bit 7 to the left and bit 0 to the right).

RF – Run Flag. ♦ 0 – Indicates that the FST is not running. ♦ 1 – Indicates that the FST is running. ♦ 2 – Restart from beginning. ♦ 5 – Indicates that the FST has shut down due to an invalid point reference. ♦ 8 – FST Editor program initiates the Trace mode. ♦ 9 – Indicates that the FST in the ROC or FloBoss is busy processing.

IP – Instruction Pointer. Indicates the location in ROC or FloBoss memory of the next function to be executed. One storage location is used for each byte that stores the function.

Size – The number of bytes reserved for the FST program in bytes. Equivalent to the end pointer value minus the start pointer value.

Brk – The delay, in 100 millisecond intervals, between the execution of successive FST Commands or functions.

RR – The Results Register or accumulator, sometimes referred to as the Signal Value Analog (SVA), is a floating-point value passed between functions or FSTs.

R1 through R10 – Ten floating-point registers for each FST. The floating-point registers are used for global storage, and register contents can be called into any of the FSTs configured for a ROC or FloBoss.

Timer 1 through Timer 4 – Four timers. When set greater than “0”, they decrement by “1” every 100 milliseconds. A timer can be set using the Set Timer (ST) Command or by saving the RR (Results Register) directly to the timer parameter using the SAV Command. The Check Timer (CT) Command is used to compare the timer to “0”. When greater than “0”, it branches to the desired LABEL.

MSG1 – Character field for storing a message.

MSG2 – Not used by the FST. A value can be written to MSG2 using the FST Registers point or a ROC Display field and viewed while monitoring or tracing the FST.

MSG Data – Displays any values associated with the messages.

MISC 1 through MISC 4 – Single-byte registers that can be written to and the value can be used by the FST. Valid value is 0 to 255.

Page 38: FSt User Manual

FST User Manual

3-10 ROCLINK 800 FST Rev 01/04

3.4.2 Trace Mode When on-line, the FST Editor uses a Trace mechanism that provides the ability to debug an FST. Trace executes the FST command indicated by the Instruction Pointer (IP), moves the Instruction Pointer to the next FST command to be executed, and then stops. You are given the opportunity to examine the results of the FST command and determine the next FST command to be executed. The location of the action depends on the nature of the command. The action may be traced to the history log, I/O value, Point Numbers, Softpoint, and so on.

The command executed is determined by comparing the Instruction Pointer (IP) shown on the Monitor screen to a list of all Instruction Pointers and their corresponding commands. Trace thereby verifies proper execution and sequencing of commands.

NOTE: Before entering Trace mode, print out an Instruction Pointer listing of the FST.

After entering Trace mode from a newly compiled FST, the FST starts at the first STEP. After entering Trace mode from an executing FST, the FST starts at the STEP being executed. A value can be entered into the Instruction Pointer (IP) field to manually jump to another STEP.

Press <F6> to execute the next command.

NOTE: When you attempt to Trace an FST that contains WT, BRK, ST, or CT commands, a pause in the sequencing can occur until the command conditions are met.

Other Trace command include:

♦ Select Monitor > Trace On to turn on Trace mode. ♦ Select Monitor > Pause to stop the FST at the current command. ♦ Select Monitor > Resume to start the FST at the current command. ♦ Select Monitor > Trace Off to turn off Trace mode.

3.4.3 Troubleshooting an FST An execution error occurs when the FST references a Point Number that has been removed or changed.

If an error occurs during the compile process (Build > Compile), the Output field lists the error type and the cell in question turns red.

In Monitor mode, execution errors are indicated through the Run Flag Status (RF). ♦ 0 – FST is not running. ♦ 1 – FST is running. ♦ 2 – Restart from beginning. ♦ 5 – Indicates FST has shut down due to an invalid point reference. ♦ 8 – FST Editor initiates the Trace mode. ♦ 9 – Indicates that the FST in the ROC or FloBoss is processing.

In Trace mode, you can view at which Instruction Pointer (IP) the FST failed. ♦ Instruction Pointer left alone: Black. ♦ Instruction Pointer reset to 0 (IP): Red.

Use the Print function to print the FST for troubleshooting.

Page 39: FSt User Manual

FST User Manual

Rev 01/04 Command Library 4-1

SECTION 4 – COMMAND LIBRARY

Commands are identified by a name that consists of one or more characters or mathematical symbols. In the FST Editor, select the CMD field and perform on of the following:

♦ Type the Command.

♦ Click the button (ROCLINK 800).

♦ Press F9 (ROCLINK for Windows). This opens a list of commands, the command names, and their descriptions (actions). Table 4-1 describes the terms RR and CF used in the command descriptions (actions).

Table 4-1. Command Library Conventions Convention Description RR (in) The value or contents of the Results Register (RR), Signal Value Analog (SVA) prior to

execution of the function (command). RR (out) Output value from Results Register (RR). CF (in) The value or contents of the Compare Flag (CF), Signal Value Discrete (SVD), prior to

execution of a function (command). CF (out) The contents of the Compare Flag (CF), following execution of the function (command). Each command name is given along with a brief description (action), the Arguments (ARGUMENT1 or ARGUMENT2) required, and the effect each operation has on the RR and CF. In the explanation of the operation, if RR or CF is not mentioned, then the current content is not affected and remains unchanged. In general, the CF is affected only by logical commands.

Table 4-2 provides a summary of the available FST commands and the software that supports that Command.

Table 4-2. FST Command Summary

Category Command Action ROCLINK for Windows

ROCLINK 800

+ RR = RR + ARGUMENT1 (add) X X – RR = RR – ARGUMENT1 (subtract) X X * RR = RR * ARGUMENT1 (multiply) X X / RR = RR / ARGUMENT1 (divide) X X ** RR = RR raised to power of ARGUMENT1 X X

ABS RR = Absolute value of RR X X EXP RR = “e” (2.71828) raised to power of RR X X INT RR = Integer value of RR X X LOG RR = Log (base 10) of RR X X LN RR = Natural Log of RR X X

SQR RR = Square root of RR X X

Math

P3 RR = 3rd-order polynomial (R1, R2, R3, R4) X X

Page 40: FSt User Manual

FST User Manual

4-2 Command Library Rev 01/04

Category Command Action ROCLINK for Windows

ROCLINK 800

NOT SVD = NOT SVD X X AND SVD = SVD AND ARGUMENT1 X X OR SVD = SVD OR ARGUMENT1 X X

Logical

XOR SVD = SVD XOR ARGUMENT1 X X == If RR = ARGUMENT1, go to ARGUMENT2 LABEL X X != If RR <> ARGUMENT1, go to ARGUMENT2 LABEL X X < If RR < ARGUMENT1, go to ARGUMENT2 LABEL X X

<= If RR <= ARGUMENT1, go to ARGUMENT2 LABEL X X > If RR > ARGUMENT1, go to ARGUMENT2 LABEL X X

Comparison

>= If RR >= ARGUMENT1, go to ARGUMENT2 LABEL X X

ST Set Timer # ARGUMENT1 to ARGUMENT2 100 msec intervals X X

CT If Timer # ARGUMENT1 > 0, go to LABEL ARGUMENT2 X X WT Suspend FST execution for ARGUMENT1 secs X X

DWK RR = Day of Week (1=Sunday, 7=Saturday) X X

Time

MND RR = Minutes since midnight X X AO Set AO# ARGUMENT1 output = ARGUMENT2 EUs X X DO Set DO# ARGUMENT1 status = ARGUMENT2 X X Control

TDO Force Discrete Output Recalculation X X VAL RR = Value specified in ARGUMENT1 X X SAV Write RR to variable specified in ARGUMENT1 X X RDB Read History Value into RR X X WDB Write RR Value to History X X WTM Write Current Time to History X X DHV Read Daily History Value into RR – X DHT Read Daily History Time Stamp into RR – X PHV Read Periodic History Value into RR – X PHT Read Periodic History Time Stamp into – X MHV Read Minute History Value into RR – X DIS Read Starting Daily History Index into RR – X DIN Read Number of Daily History Indexes into RR – X PIS Read Starting Periodic History Index into RR – X PIN Read Number of Periodic History Indexes into RR – X

Database

GTE Extract Time Element from Time Stamp into RR – X GO Jump to STEP pointed to by ARGUMENT1 LABEL X X

MSG Write ARGUMENT1 to the FST message area X – MSG MSG String #1 = ARG1; MSG Data #1 = ARG2 – X END End of FST...restart at beginning X X BRK Delay ARGUMENT1 100 msec intervals X X ALM Log 10-character message and a current value X X EVT Log 10-character message and a current value X X MS2 MSG String #2 = ARG1; MSG Data #2 = ARG2 – X

Miscellaneous

TSK Not Implemented X –

Page 41: FSt User Manual

FST User Manual

Rev 01/04 Command Library 4-3

4.1 Mathematical Commands The mathematical commands provide simple arithmetic or mathematical operations. Such operations include addition (+), subtraction (–), multiplication (*), division (/), raise to power (**), absolute value (ABS), “e” raised to a power (EXP), truncate to integer (INT), base 10 logarithm (LOG), natural logarithm (LN), square root (SQR), and 3rd-order polynomial (P3).

NOTE: No operation occurs with the LOG, LN, power (**), and SQR commands if the Results Register is less than or equal to zero.

Name Description Arguments Results + Add value to RR(in) 1. Database or Constant

Value RR(out) = RR(in) + ARG1 SVD(out) = SVD(in)

– Subtract value from RR(in) 1. Database or Constant Value

RR(out) = RR(in):ARG1 SVD(out) = SVD(in)

* Multiply RR(in) by value 1. Database or Constant Value

RR(out) = RR(in) * ARG1 SVD(out) = SVD(in)

/ Divide RR(in) by value 1. Database or Constant Value

If parm1 = 0.0: RR(out) = RR(in), SVD(out) = SVD(in)

Otherwise: RR(out) = RR(in) / ARG1

** Raise RR(in) to a power 1. Database or Constant Value

If RR(in) = 0.0: RR(out) = RR(in)

If RR(in) < 0.0: temp1 = (int) ARG1 If RR(in) > 0.0: temp1 = ARG1, where temp1 is a temp storage value If temp1 > 0.0: RR(out) = RR(in) ** temp1 If temp1 ≤ 0.0: RR(out) = RR(in) In all cases: SVD(out) = SVD(in)

ABS Absolute Value of RR(in) None RR(out) = |RR(in)| SVD(out) = SVD(in)

EXP “e” to the power of RR(in) None RR(out) = e ** RR(in) SVD(out) = SVD(in)

INT Integer part of RR(in) None RR(out) = (int) RR(in) SVD(out) = SVD(in)

LOG Logarithm (base 10) of RR(in) None If RR(in) > 0.0: RR(out) = LOG[RR(in)], SVD(out) =

SVD(in) Otherwise: RR(out) = RR(in), SVD(out) = SVD(in)

LN Natural Logarithm of RR(in) None If RR(in) > 0.0: RR(out) = LN[RR(in)], SVD(out) = SVD(in) Otherwise: RR(out) = RR(in), SVD(out) = SVD(in)

Page 42: FSt User Manual

FST User Manual

4-4 Command Library Rev 01/04

Name Description Arguments Results SQR Square Root of RR(in) None If RR(in) >= 0.0:

RR(out) = SQRT[RR(in)], SVD(out) = SVD(in) Otherwise: RR(out) = RR(in), SVD(out) = SVD(in)

P3 3rd-Order Polynomial None RR(out) = [reg1 * (RR(in) ** 3)] + [reg2 * [RR(in) ** 2)] + [reg3 * [RR(in) ** 1)] + reg4 where reg1 through reg4 are the current

constant values of Register1 through Register4 of the respective FST

SVD(out) = SVD(in)

Page 43: FSt User Manual

FST User Manual

Rev 01/04 Command Library 4-5

4.2 Logical Commands You can store a discrete value called the Signal Value Discrete (SVD) in the Compare Flag (CF). The SVD is stored as an 8-bit byte. The CF is true whenever non-zero, and the CF is false when zero.

Logical commands operate upon the Compare Flag (CF). Prior to execution of a logical command, the CF must be loaded with an 8-bit value by using the SAV command.

The bit-wise logical commands (AND, OR, NOT, and XOR) apply Boolean operations on two 8-bit integers, bit-by-bit. The two 8-bit integers are the CF and the value defined by ARGUMENT1 of the logical command. Note that this value is entered as an integer between 0 and 255, which is then converted by the software into a binary number 8 bits long as described next.

Each bit is weighted as a power of two, and the bit position determines which power of two. The bit, either 0 or 1, is multiplied by the respective bit weight. The resulting binary number is read from right to left, with the right-most bit representing bit 0, and the left-most bit representing bit 7.

For example, the integer 42 is equivalent to the binary number 00101010 as shown next, where bit 0 is the right-most bit:

Bit Binary # x Weight = Bit 7 0 x 27 = 0 x 128 = 0 Bit 6 0 x 26 = 0 x 64 = 0 Bit 5 1 x 25 = 1 x 32 = 32 Bit 4 0 x 24 = 0 x 16 = 0 Bit 3 1 x 23 = 1 x 8 = 8 Bit 2 0 x 22 = 0 x 4 = 0 Bit 1 1 x 21 = 1 x 2 = 2 Bit 0 0 x 20 = 0 x 1 = 0 Total = 42

The following table summarizes the bit-wise AND operation.

The following example ANDs the two integers 37 and 42, giving a result of 32.

AND | 0 1 –|–––– 0| 0 0 1| 0 1

37 00100101 AND 42 00101010 –––––––––––––––––– 32 00100000

The following table summarizes the bit-wise Inclusive OR operation.

The following example ORs the two integers 37 and 42, giving a result of 47.

OR | 0 1 –|–––– 0| 0 1 1| 1 1

37 00100101 OR 42 00101010 –––––––––––––––––– 47 00101111

The following table summarizes the bit-wise Exclusive OR operation.

The following example Exclusive ORs the two integers 37 and 42, giving a result of 15.

XOR | 0 1 –|–––– 0| 0 1 1| 1 0

37 00100101 XOR 42 00101010 ––––––––––––––––– 15 00001111

Page 44: FSt User Manual

FST User Manual

4-6 Command Library Rev 01/04

Name Description Arguments Results NOT Logical NOT of SVD(in) None If SVD(in) > 0, SVD(out) = 0

RR(out) = RR(in) Otherwise: SVD(out) = 1

AND Logical AND ARG1 with SVD(in) 1. Database or Constant Value RR(out) = RR(in), SVD(out) = [SVD(in) AND ARG1]

OR Logical OR ARG1 with SVD(in) 1. Database or Constant Value RR(out) = RR(in), SVD(out) = [SVD(in) OR ARG1]

XOR Logical XOR ARG1 with SVD(in) 1. Database or Constant Value RR(out) = RR(in), SVD(out) = [SVD(in) XOR ARG1]

Page 45: FSt User Manual

FST User Manual

Rev 01/04 Command Library 4-7

4.3 Comparison Commands Use comparison commands to compare values. Comparison commands conditionally compare two values, and branch to a different sequence of commands if the comparison is determined to be true. Otherwise, if the comparison is determined to be false, no branching occurs and the next command in sequence is executed. Comparison commands test values for equivalence (==), non-equivalence (!=), less than (<), less than or equal to (<=), greater than (>) , and greater than or equal to (>=).

The equal to (==) command compares the contents of the Results Register to ARGUMENT1, and branches conditionally if they are equal. The equal to (==) command only works if the comparison is between integers ranging from 0 to 255. It does not work if ARGUMENT1 is greater than 255 or if it is a number other than an integer. Name Description Arguments Results

== Test If RR(in) equals ARG1. 1. Database or Constant Value If RR(in) = ARG1, Goto ARG2 2. LABEL Otherwise: continue to next command RR(out) = RR(in)

Note that this command performs in a bit-wise fashion, so two floating Point Numbers may not match. SVD(out) = SVD(in)

!= Test If RR(in) Not Equal to ARG1. 1. Database or Constant Value If RR(in) != ARG1, Goto ARG2 2. LABEL Otherwise: continue to next command RR(out) = RR(in) SVD(out) = SVD(in)

< Test If RR(in) less than ARG1. 1. Database or Constant Value If RR(in) < ARG1, Go to ARG2 2. LABEL Otherwise: continue to next command RR(out) = RR(in) SVD(out) = SVD(in)

<= 1. Database or Constant Value If RR(in) <= ARG1, Go to ARG2

Test If RR(in) less than or equal to ARG1. 2. LABEL Otherwise: continue to next command

RR(out) = RR(in) SVD(out) = SVD(in)

> Test If RR(in) greater than ARG1. 1. Database or Constant Value If RR(in) > ARG1, Go to ARG2 2. LABEL Otherwise: continue to next command RR(out) = RR(in) SVD(out) = SVD(in)

>= 1. Database or Constant Value If RR(in) >= ARG1, go to ARG2

Test if RR(in) greater than or equal to ARG1. 2. LABEL Otherwise: continue to next command

RR(out) = RR(in) SVD(out) = SVD(in)

Page 46: FSt User Manual

FST User Manual

4-8 Command Library Rev 01/04

4.4 Time-Related Commands Use time-related commands (FST Timers) to implement simple time-related operations, such as setting Timers, checking Timers, determining if Timers have elapsed, wait time before continuing, and imposing a delay upon each command executed.

Timers are used to stop the execution of the FST for a specified period of time following an action. If the desired reaction does not occur, an alarm or another action may be required to stop the process. Up to four Timers are available for use in an FST and each Timer has a resolution of 100 milliseconds. Each FST Timer decrements by 1 count every 100-milliseconds if the Timer contents are greater than 0.

Set Timer (ST) – The ST command sets any one of the four available Timers for any of the available FSTs. ARGUMENT1 specifies the number of the Timer to set and ARGUMENT2 specifies the number of 100-millisecond intervals to which the Timer is set.

Check Timer (CT) – When executing a loop repeatedly in an FST, it is recommended a timer (CT) be included so the loop executes only once every 100 msec. This prevents the loop from executing several times within the allotted task period, eliminating unnecessary calculations that could deprive time from other tasks.

Wait (WT) – The Wait command imposes a delay, entered in seconds and tenths of seconds, before executing the next command. For example, entering a value of 0.1 implies a 100-millisecond delay and a value of 1.0 implies a one-second delay.

Day of Week (DWK) and Minutes Since Midnight (MND) – These commands are written to the Results Register. For DWK, 1=Sunday through 7=Saturday.

Name Description Arguments Results ST Set Timer for specified FST with value

in 100 msec intervals. 1 second for FloBoss 103.

1. FST Point Database Value 2. Database or Constant

Value

FST Timer (ARG1) = ARG2 RR(out) = RR(in) SVD(out) = SVD(in)

CT 1. FST Point Database Value

If FST Timer (ARG1) = 0, continue to next command.

Check Timer for specified FST with value in 100 msec intervals. 1 second for FloBoss 103. 2. LABEL Otherwise, Goto ARG2.

RR(out) = RR(in) SVD(out) = SVD(in)

WT Wait – suspend FST until specified number of seconds (ARG1) have elapsed. The number of seconds can be from 0.1 to 999,999.

1. Database or Constant Value

Delay ARG1 seconds RR(out) = RR(in) SVD(out) = SVD(in)

DWK Day of Week – sets RR (out) to the day of the week (1=Sunday, 7=Saturday).

None RR(out) = Day of Week SVD(out) = SVD(in)

NOTE: The DWK function requires that the real-time clock be set correctly. MND Minutes Since Midnight – sets RR

(out) to the number of minutes past midnight.

None RR(out) = Minutes SVD(out) = SVD(in)

Page 47: FSt User Manual

FST User Manual

Rev 01/04 Command Library 4-9

4.5 Control-Related Commands Use Analog Output (AO), Discrete Output (DO), and Timed Duration Output (TDO) control-related commands to control outputs.

NOTE: The FloBoss 407 and ROC300-series units must use the AO, DO, and TDO commands to drive outputs from an FST. SAV and other commands will not affect the Output.

Name Description Arguments Results AO Analog Output – Sets the Analog Output point EUs

to the argument value. If the Analog Output is in Manual, no output is sent.

1. AO Point Database Value

2. Database or Constant Value

AO Output(ARG1) = ARG2 RR(out) = RR(in) SVD(out) = SVD(in)

DO Discrete Output – Sets the Discrete Output point status to the argument value. If the Discrete Output is in Manual, no output is sent.

1. DO Point Database Value

2. Database or Constant Value

DO Output(ARG1) = ARG2 RR(out) = RR(in) SVD(out) = SVD(in)

TDO Timed Duration Output – Activates a DO point configured as a TDO or TDO Toggle. This command requires that you write a value to the EU Value parameter prior to TDO command.

1. DO Point Database Value

DO Output(ARG1) RR(out) = RR(in) SVD(out) = SVD(in)

NOTE: To trigger outputs, use the corresponding output command (previous table). These

commands trigger the mechanism that changes the output value.

NOTE: The FloBoss 407 and ROC300-series units must use the AO, DO, and TDO commands to drive outputs from an FST. SAV and other commands will not affect the Output.

The Analog Output (AO) command sends the analog value specified in ARGUMENT2 to the analog Point Number specified in ARGUMENT1. The analog value is not sent if the analog Point Number is in Manual Mode. The check for Manual Mode is included as a safety feature and permits the FST to continue operation if the device connected to the Analog Output is being serviced.

If a PID loop is controlling the Analog Output, placing the PID loop into Manual Mode allows the FST to send a value to the output parameter of the PID.

Sending the value to the EU parameter of an Analog Output changes the parameter’s contents, but does not initiate a new raw output.

4.6 Database Commands Database commands provide access to the configuration and historical databases. Operations include reading and writing configuration parameters and reading, writing, storing values from historical databases, and time stamping values to a History Point.

VAL – The Value (VAL) command loads the Results Register (RR) with the value defined in ARGUMENT1. ARGUMENT1 can be a constant or any database parameter available to the FST. The value defined in ARGUMENT1 is converted to floating point notation and written to the Results Register.

SAV – The Save (SAV) command writes the Results Register (RR) value to any database parameter available to the FST.

Page 48: FSt User Manual

FST User Manual

4-10 Command Library Rev 01/04

WDB, WTM, and RDB – The historical database commands, Write to Historical Database (WDB), Write Time to Historical Database (WTM), and Read Historical Database (RDB), allow you to establish a non-periodic history database (one that has no specific time interval), a periodic history database (one that has a specific time interval), or a storage array for data (similar to a Softpoint).

For the FST historical database commands to work, a History Point has to be configured correctly for a FST History Point as either FST Time Archive Type (Min or Sec when using ROCLINK for Windows) or FST Data Archive Type.

When defining history database points for WDB, WTM, and RDB, define at least one History Point as an FST Time type (minute or second) to provide a time stamp for the values logged. The time stamps represent what time each portion of the accumulated data was logged.

To define an FST History Point using ROCLINK 800:

1. Select Configure > History Points.

2. Select the desired History Segment.

3. Select the desired History Point.

4. Click the Archive Type TLP button and select: ♦ FST Time. ♦ FST Data.

5. Click the Archive Point TLP button and select the Point Type FST Parameters.

6. Select the Logical Number, such as FST 1.

7. Select the Parameter, such as Register 2 to contain the data or time stamp.

8. Click OK.

9. Click Yes.

To define an FST History Point using ROCLINK for Windows:

1. Select Configure > History.

2. Select the desired History Point.

3. Select the Archive Type: ♦ FST Time (Min). ♦ FST Time (Sec). ♦ FST Data.

4. Click the Value to Archive TLP button.

5. Select the Point Type FST Registers.

6. Select the Logical Number, such as FST # 1.

7. Select the Parameter, such as Register #2 to contain the data or time stamp.

8. Click OK.

9. Click Apply.

10. Close the window.

Page 49: FSt User Manual

FST User Manual

Rev 01/04 Command Library 4-11

The FST for a History Point uses one of the historical database commands and two Arguments. ARGUMENT1 contains the history database Point Number. ARGUMENT1 can be a constant or a parameter with a value between:

♦ FloBoss 103 – 1 through 35. ♦ ROC300-series (ROCPAC) – 1 through 90. ♦ ROC300-series (FlashPAC) – 1 through 87. ♦ FloBoss 407 – 1 through 50. ♦ FloBoss 503 – 1 through 15. ♦ ROC809 – History Segment (General Segment 0 or Segment 1 through 10) and History Point

(1 through 200).

ARGUMENT2 for a ROC809, the historical database commands is the index or pointer to the history storage array. The history storage array holds entries taken at either set intervals (typically daily, hourly, and each minute) or user-configurable intervals. For information on the intervals and number of entries, refer to the instruction manual for the ROC809.

ARGUMENT2 for other devices can be a constant or a database parameter. If ARGUMENT2 is a floating-point database parameter, the historical database commands check for rollover by comparing the pointer against the number of archived periods per history database point. Following the write or read, the floating point database parameter is incremented by 1 and then compared against the number of archived periods. If the floating point database parameter is equal to or greater than the number of archived periods, the floating point database parameter is set to “0” and the data writes over the stored data.

For example, when using a ROC300-series unit, the history storage array consists of 24 history (floating point) values per history day for the history point. The maximum number of history days is 35, which provides a total of 840 periods.

History Values = 35 history days x 24 values per history day = 840 periods Name Description Arguments Results VAL Load RR–set the RR(out) to the argument value. 1. Database or

Constant Value RR(out) = ARG1 SVD(out) = SVD(in)

SAV Store RR–set the argument to the RR(in). 1. Database Value ARG1 = RR(in) RR(out) = RR(in) SVD(out) = SVD(in)

Page 50: FSt User Manual

FST User Manual

4-12 Command Library Rev 01/04

Name Description Arguments Results RDB Read Historical Database–set the RR(out) to the

historical database value of the specified database point (ARGUMENT1) and the specified pointer (ARGUMENT2) to the historical database value. Applies to historical database points defined for the FST only. For a ROC300-series with a ROCPAC, specify historical database points as:

base RAM = 1:30 expansion RAM1 = 31:60 expansion RAM2 = 61:90

If ARGUMENT2 is a floating database value (for example: @FST1, FST SEQ# 1, R8), the command increments ARGUMENT2 to the next historical database value and sets it to 0 when the number of archived historical periods are exceeded. Otherwise, no effect occurs to ARGUMENT2.

1. Database or Constant Value

2. Database or Constant Value

For FST History Point: RR(out) = History Value(ARG1,ARG2)

For floating database value ARG2:

If ARG1 >= No. of archived periods (ARG1), then ARG2 = 0

Otherwise, ARG2 = ARG2 + 1 For all other cases:

RR(out) = RR(in) SVD(out) = SVD(in)

WDB Write To Historical Database – set the RR(in) to the value of the database point (ARGUMENT1) and the pointer (ARGUMENT2). Applies to historical database points defined for the FST only. For a ROC300-series with a ROCPAC, specify historical database points as:

base RAM = 1:30 expansion RAM1 = 31:60 expansion RAM2 = 61:90.

If ARGUMENT2 is a floating database value (for example: @FST1, FST SEQ# 1, R8), the command increments ARGUMENT2 to the next historical database value and sets it to 0 when the number of archived historical periods are exceeded. Otherwise, no effect occurs to ARGUMENT2.

1. Database or Constant Value

2. Database or Constant Value

For FST History Point: History Value (ARG1, ARG2) =

RR(in). For floating database value

ARG2: If ARG2 >= No. of archived

periods (ARG1), then ARG2 = 0.

Otherwise, ARG2 = ARG2 + 1. For all other cases: RR(out) = RR(in) SVD(out) = SVD(in)

WTM Write Time To Historical Database – sets the value of the database point (ARGUMENT1) and the pointer (ARGUMENT2) to the historical database time string with either minutes or seconds resolution. The time format for minute’s resolution is [min,hr,day,mon] and for seconds resolution is [sec,min,hr,day]. Applies to historical database points defined for the FST only. For a ROC300-series with a ROCPAC, specify historical database points as:

base RAM = 1:30 expansion RAM1 = 31:60 expansion RAM2 = 61:90.

If ARGUMENT2 is a floating database value (for example: @FST1, FST SEQ# 1, R8), the command increments ARGUMENT2 to the next historical database value and sets it to 0 when the number of archived historical periods are exceeded. Otherwise, no effect occurs to ARGUMENT2.

1. Database or Constant Value

2. Database or Constant Value

For FST History Point: If minute resolution, then History Value (ARG1, ARG2 =

minute format. Otherwise: History Value

(ARG1,ARG2) = second format.

For floating database value ARG2:

If ARG2 >= number of archived periods (ARG1), then ARG2 = 0.

Otherwise: ARG2 = ARG2 + 1. For all other cases: RR(out) = RR(in) SVD(out) = SVD(in)

Page 51: FSt User Manual

FST User Manual

Rev 01/04 Command Library 4-13

4.6.1 Historical Commands – ROCLINK 800 (ROC809 only) The FST for a History Point uses one of the historical database commands and two Arguments. ARGUMENT1 typically contains the history database History Segment and History Point number with a value between:

♦ History Segment – General Segment 0 or Segment 1 through 10. ♦ History Point – 1 through 200.

ARGUMENT2 is the History Index or database pointer to the history storage array. The history storage array holds entries taken at either set intervals (typically daily, hourly, and each minute) or user-configurable intervals.

For the DHV, DHT, PHV, PHT, and MHV commands, select the History Segment and the corresponding History Point that you desire to log in Argument 1. In Argument 2, select either a database point or a constant value, which is the actual History Index where the data resides in the historical database.

The Minute History Value (MHV) History Index is the same as the minute of the hour. Read the clock’s minutes to get the last History Index value. For example, if it is 8:10 then the History Index is 10.

For the Extract Time Element (GTE) command, select the database point or a constant value, which is the actual History Index value where the data resides in the historical database. In Argument 2, select the Time Element to log the exact time of the database point or History Index value. The GTE command is used to extract the time element from the time stamp received back from the CHT and PHT commands.

For DIS, DIN, PIS, and PIN commands, select the History Segment and the corresponding History Point that you desire to log in Argument 1. In Argument 2, select the Month and Date on which to log the History Index value.

To acquire the Daily History Value (DHV), perform a Starting Daily Index (DIS) command to locate the starting History Index value for a specific day. Using the DIS History Index value, use the DHV command to locate the Daily History Value.

To find specific data in history, such as the data entered at 9:00 AM yesterday, first use the Starting Periodic Index (PIS) command to find the starting History Index value for yesterday’s date and then count forward nine to acquire the History Index value for 9:00 AM. Use this new History Index with the Periodic History Value (PHV) command to locate the data.

Name Description Arguments Results DHV Daily History Value 1. History Segment, History Point

2. DB Point or Constant (History Index) Stores value in RR. Halts on invalid History Index.

DHT Daily History Time Stamp 1. History Segment, History Point 2. DB Point or Constant (History Index)

Stores value in RR. Halts on invalid History Index.

PHV Periodic History Value 1. History Segment, History Point 2. DB Point or Constant (History Index)

Stores value in RR. Halts on invalid History Index.

PHT Periodic History Time Stamp 1. History Segment, History Point 2. DB Point or Constant (History Index)

Stores value in RR. Halts on invalid History Index.

MHV Minute History Value 1. History Segment, History Point 2. DB Point or Constant (History Index)

Stores value in RR. Halts on invalid History Index.

DIS Starting Daily Index 1. History Segment, History Point 2. Month/Day

Stores value in RR. Returns –1 if Month/Day not found.

Page 52: FSt User Manual

FST User Manual

4-14 Command Library Rev 01/04

Name Description Arguments Results DIN Number of Daily Indexes 1. History Segment, History Point

2. Month / Day Stores value in RR. Returns –1 if Month/Day not found.

PIS Starting Periodic Index 1. History Segment, History Point 2. Month / Day

Stores value in RR. Returns –1 if Month/Day not found.

PIN Number of Periodic Indexes 1. History Segment, History Point 2. Month / Day

Stores value in RR. Returns –1 if Month/Day not found.

GTE Extract Time Element 1. DB Point or Constant (History Index) (Time in Seconds since 1/1/1970)

2. Time Element

Stores value in RR. Valid Time Elements:

0 – Month 1 – Day 2 – Year 3 – Hour 4 – Minute 5 – Second

4.7 Miscellaneous Commands Use the miscellaneous commands to move around FSTs and end FSTs.

Miscellaneous commands provide operations, such as an unconditional go to (GO), message to local display panel (MSG), alarms (ALM) and event (EVT) generation, end of the FST (END), and delay (BRK).

GO – The GO command executes an unconditional branch to the LABEL in ARGUMENT1. Branching can direct the FST to a step before or after the current step.

Message – The Message (MSG) command provides a 30-character message and value for viewing on the local display panel. ARGUMENT2 should be a value that does not change frequently; therefore, the Results Register should not be used.

MS2 – Message written to the MSG2 field during Trace Mode.

Break – The BRK command imposes a delay (break period), in 100-millisecond intervals, before executing the next command. Once the break period is set to a value other than zero, a delay in 100-millisecond intervals occurs between the executions of each subsequent command.

End – The END command completes execution of the FST and causes a 100 msec delay before returning to the first STEP of the FST. The END command can only be used once in an FST.

Alarm and Event Log – The ALM and EVT commands log a 10-character message and the current value of the selected parameter to the respective log.

Name Description Arguments Results GO Go to specified LABEL. 1. LABEL Goto ARG1 RR(out) = RR(in) SVD(out) = SVD(in) BRK Break – delay execution of each

command after this one for the number of 100 millisecond intervals defined by ARGUMENT1.

1. Database or Constant Value FST break time = ARG1 RR(out) = RR(in) SVD(out) = SVD(in)

END End of FST – return to first command. None Execute FST starting with first command.

RR(out) = RR(in) SVD(out) = SVD(in)

Page 53: FSt User Manual

FST User Manual

Rev 01/04 Command Library 4-15

Name Description Arguments Results MSG LCD Message – send message

(ARGUMENT1) and value (ARGUMENT2) to local display panel. One 30 character message can be sent by each FST as shown next:

1. Message 2. Database or Constant Value

FST Message String(ARG1) FST Message Value(ARG2) RR(out) = RR(in) SVD(out) = SVD(in)

xxxxxxxxxxxxxxxxxx xxxxxxxx Arg2 val yyyyyyyy zzzzz.zz SCAN NEXT PREV MENU

xxxx ...message yyyy ...FST Tag name zzzz ...ARGUMENT2 value

MS2 Message written to the MSG2 field during Trace Mode.

1. Message 2. Database or Constant Value

FST Message String(ARG1) FST Message Value(ARG2) RR(out) = RR(in) SVD(out) = SVD(in)

ALM Log Alarm – record message (ARGUMENT1) and value (ARGUMENT2) in the alarm log. Only the first 10 characters of the 30-character message are used.

1. Message 2. Database or Constant Value

Log Alarm(ARG1, ARG2) RR(out) = RR(in) SVD(out) = SVD(in)

EVT Log Event – record message (ARGUMENT1) and value (ARGUMENT2) in the event log. Only the first 10 characters of the 30 character message are used.

1. Message 2. Database or Constant Value

Log Event(ARG1,ARG2) RR(out) = RR(in) SVD(out) = SVD(in)

NOTE: The ALM and EVT functions can quickly overfill the allotted log space of alarms and events. It is important to assure that these two functions do not operate continuously.

Page 54: FSt User Manual

FST User Manual

4-16 Command Library Rev 01/04

Page 55: FSt User Manual

FST User Manual

Rev 01/04 Command Examples 5-1

SECTION 5 – COMMAND EXAMPLES

5.1 ROCLINK for Windows Command Examples

5.1.1 Mathematical Commands

5.1.1.1 Add, Subtract, Multiply, and Divide This example demonstrates the use of the add (+) command, but also applies to the subtract (–), multiply (*), and divide (/) commands.

1. STEP 0 – VAL loads 5 into the Results Register.

2. STEP 1 – The value 10 is added (+) to the Results Register.

3. STEP 2 – The result is 15, the summation of 5 and 10. The Results Register is saved (SAV) to Register R1 for viewing.

4. STEP 3 – Execution of the FST has completed (END). After a 100-millisecond delay, execution restarts with STEP 0.

NOTE: For the divide command (/), no operation occurs if ARGUMENT1 is zero.

5.1.1.2 Power and Exponent This example demonstrates the use of the power (**) command.

1. STEP 0 – VAL loads Register R1 into the Results Register.

2. STEP 1 – The value in the Results Register is raised to the power (**) of ARGUMENT1, which is 10.

3. STEP 2 – The value in the Results Register is saved (SAV) to Register R2 for viewing.

4. STEP 3 – Execution of the FST has completed (END). After a 100-millisecond delay, execution restarts with STEP 0.

NOTE: No operation occurs with the LOG, LN, power (**), and SQR commands if the Results Register is less than or equal to zero.

Page 56: FSt User Manual

FST User Manual

5-2 Command Examples Rev 01/04

This example demonstrates the use of the exponent (EXP) command.

1. STEP 0 – VAL loads the Register R1 into the Results Register.

2. STEP 1 – EXP updates the Results Register with the value of “e” (2.718) raised to the power of the incoming Results Register value.

3. STEP 2 – SAV stores the Results Register to Register R2 for viewing.

4. STEP 3 – Execution of the FST has completed (END). After a 100-millisecond delay, execution restarts with STEP 0.

5.1.1.3 Absolute Value, Integer, Logarithm, and Square Root This example demonstrates the use of the absolute value (ABS) command, but also applies to the integer (INT), base 10 logarithm (LOG), natural logarithm (LN), and square root (SQR) commands.

NOTE: No operation occurs with the LOG, LN, power (**), and SQR commands if the Results Register is less than or equal to zero.

1. STEP 0 – VAL loads Register R1 into the Results Register.

2. STEP 1 – The Results Register is updated with the absolute value (ABS).

3. STEP 2 – SAV stores the Results Register to Register R2 for viewing.

4. STEP 3 – Execution of the FST has completed (END). After a 100-millisecond delay, execution restarts with STEP 0.

Page 57: FSt User Manual

FST User Manual

Rev 01/04 Command Examples 5-3

5.1.1.4 Polynomial This example demonstrates the use of the polynomial (P3) command. This command performs a 3rd-order polynomial calculation of the following form:

Y = AX3 + BX2 + CX + D Where: X = Results Register before the polynomial calculation.

Y = Results Register after the polynomial calculation. A, B, C, and D = Coefficients for the polynomial calculation.

In this example, the 3rd-order polynomial calculates the decimal equivalent of a 4-bit binary number. The coefficients from the above equation (A, B, C, and D) represent the individual bit values (0 or 1) of the 4-bit binary number. The coefficients are entered manually as either 0 or 1 into FST Registers R1 through R4. The decimal equivalent of the 4-bit binary number is displayed in FST Register R5.

1. STEP 0 – VAL loads 2 into the Results Register.

2. STEP 1 – Calculate the 3rd-order polynomial (P3). Enter the values 1, 0, 1, and 0 in Registers R1, R2, R3, and R4, respectively. The result is the number 10.

3. STEP 2 – SAV stores the result to Register 5 for viewing.

4. STEP 3 – Execution of the FST has completed (END). After a 100-millisecond delay, execution restarts with STEP 0.

5.1.2 Logical Commands Logical commands operate upon the Signal Value Discrete (SVD), stored in the Compare Flag. Prior to execution of a logical command, the SVD must be loaded with an 8-bit value by using the SAV command.

The following example demonstrates the use of the OR command to set the Auto/Manual Mode bit of a PID point to Auto, but the principles apply to the other logical commands.

1. STEP 0 – VAL loads the Results Register (RR) with the value of the CONTRL parameter from PID Point Number with the Tag named FLOWCNTL.

Page 58: FSt User Manual

FST User Manual

5-4 Command Examples Rev 01/04

2. STEP 1 – SAV copies the CONTRL parameter value (now contained in the Results Register) into the Compare Flag parameter of FST #1. The Results Register and Compare Flag contents are now the same. Because there is no single command to load a value into the Compare Flag directly, the two commands VAL and SAV are used (STEP 0 and STEP 1); likewise, it takes both commands to save a value from the Compare Flag (STEP 3 and STEP 4).

3. STEP 2 – OR takes the logical “OR” between the Compare Flag and the value of the integer “1” (binary 0001). The result is written into the Compare Flag, overwriting the contents (previous CONTRL value). Thus, the OR operation effectively sets the right-most bit (Bit 0) to a logical “1”, leaving the other bits unaffected. Because the Auto/Manual Mode is controlled by Bit 0 of the CONTRL Parameter, only this bit is set to “1”, which is interpreted as the Auto Mode.

4. STEP 3 – VAL loads the contents of the Compare Flag back into the Results Register.

5. STEP 4 – SAV copies the Results Register into the CONTRL parameter of the FLOWCNTL point with the Auto/Manual Mode now set to Auto.

6. STEP 5 – Execution of the FST is complete (END). After a 100-millisecond delay, execution resumes.

5.1.3 Comparison Commands Comparison commands conditionally compare two values, and branch to a different sequence of commands if the comparison is determined to be true. If the comparison is determined to be false, no branching occurs and the next command in sequence is executed. Comparison commands test values for equivalence, non-equivalence, less than, less than or equal to, greater than, and greater than or equal to.

This example compares a user-entered value R1 to the value 10 and the logical result true (1) or false (0) is reflected in R5.

1. STEP 0 – VAL reads the contents of Register R1 and loads the value into the Results Register.

2. STEP 1 – Compare (==) the value in the Results Register to the value 10. If the Results Register is equal to 10, then branch to the LABEL indicated in ARGUMENT2. In this case, the LABEL is TRUE and the branch would go to STEP 4 and continue execution. If the Results Register is not equal to 10, then continue execution with STEP 2.

3. STEP 2 – If the comparison in STEP 1 is FALSE, VAL loads the Results Register with the value 0 (FALSE) to be saved STEP 5.

4. STEP 3 – GO to the STEP with the LABEL SAVE (STEP 5). This STEP branches around STEP 4, which is executed only for TRUE comparisons.

Page 59: FSt User Manual

FST User Manual

Rev 01/04 Command Examples 5-5

5. STEP 4 – If the comparison in STEP 1 is TRUE, VAL loads the Results Register with the value 1 (TRUE) to be saved in STEP 5.

6. STEP 5 – SAV stores the value in the Results Register to Register R5.

7. STEP 6 – The FST is complete (END). Delay 100-milliseconds and begin execution at STEP 0.

5.1.4 Time-Related Commands The following example demonstrates the use of Timers. This example opens a valve allowing a fluid to flow. After a period of time has elapsed, the valve is closed when the flow falls below a pre-determined level.

NOTE: In the following example, Tag names have been removed from the I/O.

1. STEP 0 – AO opens the control valve to 100 percent flow.

2. STEP 1 – Set Timer 1 (ST) for a period of 1 minute (600 x 100 millisecond). The flow rate should be at least 25 percent of maximum after 1 minute.

3. STEP 2 – Wait (WT) 5 seconds. This delay helps control the rate of execution of the FST, freeing time for the execution of other tasks. Not using a delay can cause unnecessary repetitive executions.

4. STEP 3 – VAL reads the instantaneous substance flow rate as measured by Analog Input Point Number 2.

5. STEP 4 – Compare (>) the measured flow rate to 25 percent.

6. STEP 5 – The flow is expected to be at least 25 percent after 1 minute. If the Timer (CT) has not expired and flow is less than 25 percent, remain in the loop until the flow reaches 25 percent or the Timer expires. If the 1-minute Timer has expired, and the flow is not at least 25 percent, then the control valve is closed.

7. STEP 6 – AO closes the control valve to 0 percent flow.

8. STEP 7 – After the control valve is closed, set another Timer (WT) for 1 hour (3600 sec) before attempting to open the valve again.

9. STEP 8 – GO restarts the FST at STEP 0.

Page 60: FSt User Manual

FST User Manual

5-6 Command Examples Rev 01/04

5.1.4.1 FST Timers The FST Timer is an unsigned long data type (32 bit integer) up to 4,294,967,295. However, when writing an FST that sets the Timer as shown in the following example, attempt to restrict the number to no larger than 8,388,608. Any number larger than this value can lose significance when it is converted to a single precision number.

5.1.5 Control-Related Commands This section shows examples of Analog Output (AO), Discrete Output (DO), and Timed Duration Output (TDO) control commands.

NOTE: The FloBoss 407 and ROC300-series units must use the AO, DO and TDO commands to drive outputs from an FST. SAV and other commands will not affect the Output.

5.1.5.1 Analog Output Control Command This is an example of an Analog Output (AO) control command in an FST.

1. STEP 0 – VAL loads the Results Register with the value 100.

2. STEP 1 – GO jumps to the STEP with the LABEL “OUTPUT.”

3. STEP 2 – VAL loads the Results Register with the value 0.

4. STEP 3 – GO jumps to the STEP with the LABEL “OUTPUT.”

Page 61: FSt User Manual

FST User Manual

Rev 01/04 Command Examples 5-7

5. STEP 4 – AO operates the control (or equivalent device) to value dictated by ARGUMENT2 (in this example, the value of the Results Register).

6. STEP 5 – Execution of the FST has completed (END). After a 100-millisecond delay, execution resumes with STEP 0.

5.1.5.2 Discrete Output Control Command This is an example of a Discrete Output (DO) control command in an FST.

1. STEP 0 – DO activates output to the “ON” state or equivalent state.

2. STEP 3 – DO activates output to the “OFF” state or equivalent state.

3. STEP 7 – DO activates output to “ON” state.

4. STEP 8 – Wait (WT) 2 seconds. This delay allows the output to be on for a minimum of 2 seconds.

5. STEP 9 – DO activates output to “OFF” state.

Steps 7, 8, and 9 are equivalent to a Timed Duration Output pulse for a duration of 2 seconds.

5.1.5.3 Timed Duration Output Control Command This is an example of a Timed Duration Output (TDO) control command in an FST.

1. STEP 0 – VAL loads the Results Register with the value 2 (percent or seconds output).

2. STEP 1 – SAV stores the value in the Results Register to the EU parameter for the desired Discrete Output Point Number.

3. STEP 2 – TDO pulses the Discrete Output Point Number 2 percent or 2 seconds.

4. STEP 3 – Execution of the FST has completed (END). After a 100-millisecond delay, execution resumes with STEP 0.

Page 62: FSt User Manual

FST User Manual

5-8 Command Examples Rev 01/04

5.1.6 Database Commands These examples demonstrate the use of the value (VAL) command. The VAL command loads the Results Register (RR) with the value defined in ARGUMENT1. ARGUMENT1 can be a constant or any database parameter available to the FST. The value defined in ARGUMENT1 is converted to floating point notation and written to the Results Register.

This example demonstrates the use of the save (SAV) command. The SAV command writes the Results Register (RR) value to any database parameter available to the FST.

The following example shows the RR and R1 values before execution of the WDB command and after the execution.

Before execution: RR = 50.00, R1= 25

After execution: History database point 1 (base RAM) location 25 is set to 50.00; R1 = 26.

NOTE: The RDB, WDB, and WTM commands are operational only when the History Point number is 1 to 90 (device dependant), when the History Point archival type is defined as either FST Time (Min), FST Data, or FST Time (Sec) and when the RAM for the History Point is present.

Page 63: FSt User Manual

FST User Manual

Rev 01/04 Command Examples 5-9

5.1.7 Miscellaneous Commands Miscellaneous commands provide operations, such as an unconditional go to (GO), message to local display panel (MSG), alarms (ALM) and event (EVT) generation, end of the FST (END), and delay (BRK).

This example demonstrates the use of the GO command.

1. STEP 10 – GO unconditionally branches to STEP 23 with the FINISH LABEL.

2. STEP 23 – Execution of the FST has completed (END). After a 100-millisecond delay, execution restarts with STEP 0.

1. STEP 0 – VAL reads the value of R1 and loads the value into the Results Register.

2. STEP 1 – If the Results Register is equal to (==) 10, branch to STEP 5 (EQUAL LABEL); otherwise, continue with STEP 2.

3. STEP 2 – If the Results Register is less than (<) 10, branch to STEP 7 (LESS LABEL); otherwise, continue with STEP 3.

4. STEP 3 – If the Results Register is greater than (>) 10, send the message (MSG) in ARGUMENT1 and the value (R1) in ARGUMENT2 to the local display panel.

5. STEP 4 – GO jumps to STEP 8 to bypass printing the other messages.

6. STEP 5 – If the Results Register is equal to 10, send the message (MSG) in ARGUMENT1 and the value in ARGUMENT2 to the local display panel.

7. STEP 7 – If the Results Register is less than 10, send the message (MSG) in ARGUMENT1 and the value in ARGUMENT2 to the local display panel.

8. STEP 8 – Execution of the FST has completed (END). After a 100-millisecond delay, execution restarts with STEP 0.

Page 64: FSt User Manual

FST User Manual

5-10 Command Examples Rev 01/04

5.2 ROCLINK 800 Command Examples The following examples show how specific commands can be implemented in an FST.

5.2.1 Mathematical Commands NOTE: No operation occurs with the LOG, LN, power (**), and SQR commands if the Results

Register is less than or equal to zero.

5.2.1.1 Add, Subtract, Multiply, and Divide This example demonstrates the use of the add (+) command, but also applies to the subtract (–), multiply (*), and divide (/) commands.

1. STEP 0 – VAL loads 5 into the Results Register.

2. STEP 1 – The value 10 is added (+) to the Results Register.

3. STEP 2 – The result is 15, the summation of 5 and 10. The Results Register is saved (SAV) to Register R1 for viewing.

4. STEP 3 – Execution of the FST has completed (END). After a 100-millisecond delay, execution restarts with STEP 0.

NOTE: For the divide command (/), no operation occurs if ARGUMENT1 is zero.

5.2.1.2 Power and Exponent This example demonstrates the use of the power (**) command.

1. STEP 0 – VAL loads Register R1 into the Results Register.

2. STEP 1 – The value in the Results Register is raised to the power (**) of ARGUMENT1, which is 10.

3. STEP 2 – The value in the Results Register is saved (SAV) to Register R2 for viewing.

4. STEP 3 – Execution of the FST has completed (END). After a 100-millisecond delay, execution restarts with STEP 0.

NOTE: No operation occurs with the LOG, LN, power (**), and SQR commands if the Results Register is less than or equal to zero.

Page 65: FSt User Manual

FST User Manual

Rev 01/04 Command Examples 5-11

This example demonstrates the use of the exponent (EXP) command.

1. STEP 0 – VAL loads the Register R1 into the Results Register.

2. STEP 1 – EXP updates the Results Register with the value of “e” (2.718) raised to the power of the incoming Results Register value.

3. STEP 2 – SAV stores the Results Register to Register R2 for viewing.

4. STEP 3 – Execution of the FST has completed (END). After a 100-millisecond delay, execution restarts with STEP 0.

5.2.1.3 Absolute Value, Integer, Logarithm, and Square Root This example demonstrates the use of the absolute value (ABS) command, but also applies to the integer (INT), base 10 logarithm (LOG), natural logarithm (LN), and square root (SQR) commands.

NOTE: No operation occurs with the LOG, LN, power (**), and SQR commands if the Results Register is less than or equal to zero.

1. STEP 0 – VAL loads Register R1 into the Results Register.

2. STEP 1 – The Results Register is updated with the absolute value (ABS).

3. STEP 2 – SAV stores the Results Register to Register R2 for viewing.

4. STEP 3 – Execution of the FST has completed (END). After a 100-millisecond delay, execution restarts with STEP 0.

Page 66: FSt User Manual

FST User Manual

5-12 Command Examples Rev 01/04

5.2.1.4 Polynomial This example demonstrates the use of the polynomial (P3) command. This command performs a 3rd-order polynomial calculation of the following form:

Y = AX3 + BX2 + CX + D Where: X = Results Register before the polynomial calculation.

Y = Results Register after the polynomial calculation. A, B, C, and D = Coefficients for the polynomial calculation.

In this example, the 3rd-order polynomial calculates the decimal equivalent of a 4-bit binary number. The coefficients from the above equation (A, B, C, and D) represent the individual bit values (0 or 1) of the 4-bit binary number. The coefficients are entered manually as either 0 or 1 into FST Registers R1 through R4. The decimal equivalent of the 4-bit binary number is displayed in FST Register R5.

1. STEP 0 – VAL loads the value for A into the Results Register.

2. STEP 1 – SAV stores the value from Step 0 into R1 for use in the calculation.

3. STEP 2 – VAL loads the value for B into the Results Register.

4. STEP 3 – SAV stores the value from Step 2 into R2 for use in the calculation.

5. STEP 4 – VAL loads the value for C into the Results Register.

6. STEP 5 – SAV stores the value from Step 4 into R3 for use in the calculation.

7. STEP 6 – VAL loads the value for D into the Results Register.

8. STEP 7 – SAV stores the value from Step 6 into R4 for use in the calculation.

9. STEP 9 – Calculate the 3rd-order polynomial (P3).

10. STEP 10 – SAV stores the result to Softpoint 1 Data 6.

11. STEP 11 – Execution of the FST has completed (END).

Page 67: FSt User Manual

FST User Manual

Rev 01/04 Command Examples 5-13

5.2.2 Logical Commands The following example demonstrates the use of the OR command to set the Disabled/Remote SP Mode bit of a PID point to Remote SP, but the principles apply to the other logical commands.

1. STEP 0 – VAL loads the Results Register (SVA) with the value of the PID Mode parameter

from PID Point Number 1.

2. STEP 1 – SAV copies the PID Mode parameter value (now contained in the Results Register) into the Compare Flag parameter of FST #1. The Results Register and Compare Flag (CF) contents are now the same. Because there is no single command to load a value into the Compare Flag directly, the two commands VAL and SAV are used (STEP 0 and STEP 1). Likewise, it takes both commands to save a value from the Compare Flag (STEP 3 and STEP 4).

3. STEP 2 – OR takes the logical “OR” between the Compare Flag and the value of the integer “1” (binary 0001). The result is written into the Compare Flag, overwriting the contents (previous PID Mode value). Thus, the OR operation effectively sets the right-most bit (Bit 0) to a logical “1”, leaving the other bits unaffected. Because the Disabled/Remote SP Mode is controlled by Bit 0 of the PID Mode Parameter, only this bit is set to “1”, which is interpreted as the Remote SP Mode.

4. STEP 3 – VAL loads the contents of the Compare Flag back into the Results Register.

5. STEP 4 – SAV copies the Results Register into the PID Mode parameter with the Disabled/Remote SP Mode now set to Auto.

6. STEP 5 – Execution of the FST is complete (END). After a 100-millisecond delay, execution resumes.

5.2.3 Comparison Commands This example demonstrates the use of the equal command, but also applies to the not equal (!=), less than (<), less than or equal to (<=), greater than (>), and greater than or equal to (>=) commands. The example compares a user-entered value R1 to the value 10 and the logical result true (1) or false (0) is reflected in R5.

1. STEP 0 – VAL reads the contents of Register R1 and loads the value into the Results Register.

Page 68: FSt User Manual

FST User Manual

5-14 Command Examples Rev 01/04

2. STEP 1 – Compare (==) the value in the Results Register to the value 10. If the Results Register is equal to 10, then branch to the LABEL indicated in ARGUMENT2. In this case, the LABEL is TRUE and the branch would go to STEP 4 and continue execution. If the Results Register is not equal to 10, then continue execution with STEP 2.

3. STEP 2 – If the comparison in STEP 1 is FALSE, VAL loads the Results Register with the value 0 (FALSE) to be saved STEP 5.

4. STEP 3 – GO to the STEP with the LABEL SAVE (STEP 5). This STEP branches around STEP 4, which is executed only for TRUE comparisons.

5. STEP 4 – If the comparison in STEP 1 is TRUE, VAL loads the Results Register with the value 1 (TRUE) to be saved in STEP 5.

6. STEP 5 – SAV stores the value in the Results Register to Register R5.

7. STEP 6 – The FST is complete (END). Delay 100-milliseconds and begin execution at STEP 0.

5.2.4 Time-Related Commands The following example demonstrates the use of Timers. In this example, this portion of an FST opens a valve allowing a fluid to flow. After a period of time has elapsed, the valve is closed when the flow falls below a pre-determined level.

1. STEP 0 – AO opens the control valve to 100 percent flow.

2. STEP 1 – Set Timer 1 (ST) for a period of 1 minute (600 x 100 msec). The flow rate should be at least 25 percent of maximum after 1 minute.

3. STEP 2 – Wait (WT) 5 seconds. This delay helps control the rate of execution of the FST, freeing time for the execution of other tasks. Not using a delay can cause unnecessary repetitive executions.

4. STEP 3 – VAL reads the instantaneous substance flow rate as measured by the Analog Input (module 4, channel 2).

5. STEP 4 – Compare (>) the measured flow rate to 25 percent.

Page 69: FSt User Manual

FST User Manual

Rev 01/04 Command Examples 5-15

6. STEP 5 – The flow is expected to be at least 25 percent after 1 minute. If the Timer (CT) has not expired and flow is less than 25 percent, remain in the loop until the flow reaches 25 percent or the Timer expires. If the 1-minute Timer has expired, and the flow is not at least 25 percent, then the control valve is closed. FLWING is the Label for a step further down the FST.

7. STEP 6 – AO closes the control valve to 0 percent flow.

8. STEP 7 – After the control valve is closed, set another Timer (WT) for 1 hour (3600 sec) before attempting to open the valve again.

9. STEP 8 – GO restarts the FST at STEP 0.

5.2.4.1 FST Timers The FST Timer is an unsigned long data type (32 bit integer) and numbers up to 4,294,967,295. However, when writing an FST that sets the Timer as shown in the following example, attempt to restrict the number to no larger than 8,388,608. Any number larger than this value can lose significance when it is converted to a single precision number.

Page 70: FSt User Manual

FST User Manual

5-16 Command Examples Rev 01/04

5.2.5 Control-Related Commands

5.2.5.1 Analog Output Control Command This is an example of an Analog Output (AO) control command in an FST.

1. STEP 0 – VAL loads the Results Register with the value 100.

2. STEP 1 – GO jumps to the STEP with the LABEL “OUTPUT.”

3. STEP 2 – VAL loads the Results Register with the value 0.

4. STEP 3 – GO jumps to the STEP with the LABEL “OUTPUT.”

5. STEP 4 – AO operates the control (or equivalent device) to value dictated by ARGUMENT2 (in this example, the value of the Results Register).

6. STEP 5 – Execution of the FST has completed (END). After a 100-millisecond delay, execution resumes with STEP 0.

NOTE: The FloBoss 407 and ROC300-series units must use the AO, DO, and TDO commands to drive outputs from an FST. SAV and other commands will not affect the Output.

5.2.5.2 Discrete Output Control Command This is an example of a Discrete Output (DO) control command in an FST.

1. STEP 0 – DO activates output to the “ON” state or equivalent state.

2. STEP 10 – DO activates output to the “OFF” state or equivalent state.

Page 71: FSt User Manual

FST User Manual

Rev 01/04 Command Examples 5-17

3. STEP 20 – DO activates output to “ON” state.

4. STEP 21 – Wait (WT) 2 seconds. This delay allows the output to be on for a minimum of 2 seconds.

5. STEP 22 – DO activates output to “OFF” state.

Steps 20, 21, and 22 are equivalent to a Timed Duration Output pulse for a duration of 2 seconds.

NOTE: The FloBoss 407 and ROC300-series units must use the AO, DO and TDO commands to drive outputs from an FST. SAV and other commands will not affect the Output.

5.2.5.3 Timed Duration Output Control Command This is an example of a Timed Duration Output (TDO) control command in an FST.

1. STEP 0 – VAL loads the Results Register with the value 2 (percent or seconds output),

depending upon the configuration.

2. STEP 1 – SAV stores the value in the Results Register to the EU parameter for the desired Discrete Output Point Number 1.

3. STEP 2 – TDO pulses the Discrete Output Point Number 2 percent or 2 seconds.

4. STEP 3 – Execution of the FST has completed (END). After a 100-millisecond delay, execution resumes with STEP 0.

NOTE: The FloBoss 407 and ROC300-series units must use the AO, DO and TDO commands to drive outputs from an FST. SAV and other commands will not affect the Output.

Page 72: FSt User Manual

FST User Manual

5-18 Command Examples Rev 01/04

5.2.6 Database Commands Database commands provide access to the ROC or FloBoss configuration and historical databases. Operations include reading and writing configuration parameters, and reading, writing, and time stamping values to a History Point.

The following examples show the use of the value (VAL) and save (SAV) commands. In this example, the values from Register 1 of FST 1 and the user-defined value 5 are saved to the Results Register. The SAV command then saves the value from the Results Register to Register 2 of FST 1.

The following example shows the RR and R1 values before execution of the WDB command and after the execution.

Before execution: RR = 50.00, R1= 25 (floating point value)

After execution: History database segment 1 point 9 is set to 50.00; R1 = 26.

Page 73: FSt User Manual

FST User Manual

Rev 01/04 Command Examples 5-19

5.2.7 Miscellaneous Commands This example demonstrates the use of the Message (MSG) and GO commands. Enter a value in Register R1 that is compared to the value 10. Depending upon the result of the comparison, a message is sent to the display panel indicating that the value in R1 is either less than, greater than, or equal to 10. The value of R1 also displays.

1. STEP 0 – VAL reads the value of R1 and loads the value into the Results Register.

2. STEP 1 – If the Results Register is equal to (==) 10, branch to STEP 5 (EQUAL LABEL); otherwise, continue with STEP 2.

3. STEP 2 – If the Results Register is less than (<) 10, branch to STEP 7 (LESS LABEL); otherwise, continue with STEP 3.

4. STEP 3 – If the Results Register is greater than (>) 10, send the message (MSG) in ARGUMENT1 and the value (R1) in ARGUMENT2 to the local display panel.

5. STEP 4 – GO jumps to STEP 8 to bypass printing the other messages.

6. STEP 5 – If the Results Register is equal to 10, send the message (MSG) in ARGUMENT1 and the value in ARGUMENT2 to the local display panel.

7. STEP 7 – If the Results Register is less than 10, send the message (MSG) in ARGUMENT1 and the value in ARGUMENT2 to the local display panel.

8. STEP 8 – Execution of the FST has completed (END). After a 100-millisecond delay, execution restarts with STEP 0.

Page 74: FSt User Manual

FST User Manual

5-20 Command Examples Rev 01/04

Page 75: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK for Windows Argument Library 6-1

SECTION 6 – ROCLINK FOR WINDOWS ARGUMENT LIBRARY

ROC database parameters are used in command arguments to define the action to be taken. Table 6-1 through Table 6-17 list the parameters, which can be used in arguments.

For more information about these parameters, refer to the descriptions given in the in the ROCLINK for Windows Configuration Software User Manual (Form A6091).

Table 6-1. Discrete Input Parameters – DIN Parameter Description Parameter Description ACCUM Accumulated Value MINCNT 0% Count ALARM Alarm Code MINEU Low Reading EU – Zero EU ALDBND Alarm Deadband MODE Mode EU EU Value OFFCTR Off Counter FILTER Filter ONCTR On Counter HIAL High Alarm EU RATEAL Rate Alarm EU – Delta HIHIAL Hi Hi Alarm EU SAMTIM Maximum Sample Time – Maximum Count LOAL Low Alarm EU SCANPR Scan Period LOLOAL Lo Lo Alarm EU STATUS Status MAXCNT 100% Count TDICNT TDI Count MAXEU High Reading EU – Span EU

Table 6-2. Discrete Output Parameters – DOU

Parameter Description Parameter Description ACCUM Accumulated Value MINCNT 0% Count ALARM Alarm Code MINEU Low Reading EU CYCTIM Cycle Time MODE Mode EU EU Value STATUS Status MAXCNT 100% Count TIMEON Time On MAXEU High Reading EU

Page 76: FSt User Manual

FST User Manual

6-2 ROCLINK for Windows Argument Library Rev 01/04

Table 6-3. Analog Input Parameters – AIN

Parameter Description Parameter Description ALARM Alarm Code MAXEU High Reading EU ALDBND Alarm Deadband MAXRAW Adjusted A/D 100% CURRAW Raw A/D Input MINEU Low Reading EU EU Filtered EUs MINRAW Adjusted A/D 0% FILTER Filter MODE Mode HIAL High Alarm EU RATEAL Rate Alarm EU – Delta HIHIAL Hi Hi Alarm EU SCANPR Scan Period LOAL Low Alarm EU TDYRAW Pulses Today LOLOAL Lo Lo Alarm EU

Table 6-4. Analog Output Parameters – AOU

Parameter Description Parameter Description ALARM Alarm Code MAXRAW Adjusted A/D 100% CURRAW Raw A/D Output MINEU Low Reading EU EU Value in EUs MINRAW Adjusted A/D 0% MAXEU High Reading EU MODE Mode

Table 6-5. Pulse Input Parameters – PIN

Parameter

Description Parameter Description

ACCUM Accumulated Value MODE Mode ALARM Alarm Code RATE Current Rate ALDBND Deadband/Rollover RATEAL Rate Alarm EU – Delta CONV Conversion RATEFL Rate Flag EU Value in EUs RATEPR Rate Period HIAL Hi Alarm EU SCANPR Scan Period HIHIAL Hi Hi Alarm EU TDYTOT Today’s Total LOAL Lo Alarm EU YDYTOT Yesterday’s Total LOLOAL Lo Lo Alarm EU

Page 77: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK for Windows Argument Library 6-3

Table 6-6. PID Parameters – PID Parameter Description Parameter Description CONTRL Control Type S_DBND OVR (Sec) Deadband MINTIM Minimum Control Time S_DRVT OVR (Sec) Derivative Gain P_DBND PRI Integral Deadband S_IPUT OVR (Sec) Process Variable P_DRVT PRI Derivative Gain S_ITGL OVR (Sec) Integral Gain P_IPUT PRI (Primary) Process Variable S_LOOP OVR (Sec) Loop Period P_ITGL PRI Integral Gain S_OPUT OVR (Sec) Output EU P_LOOP PRI Loop Period S_PROP OVR (Sec) Proportional Gain P_OPUT PRI Output EU S_SCLE OVR (Sec) Scale Factor P_PROP PRI Proportional Gain S_SP OVR (Sec) Setpoint P_SCLE PRI Scale Factor S_SPCH OVR (Sec) SP Change EU/Min P_SP Primary Setpoint S_SWMD OVR (Sec) Switch Mode P_SPCH PRI SP Change EU/Min S_SWSP OVR (Sec) Sw Setpoint P_SWMD PRI Switch Mode SI_NUM OVR (Sec) Input Def - Point Number P_SWSP PRI Switch Setpoint SI_PRM OVR (Sec) Input Def - Parameter PI_NUM PRI Input Def - Point Number SI_TYP OVR (Override) (Secondary) Input Def - Type PI_PRM PRI Input Def - Parameter SO_NUM OVR (Sec) Output Def - Point Number PI_TYP PRI Input Def - Type SO_PRM OVR (Sec) Output Def - Parameter PO_NUM PRI Output Def - Point Number SO_TYP OVR (Sec) Output Def - Type PO_PRM PRI Output Def - Parameter SS_IPT OVR (Sec) Switch Process Variable PO_TYP PRI Output Def - Type SS_NUM OVR (Sec) Switch PV Def - Point Number PS_IPT Primary Switch Process Variable SS_PRM OVR (Sec) Switch PV Def - Parameter PS_NUM PRI Switch Def - Point Number SS_TYP OVR (Sec) Switch PV Def - Type PS_PRM PRI Switch Def - Parameter SWSTAT Loop Status – Switch Status PS_TYP PRI Switch Def - Type

Table 6-7. AGA Parameters – AGA

Parameter Description Parameter Description ALARM Alarm Code DENSIT Density ATMPRS Atmospheric Pressure DP_NUM Meter Input - Point Number BASDEN Base Density DP_PRM Meter Input - Parameter BASEPR Base Pressure DP_TYP Meter Input - Type BASETP Base Temperature DPSTEN Stacked Dp Enable CALCAL Freshness of C' ELAVTN Elevation CALCZ Initiate Recalculation of Zs ETHANE C2H6 Ethane CARBDI CO2 Carbon Dioxide EU Instantaneous Flow (MCF/Day) CARBMO CO Carbon Monoxide FA Orifice Thermal Expansion CPRIME C Prime (Orifice Flow Constant) FB Basic Orifice Factor CURBTU Instantaneous MMBTU FGR Real Gas Relative Density CURDP Differential Pressure Meter Input FP_NUM Static Pressure - Point Number CURFP Static Pressure FP_PRM Static Pressure - Parameter CURTMP Temperature FP_TYP Static Pressure - Type

Page 78: FSt User Manual

FST User Manual

6-4 ROCLINK for Windows Argument Library Rev 01/04

Parameter Description Parameter Description FPB Pressure Base Factor NHEXAN C6H14 n-Hexane FPV Compressibility Factor NITROG N2 Nitrogen FPWL Gravitational Correction NNONAN C9H20 n-Nonane FR Reynolds Number Factor NOCTAN C8H18 n-Octane FTB Temperature Base Factor NPENTA C5H12 n-Pentane FTF Flowing Temperature Factor OPTION AGA Configuration (bit mapped) FY Expansion Factor OR_MAT Orifice Material GASHV Heating Value ORFDIA Orifice Diameter GRAVIT Gravity – Accelerated Correction OXYGEN O2 Oxygen HELIUM He Helium PIPDIA Pipe Diameter HIAL High Alarm EU PROPAN C3H8 Propane HIDPSP Hi Dp Setpoint SAMPLE Sample Time HWPF hpwf (Pressure Extension) SCANPR Scan Period HYDSUL H2S Hydrogen Sulfide SPGR Specific Gravity IBUTAN C4H10 i-Butane SPHTRA Specific Heat Ratio IPENTA C5H12 i-Pentane TDYBTU Volume Today (MMBTUs) LAT Latitude TDYFLO Flow Today (MCF) LO_NUM Low DP Input - Point Number TMEAS Orifice Measure Temperature LO_PRM Low DP Input - Parameter TP_NUM Temperature Input - Point NumberLO_TYP Low DP Input - Type TP_PRM Temperature Input - Parameter LOAL Low Alarm EU TP_TYP Temperature Input - Type LODPSP Low Dp Setpoint VISCOS Viscosity METHAN CH4 Methane WATER H2O Water METHOD Calculation Method (bit mapped) YDYBTU MMBTU Yesterday MINDP Dp Low Flow Cutoff YDYFLO Flow Yesterday (MCF) NBUTAN C4H10 n-Butane ZB Z-base conditions NDECAN C10H22 n-Decane ZF Z-condition of Interest NHEPTA C7H16 n-Heptane

Table 6-8. Tank Parameters – TNK (ROC300-Series with a ROCPAC only)

Parameter Description Parameter Description ALARM Alarm Code LVDBND Level Deadband CORRPI Corrected Base PI MIDNIT Contract Hour – Midnight Level DISCHG Units (bbls) Discharged MT_NUM Meter Output - Point Number ENTRY Manual Entry – bbls MT_PRM Meter Output - Parameter EU Today’s Volume MT_TYP Meter Output - Type FLUID Current Fluid Level RATEAL Rate Alarm EU – Delta HAULED Total Units Hauled – bbls SCANPR Scan Period LAST Last Scan Level SPGR Specific Gravity LV_NUM Level Input - Point Number STRAP Strapping Value LV_PRM Level Input - Parameter YESDAY Yesterday’s Volume LV_TYP Level Input - Type

Page 79: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK for Windows Argument Library 6-5

Table 6-9. FST Register Parameters – FST

Parameter Description Parameter Description BREAK Execution Delay R5 Register #5 CMPFLG Compare Flag (CF) – SVD R6 Register #6 IP Instruction Pointer R7 Register #7 MISC1 Miscellaneous R8 Register #8 MISC2 Miscellaneous R9 Register #9 MISC3 Miscellaneous R10 Register #10 MISC4 Miscellaneous RR Results Register MSG1 Message #1 RUNFLG Run Flag MSG2 Message #2 TMR1 Timer #1 R1 Register #1 TMR2 Timer #2 R2 Register #2 TMR3 Timer #3 R3 Register #3 TMR4 Timer #4 R4 Register #4

Table 6-10. Soft Point Parameters – SFP

Parameter Description Parameter Description DATA1 Data Value 1 DATA12 Data Value 12 DATA2 Data Value 2 DATA13 Data Value 13 DATA3 Data Value 3 DATA14 Data Value 14 DATA4 Data Value 4 DATA15 Data Value 15 DATA5 Data Value 5 DATA16 Data Value 16 DATA6 Data Value 6 DATA17 Data Value 17 DATA7 Data Value 7 DATA18 Data Value 18 DATA8 Data Value 8 DATA19 Data Value 19 DATA9 Data Value 9 DATA20 Data Value 20 DATA10 Data Value 10 INT1 Integer Flag – Integer Value DATA11 Data Value 11

Table 6-11. Communication Port Parameters – COM

Parameter Description Parameter Description ALMPTR Alarm Pointer RCNTR Retry Counter BAUD Baud Rate RCOUNT Retry Count COPY Receiver Counter Copy RTIME Retry Time DBITS Data Bits SBITS Stop Bits KEY Key On Delay STATUS Status MODE Mode TURN Turnaround Delay PARITY Parity VALRCV Valid Receive Counter

Page 80: FSt User Manual

FST User Manual

6-6 ROCLINK for Windows Argument Library Rev 01/04

Table 6-12. Real-Time Clock Parameters – CLK

Parameter Description Parameter Description DAY Day MINUTE Minutes DAYOWK Day of Week MONTH Month HOUR Hours SECOND Seconds LEAPYR Leap Year YEAR Year

Table 6-13. ROC Flag Parameters – FLG

Parameter Description Parameter Description AUX1 Aux Out #1 On FLAG3 User OP Port Enable AUX2 Aux Out #2 On FLAG4 FST/Display Clear CLREEP Clear EEPROM IOREAD Read I/O COLD Cold Hard Start IOSCAN I/O Scan Enable COM1EN User Com1 Enable RTSCM1 RTS Comm #1 COM2EN User Com2 Enable RTSCM2 RTS Comm #2 COMPLT EEPROM Write Complete RTSROI RTS Oper Port CRCCHK CRC Check USRCEN User Prog Enable FLAG1 DI/PI ROC306/312 WARM Warm Start FLAG2 User LCD Enable WRITE Write to EEPROM

Table 6-14. ROC System Parameters – SYS

Parameter Description Parameter Description CONTRC Contract Hour ROCADR ROC Address FORCE Force End Of Day ROCGRP ROC Group

Page 81: FSt User Manual

FST User Manual

Rev 01/04 ROCLINK for Windows Argument Library 6-7

Table 6-15. Meter Rrun Parameters – RUN

Parameter

Description Parameter Description

AVG AP Average Ap FLOWHR Flow/Hour AVG DP Average Dp FLOYDY Flow Yesterday AVG TP Average Tp FPB Fpb BASDEN Base Density FPV Fpv BETA Diameter Ratio FPWLDP Fpwl (Differential) BORDIA Orifice Bore Diameter FPWLSP Fpwl (Static) C' | IMV C' (85) or IMV(92) FR Fr(85) or CdFT(92) DENS. Density FTB Ftb ENGDAY Energy/Day FTF Ftf ENGHR Energy/Hour FWL Fwl EXPFTR Expansion Fctr FWT Fwt FA Fa(85) or Zs(92) HWPF Pressure Extension FAM Fam MINTDY Minutes Today FB Fb(85) or Fn(92) MINYDY Minutes Yesterday FGR Fgr MOLWGT Molecular Weight FHGM Fhgm REYNLD Reynold’s Number FHGT Fhgt TUBDIA Tube Internal Diameter FLOACC Flow Accumulated UP SPR Upstream Static Pressure FLOMTH Flow Month VELAPP Velocity of Approach FLOPRV Flow Previous Month ZB Zb FLOTDY Flow Today ZF Zf(85) or Zf1(92) FLOWDY Flow/Day

Table 6-16. Power Control Parameters – PWR

Parameter Description Parameter Description A.ZONE Active Zone ON TM1 On Time1 ENABLE Enable ON TM2 On Time2 HLD TM Hold Time ON TM3 On Time3 LO BAT Low Battery PWRTMR Power Timer LOG DO Logical DO ST TM1 Start Time1 OFFCNT Off Counter ST TM2 Start Time2 OFFTM1 Off Time1 ST TM3 Start Time 3 OFFTM2 Off Time2 STATUS Status OFFTM3 Off Time3 VAL RX Valid Rx ON CNT On Counter

Page 82: FSt User Manual

FST User Manual

6-8 ROCLINK for Windows Argument Library Rev 01/04

Table 6-17. Meter Calibration and Sampler Parameters – SMP (FloBoss 103 and FloBoss 503 only)

Parameter Description Parameter Description AMBTMP Ambient Air Temp SPLDUR Sampler Duration ATPCAL A.Temp When Calib SPLENA Sampler Enable CALWGT Cal Wght Grav Accl TIMADT TIM INTALM DB Time CORFAC User Correct Factr TIMALC TIM Alarm Control INTGLV Integrity Level TIMIAC TIM Int Alarm Code MTPCAL M.Temp When Calib VOLACC Sampler Vol Accum OPTION Option (bit mapped) WTPCAL W.Temp When Calib SAMOUT Sampler Output

Page 83: FSt User Manual

FST User Manual

Rev 01/04 FST Examples 7-1

SECTION 7 – FST EXAMPLES

7.1 ROCLINK for Windows FST Examples This section provides examples of how specific commands can be implemented in an FST and includes several application-oriented FST examples. These examples were taken from actual customer applications and are typical of the types of applications suitable for implementation through FSTs.

7.1.1 Example 1 – Writing Data to a History Point In this example, two historical database points are defined to demonstrate using an FST to create a minute-based “history log.” The standard history log displays database values using an hourly basis. Select Configure > History to enter the following values.

Define historical database History Point 9 as: Archival Type – FST Data. Point Type – FST Registers. Point – FST #1. Parameter – Register #1 (R1).

Define historical database History Point 10 as: Archival Type – FST Time (Min). Point Type – FST Registers. Point – FST #1. Parameter – Register #2 (R2).

A history database History Point must be defined as an FST Time (Min), an FST Data, or an FST Time (Sec) archival type to allow the WDB, WTM, and RDB commands to work. A History Point number is required as ARGUMENT1 for these commands. Although History Points 9 and 10 are used in this example, any of the available history database points could be used.

The Point Type, Point Number, and Parameter definitions for the History Point are used solely to provide descriptive text when selecting History Points for viewing through ROCLINK for Windows software.

The following example increments a counter and writes its value to History Point 9 every 60 seconds. History Point 10 is used to store the time (as a time stamp) that the counter value was written to History Point 9.

Page 84: FSt User Manual

FST User Manual

7-2 FST Examples Rev 01/04

Register R5 is used as the counter. Registers R1, R2, and R5 are initialized to “0” when the FST is loaded into the ROC or FloBoss. This can be confirmed before setting the Run Flag to start the FST. R1 is the pointer for History Point 9, and R2 is the pointer for History Point 10.

1. STEP 0 to 2 – VAL increments the counter (R5) by 1 and the new value is stored to the Results Register.

2. STEP 3 – WDB writes the contents of the Results Register to History Point 9, location R1. Because R1 is a floating-point parameter, the contents of R1 are compared against the number of archived periods and set to zero, or incremented by 1.

3. STEP 4 – Same as for STEP 3, except that a time stamp (WTM) is written instead of the contents of the Results Register. The format of the time stamp is month-day, hour:minute. Because R2 is a floating-point parameter, the contents of R2 are compared against the number of archived periods and set to zero or incremented by 1.

4. STEP 5 – WT delays 60 seconds before continuing.

5. STEP 6 – The END command completes the FST and imposes a delay of 100-milliseconds before transferring to STEP 0.

7.1.2 Example 2 – Stopping an FST This example demonstrates how the FST Run Flag is set to 0 in order to stop the FST from executing after it has completed a desired task.

1. STEP 0 – VAL loads the Results Register with the value 0.

2. STEP 1 – SAV stores the value in the Results Register to the FST Run Flag.

3. STEP 2 – The END command completes the FST. In this case, the FST will not restart, because STEP 1 shuts off execution of the FST.

7.1.3 Example 3 – Cycling an FST on a Periodic Basis In this example, an FST is set to run on a 10-second cycle. A Timer is used to determine how much, if any, of the 10 seconds remain after the FST executes. The Timer indicates the amount of time required to wait before the cycle is repeated.

1. STEP 0 – Set Timer (ST) indicated in ARGUMENT1 to the number of 100-millisecond intervals indicated in ARGUMENT2.

Page 85: FSt User Manual

FST User Manual

Rev 01/04 FST Examples 7-3

2. STEP 1 to 3 – These are the steps to be cycled every 10 seconds.

3. STEP 4 to 6 – Read the Timer to see if any time from the cycle remains. The value read is used to calculate the amount of time that must be delayed before the cycle can be repeated. If the Timer has expired (0), then the FST did not complete within 10 seconds. If the Timer has not expired, then a delay is required before the FST can repeat the cycle. To calculate the necessary delay in seconds, multiply the Timer by 0.1.

7.1.4 Example 4 – Calculate Approximate Execution Rate using a FST This example determines the average time it takes to execute an FST. A Timer is used to determine the number of 100-millisecond intervals that have elapsed while a sequence of functions executes. It is important to note that the operating system can perform the FST execution at the same time as other tasks.

1. STEP 0 – The ST command sets the timer in ARGUMENT1 to the number of 100-millisecond intervals indicated in ARGUMENT2.

2. STEP 1 to 3 – Any function sequence.

3. STEP 4 – VAL reads the Timer to establish the reference time for the beginning of the sequence.

4. STEP 5 – SAV stores the value of the Timer to Register R6.

5. STEP 6 to 8 – The sequence of FST commands for which the rate of execution is being determined.

6. STEP 9 – The sequence of commands has completed executing. VAL reads the Timer to determine the time of execution.

7. STEP 10 – SAV stores the value of the timer to Register R7. Take the difference between the two Register values R7 and R6 and multiply by 0.1 to arrive at an execution rate in seconds (rounded to the nearest 100-milliseconds).

Another way of determining the execution rate is to utilize the alarm functionality of the ROC or FloBoss. For example, determining the execution rate of an instantaneous flow calculation of a meter run can be accomplished by enabling alarms for the meter run and changing the inputs forcing the flow rate into and out of alarm conditions. The Alarm Log can then be examined to determine execution rate of the instantaneous flow calculation to the nearest second.

Page 86: FSt User Manual

FST User Manual

7-4 FST Examples Rev 01/04

7.1.5 Example 5 – Daily Accumulation by FST This example presents the setup, configuration, and operation of an FST that calculates daily accumulation. Daily accumulation requires storage parameters for current and intermediate calculated values. For this example, FST Registers are used as the storage parameters.

R1 – Current rate (EUs/Day).

R2 – Current day accumulation (current value or totalization).

R3 – Yesterday accumulation.

R4 – Unused.

R5 – Current minute summation.

R6 – Current minute counter.

R7 – Save last minute for comparison to determine minute rollover.

R8 – Contract minute (contract minute = contract hour * 60 Minutes/Hour. For example, if contract hour is 8, then contract minute = 8 * 60 = 480).

The FST mirrors the way in which the history accumulation is performed by the ROC or FloBoss operating system.

1. STEPS 0:1 – On power-up, the FST sets the last minute (R7) to the current minute past midnight. This is to avoid unwanted accumulation during the first pass through the FST immediately after power-up. The first pass determines that minute rollover has occurred, calculates a minute average, and adds the minute average to the current day accumulation (R2). An extra delay (WT) may also provide enough time for the current rate (R1) to stabilize.

Page 87: FSt User Manual

FST User Manual

Rev 01/04 FST Examples 7-5

2. STEP 2 – Wait (WT) 3 seconds. This delay helps control the rate of execution of the FST, freeing time for the execution of other tasks. Failure to use a delay can cause unnecessary repetitive executions.

3. STEPS 3:9 – The current rate (R1) can be any value, but this example requires the value to have units of EUs/Day. Often, the value is the end product of several calculations. Other times, the value is read directly from any one of the parameters the FST has access to, such as the scaled engineering units of an Analog Input module.

The FST reads the current rate (R1) every 3 seconds, adds the current rate (R1) to the current minute summation Register (R5), and increments the current minute counter (R6) by 1. In Steps 18 through 22, a minute average is calculated by dividing the current minute summation Register (R5) by the current minute counter (R6).

4. STEPS 10:13 – The current minute past midnight is compared to the last minute (R7) saved to determine if minute rollover has occurred. If minute rollover has not occurred, after a 3 second delay, Steps 3 through 9 are repeated for a new current rate (R1).

5. STEPS 14:15 – Upon detection of minute rollover, save the current minute past midnight to the last minute (R7) saved for use in subsequent minute comparisons.

6. STEPS 16:17 – Check for division by zero.

7. STEPS 18:22 – Calculate the current minute average by dividing the current minute summation Register (R5) value by the current minute counter (R6), and add the minute average to the current day accumulation (R2). An extra division by 1440 converts the calculated minute average from EUs per Day to EUs per Minute. If the current rate (R1) has units of EUs per Hour, then divide by 60.

8. STEPS 23:25 – Zero the current minute summation Register (R5) and the current minute counter (R6) for the new minute.

9. STEPS 26:27 – Check for the end of the contract day by comparing the current minute past midnight to the contract minute (R8).

10. STEPS 28:31 – End of contract day detected. Copy current day accumulation (R2) to yesterday accumulation (R3) and zero the current day accumulation (R2) for the new day.

The current day accumulation can be historically archived as either the current value (CUR) or totalized value (TTL). Each provides up to 35 days of hourly and daily history.

7.1.6 Example 6 – FST Tank Pumpdown Control The FST allows you to assemble sequences of functions to define process I/O relationships that produce the desired control actions. This is best illustrated using a simple process control example. Using only five different commands (an END command is always required) and nine functions, an FST can be created to automate the emptying of the tank shown in Figure 7-1. One Analog Input is used to measure the fluid head, or level, in inches and one Discrete Output is used to control a pump and a fill valve. The three functions previously discussed, CKHIAL, PUMPON, and PMPOFF, are used in this example.

Page 88: FSt User Manual

FST User Manual

7-6 FST Examples Rev 01/04

The control scheme uses the level transmitter, LT1, to measure the instantaneous fluid level in the tank. LT1 is wired to Analog Input A1 in the ROC. A high alarm, HIALand a low alarm, LOAL, are configured. LT1 is spanned to read from 0 (MINEU=0) inches to 180 (MAXEU=180) inches of H2O. HIAL is set equal to 150 inches H2O, and LOAL is set equal to 10 inches of H2O. A Discrete Output, A6, is connected to an interposing relay, R1, which starts or stops Pump1 and is also interlocked to fill control valve, FCV1.

ROCA5R1

M

FCV1

TANK 2HIAL

LOAL

ROCB9

LT1

TANK 1 PUMP 1

Figure 7-1. Tank Pump-Down Schematic

When Pump1 is started, FCV1 diverts the inlet flow to Tank2. When Pump1 is stopped, FCV1 diverts the inlet flow back to Tank1. Thus, a pre-metered amount of fluid is delivered downstream of Pump1 on a cyclical basis. HIAL is used to start Pump1, and LOAL is used to stop Pump1. The amount delivered during each pump-down cycle is easily adjusted by changing HIAL and/or LOAL according to the expression:

Volume (bbls) = (HIAL:LOAL)*(STRAP)*(S.G.) where:

HIAL-LOAL = Change in fluid level due to pump-down. STRAP = Tank strapping value in bbls/in. S.G. = Specific gravity of fluid compared to H2O.

Page 89: FSt User Manual

FST User Manual

Rev 01/04 FST Examples 7-7

7.2 ROCLINK 800 FST Examples This section consists of several application-oriented FST examples.

7.2.1 Example 1 – Writing Data to a History Point using an FST In this example, two historical database points are defined to demonstrate using an FST to create a 7 minute-based “history log.” Select Configure > History Segments and set up history segment 1 (Segment 01) to allow 10 points (Number of Points). Select Configure > History Points and enter the following values in the Seg 1 tab screen.

Define historical database, Segment 1, History Point 9 as: Archival Type – FST Data. Point Type – FST Parameters. Logical Number – FST 1. Parameter – Register 1 (R1).

Define historical database, Segment 1, History Point 10 as: Archival Type – FST Time. Point Type – FST Parameters. Logical Number – FST 1. Parameter – Register 2 (R2).

A history database History Point must be defined as an FST Data or an FST Time archival type to allow the WDB, WTM, and RDB commands to work. A History Point number is required as ARGUMENT1 for these commands. Although History Points 9 and 10 are used in this example, any of the available history database points could be used.

The Point and Parameter definitions for the History Point are used solely to provide descriptive text when selecting History Points for viewing through ROCLINK 800 software.

The following example increments a counter and writes its value to History Point 9 every 7 minutes. History Point 10 is used to store the time (as a time stamp) that the counter value was written to History Point 9.

Register R5 is used as the counter. Registers R1, R2, and R5 are initialized to “0” when the FST is loaded into the device. This can be confirmed before setting the Run Flag to start the FST. R1 is the pointer for History Point 9, and R2 is the pointer for History Point 10.

1. STEP 0 to 2 – VAL increments the counter (R5) by 1 and the new value is stored to the Results Register.

Page 90: FSt User Manual

FST User Manual

7-8 FST Examples Rev 01/04

2. STEP 3 – WDB writes the contents of the Results Register to History Segment 1, History Point 9, location R1. Because R1 is a floating-point parameter, the contents of R1 are compared against the number of archived periods and set to zero, or incremented by 1.

3. STEP 4 – Same as for STEP 3, except that a time stamp (WTM) is written instead of the contents of the Results Register. The format of the time stamp is month-day, hour:minute. Because R2 is a floating-point parameter, the contents of R2 are compared against the number of archived periods and set to zero or incremented by 1.

4. STEP 5 – WT delays 420 seconds before continuing.

5. STEP 6 – The END command completes the FST and imposes a delay of 100-milliseconds before transferring to STEP 0.

7.2.2 Example 2 – Stopping an FST This example demonstrates how the FST Run Status is set to 0 in order to stop the FST from executing after it has completed a desired task.

1. STEP 0 – VAL loads the Results Register with the value 0.

2. STEP 1 – SAV stores the value in the Results Register to the FST Run Status.

3. STEP 2 – The END command completes the FST. In this case, the FST will not restart, because STEP 1 shuts off execution of the FST.

7.2.3 Example 3 – Cycling an FST on a Periodic Basis In this example, an FST is set to run on a 10-second cycle. A Timer is used to determine how much, if any, of the 10 seconds remain after the FST executes. The Timer indicates the amount of time required to wait before the cycle is repeated.

1. STEP 0 – Set Timer (ST) indicated in ARGUMENT1 to the number of 100-millisecond

intervals indicated in ARGUMENT2.

2. STEP 1 to 3 – These are the steps to be cycled every 10 seconds.

Page 91: FSt User Manual

FST User Manual

Rev 01/04 FST Examples 7-9

3. STEP 4 to 6 – Read the Timer to see if any time from the cycle remains. The value read is used to calculate the amount of time that must be delayed before the cycle can be repeated. If the Timer has expired (0), then the FST did not complete within 10 seconds. If the Timer has not expired, then a delay is required before the FST can repeat the cycle. To calculate the necessary delay in seconds, multiply the Timer by 0.1.

7.2.4 Example 4 – Calculate Approximate Execution Rate using a FST This portion of an FST determines the average time it takes to execute an FST. A Timer is used to determine the number of 100-millisecond intervals that have elapsed while a sequence of functions executes. It is important to note that the operating system can perform the FST execution at the same time as other tasks.

1. STEP 0 – The ST command sets the timer in ARGUMENT1 to the number of 100-millisecond intervals indicated in ARGUMENT2.

2. STEP 1 to 19 – Any function sequences.

3. STEP 20 – VAL reads the Timer to establish the reference time for the beginning of the sequence.

4. STEP 21 – SAV stores the value of the Timer to Register R6.

5. STEP 22 to 39 – The sequence of FST commands for which the rate of execution is being determined.

6. STEP 40 – The sequence of commands has completed executing. VAL reads the Timer to determine the time of execution.

7. STEP 41 – SAV stores the value of the timer to Register R7. Take the difference between the two Register values R7 and R6 and multiply by 0.1 to arrive at an execution rate in seconds (rounded to the nearest 100-milliseconds).

Another way of determining the execution rate is to utilize the alarm functionality of the ROC or FloBoss. For example: Determining the execution rate of an instantaneous flow calculation of a meter run can be accomplished by enabling alarms for the meter run and changing the inputs forcing the flow rate into and out of alarm conditions. The Alarm Log can then be examined to determine execution rate of the instantaneous flow calculation to the nearest second.

Page 92: FSt User Manual

FST User Manual

7-10 FST Examples Rev 01/04

Page 93: FSt User Manual

FST User Manual

Rev 01/04 Index I-1

INDEX

Symbols –......................................................................... 5-1, 5-10 != ................................................................................ 4-7 *......................................................................... 5-1, 5-10 **....................................................................... 5-1, 5-10 /.......................................................................... 5-1, 5-10 +......................................................................... 5-1, 5-10 <.................................................................................. 4-7 <= ............................................................................... 4-7 == ............................................................................... 4-7 >.................................................................................. 4-7 >= ............................................................................... 4-7 @ FST ........................................................................ 2-9 @AGA........................................................................ 2-9 @CLK ........................................................................ 2-9 @COM ....................................................................... 2-9 @FLG......................................................................... 2-9 @FLW........................................................................ 2-9 @FST ......................................................................... 2-9 @IO............................................................................ 2-9 @MVS........................................................................ 2-9 @PID.......................................................................... 2-9 @PWR........................................................................ 2-9 @RUN........................................................................ 2-9 @SFP ......................................................................... 2-9 @SMP ........................................................................ 2-9 @SYS......................................................................... 2-9 @TNK........................................................................ 2-9 @XRN........................................................................ 2-9

A ABS .......................................................................... 5-11

Absolute Value ...................................................... 5-2 Absolute Value .................................................. 5-2, 5-11 ACCUM - Accumulated Value ........................... 6-1, 6-2 Add........................................................................... 5-10 AGA - American Gas Association

Parameters ............................................................. 6-3 AIN

Analog Input Parameters ....................................... 6-2 ALARM - Alarm Code......................... 6-1, 6-2, 6-3, 6-4 Alarms ........................................................................ 7-6 ALDBND - Alarm Deadband.............................. 6-1, 6-2 ALM......................................................................... 4-14 ALMPTR - Alarm Pointer.......................................... 6-5 Alt + 1 ........................................................................ 2-2 Alt + Ctrl + C ............................................................. 2-2 Alt + Ctrl + P.............................................................. 2-2 Alt + Ctrl + T.............................................................. 2-2 AMBTMP - Ambient Air Temp................................. 6-8 Analog Input

Parameters ............................................................. 6-2

Analog Output Parameters ............................................................. 6-2

AO ..............................................................4-9, 5-6, 5-16 AOU

Analog Output Parameters..................................... 6-2 Argument Library....................................................... 6-1 ARGUMENT1 ........................................................... 2-2 ARGUMENT2 ........................................................... 2-2 Arguments .................................................................. 3-7 Arrow Keys ....................................................... 2-2, 2-13 ASCII .................................................................. 2-4, 3-3 ATMPRS - Atmospheric Pressure.............................. 6-3 ATPCAL - A.Temp When Calib................................ 6-8 AUX1 - Aux Out #1 On ............................................. 6-6 AUX2 - Aux Out #2 On ............................................. 6-6 AVG AP - Average Ap............................................... 6-7 AVG DP - Average Dp............................................... 6-7 AVG TP - Average Tp ............................................... 6-7 AZONE - Active Zone ............................................... 6-7

B Backspace................................................................... 2-2 BASDEN - Base Density..................................... 6-3, 6-7 BASEPR - Base Pressure ........................................... 6-3 BASETP - Base Temperature..................................... 6-3 Basic Rules ................................................................. 1-5 BAUD - Baud Rate..................................................... 6-5 BETA - Diameter Ratio.............................................. 6-7 BORDIA - Orif. Bore Dia. ......................................... 6-7 BREAK - Execution Delay ........................................ 6-5 BRK.......................................................................... 4-14

Break............................................................. 2-15, 3-9 Build .................................................................... 2-4, 3-4

C C' | IMV - C' (85) or IMV(92) .................................... 6-7 CALCAL - Freshness of C' ........................................ 6-3 Calculate Approximate Execution Rate............... 7-3, 7-9 CALCZ - Initiate Recalculation of Zs ........................ 6-3 CALWGT - Cal Wght Grav Accl............................... 6-8 CARBDI - CO2 Carbon Dioxide................................ 6-3 CARBMO - CO Carbon Monoxide............................ 6-3 CF

Compare Flag ........................................2-15, 3-9, 4-1 CF Bny

Compare Flag Binary.................................... 2-15, 3-9 Clear ........................................................................... 3-5 CLK – Real-time Clock Parameters ........................... 6-6 Close........................................................................... 3-6 CLREEP - Clear EEPROM........................................ 6-6

Page 94: FSt User Manual

FST User Manual

I-2 Index Rev 01/04

CMD ............................................................ 2-2, 2-8, 3-7 Definitions ............................................................. 4-1

CMPFLG - Compare Flag-SVD ................................. 6-5 Code Pointer Byte....................................................... 1-4 Code Size.................................................................... 1-4 COLD - Cold Hard Start............................................. 6-6 COM

Communications Port Parameters .......................... 6-5 COM1EN - User Com1 Enable .................................. 6-6 COM2EN - User Com2 Enable .................................. 6-6 Command.............................................................3-7, 4-1

CMD ...................................................................... 2-8 Command Library....................................................... 4-1 Command Summary ................................................... 4-1 Commands Menu........................................................ 2-8 Communications Port

Parameters.............................................................. 6-5 Compare Flag (CF) ..............................................1-2, 1-4 Comparison Commands............................. 4-7, 5-4, 5-13 Compile ...................................................................... 3-4

FST ........................................................................ 2-4 COMPLT - EEPROM Write Complete ...................... 6-6 CONTRC - Contract Hour.......................................... 6-6 CONTRL - Control Type............................................ 6-3 Control-Related Commands ..............................5-6, 5-16 CONV - Conversion ................................................... 6-2 Copy ........................................................................... 3-6 COPY - Receiver Counter Copy................................. 6-5 CORFAC - User Correct Factr ................................... 6-8 CORPI - Corrected Base PI ........................................ 6-4 Counter ....................................................................... 6-7 CPRIME - C Prime (Orifice Flow Constant).............. 6-3 CRCCHK - CRC Check ............................................. 6-6 Creating ...............................................................3-2, 3-3

FST .................................................................2-3, 2-4 CT.............................................................. 2-14, 3-9, 5-5

Check Timer .......................................................... 4-8 Ctrl + End ..........................................................2-2, 2-13 Ctrl + Home.......................................................2-2, 2-13 Ctrl + I ...................................................................... 2-13 Ctrl + M .................................................................... 2-13 Ctrl + O..................................................................... 2-13 Ctrl + R ..................................................................... 2-13 Ctrl + S ..................................................................... 2-13 Ctrl + W...................................................................... 2-2 CURBT - Inst MMBTU.............................................. 6-3 CURDP - Differential Pressure................................... 6-3 CURFP - Static Pressure............................................. 6-3 CURRAW - Raw A/D Input....................................... 6-2 CURRAW - Raw A/D Output .................................... 6-2 CURTMP - Temperature ............................................ 6-3 Cut .............................................................................. 3-6 Cycling an FST....................................................7-2, 7-8 CYCTIM - Cycle Time............................................... 6-1

D Daily Accumulation by FST....................................... 7-4 DATA1 through DATA20 - Data Value 1 through Data

Value 20 .................................................................. 6-5 Database Commands ................................................ 5-18 DAY - Day.................................................................. 6-6 DAYOWK - Day of Week.......................................... 6-6 DBITS - Data Bits ...................................................... 6-5 Delete.................................................... 2-2, 2-5, 2-6, 3-5 Delete Step.................................................................. 3-6 DENS - Density .......................................................... 6-7 DENSIT - Density ...................................................... 6-3 Description...........................................................2-4, 3-4

FST ........................................................................ 1-1 DIN

Discrete Input Parameters ...................................... 6-1 DISCHG - Units Discharged ...................................... 6-4 Discrete Input

Parameters.............................................................. 6-1 Discrete Output

Parameters.............................................................. 6-1 Discrete Output Control Command .......................... 5-16 Divide ....................................................................... 5-10 DO ...................................................... 4-9, 5-6, 5-7, 5-16 DOU

Discrete Output Parameters ................................... 6-1 Download.................................................................... 3-4 DP_NUM - Meter Input - Point Number .................... 6-3 DP_PRM - Meter Input - Parameter ........................... 6-3 DP_TYP - Meter Input - Type.................................... 6-3 DPSTEN - Stacked Dp Enable ................................... 6-3 DT TM3 - Start Time3................................................ 6-7 DWK

Day of Week .......................................................... 4-8

E Edit Menu ............................................................2-6, 3-6 ELAVTN - Elevation.................................................. 6-3 ENABLE - Enable ...................................................... 6-7 END......................................................... 1-5, 2-13, 4-14 ENGDAY - Energy/Day............................................. 6-7 ENGHR - Energy/Hour .............................................. 6-7 Enter ........................................................................... 2-2 ENTRY - Manual Entry.............................................. 6-4 Erase ........................................................................... 2-6 Erase Workspace ........................................................ 3-6 Errors .................................................. 2-4, 2-15, 3-4, 3-9 Esc .............................................................................. 2-2 ETHANE - C2H6 Ethane ........................................... 6-3 EU - Engineering Units ............................................ 2-12 EU - EU Value............................................................ 6-1 EU - Filtered EUs ....................................................... 6-2 EU - Today’s Volum .................................................. 6-4 EU - Value in EUs ...................................................... 6-2 EVT .......................................................................... 4-14

Page 95: FSt User Manual

FST User Manual

Rev 01/04 Index I-3

Examples ....................................................5-10, 7-1, 7-7 Calculate Approximate Execution Rate.......... 7-3, 7-9 Comparison Commands................................ 5-4, 5-13 Control-Related Commands ..................4-9, 5-6, 5-16 Cycling an FST On a Periodic Basis .............. 7-2, 7-8 Daily Accumulation by FST.................................. 7-4 Database Commands ............................................. 5-8 FST Function ................................................ 2-12, 3-8 Logical Commands....................................... 5-3, 5-13 Mathematical Commands ............................. 5-1, 5-10 Miscellaneous Commands ............................ 4-14, 5-9 Stopping an FST ............................................. 7-2, 7-8 Tank Pumpdown Control....................................... 7-5 Time-Related Commands .................................... 5-14 Writing Data to a History Point ...................... 7-1, 7-7

Excel........................................................................... 3-6 Execution Delay ......................................................... 1-4 Execution Error .......................................................... 2-4 Execution Rate Calculation ........................................ 7-3 EXP .......................................................................... 5-11

Exponent................................................................ 5-1 EXPFTR - Expansion Fctr.......................................... 6-7 Exponent................................................................... 5-10

F F1....................................................................... 2-2, 2-13 F5....................................................................... 2-2, 2-13 F9................................................. 2-2, 2-3, 2-8, 2-10, 4-1 F10...................................................... 2-2, 2-3, 2-8, 2-11 FA - Fa(85) or Zs(92) ................................................. 6-7 FA - Orifice Thermal Expansion ................................ 6-3 FAM - Fam................................................................. 6-7 FB - Basic Orifice Factor ........................................... 6-3 FB - Fb(85) or Fn(92)................................................. 6-7 FGR - Real Gas Relative Density........................ 6-3, 6-7 FHGM - Fhgm............................................................ 6-7 FHGT - Fhgt............................................................... 6-7 Figure 1-1. ROCLINK for Windows FST Registers

................................................................................ 1-3 Figure 1-2. ROCLINK 800 FST Registers ................. 1-3 Figure 1-3. ROCLINK for Windows FST Registers –

Advanced ................................................................ 1-4 Figure 1-4. ROCLINK 800 FST Registers – Advanced

................................................................................ 1-4 Figure 2-1. FST Editor .............................................. 2-1 Figure 2-2. FST Listing ............................................. 2-7 Figure 2-3. Command Pop-up ................................... 2-8 Figure 2-4. Commands Menu Listing........................ 2-8 Figure 2-5. Tags Pop-up .......................................... 2-10 Figure 2-6. Tags Menu Listing ................................ 2-10 Figure 2-7. Parameters Pop-up ................................ 2-11 Figure 2-8. Parameters Menu Listing ...................... 2-11 Figure 2-9. Branch Function Example .................... 2-12 Figure 2-10. FST Monitor Display .......................... 2-13 Figure 3-1. FST Editor .............................................. 3-1 Figure 7-1. Tank Pump-Down Schematic ................. 7-6 FILTER ...................................................................... 6-1

FILTER - Filter .......................................................... 6-2 Firmware Upgrades .................................................... 1-5 FLAG1 - DI/PI ROC306/312 ..................................... 6-6 FLAG2 - User LCD Enable........................................ 6-6 FLAG3 - User OP Port Enable ................................... 6-6 FLAG4 - FST/Display Clear ...................................... 6-6 Flash Memory Save Configuration............................. 1-5 FLG - ROC Flag Parameters ...................................... 6-6 FLOACC - Flow Accumulated................................... 6-7 FLOMTH - Flow Month ............................................ 6-7 FLOPRV - Flow Prev Month ..................................... 6-7 FLOTDY - Flow Today.............................................. 6-7 FLOWDY - Flow/Day................................................ 6-7 FLOWHR - Flow/Hour .............................................. 6-7 FLOYDY - Flow Yesterday ....................................... 6-7 FLUID - Current Fluid Level ..................................... 6-4 FLW - Meter Flow Parameters................................... 6-7 FORCE - Force End Of Day ...................................... 6-6 FP_NUM - Static Pressure - Point Number................ 6-3 FP_PRM - Static Pressure - Parameter....................... 6-3 FP_TYP - Static Pressure - Type................................ 6-3 FPB - Fpb ................................................................... 6-7 FPB - Pressure Base Factor ........................................ 6-4 FPV - Fpv ................................................................... 6-7 FPV - Supercompressibility Factor ............................ 6-4 FPWL - Gravitational Correction ............................... 6-4 FPWLDP - Fpwl (Differential)................................... 6-7 FPWLSP - Fpwl (Static)............................................. 6-7 FR - Fr(85) or CdFT(92) ............................................ 6-7 FR - Reynolds Number Factor ................................... 6-4 From Device ........................................................ 3-3, 3-5 From File .............................................. 2-3, 2-6, 3-3, 3-5 From ROC........................................................... 2-3, 2-6 FST............................................................................. 1-1

Description............................................................. 1-1 Examples ............................................................... 7-7 Point Parameters .................................................... 6-5 Troubleshooting..................................................... 3-9

FST Command Summary ........................................... 4-1 FST Editor ....................................................1-1, 2-1, 3-1

Starting .................................................................. 2-1 FST Off ............................................................... 1-3, 2-5 FST On ................................................................ 1-3, 2-5 FST Registers ............................................................. 1-3 FST Storage................................................................ 1-5 FTB - Temperature Base Factor .......................... 6-4, 6-7 FTF - Flowing Temperature Factor ............................ 6-4 FTF - Ftf ..................................................................... 6-7 Function

FST Examples...................................................... 2-12 Function Structure ............................................... 2-7, 3-6 FWL - Fwl.................................................................. 6-7 FWT - Fwt.................................................................. 6-7 FY - Expansion Factor................................................ 6-4

Page 96: FSt User Manual

FST User Manual

I-4 Index Rev 01/04

G GASHV - Heating Value ............................................ 6-4 GO .....................................................................2-7, 4-14 Goto ............................................................................ 2-6 GRAVIT - Gravity...................................................... 6-4

H HAULED - Total Units Hauled .................................. 6-4 HELIUM - He Helium................................................ 6-4 HIAL - High Alarm EU........................ 6-1, 6-2, 6-4, 7-6 HIDPSP - Hi Dp Setpoint ........................................... 6-4 HIHIAL - Hi Hi Alarm EU..................................6-1, 6-2 HLD TM - Hold Time ................................................ 6-7 Home .................................................................2-2, 2-13 HOUR - Hours............................................................ 6-6 HWPF - Pressure Extension ................................6-4, 6-7 HYDSUL - H2S Hydrogen Sulfide ............................ 6-4

I, J IBUTAN - C4H10 i-Butane........................................ 6-4 Insert ........................................................................... 2-6 Insert Step ................................................................... 3-6 Instruction Pointer .................................................... 2-16 INT ........................................................................... 5-11

Integer Value.......................................................... 5-2 INT1 - Integer Flag..................................................... 6-5 Integer................................................................5-2, 5-11 INTGLV - Integrity Level .......................................... 6-8 IOREAD - Read I/O ................................................... 6-6 IOSCAN - I/O Scan Enable ........................................ 6-6 IP

Instruction Pointer................................. 2-15, 3-9, 6-5 Print........................................................................ 2-6

IPENTA - C5H12 i-Pentane ....................................... 6-4

K KEY - Key On Delay.................................................. 6-5 Kill FST ...................................................................... 2-5

L LABEL ........................................................ 2-2, 2-7, 3-7 LAST - Last Scan Level ............................................. 6-4 LAT - Latitude............................................................ 6-4 Launching FST Editor .........................................2-1, 3-1 LEAPYR - Leap Year................................................. 6-6 Level Transmitter........................................................ 7-6 Listing......................................................................... 2-6 LN............................................................................. 5-11

Natural Logarithm.................................................. 5-2 LO BAT - Low Battery............................................... 6-7 LO_PRM - Low DP Input - Parameter ....................... 6-4 LO_TYP - Low DP Input - Type................................ 6-4 LOAL

Low Alarm EU........................................ 6-1, 6-2, 7-6 LODPSP - Low Dp Setpoint....................................... 6-4

LOG.......................................................................... 5-11 Logarithm............................................................... 5-2

LOG DO - Logical DO ............................................... 6-7 Logarithm ..........................................................5-2, 5-11 Logical Commands.................................... 4-5, 5-3, 5-13 LOLOAL - Lo Lo Alarm EU...............................6-1, 6-2 LO-NUM - Low DP Input - Point Number ................ 6-4 LT1

Level Transmitter................................................... 7-6 LV_NUM - Level Input - Point Number .................... 6-4 LV_PRM - Level Input - Parameter ........................... 6-4 LV_TYP - Level Input - Type .................................... 6-4 LVDBND - Level Deadband ...................................... 6-4

M Making an FST ............................................ 2-3, 3-2, 3-3 Mathematical Commands .......................... 4-3, 5-1, 5-10 MAXCNT - 100% Count............................................ 6-1 MAXEU - High Reading EU....................... 6-1, 6-2, 7-6 MAXRAW - Adjusted A/D 100%.............................. 6-2 Mesg #1 and Mesg #2................................................. 1-4 Message 1 ................................................................. 2-14 Message 2 ................................................................. 2-15 Messages................................................................... 2-14 Meter Flow

Parameters.............................................................. 6-7 Meter Sample Paramters............................................. 6-8 METHAN - CH4 Methane ......................................... 6-4 METHOD - Calculation Method (bit mapped)........... 6-4 MIDNIT - Contract Hour............................................ 6-4 MINCNT - 0% Count ................................................. 6-1 MINDP - Low Flow Cutoff ........................................ 6-4 MINEU

Low Reading EU.................................................... 7-6 MINEU - Low Reading EU.................................6-1, 6-2 MINRAW - Adjusted A/D 0% ................................... 6-2 MINTDY - Minutes Today......................................... 6-7 MINTIM - Minimum Control Time ........................... 6-3 MINUTES - Minutes .................................................. 6-6 MINYDY - Minutes Yesterday .................................. 6-7 Misc #1 to #4 .............................................................. 1-4 Misc. Reg 1 through Misc. Reg 4 ............................. 2-14 MISC1 through MISC4 - Miscellaneous .............3-9, 6-5 Miscellaneous Commands ....................... 4-14, 5-9, 5-19 MND

Minutes Since Midnight......................................... 4-8 MODE ......................................................... 6-1, 6-2, 6-5 MOLWGT - Molecular Weight.................................. 6-7 Monitor ..............................................................2-13, 3-8 MONTH - Month........................................................ 6-6 MSG

Message ............................................................... 4-14 MSG Data ................................................................... 3-9 MSG1 - Message # 1 ...........................................3-9, 6-5 MSG2 - Message # 2 ...........................................3-9, 6-5 MT_NUM - Meter Output - Point Number ................ 6-4 MT_PRM - Meter Output - Parameter........................ 6-4

Page 97: FSt User Manual

FST User Manual

Rev 01/04 Index I-5

MT_TYP - Meter Output - Type ................................ 6-4 MTPCAL - M.Temp When Calib............................... 6-8 Multiply.................................................................... 5-10

N NBUTAN - C4H10 n-Butane..................................... 6-4 NDECAN - C10H22 n-Decane .................................. 6-4 NHEPTA - C7H16 n-Heptane.................................... 6-4 NHEXAN - C6H14 n-Hexane.................................... 6-4 NITROG - N2 Nitrogen.............................................. 6-4 NOCTAN - C8H18 n-Octane..................................... 6-4 NONAN - C9H20 n-Nonane ...................................... 6-4 NPENTA - C5H12 n-Pentane .................................... 6-4

O Off ....................................................................... 1-3, 2-5 OFFCNT - Off Counter .............................................. 6-7 OFFCTR - Off Counter .............................................. 6-1 OFFTM1 - Off Time1 ................................................ 6-7 OFFTM2 - Off Time2 ................................................ 6-7 OFFTM3 - Off Time3 ................................................ 6-7 On........................................................................ 1-3, 2-5 ON CNT - On Counter ............................................... 6-7 ON TM1 - On Time1.................................................. 6-7 ON TM2 - On Time2.................................................. 6-7 ON TM3 - On Time3.................................................. 6-7 ONCTR - On Counter ................................................ 6-1 OPTION - AGA Config (bit mapped)........................ 6-4 OPTION - Option....................................................... 6-8 Options ....................................................................... 3-7 OR_MAT - Orifice Material ...................................... 6-4 ORFDIA - Orifice Diameter....................................... 6-4 Other

FST ...................................................................... 2-15 Output.................................................................. 2-4, 3-4 OVR - Override .......................................................... 6-3 OXYGEN - O2 Oxygen ............................................. 6-4

P, Q P_DBND - PRI Deadband.......................................... 6-3 P_DRVT - PRI Derivative Gain................................. 6-3 P_IPUT - PRI Process Variable................................. 6-3 P_ITGL - PRI Integral Gain ....................................... 6-3 P_LOOP - PRI Loop Period ....................................... 6-3 P_OPUT - PRI Output EU ......................................... 6-3 P_PROP - PRI Proportional Gain............................... 6-3 P_SCLE - PRI Scale Factor........................................ 6-3 P_SP - Primary Setpoint............................................. 6-3 P_SPCH - PRI SP EU/Min......................................... 6-3 P_SWMD - PRI Switch Mode.................................... 6-3 P_SWSP - PRI Sw Setpoint ....................................... 6-3 P3................................................................................ 5-1

3rd Order Polynomial ............................................ 5-3 Page Down ........................................................ 2-2, 2-13 Page Up ............................................................. 2-2, 2-13 Parameters ......................................................... 2-11, 6-1

PARITY - Parity......................................................... 6-5 Paste ........................................................................... 3-6 Pause........................................................................... 3-4

Trace ........................................................... 2-16, 3-10 PDF ............................................................................ 3-6 PI_NUM - PRI Input Def - Point Number.................. 6-3 PI_PRM - PRI Input Def - Parameter......................... 6-3 PI_TYP - PRI Input Def - Type.................................. 6-3 PID - Proportional Integral Derivative

Parameters ............................................................. 6-3 PIN

Pulse Input Parameters .......................................... 6-2 PIPDIA - Pipe Diameter............................................. 6-4 PO_NUM - PRI Output Def - Point Number ............. 6-3 PO_PRM - PRI Output Def - Parameter..................... 6-3 PO_TYP - PRI Output Def - Type ............................. 6-3 Point Types............................................................... 2-11

Parameters ............................................................. 6-1 Polynomial ........................................................ 5-3, 5-12 Power........................................................................ 5-10 Power Control

Parameters ............................................................. 6-7 Power Outages............................................................ 1-5 PRI - Primary.............................................................. 6-3 Print ..................................................................... 2-6, 3-6 Print IP........................................................................ 2-6 Print Preview .............................................................. 3-6 Print Step .................................................................... 2-6 PROPAN - C3H8 Propane ......................................... 6-4 PS_IPT - Primary Switch Process Variable................ 6-3 PS_NUM - PRI Switch Def - Point Number .............. 6-3 PS_PRM - PRI Switch Def - Parameter ..................... 6-3 PS_TYP - PRI Switch Def - Type .............................. 6-3 Pulse Input

Parameters ............................................................. 6-2 PWR

Power Control Parameters ..................................... 6-7 PWRTMR - Power Timer .......................................... 6-7

R R1 through R10 ................................................... 3-9, 7-4 R1 through R10 - Register # 1 through Register 10 ... 6-5 RATE - Current Rate.................................................. 6-2 RATEAL - Rate Alarm EU ..........................6-1, 6-2, 6-4 RATELF - Rate Flag .................................................. 6-2 RATEPR - Rate Period............................................... 6-2 RCNTR - Retry Counter............................................. 6-5 RCOUNT - Retry Count............................................. 6-5 RDB.......................................................................... 4-10 Read..................................................................... 3-3, 3-5 Read FST.................................................................... 2-3 Real-Time Clock

Parameters ............................................................. 6-6 Registers ............................................................ 1-3, 2-14 Registers R1 to R10........................................... 1-3, 2-14 Re-starts...................................................................... 1-5 Results Register (RR) .......................................... 1-2, 1-4

Page 98: FSt User Manual

FST User Manual

I-6 Index Rev 01/04

Resume Trace ...........................................................2-16, 3-10

REYNLD - Reynold’s Number .................................. 6-7 RF

Run Flag........................................................2-15, 3-9 ROC Flag Parameters ................................................. 6-6 ROC System Parameters............................................. 6-6 ROCADR - ROC Address .......................................... 6-6 ROCGRP - ROC Group.............................................. 6-6 RR

Results Register ............................. 2-14, 3-9, 4-1, 6-5 RTF............................................................................. 3-6 RTIME - Retry Time .................................................. 6-5 RTSCM1 - RTS Comm #1 ......................................... 6-6 RTSCM2 - RTS Comm #2 ......................................... 6-6 RTSROI - RTS Oper Port........................................... 6-6 Rules ........................................................................... 1-5 RUNFLG - Run Flag .................................................. 6-5

S S_DBND - OVR Deadband........................................ 6-3 S_DRVT - OVR Derivative Gain ............................... 6-3 S_IPUT - OVR Process Variable................................ 6-3 S_ITGL - OVR Integral Gain ..................................... 6-3 S_LOOP - OVR Loop Period ..................................... 6-3 S_OPUT - OVR Output EU........................................ 6-3 S_PROP - OVR Proportional Gain............................. 6-3 S_SCLE - OVR Scale Factor...................................... 6-3 S_SP - OVR Setpoint.................................................. 6-3 S_SPCH - OVR SP EU/Min....................................... 6-3 S_SWMD - OVR Switch Mode.................................. 6-3 S_SWSP - OVR Sw Setpoint...................................... 6-3 SAMOUT - Sampler Output....................................... 6-8 SAMPLE - Sample Time............................................ 6-4 SAMTIM - Maximum Sample Time .......................... 6-1 SAV ...................................................................2-14, 3-9

Save........................................................................ 5-8 Save as .................................................................3-4, 3-6 Saving ..................................................................2-5, 3-4 SBITS - Stop Bits ....................................................... 6-5 SCANPR - Scan Period ............................... 6-1, 6-2, 6-4 SECONDS - Seconds ................................................. 6-6 Select .......................................................................... 2-6 SFP

Soft Point Parameters............................................. 6-5 SI_NUM - OVR Input Def - Point Number................ 6-3 SI_PRM - OVR Input Def - Parameter....................... 6-3 Signal Value Analog (SVA) ....................................... 1-2 Signal Value Discrete (SVD)...................................... 1-2 Size ....................................................................2-15, 3-9 SMP - Meter Sample Parameters................................ 6-8 SO_NUM - OVR Output Def - Point Number ........... 6-3 SO_PRM - OVR Output Def - Parameter................... 6-3 SO_TYP - OVR Output Def - Type ........................... 6-3 Soft Point Parameters ................................................. 6-5 SPGR - Specific Gravity............................................. 6-4 SPHTRA - Specific Heat Ratio .................................. 6-4

SPLDUR - Sampler Duration ..................................... 6-8 SPLENA - Sampler Enable......................................... 6-8 SQR .......................................................................... 5-11

Square Root............................................................ 5-2 Square Root .......................................................5-2, 5-11 SS_IPT - OVR Switch Process Variable .................... 6-3 SS_NUM - OVR Switch PV Def - Point Number ...... 6-3 SS_PRM - OVR Switch PV Def - Parameter ............. 6-3 SS_TYP - OVR Switch PV Def - Type ...................... 6-3 ST

Set Timer.........................................................4-8, 5-5 ST TM1 - Start Time1 ................................................ 6-7 ST TM2 - Start Time2 ................................................ 6-7 Start......................................................................2-5, 3-5

FST .................................................................1-3, 2-5 Starting

FST Editor.......................................................2-1, 3-1 Status .......................................................................... 1-3 STATUS ..................................................................... 6-1 STATUS - Status ......................................... 6-1, 6-5, 6-7 STEP............................................................ 2-2, 2-7, 3-6 Stop....................................................... 2-5, 3-5, 7-2, 7-8 STRAP - Strapping Value........................................... 6-4 Structure...................................................................... 2-7 Subtract..................................................................... 5-10 SVD

Signal Value Discrete............................................. 4-1 SWSTAT - Loop Status.............................................. 6-3 SYS

ROC System Parameters ........................................ 6-6

T Tab.....................................................................2-2, 2-13 Table 1-1. Devices, Software, and FST Functionality

................................................................................. 1-1 Table 2-1. Workspace and Output Keystrokes .......... 2-2 Table 2-2. Pre-defined Point Type Mnemonics ......... 2-9 Table 2-3. Monitor and Trace Mode Keystrokes..... 2-13 Table 3-1. Workspace and Output Keystrokes .......... 3-2 Table 3-2. Monitor and Trace Mode Keystrokes....... 3-8 Table 4-1. Command Library Conventions ............... 4-1 Table 4-2. FST Command Summary ......................... 4-1 Table 6-1. Discrete Input Parameters – DIN.............. 6-1 Table 6-2. Discrete Output Parameters – DOU ......... 6-1 Table 6-3. Analog Input Parameters – AIN ............... 6-2 Table 6-4. Analog Output Parameters – AOU........... 6-2 Table 6-5. Pulse Input Parameters – PIN................... 6-2 Table 6-6. PID Parameters – PID .............................. 6-3 Table 6-7. AGA Parameters – AGA.......................... 6-3 Table 6-8. Tank Parameters – TNK........................... 6-4 Table 6-9. FST Register Parameters – FST ............... 6-5 Table 6-10. Soft Point Parameters – SFP................... 6-5 Table 6-11. Communication Port Parameters – COM

................................................................................. 6-5 Table 6-12. Real-Time Clock Parameters – CLK...... 6-6 Table 6-13. ROC Flag Parameters – FLG ................. 6-6 Table 6-14. ROC System Parameters – SYS ............. 6-6

Page 99: FSt User Manual

FST User Manual

Rev 01/04 Index I-7

Table 6-15. Meter Rrun Parameters – RUN .............. 6-7 Table 6-16. Power Control Parameters – PWR ......... 6-7 Table 6-17. Meter Calibration and Sampler Parameters

– SMP ..................................................................... 6-8 Tags .......................................................................... 2-10 Tank Parameters ......................................................... 6-4 Tank Pumpdown Control ........................................... 7-5 TDICNT - TDI Count................................................. 6-1 TDO.................................................... 4-9, 5-6, 5-7, 5-17 TDYBTU - Volume Today, MMBTUs...................... 6-4 TDYFLO - Flow Today (MCF).................................. 6-4 TDYRAW - Pulses Today.......................................... 6-2 TDYTOT - Today’s Total .......................................... 6-2 TIMALC - TIM Alarm Control.................................. 6-8 Timed Duration Output ..................................... 5-7, 5-17 TIMEON - Time On................................................... 6-1 Timer ................................................................. 5-6, 5-15 Timer #1 to #4 ............................................................ 1-4 Timer 1 through Timer 4 ................................... 2-14, 3-9 Time-Related Commands.................................. 4-8, 5-14 Timers....................................................................... 2-14 TIMIAC - TIM INT Alarm ........................................ 6-8 TIMIAC - TIM INTALM Alarm................................ 6-8 Title Bar...................................................................... 3-1 TMEAS - Measure Temperature ................................ 6-4 TMR1 through TMR4 - Timer #1 through timer #4... 6-5 TNK

Tank Parameters .................................................... 6-4 TP_NUM - Temperature Input - Point Number ......... 6-4 TP_PRM - Temperature Input - Parameter ................ 6-4 TP_TYP - Temperature Input - Type ......................... 6-4 Trace...........................................................2-6, 2-13, 3-8

Off............................................................... 2-16, 3-10 On ............................................................... 2-16, 3-10 Pause........................................................... 2-16, 3-10 Resume ....................................................... 2-16, 3-10

Troubleshooting........ 1-5, 2-4, 2-15, 2-16, 3-4, 3-9, 3-10 TUBDIA - Tube Internal Dia. .................................... 6-7 TURN - Turnaround Delay ........................................ 6-5

U UP SPR - Upstrm Stat. Pres ....................................... 6-7 Upgrading Firmware .................................................. 1-5 USRCEN - User Prog Enable..................................... 6-6

Utilities Menu FST Editor ............................................................. 2-1

V VAL................................................................... 2-12, 5-5

Value...................................................................... 5-8 VAL RX - Valid Rx ................................................... 6-7 VALRCV - Valid Receive Counter............................ 6-5 VELAPP - Vel. Of Approach..................................... 6-7 Version ....................................................................... 3-4 Version Control .......................................................... 2-4 View

Output .................................................................... 2-4 VISCOS - Viscosity ................................................... 6-4 VOLACC - Sampler Vol Accum................................ 6-8

W, X WARM - Warm Start ................................................. 6-6 WATER - H2O Water ................................................ 6-4 WDB......................................................................... 4-10 Workspace........................................................... 2-1, 3-1 Write.................................................................... 2-5, 2-6 WRITE - Write to EEPROM...................................... 6-6 Write to EEPROM...................................................... 1-5 Writing Data to a History Point........................... 7-1, 7-7 Writing to Configuration Memory ............................. 1-5 WT.............................................................................. 1-5

Wait ................................................................ 4-8, 5-5 WTM ........................................................................ 4-10 WTPCAL - W.Temp When Calib .............................. 6-8

Y YDYBTU - MMBTU Yesterday................................ 6-4 YDYFLO - Flow Yesterday (MCF) ........................... 6-4 YDYTOT - Yesterday’s Total.................................... 6-2 YEAR - Year .............................................................. 6-6 YESDAY - Yesday’s Volume.................................... 6-4

Z ZB - Zb ....................................................................... 6-7 ZB - Z-base conditions ............................................... 6-4 ZF - Z-condition of Interest ........................................ 6-4 ZF - Zf(85) or Zf1(92)................................................ 6-7

Page 100: FSt User Manual

FST User Manual

I-8 Index Rev 01/04

If you have comments or questions regarding this manual, please direct them to your local sales representative or contact:

Emerson Process Management Flow Computer Division Marshalltown, Iowa 50158 U.S.A. Houston, TX 77065 U.S.A. Pickering, North Yorkshire UK Y018 7JA Website: www.EmersonProcess.com/flow