Sie sind auf Seite 1von 226

B0193UZ

REV A

I/A Series A2™ System


Sequential Function Chart/Structured Text
Configurator and Display Manager for
Sequence Blocks
October 4, 2002

Initial Step

Branch

Transition

Step
Invensys, Foxboro, FoxView, FoxSelect, I/A Series and I/A Series A2 are trademarks of Invensys plc, its
subsidiaries, and affiliates.
All other brand names may be trademarks of their respective owners.

Copyright 2002 Invensys Systems, Inc.


All rights reserved

SOFTWARE LICENSE AND COPYRIGHT INFORMATION


Before using the Invensys Systems, Inc. supplied software supported by this documentation, you
should read and understand the following information concerning copyrighted software.
1. The license provisions in the software license for your system govern your obligations
and usage rights to the software described in this documentation. If any portion of
those license provisions is violated, Invensys Systems, Inc. will no longer provide you
with support services and assumes no further responsibilities for your system or its
operation.
2. All software issued by Invensys Systems, Inc. and copies of the software that you are
specifically permitted to make, are protected in accordance with Federal copyright
laws. It is illegal to make copies of any software media provided to you by
Invensys Systems, Inc. for any purpose other than those purposes mentioned in the
software license.
Contents
Preface.................................................................................................................................. xix
Audience ................................................................................................................................ xix
Experience .............................................................................................................................. xix
Revision Information ............................................................................................................. xix
Reference Documents ............................................................................................................ xix

1. Quick Start....................................................................................................................... 1
Configuring SFC/ST Sequence Blocks ...................................................................................... 1
Overview of Block Configuration Procedures ....................................................................... 3
Step 1. Add Block Information ........................................................................................ 3
Step 2. Define Main Routine ........................................................................................... 3
Step 3. Define Subroutines .............................................................................................. 4
Step 4. Define SBX Routines ........................................................................................... 4
Step 5. Compile and Install the Sequence Block .............................................................. 5
Configuring SFC/ST Library Objects ....................................................................................... 5
Overview of Library Object Configuration Procedures ......................................................... 7
Adding a Library Block or Main Routine ............................................................................. 7
Defining the Main Routine .................................................................................................. 7
Defining Subroutines ........................................................................................................... 8
Defining SBX Routines ........................................................................................................ 8
Checking and Saving Library Objects ................................................................................... 9
Operating the SFC/ST Sequence Block ..................................................................................... 9
Operating the SFC/ST Sequence Block ................................................................................ 9
Displaying Sequence Block Data .......................................................................................... 9

2. Overview ......................................................................................................................... 11
SFC/ST Block Configurator .................................................................................................... 12
SFC/ST Library Configurator ................................................................................................. 12
SFC/ST Display Manager ....................................................................................................... 13
System Integration .................................................................................................................. 13
SFC/ST Block Configurator ............................................................................................... 13
SFC/ST Library Configurator ............................................................................................ 14
SFC/ST Display Manager .................................................................................................. 14
External Interfaces ................................................................................................................... 14
ICC Interface with the SFC/ST Block Configurator .......................................................... 14
SFC/ST Block and Library Configurator Interface ............................................................. 15
Compatibility .......................................................................................................................... 15
Compatibility with Standards ............................................................................................. 15
Compatibility Issues ........................................................................................................... 15

iii
B0193UZ – Rev A Contents

3. SFC/ST Block Configurator............................................................................................ 17


Overview of Graphical User Interface ...................................................................................... 18
SFC/ST Block Configurator Window Elements ...................................................................... 18
Common Toolbar and Edit Menu Functions ..................................................................... 20
Drop-Down Menus ............................................................................................................ 22
File Menu ...................................................................................................................... 23
Edit Menu ..................................................................................................................... 24
View Menu .................................................................................................................... 24
Editor Menu .................................................................................................................. 25
Symbols Menu .............................................................................................................. 26
Window Menu .............................................................................................................. 26
Help Menu .................................................................................................................... 27
Editor Operations ................................................................................................................... 27
Operator Remarks and Comments ..................................................................................... 27
Routine and Block Inclusion Concept ................................................................................ 28
Using Existing Sequence Block Logic ................................................................................. 31
Copying an SFC/ST Sequence Block ............................................................................. 31
Selecting a Block Routine to Edit .................................................................................. 31
Including a Library Object ............................................................................................ 33
Embedding an Included Block or Routine ..................................................................... 34
Replacing Definitions from Library ............................................................................... 34
Example.................................................................................................................... 37
Saving a Block in a Library ............................................................................................ 37
Saving a Routine in a Library ......................................................................................... 39
Deleting a Library Object .............................................................................................. 40
Searching for Included Files ........................................................................................... 41
Windows NT Search ................................................................................................ 41
Solaris Search............................................................................................................ 42
Using Include Files ........................................................................................................ 42
Adding an Include File ............................................................................................. 43
Modifying an Include File Pathname........................................................................ 43
Deleting an Include File ........................................................................................... 44
Browsing for Files to Include .................................................................................... 44
Example.................................................................................................................... 45
Viewing Version History ............................................................................................... 45
Block Information Editor ................................................................................................... 46
Block Configuration ...................................................................................................... 46
Editing Block Information........................................................................................ 47
SFC Editor ......................................................................................................................... 47
SFC Graphical Objects .................................................................................................. 49
SFC Toolbar .................................................................................................................. 50
Editing Guidelines ......................................................................................................... 51
Editing a Sequential Function Chart ............................................................................. 52
Inserting a Step......................................................................................................... 53
Inserting a Transition ............................................................................................... 53
Inserting a Branch..................................................................................................... 53
Inserting a Branch Leg .............................................................................................. 54

iv
Contents B0193UZ – Rev A

Inserting a Link ........................................................................................................ 54


Deleting a Link......................................................................................................... 55
Inserting a Horizontal Line....................................................................................... 56
Inserting a Vertical Line............................................................................................ 56
Displaying Structured Text....................................................................................... 56
Editing a Step Name................................................................................................. 56
Validating SFC Structure.......................................................................................... 56
Step Editor ......................................................................................................................... 57
Editing a Step ................................................................................................................ 58
Editing Step Statements............................................................................................ 59
Example.................................................................................................................... 59
Functions ...................................................................................................................... 60
Inserting a Function ................................................................................................. 60
Example.................................................................................................................... 60
Function Blocks ............................................................................................................. 60
Inserting a Function Block........................................................................................ 61
Example.................................................................................................................... 61
Subroutines ................................................................................................................... 61
Inserting a Subroutine .............................................................................................. 62
Example.................................................................................................................... 62
Compound:Block.Parameter ......................................................................................... 62
Inserting a Compound:Block.Parameter ................................................................... 63
Example.................................................................................................................... 64
Copying and Pasting ..................................................................................................... 64
Transition Editor ............................................................................................................... 64
Editing a Transition ...................................................................................................... 65
Editing the Transition Condition ............................................................................. 66
Example.................................................................................................................... 67
Constant Editor ................................................................................................................. 67
Editing Constants .......................................................................................................... 68
Adding a Constant.................................................................................................... 68
Modifying a Constant............................................................................................... 68
Deleting a Constant.................................................................................................. 69
Editing Include Files................................................................................................. 69
Variable Editor ................................................................................................................... 69
Editing Variables ........................................................................................................... 70
Adding a Variable ..................................................................................................... 71
Modifying a Variable ................................................................................................ 71
Deleting a Variable ................................................................................................... 72
Editing Include Files................................................................................................. 72
Example.................................................................................................................... 73
User Label Editor ............................................................................................................... 73
Editing User Labels ....................................................................................................... 74
Adding a User Label ................................................................................................. 74
Modifying a User Label ............................................................................................ 74
Deleting a User Label ............................................................................................... 75
Editing Include Files................................................................................................. 75
Example.................................................................................................................... 75

v
B0193UZ – Rev A Contents

Macro Editor ...................................................................................................................... 75


Editing Macros .............................................................................................................. 76
Adding a New Macro ............................................................................................... 76
Modifying a Macro................................................................................................... 77
Deleting a Macro ...................................................................................................... 77
Editing Include Files................................................................................................. 77
Example.................................................................................................................... 78
Subroutine Editor .............................................................................................................. 78
Routine Selection Dialog Box for Subroutines ............................................................... 78
Editing Subroutines in a Block ...................................................................................... 79
Adding a Block Subroutine....................................................................................... 80
Modifying a Block Subroutine.................................................................................. 80
Deleting a Block Subroutine ..................................................................................... 81
Ordering Block Subroutines ..................................................................................... 81
Example.................................................................................................................... 81
SBX Editor ......................................................................................................................... 83
Routine Selection Dialog Box for SBX Routines ............................................................ 83
Editing SBX Routines in a Block ................................................................................... 84
Adding a Block SBX ................................................................................................. 85
Editing a Block SBX ................................................................................................. 85
Deleting a Block SBX ............................................................................................... 86
Example.................................................................................................................... 86
Subroutine Parameter Editor .............................................................................................. 86
Editing Subroutine Parameters ...................................................................................... 87
Adding a New Subroutine Parameter........................................................................ 87
Modifying a Subroutine Parameter ........................................................................... 88
Deleting a Subroutine Parameter .............................................................................. 89
Example.................................................................................................................... 89
Protection Class Settings .................................................................................................... 89
Editing Protection Class Settings ................................................................................... 90
Setting a Single Protection Class for All Objects ....................................................... 90
Setting a Different Protection Class for Each Object ................................................ 91
Printing Configuration Data .............................................................................................. 91
Configuring the Report ................................................................................................. 91
Selecting Configuration Data for Printing ................................................................ 93
Printing on Windows NT Workstations ........................................................................ 94
Setting Up a Printer.................................................................................................. 94
Previewing a Printed Report ..................................................................................... 95
Printing to a Printer.................................................................................................. 96
Printing to a File....................................................................................................... 97
Printing on Solaris Workstations ................................................................................... 98
Setting Up a Printer.................................................................................................. 98
Printing to a Printer................................................................................................ 100
Printing to a File..................................................................................................... 100
Printing to a Generic File........................................................................................ 101
Compiling and Installing the SFC/ST Sequence Block ..................................................... 103

vi
Contents B0193UZ – Rev A

4. SFC/ST Library Configurator ....................................................................................... 105


SFC/ST Library Configurator Window Elements ................................................................. 106
Common Toolbar and Edit Menu Functions ................................................................... 107
Drop-Down Menus .......................................................................................................... 108
File Menu .................................................................................................................... 108
Edit Menu ................................................................................................................... 110
View Menu .................................................................................................................. 110
Editor Menu ................................................................................................................ 111
Symbols Menu ............................................................................................................ 112
Window Menu ............................................................................................................ 112
Help Menu .................................................................................................................. 113
Editor Operations ................................................................................................................. 113
Routine and Block Inclusion Concept .............................................................................. 113
Using Existing SFC/ST Sequence Logic ........................................................................... 113
Common Functions .................................................................................................... 114
Selecting a Library Object to Edit ................................................................................ 114
Copying a Library Object ............................................................................................ 115
Common Editor Operations ............................................................................................ 117
SFC/ST Library Configurator Specific Functions ............................................................. 118
Adding a Library Block ................................................................................................ 118
Editing a Library Block ................................................................................................ 119
Adding a Library Main Routine ................................................................................... 119
Editing a Library Main Routine ................................................................................... 119
Adding a Library Subroutine ....................................................................................... 119
Editing a Library Subroutine ....................................................................................... 120
Adding a Library SBX .................................................................................................. 120
Editing a Library SBX .................................................................................................. 121
Checking Syntax .......................................................................................................... 121
Saving an Object in a Library ...................................................................................... 121

5. SFC/ST Display Manager ............................................................................................. 123


Overview ............................................................................................................................... 123
Block Modes .................................................................................................................... 124
ST-Tracing ....................................................................................................................... 125
Block Detail Displays ....................................................................................................... 125
When Block Is Reconfigured ............................................................................................ 127
Protecting Graphical User Interface Objects .......................................................................... 127
Object Protection at Run Time ........................................................................................ 128
How to Protect Objects .................................................................................................... 129
Setting an Access Level ................................................................................................ 129
Using FoxView ....................................................................................................... 129
Using the Traditional Display Manager (DM)........................................................ 129
Running SFC/ST Display Manager in View-Only Mode ................................................. 130
Invoking SFC/ST Display Manager in View-Only Mode ............................................ 130
Parent Window ..................................................................................................................... 131
Accessing SFC/ST Display Manager ..................................................................................... 132

vii
B0193UZ – Rev A Contents

Drop-Down Menus .............................................................................................................. 133


File Menu ......................................................................................................................... 133
View Menu ...................................................................................................................... 133
Display Menu .................................................................................................................. 133
Window Menu ................................................................................................................. 134
Help Menu ...................................................................................................................... 135
Display Windows .................................................................................................................. 135
SFC Sequence Block Window .......................................................................................... 135
Selecting SFC for Display ............................................................................................ 136
Changing Block Mode and State ................................................................................. 137
Stepping through the Steps and Transitions in the Main Routine ............................... 138
Step Display Window ...................................................................................................... 139
Accessing Step Display Window .................................................................................. 140
Operating Step Display Window ................................................................................. 140
Transition Display Window Overview ............................................................................. 141
Graphical Transition Display Window ........................................................................ 141
Accessing Graphical Transition Display Window ................................................... 144
Operating Graphical Transition Display Window .................................................. 145
Graphical Transition Display Settings .................................................................... 146
Textual Transition Display Window ........................................................................... 148
Accessing Textual Transition Display Window....................................................... 149
Operating Textual Transition Display Window...................................................... 150
ST-Trace Window ........................................................................................................... 150
Accessing ST-Trace Window ....................................................................................... 151
ST-Trace Window for Main Routine or a Subroutine ............................................ 151
ST-Trace Window for an SBX Routine .................................................................. 152
Operating ST-Trace Window ...................................................................................... 152
Tracing Subroutines ............................................................................................... 153
Constant Display Dialog Box ........................................................................................... 154
Accessing Constant Display Dialog Box ...................................................................... 154
Operating Constant Dialog Box .................................................................................. 155
User Labels ....................................................................................................................... 155
Accessing User Label Display Dialog Box .................................................................... 155
Operating User Label Dialog Box ................................................................................ 155
Variable Display ............................................................................................................... 156
Accessing Variable Display Dialog Box ........................................................................ 156
Operating Variable Display Dialog Box ....................................................................... 156

6. SFC/ST Configurator Functions ................................................................................... 157


Definition of SFC/ST Sequence Block .................................................................................. 157
Data File Inclusion ........................................................................................................... 158
Syntax..................................................................................................................... 158
Include File Header Format ......................................................................................... 158
Example.................................................................................................................. 158
Main Routine Elements .................................................................................................... 158
Symbolic Constants ..................................................................................................... 159
Syntax..................................................................................................................... 159
Block Local Variables .................................................................................................. 159

viii
Contents B0193UZ – Rev A

Syntax..................................................................................................................... 159
User Labeled Parameter ............................................................................................... 159
Syntax..................................................................................................................... 160
SFC Network .............................................................................................................. 160
Subroutines ...................................................................................................................... 160
Subroutine Input/Output Parameters .......................................................................... 161
Subroutine Local Variables .......................................................................................... 161
Standard Block Exception (SBX) Handler ........................................................................ 162
Macros ............................................................................................................................. 163
Syntax..................................................................................................................... 163
Step Specification with Structured Text (ST) ................................................................... 163
Assignment Statements ................................................................................................ 164
Syntax..................................................................................................................... 164
Function Block Control Statements ............................................................................. 164
Examples ................................................................................................................ 164
Selection Statements .................................................................................................... 164
Syntax..................................................................................................................... 164
Example.................................................................................................................. 165
Syntax..................................................................................................................... 165
Transition Specification with Structured Text (ST) .......................................................... 165
Vocabulary ............................................................................................................................ 166
Characters ........................................................................................................................ 166
Special Symbols ................................................................................................................ 167
Keywords ......................................................................................................................... 168
Identifiers ......................................................................................................................... 168
Examples ................................................................................................................ 169
Comments ....................................................................................................................... 169
Operator Remarks ............................................................................................................ 169
Data Types ............................................................................................................................ 170
Real ........................................................................................................................ 171
Integer .................................................................................................................... 171
Boolean .................................................................................................................. 171
String...................................................................................................................... 171
statf_Type............................................................................................................... 171
sstate....................................................................................................................... 172
Literal Operands ................................................................................................................... 172
Examples ................................................................................................................ 173
Constant Operands ............................................................................................................... 173
Examples ................................................................................................................ 173
Variables Operands ............................................................................................................... 173
Examples ................................................................................................................ 174
Full Pathname (FPN) Operands ............................................................................................ 174
Examples ................................................................................................................ 175
Internal References ................................................................................................................ 175
Examples ................................................................................................................ 176
Function Invocation Operands ............................................................................................. 176

ix
B0193UZ – Rev A Contents

Example.................................................................................................................. 176
Expressions ............................................................................................................................ 176
String Expressions ............................................................................................................ 177
Examples ................................................................................................................ 178
Arithmetic Expressions ..................................................................................................... 178
Functions .............................................................................................................................. 179
ABS .................................................................................................................................. 180
Syntax..................................................................................................................... 180
Description............................................................................................................. 180
Examples ................................................................................................................ 180
CONCAT_STR .............................................................................................................. 181
Syntax..................................................................................................................... 181
Description............................................................................................................. 181
Example.................................................................................................................. 181
MID ................................................................................................................................. 182
Syntax..................................................................................................................... 182
Description............................................................................................................. 182
Example.................................................................................................................. 182
ORD ................................................................................................................................ 182
Syntax..................................................................................................................... 182
Description............................................................................................................. 182
Examples ................................................................................................................ 182
ROUND .......................................................................................................................... 183
Syntax..................................................................................................................... 183
Description............................................................................................................. 183
Examples ................................................................................................................ 183
SQRT .............................................................................................................................. 183
Syntax..................................................................................................................... 183
Description............................................................................................................. 183
Examples ................................................................................................................ 183
TRUNC ........................................................................................................................... 183
Syntax..................................................................................................................... 183
Description............................................................................................................. 183
Examples ................................................................................................................ 184
Function Blocks .................................................................................................................... 184
ABORT ........................................................................................................................... 184
Syntax..................................................................................................................... 184
Description............................................................................................................. 185
Example.................................................................................................................. 185
ACTCASES ..................................................................................................................... 185
Syntax..................................................................................................................... 185
Description............................................................................................................. 185
Example.................................................................................................................. 185
ACTIVATE ..................................................................................................................... 185
Syntax..................................................................................................................... 185
Description............................................................................................................. 186
Example.................................................................................................................. 186

x
Contents B0193UZ – Rev A

BIT_PATTERN .............................................................................................................. 186


Syntax..................................................................................................................... 186
Description............................................................................................................. 186
Examples ................................................................................................................ 187
EXIT ................................................................................................................................ 187
Syntax..................................................................................................................... 187
Description............................................................................................................. 187
MULT_ARRAY ............................................................................................................... 187
Syntax..................................................................................................................... 187
Description............................................................................................................. 187
Examples ................................................................................................................ 187
OVERWRITE_STR ........................................................................................................ 188
Syntax..................................................................................................................... 188
Description............................................................................................................. 188
Example.................................................................................................................. 188
RETRY ............................................................................................................................ 188
Syntax..................................................................................................................... 188
SENDCONF ................................................................................................................... 188
Syntax..................................................................................................................... 188
Description............................................................................................................. 188
Examples: ............................................................................................................... 189
SENDMSG ...................................................................................................................... 189
Syntax..................................................................................................................... 189
Description............................................................................................................. 189
Examples ................................................................................................................ 189
SET_ARRAY ................................................................................................................... 189
Syntax..................................................................................................................... 189
Description............................................................................................................. 189
Examples ................................................................................................................ 189
SET_SBXS ....................................................................................................................... 190
Syntax..................................................................................................................... 190
Description............................................................................................................. 190
Example.................................................................................................................. 190
START_TIMER .............................................................................................................. 190
Syntax..................................................................................................................... 190
Description............................................................................................................. 191
Example.................................................................................................................. 191
STOP_TIMER ................................................................................................................ 191
Syntax..................................................................................................................... 191
Description............................................................................................................. 191
Example.................................................................................................................. 191
TSENDCONF ................................................................................................................ 191
Syntax..................................................................................................................... 191
Description............................................................................................................. 192
Examples ................................................................................................................ 192
SUM_ARRAY .................................................................................................................. 192
Syntax..................................................................................................................... 192
Description............................................................................................................. 192

xi
B0193UZ – Rev A Contents

Examples ................................................................................................................ 192


WAIT .............................................................................................................................. 193
Syntax..................................................................................................................... 193
Description............................................................................................................. 193
Example.................................................................................................................. 193

Index .................................................................................................................................. 195

xii
Figures
1-1. Sequential Function Chart (SFC) Example ................................................................... 1
1-2. SFC/ST Sequence Block Configuration Overview ........................................................ 2
1-3. SFC/ST Sequence Library Object Configuration Overview .......................................... 6
2-1. SFC/ST Sequence Block System Overview Diagram ................................................... 11
2-2. SFC/ST Block Configurator System Integration ......................................................... 13
2-3. SFC/ST Display Manager System Integration ............................................................. 14
3-1. SFC/ST Block Configurator – Parent Window ........................................................... 19
3-2. Common Toolbar and Edit Menu .............................................................................. 20
3-3. File Menu ................................................................................................................... 23
3-4. View Menu ................................................................................................................. 24
3-5. Editor Menu ............................................................................................................... 25
3-6. Symbols Menu ............................................................................................................ 26
3-7. Window Menu ............................................................................................................ 26
3-8. Help Menu ................................................................................................................. 27
3-9. Valid Levels of Inclusion ............................................................................................. 30
3-10. Routine Selection Dialog Box ..................................................................................... 32
3-11. Open Dialog Box with Subroutine Files ...................................................................... 33
3-12. Open Dialog Box with Block Files .............................................................................. 35
3-13. Replace Variable from Library Dialog Box .................................................................. 36
3-14. Replace Step from Library Dialog Box ........................................................................ 36
3-15. Replace Transition from Library Dialog Box ............................................................... 37
3-16. Save As Dialog Box with Block Files ........................................................................... 38
3-17. Version Information Dialog Box ................................................................................. 39
3-18. Save As Dialog Box with Subroutine Files ................................................................... 39
3-19. Delete from Library Dialog Box .................................................................................. 40
3-20. Include Files Dialog Box ............................................................................................. 43
3-21. Include File Open Dialog Box ..................................................................................... 44
3-22. History Dialog Box ..................................................................................................... 45
3-23. Block Information Editor ............................................................................................ 46
3-24. SFC Editor Window ................................................................................................... 48
3-25. SFC with Interrupted Link .......................................................................................... 50
3-26. SFC Toolbar ............................................................................................................... 50
3-27. Step Dialog Box .......................................................................................................... 53
3-28. Insert Branch Dialog Box ............................................................................................ 54
3-29. Step Selection Dialog Box ........................................................................................... 55
3-30. Validate Dialog Box .................................................................................................... 57
3-31. Step Editor .................................................................................................................. 58
3-32. Symbol Dialog Box for Functions ............................................................................... 60
3-33. Symbol Dialog Box for Function Blocks ..................................................................... 61
3-34. Symbol Dialog Box for Subroutines ............................................................................ 62
3-35. Object Browser for Compound/Block/Parameter ........................................................ 63
3-36. Transition Editor ........................................................................................................ 65
3-37. Constant Editor .......................................................................................................... 67
3-38. Variable Editor ............................................................................................................ 70

xiii
B0193UZ – Rev A Figures

3-39. User Label Editor ........................................................................................................ 73


3-40. Macro Editor .............................................................................................................. 76
3-41. Subroutine Editor ....................................................................................................... 78
3-42. Routine Selection Dialog Box for Subroutines ............................................................ 79
3-43. SFC for Subroutine Drive ........................................................................................... 82
3-44. SBX Editor .................................................................................................................. 83
3-45. Routine Selection Dialog Box with SBX Routines ....................................................... 84
3-46. SFC for TO_INACTIVE SBX .................................................................................... 86
3-47. Subroutine Parameter Editor ....................................................................................... 87
3-48. SFCDM Protection Class Setting Dialog Box ............................................................. 90
3-49. Report Configuration Dialog Box ............................................................................... 92
3-50. Print Setup Dialog Box ............................................................................................... 95
3-51. Print Preview Dialog Box for Windows NT Workstation ........................................... 96
3-52. Print Dialog Box ......................................................................................................... 97
3-53. Print to File Dialog Box .............................................................................................. 98
3-54. Printer Setup Dialog Box ............................................................................................ 99
3-55. Print Dialog Box for Solaris System .......................................................................... 100
3-56. Print to File Dialog Box ............................................................................................ 101
3-57. Printer Setup Dialog Box with Generic File Options ................................................. 102
3-58. Compile Dialog Box ................................................................................................. 103
3-59. Version Information Dialog Box ............................................................................... 104
4-1. SFC/ST Library Configurator – Parent Window ...................................................... 106
4-2. Common Toolbar and Edit Menu ............................................................................ 107
4-3. File Menu ................................................................................................................. 108
4-4. View Menu ............................................................................................................... 110
4-5. Editor Menu ............................................................................................................. 111
4-6. Symbols Menu .......................................................................................................... 112
4-7. Window Menu .......................................................................................................... 112
4-8. Help Menu ............................................................................................................... 113
4-9. Open Dialog Box with Subroutine Files .................................................................... 115
4-10. Save As Dialog Box with Subroutine Files ................................................................. 116
4-11. Version Information Dialog Box ............................................................................... 117
4-12. Subroutine Name Dialog Box ................................................................................... 119
4-13. SBX Selection Dialog Box ......................................................................................... 120
5-1. DEP Block Detail Display ......................................................................................... 126
5-2. Faceplate Diagram for SFC/ST Sequence Block ........................................................ 126
5-3. SFC/ST Display Manager Parent Window ................................................................ 132
5-4. File Menu ................................................................................................................. 133
5-5. View Menu ............................................................................................................... 133
5-6. Display Menu ........................................................................................................... 133
5-7. Window Menu .......................................................................................................... 134
5-8. Help Menu ............................................................................................................... 135
5-9. SFC Sequence Block Window ................................................................................... 136
5-10. Operator Remark Dialog Box ................................................................................... 137
5-11. Step Display Window ............................................................................................... 139
5-12. Operator Remark Dialog Box for Step ...................................................................... 140
5-13. Graphical Transition Display Window with Inactive Transitions .............................. 143
5-14. Graphical Transition Display Window with Active Transitions ................................ 144

xiv
Figures B0193UZ – Rev A

5-15. Operator Remark Dialog Box for Transition ............................................................. 146


5-16. Textual Transition Display Window with Inactive Transitions ................................. 148
5-17. Textual Transition Display Window with Active Transitions .................................... 149
5-18. ST-Trace Window with an Active Step ..................................................................... 151
5-19. SBX Selection Dialog Box ......................................................................................... 152
5-20. ST-Trace Window with Active Transitions ............................................................... 153
5-21. Constant Display Dialog Box .................................................................................... 154
5-22. User Label Display Dialog Box ................................................................................. 155
5-23. Variable Display Dialog Box ..................................................................................... 156

xv
B0193UZ – Rev A Figures

xvi
Tables
3-1. Common Toolbar Functions ...................................................................................... 20
3-2. SFC Toolbar Button Functions ................................................................................... 50
3-3. Configuration Data Print Options by Editor ............................................................. 92
4-1. Functions Common to Block and Library Configurators – Using Existing Logic ...... 114
4-2. Editor Operations Common to Block and Library Configurators .............................. 117
5-1. Block Mode for MA and STEPMD Values ............................................................... 124
5-2. Protectable Graphical Objects ................................................................................... 128
5-3. Graphical Transition Display Color Setting .............................................................. 147
6-1. SFC/ST Sequence Block Elements and Editors ......................................................... 157
6-2. SFC/ST Subroutine Elements and Editors ................................................................ 161
6-3. Symbols for Syntax Description ................................................................................ 163
6-4. Special Symbols ......................................................................................................... 167
6-5. Keywords .................................................................................................................. 168
6-6. Operators .................................................................................................................. 177
6-7. SFC/ST Functions .................................................................................................... 180
6-8. Function Blocks ........................................................................................................ 184

xvii
B0193UZ – Rev A Tables

xviii
Preface
This document describes the Sequential Function Chart (SFC) and Structured Text (ST)
Configurator for programming sequence control blocks and sequence logic library objects using
IEC 61131-3 standard elements. It also describes the SFC/ST Display Manager for displaying
SFC/ST sequence control block run-time data.

Audience
This book is intended for use by process control engineers for programming I/A Series sequence
control blocks and sequence logic library objects. It is also intended for use by process operators to
view sequence control block runtime data.

Experience
This book assumes that you are familiar with the I/A Series sequence control blocks and the
IEC 61131-3 standard. It also assumes that you are familiar with the operation of the I/A Series
system on Windows® and Solaris™ based workstations.

Revision Information
This document is being initially released with the SFC/ST Configurator and SFC/ST Display
Manager Software Release 1.1.

Reference Documents
The following documents provide additional and related information:
♦ FoxView™ (B0193WH)
♦ Integrated Control Block Descriptions (B0193AX)
♦ Integrated Control Software Concepts (B0193AW)
♦ Integrated Control Configurator (B0193AV)
♦ Microsoft® User Interface Design Guide
♦ Process Operations and Displays (B0193MM).

xix
B0193UZ – Rev A Preface

xx
1. Quick Start
This chapter provides an overview of the procedures for configuring sequence blocks via the
SFC/ST Block Configurator and SFC/ST Library Configurator. It also summarizes the
procedures for using the SFC/ST Display Manager to operate sequence blocks and view block
run-time data.

Configuring SFC/ST Sequence Blocks


The SFC/ST Block Configurator enables you to graphically build a sequence block program
using language element specific editors. First, you create the SFC diagram (see Figure 1-1). Then
you edit the statements of the SFC steps and transitions using variables, constants, and calls to
macros, subroutines, and Standard Block Exception Handlers (SBXs), all of which you create
using specific editors. You can also call predefined functions and function blocks by name while
providing the required arguments.
To simplify the configuration of sequence blocks, you can use logic from existing sequence blocks
in the system. You can also build libraries of SFC/ST sequence block logic so that you can reuse
the logic to develop new sequence blocks.

Initial Step

Branch

Transition

Step

Figure 1-1. Sequential Function Chart (SFC) Example

Figure 1-2 shows the general procedure for configuring an SFC/ST sequence block.

1
B0193UZ – Rev A 1. Quick Start

Step 3. Define SubRoutines Step 4. Define SBX Routines


Step 1. Add Block Info.
Add and Edit Subroutine Add and Edit SBX Routine
* Type Operator Remark
* Type Comment

Create SFC for Subroutine Create SFC for SBX


by Inserting: Routine by Inserting:
Step 2. Define Main Routine * Steps * Steps
* Transitions * Transitions
Create SFC for Main * Branches * Branches
Routine by Inserting: * Directed Links * Directed Links
* Steps
* Transitions
* Branches
* Directed Links Add Declarations Specific Define Logic for SBX
to Subroutine by Defining: Routine by Adding:
* Variables * Statements to Steps
* Input/Output Parameters * Conditions to Transitions
Add Declarations for Main
Routine by Adding:
* Constants
* Variables
Define Logic for Subroutine
* User Labels
by Adding:
* Macros
* Statements to Steps
* Conditions to Transitions

Define Logic for Main


Routine by Adding:
* Statements to Steps
* Conditions to Transitions
Step 5. Compile and Install Sequence Block

Compile Sequence
Block

Errors Yes
Correct Errors
Reported

No

Select Done to:


1. Add Version Information
2. Download the Block

Figure 1-2. SFC/ST Sequence Block Configuration Overview

2
1. Quick Start B0193UZ – Rev A

Overview of Block Configuration Procedures


The following steps provide an overview for configuring a sequence block. In practice, use the
Window menu to move between editors as needed to complete the sequence logic. Use the Copy
and Paste functions from the Edit menu, to avoid typing errors.
To program a sequence block:
1. Add block information for the block.
2. Define the main routine.
3. Define subroutines.
4. Define SBX routines.
5. Compile the block.

Step 1. Add Block Information


Block information that you enter comprises the operator remark and comment. The operator
remark informs the operator of the purpose and function of the block. The comment provides
information to another process engineer.
To add the block information (see “Editing Block Information” on page 47):
1. Type the operator remark for the block.
2. Type the comment for the block.
This completes the block information. Next, you define the main routine.

Step 2. Define Main Routine


The SFC for the main routine defines the sequence logic flow. An SFC consists of steps and tran-
sitions that are interconnected by directed links. A transition condition is associated with each
transition. The steps run serially. Each transition can have only one preceding step and only one
successor step.
Declarations for constants, variables, user labels, and macros are known throughout the sequence
block, including the subroutines and SBX routines.
To define the main routine:
1. Create the SFC for the main routine (see “Editing a Sequential Function Chart” on
page 52).
2. Add declarations for the main routine:
♦ Add constants (see “Adding a Constant” on page 68).
♦ Add variables (see “Adding a Variable” on page 71).
♦ Add user labels (see “Adding a User Label” on page 74).
♦ Add macros (see “Adding a New Macro” on page 76).
3. Complete the steps and transitions:
♦ Add step statements (see “Editing Step Statements” on page 59).
♦ Add transition conditions (see “Editing the Transition Condition” on page 66).
This completes the main routine. Next, you define the subroutines called in the main routine.

3
B0193UZ – Rev A 1. Quick Start

Step 3. Define Subroutines


Each subroutine has its own SFC and structured text logic. The procedure for defining a subrou-
tine is similar to creating and defining the main routine, with some differences.
You must define all subroutines that you called in the main routines. In addition to the SFC and
the step and transition logic for each subroutine, you must define input and output parameters
for each subroutine and any required variables. Variables for a subroutine are only accessible by
that subroutine.
To define the subroutines:
1. Add and edit the subroutine (see “Adding a Block Subroutine” on page 80).
2. Create the SFC for the subroutine (see “Editing a Sequential Function Chart” on
page 52).
3. Add input and output parameters for the subroutine (see “Adding a New Subroutine
Parameter” on page 87).
4. Add variables for the subroutine (see “Adding a Variable” on page 71).
5. Complete the steps and transitions:
♦ Add step statements (see “Editing Step Statements” on page 59).
♦ Add transition conditions (see “Editing the Transition Condition” on page 66).
6. To define more subroutines, repeat Steps 1 through 5 as often as necessary.
7. If necessary, place the subroutines in the correct order; HLBL allows only forward
declaration (see “Ordering Block Subroutines” on page 81).
This completes the subroutines. Next, you define the required SBX routines.

Step 4. Define SBX Routines


Each SBX routine has its own SFC and structured text logic. You create an SBX routine similar to
the way you create the main routine, except for defining constants, variables, user labels and
macros.
To define the SBX routines:
1. Add and edit the SBX routine (see “Adding a Block SBX” on page 85).
2. Create the SFC for the SBX routine (see “Editing a Sequential Function Chart” on
page 52).
3. Complete the steps and transitions:
♦ Add step statements (see “Editing Step Statements” on page 59).
♦ Add transition conditions (see “Editing the Transition Condition” on page 66).
4. To define more SBX routines, repeat Step 1 through 3 as often as necessary.
This completes the SBX routines. Next, you compile and install the sequence block.

4
1. Quick Start B0193UZ – Rev A

Step 5. Compile and Install the Sequence Block


After you finish configuring the sequence block, compile the block. When the compilation is suc-
cessful, install the block.
To compile and install the sequence block:
1. On the File menu, click Compile (see “Compiling and Installing the SFC/ST
Sequence Block” on page 103).
The Compile dialog box displays any error messages.
2. Correct any errors and recompile until no errors are reported.
3. On the File menu, click Done.
The Version Information dialog box appears.
4. In the Author box, type your name.
5. In the Comments box, type your comments.
6. Click OK.
The SFC/ST Configurator exits, and the calling application [for example, the Integrated Control
Configurator (ICC)], installs the modified block.

Configuring SFC/ST Library Objects


The SFC/ST Library Configurator enables you to graphically build sequence logic library objects
using language element specific editors. You can build sequence blocks, main routines, subrou-
tines, and SBX routines and save them in files for use in developing new sequence blocks.
For example, you can build a library sequence block. First, you create the SFC diagram for the
main routine. Then you edit the statements of the SFC steps and transitions using variables, con-
stants, and calls to macros, subroutines, and Standard Block Exception Handlers (SBXs), all of
which you create using specific editors. You can also call predefined functions and function blocks
by name while providing the required arguments.
When building library objects, you can use logic from other library objects.
Figure 1-3 shows the general procedure for configuring an SFC/ST sequence library object.

5
B0193UZ – Rev A 1. Quick Start

Add Block or Main Define Subroutines Define SBX Routines

* Add New Block or Main


Add and Edit Subroutine Add and Edit SBX Routine
Routine
* Add Block Information

Create SFC for Subroutine Create SFC for SBX


by Inserting: Routine by Inserting:
Define Main Routine * Steps * Steps
* Transitions * Transitions
Create SFC for Main * Branches * Branches
Routine by Inserting: * Directed Links * Directed Links
* Steps
* Transitions
* Branches
* Directed Links Add Declarations Specific Define Logic for SBX
to Subroutine by Defining: Routine by Adding:
* Variables * Statements to Steps
* Input/Output Parameters * Conditions to Transitions
Add Declarations for Main
Routine by Adding:
* Constants
* Variables
Define Logic for Subroutine
* User Labels
by Adding:
* Macros
* Statements to Steps
* Conditions to Transitions

Define Logic for Main


Routine by Adding:
* Statements to Steps
* Conditions to Transitions

Check Syntax and Save

Check Syntax

Errors Yes
Correct Errors
Reported

No
Legend:
= Save Library Object Save Object in
= Complete Library Block the Library

Figure 1-3. SFC/ST Sequence Library Object Configuration Overview

6
1. Quick Start B0193UZ – Rev A

Overview of Library Object Configuration Procedures


The following steps provide an overview for configuring sequence library objects. In practice, use
the Window menu to move between editors as needed to complete the sequence logic. Use the
Copy and Paste functions from the Edit menu to avoid typing errors.
To program sequence library objects:
♦ Add library blocks or main routines
♦ Define main routines
♦ Define subroutines
♦ Define SBX routines
♦ Check syntax and save.

Adding a Library Block or Main Routine


You can add a sequence block or main routine to a library for later use in configuring an SFC/ST
sequence block.
♦ To add a library block, see “Adding a Library Block” on page 118
♦ To add a library main routine, see “Adding a Library Main Routine” on page 119
To program a library sequence block, you must:
♦ Define main routine
♦ Define subroutines
♦ Define SBX routines
♦ Check syntax and save.

Defining the Main Routine


The SFC for the main routine defines the sequence logic flow. An SFC consists of steps and tran-
sitions that are interconnected by directed links. A transition condition is associated with each
transition. The steps run serially. Each transition can have only one preceding step and only one
successor step.
Declarations for constants, variables, user labels, and macros are known throughout the sequence
block, including the subroutines and SBX routines.
To define a main routine:
1. Create the SFC for the main routine (see “Editing a Sequential Function Chart” on
page 52).
2. Add declarations for the main routine:
♦ Add constants (see “Adding a Constant” on page 68).
♦ Add variables (see “Adding a Variable” on page 71).
♦ Add user labels (see “Adding a User Label” on page 74).
♦ Add macros (see “Adding a New Macro” on page 76).
3. Complete the steps and transitions:
♦ Add step statements (see “Editing Step Statements” on page 59).
♦ Add transition conditions (see “Editing the Transition Condition” on page 66).

7
B0193UZ – Rev A 1. Quick Start

4. If you are not configuring a block, check the main routine for syntax errors and save
the routine in the library (see “Checking and Saving Library Objects” on page 9).
This completes the main routine.

Defining Subroutines
Each subroutine has its own SFC and structured text logic. The procedure for defining a subrou-
tine is similar to creating and defining the main routine, with some differences.
You must define all subroutines that you called in the main routines. In addition to the SFC and
the step and transition logic for each subroutine, you must define input and output parameters
for each subroutine and any required variables. Variables for a subroutine are only accessible by
that subroutine.
To define a subroutine:
1. Add and edit the subroutine
♦ Add a library subroutine (see “Adding a Library Subroutine” on page 119)
♦ Add a block subroutine (see “Adding a Block Subroutine” on page 80).
2. Create the SFC for the subroutine (see “Editing a Sequential Function Chart” on
page 52).
3. Add input and output parameters for the subroutine (see “Adding a New Subroutine
Parameter” on page 87).
4. Add variables for the subroutine (see “Adding a Variable” on page 71).
5. Complete the steps and transitions:
♦ Add step statements (see “Editing Step Statements” on page 59)
♦ Add transition conditions (see “Editing the Transition Condition” on page 66).
6. Check the subroutine for syntax errors and save the subroutine in the library (see
“Checking and Saving Library Objects” on page 9).
This completes the subroutine.

Defining SBX Routines


Each SBX routine has its own SFC and structured text logic. You create an SBX routine similar to
the way you create the main routine, except for defining constants, variables, user labels and
macros.
To define an SBX:
1. Add and edit the SBX routine (see “Adding a Block SBX” on page 85).
2. Create the SFC for the SBX routine (see “Editing a Sequential Function Chart” on
page 52).
3. Complete the steps and transitions:
♦ Add step statements (see “Editing Step Statements” on page 59).
♦ Add transition conditions (see “Editing the Transition Condition” on page 66).
4. Check the SBX routine for syntax errors and save the routine in the library (see
“Checking and Saving Library Objects” on page 9).
This completes the SBX routine.

8
1. Quick Start B0193UZ – Rev A

Checking and Saving Library Objects


To check a library object for syntax and save the object in the library:
1. On the File menu, click Syntax Check.
This checks the library object for syntax errors. The Syntax Error dialog box displays
any error messages.
2. Correct any syntax errors and recheck the syntax until no errors are reported.
3. Save the object in the library (see “Saving an Object in a Library” on page 121).
This completes the library object.

Operating the SFC/ST Sequence Block


Invoking the SFC/ST Display Manager displays the SFC Sequence Block window for the main
routine. From this window, you can operate the sequence block and display block run-time
information.

Operating the SFC/ST Sequence Block


Use the SFC Sequence Block window to:
♦ Select the SFC sequence block for display (see “Accessing SFC/ST Display Manager”
on page 132)
♦ Change the block mode and state (see “Changing Block Mode and State” on
page 137)
♦ Step through the steps and transitions of the main routine (see “Stepping through the
Steps and Transitions in the Main Routine” on page 138).
♦ Sequentially execute and monitor the ST statements of steps and the conditions of
transitions (see “Operating ST-Trace Window” on page 152).

Displaying Sequence Block Data


Use the SFC Sequence Block window to display the following sequence block information:
♦ SFC of the main routine, a subroutine, or an SBX (see “SFC Sequence Block Win-
dow” on page 135 and “Accessing SFC/ST Display Manager” on page 132)
♦ ST statements of a step (see “Operating Step Display Window” on page 140)
♦ Transition conditions with periodically updated operand values (see “Operating
Graphical Transition Display Window” on page 145 and “Operating Textual Transi-
tion Display Window” on page 150)
♦ Constant definitions (see “Operating Constant Dialog Box” on page 155)
♦ User label definitions with periodically updated values (see “Operating User Label
Dialog Box” on page 155)
♦ Variable definitions (see “Operating Variable Display Dialog Box” on page 156)
♦ Operator remarks for any SFC/ST element (see specific window or dialog box
operating procedures)

9
B0193UZ – Rev A 1. Quick Start

♦ ST-Trace information (see “Operating ST-Trace Window” on page 152).


♦ Block modes and states (see “SFC Sequence Block Window” on page 135 and
“Changing Block Mode and State” on page 137).

10
2. Overview
This chapter provides an overview of the SFC/ST Block Configurator, SFC/ST Library
Configurator, and SFC/ST Display Manager. It also shows how these application integrate
with other I/A Series software.
The SFC/ST Configurator and the SFC/ST Display Manager are graphical user interfaces that
provide an alternative, advanced method of configuring and displaying sequence blocks (DEP,
IND, EXC).
Via Sequential Function Charts (SFCs) and structured text (ST) that comply with the
IEC 61131-3 standard, you configure sequence blocks to build the block algorithms that imple-
ment a process control strategy. The Display Manager enables you view block data during run
time. Figure 2-1 shows the principal components of the SFC/ST sequence block system software.

SFC/ST Sequence Block SFC/ST Sequence Block


Configurator: Display Manager:
* SFC Editor * SFC Sequence Block Display
* Step Editor * Step Display
* Transition Editor * Transition Display

SFC/ST Sequence Block


Database
(SFC Graphics Information)

SFC/ST Sequence Block


Database
(SFC/ST Syntax ASCII File)

SFC/ST Sequence Block


Compiler

SFC/ST Sequence Block


Sequence Block Database Database
(HLBL Syntax ASCII File) Cross-Reference Lists

To ICC and ICC API To/From


Object Manager
Figure 2-1. SFC/ST Sequence Block System Overview Diagram

11
B0193UZ – Rev A 2. Overview

This graphical user interface (GUI) provides:


♦ Clear structure of the sequence code via SFCs.
♦ Graphical configuration and display of the sequence code.
♦ Views of important dynamic data for the block during run time, for example, the cur-
rently active transition(s) and the periodically updated values of the operands within
the transition(s).
♦ Configuration and display capability complying with the IEC 61131-3 standard.
The SFC/ST Block Configurator is a tool to set up the procedural part of sequence blocks with
SFCs and ST.
The SFC/ST Library Configurator is a tool to build a library of sequence logic program organiza-
tional units (POUs) with SFCs and ST. Library POUs are available from SFC/ST Block
Configurator.

SFC/ST Block Configurator


The SFC/ST Block Configurator is a tool to set up the procedural part of sequence blocks with
SFCs and ST as defined in IEC 61131-3. The SFC/ST Block Configurator provides:
♦ Microsoft Foundation Classes (MFC) GUI
♦ Structured text (ST) to describe steps and transitions
♦ Support of IND, DEP and EXC sequence blocks
♦ Support of subroutines and standard block exception handlers (SBXs).
The SFC/ST block configuration data is stored in files under the block name. For example, one
file contains the textual form of the SFC/ST syntax based on IEC 61131-3, and another file con-
tains the graphical data of the SFC/ST network (see Figure 2-1).
The SFC/ST Block Compiler transforms the SFC/ST representation of a sequence block
procedure into a functionally equivalent HLBL representation.

SFC/ST Library Configurator


The SFC/ST Library Configurator is a tool to build sequence logic program organizational units
(sequence blocks, main routines, subroutines, and SBX routines) with SFCs and ST, as defined in
IEC 61131-3. Library objects are available from the SFC/ST Block Configurator. The library
configurator features:
♦ Microsoft Foundation Classes (MFC) GUI
♦ Structured text (ST) to describe steps and transitions
♦ Support of IND, DEP, and EXC sequence blocks
♦ Support of subroutines and standard block exception handlers (SBXs).
The configuration data for SFC/ST library objects are stored under user-defined filenames with
preset extensions.
You cannot invoke the SFC/ST Block Compiler from the SFC/ST Library Configurator, but you
can check the syntax of an object before saving it to the library.

12
2. Overview B0193UZ – Rev A

SFC/ST Display Manager


The SFC/ST Display Manager enables the operator to view SFC/ST sequence block data during
run time and to perform certain block operations.
The operator views of an SFC/ST sequence block provide:
♦ Dynamic, colored view of current position in SFC
♦ Display of step code
♦ Dynamic indication of transition evaluations
♦ Display of constants, variables, and user labels
♦ Embedded operator remarks assisting with sequence and process descriptions
♦ Microsoft Foundation Classes (MFC) GUI.
The operator views also enable the operator to:
♦ Change the block mode
♦ Execute steps and transitions in the Semi-automatic (S-AUTO) mode
♦ Redirect the block’s control flow in the Manual (MAN) mode
♦ Trace through ST code of steps and transitions.
Protection class settings lock access to operation buttons, options lists, and menu commands to
prevent certain users from performing one or more of the above operations.

System Integration
SFC/ST Block Configurator
The SFC/ST Block Configurator is invoked from the Integrated Control Configurator (ICC) as
shown in Figure 2-2.

Integrated Control
Configurator

SFC/ST Block
Configurator

SFC/ST Block Integrated Control


Compiler HLBL Compiler
Configurator

Block installation

Control and I/O


Database in CP

Figure 2-2. SFC/ST Block Configurator System Integration

13
B0193UZ – Rev A 2. Overview

The SFC/ST Block Configurator uses the standard Object Browser to select compounds, blocks,
and block parameters from the Control and I/O database. The configurator also calls the standard
preprocessor and the HLBL Compiler to compile the SFC/ST code to HLBL code.

SFC/ST Library Configurator


The SFC/ST Library Configurator is invoked from the FoxView Config menu. Library objects
are available from the SFC/ST Block Configurator for inclusion in sequence blocks.

SFC/ST Display Manager


The SFC/ST Display Manager is integrated with and can be invoked from FoxView (FoxSelect™
and user graphics) or other applications (see Figure 2-3). The SFC/ST Display Manager uses stan-
dard Object Manager calls to access sequence block data located in the CP.

Sequence Block
User Graphics
Select Display

SFC/ST
Display Manager

Object Manager

Control and I/O


Database in CP

Figure 2-3. SFC/ST Display Manager System Integration

External Interfaces
ICC Interface with the SFC/ST Block Configurator
With the SFC/ST Block Configurator, you can configure only the procedural part of a sequence
block (IND, DEP, EXC). Using the existing functions of the ICC, you must specify the config-
urable parameters (such as, block name, block type, period, phase) and the connection of user
parameters (for example, RI0001) with other blocks.
You invoke the SFC/ST Block Configurator from within the ICC by selecting Edit Sequential
Function Chart in the Block/ECB Functions menu. Refer to Integrated Control Configurator
(B0193AV).
If you select Edit Sequence Logic to program, compile, and install a sequence block in native
HLBL, you cannot use the SFC/ST Block Configurator to edit that block. Conversely, you can-
not use the ICC to edit an SFC/ST sequence block.
The ICC Application Interface (API) supports SFC/ST configured sequence blocks.

14
2. Overview B0193UZ – Rev A

SFC/ST Block and Library Configurator Interface


The SFC/ST Library Configurator is invoked by clicking Sfc_Lib_Cfg in the FoxView Config
menu. From the SFC/ST Block Configurator, the standard file Open dialog box provides access
to POU files in the library for including POUs in sequence blocks.

Compatibility
Compatibility with Standards
The SFC/ST sequence block software complies with the IEC 61131-3 standard by using:
♦ Programs, function blocks and functions as organizational elements for the sequence
blocks
♦ SFCs for structuring the internal organization of the sequence block’s main routine
(program), its subroutines (function blocks) and its SBX routines (function blocks)
♦ ST to describe the steps and transitions within SFCs.

Compatibility Issues
SFC/ST-configured sequence blocks have the same block types (DEP, IND, EXC) as the HLBL-
configured sequence blocks. The SFC/ST sequence block compiler transforms the SFC/ST code
into HLBL code.
Up to 255 HLBL step labels in the main routine of a sequence block are now supported. There is
a 2:1 ratio between HLBL step labels and SFC steps. The maximum number of SFC steps is 127.

15
B0193UZ – Rev A 2. Overview

16
3. SFC/ST Block Configurator
This chapter describes the SFC/ST Block Configurator graphical user interface including the
drop-down menus and editor windows. It also describes how to configure SFC/ST sequence
blocks using the available editors and existing library objects.
The SFC/ST Block Configurator enables you to graphically build a sequence block program
using language element specific editors. First, you create the SFC diagram for the main routine.
Then, you edit the statements of the SFC steps and transitions using variables, constants, and calls
to macros, subroutines, and Standard Block Exception Handlers (SBXs), all of which you create
using specific editors. You can also call predefined functions and function blocks by name while
providing the required arguments.
To simplify the configuration of sequence blocks, you can use logic from existing sequence blocks
in the system. You can also build libraries of SFC/ST sequence block logic so that you can reuse
the logic to develop new sequence blocks.
The SFC/ST Block Configurator provides:
♦ main routine configuration with SFC and ST
♦ Step specification with ST
♦ Transition specification with ST
♦ Function blocks that operate on data or alter the flow of control
♦ Functions that operate on data
♦ Subroutine configuration with SFC and ST
♦ Standard Block Exception (SBX) handler configuration with SFC and ST
♦ Macros to facilitate the reuse of ST code snippets by name
♦ Constants, variables, and user labels
♦ Inclusion of library blocks and routines
♦ File inclusion to handle collections of #defines and declarations
♦ Operator remarks
♦ Sequence logic version control with full history of sequence editing available to view
or print out
♦ Printed documentation for SFC graphical structures, steps, transitions, and comments
♦ Password protection class setting of certain SFC/ST Display Manager graphical
objects to prevent a class of users from performing operations such as changing block
mode and state, and tracing ST code.
Sequences can have up to 100 parallel alternative steps/transitions in the graphical structures and
a maximum of 127 steps. The functional content of these steps is restricted only by the memory
available for the sequence block; a maximum of 32 KB is available for each block, equating to sev-
eral thousands lines of code.

17
B0193UZ – Rev A 3. SFC/ST Block Configurator

Overview of Graphical User Interface


The graphical user interface (GUI) of the SFC/ST Block Configurator is based on the Microsoft
User Interface Design Guide, especially the chapter on “Multiple Document Interface (MDI)
Applications.”
The MDI technique uses a single primary window, called a parent window, to visually contain a
set of child windows. Each child window is essentially a primary window, but it is constrained to
appear only within the parent window instead of on the desktop. The parent window also pro-
vides a visual and operational framework for its child windows. For example, child windows typi-
cally share the menu bar of the parent window and may also share other parts of the parent’s
interface, such as a toolbar or status bar. These may be changed to reflect the commands and
attributes of the active child window.
Secondary windows, such as dialog and message boxes, displayed as a result of interaction within
the MDI parent or child, are typically not contained or clipped by the parent window.
In this document, standard features of parent and child windows, such as window decoration or
minimization, are not mentioned expressly.

SFC/ST Block Configurator Window Elements


When you click Edit Sequential Function Chart from the Block/ECB Functions menu in the
ICC, the SFC/ST Block Configurator parent window opens (see Figure 3-1). For more informa-
tion on the ICC, refer to Integrated Control Configurator (B0193AV).
Only the Block information child window is initially active. To configure the sequence logic, you
must activate the different editors.
The parent window consists of the:
♦ Title bar
♦ Menu bar
♦ Toolbars
♦ Child window area
♦ Status bar.

18
3. SFC/ST Block Configurator B0193UZ – Rev A

Title Bar
Menu Bar

Toolbar

Child Window

Child Window
Display Area
Status Bar

Figure 3-1. SFC/ST Block Configurator – Parent Window

Title Bar
The title bar contains the compound:block description of the block to be configured.
Menu Bar
The menu bar contains the drop-down menu titles. The commands within the menus are enabled
or disabled according to the currently allowed functions in a certain situation. In general, the
menu commands are enabled and disabled depending on the active child window.
Toolbar Section
The toolbar section contains docked toolbars. Available toolbars are:
Common Toolbar Contains buttons for common
functions, such as cut, copy, paste or
undo.
SFC Toolbar Visible only when the SFC Editor
is active. This toolbar contains
buttons for SFC editing functions,
such as inserting steps or transitions.

Child Window Display Area


The child window display area contains all child windows, independent of whether they are min-
imized or not. Every available editor appears as a child window.

19
B0193UZ – Rev A 3. SFC/ST Block Configurator

Status Bar
The status bar contains contextual information for menu commands and toolbar buttons.

Common Toolbar and Edit Menu Functions


The common toolbar, located at the top left corner of the parent window, shares many functions
with the Edit drop-down menu (see Figure 3-2).

Figure 3-2. Common Toolbar and Edit Menu

Table 3-1 lists the common toolbar buttons, Edit menu commands, and their functions. It details
those functions that are highly editor specific, particularly for the SFC Editor. It also lists the edi-
tors in which these buttons and commands are enabled.

Table 3-1. Common Toolbar Functions

Toolbar Edit Menu Enabling


Button Command Editor Function
Cut All editors Cuts the currently selected object or text and pastes it
on the clipboard.
In the SFC Editor, it cuts only one selected step or
transition with its related ST code.
Copy All editors Copies the currently selected object or text to the
clipboard.
In the SFC Editor, it copies only one selected step or
transition with its related ST code.

20
3. SFC/ST Block Configurator B0193UZ – Rev A

Table 3-1. Common Toolbar Functions (Continued)

Toolbar Edit Menu Enabling


Button Command Editor Function
Paste All editors Pastes the object or text from the clipboard to the cur-
rent cursor location.
In the SFC Editor, it pastes the step or transition from
the clipboard to the SFC after the currently selected
graphical object. If the name of a step to be pasted is
not unique, you must enter a new unique step name.
You can only do this once with a graphical object on
the clipboard.
Delete SFC Editor Deletes the selected graphical object. Deleting a step
only or transition also deletes the ST code related to it.

Undo All editors Undoes one keystroke sequence in a text box.


For the SFC Editor, it undoes the last action. You can
undo the last several edit actions on the SFC’s
graphical objects. The ST code related to steps and
transitions is also affected by Undo.
Redo SFC Editor Redoes the last undone action. You can redo the last
only several Undo edit actions on the SFC’s graphical
objects. The ST code related to steps and transitions is
also affected by Redo.
--- All editors Prints data for the currently active editor according to
the current print selections.

--- All editors Provides context-sensitive Help.

Replace All editors Replaces all editor-specific definitions of this block


from... except for with those from a library object.
Block Note: In the Library Configurator, it replaces all
Information editor-specific definitions of this library object with
Editor and those from another library object.
Subroutine
Parameter
Editor
Replace Block Replaces all definitions of this block with those from a
Block Information library object.
from... Editor only
Replace Block Replaces the main routine definition with that from a
Main Information library object.
from... Editor only

21
B0193UZ – Rev A 3. SFC/ST Block Configurator

Table 3-1. Common Toolbar Functions (Continued)

Toolbar Edit Menu Enabling


Button Command Editor Function
Embed All editors Replaces an inclusion (#include) with a copy of the
included library object. After embedding a library
object, you can modify it.
Note: If a block includes a block that includes a .km
file (main routine file), the first use of Embed inserts a
copy of the included block. The .km file remains
included. The second use of Embed inserts a copy of
the contents of the .km file.
Clear All editors Clears all editor-specific definitions and the editor-
except for specific include file list of data or macro declarations.
Block
Information
Editor
Clear Block Block Clears all definitions for this block.
Information
Editor only
Clear Main Block Clears the main routine definition from this block.
Information
Editor only
Validate SFC Editor Validates the structure of the current SFC. It does not
SFC only validate the syntax of the ST code related to the SFC’s
steps and transitions.

Drop-Down Menus
The drop-down menus are selectable from the menu bar at the top of the parent window.
Figure 3-2 shows the Edit menu dropped down from the menu bar. When a menu command is
highlighted, you can select it for use in the currently active editor.
The available menus are:
File Contains menu commands referring to the sequence block as a whole and to
print functions.
Edit Contains menu commands referring to the active child window.
View Contains menu commands to switch the toolbar and status bar on or off.
Editor Contains menu commands to activate the different editors.
Symbols Contains menu commands to insert symbols into the statements of a step or
into the condition of a transition. Symbols is only displayed when the
Step Editor or the Transition Editor is active.
Window Contains menu commands to arrange and close child windows.
Help Contains menu commands to activate Help functions.

22
3. SFC/ST Block Configurator B0193UZ – Rev A

File Menu
Figure 3-3 shows the File menu.

Figure 3-3. File Menu

The File menu commands and their functions are:


Compile Validates every SFC in the block, and then sequentially invokes the
SFC/ST and HLBL compilers.
History Displays the History dialog box for reviewing block modification
data. This dialog box displays a list of versions including version
dates and authors.
Save to library... Displays the Save As dialog box for storing the sequence logic of the
block as a library object, which is stored in several files.

Note: A library object can be addressed by selecting only the


<block_name>.k file. All other related files must be located in the
same directory where they are handled automatically. The block can
be saved in any state and without compiling the program.
Save Routine to Stores a routine as a library object while automatically adding the
library... appropriate file extension for the currently active view. It is only
enabled if the currently active view is the block, subroutine, or the
SBX view and the routine of the currently active view is not
included.
Delete from Displays the Delete from Library dialog box for deleting a library
library... object, which is stored in several files.
Include... Displays the Open dialog box for selecting a library object to include
in a block or block library object.
Done Displays the Version Information dialog box that includes the
system-generated version number and the current date and time,
which cannot be changed.

23
B0193UZ – Rev A 3. SFC/ST Block Configurator

Cancel Exits the SFC/ST Block Configurator without installing the block.
Cancel discards any modifications to the block and the calling
application, for example, the ICC, does not install the block.
Print Prints data for the currently active editor according to the current
print selections made by using Print Select from the File menu.
Print uses the print settings chosen by using Print Setup from the
File menu. The printed data depends on the editor from which
Print was selected.
Print Setup... Displays the standard Print Setup dialog box for specifying settings
such as paper format and number of copies.
Print Select... Displays the Print Select dialog box for selecting block data for the
currently active editor for printing.
Print Preview Displays the standard Print Preview dialog box for previewing the
data to be printed.
SFCDM Protection... Displays the SFCDM Protection Class Setting dialog box for
configuring a protection class for all protectable objects (buttons,
menu items, and block modes) of the SFC/ST Display Manager.

Edit Menu
The Edit menu (Figure 3-2) shares many functions with the common toolbar, located at the top
left corner of the parent window. The Edit menu commands depend on the currently active
editor.
For a list of available commands within each editor and the editor related behavior of the com-
mands, see “Common Toolbar and Edit Menu Functions” on page 20 and the specific sections for
each editor.

View Menu
Figure 3-4 shows the View menu.

Figure 3-4. View Menu

The View menu commands and their actions are:


Toolbar Switches the toolbar area on or off.
Status Bar Switches the status bar on or off.
Compiler Errors Opens the Compile dialog box for viewing the error message(s) of the
SFC/ST compiler, or the HLBL list file (*.l) in case the HLBL compiler
detects any problems.

24
3. SFC/ST Block Configurator B0193UZ – Rev A

Editor Menu
Use the editors that you can select from the Editor menu (Figure 3-5) to create the sequence logic
of the SFC/ST sequence block.

Figure 3-5. Editor Menu

Availability of the last five menu items depends on whether the Block Information (main rou-
tine), Subroutine, or SBX Editor is active. Click Routine… in the Editor menu and select the rou-
tine to edit from the Routine Selection dialog box.
The Editor menu commands and their functions are:
Routine... Opens the Routine Selection dialog box for selecting a routine to
edit or administer, or invokes the Routine dialog box for renaming a
routine.
Macro Opens the Macro Editor window to edit block global macros.
Constant Opens the Constant Editor window to edit block global symbolic
constants.
User Label Opens the User Label Editor window to edit block global user labels.
Block Variable Opens the Variable Editor window to edit block global variables.
Subroutine Parameter Opens the Subroutine Parameter Editor window to edit subroutine
parameters, that is, arguments of a subroutine.
Subroutine Variable Opens the Variable Editor window to edit variables of a subroutine.
SFC Opens the SFC Editor window to edit the SFC of the main routine,
subroutines, or SBX routines.
Step Opens the Step Editor window to edit the steps of the main routine,
subroutines, or SBX routines.
Transition Opens the Transition Editor window to edit the transitions of the
main routine, subroutines, or SBX routines.

25
B0193UZ – Rev A 3. SFC/ST Block Configurator

Symbols Menu
The Symbols menu (Figure 3-6) appears only when the Step Editor or the Transition Editor is
active. This menu contains commands to insert symbols into the:
♦ Statements of a step
♦ Conditions of a transition.

Figure 3-6. Symbols Menu

The Symbols menu commands and their functions are:


Functions Opens the Symbols dialog box for inserting the calling syntax of an
available function at the cursor position in the step’s statement list (Step
Editor) or the transition’s condition (Transition Editor).
Function Blocks Opens the Symbols dialog box for inserting the calling syntax of an
available function block at the cursor position in the step’s statement list
(Step Editor).
Subroutines Opens the Symbols dialog box for inserting the calling syntax of an
available subroutine at the cursor position in the step’s statement list
(Step Editor).
:Comp:Block.Par Opens the Browser dialog box for inserting a block parameter at the
cursor position in the step’s statement list (Step Editor) or the transition’s
condition (Transition Editor).

Window Menu
Figure 3-7 shows the Window menu.

Figure 3-7. Window Menu

26
3. SFC/ST Block Configurator B0193UZ – Rev A

The Window menu commands and their functions are:


Cascade Cascades all open windows that are not minimized.
Tile Places all open windows, that are not minimized, side by side.
Arrange Icons Arranges all icons in the parent window’s lower left corner.
Close Closes the active editor window. The Block Information Editor window
cannot be closed.
Close all Closes all editor windows except the Block Information Editor window.
<Recent window> Activates the selected editor window.

Help Menu
Figure 3-8 shows the Help menu.

Figure 3-8. Help Menu

The Help menu commands and their functions are:


Index Opens the Index tab of the Help Topics window.
Using Help Opens the Using Help window, which provides topics about using and customiz-
ing the Help system.
About Opens the About dialog box which provides the software version of the SFC/ST
Configurator.

Editor Operations
This section describes the various editors within the SFC/ST Block Configurator, and provides
detailed procedures for using these editors to configure an SFC/ST sequence block.

Operator Remarks and Comments


You can add an operator remark and comment to most of the configuration elements, such as
constants, variables, steps, and subroutines.
The operator can view operator remarks via the SFC/ST Display Manager, and you should use
them to forward useful descriptions and hints to the operator.

NOTE
Do not use a remark to tell the operator to perform an action.

Comments are only accessible within the SFC/ST Block Configurator and should contain
important information for the process engineer.

27
B0193UZ – Rev A 3. SFC/ST Block Configurator

Routine and Block Inclusion Concept


You can store SFC/ST sequence blocks, main routines, subroutines, and SBX routines in library
files for later use in SFC/ST sequence blocks by referencing the library file using the #include
directive (link), or by inserting them from the library. During compilation, any source code line
of the form #include <file_name> is replaced by the contents of the <file_name> file. You can
include a whole block in this way.
Block inclusion can only be one level deep. A block can include another block from the library,
but this library file can include only SFC routines, macros or data definitions, not another block.
Similarly, included routine files cannot include other routine files from the library. Figure 3-9
shows the valid levels of inclusion:

NOTE
If you try to include a block that includes another block, the configurator displays
the error message “Include level exceeded”.

The SFC/ST Block and Library Configurators open and save library objects using a triple of files
as follows:
♦ <file_name>.k/.g/.h files for a whole block
♦ <file_name>.km/.gm/.hm files for a main routine together with the global data com-
prised of macros, constants, user labels, and global variables
♦ <file_name>.ks/gs/hs files for a subroutine
♦ <file_name>.kx/gx/hx files for an SBX routine.
The SFC/ST Block Configurator always loads a whole block that is identified by its com-
pound:block name. You can save a single routine of the block to the library, but it is still a part of
the block.
The SFC/ST Library Configurator enables you to configure a whole block or a single routine
under a user-specified filename that is independent of any compound:block name.
These configurators do not allow you to modify included library objects; all corresponding but-
tons and menu items for changing included library objects are disabled. You can only modify the
block or library object that is currently loaded in the configurator. An included library object
must first be embedded as a copy into the currently edited block before you can modify it.
The configurators handle inclusion as follows:
♦ All input fields are disabled in the respective editors.
For example, when you invoke the SFC Editor for an SFC of an included routine, all
toolbar buttons are disabled except the button for opening the Step or Transition
Editor.
♦ If a block is included, all editors are affected
♦ If the main routine is included, the following editors are affected:
♦ Block Information Editor
♦ Macro Editor
♦ Constant Editor
♦ User Label Editor

28
3. SFC/ST Block Configurator B0193UZ – Rev A

♦ Block Variable Editor


♦ SFC Editor on displaying the main routine
♦ Step Editor on displaying a step of the main routine
♦ Transition Editor on displaying a transition of the main routine.
♦ If a subroutine is included, the following editors are affected:
♦ Subroutine Editor
♦ Subroutine Parameter Editor
♦ Subroutine Variable Editor
♦ SFC Editor on displaying the included subroutine
♦ Step Editor on displaying a step of the included subroutine
♦ Transition Editor on displaying a transition of the included subroutine.
♦ If an SBX routine is included, the following editors are affected:
♦ SBX Editor
♦ SFC Editor on displaying the included SBX
♦ Step Editor on displaying a step of the included SBX
♦ Transition Editor on displaying a transition of the included SBX.
♦ The inclusion of the whole block as well as the inclusion of the main routine are indi-
cated by displaying the path and filename of the included files in the Block
Information view.
If the block includes a block which includes the main routine, both inclusions are
indicated at the same time.
♦ The inclusion of a subroutine is indicated by displaying the path and filename of the
included file at the top of the subroutine view.
♦ The inclusion of an SBX routine is indicated by displaying the path and filename of
the included file at the top of the SBX view.
♦ In the Routine Selection dialog box, the string “incl.” appears at the beginning of the
line for each included routine. If an included routine is selected, the inclusion is indi-
cated by displaying the path and filename of the included file at the bottom of the
dialog box.

29
B0193UZ – Rev A 3. SFC/ST Block Configurator

Block without Inclusion of Routines

File block.k

Main Routine

Subroutine SBX

Subroutine SBX

Block Includes Main and/or Other Routines (One Include Level)

File block.k File extmain.km

#include

Main Routine
Subroutine SBX

Subroutine SBX

Block Includes Another Block (One Include Level)

File block.k File extblock.k

Main Routine

#include
Subroutine SBX

Subroutine SBX

Block Includes Another Block that Includes Main and/or Other Routines (Two Include Levels)

File block.k File extblock.k File extmain.km

#include

#include Main Routine


Subroutine SBX

Subroutine SBX

Figure 3-9. Valid Levels of Inclusion

30
3. SFC/ST Block Configurator B0193UZ – Rev A

Using Existing Sequence Block Logic


When configuring sequence blocks, you can use logic from existing SFC/ST sequence blocks in
the control database or library. You can also use logic from existing include files.
The SFC/ST Block Configurator allows you to build a library of sequence blocks that you can
reuse.
The configurator allows you to use include files for constants, variables, user labels, and macros.
In a large configuration, it may be easier to use include files for these elements.

Copying an SFC/ST Sequence Block


You can copy an SFC/ST sequence block in the system using the Integrated Control Configurator
(ICC) and the SFC/ST Block Configurator.
To copy an SFC sequence block:
1. Using the ICC:
♦ Create a new SFC/ST sequence block of the same type.
♦ On the Block/ECB Functions menu, click Edit Sequential Function Chart.
The I/A Series SFC/ST Configurator - Block main window appears with the Block
Information editor window open.

NOTE
Refer to Integrated Control Configurator (B0193AV) for details on creating a new
sequence block and invoking the SFC/ST Block Configurator.

2. Replace the block definition with that from the desired library block (see “Replacing
Definitions from Library” on page 34).
3. Compile and install the block (see “Compiling and Installing the SFC/ST Sequence
Block” on page 103).
This completes copying the SFC/ST sequence block.

Selecting a Block Routine to Edit


The Routine Selection dialog box (Figure 3-42) enables you to select a subroutine or SBX routine
to edit in an SFC/ST sequence block.
The Routine box contains the name of the selected routine and enables you to modify the name
of an existing subroutine. The Subroutines box contains all available subroutines in the block.
The SBX routines box contains all available SBX routines. An asterisk preceding the SBX name
indicates that it is in use.

31
B0193UZ – Rev A 3. SFC/ST Block Configurator

Click to type a new routine name.

Click to add a new subroutine


or SBX routine.

Click to edit the selected routine.

Click a subroutine.

Click to rename a subroutine.

Click to delete selected subroutine


or SBX routine.

Click Up or Down to change the


order of the selected subroutine.

Click an SBX routine.

Figure 3-10. Routine Selection Dialog Box

To select a routine to edit:


1. On the Editor menu, click Routine…
The Routine Selection dialog box (Figure 3-10) appears with listings of all the rou-
tines in the block.
2. In the lists of routines, click MAIN, a subroutine or an SBX routine to edit.
The selected routine name appears in the Routine box.
3. Click Edit.
This activates the editor window for the selected routine.

32
3. SFC/ST Block Configurator B0193UZ – Rev A

Including a Library Object


In an SFC/ST sequence block, you can include a block, main routine, subroutine or SBX routine
from a library.
The four types of library objects and their naming convention are as follows:
♦ Block <file_name>.k
♦ main routine <file_name>.km
♦ Subroutine <file_name>.ks
♦ SBX routine <file_name>.kx
The Open dialog box (Figure 3-12) enables you to view all the library objects in the system. Use
this dialog box to find and select a library object file to include in the block.

Click for file details.

Click sequenlibrary.

Click a file.

Click to confirm your


selection.

Click a file type.


Figure 3-11. Open Dialog Box with Subroutine Files

To include a library object in a block:


1. On the File menu, click Include.
The Open dialog box (Figure 3-11) appears.
2. In the Look in folder (directory) box, click the source drive.
3. In the list of folders, double-click a folder until the desired folder appears in the
Look in box.

NOTE
The default folder is /opt/fox/ciocfg/sequenlibrary, but library objects can be in any
folder.

4. In the Files of type box, click the desired type of files to list.
5. In the list of files, click the desired filename.
The filename appears in the File name box.
6. Click Open.

33
B0193UZ – Rev A 3. SFC/ST Block Configurator

If the routine in the selected file is already contained in the block, the SFC/ST
Sequence Block dialog box appears.
7. Click Yes .
This includes the selected library object and displays the path and filename of the included file at
the top of the block information, subroutine, or SBX view.

Embedding an Included Block or Routine


If a block, subroutine or SBX routine is included from a library file, you can replace the inclusion
with a copy of the library object. The Embed command is only available for the currently active
block, subroutine or SBX view that includes a library file.

NOTE
If a block includes another block that includes a .km file (main routine), the first
use of the Embed command inserts a copy of the included block; the .km file
remains included. A second use of Embed inserts a copy of the contents of .km file.

To embed a copy of an included block or routine:


1. Select a routine to edit (see “Selecting a Block Routine to Edit” on page 31).
2. On the Edit menu, click Embed.
This embeds a copy of the included library object in the block. After embedding a library object,
you can modify it.

Replacing Definitions from Library


For an active Block Information Editor, you can choose to replace the block or main routine
definitions with those from a library object. For any other active editor window, you can replace
editor-specific definitions with those from a library object.
The four types of library objects and their naming convention are as follows:
♦ Block <file_name>.k
♦ Main routine <file_name>.km
♦ Subroutine <file_name>.ks
♦ SBX routine <file_name>.kx
The Open dialog box (Figure 3-12) enables you to view the library objects in the system. Use this
dialog box to find and select a library object file from which to copy editor-specific definitions.

34
3. SFC/ST Block Configurator B0193UZ – Rev A

Click for file details.

Click sequenlibrary.

Click a file.

Click to confirm your


selection.

Click a file type.

Figure 3-12. Open Dialog Box with Block Files

To replace a definition with one from a library:


1. On the Edit menu, click Replace from, Replace Block from or Replace Main
from , depending upon the active editor window.
The Open dialog box (Figure 3-12) appears.
2. In the Look in folder (directory) box, click the source drive.
3. In the list of folders, double-click a folder until the desired folder appears in the
Look in box.

NOTE
The default folder is /opt/fox/ciocfg/sequenlibrary, but library objects can be in any
folder.

4. In the Files of type box, click the desired type of files to list.

NOTE
This displays only those file types appropriate for the active editor.

5. In the list of files, click the desired filename.


The filename appears in the File Name box.
6. Click Open.
♦ If an editor-specific Replace from Library dialog box appears (for example,
Figure 3-13, Figure 3-14, and Figure 3-15), proceed to Step 7.
♦ If the SFC/ST Sequence Block dialog box appears, proceed to Step 9.
7. In the editor-specific list, select the desired object.
For example, if the Transition Editor is active, click the routine, transition from step,
and transition to step (see Figure 3-15).

35
B0193UZ – Rev A 3. SFC/ST Block Configurator

8. Click OK.
The SFC/ST Sequence Block dialog box appears.
9. Click Yes.
This replaces the editor-specific definitions with those from the selected library object, replaces
any included files, and confirms the replacement.

Click a routine.

Click to confirm
replacement.

Click to cancel
replacement.

Click for Help.

Figure 3-13. Replace Variable from Library Dialog Box

Click an SFC.
Click a step.
Click to confirm
replacement.

Click to cancel
replacement.

Figure 3-14. Replace Step from Library Dialog Box

36
3. SFC/ST Block Configurator B0193UZ – Rev A

Click an SFC.
Click a transition from step.
Click a transition to step.
Click to confirm replacement.

Figure 3-15. Replace Transition from Library Dialog Box

Example
With the Step Editor - MAIN window active and step SET_SPEED selected for block
REACT210:AGITATE, confirming the selections in Figure 3-12 and Figure 3-14 replaces the
logic of SET_SPEED with that from block AGITATE in the library.

Saving a Block in a Library


The Save As dialog box (Figure 3-16) enables you to save the sequence logic of the block as a
library object, which is stored in several files. You can save the block in any state and without
compiling the program. All related files are automatically saved in the same folder where they are
handled automatically by the system. A library block is addressable by selecting only the
<block_name>.k file.

37
B0193UZ – Rev A 3. SFC/ST Block Configurator

Click sequenlibrary.

Type block name.

Click to save file.

Click SFC Blocks.


Figure 3-16. Save As Dialog Box with Block Files

To save a sequence block as a library object:


1. On the File menu, click Save to library.
The Save As dialog box (Figure 3-16) appears.
2. In the Save in folder (directory) box, click the source drive.
3. In the list of folders, double-click a folder until the desired folder appears in the
Save in box.

NOTE
The default folder is /opt/fox/ciocfg/sequenlibrary, but you can save the block in
any folder.

4. In the File name box, type the desired name such as the block name.

NOTE
The system displays SFC Blocks (.k) in the Save as type box and automatically adds
the .k extension to the filename when saving the block.

5. Click Save.
The Version Information dialog box (Figure 3-17) appears.
6. In the Author box, type the name of the author.
7. In the Comment box, type a comment.
8. Click OK.
This saves the block in the library under the <block_name.k> filename which appears in the list of
files.

38
3. SFC/ST Block Configurator B0193UZ – Rev A

Type author’s name.

Type comments.
Click to exit the
SFC/ST Configurator.

Figure 3-17. Version Information Dialog Box

Saving a Routine in a Library


For a sequence block, you can save the sequence logic of the main routine or a subroutine or SBX
routine as a library object via the Save As dialog box (Figure 3-16). The routine can be saved in
any state and when using the block configurator, without compiling the program. All related files
are automatically saved in the same folder. A library object is addressable by selecting only the
<routine_name>.km/.ks/.kx file.

Click sequenlibrary.

Type routine name.

Click to save file.

Click routine type.


Figure 3-18. Save As Dialog Box with Subroutine Files

To save a block routine as a library object:


1. On the File menu, click Save Routine to library or Save Routine , depending on
the configurator.
The Save As dialog box (Figure 3-18) appears.
2. In the Save in folder (directory) box, click the source drive.
3. In the list of folders, double-click a folder until the desired folder appears in the
Save in box.

39
B0193UZ – Rev A 3. SFC/ST Block Configurator

NOTE
The default folder is /opt/fox/ciocfg/sequenlibrary, but you can save the routine in
any folder.

4. In the File name box, type the routine name.

NOTE
The system displays the file type for the active editor in the Save as type box, and
automatically adds the appropriate .km/.ks/.kx extension to the filename when sav-
ing the routine.

5. Click Save.
The Version Information dialog box (Figure 3-17) appears.
6. In the Author box, type the name of the author.
7. In the Comment box, type a comment.
8. Click OK.
This saves the routine in the library under the <routine_name>.km/.ks/.kx file name.

Deleting a Library Object


The configurator stores a library object in several files. When deleting a library object, all related
files are deleted automatically. You can select four types of library objects to delete:
♦ Block <file_name>.k
♦ Main routine <file_name>.km
♦ Subroutine <file_name>.ks
♦ SBX routine <file_name>.kx.
The Delete from Library dialog box (Figure 3-19) enables you to delete a library object.

Click for file details.

Click sequenlibrary.

Click a file.

Click to delete file.

Click a file type.


Figure 3-19. Delete from Library Dialog Box

40
3. SFC/ST Block Configurator B0193UZ – Rev A

! CAUTION
Make sure the library object to be deleted is not included. Search for it in all files
where it could be included. (See “Searching for Included Files” on page 40.)

To delete a library object:


1. On the File menu, click Delete from library or Delete..., depending on the
configurator.
The Delete from Library dialog box (Figure 3-19) appears.
2. In the Delete in folder (directory) box, click the source drive.
3. In the list of folders, double-click a folder until the desired folder appears in the
Delete in box.

NOTE
The default folder is /opt/fox/ciocfg/sequenlibrary, but library objects can be stored
in any folder.

4. In the Files of type box, click the type of files to list.


5. In the list of files, click the desired library object file.
The filename appears in the File name box.
6. Click Delete.
The SFC/ST Sequence Block dialog box appears.
7. Click OK.
This deletes the selected object file from the library.

Searching for Included Files


Before deleting a library object <inclfile>, search for it in all files where it could be included.
These are files matching a given file_name mask (for example, *.k) and located in a given root
directory (for example, /opt or D:/opt) or in any subfolder of it.

Windows NT Search
To search for files where the library object may be included:
1. On the Start menu, point to Find and click Files or Folders...
The Find: All Files dialog box appears.
2. On the Name and Location tabbed page, type the <mask> in the Named box.
3. Click Browse to navigate to the desired drive and folder, and click the folder.
The folder pathname appears in the Look in box.
4. Click the Advanced tab, and then click All Files and Folders in the Of type list.
5. In the Containing text box, type the <inclfile> name (for example, AGITATE).

41
B0193UZ – Rev A 3. SFC/ST Block Configurator

NOTE
On some Windows based workstations, the Containing text box is located on the
Name and Location tabbed page.

6. Click Find Now.


The found files are listed at the bottom of the dialog box.
7. Using the SFC/ST Block or Library Configurator, edit each found file to make sure
the library object to be deleted is not included.

Solaris Search
On Solaris systems, execute the following shell command to get a list of files where the include file
is referenced.
1. At the command line prompt (#), type:
/bin/find <directory> -name “<mask>” -exec /bin/fgrep -l “<inclfile>” {}
\;
2. Using the SFC/ST Block or Library Configurator, edit each found file to make sure
the library object to be deleted is not included.

Using Include Files


Include files allow you to use the same set of declarations in many different control blocks. For
example, an include file of constants may contain all the storage tank capacities in the system.
You can edit include files from the following editors:
♦ Macro
♦ Constant
♦ User Label
♦ Variable.
To edit include file pathnames, click Include Files from the editor window. This displays the
Include Files dialog box (for example, Figure 3-20). If there are included files, their pathnames are
listed in the scrollable Include Files list in this dialog box, and the Existing Include Files checkbox
is marked in the editor window. The include files may only contain #define definitions appropri-
ate for the editor.

42
3. SFC/ST Block Configurator B0193UZ – Rev A

Click to close dialog box.

Click a file to edit.

Click Add, Modify,


or Delete to edit
file as desired.

Click to browse for files.


Type file pathname.

Click to display Help.

Figure 3-20. Include Files Dialog Box

Adding an Include File


To add an include file:
1. In the editor window, click Include Files.
The Include Files dialog box appears (see Figure 3-20).
2. In the File box, type a unique pathname for the include file, or click Browse to find
the file to include (see “Browsing for Files to Include” on page 44).
3. Click Add.
The new include file pathname appears in the Include Files list.

Modifying an Include File Pathname


To modify an include file pathname:
1. In the editor window, click Include Files.
The Include Files dialog box appears (see Figure 3-20).
2. In the Include Files list, click a file.
The selected include file pathname is automatically copied to the File box.
3. In the File box, type the new pathname for the include file, or click Browse to find
the new pathname (see “Browsing for Files to Include” on page 44).
4. Click Modify.
The modified include file pathname appears in the Include Files list.

43
B0193UZ – Rev A 3. SFC/ST Block Configurator

Deleting an Include File


To delete an include file:
1. In the editor window, click Include Files.
The Include Files dialog box appears (see Figure 3-20).
2. In the Include Files list, click the file.
The selected include file pathname is automatically copied to the File box.
3. Click Delete.
This deletes the include file pathname from the Include Files list.

Browsing for Files to Include


The Open dialog box (Figure 3-21) enables you to browse the system to locate include files to add
to the block configuration.

Click for file details.

Click desired directory.

Click a file name.

Click to confirm your


selection.

Click All Files (*.*).


Figure 3-21. Include File Open Dialog Box

To find and select a file to include:


1. In the Include Files dialog box (Figure 3-20), click Browse.
The Open dialog box (Figure 3-21) appears.
2. In the Look in folder (directory) box, click the source drive.
3. In the list of folders, double-click a folder until the desired folder appears in the
Look in box.
4. In the Files of Type list, click All Files (*.*).
The names of all files in the folder appear in the list.
5. In the list of files, click the name of the include file.
The filename appears in the File name box.
6. Click Open.
The editor specific Include Files dialog box appears with the selected file pathname in
its File box.

44
3. SFC/ST Block Configurator B0193UZ – Rev A

Example
To interface with the I/A Series Batch system, the macro include file FB_CONST.inc defines the
following phase command and status constants:
/* I/A Series Batch Phase Command/Status Constants */

#define PCONTROL II0007 /* Assign Phase Block Control Word */


#define PHOLD 1 /* Assign Batch Control Bits */
#define PRESTART 2
#define PABORT 4
#define PSTART 64
#define PRESET 128

#define PSTATUS II0008 /* Assign Phase Block Status Word */


#define PREADY 1 /* Phase Block Status Word values */
#define PHELD 2
#define PRUN 4
#define PDONE 8
#define PABORTED 16
#define PINTERLOCKED 32

Viewing Version History


The History dialog box (Figure 3-22) enables you to view the version history for a sequence
block. For each version, the history lists the version number, version date and author. The system
increments the version number each time the block is saved using Done from the File menu. You
cannot re-establish older versions.

Click a version to
view its comments.

Click to continue.

Figure 3-22. History Dialog Box

45
B0193UZ – Rev A 3. SFC/ST Block Configurator

To view the version history:


1. On the File menu, click History.
The History dialog box (Figure 3-22) appears.
2. In the Version date list, click a version.
The comment for this version appears in the Comment list.
3. Click OK to continue.

Block Information Editor


The Block Information Editor (Figure 3-23) enables you to view and edit the block global data.
This is the only editor that you cannot close.
The Block Information window, which is always visible in the SFC/ST Block Configurator parent
window, displays the block type and version number of the last block compilation. It allows you
to edit the operator remark and comment for the block. If either the block or main routine has
been included, it also displays the inclusion pathname.

Block Inclusion Pathname Example

Main Inclusion Pathname Example

Type operator remark.

Type comment.

Click for Help.

Figure 3-23. Block Information Editor

Block Configuration
For block configuration procedures when using the SFC/ST Block Configurator, see “Overview
of Block Configuration Procedures” on page 3.
For block configuration procedures when using the SFC/ST Library Configurator, see “Adding a
Library Block or Main Routine” on page 7.
For definition of a block, see “Definition of SFC/ST Sequence Block” on page 157.
For the common toolbar and Edit menu functions, see “Common Toolbar and Edit Menu Func-
tions” on page 20.

46
3. SFC/ST Block Configurator B0193UZ – Rev A

The following Edit menu commands are specific to the Block Information editor.
Replace Block Replaces all sequence logic with that from the selected library block
from object. The system replaces all declarations, routines, SFCs, and so on.
It preserves the block type, recipe phase name, and history
information.
Replace Main from Replaces the main routine definition with that from another library
object.
Embed Replaces a block inclusion (#include) with a copy of the included
library block.
Clear Block Clears all sequence logic in the block.
Clear Main Clears the main routine definition from the block.
Print Select All sequence block information can be printed when the Block
Information Editor is active. If more than one version of the sequence
block has been compiled, the History category is enabled. To print all
the version history, click History and All. To print the history for the
latest versions, click History and type the number of revisions you want
to print.

Editing Block Information


Use the Block Information editor (Figure 3-23) to edit the operator remark and comment. The
operator remark informs the operator of the purpose and function of the block, but you should
not use it to provide operating instructions. Use the comment field to provide information to
another process engineer.
To edit block information:
1. In the Operator Remark box, type the remark.
2. In the Comment box, type the comment.

SFC Editor
Use the SFC Editor (Figure 3-24) to graphically edit the Sequential Function Charts for the:
♦ Main routine
♦ Subroutines
♦ SBX routines.

47
B0193UZ – Rev A 3. SFC/ST Block Configurator

Initial Step

Branch Legs
Transition

Vertical Line

Horizontal Line

Drawn Link

Step

Figure 3-24. SFC Editor Window

The title bar of the editor window displays MAIN for the main routine, the name of the current
subroutine, or the name of the current SBX routine.
The SFC Editor always displays an SFC with the initial step. An empty SFC consists of its initial
step only.

NOTE
You cannot delete the initial step of an SFC.

48
3. SFC/ST Block Configurator B0193UZ – Rev A

SFC Graphical Objects


An SFC consists of the following graphical objects:
Step The step object is a container of ST statements. Each step within an SFC
has a unique name. Graphically, the step object is a rectangle containing its
name, for example, step ONOFF_AGIT in Figure 3-24. You cannot delete
the first step of an SFC (also called the initial step). Graphically, the vertical
lines of the initial step’s rectangle are double lines, for example, step
initialStep in Figure 3-24.
Transition The transition object contains an ST condition. Each transition has a pre-
ceding and succeeding step. Graphically, the transition object is a horizontal
bar across a vertical line, for example, the transition between steps
initialStep and ONOFF_AGIT in Figure 3-24.
Branch The branch object represents a divergence of sequence selection. It consists
of two or more branch leg objects, for example, the branch after step
initialStep in Figure 3-24.
Branch Leg The branch leg object represents one leg of a branch, for example, the
branch legs after step initialStep in Figure 3-24.
Link The link object represents a convergence of sequence selection. Graphically
a link can be drawn or interrupted. The lines of drawn links are drawn. In
the case of interrupted links (see Figure 3-25), the lines are not drawn and
only the following references are displayed:
♦ A reference for the succeeding step is displayed at the preceding
transition, for example, the interrupted link from the transition
following step SET_SPEED to step ONOFF_AGIT in Figure 3-25.
♦ A reference for the preceding step is displayed at the succeeding step,
for example, the interrupted link from the transition following step
SET_SPEED to step ONOFF_AGIT in Figure 3-25.
A loop is a link to a preceding step; therefore, it is a special form of a link.
Horizontal Line The horizontal line object moves the space of other graphical objects in the
horizontal direction. It has no other function. Graphically it is just a hori-
zontal line.
Vertical Line The vertical line object moves the space of other graphical objects in the
vertical direction. It has no other function. Graphically it is just a vertical
line.

49
B0193UZ – Rev A 3. SFC/ST Block Configurator

Interrupted Link

Figure 3-25. SFC with Interrupted Link

SFC Toolbar
Use the SFC toolbar (Figure 3-26) to build or modify an SFC. A toolbar button is only enabled
when its function can be performed in the current situation.

Figure 3-26. SFC Toolbar

Table 3-2 lists the buttons of the SFC toolbar and their functions.
Table 3-2. SFC Toolbar Button Functions

Toolbar
Button Function
Inserts a new step beneath the currently selected graphical object.

Inserts a new transition beneath the currently selected graphical object.

50
3. SFC/ST Block Configurator B0193UZ – Rev A

Table 3-2. SFC Toolbar Button Functions (Continued)

Toolbar
Button Function
Inserts a new branch beneath the currently selected graphical object.

Inserts a new branch leg to the right of the currently selected branch leg.

Inserts a new link beneath the currently selected transition.

Deletes the currently selected link (see “Deleting a Link” on page 55).

Inserts a new horizontal line to the right of the currently selected branch leg.

Inserts a new vertical line beneath the currently selected graphical object.

Displays the ST statements of the currently selected step or the ST condition of


the currently selected transition.

Opens a dialog box to change the name of the currently selected step, or to
change the name of the succeeding step for the currently selected link.

Searches for the control flow predecessor(s) of the currently selected object. The
editor restricts the search to those types of objects selected within the Select
Control Flow Element Types dialog box. If predecessors are found, the editor
shows them as selected. If none are found, the editor deselects all objects.
Searches for the control flow successor(s) of the currently selected object. The
editor restricts the search to those types of objects selected within the Select
Control Flow Element Types dialog box. If successors are found, the editor
shows them as selected. If none are found, the editor deselects all objects.
Invokes a dialog box to select the types of control flow objects for searching
control flow predecessor(s) or successor(s) of an object in the SFC network.

Editing Guidelines
Use the SFC Editor (Figure 3-24) to graphically edit Sequential Function Charts for the:
♦ Main routine
♦ Subroutines
♦ SBX routines.

51
B0193UZ – Rev A 3. SFC/ST Block Configurator

Build or modify the SFC using the:


♦ SFC toolbar (see“SFC Toolbar” on page 50)
♦ Common toolbar and Edit menu (see “Common Toolbar and Edit Menu Functions”
on page 20).
The following Edit menu commands are specific to the SFC Editor.
Replace from Replaces the current SFC with the SFC from a library block or
routine. The system also replaces the ST statements for all steps and
transitions of the SFC.
Clear Clears the SFC and all the ST code related to its steps and transitions.
Validate Validates the structure of the current SFC, but does not validate the
syntax of the ST code related to the SFC’s steps and transitions.
Print Select You can select only SFC, and if necessary, scale it.

The SFC Editor is a grid-oriented editor. You can only arrange the graphical objects of an SFC at
locations according to the editor’s grid.

NOTE
Clicking on any graphical object selects and highlights it. To select a second graphi-
cal object, press the Ctrl key and click the object.

Editing a Sequential Function Chart


To edit a Sequential Function Chart:
1. Select a routine to edit:
♦ Select a block routine to edit (see “Selecting a Block Routine to Edit” on page 31).
♦ Select a library routine to edit (see “Selecting a Library Object to Edit” on
page 114).
2. On the Editor menu, click SFC.
The SFC Editor window appears and displays all steps and transitions in the chart.
All routines start with at an initial step.
3. Create the Sequential Function Chart using the procedures below:
♦ Inserting a step (see “Inserting a Step” on page 53)
♦ Inserting a transition (see “Inserting a Transition” on page 53)
♦ Inserting a branch (see “Inserting a Branch” on page 53)
♦ Inserting a branch leg (see “Inserting a Branch Leg” on page 54)
♦ Inserting a link (see “Inserting a Link” on page 54)
♦ Deleting a link (see “Deleting a Link” on page 55)
♦ Inserting a horizontal line (see “Inserting a Horizontal Line” on page 56)
♦ Inserting a vertical line (see “Inserting a Vertical Line” on page 56)
♦ Displaying structured text (see “Displaying Structured Text” on page 56)
♦ Editing a step name (see “Editing a Step Name” on page 56).

52
3. SFC/ST Block Configurator B0193UZ – Rev A

4. To check the SFC structure, click Validate on the Edit menu.


See “Validating SFC Structure” on page 56.

Inserting a Step
To insert a step:
1. In the SFC, click a transition or any other graphical object (links are not selectable).

2. On the SFC toolbar, click Step .


The Step dialog box (Figure 3-27) appears.

Type a step name.

Click to insert a step.

Figure 3-27. Step Dialog Box

3. In Step name box, type a unique name (up to 12 characters).

NOTE
Do not use a keyword or already defined identifier.

4. Click OK.
This inserts a new step beneath the currently selected graphical object.

Inserting a Transition
To insert a transition:
1. In the SFC, click a step or any other graphical object (links are not selectable).

2. On the SFC toolbar, click Transition .


This inserts a new transition beneath the currently selected graphical object.

Inserting a Branch
To insert a branch:
1. In the SFC, click a step or any other graphical object (links are not selectable).

2. On the SFC toolbar, click Branch .


The Branch dialog box (Figure 3-28) appears.

53
B0193UZ – Rev A 3. SFC/ST Block Configurator

Type number of legs.

Click to insert branch.

Figure 3-28. Insert Branch Dialog Box

3. In number of legs box, type number of legs (2 to 200).


4. Click OK.
This inserts a new branch beneath the currently selected graphical object.

Inserting a Branch Leg


To insert a branch leg:
1. In the SFC, click an existing branch leg.

2. On the SFC toolbar, click Branch Leg .


This inserts a new branch leg to the right of the currently selected branch leg.

Inserting a Link
To insert a link:
1. In the SFC, click the preceding transition for the new link.

2. On the SFC toolbar, click Link .


The Step Selection dialog box (Figure 3-29) appears.

54
3. SFC/ST Block Configurator B0193UZ – Rev A

Click succeeding
step from link.

Click link type.

Click to create link.

Figure 3-29. Step Selection Dialog Box

3. In Steps box, click succeeding step for the new link.


4. To specify the link type, click drawn link or interrupted link.
5. Click OK.
This inserts a new link beneath the currently selected transition. If a drawn link cannot be created,
a corresponding warning appears and the system automatically changes the drawn link to an
interrupted link.

Deleting a Link
To delete a link:
1. To select a link, perform one of the following:
♦ Click any of the line elements between the last element (step or transition) of the
branch and the convergence.
♦ Click any of the line elements of the branch between the divergence and the
convergence, if there is no transition or step in the branch.
♦ Click the last step or transition of the branch.

2. On the SFC toolbar, click the Remove Link .


This deletes the link from the SFC.

55
B0193UZ – Rev A 3. SFC/ST Block Configurator

Inserting a Horizontal Line


To insert a horizontal line:
1. In the SFC, click an existing branch leg or horizontal line.

2. On the SFC toolbar, click Horizontal Line .


This inserts a new horizontal line to the right of the currently selected graphical object.

Inserting a Vertical Line


To insert a vertical line:
1. In the SFC, click any existing graphical object except a horizontal line.

2. On the SFC toolbar, click Vertical Line .


This inserts a new vertical line beneath the currently selected graphical object.

Displaying Structured Text


To display structured text:
1. In the SFC, click a step or transition.

2. On the SFC toolbar, click Structured Text .

TIP
In the SFC, double-click a step or transition.

This displays the:


♦ Step’s structured text statements in the Step Editor
♦ Transition’s structured text condition in the Transition Editor.

Editing a Step Name


To edit a step name:
1. In the SFC, click a step.
2. On the SFC toolbar, click Edit .
The Step dialog box appears (see Figure 3-27).
3. In the Step name box, type a new name (up to 12 characters) for the step.
4. Click OK.
This changes the step name.

Validating SFC Structure


To validate the structure of an SFC:
1. Make sure that the SFC Editor is the active window.
2. On the Edit menu, click Validate SFC.

56
3. SFC/ST Block Configurator B0193UZ – Rev A

The system validates the structure of the current SFC, but does not validate the syntax
of the ST code related to the SFC’s steps and transitions. It validates that:
♦ Two steps are never directly linked; they must be separated by a transition.
♦ Two transitions are never directly linked; they must be separated by a step.
♦ Each branch leg ends with a step or link.
♦ Each link has a preceding transition and a succeeding step.
Any errors in the structure appear in the Validate dialog box (Figure 3-30).

Click to close
dialog box.

Figure 3-30. Validate Dialog Box

3. To close the dialog box, click OK.


This completes validation of the SFC structure.

Step Editor
The Step Editor (Figure 3-31) enables you to edit the ST statements of steps in the:
♦ Main routine
♦ Subroutines
♦ SBX routines.
The title bar of the window contains MAIN, or the name of the current subroutine or SBX
routine. The Statement List box displays the existing statements for the selected step.

57
B0193UZ – Rev A 3. SFC/ST Block Configurator

Click a step name.

Click and edit new or


existing statement.

Type operator remark.

Type comment.

Figure 3-31. Step Editor

Editing a Step
Use the Step Editor to edit the ST statements, operator remark, and comment of a step. Step
statements must conform to the specifications in “Step Specification with Structured Text (ST)”
on page 163.
To define the statements use the common toolbar, and the Edit and Symbols menus (see “Com-
mon Toolbar and Edit Menu Functions” on page 20).
The following Edit menu commands are specific to the Step Editor.
Replace from Replaces all data of the current step with that from another step in a
library block or routine.
Clear Clears the current steps statements.
Print Select You can select Steps, Comments, or Operator Remarks.

58
3. SFC/ST Block Configurator B0193UZ – Rev A

Editing Step Statements


To edit statements in a step:
1. Select a routine to edit:
♦ Select a block routine to edit (see “Selecting a Block Routine to Edit” on page 31).
♦ Select a library routine to edit (see “Selecting a Library Object to Edit” on
page 114).
2. On the Editor menu, click Step, or if the SFC Editor window is open, double-click a
step in the SFC.
The Step Editor window appears (see Figure 3-31) with the name of the first step or
the selected SFC step in the Step list.
3. If the proper step name is not in the Step box, click the desired name in the drop-
down list.
4. In the Statement List box, click the location for adding or editing a statement.
5. Edit the statement by typing a statement with the keyboard or by:
♦ Inserting a function (see “Inserting a Function” on page 60)
♦ Inserting a function block (see “Inserting a Function Block” on page 61)
♦ Inserting a subroutine (see “Inserting a Subroutine” on page 62)
♦ Inserting a Compound:Block.Parameter (see “Inserting a Com-
pound:Block.Parameter” on page 63)
♦ Copying and pasting constants, user labels, variables, and macros (see “Copying
and Pasting” on page 64)
♦ Using the common toolbar (see “Common Toolbar and Edit Menu Functions” on
page 20).

NOTE
The effect of using the Tab key is different on Windows NT® and Solaris stations:
Windows NT – If you want to insert a tab in your text, press Ctrl+I. The Tab
key moves the focus to the next control (Tab, Shift+Tab).
Solaris – If you want to insert a tab in your text, press the Tab key. Pressing
Ctrl+I just inserts the letter i in your text. Pressing Shift+Tab, however, moves the
focus to the preceding control.

6. In the Operator Remark box, edit the remark.


7. In the Comment box, edit the comment.

Example
Step SET_SPEED (Figure 3-31) sets the speed of the agitator with the following statement:
AGIT_SPEED := Speed;
where:
Speed is a user label that references block input parameter RI0006.

59
B0193UZ – Rev A 3. SFC/ST Block Configurator

Functions
You can insert predefined function calls in step statements and transition conditions by selecting
the functions from a list in the Symbols dialog box (Figure 3-32). You must specify the
arguments for the calls. For a list of available functions and their definition, see “Functions” on
page 179.

Click a function.
Click to insert selected function
and close dialog box.
Click to close dialog box.

Click to insert selected function


without closing the dialog box.

Figure 3-32. Symbol Dialog Box for Functions

Inserting a Function
To insert a function:
1. In the list of statements or conditions, click the location where you want to insert the
function call.
2. On the Symbols menu, click Functions.
The Symbols dialog box (Figure 3-32) appears.
3. In the Functions list, click a function.
4. To insert the function and close the dialog box, click OK. To insert the function with-
out closing the dialog box, click Apply.
Clicking OK inserts the calling syntax of the selected function at the cursor position
in the step’s statement list (Step Editor) or the transition’s condition (Transition Edi-
tor) and closes the dialog box.
Clicking Apply inserts the calling syntax of the selected function, but the dialog box
remains open so you can insert more functions. To close the dialog box, click Close.

Example
For the statement of step SET_SPEED in Figure 3-31, you can round the user label Speed, which
references block input parameter RI0006 (real data type):
AGIT_SPEED := ROUND (Speed);
This statement sets the agitator speed to the value of RI0006 rounded to the nearest integer.

Function Blocks
You can insert predefined function block calls in step statements by selecting the function blocks
from a list in the Symbols dialog box (Figure 3-33). You must specify the arguments for the calls.
For a list of available function blocks and their definition, see “Function Blocks” on page 184.

60
3. SFC/ST Block Configurator B0193UZ – Rev A

Click a function block.


Click to insert selected function
block and close dialog box.
Click to close dialog box.

Click to insert selected function


block and keep dialog box open.

Figure 3-33. Symbol Dialog Box for Function Blocks

Inserting a Function Block


To insert a function block:
1. In the list of statements, click the location where you want to insert the function block
call.
2. On the Symbols menu, click Function Blocks.
The Symbols dialog box (Figure 3-32) appears.
3. In the Function Blocks list, click a function block.
4. To insert the function block and close the dialog box, click OK. To insert the function
block without closing the dialog box, click Apply.
Clicking OK inserts the calling syntax of the selected function block at the cursor
position in the step’s statement list (Step Editor) and closes the dialog box.
Clicking Apply inserts the calling syntax of the selected function block, but the dialog
box remains open so you can insert more function blocks. To close the dialog box,
click Close.

Example
In the PRESSURE_TST sequence block, step start_timer calls the function block
START_TIMER to start a timer in the MANUAL_TIM timer block as follows:
START_TIMER (tim := TIMER_1.TIMR1 , init := 0.0);
where:
TIMER_1 is the MANUAL_TIM block (macro #define).

Subroutines
You can insert subroutine calls in step statements by selecting the subroutines from a list in the
Symbols dialog box (Figure 3-34). You must specify the arguments for the calls. For definition of
a subroutine, see “Subroutines” on page 160.

61
B0193UZ – Rev A 3. SFC/ST Block Configurator

Click a subroutine.
Click to insert selected subroutine
and close dialog box.

Click to close dialog box.

Click to insert selected subroutine


without closing the dialog box.

Figure 3-34. Symbol Dialog Box for Subroutines

Inserting a Subroutine
To insert a subroutine:
1. In the list of statements, click the location where you want to insert the subroutine
call.
2. On the Symbols menu, click Subroutines.
The Symbols dialog box (Figure 3-32) appears.
3. In the Subroutines list, click a subroutine.
4. To insert the subroutine and close the dialog box, click OK. To insert the subroutine
without closing the dialog box, click Apply.
Clicking OK inserts the calling syntax of the selected subroutine at the cursor position
in the step’s statement list (Step Editor) and closes the dialog box.
Clicking Apply inserts the calling syntax of the selected subroutine, but the dialog box
remains open so you can insert more subroutines. To close the dialog box, click Close.

Example
In the AGITATE sequence block, step ONOFF_AGIT calls the subroutine DRIVE to start the
agitator when the Mode is ON (true) as follows:
DRIVE :=(UNIT := ‘’, Device := AGITATOR, State := Mode);
where:
‘’ is REACT210 unit
AGITATOR is the agitator equipment
Mode is ON or OFF.

Compound:Block.Parameter
You can insert Compound:Block.Parameters in step statements and transition conditions by
selecting them from a list in the Browser dialog box (Figure 3-35). This dialog box allows you to
browse all the compounds, blocks, and parameters in the system or a selected control station. For
more information, see “Full Pathname (FPN) Operands” on page 174 and “Identifiers” on
page 168.

62
3. SFC/ST Block Configurator B0193UZ – Rev A

Click a control station to


list only its compounds.
Control stations are listed
when Compound List
View box is not checked.
Double-click a compound
to list only its blocks.
Click a block.

Select to list all compounds


in the system.
Click a block type to list.

Click to confirm selection.

Click the desired type(s)


of parameters to list.

Click a parameter.
Figure 3-35. Object Browser for Compound/Block/Parameter

Inserting a Compound:Block.Parameter
To insert a Compound:Block.Parameter:
1. In the step statement or transition condition, click the location where you want to
insert the Compound:Block.Parameter.
2. In the Symbols menu, click :Comp:Block.Par.
The Browser dialog box (Figure 3-35) appears.
3. Use the Compound List View check box to toggle between viewing compounds or
control stations in the Compound:Block box.
♦ Select the Compound List View check box to view all the compounds in the
system, or clear it to view control stations.
♦ Double-click a control station to view its compounds.
4. To view the blocks in a compound, double-click the compound in the
Compound:Block list.
5. To view the parameters of a block, double-click the block in the Compound:Block list.
♦ To help locate the block, click a block type in the Block Type Filter box.
6. In the Parameter list, click a parameter.
The Object box contains the name of the selected Compound:Block.Parameter.

63
B0193UZ – Rev A 3. SFC/ST Block Configurator

♦ To limit the list of parameters, select the desired type check boxes: Input, Output,
String, All.
7. Click OK.
This inserts the selected Compound:Block.Parameter at the cursor position in the statement or
condition.

Example
In the PRESSURE_TST sequence block, step start_timer calls the function block
START_TIMER to start a timer in the MANUAL_TIM timer block as follows:
START_TIMER (tim := TIMER_1.TIMR1, init := 0.0);
TIMER_1 is a macro #define (MANUAL_TIM), but you can use the above procedures to insert
the Compound:Block.Parameter name as shown below:
START_TIMER (tim := REACT210:MANUAL_TIM.TIMR1V, init := 0.0);

Copying and Pasting


You can copy and paste the names of constants, user labels, macros, and variables into step state-
ments and transition conditions.
To copy and paste the names of constants, user labels, macros, and variables:
1. Open the Constant Editor, User Label Editor, Macro Editor or Variable Editor.

NOTE
Select the main routine to access the Variable Editor for block global variables.
Select a subroutine to access the Variable Editor for subroutine variables

2. In the list, click the constant, user label, macro, or variable declaration for which you
want to copy the name.
The name of the selected declaration element appears in the Name or Label box.
3. In the Name or Label box, select the name or label.
4. On the Edit menu, click Copy.
This copies the name to the clipboard.
5. In the step statement or transition condition, click the location where you want to
paste the contents of the clipboard.
6. On the Edit menu, click Paste.
This pastes the name from the clipboard to the cursor location in the statement or condition.

Transition Editor
The Transition Editor (Figure 3-36) enables you to edit the ST condition of transitions in the:
♦ Main routine
♦ Subroutines
♦ SBX routines.
The title bar of the window contains MAIN, or the name of the current subroutine or SBX
routine. The Condition box displays the existing condition for the selected transition.

64
3. SFC/ST Block Configurator B0193UZ – Rev A

Click a step name.

Click and edit condition.

Type operator remark.

Type comment.

Figure 3-36. Transition Editor

Editing a Transition
Use the Transition Editor to edit the ST condition, operator remark, and comment of a transi-
tion. Transition conditions must conform to the specifications in “Transition Specification with
Structured Text (ST)” on page 165.
To define the condition, use the common toolbar and the Edit and Symbols menus (see “Com-
mon Toolbar and Edit Menu Functions” on page 20).
The following Edit menu commands are specific to the Transition Editor.
Replace from Replaces the current transition data with data from a library block or
routine.
Clear Clears all data for the current transition.
Print Select You can select Transitions, Comments, or Operator Remarks.

65
B0193UZ – Rev A 3. SFC/ST Block Configurator

Editing the Transition Condition


To edit the condition of a transition:
1. Select a routine to edit:
♦ Select a block routine to edit (see “Selecting a Block Routine to Edit” on page 31).
♦ Select a library routine to edit (see “Selecting a Library Object to Edit” on
page 114).
2. On the Editor menu, click Transition, or if the SFC Editor window is open, double
click a transition in the SFC.
The Transition Editor window appears (see Figure 3-31) with the names of the pre-
ceding and succeeding steps of the first transition or the selected SFC transition in the
Transition from and to lists.
3. If the proper step names are not in the Transition from and to boxes, click the
desired names from the drop-down lists.
The Transition from and to boxes allow switching to any other uniquely identified
transition of the same routine. Transitions that are not uniquely identified by their
preceding and succeeding steps can only be switched to by selecting them from the
SFC Editor.
4. In the Condition box, click the location for adding or editing the condition.
5. Edit the condition by typing or by:
♦ Inserting a function (see “Inserting a Function” on page 60)
♦ Inserting a Compound:Block.Parameter (see “Inserting a Com-
pound:Block.Parameter” on page 63)
♦ Copying and pasting the names of constants, user labels, variables, and macros
(see “Copying and Pasting” on page 64)
♦ Using the common toolbar (see “Common Toolbar and Edit Menu Functions” on
page 20).

NOTE
The length of a condition is limited to 504 characters.
The effect of using the Tab key is different on Windows NT and Solaris stations:
Windows NT – If you want to insert a tab in your text, press Ctrl+I. The Tab
key moves the focus to the next control (Tab, Shift+Tab).
Solaris – If you want to insert a tab in your text, press the Tab key. Pressing
Ctrl+I just inserts the letter i in your text. Pressing Shift+Tab, however, moves the
focus to the preceding control.

6. In the Operator Remark box, edit the remark.


7. In the Comment box, edit the comment.

66
3. SFC/ST Block Configurator B0193UZ – Rev A

Example
The transition from step initialStep to step SET_SPEED (Figure 3-36) controls the flow with the
following condition:
Mode := ON;
where:
ON is a macro #define (TRUE).

Constant Editor
The Constant Editor (Figure 3-37) enables you to edit block global symbolic constant definitions
usable in the:
♦ Main routine
♦ Subroutines
♦ SBX routines.
The Constants box displays the existing constant definitions.

Click to edit constant


include files.

Click a location to edit


or add a constant.

Type a constant name.


Click or type constant type.

Type a constant value.

Type operator remark.

Type comment.
Click Add, Modify, or
Delete to edit constant
as desired.

Figure 3-37. Constant Editor

67
B0193UZ – Rev A 3. SFC/ST Block Configurator

Editing Constants
Use the Constant Editor to edit the name, data type, value, operator remark, and comment for
constants. Constants must conform to the specifications in “Symbolic Constants” on page 159.
To define constants, use the Common toolbar and Edit menu (see “Common Toolbar and Edit
Menu Functions” on page 20).
The following Edit menu commands are specific to the Constant Editor.
Replace from This replaces all constant definitions and the constant include file list of
this block with those from a library block or MAIN routine.
Clear This clears all constant definitions and the constant include files list.
Print Select You can select Constants, Comments, or Operator Remarks.

Adding a Constant
To add a constant:
1. On the Editor menu, click Constant.
The Constant Editor window (Figure 3-37) appears.
2. To select the location for a new constant definition in the Constants list, click the
constant definition above the desired location.
3. In the Name box, type a unique name.

NOTE
Do not use a keyword or already defined identifier.

4. In the Type list, click a data type.


5. In the Value box, type a value consistent with the data type.
6. In the Operator Remark box, type a remark.
7. In the Comment box, type a comment.
8. Click Add.
The new constant definition appears in the Constants list beneath the currently
selected constant.

Modifying a Constant
To modify a constant:
1. On the Editor menu, click Constant.
The Constant Editor window (Figure 3-37) appears.
2. In the Constants list, click an existing constant definition.
The selected constant definition is automatically copied to the Name, Type, Value,
Operator Remark, and Comment boxes.

68
3. SFC/ST Block Configurator B0193UZ – Rev A

3. Modify the constant definition as desired:


♦ In the Name box, type a unique name.

NOTE
Do not use a keyword or already defined identifier.

♦ In the Type list, click a data type.


♦ In the Value box, type a value consistent with the data type.
♦ In the Operator Remark box, type a remark.
♦ In the Comment box, type a comment.
4. Click Modify.
The modified constant definition appears in the Constants list.

Deleting a Constant
To delete a constant:
1. On the Editor menu, click Constant.
The Constant Editor window (Figure 3-37) appears.
2. In the Constants list, click an existing constant definition.
The system automatically copies the selected constant definition to the Name, Type,
Value, Operator Remark, and Comment boxes.
3. Click Delete.
This deletes the selected constant definition from the Constants list.

Editing Include Files


To edit the pathnames of constant include files:
1. On the Editor menu, click Constant.
The Constant Editor window (Figure 3-37) appears.
2. Follow the procedures in “Using Include Files” on page 42

Variable Editor
The Variable Editor (Figure 3-38) enables you to edit the variables of the:
♦ Main routine
♦ Subroutine.
Main routine variables are global to the whole sequence block. Subroutine variables are local to
the corresponding subroutine.
The title bar of the window contains MAIN or the name of the current subroutine for which the
variables are defined. The Variables list displays the existing variable definitions.

69
B0193UZ – Rev A 3. SFC/ST Block Configurator

Click to edit variable


include files.

Click to edit or add


a variable.

Type variable name.

Click data type.


Type array dimensions.

Type operator remark.

Type comment.
Click Add, Modify, or
Delete, to edit variable
as desired.

Figure 3-38. Variable Editor

Editing Variables
Use the Variable Editor to edit the name, data type, array dimensions, operator remark, and com-
ment for variables. Variables must conform to the specifications in “Block Local Variables” on
page 159.
To define variables, use the common toolbar and Edit menu (see “Common Toolbar and Edit
Menu Functions” on page 20).
The following Edit menu commands are specific to the Variable Editor.
Replace from This replaces all variable definitions of this routine and the variable
include list with those from a library block or routine.
Clear This clears all variable definitions and the variable include list.
Print Select You can select Variables, Comments, or Operator Remarks.

70
3. SFC/ST Block Configurator B0193UZ – Rev A

Adding a Variable
To add a variable:
1. Select a routine to edit:
♦ Select a block routine to edit (see “Selecting a Block Routine to Edit” on page 31).
♦ Select a library routine to edit (see “Selecting a Library Object to Edit” on
page 114).
2. On the Editor menu, click Block Variable or Subroutine Variable as appropriate
for the selected routine.
The Variable Editor window (Figure 3-38) appears.
3. To select the location for a new variable definition in the Variables list, click the
variable definition above the desired location.
4. In the Name box, type a unique name.

NOTE
Do not use a keyword or already defined identifier.

5. In the Type list, click a data type.


6. In the Dimensions box, type the dimensions for an array.
7. In the Operator Remark box, type a remark.
8. In the Comment box, type a comment.
9. Click Add.
The new variable definition appears in the Variables list beneath the currently selected variable.

Modifying a Variable
To modify a variable:
1. Select a routine to edit:
♦ Select a block routine to edit (see “Selecting a Block Routine to Edit” on page 31).
♦ Select a library routine to edit (see “Selecting a Library Object to Edit” on
page 114).
2. On the Editor menu, click Block Variable or Subroutine Variable as appropriate
for the selected routine.
The Variable Editor window (Figure 3-38) appears.
3. In the Variables list, click an existing variable definition.
The system automatically copies the selected variable definition to the Name, Type,
Dimensions, Operator Remark, and Comment boxes.

71
B0193UZ – Rev A 3. SFC/ST Block Configurator

4. Modify the variable definition as desired:


♦ In the Name box, edit the name.

NOTE
Do not use a keyword or already defined identifier.

♦ In the Type list, click a data type.


♦ In the Dimensions box, type the dimensions for an array.
♦ In the Operator Remark box, type a remark.
♦ In the Comment box, type a comment.
5. Click Modify.
The modified variable definition appears in the Variables list.

Deleting a Variable
To delete a variable:
1. Select a routine to edit:
♦ Select a block routine to edit (see “Selecting a Block Routine to Edit” on page 31).
♦ Select a library routine to edit (see “Selecting a Library Object to Edit” on
page 114).
2. On the Editor menu, click Block Variable or Subroutine Variable as appropriate
for the selected routine.
The Variable Editor window (Figure 3-38) appears.
3. In the Variables list, click an existing variable definition.
The system automatically copies the selected variable definition to the Name, Type,
Dimensions, Operator Remark, and Comment boxes.
4. Click Delete.
This deletes the selected variable definition from the Variables list.

Editing Include Files


To edit the pathnames of variable include files:
1. Select a routine to edit:
♦ Select a block routine to edit (see “Selecting a Block Routine to Edit” on page 31).
♦ Select a library routine to edit (see “Selecting a Library Object to Edit” on
page 114).
2. On the Editor menu, click Block Variable or Subroutine Variable as appropriate
for the selected routine.
The Variable Editor window (Figure 3-38) appears.
3. Follow the procedures in “Using Include Files” on page 42.

72
3. SFC/ST Block Configurator B0193UZ – Rev A

Example
Step SET_SPEED sets the speed of the agitator with the following statement:
AGIT_SPEED := Speed;
Speed is a user label that references the block input parameter RI0006. You can define a variable
to set the agitator speed as follows:
RPM := RI0006
AGIT_SPEED := RPM;

User Label Editor


The User Label Editor (Figure 3-39) enables you to edit block global user label definitions in the:
♦ Main routine
♦ Subroutines
♦ SBX routines.
The Users Labels list displays the existing user label definitions.

Click to edit user


label include file.

Click to edit or add


a user label.

Type user label.

Click parameter name.

Type operator remark.

Type comment.
Click Add, Modify, or
Delete, to edit user
label as desired.

Figure 3-39. User Label Editor

73
B0193UZ – Rev A 3. SFC/ST Block Configurator

Editing User Labels


Use the User Label Editor to edit the label, parameter, operator remark, and comment for a user
label. User labels must conform to the specifications in “User Labeled Parameter” on page 159.
To define user labels, use the common toolbar and Edit menu (see “Common Toolbar and Edit
Menu Functions” on page 20).
The following Edit menu commands are specific to the User Label Editor.
Replace from Replaces all user label definitions and the user label include files list of
this block with those from another library block or MAIN routine.
Clear Clears all user label definitions and the user label include files list.
Print Select You can select User Labels, Comments, or Operator Remarks.

Adding a User Label


To add a user label:
1. On the Editor menu, click User Label.
The User Label Editor window (Figure 3-39) appears.
2. To select the location for a user label definition in the User Labels list, click the user
label definition above the desired location.
3. In the Label box, type a unique name.

NOTE
Do not use a keyword or already defined identifier.

4. In the Parameter list, click a user parameter.


5. In the Operator Remark box, type a remark.
6. In the Comment box, type a comment.
7. Click Add.
The new user label definition appears in the User Labels list beneath the currently selected
location.

Modifying a User Label


To modify a user label:
1. On the Editor menu, click User Label.
The User Label Editor window (Figure 3-39) appears.
2. In the User Labels list, click an existing user label definition.
The system automatically copies the selected user label definition to the Label,
Parameter, Operator Remark, and Comment boxes.

74
3. SFC/ST Block Configurator B0193UZ – Rev A

3. Modify the user label definition as desired:


♦ In the Label box, edit the label.

NOTE
Do not use a keyword or already defined identifier.

♦ In the Parameter list, click a user parameter.


♦ In the Operator Remark box, type a remark.
♦ In the Comment box, type a comment.
4. Click Modify.
The modified user label definition appears in the User Labels list.

Deleting a User Label


To delete a user label:
1. On the Editor menu, click User Label.
The User Label Editor window (Figure 3-39) appears.
2. In the User Labels list, click an existing user label definition.
The system automatically copies the selected user label definition to the Label,
Parameter, Operator Remark, and Comment boxes.
3. Click Delete.
This deletes the selected user label definition from the User Labels list.

Editing Include Files


To edit the pathnames of user label include files:
1. On the Editor menu, click User Label.
The User Label Editor window (Figure 3-39) appears.
2. Follow the procedures in “Using Include Files” on page 42.

Example
Step SET_SPEED sets the speed of the agitator with the following statement:
AGIT_SPEED := Speed;
where:
Speed is a user label that references block input parameter RI0006.

Macro Editor
The Macro Editor (Figure 3-40) enables you to edit macro definitions in the:
♦ Main routine
♦ Subroutines
♦ SBX routines.
The Definitions list displays the existing macro definitions.

75
B0193UZ – Rev A 3. SFC/ST Block Configurator

Click to edit macro


include files.

Click to edit or add


a macro.

Type macro name.

Type macro definition.

Click Add, Modify,


or Delete, to edit
macros as desired.

Figure 3-40. Macro Editor

Editing Macros
Use the Macro Editor to edit the name and definition for a macro. Macros must conform to the
specifications in “Macros” on page 163.
To define macros, use the common toolbar and Edit menu (see “Common Toolbar and Edit
Menu Functions” on page 20).
The following Edit menu commands are specific to the Macro Editor.
Replace from This replaces all macro definitions and the macro include files list of
this block with those from a library block or main routine.
Clear This clears all macro definitions and the macro include files list.
Print Select You can select only Macros.

Adding a New Macro


To add a macro:
1. On the Editor menu, click Macro.
The Macro Editor window (Figure 3-40) appears.
2. To select the location for a new macro definition in the Definitions list, select the
macro definition above the desired location.
3. In the Name box, type a unique name for the macro.

76
3. SFC/ST Block Configurator B0193UZ – Rev A

! CAUTION
Make sure you type a unique name. Otherwise, the system will replace every term in
the *.k file matching with the macro’s name, including keywords and identifiers.

4. In the Replacement box, type the macro definition.


5. Click Add.
The new macro definition appears in the Definitions list beneath the currently selected location.

Modifying a Macro
To modify a macro:
1. On the Editor menu, click Macro.
The Macro Editor window (Figure 3-40) appears.
2. In the Definitions list, click an existing macro definition.
The system automatically copies the selected macro definition to the Name and
Replacement boxes.
3. Modify the macro definition as desired:
♦ In the Name box, edit the macro name.

! CAUTION
Make sure you type a unique name. Otherwise, the system replaces every term in
the *.k file matching with the macro’s name, including keywords and identifiers.

♦ In the Replacement box, type the modified macro definition.


4. Click Modify.
The modified macro definition appears in the Definitions list.

Deleting a Macro
To delete a macro:
1. On the Editor menu, click Macro.
The Macro Editor window (Figure 3-40) appears.
1. In the Definitions list, click an existing macro definition.
The system automatically copies the selected macro definition to the Name and
Replacement boxes.
2. Click Delete.
This deletes the selected macro definition from the Definitions list.

Editing Include Files


To edit the pathnames of macro include files:
1. On the Editor menu, click Macro.
The Macro Editor window (Figure 3-40) appears.
2. Follow the procedures in “Using Include Files” on page 42.

77
B0193UZ – Rev A 3. SFC/ST Block Configurator

Example
In the PRESSURE_TST sequence block, step start_timer calls the function block
START_TIMER to start a timer in the MANUAL_TIM timer block as follows:
START_TIMER (tim := TIMER_1.TIMR1, init := 0.0);
TIMER_1 is defined by a macro as follows:
# define TIMER_1 :REACT210:MANUAL_TIM

Subroutine Editor
The Subroutine Editor (Figure 3-41) window enables you to display and edit data that is global to
a subroutine, including the operator remark and comment.

Subroutine Inclusion Pathname

Type operator remark.

Type comment.

Figure 3-41. Subroutine Editor

The title bar of the window contains the name of the current subroutine. If the subroutine has
been included, the window displays the inclusion pathname. You access the Subroutine Editor
from the Routine Selection dialog box.

Routine Selection Dialog Box for Subroutines


The Routine Selection dialog box (Figure 3-42) enables you to:
♦ Add a subroutine
♦ Modify a subroutine name
♦ Delete a subroutine
♦ Order the subroutines in the list
♦ Access the Subroutine Editor.
The Routine box contains the name of the selected subroutine and enables you to type the name
of a new subroutine or modify the name of an existing subroutine. The Subroutines box contains
all available subroutines in the block.

78
3. SFC/ST Block Configurator B0193UZ – Rev A

Click to type a new subroutine name.

Click to add a new subroutine.

Click to edit the selected routine.

Click a subroutine.

Click to rename a subroutine.

Click to delete selected subroutine.

Click Up or Down to change the


order of the selected subroutine.

Figure 3-42. Routine Selection Dialog Box for Subroutines

Editing Subroutines in a Block


Subroutines must conform to the specifications in “Subroutines” on page 160.
To define subroutines, use the common toolbar and Edit menu functions, see “Common Toolbar
and Edit Menu Functions” on page 20.
The following Edit menu commands are specific to the Subroutine Editor.
Replace from Replaces the entire subroutine with a subroutine from a library block or
subroutine. This comprises the following subroutine elements; the
name of the original subroutine is preserved:
♦ Operator remark
♦ Comment
♦ Subroutine parameters
♦ Subroutine variables
♦ SFC
♦ ST code for all steps and transitions.
Embed Replaces a subroutine inclusion (#include) with a copy of the included
library subroutine.

79
B0193UZ – Rev A 3. SFC/ST Block Configurator

Clear Clears the entire subroutine as described in Replace from above.


Print Select You can select All, SFC, Steps, Transitions, Variables, Subroutine
Parameter, Comments or Operator Remarks. If more than one
version of the subroutine has been saved, the History category is
enabled. To print all the version history, click History and All. To print
the history for the latest versions, click History and type the number of
revisions you want to print.

Adding a Block Subroutine


To add a block subroutine:
1. On the Editor menu, click Routine...
The Routine Selection dialog box (Figure 3-42) appears.
2. In the Routine box, type a unique name for the new subroutine.

NOTE
Do not use a keyword or already defined identifier.

3. Click Add.
This adds the frame of the new subroutine to the SFC/ST sequence block.
4. Click Edit.
The Subroutine Editor window (Figure 3-41) appears.
5. In the Operator Remark box, type a remark.
6. In the Comment box, type a comment.
7. Complete the subroutine:
♦ For the SFC/ST Block Configurator, see “Step 3. Define Subroutines” on page 4.
♦ For the SFC/ST Library Configurator, see “Defining Subroutines” on page 8.

Modifying a Block Subroutine


To modify a block subroutine:
1. On the Editor menu, click Routine...
The Routine Selection dialog box (Figure 3-42) appears.
2. In the Subroutines list, click the subroutine you want to modify.
The name of the selected subroutine appears in the Routine box.
3. To modify the subroutine name:
a. In the Routine box, type a new name.

NOTE
Do not use a keyword or already defined identifier.

b. Click Rename.
The new subroutine name appears in the Subroutines list.

80
3. SFC/ST Block Configurator B0193UZ – Rev A

4. To edit the subroutine:


a. Click Edit.
The Subroutine Editor window (Figure 3-41) appears.
b. In the Operator Remark box, edit the remark.
c. In the Comment box, edit the comment.
d. Complete editing the subroutine:
♦ For the SFC/ST Block Configurator, see “Step 3. Define Subroutines” on
page 4.
♦ For the SFC/ST Library Configurator, see “Defining Subroutines” on page 8.

Deleting a Block Subroutine


To delete a block subroutine:
1. On the Editor menu, click Routine...
The Routine Selection dialog box (Figure 3-42) appears.
2. In the Subroutines list, click the subroutine you want to delete.
The name of the selected subroutine appears in the Routine box.
3. Click Delete.
The SFC/ST Sequence Block dialog box appears.
4. Click OK.
This deletes the entire subroutine from the SFC/ST block including all SFC logic.

Ordering Block Subroutines


Since HLBL allows only forward declaration, it may be necessary to place the block subroutines in
a special order. For example, if you call in subroutine “abc” which calls in subroutine “xyz”, then
subroutine “xyz” must be declared before subroutine “abc”.
To reorder a block subroutine:
1. On the Editor menu, click Routine...
The Routine Selection dialog box (Figure 3-42) appears. The Subroutines list shows
the subroutines in the current declaration order with the one at the top being the first
subroutine declaration, and the one at the bottom being the last subroutine
declaration.
2. In the Subroutines list, click the subroutine you want to move.
3. Click Up to move the subroutine one position upward in the list, or click Down to move
it downward.

Example
In the AGITATE sequence block, step ONOFF_AGIT calls the subroutine DRIVE to start the
agitator when the Mode is ON (true) as follows:
DRIVE :=(UNIT := ‘’, Device := AGITATOR, State := Mode);

81
B0193UZ – Rev A 3. SFC/ST Block Configurator

where:
‘’ is REACT210 unit
AGITATOR is the agitator equipment
Mode is ON or OFF.
Figure 3-43 shows the SFC for subroutine DRIVE with the code for a step and transition.

Figure 3-43. SFC for Subroutine Drive

82
3. SFC/ST Block Configurator B0193UZ – Rev A

SBX Editor
The SBX Editor (Figure 3-44) enables you to display and edit data that is global to an SBX
routine, including the operator remark and comment. If the SBX has been included, the window
displays the inclusion pathname. The title bar of the window contains the name of the current
SBX. You access the SBX Editor from the Routine Selection dialog box.

SBX Routine Inclusion Pathname

Type operator remark.

Type comment.

Figure 3-44. SBX Editor

Routine Selection Dialog Box for SBX Routines


The Routine Selection dialog box (Figure 3-45) enables you to:
♦ Add an SBX
♦ Delete an SBX
♦ Access the SBX Editor.
The Routine box contains the name of the selected SBX. The SBX routines box contains all avail-
able SBXs in the block. An asterisk preceding the SBX name indicates that it is in use.

83
B0193UZ – Rev A 3. SFC/ST Block Configurator

Click to add a new SBX.

Click to open SBX Editor window.

Click to delete selected SBX.

Click an SBX routine.

Figure 3-45. Routine Selection Dialog Box with SBX Routines

Editing SBX Routines in a Block


SBX routines must conform to the specifications in “Standard Block Exception (SBX) Handler”
on page 162.
To define SBXs, use the common toolbar and Edit menu functions, see “Common Toolbar and
Edit Menu Functions” on page 20.
The following Edit menu commands are specific to the SBX Editor.
Replace from Replaces the entire SBX routine with an SBX from a library block or
SBX. This comprises the following SBX elements:
♦ Operator Remark
♦ Comment
♦ SFC
♦ ST code for all steps and transitions.
The name of the original SBX routine is preserved.
Embed Replaces an SBX inclusion (#include) with a copy of the included
library SBX.

84
3. SFC/ST Block Configurator B0193UZ – Rev A

Clear Clears the entire SBX as described in Replace from above.


Print Select You can select All, SFC, Steps, Transitions, Comments or Operator
Remarks. If more than one version of the SBX has been saved, the His-
tory category is enabled. To print all the version history, click
History and All. To print the history for the latest versions, click
History and type the number of revisions you want to print.

Adding a Block SBX


To add a block SBX:
1. On the Editor menu, click Routine...
The Routine Selection dialog box (Figure 3-45) appears.
2. In the SBX routines list, click an SBX.
The name of the selected SBX appears in the Routine box. The system marks all SBXs
in use with an asterisk.
3. Click Add.
This adds the frame of the new SBX routine to the SFC/ST sequence block.
4. Click Edit.
The SBX Editor window (Figure 3-44) appears.
5. In the Operator Remark box, type a remark.
6. In the Comment box, type a comment.
7. Complete the SBX:
♦ For the SFC/ST Block Configurator, see “Step 4. Define SBX Routines” on
page 4.
♦ For the SFC/ST Library Configurator, see “Defining SBX Routines” on page 8.

Editing a Block SBX


To edit a block SBX:
1. On the Editor menu, click Routine....
The Routine Selection dialog box (Figure 3-45) appears.
2. In the SBX routines list, click an SBX.
The name of the selected SBX appears in the Routine box. The system marks all SBXs
in use with an asterisk.
3. Click Edit.
The SBX Editor window (Figure 3-44) appears.
4. In the Operator Remark box, edit the remark.
5. In the Comment box, edit the comment.
6. Complete editing the SBX:
♦ For the SFC/ST Block Configurator, see “Step 4. Define SBX Routines” on
page 4.
♦ For the SFC/ST Library Configurator, see “Defining SBX Routines” on page 8.

85
B0193UZ – Rev A 3. SFC/ST Block Configurator

Deleting a Block SBX


To delete a block SBX:
1. On the Editor menu, click Routine...
The Routine Selection dialog box (Figure 3-45) appears.
2. In the SBX routines list, click an SBX.
The name of the selected SBX appears in the Routine box. The system marks all SBXs
in use with an asterisk.
3. Click Delete.
The SFC/ST Sequence Block dialog box appears.
4. Click OK.
This deletes the entire SBX, including all SFC logic, from the SFC/ST block. In the
SBX routines list, the SBX name appears without a preceding asterisk.

Example
Figure 3-46 shows the SFC for the TO_INACTIVE SBX with the code for a step and transition.

Figure 3-46. SFC for TO_INACTIVE SBX

Subroutine Parameter Editor


The Subroutine Parameter Editor (Figure 3-47) enables you to edit the input and input/output
parameters of a subroutine. The title bar of the window contains the name of the current subrou-
tine for which the subroutine parameters are defined. The Input parameter and Input/Output
parameter lists display the existing parameters for the subroutine.

86
3. SFC/ST Block Configurator B0193UZ – Rev A

Click to edit or add a


parameter.

Click to edit or add a


parameter.

Type parameter name.

Click data type.


Type array dimensions.

Type operator remark.

Type comment.
Click Add, Modify, or
Delete to edit parameter
as desired.

Figure 3-47. Subroutine Parameter Editor

Editing Subroutine Parameters


Use the Subroutine Parameter Editor to edit the name, data type, array dimensions, operator
remark, and comment for a subroutine parameter. Subroutine parameters must conform to the
specifications in “Subroutines” on page 160.
To define subroutine parameters, use the common toolbar and Edit menu (see “Common Toolbar
and Edit Menu Functions” on page 20).

Adding a New Subroutine Parameter


To add a subroutine parameter:
1. Select a routine to edit:
♦ Select a block routine to edit (see “Selecting a Block Routine to Edit” on page 31).
♦ Select a library routine to edit (see “Selecting a Library Object to Edit” on
page 114).
2. On the Editor menu, click Subroutine Parameter.
The Subroutine Parameter Editor window (Figure 3-47) appears.

87
B0193UZ – Rev A 3. SFC/ST Block Configurator

3. To select the location for a new parameter definition in either the Input parameter or
Input/Output parameter list, click the parameter definition above the desired loca-
tion.
4. In the Name box, type a unique name.

NOTE
Do not use a keyword or already defined identifier.

5. In the Type box, click a data type.


6. In the Dimensions box, type the dimensions for an array.
7. In the Operator Remark box, type a remark.
8. In the Comment box, type a comment.
9. Click Add.
The new subroutine parameter definition appears in either the Input parameter or Input/Output
parameter list beneath the currently selected location in the list.

Modifying a Subroutine Parameter


To modify a subroutine parameter:
1. Select a routine to edit:
♦ Select a block routine to edit (see “Selecting a Block Routine to Edit” on page 31).
♦ Select a library routine to edit (see “Selecting a Library Object to Edit” on
page 114).
2. On the Editor menu, click Subroutine Parameter.
The Subroutine Parameter Editor window (Figure 3-47) appears.
3. In either the Input parameters or Input/Output parameters list, click an existing
subroutine parameter definition.
The system automatically copies the selected subroutine parameter definition to the
Name, Type, Dimensions, Operator Remark, and Comment boxes.
4. Modify the subroutine parameter definition as desired:
♦ In the Name box, edit the name.

NOTE
Do not use a keyword or already defined identifier.

♦ In the Type list, click a data type.


♦ In the Dimensions box, type the dimensions for an array.
♦ In the Operator Remark box, type a remark.
♦ In the Comment box, type a comment.
5. Click Modify.
The modified subroutine parameter definition appears in either the Input parameter or
Input/Output parameter list.

88
3. SFC/ST Block Configurator B0193UZ – Rev A

Deleting a Subroutine Parameter


To delete a subroutine parameter:
1. Select a routine to edit:
♦ Select a block routine to edit (see “Selecting a Block Routine to Edit” on page 31).
♦ Select a library routine to edit (see “Selecting a Library Object to Edit” on
page 114).
2. On the Editor menu, click Subroutine Parameter.
The Subroutine Parameter Editor window (Figure 3-47) appears.
3. In either the Input parameter or Input/Output parameter list, click an existing sub-
routine parameter definition.
The system automatically copies the selected subroutine parameter definition to the
Name, Type, Dimensions, Operator Remark, and Comment boxes.
4. Click Delete.
This deletes the selected subroutine parameter definition from either the Input parameter or
Input/Output parameter list.

Example
In the AGITATE sequence block, step ONOFF_AGIT calls the subroutine DRIVE to start the
agitator when the Mode is ON (true) as follows:
DRIVE :=(UNIT := ‘’, Device := AGITATOR, State := Mode);
UNIT, Device, and State are subroutine input parameters.

Protection Class Settings


To prevent a group of users from performing operations such as changing block mode and state,
the SFC/ST Block Configurator enables you to set a protection class for certain graphical objects
of the SFC/ST Display Manager (see Figure 3-48). A user group with the access level specified by
the protection class settings cannot select the operation buttons, options lists, and menu
commands protected with those settings.
During startup, the SFC/ST Display Manager (SFCDM) enables or disables these graphical
objects, depending on the access level setting of the current FoxView environment. For example,
if you set a protection class of 77 for the block mode, a user group with access level 77 cannot
select any of the block mode options.
The system stores the protection class settings in an ASCII file in the /usr/fox/customer/hi
directory. The default setting for each object is zero (unprotected).
You can print the protection class information, which is ASCII text, with tools available on the
Windows NT and Solaris platforms.

89
B0193UZ – Rev A 3. SFC/ST Block Configurator

Type protection
class for all modes.

Type protection
class for desired
modes.

Type protection
class for desired
objects.

Type a protection class for all objects.


Click to confirm your settings.

Figure 3-48. SFCDM Protection Class Setting Dialog Box

Editing Protection Class Settings


You set the protection class for the SFCDM graphical objects through the SFCDM Protection
Class Setting dialog box (Figure 3-48). Except for the menu commands, the names of the text
boxes in this dialog box correspond with the operation buttons and options lists in the SFC
Sequence Block window (Figure 5-9 on page 134).
You can change the protection class for each object, or you can set the protection class to the same
value for all objects at once.

Setting a Single Protection Class for All Objects


To set a single protection class for all objects:
1. On the File menu, click SFCDM Protection.
The SFCDM Protection Class Setting dialog box (Figure 3-48) appears.
2. In the Protection Class box of the Modify All group box, type the protection class
value.
3. Click OK.
This stores the setting in the protection class file. The settings take effect for the SFCDM at run
time.

90
3. SFC/ST Block Configurator B0193UZ – Rev A

Setting a Different Protection Class for Each Object


To set different protection classes for each object:
1. On the File menu, click SFCDM Protection.
The SFCDM Protection Class Setting dialog box (Figure 3-48) appears.
2. In the text boxes of the Single Setting group box, type the protection class values.

NOTE
Setting a protection class in the Block Mode box overwrites the individual settings
of the four block modes. If you want different values for any of the block modes
(AUTO, S-AUTO, MAN, or BMAN), type the value in the respective boxes.

3. Click OK.
This stores the setting in the protection class file. The settings will take effect for the SFCDM at
runtime.

Printing Configuration Data


In the SFC/ST Block Configurator, you can print all the block configuration data or editor
specific configuration data only.
In the SFC/ST Library Configurator, you can print all the configuration data or only editor
specific data for a library block, main routine, subroutine or SBX routine.
To print configuration data:
1. Configure the report.
2. Set up the printer.
3. Preview the printer output.
4. Print to a file or a printer.

Configuring the Report


The Report Configuration dialog box (Figure 3-49) enables you to select block data for printing
for the currently active editor. Table 3-3 lists the data you can print for each editor.
In the Block Configurator, the system enables the History check box when the Block Information
Editor is active and more than one version of the block has been compiled. In this case, you can
click all the check boxes.
In the Library Configurator, the system enables the History check box when the Block Informa-
tion Editor, Subroutine Editor or SBX Editor is active and more than one version of the library
object has been saved.

91
B0193UZ – Rev A 3. SFC/ST Block Configurator

Click to confirm your selections.

Select to enable print options for Select your print options for the
the active editor (see Table 3-3). active editor (see Table 3-3).

Figure 3-49. Report Configuration Dialog Box

Table 3-3. Configuration Data Print Options by Editor

Active Editor Print Data Options


Macro Macros Macros
Constant Constants Constants
Comments
Operator Remarks
User Label User labels User Labels
Comments
Operator Remarks
Block Information All block data All items

92
3. SFC/ST Block Configurator B0193UZ – Rev A

Table 3-3. Configuration Data Print Options by Editor (Continued)

Active Editor Print Data Options


Subroutine All data of the currently All
displayed subroutine SFC
Steps
Transitions
Variables
Subroutine Parameter
Comments
Operator Remarks
Scaling of SFC Output*
SBX All data for the currently All
displayed SBX SFC
Steps
Transitions
Comments
Operator Remarks
Scaling of SFC Output*
Subroutine Parameter Subroutine parameters of the Subroutine Parameters
currently displayed subroutine Comments
Operator Remarks
Variable Variables of the currently Variables
displayed routine Comments
Operator Remarks
SFC All data of the currently dis- SFC
played SFC
Step All data of the currently Steps
displayed step Comments
Operator Remarks
Transition All data of the currently Transitions
displayed transition Comments
Operator Remarks

* This box is available when one or more SFC check boxes are selected. If necessary, use this box to
change the size of the graphical output of SFC diagrams by modifying the scaling factor. This factor
changes the width and height of each printed diagram.

Selecting Configuration Data for Printing


To select the configuration data for printing:
1. On the File menu, click Print Select.
The Report Configuration dialog box (Figure 3-49) appears.
2. When the History category is enabled:
♦ To print all the version history, select the History check box and the All option.
♦ To print the history for the latest versions, select the History check box and type a
number in the Number of box.

93
B0193UZ – Rev A 3. SFC/ST Block Configurator

3. In the Categories and Related Information group boxes, select the appropriate
check boxes for the active editor.
For example, select the All, Comments, and Operator Remarks check boxes to print all
data for the subroutine currently displayed by the Subroutine Editor.
4. To change the size of the graphical output of SFC diagrams, modify the scale factor in
the Scaling of SFC Output box.
The scale factor changes the width and height of each printed diagram.

NOTE
The Scaling of SFC Output box is available when you select one or more SFC check
boxes.

5. Click OK.
This saves your report configuration and closes the dialog box.

Printing on Windows NT Workstations


On 70 Series (Windows NT) workstations, you have the option to:
♦ Set up a printer (see “Setting Up a Printer” on page 94)
♦ Preview the printer output (see “Previewing a Printed Report” on page 95)
♦ Print to a printer (see “Printing to a Printer” on page 96)
♦ Print to a file (see “Printing to a File” on page 97).

Setting Up a Printer
The Print Setup dialog box (Figure 3-50) enables you to set up the printer. It also provides access
to the Connect to Printer and Document Properties dialog boxes.

94
3. SFC/ST Block Configurator B0193UZ – Rev A

Click a printer name.


Click to set document
properties.

Click paper size.

Select paper orientation.

Click paper source.

Click to connect to a Click to confirm your


network printer. selections.
Figure 3-50. Print Setup Dialog Box

To set up a printer:
1. On the File menu, click Print Setup.
The Print Setup dialog box (Figure 3-50) appears.
2. In the Name list, click the desired printer.
3. In the Size list, click the paper size.
4. In the Source list, click the paper source.
5. In the Orientation group box, click Portrait or Landscape.
6. To set the printer properties, click Properties.
The Document Properties dialog box appears. Set the document properties as desired.
7. To connect to a network printer, click Network.
The Connect to Printer dialog box appears. Select the network printer that you want
to use.
8. Click OK.
This saves your settings and closes the dialog box.

Previewing a Printed Report


To preview the printed report on a Windows NT or Solaris workstation:
1. On the File menu, click Print Preview.
The Print Preview dialog box (Figure 3-51) appears.

95
B0193UZ – Rev A 3. SFC/ST Block Configurator

Click to print report.


Click to view next page.
Click to view previous page.
Click to view two pages.
Click to magnify page.
Click to reduce page.

Figure 3-51. Print Preview Dialog Box for Windows NT Workstation

2. To scroll the report, click Next Page or Previous Page.


3. To view two consecutive pages together, click Two Page.
This allows you to view a complete SFC when it consists of two pages.
4. To magnify or reduce the page size, click Zoom In or Zoom Out.
5. To print the report, click Print.
This sends the report to the printer and closes the dialog box.

Printing to a Printer
The Print dialog box (Figure 3-54) enables you to print to a printer. It also provides access to the
Document Properties and Print to File dialog boxes.

96
3. SFC/ST Block Configurator B0193UZ – Rev A

Click a printer name.


Click to set document
properties.

Select to print to a file.

Click to confirm your


selections.

Figure 3-52. Print Dialog Box

To print to a printer:
1. On the File menu, click Print.
The Print dialog box (Figure 3-52) appears.
2. In the Name list, click a printer.
3. Click OK.
This prints the selected, editor-specific, configuration data to the designated printer.

Printing to a File
The Print to File dialog box (Figure 3-53) enables you to print the report to a file, which you can
later print to a printer from the Command Prompt window.

97
B0193UZ – Rev A 3. SFC/ST Block Configurator

Click a folder.

Type filename.

Click to print report


to the file.

Figure 3-53. Print to File Dialog Box

To print to a file:
1. On the File menu, click Print.
The Print dialog box (Figure 3-52) appears.
2. Select the Print to file check box.
3. Click OK.
The Print to File dialog box (Figure 3-53) appears.
4. In the Save in list, click the source drive and folder name.
5. In the File Name box, type the output filename.
6. Click Save.
This prints the selected, editor-specific, configuration data to the designated file.

Printing on Solaris Workstations


On 50 Series (Solaris) workstations, you have the option to:
♦ Set up a printer (see “Setting Up a Printer” on page 98)
♦ Preview the printer output (see “Previewing a Printed Report” on page 95)
♦ Print to a printer (see “Printing to a Printer” on page 100)
♦ Print to a file (see “Printing to a File” on page 100).
♦ Print to a generic file (see “Printing to a Generic File” on page 101).

Setting Up a Printer
The Printer Setup dialog box (Figure 3-54) enables you to set up the printer. It also provides
access to the Options and Printer Installation dialog boxes.

98
3. SFC/ST Block Configurator B0193UZ – Rev A

Click to send
output to printer.

Click a printer.

Type scale
(1.0 = 100%).

Type number
of copies.

Select page
orientation.

Click to install a printer.


Click to set printer options.
Click to exit printer setup.
Click to restore previous settings.
Click to save settings.
Figure 3-54. Printer Setup Dialog Box

To set up a printer:
1. On the File menu, click Print Setup.
The Printer Setup dialog box (Figure 3-54) appears.
2. Click Printer Specific.
3. In the Printer list, click a printer.
4. In the Orientation group box, click Portrait or Landscape.
5. In the Scale box, type the desired scale (1.00 = 100%).
6. In the Copies box, type the number of report copies.
7. To set the printer options, click Options .
The Options dialog box appears. Set the printer options as desired.
8. To add a printer, click Install.
The Printer Installation dialog box appears. Add the printer you want to use.
9. To restore the previously saved settings, click Reset.
10. Click Save.
This saves your settings and closes the dialog box.

99
B0193UZ – Rev A 3. SFC/ST Block Configurator

Printing to a Printer
The Print dialog box (Figure 3-55) enables you to print to a printer. It also provides access to the
Printer Setup and Print to File dialog boxes.

Click to confirm
your selections.

Click to set up
printer.

Type number
of copies.

Click to print to a file.


Click a print quality.
Click to collate copies.
Figure 3-55. Print Dialog Box for Solaris System

To print to a printer:
1. On the File menu, click Print.
The Print dialog box (Figure 3-55) appears.
2. In the Print Quality list, click the desired print resolution.
3. In the Copies box, type the desired number of copies.
4. To collate the copies, click Collate Copies.
5. Click OK.
This prints the selected, editor-specific, configuration data to the designated printer.

Printing to a File
The Print to File dialog box (Figure 3-56) enables you to print the report to a file, which you can
later print to a printer by command from the VT100 window.

100
3. SFC/ST Block Configurator B0193UZ – Rev A

Type a filename. Click to confirm your selections.

Click a directory.

Figure 3-56. Print to File Dialog Box

To print to a file:
1. On the File menu, click Print.
The Print dialog box (Figure 3-55) appears.
2. Click Print to file.
3. Click OK.
The Print to File dialog box (Figure 3-56) appears.
4. In the File name box, type the output file name.
5. In the Directories box, click the storage directory.
6. Click OK.
This prints the selected, editor-specific, configuration data to the designated file.

Printing to a Generic File


The Printer Setup dialog box (Figure 3-57) enables you to print the report to a file, which you can
later print to a printer by command from the VT100 window.

101
B0193UZ – Rev A 3. SFC/ST Block Configurator

Click to send
output to a file.

Click to select
printer commu-
nication mode.
Type output
filename.
Type scale
(1.0 = 100%).

Type number
of copies.

Click page
orientation.

Click to restore previous settings.


Click to print report to the file.
Figure 3-57. Printer Setup Dialog Box with Generic File Options

To print to a generic file:


1. On the File menu, click Print Setup.
The Printer Setup dialog box (Figure 3-54) appears.
2. Click Generic (File Only).
This displays the printer communication mode button at the top right of the dialog
box.
3. Click the printer communication mode button and click EPSF, PCL 4, or PCL 5 from
the list.
4. In the File Name box, type the output filename.
5. To specify the page orientation, click Portrait or Landscape.
6. In the Scale box, type the desired scale (1.00 = 100%).
7. In the Copies box, type the number of report copies.
8. To restore the previously saved settings in the dialog box, click Reset.
9. Click Save.
This prints the selected, editor-specific, configuration data to the designated file.

102
3. SFC/ST Block Configurator B0193UZ – Rev A

Compiling and Installing the SFC/ST Sequence Block


After you finish configuring the SFC/ST sequence block, compile the block. When the compila-
tion is successful, install the block.
To compile and install the SFC/ST sequence block:
1. On the File menu, click Compile.
This validates every SFC in the block (see “Validating SFC Structure” on page 56),
and then sequentially invokes the SFC/ST and HLBL compilers. A message in the
SFC Sequence Block dialog box notifies you when the two-stage compilation is suc-
cessful. If compilation errors exist in either of the compilers, the Compile dialog box
(Figure 3-58) appears.

Click to print error message.


Click to continue.

Figure 3-58. Compile Dialog Box

The Compile dialog box displays the error message(s) of the SFC/ST compiler. If a
block is successfully compiled by the SFC/ST compiler, the system passes it to the
HLBL compiler. If the HLBL compiler detects any problems, the system displays the
entire HLBL list file (*.l) within the Compile dialog box.

TIP
Save time while editing (correcting errors) by keeping the Compile dialog box open
to display the result of the last compilation. Once closed, choosing Compile Errors
from the View menu opens the Compile dialog box. You can print the contents of
the Compile dialog box by clicking the Print button.

2. After the sequence block is successfully compiled, click Done on the File menu.
The Version Information dialog box (Figure 3-59) appears and displays the system-
generated version number and the current date and time, which you cannot change.
You can enter the author’s name and any comment.

103
B0193UZ – Rev A 3. SFC/ST Block Configurator

Type author’s name.

Type comments.
Click to exit the
SFC/ST Configurator.

Figure 3-59. Version Information Dialog Box

3. In the Author box, type your name as the author of the current sequence block
configuration.
4. In the Comment box, type your comments.
5. Click OK.
This installs the sequence block in the calling program (for example, the ICC) and exits the
SFC/ST Configurator.
The system only enables Done in the ICC when the block has been compiled without any errors.

104
4. SFC/ST Library Configurator
This chapter describes the SFC/ST Library Configurator graphical user interface including the
drop-down menus and editor windows. It also describes how to configure SFC/ST library
objects using the available editors and existing library objects.
The SFC/ST Library Configurator enables you to graphically build sequence logic library objects
using language element specific editors. You can build sequence blocks, main routines, subrou-
tines, and SBX routines and save them in files for use in developing new sequence blocks.
For example, you can build a library sequence block. First, you create the SFC diagram for the
main routine. Then you edit the statements of the SFC steps and transitions using variables, con-
stants, and calls to macros, subroutines, and Standard Block Exception Handlers (SBXs), all of
which you create using specific editors. You can also call predefined functions and function blocks
by name while providing the required arguments.
When building library objects, you can use logic from other library objects.
The SFC/ST Library Configurator provides:
♦ Saving of sequence logic library objects for later use
♦ Main routine configuration with SFC and ST
♦ Step specification with ST
♦ Transition specification with ST
♦ Function blocks to operate on data or alter the flow of control
♦ Functions to operate on data
♦ Subroutine configuration with SFC and ST
♦ Standard Block Exception (SBX) handler configuration with SFC and ST
♦ Macros to facilitate the reuse of ST code snippets by name
♦ Constants, variables, and user labels
♦ Inclusion of library blocks and routines
♦ File inclusion to handle collections of #defines and declarations
♦ Operator remarks
♦ Sequence logic version control with full history of sequence editing available to view
or print out
♦ Printed documentation for SFC graphical structures, steps, transitions, and
comments.
Sequences can have up to 100 parallel alternative steps/transitions in the graphical structures and
a maximum of 127 steps. The functional content of these steps is restricted only by the memory
available for the sequence block; a maximum of 32 KB is available for each block, equating to sev-
eral thousands lines of code.
The graphical user interface (GUI) of the SFC/ST Library Configurator is based on the Microsoft
User Interface Design Guide, especially the chapter on “Multiple Document Interface (MDI)
Applications.” See “Overview of Graphical User Interface” on page 18.

105
B0193UZ – Rev A 4. SFC/ST Library Configurator

SFC/ST Library Configurator Window Elements


When you click Sfc_lib_Cfg in the FoxView Config menu, the SFC/ST Library Configurator
parent window opens (Figure 4-1).

Title Bar
Menu Bar

Toolbar

Child Window

Child Window
Display Area
Status Bar

Figure 4-1. SFC/ST Library Configurator – Parent Window

When you select a new or existing library object for configuration, only the associated child
window is initially active. For example, if you select a block, only the Block Information window
opens. To configure the sequence logic, you must activate the different editors.
Similar to the SFC/ST Block Configurator, the parent window consists of the:
♦ Title bar
♦ Menu bar
♦ Toolbars
♦ Child window area
♦ Status bar.
Title Bar
The title bar contains a description of the library object to be configured.

106
4. SFC/ST Library Configurator B0193UZ – Rev A

Menu Bar
The menu bar contains the drop-down menu titles. The commands within the menus are enabled
or disabled according to the currently allowed functions in a certain situation. In general, the
menu commands are enabled and disabled depending on the active child window.
Toolbar Section
The toolbar section contains docked toolbars. Available toolbars are:
Common Toolbar Contains buttons for common
functions, such as Cut, Copy, Paste
or Undo.
SFC Toolbar Visible only when the SFC Editor
is active. This toolbar contains
buttons for SFC editing functions,
such as inserting steps or transitions.

Child Window Display Area


The child window display area contains all child windows, independent of whether they are min-
imized or not. Every available editor appears as a child window.
Status Bar
The status bar contains contextual information for menu commands and toolbar buttons.

Common Toolbar and Edit Menu Functions


Similar to the SFC/ST Block Configurator, the common toolbar, located at the top left corner of
the parent window, shares many functions with the Edit drop-down menu (see Figure 4-2).

Figure 4-2. Common Toolbar and Edit Menu

Table 3-1 lists the common toolbar buttons, Edit menu commands, and their functions. It details
those functions that are highly editor specific, particularly for the SFC Editor. It also lists the edi-
tors in which these buttons and commands are enabled.

107
B0193UZ – Rev A 4. SFC/ST Library Configurator

Drop-Down Menus
The drop-down menus are selectable from the menu bar at the top of the parent window.
Figure 4-2 shows the Edit menu dropped down from the menu bar. When a menu command is
highlighted, you can select it for use in the currently active editor.
The available menus are:
File Contains menu commands referring to the library object and print functions.
Edit Contains menu commands referring to the active child window.
View Contains menu commands to switch the toolbar and status bar on or off.
Editor Contains menu commands to activate the different editors.
Symbols Contains menu commands to insert symbols into the statements of a step or
into the condition of a transition. Symbols is only displayed when the Step Edi-
tor or the Transition Editor is active.
Window Contains menu commands to arrange and close child windows.
Help Contains menu commands to activate Help functions.

File Menu
Figure 4-3 shows the File menu.

Figure 4-3. File Menu

108
4. SFC/ST Library Configurator B0193UZ – Rev A

The File menu commands and their functions are:


New DEP Invokes the Block Information window for editing a new DEP block
library object. If another library object is open, you must first confirm its
closing.
New IND Invokes the Block Information window for editing a new IND block library
object. If another library object is open, you must first confirm its closing.
New EXC Invokes the Block Information window for editing a new EXC block library
object. If another library object is open, you must first confirm its closing.
New Main Invokes the Block Information window for editing a new main routine
library object. If another library object is open, you must first confirm its
closing.
New Subroutine Invokes the Subroutine Name dialog box for naming a new subroutine
library object. If another library object is open, you must first confirm its
closing.
New SBX Invokes the SBX Selection dialog box for selecting a new SBX
routine library object. If another library object is open, you must first
confirm its closing.
Open... Displays the Open dialog box for selecting a library object to open for
editing.
Save Displays the Save As dialog box for storing a new library block, main
routine, subroutine, or SBX routine in any state and without syntax
checking. If the library object is not new, the Version Information dialog
box opens instead of the Save As dialog box. See following Note on file
location.
Save As... Displays the Save As dialog box for copying a library block, main routine,
subroutine, or SBX routine in any state and without syntax checking. See
following Note on file location.
Save Rou- Displays the Save As dialog box for storing a block routine as a library
tine... object while automatically adding the appropriate file extension for the
currently active view. It is only enabled if the currently active view is the
block, subroutine, or the SBX view and the routine of the currently active
view is not included. See following Note on file location.
Delete... Displays the Delete from Library dialog box for deleting a library object,
which is stored in several files. See following Note on file location.
Include... Displays the Open dialog box for selecting a library object to include in a
block or block library object.
Syntax Check Validates the Sequential Function Chart(s) of the library object currently
being edited and then performs an ST syntax check on it.
History Displays the History dialog box for reviewing block modification data. This
dialog box displays a list of versions including version dates and authors.
Print Prints data for the currently active editor according to the current print
selections made by using Print Select from the File menu. Print uses the
print settings chosen by using Print Setup from the File menu. The printed
data depends on the editor from which Print was selected.

109
B0193UZ – Rev A 4. SFC/ST Library Configurator

Print Setup... Displays the standard Print Setup dialog box for specifying settings such as
paper format and number of copies.
Print Displays the Print Select dialog box for selecting block data for the
Select... currently active editor for printing.
Print Preview Displays the standard Print Preview dialog box for previewing the data to
be printed.

NOTE
A library object can be addressed by selecting only the
<object_name>.k/.km/.ks/.kx file. All related files must be located in the same
folder where they are handled automatically.

Edit Menu
The Edit menu (Figure 4-2) shares many functions with the common toolbar, located at the top
left corner of the parent window. The Edit menu commands depend on the currently active
editor.
For a list of available commands within each editor and the editor-related behavior of the
commands, see Table 3-1 and the specific sections for each editor.

View Menu
Figure 4-4 shows the View menu.

Figure 4-4. View Menu

The View menu commands and their actions are:


Toolbar Switches the toolbar area on or off.
Status Bar Switches the status bar on or off.
Syntax Check Displays the Syntax Check dialog box containing the list of ST syntax
Errors errors detected by the SFC/ST syntax checker.

110
4. SFC/ST Library Configurator B0193UZ – Rev A

Editor Menu
Use the editors that you can select from the Editor menu (Figure 4-5) to create the sequence logic
of the SFC/ST sequence block.

Figure 4-5. Editor Menu

Availability of the last five menu items depends on whether the Block Information (main rou-
tine), Subroutine, or SBX Editor is active. Click Routine… in the Editor menu and select the rou-
tine to edit from the Routine Selection dialog box.
The Editor menu commands and their functions are:
Routine... Opens the Routine Selection dialog box for selecting a routine to edit
or administer, or invokes the Routine dialog box for renaming a
routine.
Macro Opens the Macro Editor window to edit block global macros.
Constant Opens the Constant Editor window to edit block global symbolic
constants.
User Label Opens the User Label Editor window to edit block global user labels.
Block Variable Opens the Variable Editor window to edit block global variables.
Subroutine Parameter Opens the Subroutine Parameter Editor window to edit subroutine
parameters, that is, arguments of a subroutine.
Subroutine Variable Opens the Variable Editor window to edit variables of a subroutine.
SFC Opens the SFC Editor window to edit the SFC of the main routine,
subroutines, or SBX routines.
Step Opens the Step Editor window to edit the steps of the main routine,
subroutines, or SBX routines.
Transition Opens the Transition Editor window to edit the transitions of the
main routine, subroutines, or SBX routines.

111
B0193UZ – Rev A 4. SFC/ST Library Configurator

Symbols Menu
The Symbols menu (Figure 4-6) appears only when the Step Editor or the Transition Editor is
active. This menu contains commands to insert symbols into the:
♦ Statements of a step
♦ Conditions of a transition.

Figure 4-6. Symbols Menu

The Symbols menu commands and their functions are:


Functions Displays the Symbols dialog box for inserting the calling syntax of an
available function at the cursor position in the step’s statement list (Step
Editor) or the transition’s condition (Transition Editor).
Function Displays the Symbols dialog box for inserting the calling syntax of an avail-
Blocks able function block at the cursor position in the step’s statement list (Step
Editor).
Subroutines Displays the Symbols dialog box for inserting the calling syntax of an
available subroutine at the cursor position in the step’s statement list (Step
Editor).

Window Menu
Figure 4-7 shows the Window menu.

Figure 4-7. Window Menu

The Window menu commands and their functions are:


Cascade Cascades all open windows that are not minimized.
Tile Places all open windows, that are not minimized, side by side.
Arrange Icons Arranges all icons in the parent window’s lower left corner.
Close Closes the active editor window. The Block Information Editor window
cannot be closed.

112
4. SFC/ST Library Configurator B0193UZ – Rev A

Close all Closes all editor windows except the editor (Block Information,
Subroutine Editor or SBX Editor) of the library object being edited.
<Recent window> Activates the selected editor window.

Help Menu
Figure 4-8 shows the Help menu.

Figure 4-8. Help Menu

The Help menu commands and their functions are:


Index Opens the Index tab of the Help Topics window.
Using Help Opens the Using Help window, which provides topics about using and
customizing the help system.
About Opens the About window which provides the software version of the SFC/ST
Configurator.

Editor Operations
The editors in the SFC/ST Library Configurator are similar to those in the SFC/ST Block Con-
figurator. This section describes general procedures for using these editors to configure SFC/ST
library objects, and refers you to sections in Chapter 3 “SFC/ST Block Configurator” for details.
This section describes detailed procedures only for those operations that are specific to the
SFC/ST Library Configurator.

Routine and Block Inclusion Concept


You can store SFC sequence blocks, main routines, subroutines, and SBX routines in library files
for later use in SFC/ST sequence blocks by referencing the library file using the #include directive
(link), or by inserting them from the library. During compilation, any source code line of the
form #include <file_name> is replaced by the contents of the <file_name> file. You can include a
whole block in this way.
For more information, see “Routine and Block Inclusion Concept” on page 28.

Using Existing SFC/ST Sequence Logic


When configuring SFC/ST library objects, you can use sequence logic from existing library
objects. You can also use logic from existing include files.
The SFC/ST Library Configurator allows you to build a library of sequence objects that you can
reuse. You can build sequence blocks, MAIN routines, subroutines, and SBX routines and save
them in files for use in developing new sequence blocks.

113
B0193UZ – Rev A 4. SFC/ST Library Configurator

The configurator allows you to use include files for constants, variables, user labels, and macros.
In a large configuration, it may be easier to use include files for these elements.

Common Functions
For using existing sequence logic, Table 4-1 lists the functions that are common to the SFC/ST
Block and Library Configurators and refers you to the appropriate sections in Chapter 3 “SFC/ST
Block Configurator” for details.

Table 4-1. Functions Common to Block and Library Configurators – Using Existing Logic

Function Description
Including Objects In an SFC/ST sequence block, you can include a block, main routine,
subroutine or SBX routine from a library.
See “Including a Library Object” on page 32.
Embedding If a block, subroutine or SBX routine is included from a library file, you
Inclusions can replace the inclusion with a copy of the library object.
See “Embedding an Included Block or Routine” on page 34.
Replacing For an active Block Information Editor, you can choose to replace the
Definitions block or main routine definitions with those from a library object. For
any other active editor window, you can replace editor-specific
definitions with those from a library object.
See “Replacing Definitions from Library” on page 34.
Saving Routines For a sequence block, you can save the sequence logic of the main
routine or a subroutine or SBX routine as a library object.
See “Saving a Routine in a Library” on page 39.
Deleting Objects You can delete a block, main routine, subroutine or SBX routine from a
library.
See “Deleting a Library Object” on page 40.
Adding Include Files You can add data include files for the Macro, Constant, User Label, and
Variable Editors. File inclusion of data definitions makes it easy to
handle collections of #defines.
See “Using Include Files” on page 42.
Viewing Version You can view the version history for a SFC/ST block or library object.
History See “Viewing Version History” on page 45.

Selecting a Library Object to Edit


In the SFC/ST Library Configurator, you can select four types of library objects to edit:
♦ Block <file_name>.k
♦ Main routine <file_name>.km
♦ Subroutine <file_name>.ks
♦ SBX routine <file_name>.kx.
The Open dialog box (Figure 4-9) enables you to view all the library objects in the system. Use
this dialog box to find and select a library object file to edit.

114
4. SFC/ST Library Configurator B0193UZ – Rev A

Click for file details.

Click sequenlibrary.

Click a file.

Click to confirm your


selection.

Click a file type.

Figure 4-9. Open Dialog Box with Subroutine Files

To select a library object to edit:


1. On the File menu, click Open.
The Open dialog box (Figure 4-9) appears.
2. In the Look in folder (directory) box, click the source drive.
3. In the list of folders, double-click a folder until the desired folder appears in the
Look in box.

NOTE
The default folder is /opt/fox/ciocfg/sequenlibrary, but library objects can be in any
folder.

4. In the Files of type box, click the desired type of files to list.
5. In the list of files, click the desired filename.
The filename appears in the File name box.
6. Click Open.
The editor window for the selected block or routine appears.

Copying a Library Object


In the SFC/ST Library Configurator, you can copy a block, main routine, subroutine, or SBX
routine via the Save As dialog box (Figure 4-10). All related files must be located in the same
folder where they are handled automatically. A library object can be addressed by selecting only
the <object_name>.k/.km/.ks/.kx file.

115
B0193UZ – Rev A 4. SFC/ST Library Configurator

Click sequenlibrary.

Type routine name.

Click to save file.

Click routine type.


Figure 4-10. Save As Dialog Box with Subroutine Files

To copy a library object:


1. Open the library object that you want to copy (see “Selecting a Library Object to
Edit” on page 114).
2. On the File menu, choose Save As.
The Save As dialog box (Figure 4-10) appears.
3. In the Save in folder (directory) box, click the source drive.
4. In the list of folders, double-click a folder until the desired folder appears in the
Save in box.

NOTE
The default folder is /opt/fox/ciocfg/sequenlibrary, but you can save library objects
in any folder.

5. In the File name box, type the object name.

NOTE
The system displays the file type for the active editor in the Save as type box. The
system automatically adds the appropriate .k/.km/.ks/.kx extension to the file name
when saving the routine.

6. Click Save.

116
4. SFC/ST Library Configurator B0193UZ – Rev A

The Version Information dialog box (Figure 4-11) appears.

Type author’s name.

Type comments.
Click to exit the
SFC/ST Configurator.

Figure 4-11. Version Information Dialog Box

7. In the Author box, type the name of the author.


8. In the Comment box, type a comment.
9. Click OK.
This saves a copy of the object in the library using the <object_name>.k/.km/.ks/.kx filename.

Common Editor Operations


Table 4-2 lists the editor operations that are common to both the SFC/ST Block and Library
Configurators and refers you to sections in Chapter 3 “SFC/ST Block Configurator” for details.

Table 4-2. Editor Operations Common to Block and Library Configurators

Editor Description
Block Information When you add a new library block or main routine, the Block
Editor Information window is visible in the SFC/ST Library Configurator
parent window (see “Block Information Editor” on page 46).

For block configuration procedures, see the following:


♦ “Overview of Library Object Configuration Procedures” on
page 7
♦ “Block Configuration” on page 46
♦ “Editing Block Information” on page 47.
SFC Editor Enables you to graphically edit the Sequential Function Charts for
main routines, subroutines and SBX routines.
See “SFC Editor” on page 47 and its subsections.
Step Editor Enables you to edit the ST statements of steps in main routines,
subroutines and SBX routines.
See “Step Editor” on page 57 and its subsections.
Transition Editor Enables you to edit the ST condition of transitions in main routines,
subroutines and SBX routines.
See “Transition Editor” on page 64 and its subsections.

117
B0193UZ – Rev A 4. SFC/ST Library Configurator

Table 4-2. Editor Operations Common to Block and Library Configurators (Continued)

Editor Description
Constant Editor Enables you to edit block global symbolic constant definitions usable in
the main routine, subroutines, and SBX routines.
See “Constant Editor” on page 67 and its subsections.
Variable Editor Enables you to edit the variables of main routines and subroutines.
See “Variable Editor” on page 69 and its subsections.
User Label Editor Enables you to edit block global user label definitions in the main
routine, subroutines and SBX routines.
See “User Label Editor” on page 73 and its subsections.
Macro Editor Enables you to edit macro definitions in the main routine, subroutines
and SBX routines.
See “Macro Editor” on page 75 and its subsections.
Subroutine Editor Enables you to display and edit data that is global to a block subroutine,
including the operator remark and comment (see “Subroutine Editor”
on page 78).
For block subroutine configuration procedures, see the following:
♦ “Defining Subroutines” on page 8
♦ “Routine Selection Dialog Box for Subroutines” on page 78
♦ “Editing Subroutines in a Block” on page 79 and its subsections.
SBX Editor Enables you to display and edit data that is global to a block SBX
routine, including the operator remark and comment (see “SBX Editor”
on page 83).

For block SBX configuration procedures, see the following:


♦ “Defining SBX Routines” on page 8
♦ “Routine Selection Dialog Box for SBX Routines” on page 83
♦ “Editing SBX Routines in a Block” on page 84 and its
subsections.
Subroutine Enables you to edit the input and input/output parameters of a
Parameter Editor subroutine.
See “Subroutine Parameter Editor” on page 86 and its subsections.
Printing For a library block, main routine, subroutine or SBX routine, you can
Configuration Data print all the configuration data or only editor specific data.
See “Printing Configuration Data” on page 91 and its subsections.

SFC/ST Library Configurator Specific Functions

Adding a Library Block


To add a new library block:
1. On the File menu, point to New and click DEP, IND or EXC.
The Block Information window (Figure 3-23) appears.
2. Complete the block information (see“Editing Block Information” on page 47).
To configure an entire block, see “Adding a Library Block or Main Routine” on page 7.

118
4. SFC/ST Library Configurator B0193UZ – Rev A

Editing a Library Block


To edit a library block:
1. Select a library block to edit (see “Selecting a Library Object to Edit” on page 114).
The Block Information window (Figure 3-23) appears.
2. Complete the block information (see “Editing Block Information” on page 47).
To edit the block, see “Overview of Library Object Configuration Procedures” on page 7.

Adding a Library Main Routine


To add a new library main routine:
1. On the File menu, point to New and click Main.
The Block Information window (Figure 3-23) appears.
2. Complete the block information (see “Editing Block Information” on page 47).
3. Complete the main routine configuration
To configure an entire main routine, see “Defining the Main Routine” on page 7.

Editing a Library Main Routine


To edit a library main routine:
1. Select a library main routine to edit (see “Selecting a Library Object to Edit” on
page 114).
The Block Information window (Figure 3-23) appears.
2. Complete the block information (see “Editing Block Information” on page 47).
To edit the main routine, see “Defining the Main Routine” on page 7.

Adding a Library Subroutine


To add a library subroutine:
1. On the File menu, point to New and click Subroutine.
The Subroutine Name dialog box (Figure 4-12) appears.

Figure 4-12. Subroutine Name Dialog Box

2. Type the subroutine name in the box.

NOTE
Do not use a keyword or already defined identifier.

119
B0193UZ – Rev A 4. SFC/ST Library Configurator

3. Click OK.
The Subroutine Editor window (Figure 3-41) appears.
4. In the Operator Remark box, type a remark.
5. In the Comment box, type a comment.
To configure an entire subroutine, see “Defining Subroutines” on page 8.

Editing a Library Subroutine


To edit a library subroutine:
1. Select a library subroutine to edit (see “Selecting a Library Object to Edit” on
page 114).
The Subroutine Editor window (Figure 3-41) appears.
2. In the Operator Remark box, type a remark.
3. In the Comment box, type a comment.
To configure an entire subroutine, see “Defining Subroutines” on page 8.

Adding a Library SBX


To add a library SBX:
1. On the File menu, point to New and click SBX.
The SBX Selection dialog box appears.

Figure 4-13. SBX Selection Dialog Box

2. Click an SBX in the list of SBXs.


3. Click OK.
The SBX Editor window (Figure 3-44) appears.
4. In the Operator Remark box, type a remark.
5. In the Comment box, type a comment.
To configure an entire SBX, see “Defining SBX Routines” on page 8.

120
4. SFC/ST Library Configurator B0193UZ – Rev A

Editing a Library SBX


To edit a library SBX:
1. Select a library SBX to edit (see “Selecting a Library Object to Edit” on page 114).
The SBX Editor window (Figure 3-44) appears.
2. In the Operator Remark box, type a remark.
3. In the Comment box, type a comment.
To configure an entire SBX, see “Defining SBX Routines” on page 8.

Checking Syntax
To check the syntax of a library object:
1. On the File menu, click Syntax Check.
The Syntax Error dialog box displays any error messages.
2. Correct any syntax errors and recheck the syntax until no errors are reported.

Saving an Object in a Library


The Save As dialog box (Figure 4-10) enables you to save the sequence logic of a block, main rou-
tine, subroutine, or SBX routine in any state and without syntax checking. All related files are
saved automatically in the same folder. A library object is addressable by selecting only the
<object_name>.k/.km/.ks/.kx file.
To save an object in a library:
1. On the File menu, click Save.
The Save As dialog box (Figure 4-10) appears when saving a new object. Otherwise,
the Version Information dialog box appears (see Step 5).
2. In the Save in folder (directory) box, click the source drive.
3. In the list of folders, double-click a folder until the desired folder appears in the
Save in box.

NOTE
The default folder is /opt/fox/ciocfg/sequenlibrary, but you can save library objects
in any folder.

4. In the File name box, type the object name.

NOTE
The system displays the file type for the active editor in the Save as type box. The
system automatically adds the appropriate .k/.km/.ks/.kx extension to the file name
when saving the object.

5. Click Save.
The Version Information dialog box (Figure 4-11) appears.
6. In the Author box, type the name of the author.

121
B0193UZ – Rev A 4. SFC/ST Library Configurator

7. In the Comment box, type a comment.


8. Click OK.
This saves the object in the library under the <object_name>.k/.km/.ks/.kx filename.

122
5. SFC/ST Display Manager
This chapter describes the SFC/ST Display Manager graphical user interface including the
drop-down menus and display windows. It also describes how to operate the SFC/ST Display
Manager to view sequence block data during run time and to perform certain block operations.

Overview
The SFC/ST Display Manager enables the operator to view SFC/ST sequence block data during
run time and to perform certain block operations.
The SFC/ST Display Manager enables the operator to view the following sequence block data:
♦ SFCs of the main routine, subroutines, and SBXs with highlighting of the active step
or transition(s).
♦ ST statements of steps
♦ Transition conditions with periodically updated operand values
♦ Constant definitions
♦ User label definitions with periodically updated values
♦ Variable definitions
♦ Operator remarks for any SFC/ST element
♦ ST-Trace information, for example, the currently active ST statement of a step
♦ Block state (ACTIVE or INACTIVE)
♦ Block Paused state (DEP blocks only)
♦ Block Suspend state
♦ Block mode (AUTO, S-AUTO, MAN, BMAN)
♦ Block errors.
The operator can perform the following operations:
♦ Block state changes (ACTIVE, INACTIVE)
♦ Block mode changes (AUTO, S-AUTO, MAN, BMAN)
♦ Stepping through the steps and transitions of the main routine in the S-AUTO and
MAN modes
♦ Redirection of the control flow in the main routine in the MAN mode
♦ Tracing through the ST code of steps and transitions (one statement at a time) in
BMAN mode
♦ Suspension Acknowledgement for resuming execution of the block
♦ Acknowledgement of all current block alarms.
Protection class settings lock access to operation buttons, options lists, and menu commands to
prevent certain users from performing one or more of the above operations.

123
B0193UZ – Rev A 5. SFC/ST Display Manager

Locking of graphical objects depends on the access level setting of the current FoxView environ-
ment. A user group with the access level specified by the protection class settings cannot select the
objects protected with that setting.
The graphical user interface (GUI) of the SFC/ST Display Manager is based on the Microsoft User
Interface Design Guide. For more information, see “Overview of Graphical User Interface” on
page 18.

Block Modes
In this document, block mode refers to the modes described in Table 5-1, not to the MA parame-
ter. These modes comply with the mode proposals in ISA-S88.01. Table 5-1 describes the block
modes and shows the relation between the block mode and the MA and STEPMD parameters of
a sequence block.

Table 5-1. Block Mode for MA and STEPMD Values

STEPMD
Block Mode Description MA Value Value
AUTO This mode executes the steps and transitions without 1 0
interruption. You may not force transitions.
S-AUTO This mode executes the steps and transitions upon 1 1
manual Execute commands. You may not force
transitions. The Execute command is only enabled in
the main routine.
MAN This mode is similar to the S-AUTO mode. Addition- 1 1
ally, you can choose the step or transition(s) to be exe-
cuted next, that is, you can modify the control flow.
This is only possible in the main routine.
BMAN This mode is a special I/A Series sequence block mode. 0 0
In this mode, the output parameters of the block are
not secured. You can only invoke ST-Tracing from the
BMAN mode.

NOTE
1. The BMAN mode is an extension to the standard for backward compatibility
reasons.
2. The SFC/ST Display Manager cannot differentiate between the S-AUTO and
MAN mode by evaluating the MA and STEPMD parameter of a sequence block.
The SFC/ST Display Manager administers this differentiation within itself. If the
MA and STEPMD parameters of the sequence block are both 1 at invocation of the
SFC/ST Display Manager, the block mode is always S-AUTO.

124
5. SFC/ST Display Manager B0193UZ – Rev A

ST-Tracing
ST-Tracing means stepping through the ST statements of steps and transitions, one ST statement
at a time. The instruction to be executed next is shown marked.
You can invoke ST-Tracing only in the BMAN mode. You can trace the main routine, subrou-
tines, and SBX routines.

Block Detail Displays


The SFC/ST Display Manager displays the logic of an SFC/ST configured sequence block. It also
supports some important operations on a sequence block, for example:
♦ Changing its mode
♦ Executing steps and transitions in the S-AUTO mode
♦ Tracing through the ST code of steps and transitions.
However, the SFC/ST Display Manager displays do not replace the existing detail displays of
sequence blocks. The block detail displays allow you to change values for specific parameters
(II000n, BI000n, and others). You cannot change these parameter values from the SFC/ST
Display Manager. You can invoke a sequence block detail display from within the SFC/ST
Display Manager.
The detail display for SFC/ST sequence blocks adapts the detail display of HLBL configured
sequence blocks. Refer to the detail display descriptions for the DEP, EXC, and IND blocks in
Process Operations and Displays (B0193MM).
Figure 5-2 shows the objects of the faceplate in the block detail display.

125
B0193UZ – Rev A 5. SFC/ST Display Manager

Faceplate

Overlay Display Buttons

Overlay for Selected Buttons

Figure 5-1. DEP Block Detail Display

Block
Description
Compound Name
Block Name OPERR

SYSERR STP
AUTO xxx
PAUSED
STM
ACTIVE xxx
SUSPND
SBR
STEP TRACE xxx

Figure 5-2. Faceplate Diagram for SFC/ST Sequence Block

126
5. SFC/ST Display Manager B0193UZ – Rev A

The faceplate in the top right corner of the detail display (see Figure 5-1 and Figure 5-2) contains
the following fields:
SYSERR Represents the SBX error handler number in operation.
PAUSED Indicates a paused DEP block.
SUSPND Indicates a suspended block.
STEP Block’s STEPMD parameter setting (STEP is highlighted or not).
AUTO Block’s MA parameter setting (MANUAL or AUTO).
ACTIVE Block’s state (ACTIVE or IN-ACT).
STP Number of the HLBL step currently executing.
SBR Number of the subroutine currently executing.

The bottom menu bar contains buttons for further operation.

When Block Is Reconfigured


When the SFC/ST Display Manager is running for a sequence block, and you reconfigure and
install this block again, the Display Manager looses access to the sequence block files. All data is
marked invalid.
After the checkpoint file of the CP is updated, the Display Manager automatically reloads all
necessary sequence block files. The status bar indicates that it is reloaded.

Protecting Graphical User Interface Objects


The security concept for the SFC/ST Display Manager (SFCDM) is based on the I/A Series secu-
rity concept. Locking of SFCDM graphical objects depends on the access level setting of the cur-
rent FoxView or Display Manager (Solaris) environment.
Protection class settings lock access to operation buttons, options lists, and menu commands to
prevent certain users from performing one or more operations. The protection class configuration
for the lockable SFCDM objects is integrated in the SFC/ST Configurator on a per station basis
(see “Protection Class Settings” on page 89).
During startup, the SFCDM enables or disables graphical objects, depending on the access level
setting of the current FoxView environment. For example, if you set a protection class of 77 for
the block mode, a user group with access level 77 cannot select any of the block mode options.
You can operate the SFCDM in view-only mode regardless of access level and protection class
setting. However, if you invoke the SFCDM through FoxSelect, it does not run in view-only
mode.

127
B0193UZ – Rev A 5. SFC/ST Display Manager

Table 5-2 lists the SFC Sequence Block window objects that you can typically protect.

Table 5-2. Protectable Graphical Objects

Object ID Object Type


Block mode Combo box
Block mode AUTO Block mode
Block mode S-AUTO Block mode
Block mode MAN Block mode
Block mode BMAN Block mode
Block state Combo box
Suspension Ack. Button
Ack. Button
Goto Active Button
Execute Button
Redirect Button
Code Button
SFC Selection Combo box
Detail Command
ST-Trace (Main/Subroutine) Command
ST-Trace (SBX...) Command

Object Protection at Run Time


When protection allows the enabling of an object, it is enabled only when the functional state also
enables it. For example, if the Redirect button is unprotected, it is enabled only when the block
mode is MAN.
The following table shows an example of the relationship between an object’s access level setting,
protection class setting, and object enabling/disabling at run time.

Object
Access Level Setting Object Protection Class Setting Enabling/Disabling
(FoxView/DM Environment Script) (Application) (Application)
Don’t care Protection class = 6 (protected) Enable object
1
setacl 6 + Protection class = 6 (protected) Enable object
(access level 6 unprotected)
setacl 6 - 1 Protection class = 6 (protected) Disable object
(access level 6 protected)
1
If you are working with a FoxView version earlier than V99.1, or if you are working with the tradi-
tional Display Manager (DM), more work is required. In addition to the access level setting in the
FoxView//DM environment script in the above table, you must perform additional work using the
Display Manager commands protect, unprotect, and setacl. See “Setting an Access Level” on
page 129.

128
5. SFC/ST Display Manager B0193UZ – Rev A

How to Protect Objects


To protect SFC/ST Display Manager objects:
1. Check whether you are running FoxView V99.1 (or later).
♦ If you are running V99.1 (or later), continue with Step 2.
♦ If you not are running V99.1 (or later), see “Setting an Access Level” on page 129.
2. Use the SFC/ST Configurator to set protection classes for all protectable objects. See
“Editing Protection Class Settings” on page 90.

Setting an Access Level


Using FoxView
FoxView V99.1 (or later) supplies the SFC/ST Display Manager with the access level setting
defined for the different environments. No additional effort is necessary. If you are running an
older version of FoxView, refer to “Using the Traditional Display Manager (DM)” on page 129.

Using the Traditional Display Manager (DM)


Display Manager does not supply the SFC/ST Display Manager with the access level setting
defined for the different environments.
To make the access level setting available for the SFC/ST Display Manager:
1. If you do not have file /usr/fox/wp/data/init.user, copy /usr/fox/wp/data/init.user.rel
to /usr/fox/wp/data/init.user.
2. Edit the /usr/fox/wp/data/init.user file by adding the following lines:
#
# Access Level Parameters
#
gctsize=255
dmtlist=ACL
dmllist=ACLTRG
3. Reboot the station.
4. Add the following lines to your environment scripts:
= ACL <access level string>
setl ACLTRG$DMNAME <unsigned integer>
where:
access level string String containing a series of 0s and 1s to indicate the status
of the access levels within the DM:
1 indicates that the level is protected
0 indicates that the level is not protected.
The values within the string are 1-based, that is, the first
character indicates the value of access level 1.
unsigned integer You must use different numbers for the different environ-
ment scripts.

Example for Operator environment:

129
B0193UZ – Rev A 5. SFC/ST Display Manager

= ACL 1001001001
setl ACLTRG$DMNAME 1
Example for Process Engineer environment:
= ACL 1000000010
setl ACLTRG$DMNAME 2
You must set ACL in addition to any access level setting you have already performed
by means of the Display Manager commands protect, unprotect, and setacl. ACL
must reflect the setting performed with these commands.

Running SFC/ST Display Manager in View-Only Mode


Running the SFC/ST Display Manager (SFCDM) in view-only mode disables some objects of the
SFC Sequence Block window regardless of the current access level and the current protection class
setting.

NOTE
1. You cannot change the view-only mode during run time.
2. If you invoke the SFCDM through FoxSelect, it does not run in view-only mode.

Invoking SFC/ST Display Manager in View-Only Mode


To run the SFCDM in view-only mode, you must invoke it with an additional (optional)
parameter.
Syntax for Windows NT based workstations:
sfcdm.start <compound> <block> <dmname> [vo]
Syntax for Solaris based workstations:
sfcdm.start <compound> <block> <dmname> <Display> [vo]
where:
<compound> Compound containing the block.
<block> Block name
<dmname> Display Manager name.
You can invoke the sequence block’s detail display for this Display Manager
from within the SFCDM.
The access level setting for this Display Manager takes effect for the
SFCDM’s object protection.
<Display> X-Window System™ Display (Solaris only).
vo Setting this optional parameter runs the SFCDM in view-only mode.

Example:
sfcdm.start TESTCOMP TESTBLOCK $DMNAME vo

130
5. SFC/ST Display Manager B0193UZ – Rev A

When the SFCDM is running in the view-only mode, the following objects are protected:
♦ Block mode combo box
♦ Block mode AUTO
♦ Block mode S-AUTO
♦ Block mode MAN
♦ Block mode BMAN
♦ Block state combo box
♦ Suspension Ack. button
♦ Ack. button
♦ Execute button
♦ Redirect button
♦ Detail command
♦ ST-Trace (Main/Subroutine) command
♦ ST-Trace (SBX...) command.
When the SFCDM is running in the view-only mode, the following objects are unprotected:
♦ Goto Active button
♦ Code button
♦ SFC Selection combo box.

Parent Window
Figure 5-3 shows the parent window of the SFC/ST Display Manager. Normally only the child
window SFC Sequence Block is active at invocation, and covers the entire child area of the parent
window.
If the sequence block is in ST-Trace mode at invocation, the SFC Sequence Block and ST-Trace
child windows are active and share the child window area of the parent window (except when the
menu bar’s ST-Trace command is protected).
The parent window consists of the following:
Title Bar The title contains both the compound:block description of the dis-
played sequence block and its block type.
Menu Bar The menu bar contains the drop-down menus. The commands within
the menus are enabled or disabled according to the currently allowed
functions in a certain situation, and on the condition that they are not
protected. In general, commands are enabled and disabled depending
on the active child window.
Child Window Area The child window area contains all child windows, independent of
whether they are minimized or not.
Status Bar The status bar contains contextual information for menu commands. A
special pane in the right side of the status bar is reserved for displaying
messages such as “Cannot detect active element”, “Cannot access
block state data”, or “SFC data reloaded”.

131
B0193UZ – Rev A 5. SFC/ST Display Manager

Title Bar
Menu Bar

Child
Window
Area

Status Bar

Figure 5-3. SFC/ST Display Manager Parent Window

Accessing SFC/ST Display Manager


For 70 Series workstations and 51 Series workstations running FoxView Version 99.1 (or later),
you access the SFC/ST Display Manager via FoxSelect. For more information on FoxSelect, refer
to FoxView (B0193WH) or the FoxView on-line Help.

132
5. SFC/ST Display Manager B0193UZ – Rev A

Drop-Down Menus
The drop-down menus are selectable from the menu bar at the top of the parent window
(Figure 5-3). When a menu command is highlighted, you can select it for use in the currently
active editor.
The available menus are:
File Contains menu item Exit referring to the sequence block as a whole.
View Contains a menu item to switch the status bar on or off.
Display Contains menu items to activate the different displays.
Window Contains menu items to arrange and close child windows.
Help Contains menu items to activate help functions.

File Menu
Figure 5-4 shows the File menu.

Figure 5-4. File Menu

Exit Exits the SFC/ST Display Manager.

View Menu
Figure 5-5 shows the View menu.

Figure 5-5. View Menu

Status Bar Switches the status bar on or off.

Display Menu
Figure 5-6 shows the Display menu.

Figure 5-6. Display Menu

133
B0193UZ – Rev A 5. SFC/ST Display Manager

The Display menu commands and their actions are:


ST-Trace ST-Trace is enabled only when all of the following are true:
♦ Block state is ACTIVE.
♦ Block is not paused.
♦ Block mode is BMAN.
ST-Trace Main/Subroutine opens the ST Trace window to trace the ST
statements of the main routine or any of its subroutines. This window allows you
to sequentially execute and monitor ST statements of steps and transition
conditions, one statement at a time.
ST-Trace SBX... opens the SBX Selection dialog box for selecting the SBX
routine for the ST Trace window.
Detail Opens the block Detail Display to view the logic of the SFC/ST sequence block.
Constant Opens the Constant Display dialog box to view the block’s constant definitions.
User Label Opens the User Label Display dialog box to view the block’s user label
definitions.
Variable Opens the Variable Display dialog box to view the variable definitions for the
selected routine. You select the routine for the Variable Display using the SFC
Sequence Block window, which is always present.
Trans. Dis- Trans. Display Mode Graphic determines that the transition conditions be
play Mode displayed as a function block diagram.
Trans. Display Mode Text determines that the transition conditions be displayed
as Structured Text.

Window Menu
Figure 5-7 shows the Window menu.

Figure 5-7. Window Menu

The Window menu commands and their functions are:


Cascade Cascades all open windows that are not minimized.
Tile Places all open windows, that are not minimized, side by side.
Arrange Icons Arranges all icons in the parent window’s lower-left corner.
Normalize Is only available for the SFC Sequence Block window. Normalize resizes
the window to half the width and full height of the child window area,
and relocates this window to the left side of the parent window.

134
5. SFC/ST Display Manager B0193UZ – Rev A

Close Closes a child window. The SFC Sequence Block window cannot be
closed.
<Recent Window> Activates the selected child window.

Help Menu
Figure 5-8 shows the Help menu.

Figure 5-8. Help Menu

The Help menu commands and their functions are:


Index Opens the Index tab of the Help Topics window.
Using Help Opens the Using Help window which provides topics about using and customiz-
ing the help system.
About... Opens the About dialog box which provides the software version of the SFC/ST
Display Manager.

Display Windows
SFC Sequence Block Window
The SFC Sequence Block window (Figure 5-9) is the main window in the SFC/ST Display
Manager. Use it to monitor the different SFCs and operate the block.
The currently selected sequential function chart, which appears in the upper-left area of the SFC
Sequence Block window, provides the following features:
♦ Left or right scrolling of the SFC
♦ Framing the active step or transition(s) in green
If the active element cannot be detected, for example, due to a CP failure, the back-
ground color of the SFC changes to cyan.
♦ Step or transition selection by clicking
♦ Selection of all transitions of a branch by clicking a transition of that branch
♦ Display of selected objects with a changed background color
♦ Operations on selected objects (see the following sections)
♦ Display of the main routine’s SFC when the SFC/ST Display Manager is invoked.

135
B0193UZ – Rev A 5. SFC/ST Display Manager

Click a step or transition(s).

Click block mode.

Click block state.

Display only for DEP block.

Click to resume block execution.


Active step.
Click to acknowledge alarms.

Click to display active step


or transition(s).
Click to execute step or
transition(s).
Click to redirect control flow.

Click to open Step Display or


Transition Display window for
selected step or transition(s).

Click a routine to display SFC.

Click to view operator remark for selected routine.


Click to navigate through previously invoked SFCs.

Figure 5-9. SFC Sequence Block Window

Selecting SFC for Display


To select the routine for the SFC display, use the list and buttons in the SFC Selection group box
in the lower-left corner of the SFC Sequence Block window (see Figure 5-9):

NOTE
The SFC Selection box and the << and >> buttons might be protected.

136
5. SFC/ST Display Manager B0193UZ – Rev A

To select an SFC for display:


1. In the SFC Selection box in the SFC Sequence Block window (Figure 5-9), click a
routine name (main, subroutine, or SBX).
The selected SFC appears in the top-left area of the window.
2. Click << or >> to navigate backward or forward through previously selected SFCs.
3. Click Op. Remark.
The Operator Remark dialog box (Figure 5-10) appears for review.

Click and drag to scroll


operator remark.

Click to close dialog box.

Figure 5-10. Operator Remark Dialog Box

Changing Block Mode and State


To change the block mode and state, use the boxes and buttons in the Modes and States area in
the upper-right corner of the SFC Sequence Block window (see Figure 5-9):

NOTE
The respective buttons and block modes might be protected. An asterisk (*)
following the name of the block mode indicates that the mode is currently protected
and cannot be selected.

To change the block mode and state:


1. In the Block State box, click ACTIVE.
This places the block in the Active state.

NOTE
Click INACTIVE to place the block in the Inactive state.

The displayed state always reflects the block’s current state.


2. To display the currently active step or transition(s), click Goto Active in the
Step/Transition group box.
The currently active step or transition(s) appear. The corresponding SFC is selected.
The SFC’s active objects display in the upper-left part of the SFC.

137
B0193UZ – Rev A 5. SFC/ST Display Manager

NOTE
Goto Active is enabled only when the block’s state is ACTIVE.

3. In the Block Modes box, click an operating mode (see “Block Modes” on page 124).
The displayed mode always reflects the block’s current mode.
4. To resume execution of the block when the block is suspended (indicated by YES in
the Suspended box), click Suspension Ack.
This resumes execution of the block before the time-out block parameter TIMCNT
expires. This performs the same function as the SPND ACK button in the detail
display.
5. To acknowledge all current block alarms, click Ack.
This performs the same function as the ACK button in the detail display.
The following boxes in the Modes and States group box of the SFC Sequence Block window
(Figure 5-9) provide block status information:
Paused Indicates whether a DEP block is currently in a paused state:
YES = Paused
NO = Not Paused.
For EXC and IND blocks, this box does not display.
Error No. Displays the number of the most recent error; 0 indicates no error.
Suspended Indicates whether a block is currently suspended by a call to the
SENDCONF function block:
YES = Suspended
NO = Not Suspended.

Stepping through the Steps and Transitions in the Main Routine


To step through steps and transitions of the main routine, use the buttons in the Step/Transition
group box in the lower-right corner of the SFC Sequence Block window (Figure 5-9).

NOTE
1. The respective buttons and block modes might be protected.
2. The initial step of the main routine should contain at least one non-empty
statement. Otherwise, you cannot operate the block properly in the MAN mode.
When in the MAN mode, you cannot redirect to an empty step, even if the step is
not the initial step.

To step through the steps and transitions of the main routine:


1. In the SFC Selection group box at the lower left of the window, click Main .
The selected SFC displays at the top left of the window.
2. In the Block Mode box of the Modes and States group box, click S-AUTO or MAN.
3. To place the block in the Active state, click ACTIVE in the Block State box.

138
5. SFC/ST Display Manager B0193UZ – Rev A

4. To start executing the step or transition(s) to be executed next (green frame), click
Execute.
While the step or transition(s) is executing, Execute is disabled.
After execution of the step or transition(s), the next step or transition(s) becomes the
active object(s) and Execute is enabled.
5. To redirect the control flow only while in MAN, click on a step or transition in the SFC,
and then click Redirect.
The currently selected step or transition(s) becomes the next one(s) to be executed.

NOTE
Make sure that the block is in MAN before clicking on a step or transition,
otherwise, Redirect is not enabled.

6. To start executing the next step or transition(s), click Execute.

Step Display Window


Use the Step Display window (Figure 5-11) to view the ST statements of a step. The title bar of
the window contains Main or the name of the subroutine or SBX to which the step belongs.

Click a step name.

Click a subroutine name to


enable Subroutine button.

Click to display subroutine SFC.

Click to view operator remark.

Figure 5-11. Step Display Window

139
B0193UZ – Rev A 5. SFC/ST Display Manager

Accessing Step Display Window


NOTE
The Code button might be protected.

To access the Step Display window:


1. In the SFC Sequence Block window for the main routine, subroutine or SBX, click a
step (see Figure 5-9).
2. In the Step/Transition group box of the window, click Code.
The Step Display window (Figure 5-11) for the selected routine appears.

TIP
Double-click a step to open the Step Display window without clicking the Code, if
the Code button is not protected.

Operating Step Display Window


To operate the Step Display window:
1. In Step list, click a step name.
The step’s ST statements, including any statement specific operator remarks, display
in the Statements List. Preprocessor directives are resolved.
2. To display the SFC for a subroutine, click a subroutine name in a statement.
This enables the Subroutine button.
3. Click Subroutine.
The subroutine’s SFC displays in the SFC Sequence Block window (see Figure 5-9).
4. Click Op. Remark.
The Operator Remark dialog box (Figure 5-12) for the step appears.

Click and drag to scroll


operator remark.

Click to close dialog box.

Figure 5-12. Operator Remark Dialog Box for Step

140
5. SFC/ST Display Manager B0193UZ – Rev A

Transition Display Window Overview


Use the Transition Display window to view the conditions of transitions and their Operator
Remarks.
There are two types of Transition Display windows for viewing the transition conditions:
♦ Graphical Transition Display
♦ Textual Transition Display.
If the displayed transition(s) is active, both displays show the current values of the operands.
These values are updated periodically. For variables, no values are available.
An operand that is an external reference is updated only if it is connectable. SNxxxx parameters of
sequence blocks, however, are always updated. An external reference is a full pathname for a
<compound:block.parameter>. Non-connectable block parameters are not replaced by their
values in the highlighted line.
If the current operand value is not available, the previous value remains unchanged, but its
background color changes to cyan, as in the detail display. If there is no previous value, a string of
asterisks (*******) displays with changed background color. The operand values display in a field
width similar to that of values in the detail display.

Graphical Transition Display Window


Use the graphical Transition Display window to view the transition conditions graphically as a
function block diagram (FBD) according to the standards IEC 61131-3 and IEC 60617-12.
Figure 5-13 shows the Transition Display window with inactive transitions for an SFC branch
with three transitions. Figure 5-14 shows the Transition Display window with active transitions
for the same branch. The title bar of the window contains Main or the name of the subroutine or
SBX to which the transition(s) belongs.
The Conditions box of the graphical Transition Display is divided into three parts (views) by
splitter bars:
♦ Parameter view on the left side
♦ Condition view in the middle
♦ To-step view on the right side.
If the respective content of any of these views does not completely fit into the visible part of the
view, a scroll bar is displayed at the bottom of the view (see Figure 5-13). The splitter bars can be
dragged, but only until a minimum width remains for the respective view. If a parameter or a
value cannot be displayed in the parameter view with its full length, it is expanded to the full
length as soon as the mouse pointer is located over the item.
The graphical Transition Display has an additional optimized check box that is checked by
default. Optimized indicates that parameters and partial results are displayed only once, even if
they are used by more than one following operator input.

141
B0193UZ – Rev A 5. SFC/ST Display Manager

Each condition of an active transition is colored according to the current values (see Figure 5-14).
Connection lines and operator symbols are displayed in color indicating the current state of the
transition condition. The current parameter values are displayed in the parameter view under the
connection line. The default colors are as follows:
♦ Numeric/string: lines in black, operators in grey
♦ Boolean true: lines and operators in dark green
♦ Boolean false: lines and operators in dark red.
The default values for coloring are stored in a configuration file (see “Graphical Transition Dis-
play Settings” on page 146). Each time a parameter changes its value, the representation of the
FBD must be evaluated. This evaluation cannot be done, and the part of the FBD that is
dependent on the respective parameter is shown as inactive, if one of the following conditions is
true:
♦ At least one parameter value is not secure
♦ At least one parameter is a block variable
♦ At least one parameter is non-connectable.

142
5. SFC/ST Display Manager B0193UZ – Rev A

Click a step name.

Drag splitter bars to expand view.

Click a transition condition location


to enable Op. Remark button.

Move cursor over parameter name


or value to view it completely.

Click to view operator remark.


Select check box to display
parameter and partial results
only once (selected by default).

Figure 5-13. Graphical Transition Display Window with Inactive Transitions

143
B0193UZ – Rev A 5. SFC/ST Display Manager

Click a step name.

Drag splitter bars to expand view.

Click a transition condition location


to enable Op. Remark button.

Click to view operator remark.

Select check box to display


parameter and partial results
only once (selected by default).
Figure 5-14. Graphical Transition Display Window with Active Transitions

Accessing Graphical Transition Display Window

NOTE
The Code button might be protected.

To access the graphical Transition Display window:


1. On the Display menu, point to Trans. Display Mode and click Graphic .
If the textual Transition Display is already on screen, it is replaced by the graphical
Transition Display showing the same transition(s), and you can skip Steps 2 and 3.

144
5. SFC/ST Display Manager B0193UZ – Rev A

2. In the SFC Sequence Block window for the main routine, subroutine or SBX, click a
transition (see Figure 5-9).

NOTE
Clicking a transition of a branch selects all transitions of that branch.

3. In the Step/Transition group box of the window, click Code.


The graphical Transition Display window (Figure 5-13) for the selected routine
appears. If the selected transition belongs to a branch, the conditions of all transitions
of the branch display.

TIP
Double-click a transition to open the graphical Transition Display window without
using the Code button, if the Code button is not protected.

Operating Graphical Transition Display Window


To operate the graphical Transition Display window:
1. In Transition from list, click a step name.
The transition’s conditions appear as a Functional Block Diagram (FBD).

NOTE
To view any condition specific operator remarks, go to the textual Transition
Display.

2. Move the splitter window bars to enlarge the operand input window, FBD window, or
output window, respectively.
3. To display the operator remark for a transition, click a transition in the Conditions
list.
This enables the Op. Remark button.
4. Click Op. Remark.
The Operator Remark dialog box (Figure 5-15) appears with the remark for the
transition.

145
B0193UZ – Rev A 5. SFC/ST Display Manager

Click and drag to scroll


operator remark.

Click to close dialog box.

Figure 5-15. Operator Remark Dialog Box for Transition

Graphical Transition Display Settings


An ASCII file (/usr/fox/customer/hi/SfcdmTransDsp.cfg) contains the coloring for the graphical
Transition Display and two layout settings which you can change. A separate line in the file
contains each color or layout setting. A set of keywords identifies the configurable items. Use the
following syntax for each line entry for color settings:
<keyword>‘:=’<RGB color representation>’;’
Example:
OPFILLCOLTRUE:=RGB(0,128,0);
Use the following syntax for each line for mode settings:
<keyword>‘:=’<boolean value>’;’
where:
<boolean value> ::= ‘TRUE’ | ‘FALSE’
Example:
TRANSDSPLMODEOPT:=TRUE;
If the file SfcdmTransDsp.cfg does not exist, it is created automatically with the default assign-
ments (see Table 5-3).
If you are editing an automatically created SfcdmTransDsp.cfg file, or if you create it from
scratch, please note the following:
♦ You only need to enter lines for those keywords whose values differ from the default
values.
♦ If there is a syntax error in a line, an error message is displayed before the SFC/ST
Display Manager window appears on the screen, and the system replaces the invalid
assignment with the default value at run time.

146
5. SFC/ST Display Manager B0193UZ – Rev A

Table 5-3 shows the allowed keywords along with their meanings and default assignments.
Table 5-3. Graphical Transition Display Color Setting

Transition Default
Keyword State Description Assignment
LINECOLINACTIVE Inactive Line color RGB(0,0,0)
LINECOLNUMSTRING Active Line color numerical/string RGB(0,0,0)
LINECOLTRUE Active Line color Boolean TRUE RGB(0,128,0)
LINECOLFALSE Active Line color Boolean FALSE RGB(128,0,0)
OPFILLCOLINACTIVE Inactive Operator fill color RGB(192,192,192)
OPFILLCOLNUMSTRING Active Operator fill color RGB(192,192,192)
numerical/string
OPFILLCOLTRUE Active Operator fill color Boolean RGB(0,128,0)
TRUE
OPFILLCOLFALSE Active Operator fill color Boolean RGB(128,0,0)
FALSE
OPFRAMECOL ---- Operator border color RGB(0,0,0)
OPTEXTCOLINACTIVE Inactive Operator inscription color RGB(0,0,0)
OPTEXTCOLNUMSTRING Active Operator inscription color RGB(0,0,0)
numerical/string
OPTEXTCOLTRUE Active Operator inscription color RGB(255,255,255)
Boolean TRUE
OPTEXTCOLFALSE Active Operator inscription color RGB(255,255,255)
Boolean FALSE
PARAMNAMECOL ---- Color of the parameter RGB(0,0,0)
name
PARAMVALUECOL Active Color of the parameter RGB(0,0,0)
value
PARAMVALUENOKBKCOL Active Background color of the RGB(0,255,255) *
parameter value, if it is not
secure
TOSTEPBKCOLINACTIVE Inactive Color of the ‘to step’ name RGB(255,255,255)
TOSTEPBKCOLTRUE Active Color of the ‘to step’ name, RGB(255,255,255)
if it becomes active
TOSTEPBKCOLFALSE Active Color of the ‘to step’ name, RGB(255,255,255)
if it is inactive
TRANSDSPLMODEGRAPH ---- Graphical/textual transition TRUE
condition display mode
TRANSDSPLMODE3D ---- 2D/3D representation of TRUE
graphical elements
TRANSDSPLMODEOPT ---- Optimized/non-optimized TRUE
FBD representation

* Usually in I/A Series systems.

147
B0193UZ – Rev A 5. SFC/ST Display Manager

Textual Transition Display Window


Use the textual Transition Display window to view the condition of transitions in Structured Text
(ST) form. Figure 5-13 shows the Transition Display window with inactive transitions for an SFC
branch with three transitions. Figure 5-14 shows the Transition Display window with active
transitions for the same branch. The title bar of the window contains Main or the name of the
subroutine or SBX to which the transition(s) belongs.
If the displayed transition(s) is active, the contents of the list box changes (see Figure 5-17). The
condition of each transition is displayed twice. First, the condition is displayed as configured
Structured Text (ST). Next, the same condition displays in a highlighted line showing actual val-
ues that replace the operands. These values are updated periodically.
If the displayed transition(s) becomes inactive, the transition conditions are no longer
highlighted.

Click a step name.

Click a transition location to


enable Op. Remark button.

Click to view operator remark.

Figure 5-16. Textual Transition Display Window with Inactive Transitions

148
5. SFC/ST Display Manager B0193UZ – Rev A

Click a step name.

Condition with operand value.

Click a transition location to


enable Op. Remark button.

Click to view operator remark.

Figure 5-17. Textual Transition Display Window with Active Transitions

Accessing Textual Transition Display Window

NOTE
The Code button might be protected.

To access the textual Transition Display window:


1. On the Display menu, point to Trans. Display Mode and click Text.
If the graphical Transition Display is already on screen, it is replaced by the textual
Transition Display showing the same transition(s), and you can skip Steps 2 and 3.
2. In the SFC Sequence Block window for the main routine, subroutine or SBX, click a
transition (see Figure 5-9).

NOTE
Clicking a transition of a branch selects all transitions of that branch.

3. In the Step/Transition group box of the window, click Code.


The textual Transition Display window (Figure 5-16) for the selected routine appears.
If the selected transition belongs to a branch, the conditions of all transitions of the
branch display.

149
B0193UZ – Rev A 5. SFC/ST Display Manager

TIP
Double-click a transition to open the Transition Display window without using the
Code button, if the Code button is not protected.

Operating Textual Transition Display Window


To operate the textual Transition Display window:
1. In Transition from list, click a step name.
The transition’s ST conditions, including any condition specific operator remarks, dis-
play in the Conditions list. Preprocessor directives are resolved.
2. To display the operator remark for a transition, click a transition in the Conditions
list.
This enables the Op. Remark button.
3. Click Op. Remark.
The Operator Remark dialog box (Figure 5-15) appears with the remark for the
transition.

ST-Trace Window
Use the ST-Trace window to sequentially execute and monitor the ST statements of steps and the
conditions of transitions, one ST statement at a time.
This window is available for tracing the ST statements of the:
♦ Main routine and any of its current subroutines
♦ SBX routines.
This window is only enabled if the following are all true:
♦ Block state is ACTIVE
♦ Block is not paused
♦ Block mode is BMAN.
The title bar of the window contains MAIN or the name of the subroutine or SBX. For example,
Figure 5-18 shows the ST-Trace window for the active step ONOFF_AGIT of the main routine.

150
5. SFC/ST Display Manager B0193UZ – Rev A

Statement to be Executed Next

Click to execute the highlighted


statement.

When this button enabled, click it to


complete execution of all steps and
transitions in a subroutine.

Click to close dialog box.

Figure 5-18. ST-Trace Window with an Active Step

Accessing ST-Trace Window


The procedure for accessing the ST-Trace window depends on the routine you want to trace.

ST-Trace Window for Main Routine or a Subroutine

NOTE
The respective objects (ST-Trace menu and BMAN button) might be protected.

To access the ST-Trace window for the main routine or a subroutine:


1. In the Block Mode list, click BMAN.
2. In the Block State list, click ACTIVE.
3. On the Display menu, point to ST-Trace and click Main/Subroutine.
The ST-Trace window appears for tracing the ST statements of the main routine and any of its
current subroutines.

151
B0193UZ – Rev A 5. SFC/ST Display Manager

ST-Trace Window for an SBX Routine

NOTE
The respective objects (ST-Trace menu and BMAN button) might be protected.

To access the ST-Trace window for an SBX routine:


1. In the Block Mode list, click BMAN.
2. In the Block State list, click ACTIVE.
3. On the Display menu, point to ST-Trace and click SBX.
The SBX Selection dialog box (Figure 5-19) appears for selecting one of the
configured SBX routines to trace its ST statements.

Click an SBX.
Click to trace the SBX.

Figure 5-19. SBX Selection Dialog Box

The SBX Selection dialog box displays all available SBXs within the block. Upon
display of the dialog box, the first SBX is selected.
4. In the SBX list, click an SBX.
5. Click OK.
The ST-Trace window for the selected SBX (see Figure 5-18) appears and the SBX Selection
dialog box closes.

Operating ST-Trace Window


To operate the ST-Trace window:
1. To execute the highlighted statement in the Step list (see Figure 5-18), click Single
Instr.
Single Instr. is disabled until execution of the statement completes.
After executing the statement, Single Instr. is enabled and one of the following events
occurs:
♦ If there is another statement in the step, the next statement highlights.
♦ If the last statement of a step is executed, the window displays the condition(s) of
the following transition(s). See Figure 5-20.
♦ If a subroutine call statement is reached, processing passes to the subroutine. See
“Tracing Subroutines” on page 153.

152
5. SFC/ST Display Manager B0193UZ – Rev A

2. To continue tracing, click Single Instr. to execute the next statement or the condi-
tions of the displayed transitions.
The conditions of the displayed transitions are evaluated until a transition condition
becomes true. Then the window displays the statements of the following step.
3. To end ST tracing, click Trace off.
The ST-Trace window closes.

Active Transition

Condition with Operand Values

Click to execute conditions


of the displayed transition.

When this button is enabled, click it


to complete execution of all
statements in a subroutine.

Click to exit ST-Trace mode.

Figure 5-20. ST-Trace Window with Active Transitions

Tracing Subroutines
If a subroutine call statement is reached, the SFC/ST Display Manager:
♦ Displays the SFC of the subroutine in the SFC Sequence Block window.
♦ Displays the subroutine step statements and highlights the first statement in the
ST-Trace window.
♦ Enables the Complete SBR button.

153
B0193UZ – Rev A 5. SFC/ST Display Manager

To continue tracing:
♦ Continue to click Single Instr. for each step statement and transition condition(s)
in the subroutine.
♦ Click Complete SBR to execute all subroutine statements and transition conditions.
The sequence block runs without interruption until it reaches a step statement or
transition condition in Main (main or subroutine tracing) or the SBX (SBX tracing).
All subroutine levels are executed without interruption.

NOTE
When using Complete SBR, some block errors that occur may not display and stop
block execution. To detect all block errors, use Single Instr. When the subroutines
are error free, you can take advantage of the Complete SBR function.

Constant Display Dialog Box


Use the Constant Display dialog box (Figure 5-21) to view the block’s constant definitions and
associated operator remarks. The Declarations list reflects the resolution of preprocessor
directives.

Click a constant definition


to display its operator remark.

Operator Remark for


Selected Constant

Click to close dialog box.

Figure 5-21. Constant Display Dialog Box

Accessing Constant Display Dialog Box


To access the Constant Display dialog box:
♦ On the Display menu, click Constant.
The Constant Display dialog box (Figure 5-21) appears.

154
5. SFC/ST Display Manager B0193UZ – Rev A

Operating Constant Dialog Box


To operate the Constant Display dialog box:
1. In the Declarations list, click a constant definition.
The operator remark for the selected constant definition displays in the Operator
Remark box.
2. To close the dialog box, click OK.

User Labels
Use the User Label Display dialog box (Figure 5-22) to view the block’s user label definitions,
updated values, and associated operator remarks. The Declarations and Values list reflects the res-
olution of preprocessor directives.

Click a user label to display


its operator remark.

Operator Remark for


Selected User Label

Click to close dialog box.

Figure 5-22. User Label Display Dialog Box

Accessing User Label Display Dialog Box


To access the User Label Display dialog box:
♦ On the Display menu, click User Label.
The User Label Display dialog box (Figure 5-22) appears.

Operating User Label Dialog Box


To operate the User Label Display dialog box:
1. In the Declarations and Values list, click a user label definition.
The operator remark for the selected user label definition appears in the Operator
Remark box.
2. To close the dialog box, click OK.

155
B0193UZ – Rev A 5. SFC/ST Display Manager

Variable Display
Use the Variable Display dialog box (Figure 5-23) to view the variable definitions and associated
operator remarks for the main routine or a subroutine. The Variable Declarations list reflects the
resolution of preprocessor directives. Variable values are not displayed or updated because the
block does not make them available. The title bar contains Main, or the name of the subroutine
to which the variables belong.

Click a variable to display


its operator remark.

Operator Remark for


Selected Variable

Click to close dialog box.

Figure 5-23. Variable Display Dialog Box

Accessing Variable Display Dialog Box


To access the Variable Display dialog box:
♦ On the Display menu, click Variable.
The Variable Display dialog box (Figure 5-23) appears.

Operating Variable Display Dialog Box


To operate the Variable Display dialog box:
1. In the Declarations list, click a variable definition.
The operator remark for the selected variable definition displays in the Operator
Remark box.
2. To close the dialog box, click OK.

156
6. SFC/ST Configurator Functions
This chapter describes the SFC/ST language elements supported by the SFC/ST Block and
Library Configurators. It describes the elements of the main routine, subroutines, and SBX
routines. These elements include constants, variables, user labels, macros, functions, and
function blocks.
The SFC/ST Configurator supports a subset of the SFC/ST language elements defined in
IEC 61131-3. This subset complies with the standard. In order to support existing HLBL
language elements, there are corresponding enhancements to SFC/ST beyond the standard.

Definition of SFC/ST Sequence Block


Table 6-1 lists the SFC/ST elements and their associated Editors.

Table 6-1. SFC/ST Sequence Block Elements and Editors

Element Editors
Macros Macro
Declarations Constant
Variable
User Label
Subroutine Parameter
Main routine Block Information
SFC
Step
Transition
Subroutines Subroutine
SFC
Step
Transition
Block exception routines SBX
SFC
Step
Transition

There are three block types for SFC/ST sequence blocks:


♦ Dependent (DEP) sequence block
♦ Independent (IND) sequence block
♦ Exception (EXC) sequence block.
You do not declare the external parameters (shared variables and block I/O parameters). You can
access them by means of their full pathnames (FPNs) in the expressions within the steps’ state-
ments and transitions’ conditions.

157
B0193UZ – Rev A 6. SFC/ST Configurator Functions

Other declarations for the block consist of constant and main variable declarations.
Subroutine I/O parameter declarations consist of input or input/output declarations.

Data File Inclusion


File inclusion makes it easy to handle collections of #defines and declarations. Any source line of
the form #include “file_name” is replaced by the contents of the file file_name. An included file
may itself contain #include lines. #include is the preferred way to tie the declarations together for
a large configuration. When an included file is changed, all blocks that depend on it must be
recompiled.
In an SFC/ST sequence block, file inclusions are allowed within the macro definitions and within
the declarations of constants, variables and user labels.
You can write include files using any text editor. Take into account the platform specific ASCII
file format, that is, <CR><LF> to separate lines on 70 Series workstations (Windows NT) versus
only <LF> on 51 Series workstations (Solaris).

Syntax
#include "file_name"

Include File Header Format


Use the C language comment syntax /* ... */ instead of the ST comment syntax (* ... *) for header
information. These C comments are discarded by the preprocessor and consequently do not affect
the SFC/ST Display Manager. Use the C comments only within include files.

Example
/* Author: ...
Date: ...
Revision list: ... */
var1 : DINT; (* comment *) (*_OR operator remark *)
var2 : DINT; (* comment *) (*_OR operator remark *)
...
vari : DINT; (* comment *) (*_OR operator remark *)

Main Routine Elements


The main routine is composed of:
♦ Symbolic constants (see “Constant Editor” on page 67)
♦ Local block variables (see “Block Information Editor” on page 46)
♦ User-labeled parameters (see “User Label Editor” on page 73)
♦ SFC network consisting of steps and transitions (see “SFC Editor” on page 47, “Step
Editor” on page 57, and “Transition Editor” on page 64).

158
6. SFC/ST Configurator Functions B0193UZ – Rev A

Symbolic Constants
A symbolic constant is an identifier which represents a constant value. Constants are known
throughout the whole block, including:
♦ Steps and transitions of the main routine
♦ All block exception routines
♦ All subroutines.
Included files can contain constant declarations.
The system supports only constants of the elementary data types (see “Data Types” on page 170).
Comments and operator remarks for constants are optional.

Syntax
constant_name : data_type := value ;

Block Local Variables


A local block variable is known and accessible throughout the whole block in the steps and transi-
tions of:
♦ The main routine
♦ All block exception routines
♦ All subroutines.
A local block variable is not accessible externally. You cannot use a name that is used to denote a
constant as a local variable name. Variable declarations can be within included files. Comments
and operator remarks for variables are optional.
In the declaration part of variables, you must use only the elementary data types (see “Data Types”
on page 170). The system does not support the following:
♦ Assignment of initial values for variables
♦ Structured data type and function block type
♦ Subrange data types and enumerated data types.

Syntax
variable_name : data_type ;
or
variable_name : ARRAY [ 1..n {, 1..n} ] OF data_type ;
where:
data_type := elementary data type (see “Data Types” on page 170)
n := 1 to 256

User Labeled Parameter


Each SFC/ST sequence block has a number of parameters that are available to you. These user
parameters also have standard names. You can attach a specific name (user label) to them. User
label declarations also can be within included files.
A user label cannot be one of the names of the standard parameters, block local variables, or con-
stants. Comments and operator remarks for user labels are optional.

159
B0193UZ – Rev A 6. SFC/ST Configurator Functions

Syntax
lab_nam : par_nam ;
where:
lab_nam := user-defined label name
par_nam := user arithmetic, string, or array parameter name
♦ Arithmetic parameters:
BI00nn (where nn = 01 to 24)
II000n (where n = 1 to 8)
RI00nn (where nn = 01 to 15)
BO00nn (where nn = 01 to 16)
IO000n (where n = 1 to 5)
RO00nn (where nn = 01 to 15)

♦ String parameters
SN00nn (where nn = 01 to 10)

♦ Array parameters
BA000n (where n = 1 to 4)
IA000n (where n = 1)
RA000n (where n = 1 to 2)

SFC Network
An SFC network consists of steps and transitions. The steps and transitions are interconnected by
directed links. A transition condition is associated with each transition.
The steps run serially. Each transition can have only one preceding step and only one successor
step. Step names must be unique in the routine, that is, steps with the same name can be defined
in the main routine and a subroutine or SBX routine.
For definition of a step, see “Step Specification with Structured Text (ST)” on page 163. For defi-
nition of a transition condition, see “Transition Specification with Structured Text (ST)” on
page 165.

Subroutines
An SFC/ST sequence block subroutine is an SFC network that can be called from the statements
of the other SFC networks in the same block. Recursive subroutines are not supported, that is,
subroutines cannot call themselves, directly or indirectly. All three block types of SFC/ST
sequence blocks support subroutines. Each block can support a maximum of 128 subroutines.

160
6. SFC/ST Configurator Functions B0193UZ – Rev A

Table 6-1 lists the elements of an SFC/ST subroutine and their associated editors.

Table 6-2. SFC/ST Subroutine Elements and Editors

Element Editors
Subroutine name Subroutine
Input/output parameters Subroutine Parameter
Local subroutine variables Variable
One SFC network consisting of SFC
steps and transitions Step
Transition

The subroutine name is an identifier (up to 12 characters) that occupies one character in excess.
The number of characters used for all subroutine names within a block is limited to 512.

NOTE
Do not use a keyword or an identifier that has already been defined.

You define the subroutine structure or network using a sequential function chart. The subroutine
SFC network has the structure defined in “SFC Network” on page 160.

Subroutine Input/Output Parameters


There are two categories of input/output parameters:
♦ IN
♦ INOUT.

NOTE
Output declarations, that is, pure output parameters, are not supported.

The IN parameter provides a value to the subroutine that is used inside the subroutine. The value
may be changed locally within the subroutine, but it is not made known outside the subroutine.
The changed value is only known to the caller, if that parameter was an INOUT parameter.
User-labeled parameters, constants, and local block variables are known within the subroutines.
They can also be passed to the subroutine by means of parameters. You can use a subroutine with
input/output parameters to repeat the same action on different sets of parameters. You can use a
subroutine without input/output parameters to perform different actions upon the same set of
variables.
The total number of input/output parameters and local subroutine variables per subroutine is
limited to 50.

Subroutine Local Variables


Local subroutine variables are optional. They are only known and accessible within the subroutine
in which they are declared. Local subroutine variables provide local data storage for values, or
intermediate results. When a subroutine is called, the initial values of its local variables are
undetermined.

161
B0193UZ – Rev A 6. SFC/ST Configurator Functions

Local subroutine variables can be multidimensional and their number and size are user definable.
Permitted data types of local subroutine variables are the same as for local block variables (see
“Block Local Variables” on page 159). Declarations of local subroutine variables also can be
within included files.
The names of local subroutine variables can have up to 12 characters.

NOTE
Do not use a keyword or an identifier that has already been defined.

You cannot use these five reserved names:


♦ OP_ERR
♦ STMNO
♦ SUBRNO
♦ SBXNO
♦ STEPNO.
A subroutine name cannot be one of the predefined SBX names (see the next section “Standard
Block Exception (SBX) Handler”.
You can use the name of a block local variable for a subroutine variable. In this case, you cannot
reference the block local variable within that subroutine.
The total number of input/output parameters and local subroutine variables per subroutine is
limited to 50.

Standard Block Exception (SBX) Handler


Standard Block Exception Handlers (SBXs) enable you to specify logic that is to be executed when
a particular event occurs during block processing.

NOTE
An ST statement cannot invoke SBXs in the way subroutines can.

These are the SBX names:


♦ TO_SYS_ERROR
♦ TO_USR_ERROR
♦ TO_INACTIVE
♦ TO_MANUAL
♦ TO_PAUSED.
There are five events for which you can define an SBX. The name of an SBX is one from the pre-
defined set and specifies to which event an SBX is related. Such an event can be an error (user
error or system error) or a change of the block’s state to Inactive, Manual or Paused.
Each SBX has one SFC network, as described in “SFC Network” on page 160.

162
6. SFC/ST Configurator Functions B0193UZ – Rev A

NOTE
You cannot use Input/Output parameters within an SBX.

Macros
The #define preprocessor command causes a name to become defined as a macro to the prepro-
cessor. A sequence of tokens (replacement text), called the body of the macro, is associated with
the name. When the preprocessor recognizes the name of the macro in the program source text, it
treats the name as a call to that macro. This effectively replaces the name with a copy of the body.
The preprocessor replaces every term in the *.k file matching the macro’s name, including key-
words and identifiers.

Syntax
#define name replacement_text

Step Specification with Structured Text (ST)


Within a step, you can specify up to 200 ST statements with operator remarks (optional). The
system executes each statement once during execution of the step. You can use the following state-
ment types:
♦ Assignment
♦ Subprogram control
♦ Selection
♦ Empty.

NOTE
In steps, you cannot use iteration statements such as FOR, WHILE, and REPEAT.

Table 6-3 lists the symbols and their meanings in the syntax used in this section.

Table 6-3. Symbols for Syntax Description

Symbol Meaning
:= Is defined to be
| Alternatively
[X] 0 or 1 instance of X
{X} 0 or more instances of X
(X|Y) Either X or Y
’ABC’ Literal string ’ABC’
Empty Empty grammar symbol
Identifier Identifier grammar symbol

163
B0193UZ – Rev A 6. SFC/ST Configurator Functions

Assignment Statements
An assignment statement consists of a variable reference on the left side, followed by the assign-
ment operator :=, followed by the expression to be evaluated.

Syntax
variable_name := expression ;

Function Block Control Statements


You invoke a function block through a statement consisting of the name of the function block fol-
lowed by a parenthesized list of named input parameter value assignments (see “Function Blocks”
on page 184). The order in which input parameters are listed in a function block invocation is
significant.
In every invocation, you must assign values to all input parameters.
The RETURN statement provides early exit from a function or function block.
Syntax:
fb_name ( [var_name := expression {, var_name := expression}] );
where:
fb_name := function block name
var_name := variable name
expression := arithmetic or string expression

Examples
START_TIMER(tim := ::Bl_NAME.TIMR3, init := 2.5) ;
ACTCASES(block := ::FILL, act := ’A-AIIA---IA-I’) ;

Selection Statements
Selection statements include the IF and CASE statements. A selection selects one (or a group) of its
component statements for execution, based on a specified condition.
The IF statement specifies that a group of statements is to be executed only if the associated
Boolean expression evaluates to the value true. If the condition is false, then the system:
♦ Executes no statement
♦ Executes the statement group following the ELSE keyword
♦ Executes the statement group following the ELSIF keyword, if its associated Boolean
condition is true.

Syntax
IF expression THEN statement_list
{ELSIF expression THEN statement_list}
[ELSE statement_list]
END_IF ;

164
6. SFC/ST Configurator Functions B0193UZ – Rev A

Example
IF RI1 > 6.9 THEN
RO1 := RI1 ;
ELSIF II1 < 6 THEN
RO1 := 2.3 ;
ELSE
RO1 := 6.4 ;
END_IF ;

The CASE statement consists of an expression that evaluates to a variable of type INT (the selec-
tor), and a list of statement groups, labeled by one or more integers or ranges of integer values.
The system executes the first group of statements with ranges that contain the computed value of
the selector. If the value of the selector is not in the range of any case, the system executes the
statement sequence following the keyword ELSE (if it occurs in the CASE statement). Otherwise,
the system executes none of the statement sequences.

Syntax
CASE expression OF
case_list : statement_list {case_list : statement_list}
[ELSE statement_list]
END_CASE ;
where:
case_list := case_list_element {, case_list_element}
case_list_element := subrange or signed_integer
Example:
CASE 5-II1 OF
1..2,5: RO1 := 3.1 ;
3,4: IF II1 = 3 THEN
RO1 := 4.21 ;
ELSE
RO1 := 4.22 ;
END_IF ;
6..10: RO1 := 5.4 ;
-2: RO1 := -1.2 ;
ELSE
RO1 := 6.5 ;
END_CASE ;

Transition Specification with Structured Text (ST)


A transition represents the condition whereby control passes from one or more steps preceding the
transition to one or more successor steps along the corresponding directed link.
Each transition has an associated transition condition that is the result of the evaluation of a single
Boolean expression.

165
B0193UZ – Rev A 6. SFC/ST Configurator Functions

With regard to divergence, the IEC 61131-3 standard offers three types of evaluation for transi-
tion conditions:
♦ Mutual exclusive
♦ Left to right
♦ Priority controlled.
I/A Series SFC/ST evaluates from left to right, although there is no graphical indication at the
crossing point. Nevertheless, it is a good practice to formulate the transition conditions so that
they are mutually exclusive.
For operator remarks within a step’s statement list or transition’s condition, you must use the
syntax (* ... *).

Vocabulary
SFC/ST sequence language statements are composed of the following lexical units:
♦ Characters
♦ Special symbols
♦ Keywords
♦ Literals
♦ Identifiers
♦ Operator remarks.

Characters
The basic character set of the SFC/ST sequence language consists of following letters, numbers,
and special symbols:
♦ Letters A to Z, a to z, and _
♦ Numbers 0 to 9
♦ Special Symbols ' + - * / = { } ( ) [ ] < > . , ; : &

166
6. SFC/ST Configurator Functions B0193UZ – Rev A

Special Symbols
Special symbols serve as operators and delimiters in SFC/ST sequence language statements (see
Table 6-4). Some operators and delimiters consists of several special symbols.
Table 6-4. Special Symbols

Symbol Description
(* *) Encloses an operator remark
’’ Encloses a string data type
:= ♦ Assigns values to parameters
♦ Declares a value for a constant
; Ends a sequence language statement
: ♦ Begins an external reference to a block, compound or block parameter,
or shared variable
♦ Separates compound and block names in a block or block parameter
reference
♦ Delimits case
() Encloses:
♦ Expressions
♦ Arguments for function or function block calls
[] Encloses subscript (variable or constant)
.. Delimits subrange
* Arithmetic operator for multiplication
/ Arithmetic operator for integer or real division
+ ♦ Arithmetic operator for addition
♦ Unary operator for identity
- ♦ Arithmetic operator for subtraction
♦ Unary operator for sign inversion
= Relational operator for equality
<> Relational operator for inequality
< Relational operator for less than
> Relational operator for greater than
<= Relational operator for less than or equal to
>= Relational operator for greater than or equal to
. Separates a compound from a parameter in a pathname, or a block from a
parameter in a parameter reference
, Defines sequence of operands
& Logical AND

167
B0193UZ – Rev A 6. SFC/ST Configurator Functions

Keywords
Table 6-5 lists the keywords available in the SFC/ST Configurator for programming the steps and
transitions.
Table 6-5. Keywords

PROGRAM CONSTANT INITIAL_STEP


END_PROGRAM VAR STEP
DEP VAR_ALIAS END_STEP
IND VAR_INPUT TRANSITION
EXC VAR_IN_OUT END_TRANSITION
FUNCTION_BLOCK END_VAR ACTION
END_FUNCTION_BLOCK END_ACTION
BOOL ** FROM IF *
DINT ** ARRAY ** THEN *
REAL ** TIMER ELSE *
STRING ** ELSIF *
STRING6 ** END_IF *
STRING12 **
STRING80 **
CASE * FOR WHILE
OF * TO END_WHILE
END_CASE * DOWNTO
DO
END_FOR
REPEAT EXIT
UNTIL RETURN *
END_REPEAT

* These keywords may only be used for programming the steps and transitions.
** These keywords may only be used in the include files for declaration of constants and variables.

NOTE
Do not use keywords to define identifiers or macros.

Identifiers
Identifiers denote the objects that can be identified using SFC/ST sequence language. Examples
of these objects are:
♦ Compounds
♦ Blocks
♦ Shared variables
♦ Parameters of compounds and blocks
♦ Block local variables
♦ Subroutine local variables
♦ User labels.

168
6. SFC/ST Configurator Functions B0193UZ – Rev A

An identifier consists of a letter followed by a sequence of characters which may be letters, digits,
or the underscore character. Uppercase and lowercase characters are allowed for user-defined
identifiers.

NOTE
Uppercase identifiers must not match a keyword.

Examples
nylon_temp
Acethon_Flow

Comments
Use comments to describe SFC/ST elements, such as statements, to another engineer. Comments
do not affect the algorithm’s flow of control or any data operations.
Comments are enclosed by special characters and can include the name, date, version, revision,
functionality, or anything else that needs to be documented.
In SFC/ST sequence blocks, you can define comments at following places:
♦ SFC/ST sequence block header
♦ Subroutine headers
♦ Standard block exception handler headers
♦ Steps
♦ Transitions
♦ Definition of a constant
♦ Definition of a local variable
♦ Definition of a user label.
You cannot define comments within a step’s statement list or a transition’s condition. Only opera-
tor remarks are allowed.
The comment can consists of one or more characters (letters, digits, or underscores). There is no
limit to the number of characters in a comment.

Operator Remarks
The operator can display operator remarks for guidance.
Use operator remarks to describe anything necessary to the operator. An operator remark tells the
operator what the algorithm is doing while executing.

NOTE
Do not use operator remarks to tell the operator to perform an action.

Operator remarks are accessible to the operator from sequence block displays.

169
B0193UZ – Rev A 6. SFC/ST Configurator Functions

In SFC/ST sequence blocks, the engineer can define operator remarks at the following places:
♦ SFC/ST sequence block header
♦ Subroutine headers
♦ Standard block exception handler headers
♦ Steps
♦ Statements
♦ Transitions
♦ Operands of an expression
♦ Definition of a constant
♦ Definition of a local variable
♦ Definition of a user label.
Within a step’s statement list or transition’s condition, you must use the syntax (* ... *).
The operator remark consists of one or more characters (letters, digits, carriage returns, or under-
scores). There is no limit to the number of characters in a remark.

NOTE
Nested operator remarks are not allowed.

Data Types
Data types determine types of values and the operations that may be performed on the values. In
an SFC/ST sequence block, the variables, constants, and input/output parameters can only have
one of the following elementary (predefined) data types:
♦ REAL
♦ DINT (integer)
♦ BOOL (boolean)
♦ STRING
♦ STRING6
♦ STRING12
♦ STRING80
♦ statf_Type
♦ sstate.
The data types REAL, DINT, BOOL and STRING are elementary types in IEC 61131-3.
STRING can contain up to 80 characters. STRING6, STRING12 and STRING80 are types in
HLBL with fixed length.
statf_Type is a predefined structure type.
sstate is a predefined enumeration type.

170
6. SFC/ST Configurator Functions B0193UZ – Rev A

Real
Real data can assume values that are approximations of the real numbers. Real values have an
accuracy of seven digits and they are limited to the range -3.402824e38 to +3.402824e38.

Integer
Integer (DINT) data can have values that express whole numbers. Integer values are limited to the
range -231 to +231 - 1. Operations that can be performed are:
♦ Addition
♦ Subtraction
♦ Multiplication
♦ Division
♦ Testing on relational ordering of values.

Boolean
Boolean (BOOL) data can:
♦ Assume one of two values: TRUE or FALSE
♦ Be manipulated by the operators AND, OR, XOR, and NOT
♦ Be compared for equality and inequality with other Boolean values.

String
String data type can contain any printable characters. They may be compared for equality and
inequality with objects of data type string. There are four string data types:
♦ STRING (up to 80 characters)
♦ STRING80 (80 characters long)
♦ STRING6 (6 characters long)
♦ STRING12 (12 characters long)

statf_Type
statf_Type is a predefined structure data type of the following parameter status attributes (Boolean
values) associated with the user-labeled parameter:
♦ ON
♦ SECURED
♦ BAD
♦ OOS
♦ ERROR
♦ QUALITY.

171
B0193UZ – Rev A 6. SFC/ST Configurator Functions

sstate
sstate is a predefined enumerated data type associated with the compound parameter SSTATE.
sstate has the following values:

Symbolic Value Ordinal Value


Inactive 0
Active 1
Exception 2

In an SFC/ST expression, you can use either the symbolic or the corresponding ordinal value. For
example, the expression of an IF statement, looking for the condition where the compound
SSTATE is active, can be either of the following:
IF (:COMPNAM.SSTATE = Active )
or
IF 1 = ORD(:COMPNAM.SSTATE )

Literal Operands
Literals are values appearing literally in the expressions. They denote instances of values for any of
the allowed data types in ST language (see “Data Types” on page 170).
Integer literals appear as signed integer values.
Real literals appear as signed real values in floating-point notation.
Boolean literals appear as the keywords TRUE or FALSE.
sstate literals appear as the keywords INACTIVE, ACTIVE or EXCEPTION. An sstate literal
may be used to compare against the value of the compound parameter SSTATE.

NOTE
The time literal is not supported in operands. The Boolean literal and sstate literal
are not part of IEC 61131-3.

String literals can be any printable character string except: $, $ followed by two hex digits, $$, $',
$L, $N, $P, $R, $T, $I, $n, $p, $r, and $t.

172
6. SFC/ST Configurator Functions B0193UZ – Rev A

Examples
signed integer literal -99
signed real literal +9.9e+1
Boolean literal TRUE, FALSE
sstate literal Active, Inactive, Exception
string literal ’Heat Phase is beginning’

Constant Operands
Constants are identifiers which act as synonyms to values. You define constants with the Constant
Editor before using them in statements. Constants are known throughout the whole block,
including statements in the main routine, subroutines and SBXs.

Examples
acid_grdient : REAL := +8.4E-4 ;
Pi : REAL := 3.1427593 ;
open : BOOL := TRUE ;
imp_name : STRING := ‘COMP6:EXC7.ACTIVE’ ;

Variables Operands
Variables provide a means of identifying data objects whose contents may change, for example,
data associated with a:
♦ Compound or block parameter
♦ Shared variable
♦ Block or subroutine local variable
♦ Input/output parameter.
Each variable has one of the elementary types defined in “Data Types” on page 170.
Block local variables are known and accessible throughout the block’s algorithm, including state-
ments in the main routine, subroutines, and SBXs.
Subroutine local variables are only known within the subroutine in which they are defined. Sub-
routine variables may have the same name as block variables, in which case the block variable is
not known within that subroutine.
For use of a string type external reference in an expression, the full pathname must be preceded by
the keyword STRING.
A scalar variable consists of a single value of data type real, integer, Boolean, or one of the string
data types.
An array variable is a structure consisting of a fixed number of elements all of which are the same
data type, such as real, integer, Boolean, or one of the string data types. The number of elements
in an array must be specified.

173
B0193UZ – Rev A 6. SFC/ST Configurator Functions

Only a status attribute associated with a user-labeled parameter is allowed the structured form.
The status attribute must be one of the elements of the structured data type statf_Type. The user
label identifier must be connected to one of the following parameters:
BI00nn (where nn = 01 to 24)
II000n (where n = 1 to 8)
RI00nn (where nn = 01 to 15)
SN00nn (where nn = 1 to 10)
BO00nn (where nn = 01 to 16)
IO000n (where n = 1 to 5)
RO00nn (where nn = 01 to 15)
BA000n (where n = 1 to 4)
IA000n (where n = 1)
RA000n (where n = 1 to 2).

Examples
a : DINT ;
safe_pattrns : ARRAY [ 37, 11, 3, 2 ] OF BOOL ;
Valve_outp_s : ARRAY [ 7, 3, 9 ] OF REAL ;
Exc_blk_nams : ARRAY [ 9, 2 ] OF STRING6 ;
Ctl_Compound : STRING12 ;

Full Pathname (FPN) Operands


A full pathname operand (external reference) is a reference to a shared variable, compound param-
eter, block parameter, or timer that is specified by pathname. It may or may not belong to the
block.
A FPN may consist of string literals only, or it may be constructed at run time from string literals
and references to the following objects of data type string:
♦ User parameter or if defined, its user label name
♦ Block local variable
♦ Subroutine local variable
♦ Input/output parameter of subroutines.
String type references must be enclosed in single quotes (’ ’). The first colon of the FPN cannot be
included in references.
A full pathname operand has one of the following formats:
:shared_variable
:compound_nam.parameter or :.parameter
:compound_nam:block_nam or ::block_nam
:compound_nam:block_nam.parameter or :block_nam.parameter
:compound_nam:block_nam.tim_nam or ::block_nam.tim_nam

174
6. SFC/ST Configurator Functions B0193UZ – Rev A

where:
shared_variable is shared variable name (1 to 12 characters)
compound_nam is compound name (1 to 12 characters)
block_nam is block name (1 to 12 characters)
parameter is compound or block parameter name (1 to 6 characters)
tim_nam is timer name (TIMR1, TIMR2, TIMR3, TIMR4)

In the above formats, the expression on the right contains the relative full pathnames. The
compound name is simply omitted from the FPN. At run time, the relative FPN is augmented
with the name of the compound which contains the block that is executed.
The path specified in a reference must not contain any spaces or comments. External references
are case sensitive. Enter all compound names, block names, and parameters must be entered in
uppercase.
When you make an external reference to a user-labeled parameter, use the path to the parameter
and the parameter name (not the assigned user label).
When you use a string type external reference in an expression, precede it with the keyword
STRING. SFC/ST sequence language assumes all external references without the keyword
STRING are arithmetic data types (real, integer, or Boolean).

Examples
:TANK_1:DRAIN.AUTDSR
::DRAIN.AUTDSR
:’SN0001’AUTDSR (* SN0001 contains TANK_1:DRAIN. *)
:TANK_1’BLKSTR’.AUTDSR (* BLKSTR contains :DRAIN *)
:’CBP_STRG (* CBP_STRG contains TANK_1:DRAIN.AUTDSR *)
::’SN0002’.’PAR_NAM’ (* SN0002 contains DRAIN and PAR_NAM contains
AUTDSR *)
:TANK_1:DRAIN
::DRAIN
ERR_FLG : BI0001 (*User-labeled parameter declaration of block1 *)
:BLOCK1.BI0001 := TRUE (*Reference to the user-labeled parameter in
block1 from steps or transitions of block2 in
the same compound *)
:COMPOUND1:BLOCK1.BI0001 := TRUE (* Reference to the user-labeled parameter
in compound1, block1 from steps or
transitions of compound2, block2 *)

Internal References
An internal reference is a reference to a standard block parameter, a user-labeled parameter, or one
of the status attributes associated with a user-labeled parameter, that belongs to the block. In an
internal reference, a user-labeled parameter must be referred to by the user label assigned to the
parameter with the User Label Editor.

175
B0193UZ – Rev A 6. SFC/ST Configurator Functions

Examples
A user-labeled parameter declaration defined within the User Label Editor:
ERR_FLG : BI0001 ;
A reference to the user-labeled parameter in steps or transitions:
ERR_FLG := TRUE ;
A reference to a standard block parameter in steps or transitions:
BI0001 := TRUE ;

Function Invocation Operands


In IEC 61131-3 a function is defined as a program organization unit that when executed, yields
exactly one data element. Function invocations can be used in SFC/ST language as an operand in
an expression.

Example
TRUNC(3.8)
MID(’Temperature’, 4, 1)
CONCAT_STR( in_1 := ’Boiler_1’ , in_2 := ’Pressure’ )
You may omit the formal parameters, such as in_1. In any case, the sequence of formal
parameters must be correct.

Expressions
Expressions are composed of operators and operands. An operand must be a literal, variable, func-
tion invocation, constant, internal reference, external reference, or another expression.
The evaluation of an expression consists of applying the operators to the operands in a sequence
defined by the operator precedence shown in Table 6-6. The operator with the highest precedence
in an expression is applied first, followed by the operator of next lower precedence, and so on,
until evaluation is complete. Operators of equal precedence shall be applied as written in the
expression from left to right.

176
6. SFC/ST Configurator Functions B0193UZ – Rev A

Table 6-6. Operators

Operation Symbol Precedence


Parenthesization (Expression) Highest
Function evaluation Identifier(argument list) .
.
Negation -
.
Complement NOT
.
Multiply * .
Divide / .
Modulo MOD .
Add + .
Subtract - .
Less than* < .
Greater than* > .
Less than or equal to* <= .
Greater than or equal to* >= .
Equality = .
Inequality <> .
Boolean AND AND, & .
.
Boolean Exclusive OR XOR
.
Boolean OR OR .
.
Lowest

* These operators have equal precedence.


SFC/ST sequence language allows two kinds of expressions:
♦ String expressions
♦ Arithmetic expressions.

String Expressions
A string expression constructs a string from any mixture of:
♦ String literals
♦ Results of arithmetic expressions (including non-string external references)
♦ Internal reference to a string item
♦ External references of data type string.
Conversion of arithmetic values to ASCII character string expressions are automatically per-
formed as follows:
♦ A Boolean value is converted into one of the strings TRUE or FALSE.
♦ An integer value is converted into a string of digits, if positive, or into a minus sign
followed by a string of digits, if negative.
♦ A real value converts into a string of fixed length. The string contains:

177
B0193UZ – Rev A 6. SFC/ST Configurator Functions

♦ Mantissa: a sign character (+ or -), one digit, the decimal point, 6 digits, and the
character “e”.
♦ Exponent: a sign character (+ or -), and two digits.
♦ Examples: +8.800497e+01, -7.423075e-13
A string expression can occupy up to 80 characters. If it exceeds 80 characters, no error message is
generated and the excess characters are ignored.
Trailing blanks of the elements that make up the expression are not removed. Trailing blanks of
the string expression are also not removed.
An external reference is interpreted as data type string if, and only if, it is preceded by the keyword
STRING. Without that keyword, arithmetic values retrieved from the external reference are con-
verted to ASCII as described above.

Examples
♦ 7 * 10 + 6
♦ CONCAT_STR (’7’,’6’)
♦ IO0003
If IO0003 = 76, then the above three examples yield: ‘76’
♦ CONCAT_STR (STRING :.NAME , ’biphenyl_temp =’ , RO0002)
If the compound name = ‘COMP_64’ and RO0002 = 27.4, then the above example
yields:
’COMP_64 biphenyl_temp = +2.740000e+01’
♦ CONCAT_STR (’string’ , SN0010 , 3 * i , :COMP:BLK.IO0003)
The result of the above example consists of: the characters ‘string’, contents of
SN0010 (without trailing blanks), the ASCII representation of the value of 3 * i, and
the ASCII representation of the value stored in COMP:BLK.IO0003.

Arithmetic Expressions
Arithmetic expressions include integer, real, and Boolean expressions.
Integer arithmetic expressions are those in which the operators operate on integer operands only,
and the results are integers.
In real arithmetic expressions, the operators operate on all real operands or a combination of inte-
ger and real operands. In the latter case, the integer value is changed to real before the operator is
applied. The results are real.
In Boolean arithmetic expressions, the Boolean result is derived by applying the logical operator
NOT to a Boolean value, or by applying the relational operators (=, <>, <=, >=, <, or >) to com-
patible operands, either arithmetic or string. Examples of Boolean expressions include:
BI0001 := NOT BI0002 ;
BI0003 := cycle_no = 6 ;
This assigns the value TRUE (1) to parameter BI0003 when the integer variable
cycle_no has a value of 6; any other value of cycle_no sets BI0003 to FALSE (0).
BI0004 := cycle_no <> last_cyc ;
This assigns the value TRUE (1) to parameter BI0004 when the integer variable
cycle_no is not equal to the integer variable last_cyc; if the two variables are equal,
BI0004 is set to FALSE (0).

178
6. SFC/ST Configurator Functions B0193UZ – Rev A

Boolean expressions (and IF conditional clauses) can also use string comparisons to determine
Boolean values.
The following string items may be compared:
♦ String constants
♦ Local string scalars (block or subroutine variables, or subroutine arguments)
♦ Subsets of local string scalars using the MID function
♦ Elements of local string arrays (block or subroutine variables, or subroutine
arguments).
Two string expressions can only be tested on equality or inequality. The result of such a compari-
son yields a Boolean value.
In a string comparison, a reference to an FPN may only appear on the left hand side of the equal-
ity operator and must be preceded by the keyword STRING.

NOTE
1. Results of invocation of CONCAT_STR can not be compared with each other.
2. String expressions containing CONCAT_STR can not be compared with each
other.

When entire strings are being compared, trailing blanks of the strings (on either the left or right
hand side of the comparison) are stripped away. As a result, the following Boolean expressions all
yield the same result:
IF STRING :A:B.SN0001 = ’COOL ’ THEN ...
IF STRING :A:B.SN0001 = ’COOL’ THEN ...
IF SN0001 = ’COOL ’ THEN ...
IF ’COOL’ = SN0001 THEN ...
When the expression is comparing string subsets, the trailing blanks are not stripped. For
instance, the following two statements do not yield the same result.
BI0001 := MID (SN0002, 5, 1) = ’COOL ’ ;
This assigns a value of TRUE to the parameter BI0001 when the first five characters
of the string variable are C, O, O, L, and space. If any of the first characters differ,
BI0001 is set to FALSE.
BI0001 := MID (SN0002, 4, 1) = ’COOL ’ ;
In this example, BI0001 can never be true since the subset does not specify enough
characters, and since it is a subset that is being compared, the trailing space in
’COOL ’ is not stripped away.
Other examples of valid string comparisons include:
BO0001 := LoopNamesArr[14] = SN0005 ;
IF MID (SN0003, 12, 61) = ’TempLoop1988’ THEN ...
BI0001 := STRING :COMP4711:BLK0011.SN0010 = ’COMP002’ ;

Functions
SFC/ST sequence blocks supports the following types of functions:

179
B0193UZ – Rev A 6. SFC/ST Configurator Functions

♦ Transfer
♦ Arithmetic
♦ Concatenation
♦ String extraction.
Table 6-7 lists the functions that are supported.
Table 6-7. SFC/ST Functions

Transfer Arithmetic Concatenation String Extraction


ORD ABS CONCAT_STR MID
ROUND SQRT
TRUNC

Transfer functions convert values of one data type into another data type. They have one parame-
ter and deliver one result. A transfer function may be a simple expression by itself or an operand
in a more complex expression.
Arithmetic functions perform an algebraic operation on an integer or real value. An arithmetic
function may be a simple expression by itself or an operand in a more complex expression.
CONCAT_STR concatenates any mixture of elements to a string type result.
MID extracts a subset of characters from a string type variable.

ABS
Syntax
ABS(n)
where:
n := real or integer value

Description
ABS yields the absolute equivalent of the real or integer type value. The data type of the result is
that of the input.

Examples
ABS(-6) = 6
ABS(3.8888) = 3.8888
ABS(0) = 0

180
6. SFC/ST Configurator Functions B0193UZ – Rev A

CONCAT_STR
Syntax
CONCAT_STR(in_1, in_2, .. in_i)
where:
2 ≤ i ≤ 80
in_ := values of type REAL, DINT, BOOL, STRING, STRING6, STRING12, or
STRING80

Description
CONCAT_STR concatenates any mixture of elements to a string type result. Trailing blanks of
elements that make up the concatenation are not removed. Trailing blanks of the result string are
also not removed. The result string can occupy up to 80 characters. Characters in excess of 80 are
ignored and no operational error is issued. The conversion of elements of an arithmetic value to
ASCII characters is automatically performed as follows:
♦ A Boolean value is converted into one of the strings TRUE or FALSE
♦ An integer value is converted into a string of digits, if positive, or into a minus sign
followed by a string of digits, if negative.
♦ A real value is converted into a string of fixed length.The string contains:
♦ For the mantissa: a sign character (+ or -), one digit, the decimal point, six digits
and the character ’e’.
♦ For the exponent: a sign character (+ or -), and two digits.
Examples:
+5.434356e+03, -4.123456e-12
If (and only if ) an external reference (FPN) is preceded by the keyword STRING, it is expected to
be of data type string.
CONCAT_STR cannot be part of a string comparison. Examples of invalid comparisons:
CONCAT_STR(in_1 := ’AB’,in_2 := ’CD’) <> ’ABCD’
’ABCD’ = CONCAT_STR(in_1 := ’AB’,in_2 := ’CD’)

Example
Message := CONCAT_STR(in_1,in_2) ;
where:
in_1 := ’Temp ’
in_2 := ’High’
Message := ’Temp High’

181
B0193UZ – Rev A 6. SFC/ST Configurator Functions

MID
Syntax
MID(s,l,p)
where:
s := value of type STRING, STRING6, STRING12, or STRING80
l := integer value for length of string
p := integer value for starting position of subset

Description
MID separates a subset of characters from the string type variable s beginning at the start position p
with the length l. The data type of the result is a string type.

NOTE
No string constants are allowed for s. This exception to the IEC 61131-3 standards
is due to the HLBL syntax.

Example
string_var := ‘Example_string’ ;
a := MID(string_var, 3, 4) ;
where:
‘mpl’ := a

ORD
Syntax
ORD(v)
where:
v := value of type enumerated, boolean, or integer

Description
ORD takes the expression v of an ordinal type value and returns an integer result.
If v is an integer type value, ORD returns the value unchanged.
If v is a Boolean value, then ORD(FALSE) = 0 and ORD(TRUE) = 1.
If v is an enumerated value, then ORD yields the integer ordinal number in the range of values for
that enumerated type.

Examples
ORD(FALSE) = 0
ORD(123) = 123
ORD(ACTIVE) = 1

182
6. SFC/ST Configurator Functions B0193UZ – Rev A

ROUND
Syntax
ROUND(r)
where:
r := real value

Description
ROUND takes a real value r and returns an integer result that is the value of the real argument
rounded to the nearest integer.
If the argument r is nonnegative, then ROUND(r) is equivalent to TRUNC(r + 0.5); otherwise, it is
equal to TRUNC(r - 0.5).

Examples
ROUND(3.4) = 3
ROUND(-3.6) = -4

SQRT
Syntax
SQRT(n)
where:
n := real or integer value

Description
SQRT computes the real, square root of the absolute value of the real or integer type value n. The
data type of the result is real.

Examples
SQRT(25) = 5.0
SQRT(1.44) = 1.2
SQRT(0.0) = 0.0

TRUNC
Syntax
TRUNC(r)
where:
r := real value

Description
TRUNC converts a real type value into an integer result that is the integer part of the real
argument r.

183
B0193UZ – Rev A 6. SFC/ST Configurator Functions

Examples
TRUNC(3.8) = 3
TRUNC(-3.8) = -3

Function Blocks
The SFC/ST function blocks:
♦ Perform operations on data (procedural)
♦ Alter the flow of control
♦ Manipulate the elements of an array.
Table 6-8 lists the available function blocks.

Table 6-8. Function Blocks

Procedural Flow Control Array


ABORT EXIT MULT_ARRAY
ACTCASES RETRY SET_ARRAY
ACTIVATE WAIT SUM_ARRAY
BIT_PATTERN
OVERWRITE_STR
SENDCONF
SENDMSG
SET_SBXS
START_TIMER
STOP_TIMER
TSENDCONF

All elements of an array can be manipulated in one stroke by means of an array function block.
The return parameter is an internal reference to a:
♦ User array parameter or if defined, its user label name
♦ Block local array variable
♦ Subroutine local array variable
♦ Input/output array parameter.
The elements of an external array (FPN array) cannot be manipulated by an array function.

ABORT
Syntax
ABORT(block := f) ;
where:
f := :compound_nam.block_nam

184
6. SFC/ST Configurator Functions B0193UZ – Rev A

where:
compound_nam is compound name (1 to 12 characters)
block_nam is block name (1 to 12 characters).

Description
ABORT deactivates a sequence (IND, DEP, or EXC) or monitor (MON) block by writing a FALSE
value to the ACTIVATE parameter of the addressed block.

Example
ABORT(block := :REACT_LOGIC:FILL) ;

ACTCASES
Syntax
ACTCASES(block := f, act := p) ;
where:
f := :compound_nam:block_nam or ::block_nam
p := pattern string of A, I, or - characters in any combination (1 to 16 characters)
where:
compound_nam is compound name (1 to 12 characters).
block_nam is block name (1 to 12 characters).

Description
ACTCASES sets the activity status of individual cases in the monitor case statement of the specified
monitor (MON) block. An activation pattern represents the new activity states of the cases
belonging to the addressed MON block.
Each character in the activation pattern corresponds to a case in that block. The characters
allowed in the pattern are A, I, and -:
A = Active
I = Inactive
- = No changes in activity state
The first character stands for the first case in the monitor case statement, the second character for
the second case, and so on. Any cases not specified in the pattern are left as they are.

Example
ACTCASES(block := ::FILL, act := ’A-AIIA---IA-I’) ;

ACTIVATE
Syntax
ACTIVATE(block := f) ;
where:
f := :compound_nam.block_nam

185
B0193UZ – Rev A 6. SFC/ST Configurator Functions

where:
compound_nam is compound name (1 to 12 characters)
block_nam is block name (1 to 12 characters)

Description
ACTIVATE starts a sequence (IND, DEP, or EXC) or monitor (MON) block by writing a TRUE
value to the ACTIVATE parameter of the addressed block.

Example
ACTIVATE(block := :REACT_LOGIC:FILL) ;

BIT_PATTERN
Syntax
BIT_PATTERN(out := n, in := n) ;
where:
n := name of integer or Boolean data type:
where:
♦ Integer data types:

II000n (where n = 1 to 8)
IO000n (where n = 1 to 5)
variable_name (a block or subroutine integer variable, or an input/output param-
eter of a subroutine)

♦ Boolean data types:


BI00nn (where nn = 01 to 24)
BO00nn (where nn = 01 to 16)
BA000n (where n = 1 to 4)
variable_name (an array block or subroutine Boolean variable, or an input/out-
put parameter of a subroutine)

Description
BIT_PATTERN enables the:
♦ Packing of a set of Boolean values into a bit pattern
♦ Unpacking of a bit pattern into a set of Boolean values.
The data type of the out parameter determines whether the bits are packed or unpacked. If the
out parameter is an integer parameter, a set of Boolean values are packed into the integer. If the
out parameter is a Boolean or a Boolean array parameter, the integer value is unpacked into the set
of Boolean parameters.

186
6. SFC/ST Configurator Functions B0193UZ – Rev A

Examples
BIT_PATTERN(out := IO0004, in := BA0003) ;
(* all 16 elements of BA0003 are packed as bit pattern into IO0004 *)
BIT_PATTERN(out := II0008, in := BO0001) ;
(* all 16 boolean output parameters are packed as bit pattern into
II0004 *)
BIT_PATTERN(out := II0001, in := Loc_Bool_arr) ;
(* up to 32 elements of the local boolean array Loc_Bool_arr are
packed as a bit pattern into II0001 *)
BIT_PATTERN(out := BI0001, in := II0002) ;
(* 24 bits of II0002 are used to give 24 boolean input parameters
a boolean value *)
BIT_PATTERN(out := BO0001, in := Loc_Int_Var) ;
(* 16 bits of the local integer variable Loc_Int_Var are used
to give 16 boolean output parameters a boolean value *)

EXIT
Syntax
EXIT( ) ;

Description
When executed, EXIT terminates the block algorithm. That is, deactivates the block. EXIT can be
used in subroutines, SBXs, and/or the main routine.

MULT_ARRAY
Syntax
MULT_ARRAY (value := in, dest := a) ;
where:
in := input expression of type real or integer
a := destination array of real or integer values

Description
MULT_ARRAY multiplies all elements of a destination array a by the value of the input expression in.
The data type of the input expression and destination array must be real or integer.

Examples
MULT_ARRAY (value := -1.2 * Max_Level, dest := RA0001) ;
MULT_ARRAY (value := 2, dest := IA0002) ;

187
B0193UZ – Rev A 6. SFC/ST Configurator Functions

OVERWRITE_STR
Syntax
OVERWRITE_STR(result := r, insert := s, len := l, pos := p) ;
where:
r := result string of any string data type
s := input string of any string data type
l := integer value for length of the inserted string
p := integer value for position where to start overwriting result string

Description
OVERWRITE_STR inserts a number of characters l from the string type input variable s into the
string type result variable r at a given position p. The characters inserted overwrite the existing
characters and the length of the result string does not change.

Example
OVERWRITE_STR(result := SN0001, insert := ’ABC’, len := 3, pos := 4 ) ;
If SN0001 = ’EXAMPLE_STR’ before the invocation of overwrite, then OVERWRITE_STR yields
SN0001 = ’EXAABCE_STR’.

RETRY
Syntax
RETRY( ) ;
RETRY directs the logic to re-execute the erroneous statement that caused the SBX to be executed.
The RETRY statement can be used only within the two error handling SBXs. RETRY is an alternate
exit point from the two error handling SBXs.

SENDCONF
Syntax
SENDCONF(msg := m, dest := g) ;
where:
m := message of any string type
g := destination message group ‘MSGGR1’, ‘MSGGR2’, ‘MSGGR3’, or ‘MSGGR4’

Description
SENDCONF sends a message interactively to logical devices or objects that act like logical devices (for
example, printers and historians).
Upon executing SENDCONF, the standard block parameter SUSPND (suspended on message), is set
true and statement execution is suspended until SUSPND is reset to false externally.
The message must be less than 80 characters.

188
6. SFC/ST Configurator Functions B0193UZ – Rev A

Examples:
SENDCONF(msg := ’Beginning New Batch’, dest := ’MSGGR1’) ;
SENDCONF(msg := CONCAT_STR(in_1 := ’Beginning Batch Number =’,
in_2 := batchno), dest := ’MSGGR2’) ;

SENDMSG
Syntax
SENDMSG(msg := m, dest := n) ;
where:
m := message of any string type
n := name of destination, which is any one of the following:
♦ User string parameter name = SN00nn (where nn = 01 to 10)
♦ User label name
♦ Message group ‘MSGGR1’, ‘MSGGR2’, ‘MSGGR3’, or ‘MSGGR4’.

Description
SENDMSG sends a message to:
♦ Logical devices or objects that act like logical devices (for example, printers and
historians)
♦ User string parameters or if defined, their user label name.
The message must be less than 80 characters.

Examples
SENDMSG(msg := ’Beginning New Batch’, dest := status_flg)
SENDMSG(msg := CONCAT_STR(in_1 := ’Beginning Batch Number = ’,
in_2 := batchno), dest := ’MSGGR2’) ;

SET_ARRAY
Syntax
SET_ARRAY (value := in, dest := a) ;
where:
in := input expression of type real, integer, boolean, or any string
a := destination array of type real, integer boolean, or any string

Description
SET_ARRAY assigns the value of the input expression in to all elements of the destination array a.
The data type of the input expression and destination array may be either string or arithmetic.

Examples
SET_ARRAY (value := 0, dest := RA0001) ;
SET_ARRAY (value := II0008 < 4 OR BI0023, dest := BA0001) ;
SET_ARRAY (value := ’Initialized String’, dest := STR_A2) ;

189
B0193UZ – Rev A 6. SFC/ST Configurator Functions

SET_SBXS
Syntax
SET_SBXS(avail := p) ;
where:
p := availability pattern string of E, D or - characters in any combination
(1 to 5 characters) for SBX1 to SBX5.
where:
E = Enable
D = Disable
- = No changes in availability state

Description
SET_SBXS uses its availability pattern to manipulate the five sequence block parameters DISBX1,
DISBX2, DISBX3, DISBX4 and DISBX5. When an SBX is enabled (DISBXi = false) the SBX is
available, and the block will execute the contents specified in the SBX when the corresponding
event occurs.
Each character in the availability pattern corresponds to an SBX. The characters allowed in the
pattern are E, D, and - (defined above).
The first character refers to SBX1, the second character refers to SBX2, and so forth. If the num-
ber of characters in the availability pattern is less than the maximum number of SBXs, the avail-
ability states of the unnamed SBXs are left as they are.

Example
SET_SBXS(avail := ’E-EDD’) ;
This invocation of SET_SBXS:
♦ Enables the ’TO_SYS_ERROR’ SBX (DISBX1 = false)
♦ Leaves the ’TO_USR_ERROR’ SBX as it was (DISBX1 is not changed)
♦ Enables the ’TO_INACTIVE’ SBX (DISBX1 = false)
♦ Disables the ’TO_MANUAL’ SBX (DISBX1 = true)
♦ Disables the ’TO_PAUSED’ SBX (DISBX1 = true).

START_TIMER
Syntax
START_TIMER(tim := f, init := v) ;
where:
f := :compound_nam:block_nam.tim_nam or ::block_nam.tim_nam
v := real or integer value for initializing the timer (in seconds)

190
6. SFC/ST Configurator Functions B0193UZ – Rev A

where:
compound_nam is compound name (1 to 12 characters)
block_nam is block name (1 to 12 characters)
tim_nam is timer name (TIMR1, TIMR2, TIMR3, TIMR4)

Description
START_TIMER turns on a specified timer in a timer (TIM) block. START_TIMER optionally initial-
izes a timer to the number of seconds specified by the value v. The timer is then incremented by
the value of the block’s period each time the block is scheduled to be executed. Timers are updated
as long as the TIM block is in automatic and the compound is on.

Example
START_TIMER(tim := ::Bl_NAME.TIMR3, init := 2.5) ;

STOP_TIMER
Syntax
STOP_TIMER(tim := f) ;
where:
f := :compound_nam:block_nam.tim_nam or ::block_nam.tim_nam
where:
compound_nam is compound name (1 to 12 characters)
block_nam is block name (1 to 12 characters)
tim_nam is timer name (TIMR1, TIMR2, TIMR3, TIMR4)

Description
STOP_TIMER turns off a specified timer in a timer (TIM) block.

Example
STOP_TIMER(tim := ::Bl_NAME.TIMR3) ;

TSENDCONF
Syntax
TSENDCONF(msg := m, dest := g, time := r, time_out := n) ;
where:
m := message of any string type
g := destination message group ‘MSGGR1’, ‘MSGGR2’, ‘MSGGR3’, or MSGGR4’
r := real value for the time limit (in seconds)

191
B0193UZ – Rev A 6. SFC/ST Configurator Functions

n := time-out identifier, which is any one of the following:


♦ User parameter or if defined, its user label name
♦ Block local variable
♦ Subroutine local variable
♦ Input/output parameter of subroutines.
The identification must refer to an object of data type Boolean.

Description
TSENDCONF sends a message interactively to logical devices or objects that act like logical devices
(such as printers and historians).
Upon executing TSENDCONF, the standard block parameter SUSPND (suspended on message), is
set true and statement execution is suspended until SUSPND is reset to false externally or the
time limit expires.
The return parameter time_out is set to true if the time limit is expired. The return parameter
time_out is set to false if SUSPND is externally set to false before the time limit is expired.
The message must be less than 80 characters.

Examples
TSENDCONF(msg := ’Beginning New Batch’, dest := ’MSGGR1’,time := 20.0,
time_out := T_OUT_FLAG) ;
TSENDCONF(msg := CONCAT_STR(in_1 := ’Beginning Batch Number = ’,
in_2 := batchno), dest := ’MSGGR2’, time := 60.0,
time_out := loc_bool1) ;

SUM_ARRAY
Syntax
SUM_ARRAY (value := in, dest := a) ;
where:
in = input expression of data type real or integer
a = array of real or integer values

Description
SUM_ARRAY adds the value of the input expression in to all elements of the destination array a. The
data type of the input expression and destination array must be real or integer.

Examples
SUM_ARRAY (value := -1.2 * Max_Level, dest := RA0001) ;
SUM_ARRAY (value := 2, dest := IA0002) ;

192
6. SFC/ST Configurator Functions B0193UZ – Rev A

WAIT
Syntax
WAIT( time := n ) ;
where:
n = real or integer value for delay time in seconds

Description
WAIT delays execution of statements a specified number n of seconds. The time period expression
n must yield an integer or real value which is interpreted as number of seconds. If the time period
is less than 0.1, block execution is always suspended by one block period, regardless of the value of
the period.

Example
WAIT( time := 1.0 ) ;

193
B0193UZ – Rev A 6. SFC/ST Configurator Functions

194
Index
A
ABORT 184
About 135
ABS 180
Accessing the Constant Display dialog box 154
Accessing the graphical Transition Display window 144
Accessing the Step Display window 140
Accessing the textual Transition Display window 149
Accessing the User Label Display dialog box 155
Accessing the Variable Display dialog box 156
ACTCASES 185
ACTIVATE 185
Arithmetic expressions 178
Assignment statements 164

B
BIT_PATTERN 186
Block configuration procedures overview 2, 3
Block Configurator
child window area 19
common toolbar 19
Edit menu 20
Editor menu 25
File menu 23
Help menu 27
menu bar 19
menus 22
overview 12
parent window 19
SFC toolbar 19
status bar 20
Symbols menu 26
system integration diagram 13
title bar 19
toolbars 19
View menu 24
Window menu 26
Block detail display 126
Block inclusion concept 28
Block Information editor 46
Block modes
AUTO 124
BMAN 124
MAN 124

195
B0193UZ – Rev A Index

S-AUTO 124
Boolean (BOOL) data type 171

C
Cascade 134
CASE statement 165
Changing block mode and state 137
Character set 166
Characters 166
Checking syntax of a library object 121
Comments 27, 169
Common toolbar
functions 20
Compatibility issues 15
Compatibility with standards 15
Compiler
HLBL 14
sequence block 12
Compiling and installing the sequence block 103
CONCAT_STR 181
Concept
routine and block inclusion 28
Constant
adding 68
deleting 69
editing include file pathname 69
modifying 68
Constant Display dialog box 154
Constant Editor 67
Constants 173
Control configurator interface 14
Copying
sequence block 31
Copying a library object 116

D
Data types 170
Deleting a library object 40
Display Manager
Display menu 133
File menu 133
Help menu 135
menus 133
overview 13, 123
parent window 132
running in view-only mode 130
system integration diagram 14
View menu 133
Window menu 134

196
Index B0193UZ – Rev A

Display menu
Display Manager 133
Display menu, Display Manager
ST-trace 134

E
Edit menu
Block Configurator 20
commands 20
Library Configurator 107, 110
Edit menu commands
Clear 22
Clear Block 22
Clear Main 22
Copy 20
Cut 20
Delete 21
Embed 22
Paste 21
Redo 21
Replace Block from 21
Replace from 21
Replace Main from 21
Undo 21
Validate SFC 22
Editor menu
Block Configurator 25
Library Configurator 111
Editor menu, Block Configurator
Block Variable 25
Constant 25
Macro 25
Routine 25
SFC 25
Step 25
Subroutine parameter 25
Subroutine Variable 25
Transition 25
User label 25
Editor menu, Library Configurator
Constant 111
Macro 111
Routine 111
SFC 111
Step 111
Subroutine parameter 111
Transition 111
User label 111

197
B0193UZ – Rev A Index

Variable 111
Editor operations common to Block and Library Configurators 117
Embedding an included block or routine 34
EXIT 187
Expressions 176
External interfaces
control configurator 14

F
File menu
Block Configurator 23
Display Manager 133
Library Configurator 108
File menu, Block Configurator
Cancel 24
Compile 23
Delete from library 23
Done 23
History 23
Include 23
Print 24
Print Preview 24
Print Select 24
Print Setup 24
Save Routine to library 23
Save to library 23
SFCDM Protection 24
File menu, Display Manager
Exit 133
File menu, Library Configurator
Delete 109
History 109
Include 109
New DEP 109
New EXC 109
New IND 109
New Main 109
New SBX 109
New Subroutine 109
Open 109
Print 109
Print Preview 110
Print Select 110
Print Setup 110
Save 109
Save As 109
Save Routine 109
Syntax Check 109

198
Index B0193UZ – Rev A

Full pathname (FPN) operands 174


Full pathname operand (external reference) 174
Function 176
Function block control statements 164
Function blocks 184
ABORT 184
ACTCASES 185
ACTIVATE 185
BIT_PATTERN 186
EXIT 187
MULT_ARRAY 187
OVERWRITE_STR 188
RETRY 188
SENDCONF 188
SENDMSG 189
SET_ARRAY 189
SET_SBXS 190
START_TIMER 190
STOP_TIMER 191
SUM_ARRAY 192
TSENDCONF 191
WAIT 193
Function invocation operands 176
Functions 179
ABS 180
CONCAT_STR 181
MID 182
ORD 182
ROUND 183
SQRT 183
TRUNC 183
Functions common to Block and Library Configurators 114

G
Graphical Transition Display Color settings 146
Graphical Transition Display window 141, 143, 144

H
Help menu
Block Configurator 27
Display Manager 135
Library Configurator 113
Help menu, Block Configurator
About 27
Index 27
Using Help 27
Help menu, Display Manager
About 135

199
B0193UZ – Rev A Index

Index 135
Using Help 135
Help menu, Library Configurator
About 113
Index 113
Using Help 113

I
Identifiers 168
IF statement 164
Include file
adding 43
browsing 44
deleting 44
example 45
Include file pathname
modifying 43
Include files
using 42
Including a library object 33
Inclusion, handling 28
Inclusion, levels 30
Integer (DINT) data type 171
Internal references 175

K
Keywords 168

L
Library block
adding 118
editing 119
Library Configurator
child window area 107
common toolbar 107
Edit menu 107, 110
Editor menu 111
File menu 108
Help menu 113
menu bar 107
menus 108
overview 12
parent window 106
SFC toolbar 107
status bar 107
title bar 106
toolbars 107

200
Index B0193UZ – Rev A

View menu 110


Window menu 112
Library Main routine
adding 119
editing 119
Library object configuration flow chart 6
Library object configuration procedures overview 7
Library object filenames 28
Library SBX
adding 120
editing 121
Library subroutine
adding 119
editing 120
Literals 172

M
Macro
adding 76
deleting 77
editing include file pathname 77
example 78
modifying 77
Macro Editor 75
Macros 163
definition 163
Menus
Block Configurator 22
Library Configurator 108
Microsoft foundation classes 12
MID 182
MULT_ARRAY 187

O
Object filenames 28
Object protection at run time 128
Operate the Step Display window 140
Operate the Variable Display dialog box 156
Operating the Constant Display dialog box 155
Operating the graphical Transition Display window 145
Operating the textual Transition Display window 150
Operating the User Label Display dialog box 155
Operator remarks 27, 169
ORD 182
OVERWRITE_STR 188

P
Printing configuration data 91

201
B0193UZ – Rev A Index

print options 92
selecting configuration data 93
Printing on Solaris workstations
printing to a file 101
printing to a generic file 102
printing to a printer 100
setting up a printer 99
Printing on Windows NT workstations
previewing the printed report 95
printing to a file 98
printing to a printer 97
setting up a printer 95
Protection class
setting a single protection class 90
setting different protection classes 91
Protection class settings 127

Q
Quick start 1

R
Real data type 171
Replacing definitions from library 34
Report configuration 91
RETRY 188
ROUND 183
Routine and block inclusion concept 28
Routine selection 31
Routine Selection dialog box 32

S
Save an object in a library 121
Saving a routine in a library
Block Configurator 39
Saving block in library
Block Configurator 37
SBX
adding a block SBX 85
deleting a block SBX 86
editing a block SBX 85
example 86
SBX Editor 83
Searching for included files 41
Select a routine to edit 32
Selecting a library object to edit 115
Selecting an SFC for display 137
Selection statements 164
SENDCONF 188

202
Index B0193UZ – Rev A

SENDMSG 189
Sequential Function Chart 1
deleting a link 55
displaying structured text 56
editing 52
editing a step name 56
example 47
inserting a branch 53
inserting a branch leg 54
inserting a horizontal line 56
inserting a link 54
inserting a step 53
inserting a transition 53
inserting a vertical line 56
validating the structure 56
SET_ARRAY 189
SET_SBXS 190
Setting an access level 129
SFC 1
SFC Editor 47
SFC graphical objects
branch 49
branch leg 49
horizontal line 49
link 49
Step 49
transition 49
vertical line 49
SFC network 160
SFC Sequence Block window
Display Manager 135
SFC toolbar 50
SFC/ST
Block Compiler 12
block compiler 12
Block Configurator overview 12
Display Manager overview 13
Library Configurator overview 12
Library Configurator parent window 106
System overview diagram 11
SFC/ST Library Configurator operations 105
SFC/ST Sequence Block Configurator operation 17
Special symbols 167
SQRT 183
sstate data type 172
Standard Block Exception Handlers (SBXs)
definition 162
Standards compatibility
IEC 61131-3 15
START_TIMER 190

203
B0193UZ – Rev A Index

statf_Type data type 171


Step
copying and pasting names 64
editing statements 59
example 59
inserting a Compound/Block/Parameter 63
inserting a function 60
inserting a function block 61
inserting a subroutine 62
Step Display window
Display Manager 139
Step Editor 57
Step specification with Structured Text (ST) 163
Stepping through steps and transitions of main routine 138
STOP_TIMER 191
String data 171
String expressions 177
ST-Trace window 150, 153
Subroutine
adding a block subroutine 80
deleting a block subroutine 81
example 81
modifying a block subroutine 80
reordering a block subroutine 81
Routine Selection dialog box 78
Subroutine Editor 78
Subroutine input/output parameters, definition 161
Subroutine local variables
definition 161
Subroutine parameter
adding 87
deleting 89
example 89
modifying 88
Subroutine Parameter Editor 86
SUM_ARRAY 192
Symbols menu
Block Configurator 26
Symbols menu, Block Configurator
Compblockpar 26
Function blocks 26
Functions 26
Subroutines 26
Symbols menu, Library Configurator
Function blocks 112
Functions 112
Subroutines 112
System integration 13
System overview diagram 11

204
Index B0193UZ – Rev A

T
Textual Transition Display window 148, 149
Toolbar
SFC 50
Tracing subroutines 153
Transition
editing the condition 66
example 67
Transition Display window 141
graphical 141, 143, 144
textual 148, 149
Transition Editor 64
Transition specification with Structured Text (ST) 165
TRUNC 183
TSENDCONF 191

U
User label
adding 74
deleting 75
editing include file pathname 75
example 75
modifying 74
User Label Display dialog box 155
User Label Editor 73
User-labeled parameter 159

V
Variable
adding 71
deleting 72
editing include file pathname 72
example 73
modifying 71
Variable Display dialog box 156
Variable Editor 69
Variables 173
Version history
Block Configurator 45
View menu
Block Configurator 24
Display Manager 133
Library Configurator 110
View menu, Block Configurator
Compiler Errors 24
Status Bar 24
Toolbars 24
View menu, Display Manager
Status Bar 133

205
B0193UZ – Rev A Index

View menu, Library Configurator


Status Bar 110
Syntax Check Errors 110
Toolbars 110
Vocabulary 166

W
WAIT 193
Window menu
Block Configurator 26
Display Manager 134
Library Configurator 112
Window menu, Block Configurator
Arrange icons 27
Cascade 27
Close 27
Close all 27
recent window 27
Tile 27
Window menu, Display Manager
Arrange Icons 134
Close 135
Normalize 134
recent window 135
Tile 134
Window menu, Library Configurator
Arrange icons 112
Cascade 112
Close 112
Close all 113
recent window 113
Tile 112

33 Commercial Street
Foxboro, Massachusetts 02035-2099
United States of America
www.foxboro.com
Inside U.S.: 1-866-PHON-IPS (1-866-746-6477)
Outside U.S.: 1-508-549-2424 or contact your local Foxboro representative.
Facsimile: 1-508-549-4999
Printed in U.S.A. 1002

Das könnte Ihnen auch gefallen