You are on page 1of 253

FST4 Manual

Non-authorized DOC version

Bernhard Plagemann
Beck IPC GmbH
http://www.beck-ipc.com/fst
mail to: fst@beck-ipc.com

FST Version 4.02.21 Manual 1


Contents
1 Release Notes ........................................................................................................... 9
1.1 Installation of the FST 4.02 ................................................................................ 9
1.2 Uninstalling......................................................................................................... 9
1.3 Known Problems................................................................................................ 9
1.3.1 ONLINE HELP ............................................................................................ 9
1.3.2 EXTERNAL TOOLS.................................................................................. 10
1.3.3 TCP/IP....................................................................................................... 10
1.3.4 IO1x/IO4x .................................................................................................. 10
1.1.1 HC1X + RTC + DRAD + FESTOBUS ...................................................... 10
1.1.2 HC2X + AS-INTERFACE (CP96)............................................................. 10
1.1.3 HC2X + OM22 PLC SAFETY................................................................... 10
1.1.4 FIND & REPLACE .................................................................................... 10
1.1.5 STARTUP DRIVE ..................................................................................... 11
1.1.6 FILE HANDLING WITH FLOPPY DISK ................................................... 11
1.1.7 ONLINE ..................................................................................................... 11
1.1.8 FIRST LOGIN TO NEW HC16 ................................................................. 11
1.4 What is new compared to FST 4.01.16 ........................................................... 11
1.5 Bug fixes since FST 4.01.16............................................................................ 12
1.6 What is new compared to FST 3 ..................................................................... 12
1.7 History .............................................................................................................. 13
2 FST4 User documentation ...................................................................................... 14
2.1 The Main Window ............................................................................................ 14
2.1.1 Windows Basics........................................................................................ 14
2.1.1.1 The Title Bar ..................................................................................... 14
2.1.1.2 The System menu ............................................................................ 15
2.1.1.3 The Window Border.......................................................................... 15
2.1.1.4 Scrollbars.......................................................................................... 15
2.1.2 The Toolbar............................................................................................... 16
2.1.3 The Status Bar.......................................................................................... 17
2.1.4 The Menu .................................................................................................. 17
2.1.4.1 The Window Menu Commands........................................................ 18
2.1.4.2 The Edit Menu Commands .............................................................. 18
2.1.5 Viewing Properties .................................................................................... 19
2.1.6 Terminating FST ....................................................................................... 19
2.2 Getting Help ..................................................................................................... 20
2.2.1 The Aboutbox............................................................................................ 20
2.2.2 Tip of the Day............................................................................................ 20
2.2.3 Help Topics............................................................................................... 20
2.2.4 Context Help ............................................................................................. 20
2.2.5 The Message Window .............................................................................. 21
2.3 Working with Projects ...................................................................................... 22
2.3.1.1 Project Name and Comment............................................................ 22
2.3.1.2 Controller Types ............................................................................... 22
2.3.1.3 Organisation on Hard Disk............................................................... 22
2.3.2 The Project Tree Window ......................................................................... 23
2.3.3 Open an Existing Project.......................................................................... 24
2.3.4 Creating a New Project............................................................................. 25
2.3.5 Close the Current Project......................................................................... 26
2.3.6 The Project Settings ................................................................................. 26
2.3.6.1 The Project Directory........................................................................ 26
2.3.7 The Project Explorer ................................................................................. 27
2.3.8 Preparing the Project for Download ......................................................... 28
2.3.9 Downloading the Project to the Controller ............................................... 29
FST Version 4.02.21 Manual 2
2.3.10 Downloading an Update of the Project to the Controller...................... 29
2.3.11 Uploading Project Sources from the Controller.................................... 29
2.3.12 Listing the Compiled Project File .......................................................... 31
2.3.13 Removing Intermediate Files ................................................................ 31
2.3.14 The Project Documentation .................................................................. 31
2.4 Printing Projects ............................................................................................... 31
2.4.1 Print Preferences ...................................................................................... 33
2.4.2 Project Backup and Restore..................................................................... 34
2.5 Managing Control Programs............................................................................ 34
2.5.1 Creating New Programs ........................................................................... 34
2.5.2 Importing Modules from the Library ......................................................... 36
2.5.3 Program Properties................................................................................... 37
2.5.4 Deleting a Program ................................................................................... 38
2.5.5 Open a Program for Editing...................................................................... 39
2.5.6 Compiling a Program ................................................................................ 39
2.5.7 Selecting Programs for Download............................................................ 40
2.6 Controller Settings ........................................................................................... 41
2.6.1 Run Mode (Controller Settings)................................................................ 41
2.6.2 Drives (Controller Settings) ...................................................................... 43
2.6.3 Options (Controller Settings) .................................................................... 44
2.6.4 Password (Controller Settings)................................................................. 45
2.6.5 Download (Controller Settings) ................................................................ 45
2.7 The IO Configuration........................................................................................ 46
2.7.1 The IO Configuration Window .................................................................. 46
2.7.2 Adding and Editing IO Modules ................................................................ 47
2.8 The Driver Configuration.................................................................................. 49
2.8.1 The Driver Configuration Window ............................................................ 49
2.8.2 Adding a New Driver................................................................................. 50
2.8.3 Editing Driver Options ............................................................................... 51
2.9 The Allocation List............................................................................................ 52
2.9.1 The Allocation List Editor .......................................................................... 52
2.9.2 Adding and Editing Allocation List Entries ............................................... 53
2.9.3 Selecting an Operand from the Allocation List......................................... 54
2.10 Online Mode ................................................................................................. 54
2.10.1 Connecting the Controller to the PC for Online Mode ............................. 55
2.10.1.1 Communication Port Preferences ..................................................... 55
2.10.2 The Online Control Panel ......................................................................... 56
2.10.3 Entering the Controller Password............................................................. 57
2.10.4 Changing the Controller Password........................................................... 58
2.10.5 The Online Display ................................................................................... 58
2.10.6 Online Goto............................................................................................... 60
2.10.7 Changing the Online Display Format ....................................................... 60
2.10.8 Changing the Update Interval of the Online Display ................................ 60
2.10.9 Modifying Online Display Operand Values .............................................. 61
2.10.10 File Transfer .......................................................................................... 62
2.10.11 The Online CI Terminal......................................................................... 63
2.11 Programming in Statement List.................................................................... 64
2.11.1 The Statement List Editor ......................................................................... 64
2.11.2 The Shortcuts Window ............................................................................. 67
2.11.2.1 Inserting Module Calls ....................................................................... 67
2.11.2.2 Statement List Preferences............................................................... 68
2.11.3 Statement List Online ............................................................................... 69
2.11.4 Statement List Program Structure............................................................ 70
2.11.4.1 Step program ..................................................................................... 70
2.11.4.2 Parallel logic program........................................................................ 71
2.11.4.3 Executive part .................................................................................... 72
FST Version 4.02.21 Manual 3
2.11.4.4 Comments ......................................................................................... 72
2.11.5 Statement List Instructions Reference..................................................... 72
2.11.5.1 Statement List Organisation.............................................................. 72
2.11.5.2 STL conditional part .......................................................................... 73
2.11.5.3 STL Executive part ............................................................................ 74
2.11.5.4 Special functions - Extended STL ..................................................... 75
2.11.5.5 Arithmetic functions ........................................................................... 77
2.11.5.6 Module calls ....................................................................................... 77
2.11.6 Customising FST ...................................................................................... 78
2.11.6.1 The Project Directory......................................................................... 78
2.11.6.2 Communication Port Preferences ..................................................... 79
2.11.6.3 Statement List Preferences............................................................... 80
2.11.6.4 Print Preferences............................................................................... 81
2.11.7 The FST Runtime Library ......................................................................... 82
2.11.7.1 IO Scripts (Runtime Library).............................................................. 82
2.11.7.2 Drivers (Runtime Library) .................................................................. 84
2.11.8 External Tools ........................................................................................... 85
2.11.8.1 Adding or Modifying an External Tool............................................... 86
3 The FST PLC Operating System (Kernel) .............................................................. 88
3.1 PLC operands .................................................................................................. 88
3.1.1 Inputs ........................................................................................................ 88
3.1.2 Outputs...................................................................................................... 88
3.1.3 Flags ......................................................................................................... 89
3.1.4 Registers................................................................................................... 89
3.1.5 Timers....................................................................................................... 89
3.1.6 Counters ................................................................................................... 90
3.1.7 Constants.................................................................................................. 90
3.1.8 Function units............................................................................................ 90
3.1.9 Programs .................................................................................................. 91
3.1.10 Program statuses.................................................................................. 91
3.1.11 Errors..................................................................................................... 91
3.1.12 Initial execution flags............................................................................. 91
3.1.13 Retentive operands ............................................................................... 91
3.1.13.1 Configuration of the driver for retentive operands ............................ 92
3.1.14 Function modules for modifying operands ........................................... 92
3.2 Multitasking ...................................................................................................... 94
3.2.1 The Start/Stop Switch............................................................................... 95
3.2.2 The Run LED ............................................................................................ 95
3.2.3 Function blocks to control the execution of programs ............................. 95
3.3 Error Handling .................................................................................................. 96
3.3.1 Error handling without error program ....................................................... 97
3.3.2 Error handling with error program ............................................................ 97
3.3.3 Special treatment of I/O Errors................................................................. 98
3.3.4 Error handling function modules............................................................... 98
3.3.5 Overview of error numbers....................................................................... 99
3.4 The Command Interpreter (CI) ...................................................................... 100
3.4.1 Command input ...................................................................................... 101
3.4.2 Chaining of CI commands ...................................................................... 102
3.4.3 Mass display ........................................................................................... 102
3.4.4 Password protection ............................................................................... 102
3.4.5 Overview of CI commands ..................................................................... 103
3.4.6 Activating the CI / Logon ........................................................................ 103
3.4.7 X Release interface ................................................................................ 103
3.4.8 Commands for display of operands and statuses.................................. 103
3.4.9 Commands for modifying values ............................................................ 105
3.4.10 Program control commands................................................................ 106
FST Version 4.02.21 Manual 4
3.4.11 Commands for forcing inputs and outputs.......................................... 106
3.4.12 Commands embedded in drivers........................................................ 108
3.5 The Real-time Clock ...................................................................................... 108
3.5.1 Setting the clocks manually .................................................................... 109
3.5.2 Function modules for setting and reading the real-time clock............... 109
3.6 Miscellaneous ................................................................................................ 110
3.6.1 Mass storage for programs, drivers and files ......................................... 110
3.6.2 RAM for programs and drivers ............................................................... 110
3.6.3 Function blocks ....................................................................................... 111
4 FST Drivers Reference.......................................................................................... 113
4.1 Input and output modules .............................................................................. 113
4.1.1 PLC security............................................................................................ 113
4.1.2 Digital input and output modules ............................................................ 114
4.1.2.1 IMXX ................................................................................................ 114
4.1.2.2 OMXX ............................................................................................. 117
4.1.2.3 TM10............................................................................................... 125
4.1.2.4 ASXX .............................................................................................. 125
4.1.2.5 Address assignment matrix............................................................ 127
4.1.3 Analog input and output modules ........................................................... 129
4.1.3.1 IO1X................................................................................................ 130
4.1.3.2 IO4X................................................................................................ 132
4.1.3.3 I06X................................................................................................. 137
4.1.3.4 IO7X................................................................................................ 137
4.1.3.5 Address assignment matrix............................................................ 139
4.2 FEC and HC0x ............................................................................................... 140
4.2.1 Local Ios .................................................................................................. 140
4.2.1.1 FEC Standard................................................................................. 140
4.2.1.2 FEC Compact................................................................................. 141
4.2.1.3 HC0X .............................................................................................. 141
4.2.1.4 Debouncing of Inputs ..................................................................... 141
4.2.2 IO extension ............................................................................................ 141
4.2.3 Analogue Potentiometer ......................................................................... 142
4.2.4 Rotary Switch.......................................................................................... 142
4.2.5 Fast counters.......................................................................................... 142
4.2.6 Incremental Encoder............................................................................... 143
4.3 Actuator Sensor Interface.............................................................................. 144
4.3.1 The ASi configurer .................................................................................. 144
4.3.2 CI commands.......................................................................................... 146
4.3.3 Error numbers......................................................................................... 147
4.3.4 Function modules ................................................................................... 147
4.4 Festo Fieldbus Master ................................................................................... 148
4.4.1 Set Festo fieldbus parameters ............................................................... 148
4.4.2 Soft error behaviour ................................................................................ 149
4.4.3 Using the nominal configuration............................................................. 149
4.4.4 The Festo fieldbus configurer ................................................................. 149
4.4.5 Programming fieldbus operands ............................................................ 152
4.4.6 Function blocks ....................................................................................... 153
4.4.7 CI commands.......................................................................................... 156
4.4.8 Error numbers......................................................................................... 156
4.5 Festo Fieldbus Slave ..................................................................................... 156
4.5.1 Selecting the driver and assigning parameters...................................... 156
4.5.2 How to use the module FBSLAVE ......................................................... 157
4.5.3 Cyclic updates......................................................................................... 158
4.5.4 Get status................................................................................................ 158
4.5.5 A-cyclic updates...................................................................................... 158
4.5.6 Sample program ..................................................................................... 159
FST Version 4.02.21 Manual 5
4.6 Profibus DP (CP62) ....................................................................................... 159
4.6.1 Selecting the driver and assigning parameters...................................... 159
4.6.2 Configuration........................................................................................... 160
4.6.3 Error messages from the driver.............................................................. 160
4.6.4 Modules................................................................................................... 161
4.7 Profibus FMS (CP62)..................................................................................... 162
4.7.1 Configuring the driver and assigning parameters .................................. 162
4.7.2 Extended CI commands for PROFIFMS ................................................ 162
4.7.3 Function modules ................................................................................... 162
4.7.4 Object directory....................................................................................... 163
4.7.5 Error return codes from function modules.............................................. 165
4.7.6 Error codes in status variable................................................................. 165
4.7.7 Heterogeneous networks........................................................................ 165
4.8 FEC Remote I/O Expansion .......................................................................... 166
4.8.1 System Overview .................................................................................... 166
4.8.2 Configuring Slave FECs ......................................................................... 167
4.8.3 Configuring the Master FEC................................................................... 167
4.8.4 Master at Runtime .................................................................................. 168
4.8.5 Slave at Runtime .................................................................................... 168
4.8.6 Diagnostic Program Module (REMDIAG)............................................... 169
4.9 File Handling Modules ................................................................................... 169
4.9.1 Operation result codes ........................................................................... 174
4.10 Strings......................................................................................................... 175
4.10.1 Configuring the driver and assigning parameters .................................. 175
4.10.2 Initialisation of strings ............................................................................. 175
4.10.3 Extended CI commands for strings ........................................................ 176
4.10.4 Modules for handling strings .................................................................. 176
4.11 Screen and Keyboard................................................................................. 184
4.11.1 Introduction ............................................................................................. 184
4.11.2 Operation of the user interface............................................................... 185
4.11.3 Functionality ............................................................................................ 185
4.11.3.1 Attributes.......................................................................................... 186
4.11.3.2 Feature flags .................................................................................... 187
4.11.4 Configuring the driver and assigning parameters .................................. 187
4.11.5 Initialising the user interface................................................................... 188
4.11.5.1 Initialising the user interface in text form ........................................ 188
4.11.5.2 Statements for screen pages .......................................................... 188
4.11.6 Extended CI commands for the user interface....................................... 189
4.11.7 Modules for accessing the user interface............................................... 190
4.11.8 Complete example.................................................................................. 195
4.11.9 Special applications ................................................................................ 199
4.12 32-Bit Arithmetic ......................................................................................... 199
4.13 Incremental Encoder .................................................................................. 201
4.13.1 Init/Reset................................................................................................. 201
4.13.2 Read counter registers (values) ............................................................. 201
4.13.3 Load counter 1 with new value ............................................................... 202
4.13.4 Load counter 2 with new value ............................................................... 202
4.13.5 Load counter 3 with new value ............................................................... 202
4.14 Fast counters.............................................................................................. 203
4.14.1 Using the module FECCNTR ................................................................. 203
4.14.2 Required drivers ..................................................................................... 203
4.14.3 Reset of a Fast Counter ......................................................................... 203
4.14.4 Defining the operation of a Fast Counter ............................................... 203
4.14.5 Starting a Fast Counter .......................................................................... 205
4.14.6 Status of a Fast Counter......................................................................... 205
4.15 Positioning .................................................................................................. 205
FST Version 4.02.21 Manual 6
4.15.1 Import ...................................................................................................... 205
4.15.2 How to use the module ........................................................................... 206
4.15.3 Overview ................................................................................................. 206
4.15.4 Get status................................................................................................ 207
4.15.5 Move absolute......................................................................................... 208
4.15.6 Move relative........................................................................................... 208
4.15.7 Reference move ..................................................................................... 208
4.15.8 Override Speed....................................................................................... 209
4.15.9 Configure polarity.................................................................................... 209
4.15.10 Configure start speed and acceleration............................................ 209
4.15.11 Configure PID values (AM20 only) ..................................................... 210
4.15.12 Set actual position............................................................................. 210
4.15.13 Set positioning parameters (AM20 only) ............................................ 210
4.15.14 Set D/A output polarity (AM20 > S 2.2 only) ...................................... 210
4.15.15 Set P division (AM20 > S2.2 only) ...................................................... 210
4.15.16 Set counter input polarity (AM20 >= S 2.3 only) ................................ 210
4.15.17 Set acceleration multiplicator (AM20 >= S 2.3 only) .......................... 211
4.15.18 Set Offset for D/A converter (AM20 >= S 2.3 only) ............................ 211
4.15.19 Reset module...................................................................................... 211
4.15.20 Stop motor........................................................................................... 211
4.15.21 Set / Reset enable (AM20 only) .......................................................... 211
4.15.22 Delete contouring error (AM20 only) .................................................. 211
4.15.23 Get revision (AM20 only) .................................................................... 211
4.15.24 Get speeds / target position ................................................................ 212
4.15.25 Get polarity and PID parameters........................................................ 212
4.15.26 Get status for AM20 user.................................................................... 212
4.15.27 Move with interpolation (AM20 >= 2.3 only) ....................................... 213
4.15.28 Move with interpolation (AM20 >= 2.3 only) ....................................... 213
4.15.29 Sample programs................................................................................ 214
4.15.29.1 Sample program for stepper motor (AM1x) .................................. 214
4.15.29.2 Sample program for servo motor (AM20) ..................................... 215
4.16 PID driver .................................................................................................... 218
4.16.1 Driver overview ...................................................................................... 218
4.16.2 Extended CI commands for PID ........................................................ 218
4.16.3 Module for PID ................................................................................... 218
4.16.3.1 Parameter table ............................................................................... 218
4.16.3.2 Explanation of parameters .............................................................. 219
4.17 Serial Communication ................................................................................ 219
4.17.1 Selecting and parameterising the driver ............................................ 220
4.17.1.1 HC1X and HC2X ............................................................................ 220
4.17.1.2 HC0X .............................................................................................. 220
4.17.1.3 FEC Compact................................................................................. 220
4.17.1.4 FEC Standard................................................................................. 220
4.17.2 Modules ................................................................................................. 220
4.18 TCP/IP driver .............................................................................................. 224
4.18.1 Introduction ........................................................................................ 224
4.18.2 Driver overview .................................................................................. 224
4.18.3 Configuring the driver and assigning parameters ............................. 225
4.18.4 Configuration of TCP/IP driver for PS1-CP10, CP11, CP12 and CP14:
226
4.18.4.1 Configuration of TCP/IP driver for PS1-CP15:................................ 226
4.18.5 Extended CI commands for TCP/IP .................................................. 226
4.18.6 Modules for TCP/IP ............................................................................ 228
4.18.7 More modules for TCP/IP .................................................................. 232
4.18.7.1 Modules for second network card ................................................... 237
4.18.8 EasyIP status values.......................................................................... 238
FST Version 4.02.21 Manual 7
4.18.9 Data received by handlers ................................................................. 238
4.18.10 Time offsets......................................................................................... 239
4.18.11 Error codes.......................................................................................... 239
5 Help Topics............................................................................................................ 240
5.1 Navigating Using the Table of Contents ........................................................ 241
5.2 Looking for Index ........................................................................................... 242
5.3 Finding Information with Full-Text Search..................................................... 242
6 Index ...................................................................................................................... 246
7 Modules ................................................................................................................. 248
7.1 32 Bit Arithmetik ............................................................................................. 248
7.2 AS-Interface modules .................................................................................... 248
7.3 Modules for accessing the user interface...................................................... 248
7.4 File Handling Modules ................................................................................... 248
7.5 Get date and time modules............................................................................ 249
7.6 FEC Remote E/A-Erweiterung....................................................................... 249
7.7 Function blocks .............................................................................................. 249
7.8 Festo Fieldbus Slave Module ........................................................................ 249
7.9 Incremental Encoder for FEC and HC0X CPUs............................................ 249
7.10 Profibus DP (CP62) Modules DP............................................................... 249
7.11 Profibus FMS Drivers ................................................................................. 249
7.12 Positioning with AM10, AM11 or AM20 or AM30....................................... 250
7.13 Function blocks to control the execution of programs............................... 250
7.14 Serial communication ................................................................................. 250
7.15 Further modules ......................................................................................... 250
7.16 Fast Counter for FEC and HC0x ................................................................ 250
7.17 String modules............................................................................................ 250
7.18 Modules for TCP/ IP ................................................................................... 252

FST Version 4.02.21 Manual 8


1 Release Notes
March 13th, 2001
Here is release 4.02.21 of FST for Windows. This is the second product release on CD-ROM
of the FST for Windows (FST4).

1.1 Installation of the FST 4.02


When your CD drive has Auto Insert Notification enabled, a menu will appear with the option
to install FST4.

You can also manually initiate the installation by starting SETUP.EXE in the \INSTALL subdi-
rectory.
This version uses an InstallShield setup, which will add appropriate entries in the Start
menu for you.

If you do not have the permission to install programs on your PC, this version can also be
installed from the self-extracting file FST40221.EXE in the \INSTALL subdirectory. It will try
to create a directory/folder C:\FST40221. You can change this during the installation to
whatever you like.

This FST 4 does NOT touch any of your system INI files (WIN.INI, SYSTEM.INI,...) It will NOT
replace any system library (xxx.DLL, xxx.VXD,...) and it will currently NOT touch the registry
in your box (except for the Uninstall information when using the InstallShield setup).

Also install the tools in the \TOOLS folder of the CD-ROM if required.

Some modules and drivers that have been part of former FST releases can be found in the
\OLDLIB folder of the CD-ROM. Use these drivers only if required for old projects. Please
regard the important information in the README files for the individual drivers.

1.2 Uninstalling
If you installed FST 4 using the InstallShield setup, the uninstall information is stored in the
Windows registry. FST 4 can be removed from your PC using the Windows Control Panel
(Software).
To get rid of any FST 4 version installed from a self-extracting zip file simply remove the
installation directory/folder, usually C:\FST40220, and all its subdirectories/folders.

1.3 Known Problems

1.3.1 ONLINE HELP


The FST 4 Online Help uses the HTML Help viewer. This requires that you have Internet
Explorer 4 or higher installed.
The HTML Help Installation and Update package (HHUPD.EXE in the \INSTALL folder) will
update your installation to the latest version (on a Windows NT system this requires that
you have administrator privileges). The update will not be executed if you already have a
newer version of HTML Help installed.
Windows 2000 users should not run the HTML Help Installation and Update Package. Help
component updates are provided via Windows service packs.
For more information see http://www.microsoft.com.
If you do not want to use Internet Explorer the contents of the FST 4 Online Help are also
available in PDF format in the folder \MANUALS of the CD-ROM.

FST Version 4.02.21 Manual 9


If you want to make a printout of the entire Online Help it is suggested to use the PDF ver-
sion.

1.3.2 EXTERNAL TOOLS


This version of FST 4 still uses some DOS programs, e.g. the OWS tools. Some of these
programs will not work correctly if the current FST project is stored in a path that is not
according to DOS rules, i.e. no spaces, max. 8+3 characters per folder name. Please use a
project path that is according to DOS rules if you want to use these programs.
On Windows 2000 all DOS tools are troublesome and the mouse does not work.
It is currently not possible to use Ethernet for the online features of the fieldbus configura-
tors.

1.3.3 TCP/IP
Before you can use TCP/IP for programming (download) and online displays you once have
to download a project including the TCPIP driver via the RS232 connection.
When using TCP/IP for downloading a project, please make sure not to select the option
"Delete project before download" in the Controller Settings, since this will also stop the
TCP/IP driver.
When setting a password for the controller this will prevent modifications for both, serial
and TCP/IP access.

1.3.4 IO1x/IO4x
Use the versions with a suffix "N" together with kernel 2.23.01 or later only. The versions
without "N" will work with any kernel 2.2x, but may block the PLC cycle on defective or
missing hardware. Therefore they are no longer included in the FST standard installation. If
required you can install them from the folder \OLDLIB of the installation CD-ROM. If an
upgrade of your CPU module is required please contact your local Festo dealer.

1.1.1 HC1X + RTC + DRAD + FESTOBUS


When the HC1X is equipped with a ZL16/ZL17 chip, accessing the real-time clock the FST
modules F1x will cause the Festo fieldbus IO update to stop after some time. The problem is
under investigation.

1.1.2 HC2X + AS-INTERFACE (CP96)


Only up to two CP96 modules with the switch settings KSW=1 and KSW=4 can be used
together with the HC20 CPU. The switch positions KSW=2 and KSW=3 lead to memory
conflicts.

1.1.3 HC2X + OM22 PLC SAFETY


Only IO modules OM22 with a version of P16 or higher can be operated in PLC Safety mode
on the HC20 CPU.

1.1.4 FIND & REPLACE


When using the Find or Replace function of the STL Editor, the Allocation List Editor or the
Message Window please close the Find/Replace dialog box before closing the edi-
tor/message window from which you opened the Find/Replace dialog. The dialog box will
only work for the editor window from which it was opened. If you want to search in another
window please close the dialog box and reopen it again after you have selected the other
editor window.

FST Version 4.02.21 Manual 10


1.1.5 STARTUP DRIVE
Be careful when you change the drive for the STARTUP.BAT file (Controller Settings - Drives).
Make sure that the AUTOEXEC.BAT of the controller looks for a STARTUP.BAT on that drive
and delete all STARTUP.BAT files on any other drives (using the Filetransfer tool). For infor-
mation on possible STARTUP.BAT locations consult the manual or online help (chapter PLC
operating system - miscellaneous). Usually it is best to keep the default for each controller
type: FECs: B: - HC0X: B: - HC1X: C: - HC20: C:

1.1.6 FILE HANDLING WITH FLOPPY DISK


If no floppy in the drive and you try to access it with the file handling modules no error
message is returned.

1.1.7 ONLINE
If you have problems with the online connection you should set the baud rate to 2400. This
is often the case when Festo fieldbus is active or the CPU is busy with communication, e.g.
on other serial ports.
Avoid long steps in control programs that are executed frequently since this will shorten the
time slot for CI communication. Please note that calling CFMs may take a considerable
amount of time, especially if several CFMs are called in sequence in the same step, e.g.
AMXX. Calling CMPs is uncritical since a task switch (invisible step) is inserted after each call
automatically.

1.1.8 FIRST LOGIN TO NEW HC16


If you have problems connection to a new HC1X CPU try using a baud rate different from
9600. If you are not successful try the following:
• Exit FST
• Reboot the HC1X
• Execute SENDBRK.EXE that can be found in the directory where you have installed
FST 4
• Choose the COM port you are using for FST
• Start FST and try again (do not reboot the HC1X)
Once you have successfully loaded a FST project the problem no longer exists since then
FST is directly started when the CPU is booted.

1.4 What is new compared to FST 4.01.16


• It is now possible to download the project without updating the driver files. This fea-
ture can be useful if making minor changes to old projects.
• Controllers of the FEC Standard family are now supported.
• FST 4 is now also available in German.
• In the English version the user can select if he wants to use the keyword ELSE in-
stead of OTHRW in Statement list.
• In the driver options dialog is now a help button to open the driver's chapter in the
online help.
• New and imported programs or modules are now selected for download by default.
• When importing modules from the library more than one module can be selected at
the same time.
• Modules can now be imported from any directory if required (this is a useful feature
for module developers).
• New tab in the Online Display for Strings.
• Platform dependent choices for controller settings.
• Show COM port or IP address in title bar of the STL Online window.

FST Version 4.02.21 Manual 11


• The local IO for FEC and HC0X controllers are now automatically added to the IO con-
figuration by default for new projects.

1.5 Bug fixes since FST 4.01.16


• Longer timeouts for CI communication allow connection to busy CPUs.
• Out of range constants in STL are no longer ignored.
• Allow switching program status in online display even with fast update speed.
• Direct printing of source code programs that are not selected for download is now
possible.
• Sorted printout of source code and compilation log.
• Correct display of large timer values.
• Regard special case for EW in online display user defined tab.
• Enable switch selection for IO modules only if more than one choice possible.
• Sorted print out of cross-reference list.

1.6 What is new compared to FST 3


Note! Changed run-time code.
FST 4 now compiles code for CFMs, which do NOT include a task switch. For this to work,
CFMs no longer may have STEPs. This gives you a chance to have simple and direct "subrou-
tines". The old FST 3.x method prohibited this entirely. The behaviour of CMPs hasn’t been
touched.
In most cases you cannot see the difference at all. If you have used CFMs with steps change
them to CMPs - and (in most cases) forget this issue.

The new rules are easy to remember:

• A program may call CMPs and CFMs (unchanged),


• Calling a CMP always include a task switch (unchanged),
• The called CMP may have steps (unchanged),
• Calling a CFM will not cause a task switch (new).
• A CMP may call CFMs (unchanged),
• But a CMP may NOT call another CMP (unchanged).
• A CFM may call other CFMs (new),
• But a CFM may NOT call a CMP (new).

In a diagram the rule looks as follows:


Program -- calls --> CFMs
-- calls --> CMPs
CMP -- calls --> CFMs
CFM -- calls --> CFMs
The FST kernel (PLC operating system) from version 2.24.3 will check this at run-time.

If you get error 36, check which function module you are calling in the step where the error
occurred. Rename this module as a CMP and change your programs accordingly.
The modules FWRITSTR and FREADSTR of the FST runtime library are using steps and can be
used as CMPs only.

• Mr. Westrik from Festo-NL has contributed the TCP/IP part of the FST 4 software. Af-
ter a first download of the FST TCP/IP driver, it is also possible to use TCP/IP for all
online tasks - from CI commands to downloading. Simply change the settings in "Ex-
tras >> FST Preferences >> Communication port".

FST Version 4.02.21 Manual 12


• The communication method has changed significantly. Well, we still use the old
fashioned CI but we did further analysis on the implementation. The obvious situa-
tion where you will see this is a faster login to the remote controller.
• Make and Download are separated, a Build All is also available.
"Make" will only compile and link what has been changed. This is what you are used to
with FST 3.x. "Build", contrary to "Make," will compile and link everything. Our "Make"
is pretty clever. So you don't need the "Build." But whenever in doubt - it's available.
• There is a project specific IPC controller setting, which lets you automatically stop
and unload a project on the IPC controller when downloading.
• Run-time options are selectable one by one instead of two pre-configured run-time
modes ("Machine Mode" and "Unit Mode" in FST 3.x notion.)
• An AUTOSTART run-time option is available.
• All kinds of online displays can be used at the same time, have the online display in
one window, a CI terminal in another window and STL online in one or more addi-
tional windows. Then try to transfer a file to or from the controller.
• Conversion of FST 3.x Projects to FST 4.x
• The conversion program FST3TO4.EXE is accessible by menu entry "Extras >> Convert
FST 3.x Projects". Just select the right path (of FST IPC 3.x or the FST IPC 3.x project
path) and select a project to convert.

It is recommended to rebuild the entire project by selecting menu item "Project >> Build
Project" or click the appropriate toolbar button.

What is still incomplete


The "Tip of the Day" is just a start. It is not a very powerful wizard. Ideas and new tips are
welcome.

What is still missing


Here is a list of things, which are not yet implemented in this version:
• Ladder diagram
• Windows version of OWS

The following new features/bug fixes require an update of the kernel version (firmware):
• get runtime error when calling CFMs with steps (2.24.03)
• version checking when starting STL online (2.24.02)
• improved PLC Safety method (2.24.02)
• online display of counters (2.23.03)
• IO1x/IO4x (2.23.01)
• You can check the detailed version with the CI command "L!". If this results in
"ACCESS ERROR" you have kernel version 2.22 or less.
• If you an upgrade of your CPU module is required please contact your local Festo
dealer.

1.7 History
20.02.2001 4.02.21 CD-ROM "Edition April 2001"
14.08.2000 4.01.16 CD-ROM "Edition August 2000"

FST Version 4.02.21 Manual 13


2 FST4 User documentation
2.1 The Main Window
If you start FST a splash screen will be shown. It will be hidden automatically after a few
seconds. Click on it to dismiss it immediately.
FST works with a so-called multiple document interface (MDI). For each document a child
window will be opened inside the FST main window. The child windows can be accessed and
arranged with the commands of the Window menu.

The size and position of the window is stored between sessions. If the resolution of the
screen changes, the FST main window will receive the default size and position from Win-
dows.

2.1.1 Windows Basics


This topic describes the most important standard controls of Windows:
• The Title Bar
• The System Menu
• The Window Border

2.1.1.1 The Title Bar


The title bar is located along the top of a window. It contains the name of the application
and/or the document. To move the window, drag the title bar.

The title bar can contain the following buttons:


Click the Minimise button to reduce the window to an icon.
Click the Maximise button to enlarge the active window to fill the available space.
Click the Restore button to return the active window to its size and position before you chose the
Maximise or Minimise command.
Click the Close button to close the window.

FST Version 4.02.21 Manual 14


2.1.1.2 The System menu
If you click on the title bar icon the System menu will be shown. It offers the following
commands:

Restore
Use this command to return the active window to its size and position before you chose the
Maximise or Minimize command.

Size
Use this command to display a four-headed arrow so you can size the active window with
the arrow keys.
Note! This command is unavailable if you maximise the window.

Move
Use this command to display a four-headed arrow so you can move the active window or
dialog box with the arrow keys.
Note! This command is unavailable if you maximise the window.

Minimize
Use this command to reduce the window to an icon.

Maximize
Use this command to enlarge the active window to fill the available space.

Next
Use this command to switch to the next open document window. FST determines which
window is next according to the order in which you opened the windows.

Previous
Use this command to switch to the previous open document window. FST determines which
window is previous according to the order in which you opened the windows.

Close
Use this command to close the window. Closing the FST main window will terminate FST.

2.1.1.3 The Window Border


Drag the size bars at the corners or edges of the window to size the window using the
mouse.

2.1.1.4 Scrollbars
Scrollbars are displayed at the right and bottom edges of the window. The scroll boxes
inside the scroll bars indicate your vertical and horizontal location. Drag the slider or click
on the arrow buttons to move the location.

FST Version 4.02.21 Manual 15


2.1.2 The Toolbar
The toolbar is displayed across the top of the FST main window, below the menu bar. The
toolbar provides quick mouse access to many tools used in FST.
To hide or display the Toolbar, choose "View >> Toolbar" from the menu. A check mark
appears next to the menu item when the Toolbar is displayed.

The following tools can be directly accessed from the toolbar. The tools that are currently
not available are dimmed (greyed).
Create a new program (Ctrl+N)

Open a program for editing (Ctrl+O)

Save the program code in the currently active editor window (Ctrl+S)

Save all unsaved changes

Remove the currently selected data from the document

Remove the currently selected data from the document and put it on the clipboard
(Ctrl+X)
Copy selected data onto the clipboard (Ctrl+C)

Insert a copy of the clipboard contents at the insertion point (Ctrl+V)

Reverse the last editing action, if possible (Ctrl+Z)

Find something in the currently active editor window (Ctrl+F)

Compile the program in the active editor window (Ctrl+F7)

Prepare the project for download (changes only) (F7)

Prepare the project for download (rebuild all)

Transfer the project to the controller (F5)

Open the Online Control Panel

Open an (other) Online Display window

Open the Online CI Terminal

Open the File Transfer window

Print the contents of the currently active window (Ctrl+P)

Context Help (Shift+F1)

FST Version 4.02.21 Manual 16


2.1.3 The Status Bar
The status bar is displayed at the bottom of the FST FST main window.
To display or hide the status bar, select "View >> Status Bar" from the menu. A check mark
appears next to the menu item when the status bar is displayed.

The status bar offers the following features:


• The left area of the status bar describes actions of menu items as you use the arrow
keys to navigate through menus. This area similarly shows messages that describe
the actions of toolbar buttons as you depress them, before releasing them. If after
viewing the description of the toolbar button command you wish not to execute the
command, then release the mouse button while the pointer is off the toolbar button.
• The second area shows the number of lines and the cursor position or the number of
entries in the currently active window.
• The right areas of the status bar indicate which of the following keys are latched
down:

Indicator Description
CAP The Caps Lock key is latched down.
NUM The Num Lock key is latched down.
SCRL The Scrl Lock key is latched down.
INS Insertion mode is active. Use the Ins key to toggle.

2.1.4 The Menu


The menu is displayed across the top of the FST main window, below the title bar.

From the different pull down menus you can access the following commands:

Project menu
Work with projects and exit FST.

Edit menu
Undo, Clipboard commands, find and replace, select all, delete

View menu
Display the Project Tree window, start the various internal tools like the IO Configuration or
the Controller Settings, display the message window, show or hide the toolbar, status bar
and STL shortcuts

Insert menu
Add new programs or modules to the project and make new entries to the active window,
e.g. adding a New Driver

Program menu
Manage control programs and print the contents of the active window

FST Version 4.02.21 Manual 17


Online menu
Various online tools like the Online Display and download of the active project

Extras menu
Edit preferences, manage the FST Library, configure and execute external tools

Window menu
Close the active window and arrange the child windows

Help window
Online Help, Tip of the Day, About FST

2.1.4.1 The Window Menu Commands


FST works with a so-called multiple document interface (MDI). For each document a child
window will be opened inside the FST main window.
The Window menu offers the following commands, which enable you to arrange the child
windows in the FST main window.

Close
Use this command to close the active client window. FST suggests that you save changes to
your document before you close it. If you close a document without saving, you lose all
changes made since the last time you saved it.
You can also close a window by using the Close icon on the document's window.

Cascade
Arranges windows in an overlapped fashion.

Tile horizontal
Arranges windows vertically in non-overlapped tiles.

Tile vertical
Use this command to arrange multiple opened windows side by side.

Arrange Icons
Use this command to arrange the icons for minimised windows at the bottom of the FST
main window. If there is an open document window at the bottom of the FST main window,
then some or all of the icons may not be visible because they will be underneath this docu-
ment window.

Window 1, 2, ...
FST displays a list of currently open document windows at the bottom of the Window menu.
A check mark appears in front of the document name of the active window. Choose a docu-
ment from this list to make its window active.

2.1.4.2 The Edit Menu Commands


The Edit menu offers the following commands:

Undo
Use this c ommand to reverse the last editing action, if possible.

Cut
Use this command to remove the currently selected data from the document and put it on
the clipboard. This command is unavailable if there is no data currently selected.
FST Version 4.02.21 Manual 18
Cutting data to the clipboard replaces the contents previously stored there.

Copy
Use this command to copy selected data onto the clipboard. This command is unavailable if
there is no data currently selected.
Copying data to the clipboard replaces the contents previously stored there.

Paste
Use this command to insert a copy of the clipboard contents at the insertion point. This
command is unavailable if the clipboard is empty.

Delete
Use this command to remove the currently selected data from the document. This command
is unavailable if there is no data currently selected. The removed data is NOT copied to the
clipboard.

Find
Use this command to find a certain text within the active editor window using the standard
Find dialog.

Repeat
Use this command to repeat the last find.

Replace
Use this command to replace a certain text within the active editor window by another text
using the standard Replace dialog.

Select All
Selects everything in the document.

2.1.5 Viewing Properties


Select "View >> Properties" from the menu or "Properties" from the right click popup menu
to display and edit the properties of the selected entry in the active window.

2.1.6 Terminating FST


Select "Project >> Exit" from the menu to end your FST session.
FST prompts you to save documents with unsaved changes.
You can also use the Close command on the application System menu or click the Close
icon of the FST main window .

FST Version 4.02.21 Manual 19


2.2 Getting Help

2.2.1 The Aboutbox


Select "Help >> About FST" to display the copyright notice and version number of your copy
of FST.

2.2.2 Tip of the Day


Select "Help >> Tip of the Day" to display a dialog box with a short tip.

The Tip of the Day dialog is also shown on each start-up of FST unless you disable the op-
tion "Show Tips on StartUp".
• Click the Next button to show another tip.
• Close the dialog box by clicking the Close button.

2.2.3 Help Topics


Select "Help >> Help Topics" from the menu to display the opening screen of the FST Online
Help.
From the opening screen, you can jump to step-by-step instructions for using FST and vari-
ous types of reference information

2.2.4 Context Help


Use the Context Help command to obtain help on some portion of FST.
When you choose the toolbar's Context Help button , the mouse pointer will change to
an arrow and question mark. Then click somewhere in the FST window, such as another
toolbar button. The help topic will be shown for the item you clicked.
FST Version 4.02.21 Manual 20
If you press the F1 key the help topic will be shown for the active window or command.

2.2.5 The Message Window


The message window is used to log results, e.g. of translating a program or downloading the
project.

Select "View >> Message Window" to bring the message window to the top and view its
contents.
Note! If you close the message window, its contents will be lost.

FST Version 4.02.21 Manual 21


2.3 Working with Projects
Everything in FST is organised in projects. A project contains your source code for programs,
imported (compiled) modules from the library, the IO and driver configurations, the Alloca-
tion List and several settings and properties.

2.3.1.1 Project Name and Comment


Each project has a short name and a comment.
The name can be up to 8 characters long and is used to identify the project and will also be
transferred to the controller when it is downloaded. The project name is not case sensitive
and must be unique within the same project directory. The character set that is allowed for
project names is not restricted, but it is recommended to limit it to characters, numbers and
underlines. Spaces are not allowed.
The comment can be up to 255 characters long. Different from the project name the project
comment will not be available at runtime (in the controller) but can be used to give a short
description for your projects for easier recognition. Whenever you have to select a project in
FST this comment will be displayed together with the project name and can be used for
sorting lists. An even more detailed description can be stored in the project documentation,
which is usually a simple text file.

2.3.1.2 Controller Types


FST supports several controller types of the IPC family. In order to choose the correct drivers
or options for the controller your project is designed for, your project has a controller type
attribute. Projects can only be downloaded to a controller of the correct type. You are free to
change the controller type of a project if required.

Note! There is a separate instance of some project parts for each controller type within a
project. If you switch between controller types, you will work on the set of project parts that
belongs to the current controller type.

Common for all controller types Different set for each controller type
• project name and comment • imported (compiled) programs from the li-
• your source code for pro- brary
grams • the IO configuration
• the project documentation • the driver configuration
• the Allocation List • the controller settings

2.3.1.3 Organisation on Hard Disk


Everything that belongs to a project is stored in a single directory on your hard disk. The
name of that directory is the project's name. The project name is not stored at any other
location. For each project there is a file PROJECT.FW4 in the project's directory, which is
used to store the current settings and elements of that project such as the comment and
controller type. Please do not modify this file manually.
There are more files in the project's directory to store program source code, the project
documentation, the Allocation List and others which are created and managed by FST
and/or related tools. If you want to store your own files or files created by other tools that
belong to the project in the same directory, you can do so, but be careful with choosing
names. No general rule can be given which names are not used by FST.

FST Version 4.02.21 Manual 22


All projects a re subdirectories of one common project root directory. There is no index file
listing the existing projects. FST will create new projects as subdirectories of that project
root directory and will look for existing projects in that directory.
The project root directory can be anywhere on your computer, the network or even remov-
able media. It need not necessarily be a subdirectory of your FST installation. It is recom-
mended that you use this project root directory for storing FST projects only. Do not choose
the same directory as the one you have used for FST 3.x projects. FST 4.x will not allow
creating a new project if a directory with the desired project name already exists.
You can change the project root directory. This allows organising your projects on groups.
However you have to remember the different locations where you have stored FST projects.
If you want to use DOS based tools for you project, such as fieldbus configurators, use a
project path that does not c ontain long file names (max. 8 characters) or spaces.

2.3.2 The Project Tree Window


The Project Tree window gives you an overview of all the parts that belong to a project and
can be used as a shortcut bar to access the corresponding tools. Double click on the item or
use the right click popup menu for more features on some items.
When you create a new project the project tree will be displayed by default. You can close it
as any MDI child window if you don't need it. You can display the project tree again or bring
it to the top by selecting "View >> Project Tree" from the menu.

The project tree basically has always the same entries. Only the items "Programs", "CMPs"
and "CFMs" will have child items depending on the programs you are using for the individ-
ual project. The Project Tree offers the following features for accessing programs:
• Double click on the entry of a source code program to open it in the editor. For im-
ported modules no source code is available. They cannot be edited.
• Right click on a program entry and then select "Properties" from the popup menu to
open the Program Properties dialog. This dialog will allow changing the program's
name, comment, type and number. It is not possible to change a program's lan-
guage once it has been created
• To delete a program right click on a program entry and then select "Delete" from the
popup menu. You can also press the DEL key to delete the selected program.

FST Version 4.02.21 Manual 23


• All programs that have a check mark in the box left to the name and comment will be
downloaded to the controller. If a program is not checked it will not be available at
runtime. Select only one version of the same program at the same time.
• Right click on a program entry or the "Programs", "CFMs" or "CMPs" folder and
then select "Insert..." from the right click popup menu to insert a new source code
program.
• Right click on a program entry or the "Programs", "CFMs" or "CMPs" folder and
then select "Import..." from the popup menu to import an already compiled module
from the library.

2.3.3 Open an Existing Project


In order to work with a project and its parts you have to load it into the FST development
environment.
To open an already existing project select "Project >> Open..." from the menu. Then the
Open Project dialog will be displayed that lists all projects in the currently configured project
directory. Select the project you want to open by double clicking on it or type its name in the
edit field below the list box and select the OK button. The currently open project - if any - will
be closed and the selected project will be loaded into the FST development environment.
The same dialog with a different caption is used to select a project for backup.

The Open Project dialog offers the following features:


• The name, comment and the controller type are displayed for each project in a sepa-
rate column.
• Adjust the width of each column by moving the separator in the header with the
mouse.
• Each column of the list box can be sorted alphabetically by clicking on the column
header. Click again to reverse the sorting order.
• You can only display projects for one controller type by making the appropriate se-
lection in the combo box above the list box.
• If you only want to display the project names in a simple list, toggle the radio but-
tons in the upper right corner of the dialog.
The size and position of most windows will be restored to how it was the last time before
you closed the project. The name, comment and controller type of the currently active pro-
ject is displayed in the caption of the FST main window.
To access the projects you have most recently worked on up to eight projects are listed in
the Project menu just before the Exit command. Simply select the project you want to open.
FST Version 4.02.21 Manual 24
When you start FST the project that was open when you quit FST the last time will be opened
automatically.
Note! You can have more than one instance of FST running, but the same project can be
opened only once at the same time. If a project is opened it is marked with a lock file.

2.3.4 Creating a New Project


To create a new project select "Project >> New..." from the menu. Then the New Project
dialog will be displayed that allows you to enter the name for the new project in an edit
field. Select the OK button to create a new project with that name. The currently open pro-
ject - if any - will be closed and the new project will be loaded into the FST development
environment.
The same dialog with a different caption is also used for renaming or copying a project and
to restore a project from backup or uploaded sources.

The New Project dialog offers the following features:


• A list of the already existing projects in the current project directory will help avoid
using the same name again. The comment and the controller type are displayed for
each project in a separate column.
• Adjust the width of each column by moving the separator in the header with the
mouse.
• Each column of the list box can be sorted alphabetically by clicking on the column
header. Click again to reverse the sorting order.
• If you only want to display the project names in a simple list, toggle the radio but-
tons in the upper right corner of the dialog.
Note!
• The project name is limited to 8 characters.
• Note! The project name must not contain spaces.

FST Version 4.02.21 Manual 25


2.3.5 Close the Current Project
Select "Project >> Close" from the menu to close the currently active project.
It is, however, not necessary to close a project before opening another project or creating a
new project since this is done automatically.

2.3.6 The Project Settings


After creating a new project you will automatically be prompted to enter a comment for the
new project and have the possibility to select a controller type. You can change these set-
tings again later by selecting "Project >> Settings.." from the menu or "Project Settings"
from the Project Tree window.

The Project Settings dialog offers you also the following features:
• Change the name of the project by entering it into the edit field.
• Click on the button with three dots to get a list with the already existing projects.
That dialog is the same as it is used for entering the name of a new project.
• The date when the project was created, which FST version has been used and the
user name will be displayed.

2.3.6.1 The Project Directory


Using different project directories is useful to sort a larger amount of projects in groups. But
you have to remember the different locations where you have stored FST projects.
If you want to view or change the current common root directory for FST projects, select
"Extras >> Preferences..." from the menu. In the tabbed dialog that will be displayed select
the General tab. Enter the path of the new directory or press the Browse button to select an
already existing directory. Relative paths (beginning with a dot) are subdirectories of the
directory where you have installed FST.

FST Version 4.02.21 Manual 26


After changing the directory path and closing the dialog the currently open project will be
closed.
Note! If you want to use DOS based tools for you project, such as fieldbus configurators, use
a project path that does not contain long file names (max. 8 characters) or spaces.

2.3.7 The Project Explorer


If you want to delete, copy or rename projects use the Project Explorer. To open the Project
Explorer dialog select "Project >> Explore..." from the menu. A list with all projects in the
current project directory will be displayed in a dialog box.

FST Version 4.02.21 Manual 27


Above the list box there are several buttons to execute the following operations:
Create a new project. You will be prompted for a project name and settings

Open the selected project.

Delete the selected project.

Create a copy of the selected project. You will be prompted for a name and settings as
for a new project.
This will display the Project Settings dialog for the selected project that allows you to
change the project's name, comment and controller type.

The Project Explorer dialog also offers the following features:


• The projects are listed together with their comment and the controller type; each
displayed for each project in a separate column.
• Adjust the width of each column by moving the separator in the header with the
mouse.
• Each column of the list box can be sorted alphabetically by clicking on the column
header. Click again to reverse the sorting order.
• To change the name of a project select it and then click on the name. An inplace edit
field appears. When you are finished press the "Enter" key or click outside the edit
field. To cancel editing press "Esc".
• You can only display projects for one controller type by making the appropriate se-
lection in the combo box above the list box.
If you only want to display the project names in a simple list, toggle the radio buttons in the
upper right corner of the dialog.

2.3.8 Preparing the Project for Download


Before a project can be downloaded and executed on the controller its components must be
compiled to a binary format. The results will be linked together to the project runfile.
To prepare the project for download select "Project >> Make Project" from the menu. All
modifications are automatically saved to disk and the progress and result of the compilation
and linking is displayed in the message window.

FST Version 4.02.21 Manual 28


"Make Project" will only compile the programs that have not been changed since the last
make. If you want to compile all programs regardless whether they are changed select
"Project >> Build Project" instead. This is recommended after restoring a project from a n-
other computer or a change in the FST version, in case the translators have been changed.

2.3.9 Downloading the Project to the Controller


To download the project to the controller, select "Online >> Download Project" from the
menu. All required files will be transferred to the controller. The Download dialog gives you
some information about the progress of the transfers. Press the Abort button to stop the
downloading. Watch the message window for details.

Note!
• Before you can download a project it has to be prepared for download first.
• Projects can only be downloaded to a controller of the same type as specified in the
project settings.

2.3.10 Downloading an Update of the Project to the Controller


Instead of downloading the complete project to the controller, it is also possible to transfer
only the changes.
To download an update of the project to the controller, select "Online >> Update Project"
from the menu. All required files will be transferred to the controller. The Update dialog
gives you some information about the progress of the transfers. Press the Abort button to
stop the downloading. Watch the message window for details.

• An update can only be downloaded if you at least once downloaded the complete
project to the same controller.
An update is not possible
• If you add or remove programs.
• After some changes to the driver configuration.

2.3.11 Uploading Project Sources from the Controller


It is possible to store the sources of a project in the controller.
If you want the sources to be stored in the controller you have to select the option "Load
sources" in the Download tab of the Controller Settings dialog.

FST Version 4.02.21 Manual 29


To upload the sources that have been stored in the controller, select "Online >> Upload
Project" from the menu. The controller will be searched for the sources and the file will be
uploaded. The Upload Source dialog gives you some information about the progress of the
transfer. Press the Abort button to stop the uploading. View the message window for more
details.

Then the Upload Project dialog will be displayed that allows you to enter the name for the
uploaded project in an edit field. Select the OK button to restore the project with that name.
The currently open project - if any - will be closed and the uploaded project will be loaded
into the FST development environment.

The Upload Project dialog offers the following features:


• A list of the already existing projects in the current project directory will help avoid
using the same name again. The comment and the controller type are displayed for
each project in a separate column.
• Adjust the width of each column by moving the separator in the header with the
mouse.
• Each column of the list box can be sorted alphabetically by clicking on the column
header. Click again to reverse the sorting order.
• If you only want to display the project names in a simple list, toggle the radio but-
tons in the upper right corner of the dialog.
Note! The project name is limited to 8 characters.

FST Version 4.02.21 Manual 30


2.3.12 Listing the Compiled Project File
If you select the menu item "Project >> List Project File" you will get a listing of the contents
of the project file in the message window. This file is the result of preparing the project for
download and will be transferred to the controller. This feature can be useful for debugging.

Note! This function is only available after preparing the project for download.

2.3.13 Removing Intermediate Files


During the process of preparing the project for download several intermediate files will be
generated. In order to free disk space you can clean up the project by selecting "Project >>
Clean Up" from the menu.
If you want to download the project again to a controller, all required files will be created
again.
This function is automatically called before backing up a project.

2.3.14 The Project Documentation


FST does not implement it's own text editor. For writing your project documentation you can
use any tool you like.
By default for each new project an empty file with the file name PROJECT.TXT will be created
in the project's directory. Double click on the item "Project Documentation" in the Project
Tree window or select "View >> Project Documentation" from the menu to open the docu-
ment with whichever tool is registered for .txt files on your PC.
You can change the name and/or extension if you like by choosing "Properties" from the
right click popup menu of the entry "Project Documentation" in the Project Tree window.
Make sure you use an extension that is registered on your PC for the editing tool you want
to use. E.g. using the extension .doc will usually open Microsoft Word.

2.4 Printing Projects


You can print all or selected parts of the current project.
Select "Project >> Print..." from the menu to display the dialog to select the parts you want
to print.

FST Version 4.02.21 Manual 31


Title Page:
The title page displays the project name together with some information on the FST version,
date and time and the user name.

Documentation:
The project documentation will only be printed, if the file PROJECT.TXT still exists. If you
have changed the name and/or extension of the project documentation, you have to use the
tool you are using to edit the file for printing.

Controller Settings:
The options you have chosen.

Project Tree:
The project tree shows all programs in a sorted list including the comment. If a program is
selected for download is indicated by an asterisk.

Input and Output Modules:


Print the IO configuration.

Drivers:
Print the driver configuration including the options for each driver

Allocation List:
Print the Allocation List.

Program Properties:
Print the file size and date and other information for each program.

Log Files:
Print the results of the last compilation for source code programs or the source path for
imported modules.

Cross Reference:
The cross-reference is a list of all operands that are used in your programs together with
their occurrence in a sorted list.

FST Version 4.02.21 Manual 32


Note!
• Printing the cross-reference list requires that you prepare the project for download
before you start printing, since the required data to build the cross reference list will
be collected while the programs are compiled.
• You can also print the contents of the currently active window by selecting "Program
>> Print" from the menu.
Before printing starts you will be asked for the printer and the paper size using the standard
Printer Setup dialog. While the pages are formatted and sent to the printer you can stop the
printing process by pressing the Cancel button in the Abort Printing dialog that is displayed.

A header and footer will be printed on each page except the title page. The header shows
the project's name, controller type and comment and which project part is printed on this
page. The footer contains the page number, time and date of the printout.
Note! Headers and footers cannot be customised.
You can change the print font and the margin widths of the printout.

2.4.1 Print Preferences


You can change the print font and the margin widths of the printout. Select "Extras >> Prefer-
ences..." from the menu. In the tabbed dialog that will be displayed select the tab "Print".

FST Version 4.02.21 Manual 33


If you press the Browse button you will be asked for a printer to display the correct list of
available fonts before the standard font selection dialog is displayed.
Note! If you choose the margins smaller than the minimum printer margins, the printout will
be clipped.

2.4.2 Project Backup and Restore


Projects will be backed up as standard zip files.
Select "Project >> Backup" from the menu to select the project you want to update. Then
choose the location for the backup file using the standard file dialog. After removing all
intermediate files all files in the project directory will be zipped and stored in the file you
have selected.
We use the world wide accepted ZIP format (RFCs 1950 to 1952).
Many THX to Jean-loup Gailly and Mark Adler for zlib.
Select "Project >> Restore" from the menu to restore a project. Using the standard file dialog
select a zip file that contains a FST project. It will be restored at the current project directory
and opened into the FST development environment.

2.5 Managing Control Programs


Programs, CMPs and CFMs represent pieces of executable code. Since programs, CMPs and
CFMs are handled very similar they are referred to as programs as a common name.
A project can contain up to 64 programs, 100 program modules (CMPs) and 100 function
modules (CFMs). For each program FST can store up to 9 versions, but only one version can
be used in the controller at the same time.
You can write program yourself with FST using the Statement List language or use the a l-
ready compiled program of the FST library for special tasks that usually have been created
from C source code. No matter how program have been created (in terms of source code),
always a compiled version (machine code) will be used in the controller.

2.5.1 Creating New Programs


To create a new source code program select "Program >> New..." from the menu. Then the
New Program dialog will be displayed that allows you to select the program type, number
and version and to enter a comment. Select the OK button to create a new program with
those settings. It will be automatically opened for editing.
You can also invoke the New Program dialog from the right click popup menu of the Project
Tree window or from the Insert menu ("Insert Program...", "Insert CMP...", "Insert CFM...").
The same dialog with a different caption is used to add imported modules from the library
and to save programs with a different name.

FST Version 4.02.21 Manual 34


Type:
Select "Program" if you want to create a program, "CMP" if you want to create a subroutine
with or without steps and "CFM" if you want to create a subroutine without steps.

Number:
This number is used to refer to the program or subroutine later in the code. A program can
have the numbers from 0 to 63, CMPs and CFMs from 0 to 99. You can assign the numbers
as you like, but note the following special cases:
Only Program 0 will be executed automatically on start-up.
The context of Program 63 will be used for CI commands, avoid using this number for pro-
grams.
If you import a program with a file name like F<n> it is recommended to use the number <n>.

Version:
FST can store up to 9 versions of each program.

Comment:
This text will be displayed in lists and captions for easier identification of the program. The
string can be up to 255 characters long.

The New Program dialog offers the following features:


• A list of the already existing programs in the current project will help avoid using the
same number again. The program name and comment are displayed for each project
in a separate column.
• Adjust the width of each column by moving the separator in the header with the
mouse.
• Each column of the list box can be sorted alphabetically by clicking on the column
header. Click again to reverse the sorting order.
• If you only want to display the program names without comments in a simple list,
toggle the radio buttons in the upper right corner of the dialog.

FST Version 4.02.21 Manual 35


Note!
• There can be only one program with the same type, number and version! If you try to
create a program that already exist you will be prompted to overwrite it.
• If another version for the source code program you are about to create exists the
new program will be a copy of the already existing program if it is a source code pro-
gram of the same language.

2.5.2 Importing Modules from the Library


To import a module from the library select "Program >> Import..." from the menu. Then a
dialog box will be displayed that allows you to select the file for import.
You can also invoke the Import Module dialog from the right click popup menu of the Project
Tree window ("Import...").
Select a filename and press the OK button or double click the file name to open a dialog as
for New Program to select the program type, number and version. The comment text entry
will be automatically initialised to the file name in the library. Select the OK button to import
the file as program from the library with that type, number and version.

The Import Module dialog offers the following features:


• The file name, size and date are displayed for each file in the library in a separate
column.
• Adjust the width of each column by moving the separator in the header with the
mouse.
• Each column of the list box can be sorted alphabetically by clicking on the column
header. Click again to reverse the sorting order.
• If you only want to display the file names without further information in a simple list,
toggle the radio buttons in the upper right corner of the dialog.
• The original source code language and FST version number is displayed for the se-
lected file in the field below the list box.
Note!
• There is a different library for each controller type. The correct folder will be selected
automatically. If you later change the controller type the modules have to be re-
imported from the library for the new controller type. You can however switch back
to the previous controller type without re-importing since the imported modules are
stored in separate files for each controller type.
• You can change the import folder manually by selecting the "..." button. this can be
useful if you develop your own modules and store them in a different location.

FST Version 4.02.21 Manual 36


2.5.3 Program Properties
The name and comment of a program can be changed using the Program Properties dialog.
To show the Program Properties dialog select it in the Project Tree window and select
"Properties" from the right click popup menu. Select the OK button to change the properties
of the program after editing the fields of the dialog.
You can also invoke the Program Properties dialog from the right click popup menu of the
editor window of that program or from the View menu.

Language:
The source code language of the program.

Type:
Select "Program" if you want to have a program, "CMP" if you want to create a subroutine
with or without steps and "CFM" if you want to create a subroutine without steps.

Number:
This number is used to refer to the program or subroutine. A program can have the numbers
from 0 to 63, CMPs and CFMs from 0 to 99. You can assign the numbers as you like, but note
the following special cases:
• Only Program 0 will be executed automatically on start-up.
• The context of Program 63 will be used for CI commands, avoid using this number
for programs.
• If you import a program with a file name like F<n> it is recommended to use the num-
ber <n>.
Version:
FST can store up to 9 versions of each program.

Comment:
This text will be displayed in lists and captions for easier identification of the program. The
string can be up to 255 characters long.

File, Size and Date:


Some information on the program's file on your computer

FST Version 4.02.21 Manual 37


Last compiled:
Date of the last successful compilation of the source code program. See the tab "Log file"
for the compiler output if any.

Version:
The operating system version of the compiled program, see the tab "log file" for the path
name of the source file in the library.

Note!
• There can be only one program with the same type, number and version! If you try to
create a program that already exists you will be prompted to overwrite it.
• The language of a program cannot be changed!

2.5.4 Deleting a Program


To delete a program from the project select "Program >> Delete..." from the menu. Then a
dialog box will be displayed that allows you to select a program. Double click a program or
select it and press the OK button to delete it.
You can also delete programs by selecting it and pressing the DEL key or via the right click
popup menu using the Project Tree window.

The Delete Program dialog offers the following features:


• The name and comment are displayed for each program in a separate column.
• Adjust the width of each column by moving the separator in the header with the
mouse.
• Each column of the list box can be sorted alphabetically by clicking on the column
header. Click again to reverse the sorting order.
• You can only display programs of one type or language by making the a ppropriate
selection in the combo boxes above the list box.
• If you only want to display the program names without comments in a simple list,
toggle the radio buttons in the upper right corner of the dialog.

FST Version 4.02.21 Manual 38


2.5.5 Open a Program for Editing
To open a source code program for editing select "Program >> Open..." from the menu. The
Open Program dialog will be displayed that allows you to select a program. Double click a
program or select it and press the "OK" button to open it in the editor window.
You can also open a program for editing by double clicking on it in the Project Tree window
or via the right click popup menu of the Project Tree window.
The same dialog with a different caption is used to select a program to be deleted or a
module to be called.

The Open Program dialog box offers the following features:


• The program name and comment are displayed for each program in a separate col-
umn.
• Adjust the width of each column by moving the separator in the header with the
mouse.
• Each column of the list box can be sorted alphabetically by clicking on the column
header. Click again to reverse the sorting order.
• You can only display programs of one type or language by making the a ppropriate
selection in the combo boxes above the list box.
• If you only want to display the program names without comments in a simple list,
toggle the radio buttons in the upper right corner of the dialog.

2.5.6 Compiling a Program


To check the syntax of a source code program compile it. Open the program for editing, then
select "Program >> Compile..." from the menu and watch the output in the message window.

FST Version 4.02.21 Manual 39


Note!
• Unsaved changes in the source code will automatically be saved prior to the compi-
lation.
• The results of the compilation will also be stored in a log file. To view it select "View
>> Properties" from the menu. Then select the "Log file" tab of the Program Prope r-
ties dialog

2.5.7 Selecting Programs for Download


Select "Program >> Select for Download..." from the menu to display a dialog box that allows
you to select the programs for download. If a program has a check mark in the box next to it
it will be downloaded to the controller.
You can also select the programs by placing a check mark in the box next to it in the Project
Tree window.

FST Version 4.02.21 Manual 40


The Select Programs for Download dialog offers the following features:
• The program name and comment are displayed for each program in a separate col-
umn.
• Adjust the width of each column by moving the separator in the header with the
mouse.
• Each column of the list box can be sorted alphabetically by clicking on the column
header. Click again to reverse the sorting order.
• You can only display programs of one type or language by making the a ppropriate
selection in the combo boxes above the list box.
• If you only want to display the program names without comments in a simple list,
toggle the radio buttons in the upper right corner of the dialog.

Note! Only one version of the same program can be selected for download.

2.6 Controller Settings


There are several runtime and download options for a FST project. They can be modified
using the tabbed dialog Controller Settings.
Double click on the entry Controller Settings in the Project Tree or select "View >> Controller
Settings" from the menu to show the Controller Settings dialog.

2.6.1 Run Mode (Controller Settings)


The Run Mode tab is the default tab of the Controller Settings dialog.

Autostart:
Check this option if you want the project to start after download without giving an explicit
Run command and regardless of the Start/Stop input.
The default setting is Off.

Start/Stop input:
Check this option if you want to configure a start/stop input. Enter the input to be used in
the edit box.
Note! It will not be checked if there is any hardware configured for this input. If there is no
hardware configured for this input it is always off unless explicitly set by CI command or a
driver.
The default setting is Off.
FST Version 4.02.21 Manual 41
Reset programs:
Check this option if you want all programs to be inactivated (resetted) - rather than stopped
(breaked) - if
• The start/stop switch is switched to stop (falling edge)
• An error occurs without the presence of an error program
Check this option if you do not want - in addition to activating program P0 - all stopped
(breaked) programs to be re-activated if
• The start/stop switch is switched to run (rising edge)
• The CI command "R" is executed
The default setting is On.

Delete project before download:


Check this option if you want the project that is active on the controller to be unloaded from
the memory before the download. If this option is not checked the operation of the project
in the controller will continue during the file transfers that are necessary to download the
new project.
Note! Do not enable this option if you want to use TCP/IP for downloading the project.
Deleting the project will also stop all FST drivers including TCP/IP.
The default setting is Off.

Error output:
Check this option if you want the output specified in the edit box below to reflect the error
state of the controller.
Note!
• It will not be checked if any hardware is configured for this output.
• The error output will not be switched off unless the error is reset.
The default setting is Off.

Error program:
Enter a program number other than zero (1..63) to configure it as error program. In case of
an error this program will be started.
The default setting is 0 (Off).

Reset outputs:
Check this option if you want all outputs to be resetted if
• The start/stop switch is switched to stop (falling edge)
• The CI command "S" is executed
• An error occurs without the presence of an error program
• When the project is started - rather than using the old values from the retentive
storage of operands
The default setting is On.

FST Version 4.02.21 Manual 42


2.6.2 Drives (Controller Settings)
Select the Drives tab on the Controller Settings dialog.

Project File:
Enter the drive where the project file should be stored on the controller.
If the drive you want is not listed in the combo box you can simply type the drive letter. If the
drive you choose is available of the controller will be checked prior to the download.
The default depends on the controller type
FEC Compact B:
FEC Standard B:
HC0X B:
HC1X C:
HC2X C:

Startup Batch:
Enter the drive where the startup batch file should be stored on the controller.
If the drive you want is not listed in the combo box you can simply type the drive letter. If the
drive you choose is available of the controller will be checked prior to the download. Only
choose a drive where the STARTUP.BAT will be automatically started. This depends on the
controller type you are using.
The default depends on the controller type
FEC Compact B:
FEC Standard B:
HC0X B:
HC1X C:
HC2X C:

FST Kernel:
FST Version 4.02.21 Manual 43
Enter the drive where the FST kernel resides on the controller. If the drive you want is not
listed in the combo box you can simply type the drive letter. If there is a FST kernel installed
on the drive you choose will be checked prior to the download.
The default depends on the controller type
FEC Compact A:
FEC Standard A:
HC0X A:
HC1X A:
HC2X C:

2.6.3 Options (Controller Settings)


Select the Options tab of the Controller Settings dialog.

Controller COM port:


There can be more than one COM port on a controller. This option indicates the FST PLC
operating system which COM port on the controller should be used for CI communication.
The default depends on the controller type

FEC Compact 0
FEC Standard 0
HC0X 0
HC1X 1
HC2X 1

Additional parameters:
This text will be appended to the kernel's command line. It is usually blank and meant for
future extensions.

FST Version 4.02.21 Manual 44


2.6.4 Password (Controller Settings)
Select the Password tab of the Controller Settings dialog.

Enter a password that will be activated on the controller when the project is started. If you
do not want a password leave this field blank.

2.6.5 Download (Controller Settings)


Select the Download tab in the Controller Settings dialog.

Download Source Files:


Check this option if you want all source files that are necessary to restore the project to be
stored on the controller in a ZIP file. To later restore the project select "Online >> Upload
Project" from the menu.

FST Version 4.02.21 Manual 45


Download modified driver files:
If you do not want to update the driver files in the controller, uncheck this option. This may
be useful if the controller has been programmed with a different FST installation with a
different driver version. Usually this option should be enabled.
This option does not affect the driver configurations since they are stored inside the project
file together with the programs and modules.

2.7 The IO Configuration


The IPC is a modular system and there are numerous input and output modules available.
They are usually accessed by your control programs trough the FST input and output ope r-
ands.
If you want to use an IO module in your project you have to configure it in order to assign it
to the FST input and output operands you want to use for them. The physical configuration
of your controller hardware does not automatically determine the FST operands that are
used to access the hardware.

Each IO module occupies a certain range in the IO area of the processor. Many modules
support several ranges that usually can be selected by a rotary switch on the bottom side of
these units. To identify a module for the FST IO configuration select it from the list of sup-
ported modules and enter the chosen switch setting.
FST will check your configuration for valid switch positions and overlapping in the IO area of
the processor. It however will not suggest switch positions that are still available. The
documentation for the individual modules contains the necessary information about the
occupied IO area of the processor. For some modules there are more options than just the
selection of an IO range. Some of these options require modifications on the hardware (e.g.
jumpers) while others are programmable by software, i.e. the FST IO driver. All of these
options are usually reflected in the name of the IO driver. Make sure to always select the
appropriate driver for the module's configuration. More details are given in the extra docu-
mentation for the individual IO modules.

You are free to choose any FST input or output word you like for the individual modules.
How many input and/or output words a module occupies is listed in the special documenta-
tion for the modules. FST will check your configuration for overlapping in the FST operands.
If there is an input word required for output modules these ope rands are usually used for
status information. This is described in the module's documentation as well.

Please note that there is a separate IO configuration for each controller type. If you switch a
project from one controller type to another the IO configuration will be empty. If you switch
back however, you again will have the original IO configuration for that controller type. In
the IO configuration you can only insert IO modules that are available for the current
controller type setting of the project.

2.7.1 The IO Configuration Window


To open the IO Configuration window select "View >> IO Configuration..." from the menu or
simply double click on the "IO Configuration" entry in the Project Tree window. A MDI child
window with the current IO configuration is shown.

FST Version 4.02.21 Manual 46


The IO Configuration window offers the following features:
• The IO driver description, the switch setting and FST operands are displayed for
each module in a separate column.
• Adjust the width of each column by moving the separator in the header with the
mouse.
• The list is always sorted by definition. The order reflects the execution order at run-
time. It is not possible to sort the list alphabetically.
• You can move the entries using the clipboard. The clipboard commands are avail-
able from the Edit menu or the right click popup menu and always refer to the se-
lected entries. Insertion is always done before the selection, if no entry is selected at
the end of the list.
• In the status line the current number of entries is shown.
• To remove the selected entries from the IO configuration simply press the DEL key or
select "Edit >> Delete" from the menu or "Delete" from the right click popup menu.
• To insert a new entry simply press the INS key or select "Insert >> IO module" from
the menu or "Insert IO module" from the right click popup menu or double click an
empty line.
• To edit an entry select "View >> Properties" from the menu or "Properties" from the
right click popup menu or double click on the entry you want to edit.
• To print the current IO configuration select "Module >> Print" from the menu.

Note!
• There is no undo function available. All changes are immediately saved to disk.
• If an entry refers to a module type that is unknown to the FST library the missing file
name will be shown in brackets []. To select another type of IO module for the entry
open it for editing as for any other entry. A project with an IO configuration that con-
tains unknown IO modules cannot be downloaded to the controller.

2.7.2 Adding and Editing IO Modules


To insert a new IO module to the IO configuration select "Insert >> IO module..." from the
menu, "Insert IO module" from the right click popup menu of the IO Configuration window
or simply double click on an empty line in the IO Configuration window.
To change the settings of an IO configuration entry select it in the IO Configuration window
and select "View >> Properties" from the menu, "Properties" from the right click popup
menu or simply double click on the setting you want to change.

The IO Module Entry dialog will be shown that allows you to enter the required settings.

FST Version 4.02.21 Manual 47


Select the IO module type:
Select the IO module from the list of available module types that corresponds to your hard-
ware. For some module types more than one IO driver is available. Select the one that fits
your needs. Please note that some options can be activated by simply choosing the appro-
priate IO driver while others require hardware settings (e.g. jumpers) or even a special
version of the module. Details for the individual modules are given in the extra documenta-
tion for each module.

Switch:
Enter here the switch setting for the IO module.
Each IO module occupies a certain range in the IO area of the processor. Many modules
support several ranges that usually can be selected by a rotary switch on the bottom side of
these units. For some IO drivers this switch setting might be used for other purposes.

IW:
Enter here the FST input word you would like to use to access the IO modules input data
from your programs. If the IO module supplies more than one input word consecutive input
words will be used. How many input words are used for each IO module can be read in the
extra documentation for the individual IO module.

OW:
Enter here the FST output word you would like to use to access the IO modules output data
from your programs. If the IO module supplies more than one output word consecutive
output words will be used. How many output words are used for each IO module can be
read in the extra documentation for the individual IO module.

Note!
• FST will check your configuration for overlapping both in the IO range of the proces-
sor and the FST operands.
• If there is an input word required for output modules only these operands are usu-
ally used for status information. This is described in the module's documentation.

FST Version 4.02.21 Manual 48


2.8 The Driver Configuration
Certain functions in the controller (such as fieldbus operation) are supported by drivers.
These drivers are normally started before the FST operating system when the controller is
powered up. FST supports the management of these drivers. FST handles loading and
preparations for automatic starting of the drivers. The driver configuration is used to select
and configure the drivers for a project.
Each driver has its driver number. This number is usually used for only one driver, except
there are more drivers that are for the same purpose. In one project you can only use one
driver with the same number. Some drivers use the functions of other drivers. In this case
both drivers have to be configured for the project. For most drivers there are options, which
are individual for each driver.
There are drivers that require a more comprehensive configuration, such as a fieldbus con-
figuration. This configuration is usually edited using a special configuration tool and stored
in a file. The contents of this file are incorporated into the project file that will be
downloaded to the controller and will be used by the driver.
Please note that there is a separate driver configuration for each controller type. If you
switch a project from one controller type to another the driver configuration will be empty. If
you switch back however, you again will have the original driver configuration for that con-
troller type. In the driver configuration you can only insert drivers that are available for the
current controller type setting of the project.

2.8.1 The Driver Configuration Window


To open the Driver Configuration window select "View >> Driver Configuration..." from the
menu or simply double click on the "Driver Configuration" entry in the Project Tree window.
A MDI child window with the current driver configuration is shown

The Driver Configuration window offers the following features:


• The name, number, required other drivers and a short description are displayed for
each driver in a separate column.
• Adjust the width of each column by moving the separator in the header with the
mouse.
• Each column of the list box can be sorted alphabetically by clicking on the column
heade r. Click again to reverse the sorting order.
• In the status line the current number of entries will be shown.
• To remove the selected drivers from the driver configuration simply press the DEL
key or select "Edit >> Delete" from the menu or "Delete" from the right click popup
menu.
• To insert a new driver simply press the INS key or select "Insert >> Driver..." from the
menu or "Insert Driver..." from the right click popup menu or double click on an
empty line in the configuration window.
• To edit a driver's options select that driver and then "View >> Properties" from the
menu or "Properties" from the right click popup menu or double click on the driver.
• To print the current driver configuration select "Program >> Print" from the menu.

FST Version 4.02.21 Manual 49


Note!
• There is no undo function available. All changes are immediately saved to disk.
• If an entry refers to a driver that is unknown to the FST library its name will be shown
in brackets []. If you select "View >> Properties" for that driver, the option settings
will be shown if available. However, they cannot be edited. A project with a driver
configuration that contains unknown drivers cannot be downloaded to the control-
ler.

2.8.2 Adding a New Driver


To insert a new driver to the configuration select "Insert >> Driver..." from the menu, "Insert
Driver..." from the right click popup menu of the Driver Configuration window or simply
double click on an empty line. The Select Driver dialog will be shown that allows you to
choose a driver. Double click on the driver you want to add or press the OK button to add
the selected driver.

The Select Driver dialog offers the following features:


• The name, number, required other drivers and a short description are displayed for
each driver in a separate column.
• Adjust the width of each column by moving the separator in the header with the
mouse.
• Each column of the list box can be sorted alphabetically by clicking on the column
header. Click again to reverse the sorting order.
• If you only want to display the driver names without description in a simple list, tog-
gle the radio buttons in the upper right corner of the dialog.
After inserting the driver you automatically will be prompted to edit the driver's options.

FST Version 4.02.21 Manual 50


2.8.3 Editing Driver Options
To change the options of a driver select it in the Driver Configuration window and select
"View >> Properties" from the menu, "Properties" from the right click popup menu or simply
double click on it. The Driver Options dialog will be shown that allows you to make the
required settings.
The Driver Options dialog is different for each driver depending on the required settings. The
required settings are described in the separate documentation for the individual drivers.
This is an example how a typical dialog will look like:

For each option there is a default value available. If you want to reset all options to their
defaults, press the Default button.
Most drivers are asking for a controller drive. Enter here the drive of the controller where
you want the driver executable file to be downloaded or where it already resides. If the
chosen drive is available on the controller will be checked prior to downloading the project.
Press the Help button to open the driver's chapter in the online help viewer.
Note! The options of an unknown driver cannot be edited. They are only displayed in a
simple dialog.

FST Version 4.02.21 Manual 51


2.9 The Allocation List
PLC programs consist of program code for handling of data. This data is available in the form
of operands. An operand consists of an abbreviation identifying the equipment group and
an address specifying a level within the group. Output 3 in output word 5, for example, is
identified as O5.3.
FST also allows you to use symbolic designations for the operands: output O5.3 may switch
a motor on and off, for example, in which case you can refer to it as "MotorOn" in your
programs. In this way you can make the programs more easily comprehensible, and also
retain a clear overview even when there is a large number of operands.
You are largely free to decide on the names of the symbolic operands yourself. A name may
consist of up to nine characters, but the first character must be a letter or an underline
character (_). You can use any combination of letters, digits or underlines for the sub-
sequent characters, but no spaces. The designation must, however, be different from that of
an absolute operand.
In the following the direct entry of an operand (such as O5.3) is referred to as an absolute
operand, whereas an entry in symbolic form (MotorOn) is referred to as a symbolic operand.
The assignment of symbolic operands to absolute operands is defined in the Allocation List.
It is advisable to create the Allocation List before program entry and then only to use the
symbolic operand designations in the control programs. The Allocation List can be edited
with the Allocation List editor, covering all functional aspects. It is also possible to insert
operands in the course of program entry, however.

2.9.1 The Allocation List Editor


To open the Allocation List editor select "View >> Allocation List" from the menu or simply
double click on the "Allocation List" entry in the Project Tree window. A MDI child window
with the current Allocation List is shown.

The Allocation List editor offers the following features:


• The absolute operand, the symbolic operand and a comment are displayed for each
entry in a separate column.
• Adjust the width of each column by moving the separator in the header with the
mouse.
• Each column of the list box can be sorted alphabetically by clicking on the column
header. Click again to reverse the sorting order.
• In the status line the current number of entries will be shown.
• The use of different icons makes it easy to distinguish inputs and outputs from in-
ternal operands.
FST Version 4.02.21 Manual 52
• To remove the selected entries from the Allocation List simply press the DEL key or
select "Edit >> Delete" from the menu or "Delete" from the right click popup menu.
• To insert a new entry simply press the INS key or select "Insert >> Operand..." from
the menu or "Insert Operand" from the right click popup menu or double click an
empty line.
• To edit an entry select "View >> Properties" from the menu or "Properties" from the
right click popup menu or double click on the entry you want to edit.
• To print the current Allocation List select "Program >> Print" from the menu.
• To find and replace text in the comments use the appropriate functions from the Edit
menu.

Note! There is no undo function available. All changes are immediately saved to disk.

2.9.2 Adding and Editing Allocation List Entries


To insert an operand to the Allocation List select "Insert >> Operand..." from the menu,
"Insert Operand" from the right click popup menu of the Allocation List editor or simply
double click on an empty line in the Allocation List editor.
It is also possible to add entries to the Allocation List while typing the control programs in
the Statement List editor.
To change an entry in the Allocation List select it in the Allocation List editor and select
"View >> Properties" from the menu, "Properties" from the right click popup menu or simply
double click on the operand you want to change.
The Allocation List Entry dialog will be shown that allows you to enter the required settings.

Absolute Operand:
Enter here the absolute operand, e.g. O3.2 or FW4.

Symbolic Operand:
Enter here the symbolic operand, e.g. MotorOn.
You are largely free to decide on the names of the symbolic operands yourself. A name may
consist of up to nine characters, but the first character must be a letter or an underline
character (_). You can use any combination of letters, digits or underlines for the sub-
sequent characters, but no spaces.

Comment:
Enter here a short comment for the operand. It can be up to 36 characters long.
If you use an operand in your programs, its comment from the Allocation List will be auto-
matically inserted into the program text.

FST Version 4.02.21 Manual 53


Note!
• There can be only one entry for the same absolute or symbolic operand.
• The symbolic operand must be different from that of an absolute operand.
• You can enter an absolute operand with or without a symbolic designation, but a
symbolic operand always requires an absolute operand.

2.9.3 Selecting an Operand from the Allocation List


The Select Operand dialog is used for different purposes where you have to select an ope r-
and. It allows you to choose an operand from the Allocation List or to enter it directly (abso-
lute or symbolic) in the edit field below the list box. Press the OK button to accept the ope r-
and entered.

The Select Operand dialog offers the following features:


• The absolute operand, symbolic operand and comment of each Allocation List entry
are displayed in a separate column.
• Adjust the width of each column by moving the separator in the header with the
mouse.
• Each column of the list box can be sorted alphabetically by clicking on the column
header. Click again to reverse the sorting order.

2.10 Online Mode


The FST programming environment and the controller can establish a communication link
via an RS 232 or TCP/IP connection. This link is used to transfer the compiled and linked
project to the controller and to exchange information for debugging, for example operand
values.

Using the RS 232 connection


The traditional way to connect to the controller is serial communication over RS 232. This is
using the COM ports of the PC and IPC and a simple point to point connection.

Using the TCP/IP connection


Using TCP/IP to connect to the controller has some advantages over the RS 232 connection,
e.g. higher transmission speed and the possibility to connect several controllers and PCs in
a network.

FST Version 4.02.21 Manual 54


2.10.1 Connecting the Controller to the PC for Online Mode
If using RS232 connect the controller and your PC with a null modem cable. Make sure to
use the COM port of your PC you have configured in your Communication Port Preferences
(the default is COM1). On the controller side use the COM port you have configured to be
used for the CI in the Controller Settings. This is by default the RS232 port on the CPU mod-
ule of your controller, labelled COM or COM1.
Before you can go online via TCP/IP you also have to load a project including the TCPIP
driver into the controller first. You also have to select TCP/IP in the Communication Port
Preferences and enter the IP address of the controller. Make sure the controller and the PC
are connected to the same network.

To test the connection to the controller select "Online >> Login" from the menu. A small
dialog box will be displayed that informs you about the progress of the login procedure and
will display the result and other useful information about the controller if the login is suc-
cessful.

Press the Retry button to start the login procedure again.


Press the Close button to dismiss the dialog box.
Note! This dialog box is also displayed when starting other online displays. In these c ases
the dialog box will be hidden automatically on success.

2.10.1.1 Communication Port Preferences


Select "Extras >> Preferences" from the menu to open the Preferences tabbed dialog. Select
"Communication Port" to choose the communication method and configure the specific
settings.

FST Version 4.02.21 Manual 55


If you want to use TCP/IP for the online connection select the "use TCP/IP" radio button, or
"use RS232" to use RS232.
For the RS232 connection you have to specify a com port and a baud rate. The com port can
be selected from the first combo box. It offers all COM ports found on your PC. Choose the
baud rate from the second combo box. Please note that not all controllers allow high baud
rates. 9600 is usually a good choice, if not successful, try 2400. Please see the system
documentation of the controller for details
If using TCP/IP you have to enter the IP address of the controller.
If you check the option "Save in Project" the settings will be stored in the project rather
than for FST in general.
Press the OK button to a ccept the new settings. All online displays will be closed automati-
cally if you have made any changes.

2.10.2 The Online Control Panel


The Online Control Panel is used to
• Display the name of the project that is currently loaded into the controller
• Start and stop the project
• Unload the project
• Reboot the controller
• Display the error in the controller
• Reset any error in the controller
• Display if the controller is protected by a password (locked)
• Lock or unlock the controller
• Change the password of the controller
• To start the Control Panel select "Online >> Control Panel" from the menu. A small
MDI child window with the controls is shown

FST Version 4.02.21 Manual 56


Project
The name of the project currently loaded in the controller is displayed in a text field, or
"<none>" if no project is loaded.
Press the Run button to start the project. This will activate program 0 and activate any
stopped programs depending on the Controller Settings.
Press the Stop button to stop the project. This will inactivate (reset) all programs and
reset all outputs depending on the Controller Settings.
Press the Break button to break the project. This will stop (break) any active program
depending on the Controller Settings.
Press the Unload button to unload the project. All drivers are killed and the project is
unloaded from the memory. To load the project again you have to download it or reboot the
controller.
Press the Boot button to reboot the controller.

Error
The number and a short description of the error in the controller are displayed in a text field.
Press the Reset button to reset the error in the controller.

Password
If the controller is protected by password (locked) is indicated by the two radio buttons for
the locked or unlocked state. Press either the Lock or Unlock radio button to lock or
unlock the controller. If you want to unlock the controller you have to enter the password.
The button next to the radio buttons is labelled either "Set Password" if currently no pass-
word is stored in the controller, or "Change Password" if a password is stored in the control-
ler. Click on it to set or change the password that is stored in the controller.
Note!
• If no password is stored in the controller it can be unlocked without entering a
password.
• There is also the possibility to store a password with the project.
• Before you can go online you have to connect the controller to your PC and possibly
configure the online settings.

2.10.3 Entering the Controller Password


If the controller is protected by a password and you want to unlock it for having full access
you have to type in the password. The FST Password dialog is displayed to enter the pass-
word.

FST Version 4.02.21 Manual 57


Note! If no password is stored in the controller it can be unlocked without entering a pass-
word.

2.10.4 Changing the Controller Password


To change the password stored in the controller open the Online Control Panel. Press the
button labelled "change Password" or "Set Password". The Change Password dialog will be
displayed.

Old Password:
If you want to change the password you have to enter here the old password first.

New Password:
Enter here the new password. Leave blank to erase the password from the controller.

Again:
Enter here the new password again (same as for "New Password:").
Note! There is also the possibility to store a password with the project. See Controller Set-
tings.

2.10.5 The Online Display


The Online Display is used to display and modify the current values of the PLC operands. To
start the Online Display select "Online >> Online Display" from the menu. A MDI child win-
dow with several tabs is shown.

FST Version 4.02.21 Manual 58


The Online Display offers the following features:
• Click on the tabs to select the type of operands that are displayed.
• Use the scrollbar or Page keys to select a range within the operands.
• Directly go to an operand by entering its number in a dialog window.
• Display a mixed list of operands that are of interest in the User Defined tab.
• Open two or more Online Display windows to display several tabs at the same time.
• The word values can be displayed in signed, unsigned or hexadecimal format.
• If available the bit values of the operands are displayed as sixteen check boxes next
to the operand value.
• If the mouse cursor is placed over an operand value or a checkbox the symbolic
name is displayed in a small popup window (like ToolTips) if available.
• The update speed can be changed.
• Modify operand values.
• Forcing of inputs and outputs is supported.
• The Festo Fieldbus tab shows the slaves found on the bus and allows scanning or
assigning the configuration in the master.

Modifying Operand Values


There are the following shortcuts for modifying operand values available:
• Double click on a word, timer value or string to open the Modify Operand dialog
(Modify Timer, Modify String) for it.
• Check (or uncheck) the boxes for the single bits to toggle their value.
• Check (or uncheck) the boxes for the timer and counter states to start (or stop) the
timer or counter.
• Select the new program run state from the combo box to start, stop or inactivate the
program. Please note that programs can only be stopped from the active state.

Festo Fieldbus
The Festo Fieldbus tab shows the slaves found on the bus when selecting the tab the first
time. If the configuration in the master has changed select "Refresh Display" from the right
click popup menu to update the list.

FST Version 4.02.21 Manual 59


To update the configuration in the master according to the actual configuration in the bus
select "Scan for Actual Configuration" from the right click popup menu. Please note that this
will temporarily disconnect all slaves from the master. All fieldbus outputs are reset to zero.
To assign the nominal configuration (i.e. the slaves used by the control programs) to the
master's slave list select "Assign Nominal Configuration" from the right click popup menu.
Please note that this will temporarily disconnect all slaves from the master. All fieldbus
outputs are reset to zero.

User Defined List


You can display a list of operands of different types that are of interest in the User Defined
tab. To configure an entry click the label button. A dialog will be shown that allow you to
choose or enter an operand.
Note!
• The operands configured for the User Defined tab are stored with the project as ab-
solute operands.
• Before you can go online you have to connect the controller to your PC and possibly
configure the online settings.

2.10.6 Online Goto...


To position on a certain operand within the active page of the Online Display or a step in
Statement List Online select "Online >> Goto..." from the menu or "Goto.." from the right
click popup menu.
The Goto... dialog will be displayed that allows you to enter the number of the ope rand or
step.

2.10.7 Changing the Online Display Format


The word values of the online displays can be displayed in signed, unsigned or hexadecimal
format. Select the appropriate mode from the Online menu or the right click popup menu.

2.10.8 Changing the Update Interval of the Online Display


To change the update speed of the active online display select "Online >> Change Update
Speed..." from the menu.
The Online Update Speed dialog will be shown that allows you to enter the update interval
in milliseconds. The allowed range is from 10ms to 10000ms; the default value is 1000ms.

FST Version 4.02.21 Manual 60


Note! The setting is valid for all online windows of the same type, e.g. all Online Display
windows.

2.10.9 Modifying Online Display Operand Values


To modify an operand value place the mouse cursor over it and press the right mouse but-
ton (or select it using the Tab and Direction keys and press the Context Menu key). Select
"Modify operand..." from the popup menu. Depending on the operand type a dialog is
shown that allows you to change the value. Press the Modify button to transfer the new
value to the controller.

To simply toggle a one-bit operand Select "Toggle" from the popup menu.

Forcing Inputs and Outputs


Inputs and outputs can also be forced using the Modify Operand dialogs. Press the Force
button to force the input or output to the new value entered in the controller instead of the
Modify button. To un-force an input or output enter "N" for the new value before pressing
the Force button.

Note! In the online displays the values are always shown as seen by the control programs.
To reset all inputs and outputs to their natural value select "Clear Force Table" from the
right click popup menu of the Online Display window
FST Version 4.02.21 Manual 61
2.10.10File Transfer
The File Transfer window offers the following features:
• Display the files and directories on the different drives of the controller
• Information on the file dates and sizes
• Information on the free space on the controller drives
• Upload files from the controller to the PC
• Delete files on the controller
• Download files from the PC to the controller

To open the File Transfer window select "Online >> File Transfer" from the menu. A MDI child
window with a directory listing of the controller and several buttons is shown.

Display the contents of the parent directory (Parent Dir)

Download a file from the PC to the controller (Download)

Upload a file or display the contents of a subdirectory (Upload)

Delete a file on the controller (Delete)

Stop the current transfer (Stop)

Transfer the currently displayed directory again (Refresh)

Display simple list of file names (List)

Display the date and size of each file (Details)

Directory Listing
If you open the File Transfer window all files and directories of the current drive and working
directory of the controller is displayed. Subdirectories (folders) will be labelled with a folder
icon ; files are labelled with a sheet icon . The directory path is shown in the combo box
in the toolbar of the File Transfer window.
In the status line of the File Transfer window the sizes of the selected and the sum of all files
are shown as well as the free space of the drive. To display the date and size of each file,
press the Details radio button in the File Transfer window's toolbar. To switch back to the
FST Version 4.02.21 Manual 62
simple list of file names press the List radio button. To display the contents of a subdirec-
tory, double click on the directory name in the list box (or select it and press the Upload
button. To display the contents of the parent directory or another drive, select it from the
combo box or press the Parent Dir button. To transfer the currently displayed directory again
press the Refresh button.
Note! Displaying the directory takes a little time. While the information is transferred the
lights in the status bar will be red. As soon as the transfer is finished it will be switched to
green again. If you want to stop the current transfer press the Stop button.

Uploading Files to the PC


To upload a file from the controller to the PC double click on the file name in the list box (or
select it and press the Upload button). You will be asked for the location where to store the
file on your PC using the standard file dialog. During the file transfer the progress is shown
in the status bar and the lights are switched to red. If you want to stop the current transfer
press the Stop button.

Deleting files on the controller


To delete a file on the controller select it and press the Delete button.
You will be asked if you are sure, then the file is removed from the controller.

Downloading files from the PC


To download a file from the PC to the controller press the Download button. You will be
asked to select a file for download using the standard file dialog. The file will be transferred
to the directory of the controller of which the directory is currently displayed (see the combo
box in the toolbar). During the file transfer the progress is shown in the status bar and the
lights are switched to red. If you want to stop the current transfer press the Stop button.

Remarks
• Before you can go online you have to connect the controller to your PC and possibly
configure the online settings.
• The File Transfer window does not work correctly if the controller is protected by a
password (locked).

2.10.11The Online CI Terminal


The FST PLC operating system is communicating with the FST program using the so-called
Command Interpreter (CI). The CI offers various commands to display and modify operand
values, start and stop control programs, transfer files etc. These commands are used by the
FST online displays. If you want to type the CI commands directly you can do so for special
purposes by using the CI Terminal. To start the CI Terminal in a MDI child window select
"Online >> Terminal" from the menu.

FST Version 4.02.21 Manual 63


Note! Before you can go online you have to connect the controller to your PC and possibly
configure the online settings.

Enter the CI command in the edit field at the bottom of the window. Press the Enter key or
the Send button to send the command. The command and the reply will be displayed in the
window above.
Press the Enter key or the Send button again to repeat the last command.
Press the Clear button to erase the contents of the display window.
Press the Login button to start a login. If successful the version of the FST operating system,
the controller type and the name of the loaded project is displayed.

2.11 Programming in Statement List


The Statement List (STL) language is a text-based language for programming control pro-
grams in FST.

2.11.1 The Statement List Editor


This chapter describes the features and user interface of the Statement List editor. For a
description of the statement List language see the separate documentation on that subject.
The Statement List editor offers the following features:
• Automatic formatting of the entered lines of text
• Standard Windows text editor features such as undo, clipboard support, find and
replace
• Insert and overwrite mode
• Shortcut bar for all keywords
• Automatic prompt for Allocation List entries
• Automatic insertion of the comment to operands of the Allocation List
• Insertion of operands from the Allocation List
• Dialog based insertion of module calls
• Syntax check
• A different font for the program text can be selected

Before you can start programming in Statement List you have to create a project first. Then
add a new Statement List program to that project. The Statement List editor will be auto-
matically opened. Of course you can also open an already existing program from the current

FST Version 4.02.21 Manual 64


project. If you have opened a program, you will see the code of the program in the work area
of the Statement List editor. If you have created a new program, the work area is blank.

Auto Format
You can now start to enter the program text. Whenever you leave a line it will be formatted
according to its syntax. If there are syntax errors in the line, formatting is not possible, and
the line will stay as you have entered it.

Allocation List Support


If there is an operand in the formatted line, which is entered in the Allocation List with a
comment, that comment will be used as the comment for the line, if it has not already a
comment entered. The automatic comment for operands is prefixed by a simple quote and
cannot be edited in the Statement List editor. If a line is formatted and an operand is de-
tected, that is not yet entered in the Allocation List, you will be prompted to make an
Allocation List entry. If you do not want to enter the operand, click the cancel button or press
the ESC key. The automatic prompt for Allocation List entries can be switched off completely
in the Statement List editor preferences. Select "Insert >> Operand" from the menu to
choose an operand from the Allocation List to be inserted at the current cursor position
instead of typing it.

Inserting Keywords Using the Shortcut Bar


The Statement List shortcut bar allows an overview and quick insertion of all available
Statement List instructions. For each keyword a button is available from a floating toolbox.

Inserting Module Calls Using a Dialog Box


If you use the Module Call dialog for inserting a module call comments for the call parame-
ters will be inserted automatically for modules from the library.

Syntax Test
If you want to check the syntax of the source code in the currently open editor window you
can simply compile the program.

FST Version 4.02.21 Manual 65


Clipboard Support
The Statement List editor supports the Windows Clipboard. This allows you to copy or move
portions of text within the program, between different programs that are opened in FST or to
exchange text with other Windows applications.
Before you can move or copy text you have to make a selection. Drag the mouse over the
portion you want to select, or hold down the shift key while you are moving the insertion
point with the direction keys. To select all text select "Edit >> Select All" from the menu.
From the Edit menu or right click popup menu choose "Cut" or "Copy". The cut or copied
text is placed onto the Clipboard and is available for pasting. Move the insertion point to the
location where you want to insert the text and select "Edit >> Paste" from the menu or
"Paste" from the right click popup menu.
Note! If you simply delete text by pressing the DEL key or selecting "Edit >> Delete" from the
menu or "Delete" from the right click popup menu, the deleted text will not be copied to the
Clipboard.

Undoing Changes
To undo the last modification select "Edit >> Undo" from the menu. To undo all changes you
have made since you last saved the program or opened it close the program without saving.
Note! Preparing the project for download (Make) or compiling the program to check the
syntax will automatically save all changes.

Find and Replace


To find certain text within the Statement List source code position the insertion point from
where you want to start the search and select "Edit >> Find" from the menu. The standard
Find dialog will be displayed. Enter the text you want to search for and select any options.
Then click the Find next button to find, select and scroll to the next occurrence of the text to
find. The Find dialog will be kept open. Click the Find Next button again to proceed to the
next occurrence of the text. Click the Cancel button to dismiss the Find dialog.
To replace certain text in the Statement List source code position the insertion point from
where you want to start the search and select "Edit >> Replace" from the menu. The stan-
dard Find and Replace dialog will be displayed. In the "Find What?" text box type the search
text. In the "Replace With:" text box type the replacement text. Select any find options. Click
the Find next button to find, select and scroll to the next occurrence of the text to find. Then
click on Replace to replace the current selection with the replacement text. Click on Replace
all to replace all occurrences at once. Click the Cancel button to dismiss the dialog.
If you want to search for the same text as the last search again select "Edit >> Find Next"
from the menu. This will directly find, select and scroll to the next occurrence without open-
ing the standard Find dialog.

Insertion and Overwrite Mode


For the Statement List editor you can toggle between insertion or overwrite mode with the
INS key. If the editor is in insertion mode the text "INS" is visible in the status line. By de-
fault the Statement List editor starts up in insertion mode.

Saving Changes
The changes you make to the source code will be saved to file...
• If you explicitly save it by selecting "Program >> Save", "Program >> Save As..."or
"Program >> Save All" from the menu.
• When you are changing the program properties
• Prior to compiling it (syntax check) or preparing the project for download (make).
• If the project is closed.
• Prior to printing the project.

FST Version 4.02.21 Manual 66


Select "Program >> Save As" if you want to make a copy of the program. The same dialog as
for creating a new program will be displayed. The original program will not be erased. It will
keep the source code how it was saved the last time before the Save As.

Printing
Select "Program >> Print" to print the source code of the active Statement List editor. You
will be prompted to save any unsaved modifications first. Then the standard print dialog will
be shown to select a printer

Changing the Text Font


The font used for the program text can be changed in the Statement List Preferences.

2.11.2 The Shortcuts Window


The Statement List shortcut bar allows an overview and quick insertion of all available
Statement List instructions. For each keyword a button is available from a floating toolbox.
To display the shortcut bar select "View >> Shortcut bar" from the menu or "Shortcut bar"
from the right click popup menu. Click on the keyword to insert it at the insertion point of
the active Statement List editor window.

Note!
• The shortcut bar will be automatically hidden, if the active window is not a State-
ment List editor and will be displayed again if you make a Statement List editor the
active window. If you do not want the shortcut bar to be displayed close the floating
toolbox window by clicking its close icon in the titlebar or select "View >> Shortcut
bar" from the menu or "Shortcut bar" from the right click popup menu again.
• The visibility, size and position of the Shortcuts window will be saved between FST
sessions.
• The Statement List instructions are also available from the "Insert >> STL Instruc-
tion" menu.

2.11.2.1 Inserting Module Calls


To insert a module call at the current editing position of your program select "Insert >> Mod-
ule Call" from the menu. A list with all program and function modules of the project will be
displayed. Choose the one you want to call by double clicking it, or select it and press the
OK button.
Then the Module Call dialog is displayed. Enter the required parameters in the edit fields
after the keyword "WITH". If a description file is available for the module you have selected,
a comment for each of the parameters will be displayed. If you choose the OK button the
module call including the comments will be inserted into your source code.

FST Version 4.02.21 Manual 67


The module Call dialog also offers the following features
• Select another module by changing the selection of the combo box and the number
in the first row.
• To select a module from the list of available modules of the project click on the but-
ton with three dots in the first row.
• Click on the buttons with three dots on it next to the parameter edit fields to choose
an operand from the Allocation List.

2.11.2.2 Statement List Preferences


To view or change the preferences for the Statement List editor select "Extras >> Prefer-
ences" from the menu and select the "STL editor" tab.

Prompt for Allocation List entries:


Check this option if you want to be prompted for Allocation List entries if a new operand is
used in the Statement List source code
FST Version 4.02.21 Manual 68
Use ELSE instead of OTHRW:
Check this option if you want to use the STL keyword ELSE instead of OTHRW. The default is
OTHRW.

Font:
The font name and size used for the Statement List editor windows are displayed in the
preview window using the actual font.

Default:
Click this button to use the Windows default font.

Browse:
Click this button to display the standard font selection dialog to make your selection.

Note!
• The options and the font are common for all Statement List editor windows.
• If you change the font it will be used for newly opened windows only. Re-open the
project to apply the new font for the already open editor windows as well.

2.11.3 Statement List Online


Statement List Online allows debugging your programs online. Status information and
operand values are displayed and operand values can be modified. To start STL Online open
the program for editing first. Then select "Online >> Online" from the menu or "Online" from
the right click popup menu. The window will now be switched to online mode. To switch
back to editing mode, select "Online >> Editor" from the menu or "Editor" from the right
click popup menu.

STL Online offers the following features:


• The active step is highlighted and its name and number displayed in a status line.
• The current values of the operands are displayed next to their occurrence in the
source code.
• The program run status is displayed in a status line.
• The current FST runtime error is displayed in the status line.
FST Version 4.02.21 Manual 69
• Directly scroll to a step by entering its number in a dialog window.
• The word values can be displayed in signed, unsigned or hexadecimal format.
• If the mouse cursor is placed over an operand value the symbolic name is displayed
in a small popup window (like ToolTips) if available.
• The update speed can be changed.
• Modify or toggle operand values
• Forcing of inputs and outputs is supported.

Modifying Operand Values


There are the following shortcuts for modifying operand values available:
• Double click on a word or timer value to open the Modify Operand dialog for it.
• Double click on the "OFF" or "ON" value of a single bit operand to toggle its value.

2.11.4 Statement List Program Structure


An STL control program is made up of a number of statements. By way of an example, take
the following short program:

STEP <Mark>
IF Switch1
AND I1.1
THEN SET O1.0
OTHRWSET Horn
...

Each individual line represents a statement for the controller. A statement is composed of
the following parts:
• STL instructions (e.g. IF, AND, THEN, SET, OTHRW)
• PLC operands (e.g. inputs or outputs) "Switch1" and "Horn" are symbolic operands.

When you are entering a new program you can write it as a:


• Step program
• Parallel logic program
• Executive part

2.11.4.1 Step program


A step program can contain up to 255 steps (1 to 255). Each step can be labelled with a
symbolic step mark.
In a step program you can set up branches or jumps to other parts of the program (JMP TO
step mark). Your program then continues with a step other than the directly following step.
A step may consist of one or more sentences. A complete sentence contains an IF clause, a
THEN clause and possibly an OTHRW clause. The first sentence of a step may be an incom-
plete sentence. In this case this is an executive part only (THEN...). This THEN clause is
always executed, without an input condition.
The program is executed step by step.
Note!
Control does not pass to the next step until a THEN or OTHRW statement has been executed
in the last sentence of the current step. Until this condition is met, the instructions in the
current step are executed again, cyclically each time the program is executed.
The STL language does not use "edge triggering". Conditions are evaluated for truth each
time they are processed without regard as to their prior status.

FST Version 4.02.21 Manual 70


Example of a simple step program:
STEP Mark1
IF I1.0
THEN SET F1.5
OTHRW RESET F1.5

STEP Mark2
THEN RESET F0.0
IF F1.5
THEN SET O0.7
SET F0.0
OTHRW SET O0.0
JMP TO Mark1

STEP Mark3
IF F0.0
AND I0.0
THEN SET O0.4

STEP Mark4
...

2.11.4.2 Parallel logic program


A parallel logic program consists purely of sentences; in other words no step marks are
programmed. This means that a parallel logic program is identical to a step of a step pro-
gram. Branches cannot be programmed in a parallel logic program.
The first sentence in a parallel logic program may be an incomplete sentence. All subse-
quent sentences must be complete sentences.
A parallel logic program is processed cyclically until it is reset (as is a ladder diagram pro-
gram). If you want the program to be executed only once, you must reset it in the last sen-
tence.

Example of a parallel logic program (P1) that is executed only once:


THEN RESET F0.0
IF N I1.0
THEN SET O0.7
IF I1.7
THEN SET O1.7
OTHRWSET F0.0
RESET O1.7
...
...
IF F0.0
AND I1.0
THEN SET O1.0
RESET P1
OTHRWRESET P1

FST Version 4.02.21 Manual 71


2.11.4.3 Executive part
An executive part is essentially structured in the same way as an incomplete sentence in a
parallel logic program. There is no introduction with a THEN clause. All of the statements
entered are executed without an input condition. No branching is possible within the pro-
gram. If you enter an IF clause further on in the executive part, an error results. Example of
an executive part:

SET F0.0
RESET O1.0
LOAD V50
TO TW7
SET T7
CMP2
...

2.11.4.4 Comments
There are two types of comment that you can add to your STL program:

Short comments with up to 36 characters can be appended to a program line. They are
introduced with one quotation mark.
Example:
IF N I1.7 "No signal from sensor

Long comments can extend over a whole line. They are introduced with two quotation
marks.

Example:
""This is a long comment that can be as long as an entire line.

2.11.5 Statement List Instructions Reference


This chapter gives an overview of the Statement List instructions.

2.11.5.1 Statement List Organisation

The STEP statement is very important in sequence programs as it determines the structure
of the program or, if branches are used, the sequence of processing.
STEP can be followed by a step mark with a maximum of nine characters or a number (label).
A step mark is required if you want to branch to this step from elsewhere in the STL pro-
gram.
Example:
STEP Setup
...
...
THEN JMP TO Setup
During the translation process the steps are renumbered internally, beginning at step 1
through to the maximum number.
Note!
• In an STL program a step is not processed until a THEN or OTHRW clause in the last
sentence of the preceding step has been executed.
• Processing of a step program is not cyclical.

FST Version 4.02.21 Manual 72


IF always introduces a conditional part. Operands can be interrogated and linked by logical
associations within the statement. The result represents the condition for further process-
ing.
Example:
IF I1.0
AND N I1.1
...

THEN introduces the executive part. This part is executed if the condition is true. The state-
ment may contain commands to modify outputs or flags etc., to carry out arithmetic opera-
tions, to activate timers or counters, or to call other programs or program modules.
Example:

THEN LOAD V100


TO TP7
...

OTHRW introduces a second, alternative executive part. This part is executed if the result of
the conditional part of the step is not true and hence the THEN clause cannot be executed.
Example:
...
THEN SET O1.0
OTHRW RESET O1.0

2.11.5.2 STL conditional part


These statements enable you to construct complex input conditions.

This is the logical operator AND. It allows logical ANDing of a number of input conditions.
The condition is fulfilled when all ANDed input conditions are true.
Example:
IF I1.0
AND I1.1
THEN SET O1.0
OTHRWSET O1.7

This is the logical operator OR. This operator allows you to create a logical expression with
several input conditions. The condition is fulfilled when at least one of the conditions is true.
Example:
IF I1.0
OR I1.1
OR I1.7
THEN SET O1.0
OTHRWSET O1.7

This is the logical operator EXOR. This allows you to create a logical expression with two
input conditions. The condition is fulfilled when only one or the other input condition is true.

FST Version 4.02.21 Manual 73


Example:
IF I1.0
EXOR I1.1
THEN SET O1.0
OTHRWSET O1.7

NOP means No operation. You can use this statement when you want to carry out an execu-
tive part without an input condition.
Example:
IF NOP
THEN SET F1.0

This is a negation. It allows you to invert an input condition. In the example below, if output
O1.0 is not active, the program jumps to the Setup step.
Example:
IF N O1.0
THEN JMP TO Setup

2.11.5.3 STL Executive part

SET activates a one-bit operand. You can use this for setting an output to logical one, for
example.

RESET is the counterpart to SET. It deactivates one-bit operands, used, for example, for
setting an output to logical zero.

A LOAD statement reads a register or a multibit operand, i.e. its value is written to a multibit
accumulator. Normally this statement is followed by the keyword TO, indicating the destina-
tion of the operation.
Example:
THEN LOAD V500
TO TP31

A TO statement assigns a value to a word operand. TO specifies the destination of the op-
eration.
Example:
THEN LOAD V100
TO R6
The value 100 is loaded into register 6.

A JMP TO statement causes the program to branch to a specific program step.


Example:
STEP Mark
IF I1.0
THEN SET O1.0
JMP TO Start
...
...
FST Version 4.02.21 Manual 74
STEP Start
...
The program branches to the step mark Start and the program continues executing there.

2.11.5.4 Special functions - Extended STL


These functions allow you to enter statements for multibit operands in your STL program.

The higher-order byte and the lower-order byte are swapped in the multibit accumulator.
Example:
THEN LOAD V$55AA
TO OW0
SWAP
TO OW1
$55AA is loaded to OW0, but $AA55 is loaded to OW1.

The SHIFT instruction executes a swap between the Single Bit Accumulator (SBA) and a
Single Bit Operand (SBO).
This instruction can be used to construct Shift Registers of varying lengths...longer or
shorter than the 16 bit manipulations performed by the SHL and SHR instructions.
To operate properly, the SBA must first be loaded and then any number of single bit SHIFT's
can be programmed.
Example:
STEP 10
IF I1.0 " input activated
THEN LOAD I1.1
TO F0.0 " a flag is used here to avoid
" writing to an input, which
" would otherwise occur
SHIFT O1.1 " SWAP F0.0 <-> O1.1
SHIFT O1.2 " SWAP O1.1<-> O1.2
SHIFT O1.3 " SWAP O1.2<-> O1.3
SHIFT O1.4 " SWAP O1.3<-> O1.4
STEP 20
IF N I1.0 " wait for input to go away
THEN JMP TO 10 " repeat

SHL stands for shift left. This statement is used to shift the contents of the multibit
accumulator one bit position to the left. The right-most bit is filled with a zero. The effect is
multiplication by 2. If you call the SHL statement three times in succession, this is equiva-
lent to multiplication by 2x2x2, therefore multiplication by 8.
Example:
THEN LOAD V16
SHL
TO R7
The value of R7 is then 32.

SHR stands for shift right. This statement is used to shift the contents of the multibit accu-
mulator one bit position to the right. The left-most bit is filled with a zero. The effect is
division by 2. In similar fashion to SHL, repeated shifting to the right results in division by 2
each time.
FST Version 4.02.21 Manual 75
Example:
THEN LOAD V16
SHR
TO R7
The value of R7 is then 8.

The effect of this statement is the same as that of SHL except that the highest-order, left-
most bit is shifted out of the accumulator and is re-inserted as an overflow on the right as
the lowest-order bit.

As in the case of SHR, the bits in the multibit accumulator are shifted, but this time to the
right. The right-most bit is pushed out of the accumulator and re-inserted as the highest-
order bit.

A BID statement converts the contents of the multibit accumulator from binary to BCD rep-
resentation. You can use BCD code to drive LEDs on control panels, for example.
Example:
THEN LOAD IW0
BID
TO OW7

A DEB statement converts the contents of the multibit accumulator from BCD to binary code.
This conversion is necessary if you have connected BCD switches to an input in your control-
ler and you want to transfer the switching status of the switches from the input word for
processing in a counter.
Example:
THEN LOAD IW7
DEB
TO CW7

This command complements (INVerts) the contents of the multibit accumulator using the
one's complement method.
Example:
THEN LOAD OW1
INV
AND IW1
TO OW1

This command complements the contents of the multibit accumulator using the two's com-
plement method. In principle, the effect of using the CPL instruction is the same as multiply-
ing a number by -1 when applied to signed integers.
Example:
IF ( R32
< V0 )
THEN LOAD R32
CPL
TO R22

FST Version 4.02.21 Manual 76


2.11.5.5 Arithmetic functions

The INCrement instruction increases the value of any multibit operand by 1. Unlike other
arithmetic instructions, the INCrement operation may be carried out directly without the
need to first load the operand to be INCremented to the multibit accumulator.
While the INCrement instruction can be used with any multibit operand, it is most often used
in conjunction with Counters.
Example:
IF I 1.3
THEN INC R9

The DECrement instruc tion reduces the value of any multibit operand by 1. Unlike other
arithmetic instructions, the DECrement operation may be carried out directly without the
need to first load the operand to be DECremented to the multibit accumulator.
While the DECrement instruction can be used with any multibit operand, it is most often
used in conjunction with Counters.
Example:
IF I2.2
AND N I3.6
THEN DEC R9
In addition to the statements previously explained, the following arithmetic operations are
available:

(, ), +, -, *, /, <, <=, =, >=, >, <>

These functions allow you to program arithmetic operations and comparisons.


Example:
IF ( FW0
= V1234
)
AND
( R1
<> V0
)
THEN...
Note! In statements of this type you must be absolutely clear whether you need parentheses
(brackets), and if so for which expressions. It is all too easy to corrupt the logical structure
by omitting or wrongly placing parentheses.

2.11.5.6 Module calls

The Call Function Module instruction is used to request execution of an external program
routine. Function modules may be considered similar to special function calls.
Function modules may be written in one of several languages including STL and C.
Some program modules may use function units (FU) to pass information to/from user pro-
grams and function modules. Depending upon the specific function module being called, it
may be necessary to provide several parameters when using a CFM, see WITH instruction.
Note! CFMs must not contain steps. No task switch takes place after a call to a CFM.

The Call Program Module instruction is used to request execution of an external program
routine. Program modules may be considered similar to subroutines.
FST Version 4.02.21 Manual 77
Program modules may be written in one of several languages including STL and C.
Some program modules may use function units (FU) to pass information to/from user pro-
grams and program modules. Depending upon the specific program module being called, it
may be necessary to provide several parameters when using a CMP, see WITH instruction.
Note!
It is not permissible to use the CMP instruction from within a program module.
After each call to a CMP a task switch will take place to allow for steps inside the program
modules.

The WITH instruction is used to pass parameters to function or program module calls using
the function units (FU).
Example:
IF I1.2
THEN CFM 0
WITH V2

2.11.6 Customising FST


There are several possibilities to customise the FST program and runtime library.
Preferences
FST offers some options that can be set to individual needs or preferences.
Select "Extras >> Preferences" from the menu to open the Preferences dialog.

2.11.6.1 The Project Directory


Using different project directories is useful to sort a larger amount of projects in groups. But
you have to remember the different locations where you have stored FST projects.
If you want to view or change the current common root directory for FST projects, select
"Extras >> Preferences..." from the menu. In the tabbed dialog that will be displayed select
the General tab. Enter the path of the new directory or press the Browse button to select an
already existing directory. Relative paths (beginning with a dot) are subdirectories of the
directory where you have installed FST.

FST Version 4.02.21 Manual 78


After changing the directory path and closing the dialog the currently open project will be
closed.
Note! If you want to use DOS based tools for you project, such as fieldbus configurators, use
a project path that does not contain long file names (max. 8 characters) or spaces.

2.11.6.2 Communication Port Preferences


Select "Extras >> Preferences" from the menu to open the Preferences tabbed dialog. Select
"Communication Port" to choose the communication method and configure the specific
settings.

FST Version 4.02.21 Manual 79


If you want to use TCP/IP for the online connection select the "use TCP/IP" radio button, or
"use RS232" to use RS232.
For the RS232 connection you have to specify a com port and a baud rate. The com port can
be selected from the first combo box. It offers all COM ports found on your PC. Choose the
baud rate from the second combo box. Please note that not all controllers allow high baud
rates. 9600 is usually a good choice, if not successful, try 2400. Please see the system
documentation of the controller for details.
If using TCP/IP you have to enter the IP address of the controller. If you check the option
"Save in Project" the settings will be stored in the project rather than for FST in general.
Press the OK button to accept the new settings. All online displays will be closed automati-
cally if you have made any changes.

2.11.6.3 Statement List Preferences


To view or change the preferences for the Statement List editor select "Extras >> Prefer-
ences" from the menu and select the "STL editor" tab.

FST Version 4.02.21 Manual 80


Prompt for Allocation List entries:
Check this option if you want to be prompted for Allocation List entries if a new operand is
used in the Statement List source code

Use ELSE instead of OTHRW:


Check this option if you want to use the STL keyword ELSE instead of OTHRW. The default is
OTHRW.

Font:
The font name and size used for the Statement List editor windows are displayed in the
preview window using the actual font.

Default:
Click this button to use the Windows default font.

Browse:
Click this button to display the standard font selection dialog to make your selection.

Note!
• The options and the font are common for all Statement List editor windows.
• If you change the font it will be used for newly opened windows only. Re-open the
project to apply the new font for the already open editor windows as well.

2.11.6.4 Print Preferences


You can change the print font and the margin widths of the printout. Select "Extras >> Prefer-
ences..." from the menu. In the tabbed dialog that will be displayed select the tab "Print".

FST Version 4.02.21 Manual 81


If you press the Browse button you will be asked for a printer to display the correct list of
available fonts before the standard font selection dialog is displayed.
Note! If you choose the margins smaller than the minimum printer margins, the printout will
be clipped.

2.11.7 The FST Runtime Library


FST allows configuring various input and output modules and drivers. All available drivers
are registered in the FST Runtime Library.
If new hardware is developed new IO scripts or drivers or updates will be needed. FST gives
the necessary support to manage the FST Runtime Library.

2.11.7.1 IO Scripts (Runtime Library)


Select "Extras >> Library..." from the menu to open the FST Library tool. "IO Modules" is
already the default tab.

FST Version 4.02.21 Manual 82


The Library IO Module dialog offers the following features:

• Select the controller type for the library from the combo box above the list box.
• The IO script description, the file name, and other information (see below) are dis-
played for each installed IO script in a separate column.
• Adjust the width of each column by moving the separator in the header with the
mouse.
• Each column except the last one of the list box can be sorted alphabetically by click-
ing on the column header. Click again to reverse the sorting order.
• If you only want to display the IO script descriptions in a simple list, toggle the radio
buttons in the upper right corner of the dialog.
• To deinstall the selected entry from the FST library press the DEL key or the Deinstall
button.
• To install a new IO script press the INS key or the Install... button.
• To extract the selected entry onto a floppy or somewhere else to be reinstalled later
press the Extract button.
The additional data in the list box is for your information only and cannot be edited.

In:
Number of input bytes that are used in the processor's IO area.

Out:
Number of output bytes that are used in the processor's IO area.

IW:
Number of FST input words that are occupied by a module of this type.

OW:
Number of FST output words that are occupied by a module of this type.

Switch
The possible switch positions for a module of this type.
FST Version 4.02.21 Manual 83
Installing a new IO Script
To install a new IO script press the INS key or the Install... button. You will be asked for the
path name of the new script using the standard file dialog. Then the new script will be in-
stalled. It is now available for your projects.

Extracting IO Scripts
To extract the selected entry onto a floppy or somewhere else to be reinstalled later press
the Extract... button. You will be asked for the path name where to store the script file using
the standard file dialog. Then a copy of the IO script will be created at the given location.
The IO script will not be removed from the FST Library.

Remarks
• There is a different library for each of the different controller types.
• Changing the FST Library does affect the FST installation rather than a single project.
• If you are deinstalling IO scripts that are used by projects, these projects no longer
can be loaded into the controller with this FST installation unless the IO script will be
installed again.
• IO scripts always have the extension ".iod".

2.11.7.2 Drivers (Runtime Library)


Select "Extras >> Library..." from the menu to open the FST Library tool. From the FST Library
dialog select the tab "Drivers".

The FST Library Drivers dialog offers the following features:


• Select the controller type for the library from the combo box above the list box.
• The driver name, the driver's number, dependencies and a short description are dis-
played for each installed driver in a separate column.
• Adjust the width of each column by moving the separator in the header with the
mouse.
• Each column except the last one of the list box can be sorted alphabetically by click-
ing on the column header. Click again to reverse the sorting order.
FST Version 4.02.21 Manual 84
• If you only want to display the driver names in a simple list, toggle the radio buttons
in the upper right corner of the dialog.
• To deinstall the selected entry from the FST library press the DEL key or the Deinstall
button.
• To install a new driver press the INS key or the Install... button.
• To extract the selected entry onto a floppy or somewhere else to be reinstalled later
press the Extract button.

Installing a new driver


To install a new driver press the INS key or the Install... button. You will be asked for the
path name of the new driver using the standard file dialog. Then the new driver will be
installed. It is now available for your projects.

Extracting Drivers
To extract the selected entry onto a floppy or somewhere else to be reinstalled later press
the Extract... button. You will be asked for the path name where to store the driver files
using the standard file dialog. Then a copy of the driver and all required files will be created
at the given location. The driver will not be removed from the FST Library.

Remarks
• There is a different library for each of the different controller types.
• Changing the FST Library does affect the FST installation rather than a single project.
• If you are deinstalling drivers that are used by projects, these projects no longer can
be loaded into the controller with this FST installation unless the drivers will be in-
stalled again.
• FST driver scripts always have the extension ".dmk".

2.11.8 External Tools


FST allows calling external tools directly from the Extras menu and to pass to these pro-
grams parameters such as the name of the currently open project. Select "Extras >> Config-
ure Tools..." from the menu to open the Tools dialog. This dialog allows adding, removing or
editing the list of external tools.

FST Version 4.02.21 Manual 85


The Tools dialog offers the following features:
Add a new tool to the Extras menu

Remove the selected tool from the Extras menu

Edit the settings for the selected tool

Execute the selected tool

Move the selected tool one position to the top

Move the selected tool one position to the bottom

Note!
• The tools appear in the order in the list box as they are in the Extras menu.
• Only the first 25 tools will be added to the Extras menu.

2.11.8.1 Adding or Modifying an External Tool


From the Tools dialog:

Press the New button to add a new tool to the Extras menu or

Press the Properties button to edit the settings for the selected tool

The External Tool dialog will be opened to enter the required settings.

Title:
Enter here the text that will appear in the Extras menu. You can use the Ampersand sign (&)
to define the following character as the shortcut. It will be underlined in the menu text. To
insert an Ampersand type "&&".

Program:
Enter here the path for the program to be executed. Press the "..." button to browse through
the files on your computer. It is also possible to use the macros described below

Parameters:
Enter here the parameters for your program. It is also possible to use the macros described
below.
FST Version 4.02.21 Manual 86
Wait for Completion:
If this option is enabled, when calling the tool, the FST main window will be minimised until
the execution of the tool has terminated. If you do not check this option, the tool will just be
called and FST and the tool run in parallel.

Release COM ports:


Enable this option, if the tool will use the COM port that is used for FST. If you enable this
option you should also enable the option "Wait for Completion".

Reload project:
This option will only work if you also enabled the option "Wait for Completion". If the execu-
tion of the tool has been finished, the current project will be read in again to update any
changes the tool may have caused.

Macros
The following macros will be replaced in the program and parameter strings:
<<<FSTDIR>>>
where FST.EXE sleeps
<<<RUNTIMEDIR>>>
one of "runtime.," e.g. "Runtime.FEC"
replacement for obsolete <<<DRIVERDIR>>> and <<<FBLIBDIR>>>
<<<ALLPROJECTS>>>
path to directory with project directories
<<<CURRENTPROJECT>>>
path to current project, == <<<ALLPROJECTS>>>\<<<PROJECT_CUR>>>
<<<TARGET>>>
new entry, "HC1X," "FEC," "HC2X," "HC0X"
<<<LANGUAGE>>>
new entry, "GB", "D"

The following macros will be replaced in the parameter string only:


<<<COM_PORT>>>
e.g. "COM1"
<<<COM_BAUDRATE>>>
e.g. "9600"
<<<#1>>> (obsolete)
"VFNM"
<<<#2>>> (obsolete)
"x"
<<<#3>>> (obsolete)
<<<CURRENTPROJECT>>>
<<<#4>>> (obsolete)
"IPC"
<<<#5>>> (obsolete)
<<<COM_PORT>>>"/"<<<COM_BAUDRATE>>>"/9000"

FST Version 4.02.21 Manual 87


3 The FST PLC Operating System (Kernel)
In order to use an IPC as PLC, the necessary PLC operating system software must be loaded
into the IPC. For this, FST uses the runtime kernel FSTPCR22.EXE. This contains PLC proper-
ties that are always required. The kernel is also responsible for loading and executing the
user project.
For the controllers that are prepared for FST, the FST PLC operating system is automatically
started on power-up. Additional parts of the PLC operating system can be subsequently
loaded into the controller as modules and/or as drivers together with a user project. The
properties of the FST PLC operating system are described in the following sections.

3.1 PLC operands


PLC programs consist of program code for handling of data. This data is available to the PLC
in the form of operands. It contains not only the values of operands, but also flags and many
special operands with specific properties. These operands are the classical PLC operands.
Operands with a value of one bit only are differentiated from those with 16 bits, called
words. In some cases, the operands can be used either as a bit value or together in the form
of a word value. In the case of FST software this applies to all inputs, all outputs, and all
flags. All other operands can only be used either as word or only as bit.
Where operands can be accessed either as bit or jointly in the form of a word, the conven-
tion is that the least significant bit (extreme right) contains the bit with the number 0. It
therefore follows that the most significant bit (extreme left) is bit number 15.
Other operands have special properties defined by the operating system. For example all
counters can be used either in the form of a counter value as counter word CW and in the
form of a 1-bit counter status C (expired or not expired). Timers are a similar case, having a
timer word TW and a timer status T. The FST PLC operating system ensures that these oper-
ands always change their values accordingly.
The individual operand types and their application in programs are described in the follow-
ing.

Abbreviations
b - Bit number
w - Word number

Value ranges of multibit operands: All multibit operands are 16-bit values.
0 to 65535 (Unsigned decimal)
-32768 to +32767 (Signed decimal)
$0000 to $FFFF (Hexadecimal)

3.1.1 Inputs
256 possible input words (0 to 255) each with 16 bits (0 to 15), can be addressed as words
and as bits.
Input (bit):
Syntax: Iw.b
Operations: Interrogate

Input word:
Syntax: IWw
Operations: Compare

3.1.2 Outputs
256 possible output words (0 to 255) each with 16 bits (0 to 15), can be addressed as words
and as bits.

FST Version 4.02.21 Manual 88


Output (bit):
Syntax: Ow.b
Operations: Interrogate, set, reset,
assign, assign negated
Output word:
Syntax: OWw
Operations: Load, compare

3.1.3 Flags
10,000 flag words (0 to 9999) each with 16 bits (0 to 15), can be addressed as words and as
bits.
Flag (bit):
Syntax: Fw.b
Operations: Interrogate, set, reset,
assign, assign negated
Flag word:
Syntax: FWw
Operations: Load, compare

3.1.4 Registers
256 registers (0 to 255), can only be addressed as words.
Syntax: Rw
Operations: Load, compare

3.1.5 Timers
256 timers (0 to 255), can be programmed as pulse timer (T)
Timer status (bit):
Syntax: Tnn, TONnn, TOFFnn
Operations: Interrogate, set, reset, assign,
assign negated
Timer value: TWnn
Operations: Load, compare

Timer preset: TPnn


Operations: Load, compare

A pulse timer allows an output to be activated for a pre-determined time by an input pulse.
A pulse timer responds only to a rising edge of the input condition (pulse). This occurs when
there is a change in status from 0 to 1. The pulse starts the timer (Tnn=1). The timer preset
(start value) is loaded into the timer word and the timer starts running. The timer word is
then decremented until:
• It reaches the value 0, the timer has then expired (Tnn=0, TWnn=0)
• Another rising edge (pulse) is detected in the conditional part, as a result of which
the timer is started again (timer restart)
• The timer status is reset (Tnn=0, Twnn=0)

FST Version 4.02.21 Manual 89


A pulse at input I0.1 activates the output for the length of time determined by the timer
preset (10 seconds). The normally closed contact in the first rung prevents the timer from
being restarted if it is already active.

Example:
IF I0.1
AND N T1
THEN SET T1
WITH 10S
IF T1
THEN SET O0.1
OTHRWRESET O0.1

3.1.6 Counters
Operations:
One-bit: Interrogate, set, reset, assign, assign negated
Multibit: Load, compare
C0 to C255 Counter status, one-bit
CW0 to CW255 Counter word, multibit
CP0 to CP255 Counter preset, multibit

3.1.7 Constants
Operations: Load, compare
Vnnnn Multibit

3.1.8 Function units


256 function units, 7 of which (32 to 38) are used for passing parameters, the rest are avail-
able for general use.

Operations: Load, compare


FU0 to FU255 Multibit

Function units FU32 to FU38 are available for each program because they are used for pass-
ing parameters to modules. Only the program’s own FUs can be accessed from within the
programs, the syntax is therefore simply FUw. The FUs of all programs can be addressed in

FST Version 4.02.21 Manual 90


the command interpreter, for which the program number has to be specified: FUp.w (p =
program number, w = FU number 32 to 38).

3.1.9 Programs
Operations: Interrogate, set, reset
P0 to P63 One-bit

3.1.10 Program statuses


Operations: Interrogate, set, reset,
assign, assign negated
PS0 to PS63 One-bit

The program and program status operands provide information about the status of a pro-
gram:
P PS Status
0 0 Inactive
0 1 No meaning
1 0 Active but suspended
1 1 Active and being processed

A program with the number x can be started and stopped via the operand Px. After having
been started with the command SET Px, Px=1 and PSx=1. When it is stopped with the com-
mand RESET Px, Px=0 and PSx=0. The active program Px can be suspended with RESET PSx.

3.1.11 Errors
Operations: Interrogate, reset
E One-bit
EW Multibit

3.1.12 Initial execution flags


When a program is executed for the first time the initial execution flag is 1, then it is set
automatically to 0.
Operations: Interrogate
FI One-bit, for each program
There are separate initial execution flags for each program. Addressing is as for function
units.

3.1.13 Retentive operands


If operands are retentive this means that their value is preserved during power off. On the
different controller types different parts of the FST operands are retentive.
FECs A drop in operating voltage results in some of the operands being copied to flash
disk:
FW0 to 255
R0 to 127
TP0 to 127
C0 to 127
CP0 to 127
Password

HCXX Part of the zero-power RAM is used for retentive storage of operands.
As a result, nearly all operands can be made retentive:
FW
R
FST Version 4.02.21 Manual 91
TV
C, CP, CW
FU
Password

3.1.13.1 Configuration of the driver for retentive operands


For the FEC Compact, FEC Standard, HC0X and HC20 CPUs the above-mentioned operands
are always retentive. It is not necessary to configure any driver or something else. The
retentive storage of the operands cannot be switched off. Use the function module F9 (see
below) to reset all operands if required.
In order to make the above-mentioned operands retentive in the HC1X CPUs, the driver for
retentive operands "DRAD" must be selected and parameterised in the driver configuration
of each project that wants to use retentive operands. For "Special parameters", the default
setting " -q" should normally remain. This option suppresses multiline output on the con-
troller screen when the driver is started.

3.1.14 Function modules for modifying operands


Overview
CHECKSUM Checksum for a subrange of flag words
COPY Copy a subrange of flag words
DINDEXMW Indexed decrementing access to flag words
F9 Reset operands
IINDEXMW Indexed incrementing access to flag words
NINDEXMW Delete certain range of flag words
RINDEXMW Indexed read access to flag words
WINDEXMW Indexed write access to flag words

CHECKSUM
Check sum for a subrange of flag words
Input parameters
FU32 Number of the first flag word
FU33 Number of the last flag word
Output parameters
FU32 Check sum
Note! The check sum is formed by simple addition of the flag words.

COPY
Copy a subrange of flag words
Input parameters
FU32 Number of the first source flag word
FU33 Number of the first target flag word
FU34 Number of flag words
Output parameters
None
Note! The flag word ranges may overlap.

DINDEXMW
Indexed decrementing access to flag words
Input parameters
FU32 Index to flag word
Output parameters
FU32 Value read
Note! The given flag word will be decremented by 1 if it is not already 0.
FST Version 4.02.21 Manual 92
F9
Reset operands
Input parameters
FU32 = 0 Reset all registers, counters, timers, flags
=1 Reset all registers
=2 Reset all flags
=3 Reset all timers
=4 Reset a ll counters
Output parameters
None
IINDEXMW
Indexed incrementing access to flag words.
Input parameters
FU32 Index of the flag word
Output parameters
FU32 Value that is read
Note! The given flag word will be incremented by 1 if it is not a lready 65535 ($FFFF).

NINDEXMW
Delete defined range of flag words
Input parameters
FU32 Index of the flag word
FU33 Number of flag words to be deleted
Output parameters
None
RINDEXMW
Indexed read access to flag words
Input parameters
FU32 Index of the flag word
Output parameters
FU32 Value read
WINDEXMW
Indexed write access to flag words
Input parameters
FU32 Index of the flag word
FU33 New value
Output parameters
None

FST Version 4.02.21 Manual 93


3.2 Multitasking
The FST PLC operating system supports multitasking. It can execute the processing cycles of
a number of programs one after the other (referred to as tasks). While in a task one program
is being processed, the other currently active programs are not processed. However, execu-
tion of the program segments and switching to the next program (task change) takes place
so quickly that the programs appear to run in parallel. This is known as pseudo-parallel
program execution.

A task change takes place:


• In STL step programs: after a step has been processed
• In STL parallel logic programs: at the end of the program
• In LDR programs: at the end of the program and after execution of a jump
• In all programs: after a program module (CMP) is called
• A program n can be activated (started) and deactivated (stopped) from within an-
other program or module. The program is activated by setting the operand Pn, and
deactivated by resetting it.

STEP Call
IF I0.1
THEN SET P2
RESET P4
A rising edge at I0.1 activates program number 2 and deactivates program number 4. The
program represented here and program 2 then run in pseudo-parallel mode.

Note!
• Pseudo-parallel processing of a number of programs may considerably slow down
execution of individual programs in comparison with execution of one program on
its own.
• If several programs are running in pseudo-parallel mode, the order in which they are
processed is identical to the order in which the programs were activated.
When a program starts another program, initially the latter program is only activated (in-
cluded in the list of programs to be processed). It is not started until it is 'its turn'.
In the first example, program 0 (STL) starts program 4 (LDR) in step 1, program 4 in turn
starts program 3 (LDR). The order in which they are processed is as follows:

Program 0
Program 4
Program 0
Program 3
Program 4
Program 0 ... etc.

In the STL program, only one step is executed each time


In the second example, program 0 (STL) starts program 4 (STL) in step 1, program 4 in turn
starts program 2 (STL) in step 2. The order of processing is as follows:
Program 0 Step 1
Program 4 Step 1
Program 0 Step 2
Program 4 Step 2
Program 0 Step 3
Program 2 Step 1
Program 4 Step 3
Program 0 ... etc.
FST Version 4.02.21 Manual 94
Note!
• Function modules and program modules are a fixed part of the calling program (i.e.
sub-routines). They are not processed in parallel with the calling program. They are
processed in the task of the calling program. A task change always takes place after
a program module is called, not after the call of a function module (This is a new fea-
ture of FST version 4!).
• There is no limit to the number and type of programs that can be a ctive at the same
time.
• For diagnostic purposes the current status of a program can be determined in online
mode with the display command. The response from the command interpreter to the
DPn command takes the following form:

= <type>,0,<status>,<step_number>
<type>: STL=0; LDR, FUP=1; C=2

Description of the third parameter:

..,..,0,.. The program is inactive.


It is not involved in the task change. (Pn=0)
..,..,2,.. The program is active, but suspended.
It is involved in the task change. (Pn=1, PSn=0)
..,..,3,.. The program is active and running.
Its task is being processed. (Pn=1, PSn=1)

3.2.1 The Start/Stop Switch


After reboot the project will always start automatically unless you have a start/stop input or
built in run/stop switch. A start/stop input or built in run/stop switch has the same influ-
ence on the running state of the project. The start/stop input can be configured in the
Controller Settings of the project.
At start-up the project will only start automatically if the internal switch (if any) is switched
to run and the s tart/stop input (if configured) is set.

During run time a reaction is always edge sensitive.

A falling edge (switching from run to stop) will cause all programs to be inactivated (reset-
ted) or stopped (breaked), depending on the option "Reset programs" of the Controller
Settings.
A rising edge/switching from stop to run will start program 0 and all stopped (breaked)
programs, depending on the option "Reset programs" of the Controller Settings.

3.2.2 The Run LED


The Run LED of the FEC and HC0X controllers shows the current status of operation:
GREEN programs are executed
YELLOW no programs are executed
RED an FST error occurred

3.2.3 Function blocks to control the execution of programs


Overview
F4 Start cyclical execution of a program.
F8 Stop all cyclical programs.
F23 Interrogate whether a program is ready for execution.
F26 Control programs whose numbers are stored in variables.

FST Version 4.02.21 Manual 95


F4
Start cyclical execution of a program.
Input parameters
FU32 Program number, 0 to 63
FU33 Time in msec, 1 to 65535
or 0 to deactivate
Output parameters
None
Note!
• The resolution is 13.74 msec (5ms for the FEC Standard). All times specified in FU33
are truncated to a multiple of 13.74 msec (5ms for the FEC Standard). Instead of 100
msec, therefore, only 96.18 msec (100ms for the FEC Standard).
• Function module F4 can be used more than once. In order to stop c yclical processing
for a program again, a value 0 must be specified in FU33. See also F8
• A cyclical program must reset itself with RESET P in order to be called again when
the next interval has elapsed.
F8
Stop all cyclical programs.
Input parameters None
Output parameters None
Note! This module terminates the cyclical processing of programs. It is effective for all pro-
grams that are entered as cyclical with F4, it is therefore not selective. F4 must be used to
remove a single program from cyclical processing.

F23
Interrogate whether a program is ready for execution.
Input parameters FU32 Number of the program
Output parameters FU32 = 0 Program does not exist or
is not ready for execution
= -1 Program can be started
F26
Control programs whose numbers are stored in variables.
Input parameters FU32 Number of the program
FU33 = 0 Start program
=1 Stop program
=2 Resume interrupted program
=3 Interrupt program
Output parameters None

3.3 Error Handling


Errors can always occur in an automated system. One has to differentiate program errors
and system errors. A program error, for example, is division by zero. A system error, for
example, is the failure of an I/O group. The FST PLC operating system detects numerous
errors and handles them in a fixed way. The user can participate in error handling and, if
required, in solution of the problem. The error program is intended for this purpose.
If an error occurs during operation, a number is entered into the error word. This numbe r
corresponds to the error that has occurred (error number). At the same time two other
numeric values are stored, specifying more closely the location where the error occurred.
Generally, these are program number and step number. If the program does not have any
steps, the step number is zero. If the error does not occur in a program, the program number
is 255. In the case of I/O errors, the base address of the corresponding module is entered in
the second position, otherwise zero.

FST Version 4.02.21 Manual 96


A new error can be entered if the error word has the value zero, that is, if no other error has
occurred. This means that only the first error is stored. Later errors are ignored. If an error
output has been configured, this follows the error word. If it is non-zero, it is set. When it is
reset, the error output is also reset. Otherwise the error output can be interrogated by a
program in the same way as any other output.

3.3.1 Error handling without error program


If a new error is entered, all programs are stopped and all outputs (except the error output)
are reset (only if the option "Reset Outputs" in the Controller Settings is selected).

The error word and other information can be interrogated as operand E or EW or with func-
tion module F22, subfunction 0. The error is not reset by this interrogation. It can be reset by
resetting the error E or EW or with function module F22, subfunction 1.

If E or EW is set to a non-zero value, this corresponds to the occurrence of a new error and is
only possible if EW was previously zeroed.

Unloading the active project in the controller (Y) or loading a new project deletes the error
word and the error output, but not the starting and stopping of the project or individual
programs (CI, Run/Stop switch).

Note! Before restarting a project following an error, the error should be deleted (acknowl-
edged) to allow the detection of a new error.

3.3.2 Error handling with error program


The error program is basically a normal FST program – but it cannot be program P0. The
program to be used as error program is defined in the Controller Settings for the project or
with function module F21. F21 also allows the program to be modified or deactivated at any
time.

When set via the Controller Settings, the linker-loader checks whether the selected program
exists. Function module F21 does not carry out this check. If a non-existent program is
selected, the system behaves as if no error program were set.

If an error occurs, the error program is called immediately and exclusively. The programs
active at the time of error occurrence "sleep" as long as the error program is being executed
(active). If the error occurs in a program, this program is stopped before the error program is
called.

The error program can be a step program. Instead of the normal task change, a simple I/O
scan is carried out, but no other programs are executed. This applies also for cyclical pro-
grams. The statuses of programs can be modified in the error program (or via the CI), but
these continue to "sleep" as long as the error program is executing.

When function module F22, subfunction 2 is called, the "sleeping" programs are "woken".
Task change between the programs now takes place again as usual. All active programs are
executed, with execution continuing at the interruption point. Status changes by the error
program are taken into account. Calling function module F22, subfunction 2 also deletes the
error. If function module F22, subfunction 2 is called without an error program being exclu-
sively executed, the error is deleted without any other action being taken. The error will not
be inactivated automatically, however.

FST Version 4.02.21 Manual 97


F22, subfunction 3 resets all programs and outputs (even if the flag "Reset Programs" of the
Controller Settings is not set). The error and any error output are retained. It is not important
whether the call comes from the error program or elsewhere and independent of whether an
error is set or whether an error program is configured and/or active.

If an error occurs while the error program is active, all programs are stopped and all outputs
are reset in machine code. It is not important whether the error program was started by an
error or by a normal program call. If no error was entered, the new error is entered. If the old
error was not deleted, error number 39 "double error" is entered. The two additional infor-
mation items contain the error source, as usual (i.e. the number of the error program and
the active step of the error program when the error occurred).

3.3.3 Special treatment of I/O Errors


The I/O errors 11 and 12 are treated a little bit different. Once error 11 or 12 has occurred
another error 11 or 12 will not happen again. To enable error 11 or 12 again, you have to
execute function module F25 (see below). If a project is started with the R command, I/O
errors will also be enabled again.

3.3.4 Error handling function modules


Overview
F21 Set or interrogate a program for error handling.
F22 Set error handling.
F25 Set error handling in the event of I/O errors.
F21
Set or interrogate a program for error handling
Input parameters FU32 Number of the program for error handling or
0 to reset the function, or an inadmissible
program number (>= 64) to determine the cur-
rent setting.
Output parameters FU32 Current number of the program for error
handling
Note! Alternatively, an error program can also be set in the Controller Settings of the project.

F22
Set error handling
Input parameters FU32 =0 Read out the error stack
=1 Read out the error stack and delete
the error
=2 Error restart, read out the error stack
and delete the error
=3 Non-recoverable error, abort program
execution

Output parameters FU32 Error number


FU33 Program number
FU34 Step number
FU35 Always 0 (error address)

F25
Set error handling in the event of I/O errors
Input parameters FU32 = 0 Deactivate the error detection
=1 Activate the error detection, default setting
Output parameters None
FST Version 4.02.21 Manual 98
3.3.5 Overview of error numbers
The FST controller errors are numbered and normally appear with very brief additional
information and sometimes without explanatory text. The following contains an overview of
the error messages of the FST PLC operating system.
The error status can be displayed with the CI command "DF". The response consists of 3
numeric values. The first is the error number, the other two give additional information on
the situation in which the error occurred. Normally the second value is the program number
and the third value is the step number. If the program number is 255, the error does not
result from a program but from an external cause. A typical cause of this type of error is an
I/O module fault. Here, as in other cases, the third value contains a value giving additional
information on the error cause. In the case of I/O module errors, this value gives the input or
output word number in which the error occurred. The module can then be more easily identi-
fied via the I/O configuration. In the case of driver errors, the third value contains a numeric
value indicating the number of the driver. For test purposes, the "MF" command of the CI
can be used to generate an error. This method allows a project’s error handling to be tested.

Error number Meaning of the error Notes on error elimination


0 No error
2 Checksum error in project file Completely reload entire
PROJECT.RUN. project.

6 Program 0 to be started, but Create and load program 0.


not found.
7 Attempt to set or delete a non- Correct program or load
existent program or program missing program.
status.

9 Cannot start project due to Check and reload project.


error in project file Possibly a driver is used but
PROJECT.RUN. not loaded or a driver is
loaded but cannot be used
because conditions for its use
are not met. Possibly the
required hardware for the
driver is missing or incorrectly
configured. Possibly the
controller is out of memory.
11 I/O module defective, output Replace I/O module, elimi-
short-circuit or supply voltage nate short-circuit or connect
missing at I/O module. voltage supply.

12 I/O module not found. Check I/O module.


Possibly configure switch
settings on module or in
I/O configuration.

13 Watchdog activated A driver, module or IO script


blocked the FST kernel for
more than 1 second.

14 Could not find driver to start. Incorporate driver, param-


FST Version 4.02.21 Manual 99
A required driver could not be eterise correctly in driver
found or the driver reported configuration and check
not ready as it could not be hardware.
initialised.
Possibly the requirements for
the driver (hardware,
parameters) were not met.

36 Nested CMP/CFM or CMP/CFM Change program structure


not found when called.

39 Double error, error in pro- Eliminate source of error.


gram.
57 Cannot read project file Reload project.
(PROJECT.RUN).

59 Arithmetic error. Correct program.

Note! Drivers and modules can trigger other errors that are not listed here. These are then
described in the appropriate driver documentation.

3.4 The Command Interpreter (CI)


All Festo controllers have a Command Interpreter. It is generally called "CI". The CI is not a
man-machine interface. It is often used manually, however, as it provides a really simple
interface. The Command Interpreter interface is also used for a range of tasks by the FST
programming tool. The various program parts of the FST software handle communication
with the connected controller automatically and provide a much more powerful and conven-
ient user interface.

The CI, which is part of the of the FST PLC operating system, can be operated as a terminal
or terminal emulator via the controller’s serial interface (usually COM or COM1). As an op-
tion the COM port that is used for the CI on the controller can be changed to another COM
port in the Controller Settings of each project. This is pa rticularly useful, if you want to make
use of a FIFO that is supported by e.g. COM2, but not COM1.
This is the naming convention for the main CI COM port for the different controller types:

Controller Port number Description

FECs 0 the built in "COM" port

HC0X 0 the built in "COM" port (de-


fault)
1 the "COM1" port on an addi-
tional CP3x module
2 the "COM2" port on an addi-
tional CP3x module

FST Version 4.02.21 Manual 100


HC16 1 the built-in "COM1" port
(default) or the "COM1 port
on an additional CP3x mod-
ule, if the built in "COM1"
port has been disabled first

2 the "COM2" port on an addi-


tional CP3x module

HC2X 1 the built-in "COM" port (de-


fault) or the "COM1" port on
an additional CP3x module,

2 the "COM2" port on an addi-


tional CP3x module

In addition to the CI interface on a COM port, CI commands can be entered via the connected
keyboard and the results displayed on the connected monitor for HC1X and HC2X CPUs.
Using FST drivers a CI interface can be made available on additional interfaces like COM
ports and over TCP/IP.
Please note that the additional CI interfaces are restricted in some features (see below).

3.4.1 Command input


CI commands consists mainly of a single line as input and a response in the same line. The
majority of commands are not case-sensitive. Incorrect entries can be corrected with Back-
space (Ctrl H) before concluding with CR (Enter).
Example:

>DF=0,0,0
>
The DF command interrogates the controller’s error status. If no error is present, the control-
ler responds "=0,0,0". Following pressing of the keys D, F, and CR, the entry is shown in the
screen and the IPC adds its response and redisplays its prompt. Invalid commands result in
the error message "ACCESS ERROR" or, rarely, the abbreviated form "ERR". Also, an acous-
tic signal sounds from the speaker.

Command <command> "\r"

Response <command> <response> "\r\n>\21"

Error Response <command>


"b\r\nACCESS ERROR\r\n>\21"

FST Version 4.02.21 Manual 101


3.4.2 Chaining of CI commands
Nearly all commands can be chained. The CI processed the chained commands in sequence
and the respective responses are grouped. Semicolons must separate commands from
different command groups.
Example: The individual commands for starting program P0 and interrogating the program
status are:
>RP0
>DP0=0,0,3,2,0,0
>
Chained, the same command sequence has the form:
>RP0;DP0=0,0,3,2,0,0
>
Commands in the same command group (that is, several display or modify commands) can
be separated by a comma only, without repetition of the first character for selection of the
command group. Example: R0, FW16 and I0.3 are to be displayed. As individual commands:
>DR0=432
>DMW16=0
>DE0.3=1
>
The same command sequence chained:
>DR0, FW16, E0.3=432=0=1
>
Multi-line commands cannot be chained. For example, commands for changing a value with
entry of the old value. Chaining is also not possible for commands that are to be passed on
to drivers.

3.4.3 Mass display


A minus sign can be added to the end of commands for the display of values. Then, 16
consecutive values are shown as a mass display. This display method is also permissible for
bit operands.
Example: The command "DR1" displays Register 1.
>DR1=0
>
By contrast, the command "DR1-" simultaneously shows Registers 1 to 16.
>DR1-=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
>

3.4.4 Password protection


Access to the controller can be secured by password. If a password is set, MODIFY access
and access to drivers in the CI is disabled. The commands to set a password (LC) and to lock
or unlock the controller (LX) are described in the sections below.
There are some rules for the password protection:
A password consists of 3 to 20 visible ASCII characters with the exception of the comma
(that is, no spaces, tabs, IBM extended etc.).
If a password is set it is stored in the controller during power off, if retentive operands has
been activated. Then if the controller is powered on or rebooted, the controller will be
locked if a password is set.
If no retentive memory is available a password can also be stored within a project. Then this
password will be set and the controller locked when the project is loaded. The password for
the project is set within the Controller Settings of the project.

FST Version 4.02.21 Manual 102


3.4.5 Overview of CI commands
The following description of the commands uses the abbreviations in the table shown be-
low:
<BN> Bit number
<BN> Block number
<DN> Driver number
<PN> Program number
<RN> Register number
<TN> Timer number
<WN> Word number
<CN> Counter number
<YN> Station number
Enter the valid value instead of "". The value range depends on the operand.

3.4.6 Activating the CI / Logon


DC4 (Ctrl T) Logon and output of the kernel version

The CI reports to the connected terminal after either DC4 (Control-T) has been entered or a
hardware BREAK has been transmitted. Any command being processed is interrupted. The
controller responds with "FESTO IPC V2.nn" and the normal prompt ">" in the following line.

Please note that a hardware BREAK will not be detected by FEC and HC0X controllers!
Sending a hardware BREAK also sets the transmission speed on the controller side to a
standa rd rate of 9600 or 2400 Baud, depending on one of the following methods:

• After BREAK switch cyclically 2 times to 9600 Baud, 1 times to 2400 Baud (default).
• Always 9600 Baud (old method)
• Always 2400 Baud (useful for slow modem connections and Field PC Net alias
MpRAM).
• After BREAK switch cyclically 3 times to 2400 Baud, 2 times to 9600 Baud.
All methods allow changing to any baud rate after login (see the MV command). After boot-
ing method 1 will be selected. After loading a project using Field PC Net method 4 will auto-
matically be applied. The methods 1, 2 and 4 allow a connection with the any old FST host
software. From time to time the login may not succeed at once. Try again by hitting a key as
displayed by the FST host software. The new FST host software 3.21 knows about the differ-
ent baud rates and will adapt to them.

The login method can also be selected by the function module COM1METH.
COM1METH
Input parameters FU32 0 2x9600, 1x2400
1 always 9600
2 always 2400
3 3x2400, 2x9600
Return parameters FU32 current/new login method

3.4.7 X Release interface


The X command releases the serial port used for the CI (usually COM1). This command only
works when entered via the serial port.

3.4.8 Commands for display of operands and statuses


DA[<YN>.]<WN>.<BN> Display output bit
DAW[<YN>.]<WN> Display output word

FST Version 4.02.21 Manual 103


DB<BN> Display program module
The response consists of "=,0, , ".
The first value is the module type, either STL=0 LDR/FUP=1 or C=2.
The second value, memory range, is always 0.
The third value shows the status of the calling program.
The last value is the current step number within the module.

DBF<BN> Display function module


The response consists of "=,0, , ".
The first value is the module type, either STL=0 LDR/FUP=1 or C=2.
The second value, memory range, is always 0.
The third value shows the status of the calling program.
The last value is the current step number within the module.

DD Display current setting for decimal/hexadecimal display of words


The output is
"=D" for decimal display, unsigned
"=S" for decimal display, signed
"=H" for hexadecimal display

DE[<YN>.]<WN>.<BN> Display input bit


DEW[<YN>.]<WN> Display input word

DF Display error status word


Output:
Value of the status word
Number of program in which the error occurred
Step number within this program for example, "=59,3,24".
In the event of I/O errors, the program number shows the value 255 and the step number
shows the number of the input or output word in which the error occurred
DM<WN>.<BN> Display flag bit

DMW<WN> Display flag word

DO<WN> Display function unit


The global function units FU0 to FU31 and FU39 to FU255 can be displayed.

DO<PN>.<WN> Display local function unit


The local function units FU32 to FU38 can be displayed. These function units are separate
for each program.

DP<PN> Display program status


6 values are given as a response.
The first value is the module type, either STL=0 LDR/FUP=1 or C=2.
The second value, memory range, is always 0.
The program status is the third value. Either 0 for inactive, 2 for active and halted, or 3 for
active and processing.
The fourth value is the step number. It is non-zero for STL step programs and ladder dia-
grams with branches as long as the program is active. When a step program is not yet a c-
tive, it is in step 0.
The two last values are the number and the step of a called module, if appropriate.

DR<RN> Display register

FST Version 4.02.21 Manual 104


DS<PN> Display program initial execution flag
DT<TN> Display timer status for pulse timer
DTA<TN> Display timer status for switch-off delay timer
DTE<TN> Display timer status for switch-on delay timer
DTV<TN> Display timer preset
DTW<TN> Display timer word

DV Display baud rate


The DV command shows the current baud rate setting. Possible values are "=1200",
"=2400", "=4800", "=9600", "=19200", "=38400" or "=56000".

DZ<ZN> Display counter status


DZV<ZN> Display counter preset
DZW<ZN> Display counter word

3.4.9 Commands for modifying values


The commands for modifying operands c an also be given without entry of a new value, that
is, as a display command. The current value is then returned and can be reset with a new
value or retained by pressing the Enter key.

MA[<YN>.]<WN>.<BN>={0 | 1} Modify output bit


MAW[<YN>.]<WN>= Modify output word

MD={D | S | H} Set display mode


The display mode can be set to decimal unsigned "=D", decimal signed "=S" or to hexa-
decimal "=H".

ME[<YN>.]<WN>.<BN>={0 | 1} Modify input bit


MEW[<YN>.]<WN>= Modify input word

MF=<number> Modify error word


The value 0 deletes the current error. Any other value generates the appropriate runtime
error.

MM<WN>.<BN>={0 | 1} Modify flag bit


MMW<WN>=<number> Modify flag word

MO<WN>=<number> Modify global function unit


Modifies global function units FU0 to FU31 and FU39 to FU255.

MO<PN>.<WN>=<number> Modify local function unit


Modifies local function units FU32 to FU38. These function units are separate for each pro-
gram.

MR<RN>=<number> Modify register

MT<TN>={0 | 1} Modify (start/stop) pulse timer


MTA<TN>={0 | 1} Modify (start/stop) switch-off delay timer
MTE<TN>={0 | 1} Modify (start/stop) switch-on delay timer
MTV<TN>=<number> Modify timer preset
MTW<TN>=<number> Modify timer word

MV=<baud> Set baud rate


FST Version 4.02.21 Manual 105
The baud rate is set by "MV=1200", "MV=2400", "MV=4800", "MV=9600", "MV=19200",
"MV=38400" or "MV=56000". The baud rate can be abbreviated to 2 characters, for exam-
ple, "MV=96".
Note! "MV=56000" is not available for FEC and HC0X controllers.

MZ<ZN>={0 | 1} Set counter


MZV<ZN>=<number> Set counter preset
MZW<ZN>=<number> Set counter word

3.4.10 Program control commands


B Interrupt all current programs
BP<PN> Interrupt single program
R Start or continue program

If the option "Reset Programs" of the Controller Settings is selected program P0 is started
or continued. If the flag is not set all stopped (breaked) programs are also continued.

RB<no>[,<FU32>[,<FU33>[, ... [,<FU37>[,<FU38>]]]]]]]


Call program module

The command "RB" calls a loaded program module (one that is included in the project).
Note!
The command uses the context of program P63, which should be kept reserved for this
purpose. The required parameters must be passed with the call. A parameter may be omit-
ted. In this case, the previous value is used.
It returns =<FU32>,<FU33>,<FU34>,<FU35>,<FU36>,<FU37>,<FU38>.

Example:
RB7,14,,9=4712,103,0,0,0,0,0
Call CMP 7 with FU32=14, FU33=Old value, FU34=9, Results FU32=4712, FU33=103, FU34
to 38=0

RF<no>[,<FU32>[,<FU33>[, ... [,<FU37>[,<FU38>]]]]]]]


Call function module

The command "RF" calls a loaded function module (one that is included in the project).
Note!
The command uses the context of program P63, which should be kept reserved for this
purpose. The required parameters must be passed with the call. A parameter may be omit-
ted. In this case, the previous value is used.
It returns =<FU32>,<FU33>,<FU34>,<FU35>,<FU36>,<FU37>,<FU38>.

RP<PN> Start or continue program


S Stop all programs
SP<PN> Stop program <PN>

3.4.11 Commands for forcing inputs and outputs


All inputs and outputs can be selectively forced to 0 or 1. If an input bit is forced to 0 or 1,
this is visible to the program and the CI. If an output bit is forced to 0 or 1, this remains
invisible to the program and the CI, that is, output bits read out remain unchanged. Com-
plete input and output words can also be forced.

FST Version 4.02.21 Manual 106


Note!
• I/Os may only be forced during troubleshooting. A "finished" product must not con-
tain forced I/Os.
• The force table is not retentive.
• The force table is automatically deleted by a Y command or by loading a project.
• This feature is not available for all controller types. Forcing is supported for HC1x
and HC20 CPUs in general, for FECs and HC0X CPUs starting from kernel version
2.25.

The following CI commands are available for forcing I/Os:

YF Delete complete force table


DAF<WN>.<BN> Display output bit
Result
=0 Forced to 0
=1 Forced to 0
=N Not forced

DAWF<WN> Display output word


Result "=xxxxxxxxxxxxxxxx", bitwise with
=0 Forced to 0
=1 Forced to 0
=N Not forced

DEF<WN>.<BN> Display input bit


Result:
=0 Forced to 0
=1 Forced to 0
=N Not forced

DEWF<WN> Display input word


Result "=xxxxxxxxxxxxxxxx", bitwise with
=0 Forced to 0
=1 Forced to 1
=N Not forced

MAF<WN>.<BN>={0 | 1 | N} Entry in force table for output bit setting


=0 Force to 0
=1 Force to 1
=N Do not force

MAWF<WN>={val | N} Entry in force table for output word setting


=val Force to value given
=N Do not force

MEF<WN>.<BN>={0 | 1 | N} Entry in force table for input bit setting


=0 Force to 0
=1 Force to 1
=N Do not force

MEWF<WN>={val | N} Entry in force table for input word setting


=val Force to value given
=N Do not force
FST Version 4.02.21 Manual 107
3.4.12 Commands embedded in drivers
The FST PLC operating system allows drivers in the project to supplement standard com-
mands with driver-specific commands. Driver-specific commands are entered with a leading
exclamation mark "!" followed by the driver number and the command itself.

>!<DN><command>
>

A driver does not have to support own commands, however. Many drivers respond to an
empty command with status information. Generally, driver commands have a similar struc-
ture to standard commands. For example, the string driver with the driver number 3 has
display commands for strings in which the appropriate string number is used.
Example:

>!3D12=‘FESTO

3.5 The Real-time Clock


The task of a real time clock is to always have the correct time-of-day and date available,
even if the controller is switches off and later on again.
In addition there is also a system clock, i.e. the DOS clock. When the system starts (after
reboot or power on) the system clock is automatically set to the real time clock. During
runtime the system clock is updated from the system timer.
FST comes with a set of modules that allow to read and write the system and real-time
clocks. The modules to read and write the real time clock also synchronise the system clock
with the real time clock each time the module is called.

Note!
There are different real time clocks available on the different controller types.

FECs No real time clock available, only the system clock.

HC0X There is a real time clock in the CPU module.


This clock is battery buffered and lasts for about 10 years.

HC1X There can be two different real time clocks in the system:
1. the I2C bus RTC
2. the SRAM RTC

The I2C bus real-time clock is not on the CPU modules, but depending on the busboard
either on the busboard or in the DC/DC voltage conversion module.
Systems based on a 3-slot busboard have no I2C bus real-time clock. A Goldcap capacitor
supplies the real-time clock with voltage for 3 to 5 days only.

The SRAM RTC is inside the CPU module and battery buffered. It lasts for about 10 years. A
CPU module is equipped with a SRAM RTC if it has a ZL16 or ZL17 SRAM inside. If a SRAM
RTC is found in the system it will be preferred to the I2C bus RTC.

HC2X This CPU is equipped with a SRAM RTC. The SRAM RTC is inside the CPU
module and battery buffered. It lasts for about 10 years.

FST Version 4.02.21 Manual 108


3.5.1 Setting the clocks manually
The I2C real-time clock of the HC1X can be set with the Bios setup. How to do this is de-
scribed in the documentation that comes with the hardware.
Note! You will need a screen and keyboard connected.
To set the clock using FST you have to download a project with the modules to set the real-
time clock, that are described below, into the controller. The modules can be executed with
the CI command "RF" or "RB".

Example:
>RF10,8,30,0,0
>
If you have imported the module F10 as CFM10, this commands sets the real-time clock and
the system clock to 08:30.

3.5.2 Function modules for setting and reading the real-time clock

Overview
F10 Set time
F11 Set date
F12 Get time
F13 Get date
F10
Set time
Input parameters FU32 Hour (0 to 23)
FU33 Minute (0 to 59)
FU34 Second (0 to 59)
FU35 1/100 Seconds (0 to 99)
Output parameters None
F11
Set date
Input parameters FU32 Year (1980 to 2099)
FU33 Month (1 to 12)
FU34 Day (1 to 31)
Output parameters None
F12
Get time
Input parameters None
Output parameters FU32 Hour (0 to 23)
FU33 Minute (0 to 59)
FU34 Second (0 to 59)
FU35 1/100 Seconds (0 to 99)
F13
Get date
Input parameters None
Output parameters FU32 Year (1980 to 2099)
FU33 Month (1 to 12)
FU34 Day (1 to 31)
FU35 Day of week (0=Sunday, 6=Saturday)

FST Version 4.02.21 Manual 109


3.6 Miscellaneous

3.6.1 Mass storage for programs, drivers and files


The FST PLC operating system uses DOS drives to store the project and drivers. Which drive
is used can be selected in the Controller Settings of the project or the Driver Settings in the
Driver Configuration.

On the different controller types different drives are available:

FEC Compact On drive B: are 120 KB (FC20 90 KB, FC34 H01 or newer 370 KB)
available for programs and drivers. Also, the Startup file - which is
generated automatically by FST - should be loaded on this drive.
Drive A: is occupied by system files. No user files can
be stored on this drive.

FEC Standard On drive B: are 360 KB available for programs and drivers. Also, the
Startup file - which is generated automatically by FST - should be
loaded on this drive.
Drive A: is occupied by system files. No user files can
be stored on this drive.

HC0X On drive B: are 120 KB (HC02 H02 or newer 370 KB)available for
programs and drivers. Also, the Startup file - which is generated
automatically by FST - should be loaded on this drive.
Drive A: is occupied by system files. No user files can
be stored on this drive.

HC1X ROM/RAM disk:


If no diskette drive is connected to the controller or no disk is in-
serted, the ROM/RAM drive is becomes drive A.
The ROM areas of this drive already contains various driver files
for use with the FST.
The RAM area has approx. 84 KB available for the project file
and/or other drivers.
Flash-Disk:
The Flash-Disk is drive C.
This drive has 512 KB available for the project file and other drivers.
Also, the Startup file - which is generated automatically by FST -
should be loaded on this drive.

3.6.2 RAM for programs and drivers


For execution the project and drivers have to be loaded into memory. The following amount
of memory is approximately available for the project and drivers for the different controller
types.

FEC Compact 290 KB (FC20 30KB)


FEC Standard 200 KB
HC0X 290 KB
HC1X 430 KB

Note! For each STL instruction approx. 10 bytes of code are generated.

FST Version 4.02.21 Manual 110


3.6.3 Function blocks
An important way of extending the FST PLC operating system is by incorporating (import)
ready modules into a project and loading them with the project. Such modules can be writ-
ten in any supported programming language (STL, LDR, C).
Several C modules have been prepared for special tasks. These can be called either as CFM
or CMP.

Note!
• Further modules are described in the sections above.
• Most driver packages also include modules. These are described in the appropriate
driver documentation.
Overview
BLINK General blink bits
FIFO First-in-first-out memory
LOADSYNC Synchronisation of project (re)loading

BLINK
General blink bits
Input parameters None
Output parameters FU32 4 blink bits

Bit Change / sec Frequency / Hertz


0 0.25 2
1 0.5 1
2 1 0.5
3 2 0.25
Note!
This module does not use a timer. The module has to be called repeatedly in order to update
the blink bits.

FIFO
First-in-first-out storage
Input parameters
FU32 Mode
=0 To reset the FIFO
=1 To incorporate the value from FU 33 into FIFO
=2 To read out the next value from FIFO
=3 To determine the number of values stored in FIFO
Otherwise no function
FU33 If mode = 1 the new value
Output parameters
FU32 If mode (input) ...
=1 Returns 0 if successful,
otherwise 1 if no memory
=2 Next value from the FIFO or
0 if FIFO empty
=3 Number of values stored in the FIFO
Otherwise no value returned
LOADSYNC
Synchronisation of project (re-)loading
Input parameters
FU32 = 0 Prevent project loading
=1 Allow project loading
FST Version 4.02.21 Manual 111
Output parameters
None
Note! The CI commands S and Y! Always switch over to project loading allowed.

FST Version 4.02.21 Manual 112


4 FST Drivers Reference
This manual describes the drivers and modules of the FST Runtime Library.

4.1 Input and output modules


This chapter describes the input and output modules supported by the FST IPC. This chapter
is not intended to replace the manual supplied, however, but focuses on special points of
FST IPC application. For pin assignment and technical data please refer to the manual sup-
plied with the hardware.

4.1.1 PLC security


Most I/O modules are equipped with a PLC security function. This allows the runtime system
(FST IPC Kernel) to monitor the presence of configured modules when a project is started
and the function of the module at runtime. An FST error is triggered if a fault is detected. The
error numbers used are

11 I/O stage defective


12 I/O module not found or duplicated

Error 12
If Error 12 occurs, the configured module could not be found or there were several modules
with the same physical I/O address on the busboard.

Error 11
If Error 11 occurs, either the module is faulty, you have not connected the required external
power supply, or there is a short-circuit. For information on this, see the status input word
for the appropriate module. An additional FST input word has been assigned to each module
that supports this feature. The assignment of the individual bits is module-specific as shown
in the following table. Please note that the status input word is updated during each cycle.

Procedure for overload/short-circuit


In the event of a short-circuit (or an overload), please observe the following points.
It must be ensured that the output cannot be set until the cause of the problem has been
eliminated. If you are working in machine mode and have not set an error program, all out-
puts are automatically switched off when an error occurs. In system mode – or if an error
program has been started – you yourself must ensure that the output involved is reset. You
can evaluate the error information and the status input word to determine the output in-
volved. Here you should bear in mind that the outputs are normally grouped in sets of 8 that
must be reset together.

Working without PLC security


If you do not wish to use the PLC security function for a module, you can select the appro-
priate module driver in the FST IPC I/O configurer. The following table shows the I/O mod-
ules and the appropriate drivers without security.

Module Driver without PLC security


OM11 OM10
OM40 OM10
OM21 OM20
IM11 IM10
IM51 IM10

FST Version 4.02.21 Manual 113


4.1.2 Digital input and output modules
The following table shows an overview of the digital modules available.
They are described in the following sections.

Module Features Ident/Check/Status


IM10 2x8 digital inputs -
IM11 2x8 digital inputs */*/1
IM12 4x8 digital inputs */*/2
IM51 2x8 digital inputs (npn) */*/1
OM10 2x8 digital outputs -
OM11 2x8 digital outputs */*/1
OM12 4x8 digital outputs */*/2
OM40 2x8 digital outputs (1A) */*/1
OM20 8 digital inputs, -
8 digital outputs
OM21 8 digital inputs, */*/1
8 digital outputs
OM22 2x8 digital inputs, */*/2
2x8 digital outputs
OM70 6 relays (changeover contacts) -
OM70 6 relays (changeover contacts) */*/0
OM74 16 relays (break contacts) -
OM74 16 relays (break contacts) */*/0
TM10 16 digital inputs (TTL), -
16 digital outputs (TTL)
TM10 16 digital inputs (TTL), */*/0
16 digital outputs (TTL)
AS11 8 pushbuttons, 8 LEDs -
AS12 32 LEDs (red/green) -
AS13 16 switches (E-M-E) -
AS14 32 LEDs (green)

4.1.2.1 IMXX
IM10
2x8 opto-isolated digital inputs
Inputs: 16
Outputs:
Input words: 1
Output words:
Switch positions: 1 to 9
Sum of inputs: 144
Sum of outputs:
Special features:
Module identification:
Module check:
Status information
(additional input words):

Assignment of input words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 E1 E0

FST Version 4.02.21 Manual 114


IM11 PLC security
2x8 opto-isolated digital inputs with PLC security and control LEDs for the inputs
Inputs: 16
Outputs:
Input words: 1
Output words:
Switch positions: 1 to 9
Sum of inputs: 144
Sum of outputs:
Special features:
Module identification: Yes
Module check: Yes
Status information
(additional input words): 1

Assignment of input words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 E1 E0
1 Status 1 Status 0

Assignment of status registers:


Bit no. Name Function
0 - Reserved
1 - Reserved
2 - Reserved
3 NO 24V No external voltage
4 - Reserved
5 - Reserved
6 - Reserved
7 - Reserved

IM12 PLC security


4x8 opto-isolated digital inputs with PLC security and control LEDs for external 24V supply
Inputs: 32
Outputs:
Input words: 2
Output words:
Switch positions: 1 to F
Sum of inputs: 480
Sum of outputs:
Special features:
Module identification: Yes
Module check: Yes
Status information
(additional input words): 2

FST Version 4.02.21 Manual 115


Assignment of input words:
IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 E1 E0
1 E3 E2
2 Status E1 Status E0
3 Status E3 Status E2

Assignment of status registers:


Bit no. Name Function
0 - Reserved
1 - Reserved
2 - Reserved
3 NO 24V No external voltage
4 - Reserved
5 - Reserved
6 - Reserved
7 - Reserved

IM12
4x8 opto-isolated digital inputs with PLC security and control LEDs for external 24V supply
Inputs: 32
Outputs:
Input words: 2
Output words:
Switch positions: 1 to F
Sum of inputs: 480
Sum of outputs:
Special features:
Module identification: No
Module check: No
Status information -
(additional input words):

Assignment of input words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 E1 E0
1 E3 E2

IM51 PLC security


2x8 opto-isolated digital inputs with PLC security and control LEDs for the inputs
Inputs: 16
Outputs:
Input words: 1
Output words:
Switch positions: 1 to 9
Sum of inputs: 144
Sum of outputs:
Special features: npn
(negative switching)
Module identification: Yes
Module check: Yes
Status information
FST Version 4.02.21 Manual 116
(additional input words): 1

Assignment of input words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 E1 E0
1 Status E1 Status Eo

Assignment of status registers:


Bit no. Name Function
0 - Reserved
1 - Reserved
2 - Reserved
3 NO 24V No external voltage
4 - Reserved
5 - Reserved
6 - Reserved
7 - Reserved

4.1.2.2 OMXX
OM10
2x8 opto-isolated digital outputs
Inputs:
Outputs: 16
Input words:
Output words: 1
Switch positions: 1 to 9
Sum of inputs:
Sum of outputs: 144
Special features:
Module identification:
Module check:
Status information
(additional input words):

Assignment of output words:


OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 A1 A0

OM 11 PLC security
2x8 opto-isolated digital outputs with PLC security and control LEDs for the outputs
Inputs:
Outputs: 16
Input words:
Output words: 1
Switch positions: 1 to 8
Sum of inputs:
Sum of outputs: 128
Special features:
Module identification: Yes
Module check: yes
FST Version 4.02.21 Manual 117
Status information
(additional input words): 1

Assignment of input and output words:


OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 A1 A0
OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Status A1 Status A0

Assignment of status registers:


Bit no. Name Function
0 - Reserved
1 OVRLD Overload / short circuit
2 - Reserved
3 NO 24V No external voltage
4 - Reserved
5 - Reserved
6 - Reserved
7 - Reserved

OM12 PLC security


4x8 opto-isolated digital outputs with PLC security and control LEDs for external 24V supply
and overload
Inputs:
Outputs: 32
Input words:
Output words: 2
Switch positions: 1 to F
Sum of inputs:
Sum of outputs: 480
Special features:
Module identifica- Yes
tion:
Module check: Yes
Status information
(additional input 2
words):

Assignment of input and output words:


OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 A1 A0
1 A3 A2
IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Status A1 Status A0
1 Status A3 Status A2

Assignment of status registers:


Bit no. Name Function
0 - Reserved
1 OVRLD Overload / short circuit
2 - Reserved
3 NO 24V No external voltage
FST Version 4.02.21 Manual 118
4 - Reserved
5 - Reserved
6 - Reserved
7 - Reserved

OM12
4x8 opto-isolated digital outputs with control LEDs for external 24V supply and overload
Inputs:
Outputs: 32
Input words:
Output words: 2
Switch positions: 1 to F
Sum of inputs:
Sum of outputs: 480
Special features:
Module identification: No
Module check: no
Status information -
(additional input words):

Assignment of input and output words:


OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 A1 A0
1 A3 A2

OM40 PLC security


2x8 opto-isolated digital outputs with PLC security and control LEDs for the outputs
Inputs:
Outputs: 16
Input words:
Output words: 1
Switch positions: 1 to 8
Sum of inputs:
Sum of outputs: 128
Special features: 2.5 A max. ; 1 A nom. per channel
Module identification: Yes
Module check: Yes
Status information
(additional input words): 1

Assignment of input and output words:


OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 A1 A0
IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Status A1 Status A0

Assignment of status registers:


Bit no. Name Function
0 - Reserved
1 OVRLD Overload / short circuit
2 - Reserved
3 NO 24V No external voltage
FST Version 4.02.21 Manual 119
4 - Reserved
5 - Reserved
6 - Reserved
7 - Reserved

OM20
2x8 opto-isolated digital outputs, 2x8 opto-isolated digital inputs
Inputs: 8
Outputs: 8
Input words: 1
Output words: 1
Switch positions: 1 to 9
Sum of inputs 72
Sum of outputs 72
Special features
Module identification:
Module check:
Status information
(additional input words):

Assignment of input and output words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 E0
OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 A0

OM21 PLC security


2x8 opto-isolated digital outputs, 2x8 opto-isolated digital inputs with PLC security and
control LEDs for the inputs and outputs
Inputs: 8
Outputs: 8
Input words: 1
Output words: 1
Switch positions: 1 to 8
Sum of inputs 64
Sum of outputs 64
Special features
Module identification: Yes
Module check: Yes
Status information
(additional input words): 1

Assignment of input and output words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 EO
1 Status EO Status A0
OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 A0

Assignment of status register A0:


Bit no. Name Function
0 - Reserved
1 OVRLD Overload / short circuit

FST Version 4.02.21 Manual 120


2 - Reserved
3 NO 24V No external voltage
4 - Reserved
5 - Reserved
6 - Reserved
7 - Reserved

Assignment of status register E0:


Bit no. Name Function
0 - Reserved
1 - Reserved
2 - Reserved
3 NO 24V No external voltage
4 - Reserved
5 - Reserved
6 - Reserved
7 - Reserved

OM22 PLC security


2x8 opto-isolated digital outputs, 2x8 opto-isolated digital inputs with PLC security and
control LEDs for external 24V supply and overload
Inputs: 16
Outputs: 16
Input words: 1
Output words: 1
Switch positions: 1 to F
Sum of inputs 240
Sum of outputs 240
Special features
Module identification: Yes
Module check: Yes
Status information 2
(additional input words):

Assignment of input and output words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 E1 E0
1 Status E0 Status A0
2 Statis E1 Status A1
OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 A1 A0

Assignment of status register Ax:


Bit no. Name Function
0 - Reserved
1 OVRLD Overload / short circuit
2 - Reserved
3 NO 24V No external voltage
4 - Reserved
5 - Reserved

FST Version 4.02.21 Manual 121


6 - Reserved
7 - Reserved

Assignment of status register Ex:


Bit no. Name Function
0 - Reserved
1 - Reserved
2 - Reserved
3 NO 24V No external voltage
4 - Reserved
5 - Reserved
6 - Reserved
7 - Reserved

OM22
2x8 opto-isolated digital outputs, 2x8 opto-isolated digital inputs with control LEDs for
external 24V supply and overload
Inputs: 16
Outputs: 16
Input words: 1
Output words: 1
Switch positions: 1 to F
Sum of inputs 240
Sum of outputs 240
Special features
Module identification: No
Module check: No
Status information -
(additional input words):

Assignment of input and output words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 E1 E0
OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 A1 A0

OM70 PLC security


6 relay outputs (changeover contacts) with PLC security and control LEDs
Inputs:
Outputs: 6
Input words:
Output words: 1
Switch positions: 1 to 9
Sum of inputs:
Sum of outputs: 56
Special features: Relay changeover contacts
Module identification: Yes
Module check: Yes
Status information
(additional input words):

FST Version 4.02.21 Manual 122


Allocation of the output words:
OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 K5 K4 K3 K2 K1 K0

OM70
6 relay outputs (changeover contacts) with indicator LEDs
Inputs:
Outputs: 6
Input words:
Output words: 1
Switch positions: 1 to 9
Sum of inputs:
Sum of outputs: 56
Special features: Relay changeover contacts
Module identification:
Module check:
Status information
(additional input words):

Assignment of output words:


OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 K5 K4 K3 K2 K1 K0

OM74 PLC security


16 relay outputs (break contacts) with PLC security and control-LEDs
Inputs:
Outputs: 16
Input words:
Output words: 1
Switch positions: 1 to F
Sum of inputs:
Sum of outputs: 240
Special features: Reed relay, break contacts
Module identification: Yes
Module check: Yes
Status information
(additional input words):

Assignment of output words:


OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 K1 K0

OM74
16 relay outputs (break contacts) with indicator LEDs
Inputs:
Outputs: 16
Input words:
Output words: 1
Switch positions: 1 to F
Sum of inputs:
Sum of outputs: 240
FST Version 4.02.21 Manual 123
Special features: Reed relay, break contacts
Module identification:
Module check:
Status information
(additional input words):

Assignment of output words:


OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
O K1 K0

OM75 PLC security


16 relay outputs (break contacts) with PLC security and control-LEDs max. switching current
per relay contact 2 A
Inputs:
Outputs: 16
Input words:
Output words: 1
Switch positions: 1 to F
Sum of inputs:
Sum of outputs: 240
Special features: Reed relay, break contacts
Module identification: Yes
Module check: Yes
Status information
(additional input words):

Assignment of output words:


OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 K1 K0

OM75
16 relay outputs (break contacts) with indicator LEDs max. switching current per relay con-
tact 2 A
Inputs:
Outputs: 16
Input words:
Output words: 1
Switch positions: 1 to F
Sum of inputs:
Sum of outputs: 240
Special features: Reed relay, break contacts 2A
Module identification:
Module check:
Status information
(additional input words):

Assignment of output words:


OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 K1 K0

FST Version 4.02.21 Manual 124


4.1.2.3 TM10
TM10 PLC security
16 digital outputs (TTL), 16 digital inputs (TTL), with PLC security
Inputs: 16
Outputs: 16
Input words: 1
Output words: 1
Switch positions: 1 to 9
Sum of inputs: 144
Sum of outputs: 144
Special features: TTL (5V)
Module identification: Yes
Module check: Yes
Status information
(additional input words):

Assignment of input and output words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 E1 E0
OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 A1 A0

TM10
16 digital outputs (TTL), 16 digital inputs (TTL)
Inputs: 16
Outputs: 16
Input words: 1
Output words: 1
Switch positions: 1 to 9
Sum of inputs: 144
Sum of outputs: 144
Special features: TTL (5V)
Module identification:
Module check:
Status information
(additional input words):

Assignment of input and output words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 E1 E0
OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 A1 A0

4.1.2.4 ASXX
AS11
Universal display/switch-module with 8 pushbuttons and 8 LEDs
Inputs: 8
Outputs: 8
Input words: 1
Output words: 1
Switch positions: 1 to 6

FST Version 4.02.21 Manual 125


Sum of inputs: 48
Sum of outputs: 48
Special features: Pushbuttons and LEDs only
Module identification:
Module check:
Status information
(additional input words)

Assignment of input and output words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 ESC 7 6 5 4 3 2 1
OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 ESC 7 6 5 4 3 2 1

AS12
Universal display/switch-module with 32 LEDs (16 red, 16 green)
Inputs:
Outputs: 32
Input words:
Output words: 2
Switch positions: 1 to 5
Sum of inputs:
Sum of outputs: 160
Special features: LEDs only
Module identification:
Module check:
Status information
(additional input words):

Assignment of output words:


OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 A (green)
1 B (red)

AS13
Universal display/switch-module with 16 switches (E-M-E)
Inputs: 32
Outputs:
Input words: 2
Output words:
Switch positions: 1 to 5
Sum of inputs: 160
Sum of outputs:
Special features: 16 switches (E-M-E)
Module identification:
Module check:
Status information
(additional input words):

Assignment of input words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 A
FST Version 4.02.21 Manual 126
1 B

AS14
Universal display/switch-module with 32 LEDs (green)
Inputs:
Outputs: 32
Input words:
Output words: 2
Switch positions: 1 to 5
Sum of inputs:
Sum of outputs: 160
Special features: LEDs only
Module identification:
Module check:
Status information
(additional input words):

Assignment of output words:


OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 A
1 B

4.1.2.5 Address assignment matrix


The following tables are very helpful for planning ad-dressing of the individual modules. The
columns show the I/O modules, the rows show the processor I/O a ddresses. The module
address is set by means of the rotary switch on the underside of the module. Depending on
the module and switch position, the range shown for the switch position is assigned. All
addresses are shown in hexadecimal notation.
The same switch position may occur for different modules, but any single processor I/O
address can only be assigned once. This means that a module assigns all table rows associ-
ated with a switch position. There is a separate address range for inputs and outputs. The
FST IPC I/O configurer supports you in assigning addresses / switch positions. You would
always begin with the module that takes up the fewest I/O addresses, as it is then easier to
find space for the remaining modules.

Table 2: Address assignment digital output modules part I


AS11
120-123 1
220-223 2
320-323 3
1A0-1A3 4
2A0-2A3 5
3A0-3A3 6

FST Version 4.02.21 Manual 127


Table 3 address assignment digital output modules part II
OM10 OM11+ OM12 OM74+ OM20+ OM21 OM22 TM10 AS12 AS13
OM 40 OM 75 OM 70
110 1 1 1 1 1 1 1 1 1 1
111 2 2
112 2 2 2 3 3 2 2
113 4 4
210 3 3 2 3 5 5 3 3 2 2
211 6 6
212 4 4 4 7 7 4 4
213 8 8
310 5 5 3 5 9 5 5 3 3
311
312 6 6 6 6 6
313
170 7 7 4 7 7 7 4 4
171
172 8 8 8 8 8
173
270 9 5 9 9 9 5 5
271
272 A A
273
370 6 B B
371
372 C C
373
114 7 D D
115
116 E E
117
214 8+ F F
215

Table 4 address assignment digital input modules part 1


AS11
120-123 1
220-223 2
320-323 3
1A0-1A3 4
2A0-2A3 5
3A0-3A3 6

FST Version 4.02.21 Manual 128


Table 5 address assignment digital input modules part II
IM10 IM11 IM12 OM20 OM21 OM22 TM10 AS13
110 1 1 1 1 1 1 1 1
111 2 2
112 2 2 3 3 2 2
113 4 4
210 3 3 2 5 5 3 3 2
211 6 6
212 4 4 7 7 4 4
213 8 8
310 5 5 3 9 5 5 3
311
312 6 6 6 6
313
170 7 7 4 7 7 4
171
172 8 8 8 8
173
270 9 9 5+ 9 9 5
271
272 A+
273

4.1.3 Analog input and output modules


The following table gives an overview of available analog modules. These are described in
the following sections.

Table 6: Overview of analog input and output modules


Module Features Range(s) Resolution PLC Security
IO10 8 analog inputs 0…4.096V 12 bit -
IO11 8 analog inputs 0…20mA 12 bit -
IO12 8 analog inputs 0…10V 12 bit -
IO40 4 analog inputs 0…10V 12 bit */-/-
-5V…+5V
0...+5V
IO41 4 analog inputs -10V…+10V 16 bit */-/-
0...10V
-5V...+5
IO48 4 analog inputs 0...20mA 12 bit */-/
4...20mA
IO60 4 analog outputs -10V…+10V 12 bit -
IO61 4 analog outputs -10V…+10V 12 bit -
IO70 4 analog outputs -10V…+10V 12 bit -
0…10V
IO71 4 analog outputs -10V…+10V 12 bit
0…10V
IO73 4 analog outputs 0…20mA 12 bit
4…20mA

FST Version 4.02.21 Manual 129


4.1.3.1 IO1X
IO10
8 analog inputs, 0 to 4.096V, 12-bit
Input words (channels): 8
Output words (channels):
Switch positions: 1 to 4
Sum of inputs: 32
Sum of outputs:
Range: 0 to 4,096V
Resolution: 12 bit
Special features:
Module identification:
Module check:

Assignment of input words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Channel # 1
1 Channel # 2
2 Channel # 3
3 Channel # 4
4 Channel # 5
5 Channel # 6
6 Channel # 7
7 Channel # 8

Register value Physical value


0 0.000 V
100 0.100 V
200 0.200 V
500 0.500 V
1000 1.000 V
2000 2.000 V
4095 4.095 V

IO11
8 analog inputs, 0 to 20mA, 12bit
Input words (channels): 8
Output words (channels):
Switch positions: 1 to 4
Sum of inputs: 32
Sum of outputs:
Range: 0 to 20mA
Resolution: 12 bit
Special features:
Module identification:
Module check:

FST Version 4.02.21 Manual 130


Assignment of input words:
IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Channel #1
1 Channel #2
2 Channel #3
3 Channel #4
4 Channel #5
5 Channel #6
6 Channel #7
7 Channel #8
Register value Physical value
0 0 mA
205 1 mA
1024 5 mA
2048 10 mA
3072 15 mA
4095 20 mA

IO12
8 analog inputs, 0 to 10V, 12 bit
Input words (channels): 8
Output words (channels):
Switch positions: 1 to 4
Sum of inputs: 32
Sum of outputs
Range: 0 to 10V
Resolution: 12 bit
Special features:
Module identification:
Module check:

Assignment of input words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Channel # 1
1 Channel # 2
2 Channel # 3
3 Channel # 4
4 Channel # 5
5 Channel # 6
6 Channel # 7
7 Channel # 8

Register value Physical value


0 0V
410 1V
819 2V
2048 5V
4095 10V

FST Version 4.02.21 Manual 131


4.1.3.2 IO4X
IO40 -10V to …+10V
4 analog inputs, -10V to…+10V , 12 bit
Input words (channels): 4
Output words (channels):
Switch positions: 1 to 6
Sum of inputs: 24
sum of outputs:
Range: -10V to …+10V
Resolution: 12 bit
Special features:
Module identification: Yes
Module check:

Assignment of input words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Channel # 1
1 Channel # 2
2 Channel # 3
3 Channel # 4

Register value Physical value


- 2048 - 10 V
- 1024 - 5V
0 0V
205 1V
1023 5V
2047 10 V

IO40 0V to 10V
4 analog inputs, 0V to 10V , 12 bit
Input words (channels): 4
Output words (channels):
Switch positions: 1 to 6
Sum of inputs: 24
Sum of outputs:
Range: 0V to 10V
Resolution: 12 bit
Special features:
Module identification: Yes
Module check:

Assignment of input words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Channel # 1
1 Channel # 2
2 Channel # 3
3 Channel # 4

FST Version 4.02.21 Manual 132


Register value Physical value
0 0V
410 1V
819 2V
2048 5V
4095 10 V

IO40 -5V to +5V


4 analog inputs, -5V to +5V, 12 bit
Input words (channels) 4
Output words (channels):
Switch positions: 1 to 6
Sum of inputs: 24
Sum of outputs:
Range: -5V to +5V
Resolution: 12 bit
Special features:
Module identification: Yes
Module check:

Assignment of input words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Channel # 1
1 Channel # 2
2 Channel # 3
3 Channel # 4

Register value Physical value


-2048 -5.0 V
-1024 -2.5 V
0 0.0 V
205 1.0 V
1023 2.5 V
2047 5.0 V

IO40 0V to 5V
4 analog inputs, 0V to 5V, 12 bit
Input words (channels): 4
Output words (channels):
Switch positions: 1 to 6
Sum of inputs: 24
Sum of outputs:
Range: 0V to +5V
Resolution: 12-bit
Special features:
Module identification: Yes
Module check:

Assignment of input words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Channel # 1

FST Version 4.02.21 Manual 133


1 Channel # 2
2 Channel # 3
3 Channel # 4

Register value Physical value


0 0.0 V
410 0.5 V
819 1.0 V
1638 2.0 V
2048 2.5 V
4095 5.0 V

IO41 -10V to +10V


4 analog inputs, -10V to +10V, 16 bit
Input words (channels): 4
Output words (channels):
Switch positions: 1 to 6
Sum of inputs: 24
Sum of outputs:
Range: -10V to +10V
Resolution: 16 bit
Special features:
Module identification: Yes
Module check:

Assignment of input words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Channel # 1
1 Channel # 2
2 Channel # 3
3 Channel # 4

Register value Physical value


-32768 - 10 V
-16384 -5V
0 0V
3279 1V
16383 5V
32787 10 V

IO41 0V to 10V
4 analog inputs, 0V to 10V, 16 bit
Input words (channels): 4
Output words (channels):
Switch positions: 1 to 6
Sum of inputs: 24
Sum of outputs:
Range: 0V to 10V
Resolution: 16 bit
Special features:
Module identification: Yes

FST Version 4.02.21 Manual 134


Module check:

Assignment of input words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Channel # 1
1 Channel # 2
2 Channel # 3
3 Channel # 4

Register value Physical value


0 0V
6554 1V
13107 2V
32768 5V
65535 10 V

IO41 -5V to +5V


4 analog inputs, -5V to +5V, 16 bit
Input words (channels): 4
Output words (channels):
Switch positions: 1 to 6
Sum of inputs: 24
Sum of outputs:
Range: -5V to +5V
Resolution: 16 bit
Special features:
Module identification: Yes
Module check:

Assignment of input words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Channel # 1
1 Channel # 2
2 Channel # 3
3 Channel # 4

Register value Physical value


-32768 -5.0 V
-16384 -2.5 V
0 0.0 V
6554 1.0 V
16383 2.5 V
32767 5.0 V

IO48 0 to 20mA
4 analog inputs, 0 to 20mA, 12 bit
Input words (channels): 4
Output words (channels):
Switch positions: 1 to 6
Sum of inputs: 24

FST Version 4.02.21 Manual 135


Sum of outputs:
Range: 0 to 20mA
Resolution: 12 bit
Special features:
Module identification: Yes
Module check:

Assignment of input words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Channel # 1
1 Channel # 2
2 Channel # 3
3 Channel # 4

Register value Physical value


0 0 mA
204 1 mA
819 4 mA
1024 5 mA
2048 10 mA
4095 20 mA

IO48 4mA to 20mA


4 analog inputs, 4mA to 20mA, 12 bit
Input words (channels): 4
Output words (channels):
Switch positions: 1 to 6
Sum of inputs: 24
Sum of outputs:
Range: 4mA to 20mA
Resolution: 12 bit
Special features:
Module identification: Yes
Module check:

Assignment of input words:


IW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Channel # 1
1 Channel # 2
2 Channel # 3
3 Channel # 4

Register value Physical value


0 4 mA
1024 8 mA
2048 12 mA
3072 16 mA
4095 20 mA

FST Version 4.02.21 Manual 136


4.1.3.3 I06X
IO60/IO61 -10V to +10V
4 analog outputs, -10V to 10V, 12 bit
Input words (channels):
Output words (channels): 4
Switch positions: 0 to 4
Sum of inputs:
Sum of outputs: 20
Range: -10V to 10V
Resolution: 12 bit
Special features:
Module identification:
Module check:

Assignment of output words:


OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Channel # 1
1 Channel # 2
2 Channel # 3
3 Channel # 4

Register value Physical value


-2048 -10 V
-1024 -5 V
0 0V
1024 5V
2047 10 V

4.1.3.4 IO7X
IO70/IO71 0V to 10V
2 analog outputs, 0V to 10V, 12 bit
Input words (channels):
Output words (channels): 2
Switch positions: 0 to 4
Sum of inputs:
Sum of outputs: 10
Range: 0V to 10V
Resolution: 12 bit
Special features:
Module identification:
Module check:

Assignment of output words:


OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Channel # 1
1 Channel # 2

Register value Physical value


0 0V

FST Version 4.02.21 Manual 137


410 1V
819 2V
2048 5V
4095 10 V

IO70/IO71 -10V to +10V


2 analog outputs, 0V to 10V, 12 bit
Input words (channels):
Output words (channels): 2
Switch positions: 0 to 4
Sum of inputs:
Sum of outputs: 10
Range: -10V to 10V
Resolution: 12 bit
Special features:
Module identification:
Module check:

Assignment of output words:


OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Channel # 1
1 Channel # 2

Register value Physical value


-2048 -10V
-1024 -5 V
0 0V
1024 5V
2047 10 V

IO73 0 to 20mA
2 analog outputs, 0 to 20mA, 12 bit
Input words (channels):
Output words (channels): 2
Switch positions: 0 to 4
Sum of inputs:
Sum of outputs: 10
Range: 0 to 20mA
Resolution: 12 bit
Special features:
Module identification:
Module check:

Assignment of output words:


OW 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Channel # 1
1 Channel # 2

Register value Physical value


0 0 mA
205 1 mA

FST Version 4.02.21 Manual 138


819 4 mA
2048 10 mA
4095 20 mA

4.1.3.5 Address assignment matrix


The following tables are very helpful for planning addressing of the individual modules.
The columns show the I/O modules, the rows show the processor I/O addresses. The mod-
ule address is set by means of the rotary switch on the underside of the module. Depending
on the module and switch position, the range shown for the switch position is assigned. All
addresses are shown in hexadecimal notation.
The same switch position may occur for different modules, but any single processor I/O
address can only be assigned once.
This means that a module assigns all table rows associated with a switch position. There is
a separate address range for inputs and outputs.
The FST IPC I/O configurer supports you in assigning addresses / switch positions. You
would always begin with the module that takes up the fewest I/O addresses, as it is then
easier to find space for the remaining modules.

Table 7: Address assignment analog outputs part I


IO10 IO11 IO12
140-15F 1 1 1
240-25F 2 2 2
1CO-1DF 3 3 3
2CO-2DF 4 4 4

Table 8: Address assignment analog outputs part II


IO40 IO41 IO48
1 A4 1 1 1
1 A5
2 A4 2 2 2
2 A5
3 A4 3 3 3
3 A5
1 A6 4 4 4
1 A7
2 A6 5 5 5
2 A7
3 A6 6 6 6
3 A7

Table 9: Address assignment analog outputs part III


IO60 IO61 IO70 IO71 IO73
300-303 0 0 0 0 0
304-307 1 1 1
130-133 1 1 2 2 2
134-137 3 3 3
230-233 2 2 4 4 4
234-237
1BO-1B3 3 3
1B4-1B7
2BO-2B3 4 4
2B4-2B7
FST Version 4.02.21 Manual 139
Table 10: Address assignment analog inputs part I
IO10 IO11 IO12
140-15F 1 1 1
240-25F 2 2 2
1CO-1DF 3 3 3
2CO-2DF 4 4 4

Table 11: Address assignment analog inputs part II


IO40 IO41 IO48
1 A4 1 1 1
1 A5
2 A4 2 2 2
2 A5
3 A4 3 3 3
3 A5
1 A6 4 4 4
1 A7
2 A6 5 5 5
2 A7
3 A6 6 6 6
3 A7

Table 12: Address assignment analog inputs part III


IO60 IO61 IO70 IO71 IO73
300 0 0 0 0 0
304 1 1 1
130 1 1 2 2 2
134 3 3 3
230 2 2 4 4 4
1B0 3 3
2B0 4 4

4.2 FEC and HC0x


The special IO drivers for FEC and HC0x controllers are described in this topic.

4.2.1 Local Ios

4.2.1.1 FEC Standard


In the IO configuration, select the module that corresponds with your hardware, e.g. FC440.
The inputs of the FEC Standard are grouped into FST input and output words. If you select
the "word" option that is available for each FEC Standard type, 16 inputs or outputs are
accessible through each FST input or output word. If you select the default IO script (without
"word"), 8 inputs or outputs are accessible through the 8 least significant bits each FST
input or output word.

For the analog IO separate modules must be selected: Standard Analog Input 0-20mA and
Standard Analog Output 0-20mA.

PLC Safety is available through a separate module: FEC Standard PLC Safety. This module
will generate FST error 12 if the hardware cannot be identified as a FEC Standard.
FST Version 4.02.21 Manual 140
Error 11 will be generated if no supply voltage is present on the outputs or an overload
occurs on an output. The reason will be made available through the FST input word you
specified when including the IO module.

BIT 0 = A0 overload
BIT 1 = A1 overload
BIT 2 = nc
BIT 3 = nc
BIT 4 = A0 no 24V
BIT 5 = A1 no 24V

Note!
The input word reflects the actual status, to be sure that the reason is available later you
should write an error program.

4.2.1.2 FEC Compact


In the IO configuration, select the module FEC. You do not have to enter a switch position
here. Enter the number of the FST input and output words that are to be used for the local
IOs (e.g. both 0).
The 12 inputs of the FEC Compact are divided into two groups. 8 on the first, 4 on the sec-
ond group. The 8 bits of the first group are represented in the 8 least significant bits of the
input word given (e.g. I0.0 to I0.7). The 4 bits of the second group are represented in the 4
least significant bits of the following input word (e.g. I1.0 to I1.3).
The 8 outputs are represented in the 8 least significant bits of the output word given (e.g.
O0.0 to O0.7).

4.2.1.3 HC0X
The 8 IOs of HC0X can be used as inputs or outputs.
Enter the module HC0X into the IO configuration. You do not have to enter a switch position
here. Enter the number of the FST input and output words that are to be used for the local
IOs (e.g. both 0). This will allocate one input and two output words.
The 8 IO bits are represented as the 8 least significant bits of input and output word given
(e.g. I0.0 to I0.7, O0.0 to O0.7). The 8 least significant bits of the second output word (e.g.
OW1) is used to define which pins are used as input or output: if a bit is set this means that
the corresponding pin is an output, otherwise it is an input.

4.2.1.4 Debouncing of Inputs


The inputs have a delay time of 5 ms.
An additional delay can be achieved by using the logical IO module DEBOUNCE. Enter it into
the IO configuration but behind the definition of the input word you want to debounce. The
complete IW you specify will be debounced. The status of its bits will only change if the new
value has been read for two consecutive IO scans. You can increase the number of consecu-
tive IO scans by entering DEBOUNCE for several times for the same input word.

4.2.2 IO extension
HC0x and FEC Compact can be connected to an (additional) FEC via the EXT interface and a
special (short!) cable.
Note! For the FEC Standard series the IO extension is not available.
If you want to have more than one extension module, use the IO extension driver, which is
described in a separate chapter.
To access the remote IO from your programs you have to enter the module Remote FEC
(HC0X) or FEC Slave (FEC Compact) into the IO configuration. You have to give the number of
the FST input and output words (e.g. 2 for both).
FST Version 4.02.21 Manual 141
The 12 inputs of the remote FEC are divided into two groups: 8 on the first, 4 on the second
group. The 8 bits of the first group are represented in the 8 least significant bits of the input
word given (e.g. I2.0 to I2.7). The 4 bits of the second group are represented in the 4 least
significant bits of the following input word (e.g. I3.0 to I3.3).
The 8 outputs are represented in the 8 least significant bits of the output word given (e.g.
O2.0 to O2.7).

The remote FEC must not have a control program running. The FEC must be in the factory
settings. Delete any files from drive B: using the File transfer utility of FST IPC.
The RUN/STOP switch must be in position STOP.
FST Error 99 will occur if a FEC has local IOs configured and is also accessed as remote FEC.

4.2.3 Analogue Potentiometer


FEC Compact and HC01 are equipped with an analogue potentiometer. It can be adjusted
using a screwdriver in the range 1 to 63.
To read the values from your programs enter the module Trimmer into your IO configuration
and specify the input word you want to use for the actual trimmer value.

4.2.4 Rotary Switch


FEC Standard controllers are equipped with a rotary switch with 16 positions (0-15), which
also serves as run/stop switch, where 0 means stop and all other positions run.
To read the switch position (1-15) from your programs enter the module Rotary Switch into
your IO configuration and specify the input word you want to use for the actual switch posi-
tion.
For compatibility reasons for the FEC Standard the module Trimmer is still available. The
switch positions will result in the following values:

0 1
1 1
2 5
3 8
4 12
5 16
6 21
7 26
8 32
9 36
10 41
11 46
12 50
13 54
14 59
15 63

4.2.5 Fast counters


The last two inputs of the second group of the FEC Compact (I1.2 and I1.3) as well as the
first two inputs of HC0x (I0.0 and I0.1) can be used as 1 or 2 independent, high-speed
counters. Still, the inputs can be read as standard inputs.
For the FEC Standard series the following inputs are used:

FC4xx, FC5xx - I1.6 and I1.7


FC6xx - I3.6 and I3.7

FST Version 4.02.21 Manual 142


These counters are interrupt driven and once activated, operate independently of the user’s
control programs and therefore are not affected by factors such as control program scan
time.

Include the module Fast counter to your IO configuration. Enter 0 as switch if you are using
counter 0, 1 for counter 1. Specify the input word you want to hold the counter value.
The counter value is incremented on each rising edge of the corresponding input signal.
Please note that the counter values cannot be reset. If this is required the driver described
in a separate chapter can be used instead.

4.2.6 Incremental Encoder


The first two inputs of the second group of the FEC Compact (I1.0 and I1.1) as well as the
inputs I0.2 and I0.3 of HC0x can be used as incremental encoder up to 200Hz. Optionally a
reset signal can be connected to I0.7. Still, the inputs can be read as standard inputs.
For the FEC Standard series the following inputs are used:

FC4xx, FC5xx - I1.4, I1.5 and I1.70


FC6xx - I3.4, I3.5 and I3.0.

This encoder is interrupt driven and once activated, operates independently of the user’s
control programs and therefore are not effected by factors such as control program scan
time.
Include the module Incremental Encoder to your IO configuration and specify the input word
for the counter value (e.g. IW5). The following input word will hold the direction (e.g. IW6).

ABRESET
To reset the counter value call the module ABRESET.
Input parameters none
Output parameters none

ABMODE
Pin I0.7/I1.0/I3.0 can be used to reset the counter. The counter will be reset if I0.7/I1.0/I3.0
is active and a positive edge is detected on one of the A/B inputs. You can choose between
the following modes:
Input parameters
FU32 reference/reset mode:
0 no reset
1 direction 0, sin
3 direction 0, continuous
5 direction 1, single
7 direction 1, continuous
Output parameters none

FST Version 4.02.21 Manual 143


4.3 Actuator Sensor Interface
The Actuator Sensor Interface (ASi) connects sensors and actuators quickly and cheaply to
the IPC-PS1. Up to 4 CP96 AS-Interface modules can be used, each with up to 31 slaves.
The inputs and outputs of the slaves are copied to the user defined local function units of
the FST IPC.

Selecting and parameterising the driver


If you want to use the AS-Interface in a FST IPC project, you first have to add and parameter-
ise the ASI driver in the driver configuration.

Target drive:
Enter the drive that contains the AS-Interface driver ASIDRV.EXE or to which it is to be
loaded.

4.3.1 The ASi configurer


Start the configurer in the FST software via the Extras > AS-Interace configuration from the
menu.

Note!
In order to be able to use the online features of the configuration tool, the AS-Interface
driver must be active on the IPC-PS1. It is sufficient to load (into the controller) the project
for which you have configured the ASi driver, without programs. The IPC must then be re-
booted. This will be done automatically.

Selecting the master


Selecting Edit > Modul Number/IO-assignment from the menu opens a selection window
allowing you to choose one of 4 masters. The number of the master corresponds to the
address set on the CP96 module.
This selection window also defines the base address for the I/O image to which the ASi
slave/IOs are copied. This address must be given for correct configuration of the master
module. A CP96 module (ASi master) always occupies 8 I/O words in the local I/O area of
the FST IPC.
Figure 1: Selecting the Master module and assigning an I/O address

Configuring individual stations


The main function of the configurer is the configuration of the individual ASi bus stations
(slaves). Here, configuration means setting the ID and I/O codes of a slave. Configuration
can be done offline, that is, without a link to the IPC. If there are several ASi masters in one
IPC system, this procedure has to be repeated for each master. The selection of the desired
master is done by Edit > Modul Number/IO-assignment from the menu.
At runtime – during the initialisation phase – the configuration data of each master is com-
pared with the data in the reference list. A master is only reconfigured if the data does not
match. This approach prevents a relatively long delay when a project is restarted (as would
be caused by reprogramming of the master lists). This delay only occurs the first time a
project is started, when the configuration is changed, and when a master is swapped.

FST Version 4.02.21 Manual 144


Selecting Edit > Configuration form the menu shows the configured slaves from 1 to 31 are
shown with I/O address, ID, I/O code and parameters. Any slave can be selected for further
processing with the cursor keys or the mouse.

Edit
Double clicking on a slave or selecting Edit from the right mousebutton popup menu opens
an input window allowing editing of the ID code, I/O code and parameters of the selected
slave. ID and I/O code should be taken from the appropriate documentation for the slave.
Entry of a parameter is optional. This parameter (0 to F) is transmitted to the slave when the
master is restarted. When slaves are designed accordingly, such parameters can be used to
set certain properties (such as the sensitivity of an ultrasound sensor).
Figure 2: Entering a slave into the configuration

Delete
Pressing the Delete key allows you to delete the selected slave from the nominal list.
Nominal-actual comparison
When selecting Nominal/actual compare from the right mousebutton popup menu a com-
parison of the slaves in the nominal list with the slaves present on the ASi bus is started. All
deviations are displayed in a dialog. If the nominal list is empty – for example in the case of
a new project – all slaves on the bus are inserted into the nominal list. Naturally, the refer-
ence list can be edited in the normal way.
There must be a connection to the IPC. The ASi driver must be installed. The IPC main run-
time program must be active.
Figure 3: Result of the nominal-actual comparison

Printing the configuration


Selecting File > Print from the menu or pressing prints the configuration.

Address programming of individual slaves


Note! There must be a link to the IPC. The ASi driver must be installed. The IPC main runtime
program must be active.

FST Version 4.02.21 Manual 145


By default, all ASi slaves have the address 0. Each ASi slave can be assigned a new address
by address programming. This can also be done for slaves that already have an address
other than 0. Each ASi slave must have a unique address (per master). The addresses can be
modified by first selecting Edit > Slave Addresses and then from the list use drag and drop to
change the slave.

Online manipulation of individual slaves


Note! There must be a link to the IPC. The ASi driver must be installed. The IPC main runtime
program must be active.
The slaves detected on the bus are displayed with their I/Os in the ASi online display. The
display is dynamic. In other words, the display is automatically updated to reflect the status
of the inputs.

Manipulating slave outputs


First position the selection highlight on the slave whose outputs are to be manipulated. Now
it possible to manipulate the outputs by doubleclicking on the output, by pressing keys F5
to F8, or by using the right mousebutton popup menu.

4.3.2 CI commands
!7DLES Display list of current slaves

!7DSxx Display slave (IO, ID, +inputs)


(xx = 1 to 1F)

!7DOUF Display control flags

!7DHARD Display hard/soft reaction


(0 = soft, 1 = hard)

!7MMA Modify Master Address (= 1 to 4)


(Valid for all following commands).

!7MSA Modify Slave Address


(= old address, new slave address)

!7MPM Modify Project Mode (=0 or =1)

!7MA Modify Output


(= slave address, output word)

!7MSP Modify Slave Parameter


(= slave address, parameter)

!7MHARD Modify hard/soft reaction (=0 or =1)

!7MERR Modify error status (=0)


(Restart after runtime error)

All numeric values given for the Modify command must be entered in hex. The command is
not case sensitive. The commands are used in the first line of the ASi configurer. The com-
mands are not intended for manual entry. They are only documented here for the sake of
completeness.

FST Version 4.02.21 Manual 146


4.3.3 Error numbers
No Meaning of error
Notes on elimination
700 No configuration data found for ASi driver
701 No master found
702
703
704
711 Slave failure
712
713
714

The cyclical part of the driver monitors the Config OK flags of all configured masters. If
"hard" error reaction is set, the failure of a slave results in error number 710 + master a d-
dress (1 – 4) being entered into the IPC error word. Program execution is stopped. If an error
handling routine has been entered into the IPC configuration, this is now started. If this
behaviour is not desired, hard error reaction can be switched off with the AS-I_Mode module
(see below).

4.3.4 Function modules


Overview
ASI_Mode Sets the reaction of the ASi driver to configuration errors

ASI_Stat Interrogates execution control level (OUF) flags

ASI_Para Transfer a parameter to an ASi slave at runtime

ASI_Res Restart cyclic update

ASI_Mode
Sets the reaction of the AS-I driver to configuration errors
Input parameters FU32 = 0 Soft reaction
> 0 Hard reaction
Output parameters FU32 = -1 OK
=0 Driver not loaded
Note: The ASI_Mode module can only be used with the ASi driver.

ASI_Stat
Interrogates execution control level (OUF) flags
Input parameters
FU32 Master address (1 to 4)
Output parameters
FU32 = -1 OK
=1 Master address invalid
= 10 Master not found
FU33 Status flags
For the significance of the individual bits, please refer to the ASi master documentation. If
hard error reaction has been switched off with the ASi module, the user can use ASI_Stat to
interrogate the Config OK flag of the individual master and derive the desired reaction to the
error from the result.

FST Version 4.02.21 Manual 147


AS-I_Para
Transfer a parameter to an ASi slave at runtime
Input parameters FU32 Master address (1 to 4)
FU33 Slave address (1 to 31)
FU34 Parameter value (0 to $0F)
Output parameters FU32 = -1 OK
=1 Master address invalid
=2 Slave address invalid
=3 Parameter value invalid
= 10 Master not found
= 11 Master timeout
FU33 Error code

Overview of possible error codes:


HFUN_OK 0x00 Execution successful
HFUN_NOK 0x01 Execution not successful
HFUN_SNA 0x02 Slave not in LAS
HFUN_MOFF 0x0C Master is offline
MAS-IBUSY 0xFD Master not ready
HOSTTOUT 0xFE Master timeout
Note: If the slave is not found, error code 0x02 is returned (Slave not in LAS).

ASI_Res
Restart cyclical update (including error monitoring) following a runtime error (slave failure)
Input parameters None
Output parameters FU32 = -1 OK
=0 Driver not loaded
Note: The ASI_Res module can only be used with the ASi driver.

4.4 Festo Fieldbus Master


Version 2.22
The fieldbus allows you to link up distant I/O modules (plant-floor units) with your IPC-PS1
to form a system network. Communication between the modules and the IPC is controlled by
the PS1-CP61 fieldbus module. This module has a fieldbus interface to which you can con-
nect up to 31 participants, when using repeater technology up to 99. Additional FST oper-
ands are available for cyclical inputs and outputs of the participants. Modules can be used
to interrogate statuses and execute a-cyclic commands.

4.4.1 Set Festo fieldbus parameters


If you want to use the FESTO fieldbus in a project, you must enter and parameterise the
FESTOBUS driver in the configurer.

Destination Drive:
Enter here the target drive for the Festo fieldbus driver IPCFB22.EXE.

CP61 switch setting:


Enter the switch position here which you have set on the rear of your fieldbus module (PS1-
CP61).

Interrupt number:
Enter the number of the interrupt that the fieldbus module is allowed to use for communica-
tion with the CPU. Check which interrupts have already been assigned for other modules.

FST Version 4.02.21 Manual 148


fieldbus baud rate:
Here you can specify the baud rate for data transmission on the fieldbus. The permissible
values are 375, 187.5, 62.5 and 31.25 kilobaud.

Highest station address:


Enter here the highest participant number you are using. The permissible range is 1..99.

Soft error behaviour:


Enter here if you want to use the soft error behaviour. Valid entries are Yes and No.

Use nominal configuration:


Enter here if you want to use the nominal configuration. Valid entries are Yes and No.

4.4.2 Soft error behaviour


Programmers can choose between two options for the response to configuration problems
during start-up:
The default is the "hard" error response. In the event of errors during start-up, neither
Program 0 nor the error program is started.
Optionally, "soft" error response can be selected. . In the event of errors during star-tup, the
response is as for other errors, that is, setting of the error word, and project stop or error
program execution.
The desired error response can be set in the configuration dialog for the fieldbus (see
above). Hard error response is the default setting.

4.4.3 Using the nominal configuration


Alternatively, the programmer can define the slave list to the FB master in the form of a
nominal configuration. If a configured participant is not found during start-up, normal error
handling for transmission errors result. The missing participant can then join the fieldbus at
a later stage without reinitialisation of the bus.
Please note that only those participants can be entered that are also used in one of the
loaded programs. It is immaterial whether the program is ever executed or not.
The individual participants must be used with their full scope of I/Os, as otherwise the
participant is not addressed.
If the user reinitialises with CFM48,1 or CI, the Actual configuration is used as usual.

4.4.4 The Festo fieldbus configurer


The planning and control instrument for program generation is the fieldbus configurer. You
use this to define the (nominal) configuration of the filedbus.
You can then:
Print out the configuration data that you have entered and connect the pa rticipants with the
aid of the list
Compare the actual and nominal configurations in order to correct connection errors.
You use the fieldbus configurer to create the nominal configuration of the fieldbus. You
should do this before you enter the allocation list (and the programs) so that you can imme-
diately assign symbolic identifiers to the operands that are created.
Note!
As part of the syntax test carried out on the programs there is a check as to whether the
fieldbus operands that have been entered have a corresponding entry in the fieldbus con-
figuration.
In the following the fieldbus I/O modules are referred to as participants.

FST Version 4.02.21 Manual 149


Calling the fieldbus configurer:
The FESTO Fieldbus configurer is configured as an external tool, and can be activated in the
Extras menu.
Selecting the type:
If you have not yet created a fieldbus configuration in the project, you must use Edit > Type
actual. from the menu. A window appears showing you the types that are available from
Festo. Here you can select the types that are to be used in your project for example by dou-
bleclicking on them with the mouse.

Figure 1: Defining fieldbus participant types

Note!
If you remove a type from the project-specific type file for which there is already an entry in
the configuration, the designation Unknown type will subsequently appear in the configurer
instead of the type. You should delete any such entries.

FST Version 4.02.21 Manual 150


Edit configuration
Once you have completed type selection for your current project you can enter the partici-
pants by selecting Edit > Configuration from the menu.
After selecting Insert from the local menu a window appears where you configure the par-
ticipant:
Figure 2: Configuring fieldbus participant

Enter the participant’s number and type that you want to insert. The permissible entries are
explained in the table below:

Abbr. Meaning Permissible entry

PA Participant 1 to 99
number

Type Type of The fieldbus participants


participant stored in the type file are offered
for selection in a window.

IW Number of It is only possible to specify


input units the input units in the case of types
where the number of inputs may vary
(1 to 16).

OW Number of It is only possible to specify


output units the output units in the case of types
where the number of outputs may vary
(1 to 16).
Conclude your entries by pressing the OK button.
The fieldbus participant is inserted in the configuration file in ascending order according to
the participant number. A message in the message shows the time in which the controller
forwards I/O information to the filedbus peripherals.

Modify:
Highlight the participant that you want to modify, and activate the Modify function by dou-
bleclicking or selecting Modify from the local menu. As in the case of Insert, a window ap-
pears similar to that in Figure 2. The entries can then be overwritten.

Delete:
You can delete a filedbus participant by selecting delete from the local menu.

Test functions
In order to ensure proper operation on the filedbus, on the one hand various tests are car-
ried out by the IPC run-time system while on the other hand the fieldbus configurer also
offers a test option.
FST Version 4.02.21 Manual 151
When a project is started, the run- time system detects the actual configuration and com-
pares it with the nominal configuration. If the nominal configuration is not a subset of the
actual configuration, an error is reported.
The Compare nominal/actual function supports the testing of the configuration data from
the PC. To be able to execute this function, your PC must be connected to the IPC in the
proper way.

Compare nominal/actual:
When you activate this function from the local menu the actual configuration is read from
the IPC and is compared with the nominal configuration that was drawn up on the PC. If the
configurations are identical, a message appears in the message line. If discrepancies occur
during the comparison, the following window appears after you activate this function.

Figure 3: Nominal and actual comparison

You are shown the number of deviations between the nominal configuration and the actual
configuration.
If there is no nominal configuration file in the project directory, the actual configuration that
is read from the IPC is stored as the nominal configuration. The file contains no comments,
however, so these details need to be added.
This function can be used for initial creation of the configuration file. The precondition for
this, however, is that the fieldbus and all participants are available.

Print fieldbus configuration


Selecting File > Print from the menu or pressing prints the configuration.

4.4.5 Programming fieldbus operands


fieldbus inputs and outputs can be addressed with the following syntax in Ladder diagram
or Statement list programs:
Inputs (bits): Ip.w.b
Outputs (bits): Op.w.b

Input words: IWp.w


Output words: OWp.w

p = participant number
w = word number
b = bit number
The word number is assigned from 0 onwards for each participant, separately for inputs and
outputs. For example, if you use the fieldbus module I/O extension 405 with 3 input cards
and 2 output cards (1 word each) as participant 5, the following operands are created:

FST Version 4.02.21 Manual 152


I5.0.0 to I5.2.15 and IW5.0 to IW5.2,
but also
O5.0.0 to O5.1.15 and OW5.0 to OW5.1.

Most fieldbus modules occupy only one word; this is then word 0.
In the printout of the filedbus configuration you will find an aid to addressing for each par-
ticipant.

4.4.6 Function blocks


Overview
F40 Configuration of a fieldbus participant.
F41 Read parameter field.
F42 Write parameter field.
F43 Reset all cyclical outputs on the filedbus.
F44 Status interrogation for a fieldbus participant.
F47 Set error handling.
F48 General configuration.

F40
Configuration of a fieldbus participant.
Input parameters
FU32 fieldbus participant number, 1 to 99

Output parameters
FU32 = -1 Nominal and actual data agree
=0 Nominal and actual data differ
FU33 Participant: actual type
FU34 Participant: number of inputs in bytes
FU35 Participant: number of outputs in bytes
If you are using the nominal configuration (see Section 1.2) nominal and actual data will
always agree by definition.

F41
Read parameter field of an “intelligent” participant.

Input parameters
FU32 fieldbus participant number, 1 to 99
FU33 Address of the participant word, 0 to 255
Output parameters
FU32 = -1 Command successfully processed
=0 Error, fieldbus participant not responding
FU33 Participant status
FU34 Participant word of address
FU35 Participant word of address + 1
FU36 Participant word of address + 2
FU37 Participant word of address + 3
For a description of the participant status see F44.

F42
Write parameter field of an “intelligent” participant.
Input parameters
FU32 fieldbus participant number, 1 to 99
FU33 Number of word parameters, 1 to 4
FST Version 4.02.21 Manual 153
FU34 Address of participant word, 0 to 255
FU35 Participant word for address
FU36 Participant word for address + 1
FU37 Participant word for address + 2
FU38 Participant word for address + 3
Output parameters
FU32 = -1 Command successfully processed
=0 Error, fieldbus participant not responding
FU33 Participant status
For a description of the participant status see F44.

F43
Reset all cyclical outputs.
Input parameters None
Output parameters None

F44
Status interrogation for a participant.
Input parameters
FU32 <> 0 Number of the participant
=0 Reset all error entries
Output parameters
FU32 Status of the participant
FU33 number of short-term errors
FU34 number of long-term errors
FU35 total error count
FU36 Participant address for last error

The status (FU32) contains the following information:


Bit 7 =1 ASCII data present
Bit 6 error bits
Bit 5 (see manual of filed bus participant)
Bit 4 .
Bit 3 .
Bit 2 .
Bit 1 .
Bit 0 =0 a-cyclic participant
=1 cyclic participant
The number of short-term errors is incremented in case of cyclic communication error (no
response, checksum error etc.). The maximum value is 255. It will be reset to 0 after suc-
cessful cyclic communication
Checking for broken communication can be done by using F44 and then testing for FU33 >
some value The number of long term errors is incremented if communication had error
(short term <> 0) and communication is restored
The total error count is incremented in case of cyclic communication error (no response,
checksum error etc.)

F47
Status interrogation for a participant (FU32=1). Set exception handling programs (FU32=1).
Input parameters
FU32 = 1 Exception handling program assignment
FU33 Bit0 = 1 FU34 has the program number
Bit1 = 1 FU35 has the program number

FST Version 4.02.21 Manual 154


Bit2 = 1 FU36 has the program number
FU34 Program number for transmission errors
FU35 Program number for errors in a field bus participant
FU36 Program number for ASCII data with field bus participant
Output parameters
None
All programs must always be given. If a non-existent or invalid program is given or if the bit
is deleted in the mask, the program is deactivated for event handling.

Example:
THEN CFM47
WITH V1
WITH V3
WITH V3
WITH V17
WITH V0
In the event of a transmission error (such as cable break), Program 3 is set. If a participant
error occurs (such as short-circuit at participant output), Program 17 is started. If a response
to an a-cyclic command arrives (such as the participant is holding an ASCII file ready), no
program is started.
The activated programs are executed in the normal sequence (that is, by increasing program
number). Following completion of handling, they should deactivate themselves in order to
allow themselves to be called again.

Input parameters
FU32 = 2 Status interrogation
Output parameters
FU32 Always 0
FU33 Status of the participant
FU34 Value of short-term error
FU35 Value of long-term error
FU36 Total number of errors
FU37 fieldbus address of the participant with last error

F48
Register actual configuration and status or use nominal configuration.
Input parameters
FU32 = 1 Configuration acquisition
=2 Status interrogation after configuration acquisition
=3 use nominal configuration
Output parameters if FU32 = 1
FU32 = -1 Configuration acquisition running
Output parameter if FU32 = 2:
FU32 = 1 Configuration acquisition running
=2 Actual configuration = nominal configuration
=3 Actual configuration <> nominal configuration
=4 No configuration available
Output parameters if FU32 = 3 None
All fieldbus outputs are deleted prior to configuration acquisition. fieldbus inputs are not
updated for a period of up to several seconds.
The use of the function with FU=2 does not make sense. When a participant list is given (see
Section 1.2) actual and nominal data of this option match by definition.

FST Version 4.02.21 Manual 155


Example program for F48:
STEP 1
THEN CFM 48
WITH K1 "Configuration acquisition

STEP 2
THEN CFM 48
WITH K2 "Status interrogation
IF FU32
<> K1
THEN NOP

STEP 3
IF FU32
<> K2
THEN ...

4.4.7 CI commands
The Festo fieldbus has the driver number 0. For historical reasons, "!0" can be entered
instead of "$".
!0FA Assign nominal configuration
!0FC Display participant number
!0FI Reinitialisation (acquisition of actual configuration)
Response "=1" for success, else "=0".
!0FN Cyclic display of participant
Displays the definition of one participant per cycle. Output comprises participant number,
type number, number of output bits and number of input bits.
!0FR Start/continue cyclic transfer of data
!0FS Stop cyclic transfer of data

4.4.8 Error numbers


No Meaning of error Notes on elimination
14 Critical driver error. Project This error occurs if the field-
cannot be started even with bus driver was not found or
“soft” errors problems occur starting the
firmware of the CP 61
60 Actual configuration is not a Correct fieldbus configuration
superset of the nominal con- or connect missing participant
figuration

4.5 Festo Fieldbus Slave


This package allows you to operate the IPC as an intelligent slave in a Festo fieldbus.

4.5.1 Selecting the driver and assigning parameters


If you want to use the IPC to become a fieldbus slave, you must enter and parameterise the
FBSLAVE driver in the configurer. The following entries are required:

Destination Drive:
Enter here the target drive for the Festo CP61 firmware FBSLAVE.BIN.

CP61 switch setting:


FST Version 4.02.21 Manual 156
Enter the switch position here, which you have set on the rear of your fieldbus module
(CP61).

4.5.2 How to use the module FBSLAVE


Import the FBSLAVE file into your FST-IPC project. In the following examples I will assume
that it was imported as a program module with number 0 (CMP 0).

Initialisation/configuration
First the firmware must know things like fieldbus address, baud rate etc.

Input parameters
FU32 1 = Initialisation/configuration
FU33 Switch setting of CP61 (4..7)
FU34 Baud rate (0..3)
0 = 31.25 Kbit/s
1 = 62.5 Kbit/s
2 = 187.5 Kbit/s
3 = 375 KBit/s
FU35 Participant number (slave address) (1..99)
FU36 Output bytes (0..24) or words (0..12)
FU37 Input bytes (0..24) or words (0..12)
FU38 1 = Byte oriented
2 = Word oriented
Output parameters
None

Repeated initialising has no effect, only after reloading the binary code (FBSLAVE.BIN) can
the CP61 be reconfigured. You need to reboot the IPC to do so.
If inputs and outputs are mentioned I will use them as seen from the slave’s perspective. So
if in this document I use the word input, it means input as seen by the slave and output as
seen by the master.
Example:
IF NOP
THEN CMP 0 'FBSLAVE
WITH V1 " Initialise
WITH V4 " Switch setting CP61
WITH V3 " Baud rate (3=375 Kbit/s)
WITH V1 " Participant number ( slave address )
WITH V24 " Inputs
WITH V24 " Outputs
WITH V1 " Byte oriented

From the master this slave will be seen as follows:

PA Type IW OW
1 FB-IPC (byte) 24 24

Example:
IF NOP
THEN CMP 0 'FBSLAVE
WITH V1 " Initialise
WITH V4 " Switch setting CP61
FST Version 4.02.21 Manual 157
WITH V3 " Baud rate (3=375 Kbit/s)
WITH V1 " Participant number ( slave address )
WITH V8 " Inputs
WITH V12 " Outputs
WITH V2 " Byte oriented

From the master this slave will be seen as follows:


PA Type IW OW
1 FB-IPC (word) 8 12

4.5.3 Cyclic updates


The input and output data of the IPC fieldbus slave are kept in a flag word area defined by
the user. The contents of these flags can be read to and from inputs and outputs or proc-
essed elsewhere with the help of an STL or LDR program.
To read/write the data that is cyclically updated to the master we use a range of flagwords,
which are read from/copied to the dual ported RAM of the CP61 by calling CFMxx as follows:
Input parameters FU32 2 = Cyclic update
FU33 1st flagword for outputs
FU34 1st flagwords for inputs
Output parameters None

Example:
IF NOP
THEN CMP 0 'FBSLAVE
WITH V2 " Cyclic update
WITH V10 " 1st flag word for outputs
WITH V20 " 1st flag word for inputs

4.5.4 Get status


The communication status can be requested by calling CMPxx as follows:
Input parameters
FU32 0 = get status
Output parameters
FU32 status
The status is returned into FU32, and has the following meaning:
bit 0 reserved can be 0 or 1
bit 1 reserved can be 0 or 1
bit 2 1 if there is no cyclic communication with a fieldbus master
bit 3 1 if there is cyclic communication to a fieldbus master
bit 4 reserved can be 0 or 1
bit 5 reserved can be 0 or 1
bit 6 reserved can be 0 or 1
bit 7 reserved can be 0 or 1
bit 8 - 15 reserved always 0

4.5.5 A-cyclic updates


It is possible to access a data field of 256 words. To write a value to a parameter you would
use the following:
Input parameters
FU32 3 = write parameter
FU33 parameter field number
FU34 parameter field value
Output parameters
FST Version 4.02.21 Manual 158
None

To read the parameter:


Input parameters
FU32 4 = read parameter
FU33 parameter field number
Output parameters
FU32 parameter field value

4.5.6 Sample program


"" Example program for Festo fieldbus Slave
STEP init
IF NOP
THEN CFM 62 " fieldbus slave module
WITH V1 " Initialise
WITH V$D400 " Base address CP61 module
WITH V3 " Baud rate (3=375 Kb)
WITH V1 " Slave address
WITH V24 " Output bytes
WITH V24 " Input bytes
WITH V1 " Byte oriented
STEP loop
IF NOP
THEN LOAD IW1 " Some inputs
TO FW9000 " fieldbus output byte 0

IF NOP
THEN CFM 62 " fieldbus slave module
WITH V2 " Cyclic update info
WITH V9000 " fieldbus outputs start at FW9000
WITH V9100 " fieldbus inputs start at FW9100

IF NOP
THEN LOAD FW9100 " fieldbus input byte 0
TO OW1 " LEDs on AS14

IF NOP
THEN JMP TO loop

4.6 Profibus DP (CP62)


With this driver and the CP62 module you can connect Profibus DP slaves to the IPC and to
use them with the FST IPC.
Note! Before you can use the CP62 module it must be configured using the SyCon configura-
tion software from the company Hilscher.
The inputs/outputs of the modules are copied cyclically to the local function units (inputs,
outputs or flag words) configured by the user.

4.6.1 Selecting the driver and assigning parameters


If you want to use the Profibus DP driver in an FST IPC project you must enter the PDP driver
in the driver configurer and assign the necessary parameters.
Note! The driver uses the same driver number as PROFI-DP for CP60. It can not be used
together in the same project.

FST Version 4.02.21 Manual 159


Destination drive:
Specify the IPC drive on which the Profibus DP driver PDP.EXE is located or onto which it is
to be loaded.
CP62 switch position:
Enter the address switch position of the CP62 module here.
DR-RAM size:
This can be either 2 or 8.
Use FW as IW:
If you select "Y" then the process data will be copied into FWs instead of IWs.
Use FW as OW:
If you select "Y" then the process data will be copied into FWs instead of OWs.
Offset for Inputs:
Enter the index where the input area of the process data starts.
Offset for Outputs:
Enter the index where the output area of the process data starts.

4.6.2 Configuration
Before you can use the CP62 module it must be configured using the SyCon configuration
software from the company Hilscher.
For DP-Master, following Parameters should be used:
• Start up behaviour:
ο Automatic release of communication by the system after system initialised.
• Watchdog time:
ο 300ms
• Addressing mode:
ο Word address (Important!)
Process Data exchange:
ο Buffered, program controlled data transfer
Error reaction:
ο The error reaction "Hard" or "Soft" (e.g.: participant missing or non-configured
participant on the bus) depends on the Bus- Parameter setting "Auto Clear".
"Auto Clear On" := Hard reaction.

4.6.3 Error messages from the driver


The driver enters the following error numbers in the FPC error word:
No Meaning of the error Pointer to error correction
1001 There is no communication Probable cause:
between driver and Profibus - Card address is not the same
card with driver configuration
- No valid configuration in the
card system configuration
(SyCon)
1004 Configures Slave not in the Only for hard reaction
Bus
1005 Input range exceeding
1006 Output range exceeding

FST Version 4.02.21 Manual 160


4.6.4 Modules
Overview
DP_USIF Get the current USIF status
DP_GETSL Checks whether a diagnostic request is present
DP_GETDG Obtains diagnostic information from a DP slave
DP_CONTR Profibus function "Global Control Request"

DP_USIF
The User Interface status cannot be edited; it will give back the actual status. The module
operates in conjunction with the DP driver (PDP).

Input parameters None

Output parameters FU32 = -1 OK


=0 driver not loaded
FU33 Current status or
0 = system not correctly initialised

DP_GETSL
Checks whether a diagnostic request is present.
Input parameters None
Output parameters FU32 = -1 OK
=0 driver not loaded
FU33 address of first participant with diagnostic requisition
or $FFFF = no request present
FU34 address of first missing participant

DP_GETDG
Request diagnostic information from a DP slave. This should be used in conjunction with the
DP_GETSL module.
Input parameters FU32 Address of the slave (0 to 126)
FU33 Offset in diagnostic information
FU34 Group select
Output parameters FU32 = -1 OK
=0 driver not loaded
=1 slave address invalid
FU33 Profibus status of the operation
FU34 Length of diagnostic information in bytes
(not incl. length byte)
FU35-38 The diagnostic information in consecutive
Order

Profibus status of the operation, typical values:


00 OK
C3 Partner not responding
04 No parallel master-slave function possible

Will give back max. 4 Words of diagnostic information for every call.

FST Version 4.02.21 Manual 161


Note! The module call must be repeated as many times as necessary until the value 0 is
returned in FE33. The other values are not valid until this is the case.

DP_CONTR
Profibus function "Global Control Request".
Input parameters FU32 Slave address or
127 = all slaves (broadcast)
FU33 Control command
FU34 Group select
Output parameters FU32 = -1 OK
=0 driver not loaded
FU33 Profibus status of the operation
All transfer parameters in BYTE format.

Profibus status of the operation, typical values:


00 OK
C3 Partner not responding
04 No parallel master-slave function possible
Note! The module call must be repeated as many times as necessary until the value 0 is
returned in FE33. The other values are not valid until this is the case.

4.7 Profibus FMS (CP62)


With this driver you can operate the Festo IPC in a Profibus FMS network using the CP62
module of the IPC product range.
Note! Before you can use the CP62 module it must be configured using the SyCon configura-
tion software from the company Hilscher.
There are no external configuration files. The bus parameters, Communication Reference
List and Object Directory must be configured through SyCon.

4.7.1 Configuring the driver and assigning parameters


If you want to use the Profibus FMS driver in a FST IPC project, you must enter the PROFIFMS
driver in the driver configurer and assign the necessary parameters.

Destination drive:
Specify the drive on which the Profibus FMS driver PROFIFMS.EXE is located or onto which it
is to be loaded.

CP62 switch position:


Enter the switch position as set on the CP62 module. The default of CA means that the CP62
module uses a base memory segment of CA00h
Note! Make sure that the memory used by the CP62 is not in use by other modules.

4.7.2 Extended CI commands for PROFIFMS


This driver extends the IPC command interpreter with the following commands:

!39 Display driver identification and version number


Display driver info and version number. This information will also be displayed if an un-
known command is entered (for example !39?).

4.7.3 Function modules


Overview
FMSREAD Read (polled response)
FST Version 4.02.21 Manual 162
FMSWRIT Write (polled response)

FMSREAD
Read (polled response)
Input parameters FU32 Communication reference (CR=1 to 32)
FU33 Object index (20 to 65535)
FU34 Object subindex (0 to 241)
FU35 Number of the flag word for status variable
FU36 Low byte, identification of the operand type for data
0 = Input word
1 = Output word
2 = Flag word
3 = Register
High byte, identification of the Profibus data type
1 = Boolean
2 = Integer8
3 = Integer16
4 = Integer32
5 = Unsigned8
6 = Unsigned16
7 = Unsigned32
8 = Floating point
9 = Visible-string
10 = Octet-string
11 = Date
12 = Time-of-day
13 = Time-difference
14 = Bit-string
FU37 Number of the (first) operand word for data
FU38 Expected length in bytes
Output parameters FU32 Error number
= 0 Successfully processed
> 0 Error (see table)

Status variable =0 Successfully completed


=1 Still being processed
>1 Terminated by error (see table)
FMSWRIT
Write (polled response)

Input parameters FU32



FU38 See FMSREAD
Output parameters FU32 See FMSREAD

Status variable See FMSREAD

4.7.4 Object directory


If other Profibus FMS participants want to access FST operands, the operands must be
configured in the Object Directory (in SyCon configurator). Entering operands is optional, if
they are missing in the Object Directory the operands are simply not accessible.

FST Version 4.02.21 Manual 163


Please note that not all operands are accessible. Only Inputwords, Outputwords, Registers
and a limited range of Flagwords can be accessed.
When operands are entered they should be entered according to the following table:

Index Designation as per Type Access


IPC
100 EW0-EW63 Array(64)*U16 Read
101 EW64-EW127 Array (64)*U16 Read
102 EW128-EW191 Array(64)*U16 Read
103 EW192-EW255 Array(64)*U16 Read
110 AW0-AW63 Array(64)*U16 Read/write
111 AW64-AW127 Array(64)*U16 Read/write
112 AW128-AW191 Array(64)*U16 Read/write
113 AW192-AW255 Array(64)*U16 Read/write
120 R0-R63 Array(64)*U16 Read/write
121 R64-R127 Array(64)*U16 Read/write
122 R128-R191 Array(64)*U16 Read/write
123 R192-R255 Array(64)*U16 Read/write
200 MW0-MW63 Array(64)*U16 Read/write
201 MW64-MW127 Array(64)*U16 Read/write
202 MW128-MW191 Array(64)*U16 Read/write
203 MW192-MW255 Array(64)*U16 Read/write
204 MW256-MW319 Array(64)*U16 Read/write
205 MW320-MW383 Array(64)*U16 Read/write
206 MW384-MW447 Array(64)*U16 Read/write
207 MW448-MW511 Array(64)*U16 Read/write
208 MW512-MW575 Array(64)*U16 Read/write
209 MW576-MW639 Array(64)*U16 Read/write
210 MW640-MW703 Array(64)*U16 Read/write
211 MW704-MW767 Array(64)*U16 Read/write
212 MW768-MW831 Array(64)*U16 Read/write
213 MW832-MW895 Array(64)*U16 Read/write
214 MW896-MW959 Array(64)*U16 Read/write
215 MW960-MW1023 Array(64)*U16 Read/write
216 MW1024-MW1087 Array(64)*U16 Read/write
217 MW1088-MW1151 Array(64)*U16 Read/write
218 MW1152-MW1215 Array(64)*U16 Read/write
219 MW1216-MW1279 Array(64)*U16 Read/write
220 MW1280-MW1343 Array(64)*U16 Read/write
221 MW1344-MW1407 Array(64)*U16 Read/write
222 MW1408-MW1471 Array(64)*U16 Read/write
223 MW1472-MW1535 Array(64)*U16 Read/write
224 MW1536-MW1599 Array(64)*U16 Read/write
225 MW1600-MW1663 Array(64)*U16 Read/write
226 MW1664-MW1727 Array(64)*U16 Read/write
227 MW1728-MW1791 Array(64)*U16 Read/write
228 MW1792-MW1855 Array(64)*U16 Read/write
229 MW1856-MW1919 Array(64)*U16 Read/write
230 MW1920-MW1983 Array(64)*U16 Read/write
231 MW1984-MW2047 Array(64)*U16 Read/write

FST Version 4.02.21 Manual 164


4.7.5 Error return codes from function modules
If FU32 is <> 0 then the function module returned an error, following table lists the error
codes:

198 Function not implemented


(call Festo)

199 PROFIFMS driver not loaded

200 Invalid parameter

201 No message number available


(255 outstanding requests)

4.7.6 Error codes in status variable


Following table lists some of the possible error values:

42h 66 Connection has been aborted

43h 67 Too many parallel services on one CR

80h 128 Connection could not be opened

81h 129 Error in application of remote partner

4.7.7 Heterogeneous networks


When integrating FPC-405 or PS1-CP60 into the Profibus network make sure to verify the
bus parameters. In the SyCon configurator set the baud rate to 500 kBits/second and opti-
mise to user. Then edit the bus parameters.
When using the FPC-405 with default bus parameters set as follows:

FST Version 4.02.21 Manual 165


Also the Communication references differ slightly from the default settings, viewed from the
CP62:

4.8 FEC Remote I/O Expansion


Introduction
This document describes the how to expand an FEC Compact controller with 1 to 4 addi-
tional modules to provide up to 100 I/O points.
Note! The I/O Expansion is not available for the FEC Standard series.
The architecture consists of several FEC Compacts in a Master-Slave arrangement. The
Master FEC contains all of usual user-application programs as well as a special software
driver to manage communication with the slave FECs. If only a single extension module is
required you can also use the IO script FEC Slave without installing drivers. See the chapter
"FEC and HC0X" for details.
The Slave FECs do not contain any user-application programs but must be loaded with a
special Slave software driver. The balance of this document provides detailed instructions.

4.8.1 System Overview


Systems should be created using FEC-FC30 only. FEC-FC20 modules can be used at the ends
of the daisy chain. However, doing so has been experienced as not being stable in some
situations and is therefore not recommended.

FST Version 4.02.21 Manual 166


The modules must be connected together using Festo cable part number 183635. When
planning a system, please note that I/O updates may require up to 25 milliseconds due to
the nature of the serial data bus.

4.8.2 Configuring Slave FECs


Every FEC module, which you will use as a slave device, has to be configured in the following
manner. It is suggested that you create a separate FST project called FECSLAVE, which will
contain data that must be loaded into every slave. N o user written programs are required. It
is only necessary to add the FCSLAVE driver to the FECSLAVE project and load it into the
controller. The follow provides step-by-step instructions:
1.Create the FCSLAVE project
2.Select the FCSLAVE project as the current project
3.Open the Driver Configuration
4.Insert the FCSLAVE driver
5. You will be prompted for a Destination Drive. Accept the default B response.
6. A listing of ALL configured drivers will be shown. The FEC SLAVE driver "FCSLAVE" should
be listed.

Loading the Slave Software into the FEC


1. Connect your PC to the COMM port of the FEC Slave using the appropriate cable
2. Set the Run/Stop switch of the slave FEC to STOP
3. Switch on the Power to the Slave FEC
4. Download the FECSLAVE project
5. You will receive a warning: "No IO scan table, no programs." This is correct, as only driv-
ers will be loaded.
6. Set the Run/Stop switch of the slave FEC to the RUN position.

Note! Until all slaves and the master are connected and the power is cycled, it is likely that a
Red or Orange LED will be shown. This is normal.

7. After the next power cycle, the FEC Slave should operate in the slave mode.
8. Repeat this Loading process for any other FEC Slaves.

4.8.3 Configuring the Master FEC


Adding the Driver
The master FEC is programmed and executes all of the user-application programs. As with
standalone FEC controllers, the system I/O configuration has to be recorded.
Additionally, the special FCMASTER software driver must to be included in the FST project.
The following provides step-by-step instructions:
Create (or select) your FST project.
Insert the FCMASTER driver to the Driver Configuration
You will be prompted for a Destination Drive. Accept the default B response
A listing of ALL configured drivers will be shown. The FEC Master driver "FCMASTER" should
be listed.

Selecting and adding I/O Entries


The user now must select one of two available I/O entries in the Master Project. The step-by-
step process is present below. Please refer to the following section. However, the user must
first select which I/O entry is best suited to the application.
The possible selections are:

FST Version 4.02.21 Manual 167


FEC Slave
If this I/O entry is selected, then during system initialisation the master checks if all ex-
pected slave devices respond. If a configured slave does not respond then system error 11
is generated. During runtime, if any slave device fails to respond, system error 11 will be
generated.
-or-

FEC Slaves without error 11


This I/O entry reacts in the same way during the initialisation phase. However, excessive
runtime communication errors between the master and any slave device will not generate an
error.
Each of the FEC Slave nodes must be entered into the FST Project I/O configuration of the
FEC Master.
You will be prompted for:

Switch:
Enter 0 for the first slave, 1 for the second slave etc.

IW:
Enter the starting IW (Input Word) number for the Slave. Each FEC requires 2 Input words
and each unit must be assigned unique, non-overlapping ranges.

OW:
Enter the starting OW (Output Word) number for the Slave. Each FEC requires 1 Output word
and each unit must be assigned unique, non-overlapping ranges.
Note! Don’t forget that the FEC master also must be entered into the I/O configuration!

Optional I/O Entry


If desired the user may also include the FEC Slaves Error Counter I/O entry in the master
project. This will track the total global expansion bus errors that occur.
If this is desired then include the module "FEC Slaves Error Counter" into the IO configura-
tion. For the IW enter the number of a non-conflicting "virtual" IW (Input Word), which will
be used to store the global error, count.
Runtime Functioning
The following describes the functionality of a configured and wired system.

4.8.4 Master at Runtime


Upon power up the master will initialise the remote (slave) FEC modules. If there is a dis-
crepancy between the expected versus the actual configuration (the expected slaves do not
respond); then an I/O stage defective error will be generated and system error 11 will be
stored.
If during operation a communications problem develops (and the appropriate I/O entry is
included) then excessive communications errors result in system error 11 being generated
and the Master will stop attempting to update the slave FEC I/O points.
The system can be reinitialised by toggling the Run/Stop switch or cycling power.

4.8.5 Slave at Runtime


Upon power up the slave will check the Run/Stop switch. If the switch is in the Stop posi-
tion, the slave software driver will not be processed and no access from the master can
occur. If the switch is in the Run position, then the FEC slave software is processed.
Interpreting the RUN Led in Slave Devices
FST Version 4.02.21 Manual 168
Red Communications error
Flashing Orange No communications with master
Flashing Green Slave being initialised by master
Green Communications normal

4.8.6 Diagnostic Program Module (REMDIAG)


The Remote FEC software package also includes software for monitoring the status of the
FEC Remote I/O devices from within the user application program. If you want to include this
capability in your application, you need to import the REMDIAG Remote FEC error counter
into your FEC MASTER project

Using the REMDIAG Module


Use the following guidelines to access to REMDIAG module from within your Statement List
or Ladder Diagram program:

Get error counters


Input parameters FU32 1 (get error counter)
Output parameters FU32 Short term error count
0 if communication OK
<> 0 if error in last cycle(s)
FU33 Total error count,
wraps from 65535 back to 0

Reset total error counter


Input parameters FU32 2 (reset total error counter)

Set retry counter


Input parameters FU32 3 (set total error counter)
FU33 Value for retry counter.
0 = disable

4.9 File Handling Modules


Some standard CFM give access to the file systems on diskettes, hard disks, RAM-disks, etc.
as supported by the MS-DOS operating system on HC1X and HC2X CPUs. It is possible to
have up to 6 open files at a time. If more files than this are opened the CFM returns with
error number 4 (too many open files).
The naming convention uses numbers for files. If the file number is in the range 0 to 32767,
that is if it is a positive number, it will be translated into a file name directly. For example file
number 17 results in a "17" file name in the current working directory of the current disk.
For a negative file number the CFM search the string driver and use the string with the oppo-
site number as file name. For example if the file number is "-3" and the string number 3
contains "C:\MYDATA.BIN" this will become the name of the associated file.
All file access CFM pass jobs to the MS-DOS task for further processing and return immedi-
ately. The real job will be done by the MS-DOS task somewhat later on a first comes first
served base. So more than one operation can be issued at the same time.
All read or write data functions use flag words as storage for read or written data. The rea-
son is, that only the flag words offer a meaningful amount of memory.

All CFM return a result and support an operation status variable. A CFM result of zero means
the operation has been started, but need not be complete (and usually is not). A none zero
CFM result shows an error condition. The operation is not started and the actual returned
value indicates the error type, for example invalid parameters. A status variable value of
FST Version 4.02.21 Manual 169
zero means success. While the value is -1, the operation is still busy, not yet completed. If
any error occurs, the value will become >0 and the actual value can be used to obtain further
information of the kind of the error. For a list of error values see below.
Do not remove a diskette while there is an open file on it. Doing such in MS-DOS will pro-
duce lost clusters or even worse.
Remember, MS-DOS updates the file allocation table not steadily. The method used by MS-
DOS would take too much time. MS-DOS updates it when a file is closed. To make sure that
all written data is part of a file and all allocated memory (clusters) is noted in the file alloca-
tion table the file has to be closed. A simple but effective trick is to position to the desired
end of the file, write zero bytes to that location and close the file. This will force MS-DOS to
allocate enough memory from the disk and update the file allocation table. Doing this re-
sults in the best chance to save the integrity of the file system on a disk.
Another strategy uses a "check point a file" method. Request and save the current position
of the file read/write pointer. Then close the file, open it again, and seek to the saved posi-
tion. This also ensures all data will be written to the disk and the file allocation table will be
updated. If the CHKDSK-command finds lost clusters on a disk, the file allocation table has
not been updated at the right moment. The first method prevents this nearly always, the
second is less sure but even saves partially written clusters to the disk.
The CI commands S and Y and the QUIT and EXIT commands will automatically close all files.

Overview
FCREATE File create
FOPEN File open
FCLOSE File close
FCLOSALL File close all
FDELETE File delete
FSEEK File seek
FSEEKX File seek extended
FWRITE File write
FREAD File read
FWRITSTR File write string
FREADSTR File read string

FCREAT File Create


Create a new file or open an existing file for reading and writing. If the file exists it will be
truncated to zero length.
Input parameters:
FU32 File number for the MS-DOS
File name. A positive number is directly converted into a file name.

The number 17 translates into a file name "17". A negative number is used as opposite
index into the string table in the string driver. The associated string contains the file name.

FU33 Number of flag word FW used for status report.


The status is
FW[FU33] = -1 while function is busy,
= 0 when completed successfully,
= >0 error number after failure.

FU34 Number of flag word FW for the requested file handle.


Valid when the status flag word shows 0. This handle has to be used with all further opera-
tions with the opened file.

FST Version 4.02.21 Manual 170


Output parameters:
FU32 = 0 OK, function has been started,
= >0 error number after failure. Function is not started.

FOPEN File Open


Open an existing file in the given mode.
Input parameters:
FU32 File number for the MS-DOS file name.
A positive number is directly converted into a file name.
The number 17 translates into a file name "17". A negative number is used as opposite
index into the string table in the string driver. The associated string contains the file name.

FU33 Number of flag word FW used for status report.


The status is
FW[FU33] = -1 while function is busy,
= 0 when completed successfully,
= >0 error number after failure.

FU34 Number of flag word FW for the requested file handle.


Valid when the status flag word shows 0. This handle has to be used with all further opera-
tions with the opened file.

FU35 Mode in which to open the file.


0 = read-only access,
1 = write-only access,
2 = read/write access.
Output parameters:
FU32 = 0 OK, function has been started,
= >0 error number after failure. Function is not started.

FCLOSE File Close


Close a previously opened file. After closing a file the file handle is no longer valid and
cannot be used for any further operation.

Input parameters:
FU32 File handle for the MS-DOS file as obtained from file open or file create func-
tions
FU33 Number of flag word FW used for status report.

The status is
FW[FU33] = -1 while function is busy,
= 0 when completed successfully,
= >0 error number after failure.
Output parameters:
FU32 = 0 OK, function has been started,
= >0 error number after failure. Function is not started.

FCLOSALL File Close All


Close all currently open files. After closing all files the file handles are no longer valid and
cannot be used for any further operation.
Input parameters:
FU32 Number of flag word FW used for status report.

FST Version 4.02.21 Manual 171


The status is
FW[FU33] = -1 while function is busy,
= 0 when completed successfully,
= >0 error number after failure.
Output parameters:
FU32 = 0 OK, function has been started,
= >0 error number after failure. Function is not started.

FDELETE File Delete


Delete a file. The file to be deleted may not be open.
Input parameters:
FU32 File number for the MS-DOS file name.
The number 17 translates into a file name "17".

FU33 Number of flag word FW used for status report.


The status is
FW[FU33] = -1 while function is busy,
= 0 when completed successfully,
= >0 error number after failure
Output parameters:
FU32 = 0 OK, function has been started,
= >0 error number after failure. Function is not started.

FSEEK File Seek


Move the file read/write pointer to a specified position. The position is given in bytes.
Input parameters:
FU32 File handle for the MS-DOS file as obtained from file open or file create
functions.
FU33 Number of flag word FW used for status report. The status is

The status is
FW[FU33] = -1 while function is busy,
= 0 when completed successfully,
= >0 error number after failure.
FU34 Low word of 4 byte file pointer position.
FU35 High word of 4 byte file pointer position.
Output parameters:
FU32 = 0 OK, function has been started,
= >0 error number after failure. Function is not started.

FSEEKX File Seek Extended


Move the file read/write pointer to a specified absolute or relative position. The position is
given in bytes.
Input parameters:
FU32 File handle for the MS-DOS file as obtained from file open or file create
functions.
FU33 Number of flag word FW used for status report.
The status is
FW[FU33] = -1 while function is busy,
= 0 when completed successfully,
= >0 error number after failure
FU34 Low word of absolute or relative 4 byte file pointer position.

FST Version 4.02.21 Manual 172


FU35 High word of absolute or relative 4 byte file pointer position.

FU36 0=absolute, start from beginning of file


1=relative, start from current position
2=relative, start from end of file.

FU37 Number of flag word FW used to return the new position.

The new position is given as follows:


FW[FU37] Low word of absolute 4 byte file pointer position.
FW[FU37+1] High word of absolute 4 byte file pointer position.

Output parameters:
FU32 = 0 OK, function has been started,
= >0 error number after failure. Function is not started.

FWRITE Write File


Write some portion of the flag words to an open file. The amount is given in bytes.
Input parameters:
FU32 File handle for the MS-DOS file as obtained from file open or file create func-
tions.
FU33 Number of flag word FW used for status report.
The status is
FW[FU33] = -1 while function is busy,
= 0 when completed successfully,
= >0 error number after failure.

FU34 Number of the first flag word FW that has to be written.


FU35 Number of the bytes that have to be written.
Writing 0 bytes will truncate the file at the current file pointer position. If the number of
bytes is odd, only the low byte of the last flag word will be written.

Output parameters:
FU32 = 0 OK, function has been started,
= >0 error number after failure. Function is not started.

FREAD Read File


Read some portion of the flag words from an open file. The amount is given in bytes.
Input parameters:
FU32 File handle for the MS-DOS file as obtained from file open or file create
functions.

FU33 Number of flag word FW used for status report.

The status is
FW[FU33] = -1 while function is busy,
= 0 when completed successfully,
= >0 error number after failure.

FU34 Number of the first flag word FW that has to be read.

FU35 Number of the bytes that have to be read.

FST Version 4.02.21 Manual 173


If the number of bytes is odd, only the low byte of the last flag word will be read.

FU36 Number of flag word FW for the number of bytes that actually have been
read.

Output parameters:
FU32 = 0 OK, function has been started,
= >0 error number after failure. Function is not started.

FREADSTR Read string from file


Read string from file until delimiter is found.
Input parameters:
FU32 File handle for the MS-DOS file as obtained from file open or file cre-
ate functions.

FU33 Number of string.

FU34 Number of the bytes that will be checked (max).

FU35 Delimiter (0..255).


0: delimiter is CR LF.
Output parameters:
FU32=
0 DONE, function has been executed successfully
200 String driver not found
201 Reached EOF before delimiter was found. File pointer remains unchanged.
202 Checked given amount of characters before delimiter was found. File pointer
remains unchanged.
>0 Error, see below.

FWRITSTR Write string to file.


Write string plus delimiter to file.
Note! This module needs to be called more than once in order to execute the function.
Input parameters:
FU32 File handle for the MS-DOS file as obtained from file open or file create
functions

FU33 Number of string.

FU34 Number of the bytes that will be written (max).

FU35 Delimiter (0..255).


0: delimiter is CR LF,
-1:no delimiter appended
Output parameters:
FU32 =
0 DONE, function has been executed successfully
200 String driver not found
>0 Error, see below.

4.9.1 Operation result codes


Most functions will set a status value in a flag word.
The status value has following meanings:
FST Version 4.02.21 Manual 174
-1 BUSY Function not yet completed,
0 OK Function completed successfully,
>0 ERROR Function failed to complete successfully, that is an error, value
specifies error type.

If the status value is >0 it is regarded an error.


2 File not found
3 Path not found
4 Too many open files
5 Access denied
6 Invalid handle number
12 Invalid access code
100 Invalid parameter
101 Disk full
102 Out of memory

4.10 Strings
Version 1.01
The FST string driver makes a new additional data type available: the STRING
data type. The default setting provides support for 256 strings. Individual
strings are addressed by way of the string number. Strings may contain any
characters with the exception of the NULL character (hexadecimal $00). Strings
can be as long as necessary within the scope of the set memory requirement. The
strings are not retentive.

4.10.1 Configuring the driver and assigning parameters


If you want to use strings in an FST IPC project, you must enter the STRINGS
driver in the driver configurer and assign the necessary parameters.
IPC drive:
Specify the drive on which the string driver STRINGS.EXE is located or onto
which it is to be loaded.
Reserved memory in bytes:
Enter the maximum memory capacity to be used for strings. The permissible range
is from 5 to 65000 bytes. The default setting is 5 kilobytes. This setting can
also be specified or modified using the STRINIT module.
Number of strings:
Enter the maximum number of strings. The permissible range is from 5 to 1024
strings. The default setting is 256 strings.
File with default assignments:
Enter the name of the file that contains the initialisation values for the
strings. The format of this file is described in the following section.

4.10.2 Initialisation of strings


A simple text file is used for initialising strings. The file name must have the
extension "TXT". Each line in the file is a string. The first line is string 0.
Missing strings are initialised as blank strings. Any new-line characters (CR or
LF) in the text file are removed. Special characters are represented by a
combination of two characters, the '\' character and another character.
The following special characters are possible:
\a alert Bell character (audible signal)

\b backspace Move position one character to the left

FST Version 4.02.21 Manual 175


\f formfeed Form feed (FF)

\n linefeed Line feed (LF)

\r return New line (CR)

\t tab Tabulator character

\<no> Hexadecimal definition of a character;


<no> must begin with a digit,
for example "\0A8" (correct)
rather than "\A8" (incorrect).
The '\' character is represented by two backslashes: '\\'.

4.10.3 Extended CI commands for strings


When strings are used in a project, in other words when the string driver has
been loaded, the command set of the CI is supplemented by the string driver. The
additional commands for the string driver are shown below.

!3Dx Display string x


!3Mx=text Set string x with the sequence of characters 'text'
!3S Status indication
Result "=count=<XX>,storage=<YY>, <ZZ>", where

XX = Number of strings
YY = Reserved memory capacity
ZZ = OK, if string memory is OK, or
= BAD, if string memory is defective
In these commands, "!3" is the prefix for a CI call in a driver; in this case it
is in driver 3 for strings.

4.10.4 Modules for handling strings


There is a number of ready- prepared modules, which can be used for handling
strings. These must be imported into a project in the usual way. The various
strings concerned are specified with the string number. In order to delete
string 5, that is to reduce it to length 0, the STRCLR module must be invoked.
The STRCLR module may have been imported as CMP 73, for example.
In STL the program lines appear as follows:

THEN . . .
CMP 73 " delete with STRCLR
WITH V5 " from string 5

In order to copy string 6 into string 12, the STRCPY module must be invoked. The
STRCPY module may have been imported as CMP 74, for example. In STL the program
lines appear as follows:
THEN . . .
CMP 74 " copy with STRCPY
WITH R0 " from string with number in R0
WITH V12 " to string 12
Most string modules return a result for error detection.

Overview of modules:
FST Version 4.02.21 Manual 176
STRADDR Determine internal address of a string
STRAPPND Append a character at the end of a string
STRATOH Convert a hexadecimal string into a word
STRATOI Convert a string into a signed word
STRATOIX Convert a string into a signed word
STRATOU Convert a string into an unsigned word
STRCAT Combine two strings in a third string
STRCHECK Memory check
STRCHGET Extract a character from a string
STRCHSET Replace a character in a string
STRCI Execute a CI command
STRCLR Delete a string
STRCMP Compare two strings character by character,
differentiating between upper and lower case
STRCPY Copy string
STRDEL Delete part of a string
STRDUMP Display a number of strings
STRFILL Create a string with a specified number of identical characters
STRFILLW Fill a string with another string, right- or left-justified
STRFINDC Find a character in a string
STRFINDS Find a substring in a string
STRGROW Enlarge the string memory for an individual string
STRHTOA Convert a word into a hexadecimal string
STRICMP Compare two strings character by character,
not differentiating between upper and lower case
STRINIT Initialisation or re-initialisation
STRINSRT Insert a string into another string
STRITOA Convert a signed word into a string
STRLEFT Left substring
STRLEN Length of a string
STRLOWER Convert a string to lower case
STRMID Middle substring
STRNCMP Compare the first characters of two strings,
differentiating between upper and lower case
STRNICMP Compare the first characters of two strings,
not differentiating between upper and lower case
STRRIGHT Right substring
STRSTAT Status of string driver
STRUPPER Convert a string to upper case
STRUSAGE Used and free memory
STRUTOA Convert an unsigned word into a string

STRADDR
Determine the internal address of a string.
Input parameters
FU32 Number of the string
Return parameters
FU32 Offset of the address
0 if string number is invalid
FU33 Segment of the address
0 if string number is invalid
As the lengths of the strings concerned are subject to dynamic change, the
strings may need to be moved within the string memory. The direct consequence of

FST Version 4.02.21 Manual 177


this is that after the address of a string has been determined it may change
immediately as a result of string operations with other strings. The addresses
of strings are therefore to be used under special conditions.

STRAPPND
Append a character at the end of a string.
Input parameters FU32 Number of the string
FU34 character to append
Return parameters FU32 0 if successful, otherwise error

STRATOH
Convert a hexadecimal string into a word.
Input parameters FU32 Number of the string
Return parameters FU32 0 if successful, otherwise error
FU33 Resultant value
Space characters and tabulator characters at the beginning and end of the string
are allowed. A '$' character before the hexadecimal numeric characters is also
allowed.

STRATOI
Convert a string into a signed word.
Input parameters FU32 Number of the string
Return parameters FU32 0 if successful, otherwise error
FU33 Resultant value
Space characters and tabulator characters at the beginning and end of the string
are allowed. A '+' or '-' character before the numeric characters is also
allowed.

STRATOIX
Convert a string into a signed word.
Input parameters FU32 Number of the string
FU33 String position for the conversion
Return parameters FU32 0 if successful, otherwise error
FU33 Resultant value
FU34 Number of characters used for the conversion
Space characters and tabulator characters at the beginning and end of the string
are allowed. A '+' or '-' character before the numeric characters is also
allowed.

STRATOU
Convert a string into an unsigned word.
Input parameters FU32 Number of the string
Return parameters FU32 0 if successful, otherwise error
FU33 Resultant value
Space characters and tabulator characters at the beginning and end of the string
are allowed. A '+' character before the numeric characters is also allowed.

STRCAT
Combine two strings in a third string.
Input parameters FU32 Number of the first source string
FU33 Number of the second source string
FU34 Number of the destination string

FST Version 4.02.21 Manual 178


Return parameters FU32 0 if successful, otherwise error

STRCHECK
Memory check for the string memory.
Input parameters None
Return parameters FU32 0 if successful, otherwise error

STRCHGET
Extract an indexed character from a string.
Input parameters FU32 Number of the string
FU33 Character index,
1 for first character of the string
Return parameters FU32 0 if successful, otherwise error
FU33 Extracted character

STRCHSET
Replace an indexed character in a string.
Input parameters FU32 Number of the string
FU33 Character index, 1 for first character
FU34 Replacement character
in lower-order byte
Return parameters FU32 0 if successful, otherwise error

STRCI
Execute a CI command.
Input parameters FU32 Number of the string with the CI command
FU33 Number of the string for the result of the command
Return parameters FU32 0 if successful, otherwise error
The string resulting from the command must not be more than 80 characters long.
The result of the CI command is not interpreted.

STRCLR
Delete a string.
Input parameters FU32 Number of the string
Return parameters FU32 0 if successful, otherwise error
This is the same as clearing a string or reducing its length to 0.

STRCMP
Compare two strings character by character.
Input parameters FU32 Number of the first string
FU33 Number of the second string
Return parameters FU32 0 if successful, otherwise error
FU33 1 if characters in first string
> characters in second string
0 if both strings are identical
-1 if characters in first string
< characters in second string

Upper-case and lower-case letters are differentiated. Upper-case letters have a


lower value than lower-case letters.

STRCPY
Copy one string into another string.

FST Version 4.02.21 Manual 179


Input parameters FU32 Number of the source string
FU33 Number of the destination string
Return parameters FU32 0 if successful, otherwise error

STRDEL
Delete part of a string.
Input parameters FU32 Number of the string
FU33 Index for first character to be deleted,
1 for first character
FU34 Number of characters
Return parameters FU32 0 if successful, otherwise error

STRDUMP
Produce a debug output of a series of strings on the monitor of the IPC.
Input parameters FU32 Number of the first string
FU33 Number of the last string
Return parameters None
This module should not be used in normal operation. If necessary the extended CI
commands of the string driver can be used.

STRFILL
Create a string with a specified number of identical characters.
Input parameters FU32 Number of the string
FU33 Number of characters
FU34 Filler character
Return parameters FU32 0 if successful, otherwise error

STRFILLW
Fill a string with another string, right- or left-justified.
Input parameters FU32 Number of the string to be created
FU33 Number of characters for this string
>0 for right-justified
<0 for left-justified
FU34 Number of the string to be transferred
Return parameters FU32 0 if successful, otherwise error
If the length specified for the string to be created is too short, the resulting
string is truncated.

STRFINDC
Find a character in a string.
Input parameters FU32 Number of the string
FU33 Character to be found
Return parameters FU32 0 if successful, otherwise error
FU33 >0 position, 1 for first character
0 if character not found
STRFINDS
Find a substring in a string.
Input parameters FU32 Number of the string in which to search
FU33 Number of the substring to be found
Return parameters FU32 0 if successful, otherwise error
FU33 >0 position, 1 for first character
0 if substring not found
STRGROW

FST Version 4.02.21 Manual 180


Enlarge the string memory for a single string from the available memory.
Input parameters FU32 Number of the string
FU33 New maximum size of the string in characters
(without \0 at the end of the string)
Return parameters FU32 0 if successful, otherwise error
The existing string is retained unchanged. After this a string with a length up
to the maximum length set here can be written to the address determined with
STRADDR. Each other invocation of a string module can change the set value
again.

STRHTOA
Convert a word into a hexadecimal string.
Input parameters FU32 Value to be converted
FU33 Number of the string
Return parameters FU32 0 if successful, otherwise error
A '$' character is inserted before the four hexadecimal numeric characters.

STRICMP
Compare two strings character by character.
Input parameters FU32 Number of the first string
FU33 Number of the second string
Return parameters FU32 0 if successful, otherwise error
FU33 1 if characters in first string
> characters in second string
0 if both strings are identical
-1 if characters in first string
< characters in second string
There is no differentiation between upper- and lower-case letters.

STRINSRT
Insert a string into another string from a specified position.
Input parameters FU32 Number of the string into which the other
string is to be inserted
FU33 Position before which the string is to be inserted,
1 = before first character
FU34 Number of the string that is to be inserted
Return parameters FU32 0 if successful, otherwise error

STRINIT
Set the size of the memory for strings and the maximum number of strings, and
reinstate the initialisation values of the strings.
Input parameters FU32 Size of the string memory (minimum 1000)
FU33 Maximum number of strings (minimum 10)
Return parameters FU32 0 if successful, otherwise error

STRITOA
Convert a signed word into a string.
Input parameters FU32 Value to be converted
FU33 Number of the string
Return parameters FU32 0 if successful, otherwise error
If necessary a '-' character is inserted before the numeric characters.

STRLEFT

FST Version 4.02.21 Manual 181


Transfer the left substring of a specified length into a string.
Input parameters FU32 Number of the source string
FU33 Number of characters
FU34 Number of the destination string
Return parameters FU32 0 if successful, otherwise error
If the source string is shorter than the specified length, the source string is
copied.

STRLEN
Length of a string.
Input parameters FU32 Number of the string
Return parameters FU32 0 if successful, otherwise error
FU33 Length

STRLOWER
Convert a string to lowe r case.
Input parameters FU32 Number of the string
Return parameters FU32 0 if successful, otherwise error
Note! Country-specific characters like Ä, Ö, Ü are not converted.

STRMID
Convert a middle substring from a specified starting position and of a specified
length into a string.
Input parameters FU32 Number of the source string
FU33 Start character in the source string,
1 for the first character of the source string
FU34 Number of characters
FU35 Number of the destination string
Return parameters FU32 0 if successful, otherwise error
If the starting position is not found in the source string, a blank string is
produced. If the source string is too short, the destination string is shortened
accordingly.

STRNCMP
Compare the first characters of two strings.
Input parameters FU32 Number of the first string
FU33 Number of the second string
FU34 Number of characters
Return parameters FU32 0 if successful, otherwise error
FU33 1 if characters in first string
> characters in second string
0 if both strings are identical
-1 if characters in first string
< characters in second string
Upper-case and lower-case letters are differentiated. Upper-case letters have a
lower value than lower-case letters.

STRNICMP
Compare the first characters of two strings.
Input parameters FU32 Number of the first string
FU33 Number of the second string
FU34 Number of characters

FST Version 4.02.21 Manual 182


Return parameters FU32 0 if successful, otherwise error
FU33 1 if characters in first string
> characters in second string
0 if both strings are identical
-1 if character in first string
< character in second string
There is no differentiation between upper- and lower-case letters.

STRRIGHT
Transfer a right substring of a specified length to a string.
Input parameters FU32 Number of the source string
FU33 Number of characters
FU34 Number of the destination string
Return parameters FU32 0 if successful, otherwise error
If the source string is too short, the destination string is shortened
accordingly.

STRSTAT
Query the status of the string driver.
Input parameters None
Return parameters FU32 The set memory size for strings
FU33 Maximum number of strings
FU34 Memory used by strings
FU35 Free memory remaining

STRUPPER
Convert a string to upper case.
Input parameters FU32 Number of the string
Return parameters FU32 0 if successful, otherwise error
Note! Country-specific characters like ä, ö, ü are not converted.

STRUSAGE
Determine the amount of used and free memory for strings.
Input parameters None
Return parameters FU32 Memory used by strings
FU33 Free memory remaining

STRUTOA
Convert an unsigned word into a string.
Input parameters FU32 Value to be converted
FU33 Number of the string
Return parameters FU32 0 if successful, otherwise error

STR2FLAG
Copy a string into a flag word area.
Input parameters FU32 Number of the string
FU33 Maximum number of characters to be copied
FU34 Number of the flag word
Return parameters FU32 0 if successful, otherwise error
FU33 Number of characters actually copied

FLAG2STR
Copy a flag word area into a string.

FST Version 4.02.21 Manual 183


Input parameters FU32 Number of the string
FU33 Number of characters to be copied
FU34 Number of the flag word
Return parameters FU32 0 if successful, otherwise error
Each flag word contains two characters.
The STR2FLAG and FLAG2STR modules are particularly useful in conjunction with
the file modules FREAD and FWRITE when it is necessary to write strings to a
file. The specified flag word area is used for intermediate storage.

4.11 Screen and Keyboard


Version 1.02
The purpose of this driver is to allow the design of a simple, text- based operating interface
for projects using the FST IPC software, working directly on the IPC.
It is not intended to replace sophisticated user interfaces with this driver. In particular, there
are no graphical representations involved or complex windowing, nor even list boxes or
such features. The emphasis here is placed clearly on simplicity.
For many applications, however, a simple user interface of this kind is entirely adequate.
Typical projects, which may be able to use this user interface, would have only a small
number of displays for alphanumeric values and would allow only a few inputs or selections
to be made.

4.11.1 Introduction
The user interface is based on the familiar FST software. It has very much the same look-
and-feel as this does. It has a blue frame with a title for the work area, a message line and
eight function keys. The method of operating this user interface is similar to that of operat-
ing the FST.

The user interface is divided into individual screen pages. The various screen pages are
accessed via a number, beginning at 0. Each screen page contains a user- definable number
of fixed frames, text blocks, display areas and input fields. Switching from one screen page
to another is normally taken care of by the user program in the FST. There are appropriate
program modules, which deal with this.
All screen pages are independent of each other.
The amount of memory space provided allows for up to 50 screen pages, each with a maxi-
mum of 50 input fields.
All input fields use the string data type from the string driver. There are no dynamic displays.
It is an easy matter to create such displays, however, by invoking the SCRWRITE module.
It is possible to switch between the FST user interface provided by this driver and the com-
mand interpreter of the main runtime program (FSTPCR22).
If the necessary extra effort is made, it is also possible to set up special-purpose screen
representations (for example to suit particular customer requirements). There is a number of

FST Version 4.02.21 Manual 184


modules for this purpose, which disregard the conditions that otherwise generally, apply
and which access the screen and keyboard directly.

4.11.2 Operation of the user interface


The method of operating the user interface is based on that for the FST software. The table
below shows the functions of the keyboard but without the standard letters that are entered
in the respective input fields.

Keyboard Function
TAB Move to the next input field
ENTER
Down
Arrow

Shift- Move to the previous input field


TAB
Up arrow

HOME Move to the first input field

END Move to the last input field

BS In overtype mode: one character to the left; in insert mode: delete the char-
acter to the left of the cursor

Left One character to the left


arrow

Right One character to the right


arrow

INS Toggle between overtype mode (cursor is an underline character)


and insert mode (cursor is a block)

DEL Delete the character at the position of the cursor

Alt-F10 Switch to the screen of the main runtime program (can be deactivated)

Processing of the entry of ESC, F1 to F10, CTRL-UP ARROW, CTRL-DOWN ARROW, PAGE-UP,
PAGE-DOWN, CTRL- HOME, CTRL-END, CTRL-PAGE-UP and CTRL-PAGE-DOWN must be dealt
with by the user program.
All inputs of standard characters (letters and digits) are made directly into the various
strings that are provided for each input field.

4.11.3 Functionality
If necessary, strings assigned for input fields are shortened to the maximum length of the
defined input field. In the case of input fields for passwords, the length is reduced to zero
before editing; i.e. the string is deleted.
It is possible to switch between the FST user interface and the command interpreter of the
runtime main program. This can be done in two ways: either directly via the keyboard or by
the user program in the FST via the SCRFLIP module:
In the CI:
The F command switches to the current screen page.
FST Version 4.02.21 Manual 185
The D command switches to a specifiable page.
Switching by a program:
The SCRFLIP module switches between the current page of the user interface and the run-
time main program.
The SCRXCHG module switches between the pages of the user interface.
To switch to the screen of the main runtime program from the screen page itself:
Enter ALT-F10 on the keyboard (this function can be deactivated).
Note! The string driver is a prerequisite and is always used for handling strings.

4.11.3.1 Attributes
The FST software makes use of several standardised colour attributes for representing parts
of the screen. These standard attributes are accessible via a numbering system.

Number Attribute
0 Normal screen attribute
1 Highlighting screen attribute
2 Attribute of the frame
3 Attribute of edited fields
4 Attribute of function keys
5 Attribute of the message line
6 Attribute of the message line in the event of errors
In some cases the attribute can be freely chosen. It consists of one word (16 bits); its higher-
order byte contains the attribute and its lower-order byte must be equal to zero.

The higher-order byte contains the following:


Bits Use
0 to 7 Always 0
8 to 11 Foreground colour
0 = black,
1 = blue,
2 = green,
3 = cyan,
4 = red,
5 = magenta,
6 = brown,
7 = light grey,
8 = dark grey,
9 = light blue,
10 = light green,
11 = light cyan,
12 = light red,
13 = light magenta,
14 = yellow,
15 = white
12 to 14 Background colour
0 = black,
1 = blue,
2 = green,
3 = cyan,
4 = red,
5 = magenta,
6 = brown,
7 = light grey
FST Version 4.02.21 Manual 186
15 = 0 for normal display
= 1 for flashing display
This means, for example, that the attribute $9E (= $80 + $10 +$0E) is the attribute for flash-
ing display of yellow characters on a blue background.

4.11.3.2 Feature flags


The following properties can be set with the use of feature flags.

B V Meaning
i a
t l
u
e

0 0 ALT-F10 switching enabled


1 ALT-F10 switching disabled

1 0 Normal use of the keyboard


1 Direct reading of the keyboard for special applications

2 0 Normal use of the keyboard


1 Reading of the keyboard with handshake via SCRKBD

3 0 No automatic activation
1 Automatic activation (== ACTIVATE)

15 Set by the driver in the event of syntax errors


If bit 2 is set (handshake with SCRKBD), it must be ensured that all inputs will be picked up
by the user program because otherwise input will be blocked. Bit 15 is set by the driver
during processing of the initialisation data.

4.11.4 Configuring the driver and assigning parameters


If you want to use the screen driver in an FST IPC project, you must enter the SCREEN driver
in the driver configurer and assign the necessary parameters. The driver for the user inter-
face makes internal use of the driver for strings. This driver must therefore also be config-
ured.
IPC drive:
Specify the drive on which the screen driver SCREEN.EXE is located or onto which it is to be
loaded.
Screen type:
Here you must specify the type of video card that is connected:
CGA CGA card with 80x25 characters
MGA MGA card with 80x25 characters
HGC HGC card with 80x25 characters
EGA EGA card with 80x25 characters
VGA VGA card with 80x25 characters
BG20 BG20 on the IPC with 40x30characters
The default setting is CGA.

File with screen layout [.TXT]:


Here you must specify the name of the file that contains the data for initialising the user
interface.
FST Version 4.02.21 Manual 187
4.11.5 Initialising the user interface
In principle the user interface does not require any initialisation data because it can be
configured and parameterised entirely via modules during execution of the user program. It
is however considerably simpler and clearer, as well as being more economical with avail-
able space, to carry out initialisation with separate files intended solely for this purpose.

4.11.5.1 Initialising the user interface in text form


The text form supports the syntax described in the following. Each line may contain only one
statement relating to the screen layout. Lines beginning with a semicolon ‘;’ are comments.
Blank lines may be inserted to improve readability. A statement consists of one keyword and
a larger or smaller number of additional parameters, depending on the type of statement.
Additional comments after a complete statement in the same line as the statement itself are
allowed, but they must also begin with ‘;’.
There are two types of statement: initialisation statements and statements for the definition
of screen pages. Initialisation statements must always be placed before the statements for
screen pages. Numeric values must always be specified in decimal form. Strings are e n-
closed between single or double quotation marks, such as in ‘Text’ or "Text". Strings for the
titles of frames must contain the usual FST characters, such as in "[ Title ]".

Initialisation statements
ACTIVATE
Display on the screen is activated immediately after the project is loaded.

FEATURE_FLAGS <value>
The feature flags are set to the value that is passed here. As the feature flags also contain
the ACTIVATE flag, it is necessary either to leave out ACTIVATE or to place it after
FEATURE_FLAGS. The meanings of the individual bits of the feature flags are explained
above.

4.11.5.2 Statements for screen pages


SCREEN <string>
SCREEN_INITIAL <string>
Start of the definition of a screen page with its title. The SCREEN_INITIAL statement must
not be used more than once, because only one page can be the first page.

TEXT <X position> <Y position> <attribute> <string>


For display of non-varying text on the screen page. If the X position is negative, the text is
displayed such that the string ends at the specified position (right-justified).

TEXT_STRING <X position> <Y position> <attribute> <string number>


TEXT_SIGNED <X position> <Y position> <attribute> <flag word number>
TEXT_UNSIGNED <X position> <Y position> <attribute> <flag word number>
TEXT_HEXWORD <X position> <Y position> <attribute> <flag word number>
For display of the contents of a string or of a flag word as a signed value, an unsigned value
or a hexadecimal value. When the hexadecimal form is used, there are always 4 characters
displayed. Unwanted characters may need to be overwritten. A typical situation is display of
a short string at a position that previously contained a longer string.
If the X position is negative, the text is displayed such that the string ends at the specified
position (right- justified).

MESSAGE <string>
MESSAGE_ERROR <string>

FST Version 4.02.21 Manual 188


Display for the message line; a maximum of 78 characters. In the case of MESSAGE_ERROR
the display is made with the attribute for error messages.

FUNCTION_KEY <key number> <upper string> <lower string>


Strings for the upper and lower halves of a label for a function key, each consisting of up to
8 characters.

INPUT_STRING <X position> <Y position> <width> <string number>


INPUT_PASSWORD <X position> <Y position> <width> <string number>
Definition of a positioned input field. All inputs are made in strings. These must then be
evaluated by the user program by means of appropriate string functions. For details refer to
the description of the string driver. The width specified here is the maximum length of the
edited string, and the string number indicates the number of the string (in the string driver)
that is used for the edited string. When INPUT_PASSWORD is used, the contents of the
string are not displayed.

FRAME <X position> <Y position> <width> <height> <string for title>
For drawing a frame, positioned with the top left-hand corner (x,y) and a frame title. Even if
the title is blank it must be specified. The title must not be longer than the specified width
less two.
Example
Below is a simple example consisting of three screen pages for the production of an ex-
traordinarily important basic foodstuff for mankind.

; default settings
FEATURE_FLAGS 1
ACTIVATE

; screen 0, first screen


SCREEN_INITIAL "[ Chewing Gum Production ]"
TEXT 30 10 0 "Chewing Gum Production is Ready"
FUNCTION_KEY 1 "START" ""

; screen 1, interrogation of production quantity


SCREEN "[ Chewing Gum Production ]"
TEXT 20 10 0 "How many?"
INPUT_STRING 45 10 5 1
FUNCTION_KEY 1 "START" "SYSTEM"
FUNCTION_KEY 2 "STOP" "SYSTEM"

; screen 2, error
SCREEN "[ Chewing Gum Production ]"
TEXT 20 10 1 "Production Interrupted"
MESSAGE_ERROR "Nothing Works Without Gum"
FUNCTION_KEY 1 "continue" ""
Switching between the individual screen pages and evaluation of the input of the production
quantity takes place within the control program and is not shown here.

4.11.6 Extended CI commands for the user interface


This driver includes a command interpreter add-on to allow operation of the user interface
via the command interpreter.

FST Version 4.02.21 Manual 189


The additional commands are as follows:
!4F Toggle between the user interface and the screen of the main runtime program
(flip display).
Within the user interface you can switch back to the screen of the main runtime program via
the keyboard by pressing ALT-F10 (this function can be deactivated). The response returned
is "=0" when the system switches to the screen of the runtime main program, and "=1" is
returned when the system switches to the screen of the user interface.

!4Dx Select screen page x.


The response returned is "=0" if it was not possible to select the page, whereas "=1" is
returned if the system succeeds in switching to the specified screen of the user interface.

!4S Status output.


If the screen of the main runtime program is currently displayed, the response that is re-
turned is "=0,<feature flags>,<number of pages>". If a page of the user interface is displayed,
the response is "=1,<feature flags>,<number of pages>,<page number>".
In these commands, "!4" is the prefix for a CI call in a driver; in this case it is in driver 4 for
the user interface.

4.11.7 Modules for accessing the user interface


There is a number of ready- prepared modules that can be used for operating the user
interface. These must be imported into a project in the usual way, where they can be used
as CFMs or CMPs.

Overview of modules
SCRATTR Calculate screen attribute
SCRCLEAR Clear screen
SCRCUGPO Determine current position of cursor
SCRCUSPO Set current position of cursor
SCRCUTYP Set cursor type
SRCDOKEY Execution of a keyboard input
SCREDIT Add an input field
SCREKBD Clear keyboard buffer
SCRFILL Fill an area with space characters
SCRFKEY Specify the label of a function key
SCRFLAGS Set feature flags
SCRFLIP Toggle between screen page a nd FST CI
SCRFRAME Draw a frame
SCRKBD Interrogate the last input on the keyboard
SCRMSG Display a string in the message line
SCRNEW Draw a new, blank screen
SCRPUTS Write a string at a set position on the screen
SCRUPDT Refresh screen contents
SCRWRITE Write a string at a set position on the screen
SCRW0808 8x8 block characters
SCRW0814 8x14 block characters
SCRXCHG Switch between screen pages
The SCRCLEAR and SCRPUTS modules should not be used unless absolutely necessary
because they circumvent the check for an activated screen page.
SCRATTR
Calculate screen attribute
Input parameters FU32 Foreground colour
FU33 Background colour
FST Version 4.02.21 Manual 190
FU34 Flashing option if not equal to 0
Output parameters FU32 Attribute

SCRCLEAR
Clear screen.
Input parameters None
Output parameters None
This module should be used for special applications only and also works on the screen of
the runtime main program. The module is not necessary for normal applications.

SCRCUGPO
Determine current position of cursor.
Input parameters None
Output parameters FU32 X starting position, column, 0 to 79,
in the case of errors -1
FU33 Y starting position, line, 0 to 23,
in the case of errors -1
This module should be used for special applications only and also works on the screen of
the runtime main program. The module is not necessary for normal applications.

SCRCUSPO
Set current position of cursor.
Input parameters FU32 X starting position, column, 0 to 79
FU33 Y starting position, line, 0 to 23
Output parameters None
This module should be used for special applications only and also works on the screen of
the runtime main program. The module is not necessary for normal applications.

SCRCUTYP
Set cursor type.
Input parameters FU32 0 = No cursor
1 = Underline cursor
2 = Block cursor
Output parameters None
This module should be used for special applications only and also works on the screen of
the runtime main program. The module is not necessary for normal applications.

SCRDOKEY
Execution of a keyboard input.
Input parameters FU32 Keyboard input
Output parameters None
This module should be used for special applications only and also works on the screen of
the runtime main program. The module is not necessary for normal applications.

SCREDIT
Add an input field.
Input parameters FU32 X position
FU33 Y position
FU34 Width
FU35 = 0, standard input field
= 1, input field for password (string not visible)
FU36 String number
Output parameters FU32 = 0 if display appears

FST Version 4.02.21 Manual 191


= -1 if the position is not admissible, the string does
not exist or the user interface is not activated
Before editing is carried out, the string that is passed is shortened to the maximum length
as specified in width. In the case of non-visible strings for passwords, the string is deleted
before editing (length 0). The SCREDIT module adds an input field to the current screen. This
is not retained after switching to a different screen page, however.

SCREKBD
Clear keyboard buffer
Input parameters None
Output parameters None

SCRFILL
Fill an area with space characters.
Input parameters FU32 X starting position, column, 0 to 79
FU33 Y starting position, line, 0 to 24
FU34 Width, >= 1
FU35 Height, >= 1
FU36 Attribute
Output parameters FU32 = 0 if display appears
= -1 if position is not admissible or
the user interface is not activated

SCRFKEY
Specify the label of a function key.
Input parameters FU32 Number of the function key, 1 to 8
FU33 Number of the string for the upper half of the
function key
FU34 Number of the string for the lower half of the function
key
Output parameters FU32 = 0 if display appears
= -1 if the string does not exist, the number of the
function key is not admissible or the user interface is
not activated
Each function key has an upper and a lower string. Each string may contain up to 8 charac-
ters.

SCRFLAGS
Set properties of the user interface (feature flags).
Input parameters FU32 0 = Interrogate current setting
1 = New setting
If FU32 = 1 FU33 Feature flags
Output parameters FU32 Current setting of the feature flags
The basic setting is 0.

SCRFLIP
Toggle the screen display between the currently selected screen page in this driver and the
screen of the main runtime program FSTPCR22.
Input parameters FU32 0 FSTPCR22 screen
1 Currently selected screen page in this driver
Output parameters None

SCRFRAME

FST Version 4.02.21 Manual 192


Draw a frame.
Input parameters FU32 X starting position, column, 0 to 78
FU33 Y starting position, line, 0 to 23
FU34 Width, >= 2
FU35 Height, >= 2
Output parameters FU32 = 0 if display appears
= -1 if position is not admissible or
the user interface is not activated
SCRKBD
Interrogate the last input on the keyboard.
Input parameters None
Output parameters FU32 = 0 if no input is available
<>0 last input
Currently the following inputs are supported.
Key Hexadecimal Low-order byte
Decimal
ESC 001B 27 Character codes
F1 013B 315 Scan codes
F2 013C 316
F3 013D 317
F4 013E 318
F5 013F 319
F6 0140 320
F7 0141 321
F8 0142 322
F9 0143 323
F10 0144 324
PAGE UP 0149 329
PAGE DOWN 0151 337
CTRL ARROW LEFT 0173 371
CTRL ARROW RIGHT 0174 372
CTRL END 0175 373
CTRL PAGE DOWN 0176 374
CTRL HOME 0177 375
CTRL PAGE UP 0184 388
If direct reading of the keyboard is activated (feature flags bit 1 = 1), all inputs are returned
without processing. Normal processing can be carried out using the SCRDOKEY module.

SCRMSG
Display a string in the message line, optionally as an error message.
Input parameters FU32 Number of the string to be displayed
FU33 0 for normal display
1 for an error message
Output parameters FU32 = 0 if display appears
= -1 if the string does not exist or
the user interface is not activated
To delete the message line, use a blank string.

SCRNEW
Draw a new, blank screen in the same way as FST.
Input parameters None
Output parameters None

FST Version 4.02.21 Manual 193


This module should only be used if the option of initialisation is not used but instead the
screen is built directly by programming in the user program.

SCRPUTS
Write a string at a set position on the screen.
Input parameters FU32 Number of the string to be displayed
FU33 X starting position, column, 0 to 79
FU34 Y starting position, line, 0 to 24
FU35 0 for normal display
1 for highlighted display
Output parameters FU32 = 0 if display appears
= -1 if the string does not e xist, the position is invalid
or the user interface is not activated
This module should be used for special applications only and also works on the screen of
the runtime main program. The module is not necessary for normal applications.

SCRUPDT
Refresh screen contents.
Input parameters None
Output parameters None
The only items redisplayed are data from the operand memory and strings, but not edited
strings.

SCRWRITE
Write a string at a set position on the screen
Input parameters FU32 Number of the string to be displayed
FU33 X starting position, column, 0 to 79 or negative
FU34 Y starting position, line, 0 to 24
FU35 0 for normal display
1 for highlighted display
Output parameters FU32 = 0 if display appears
= -1 if the string does not exist, the position is invalid
or the user interface is not activated
If the X position is negative, the string is displayed in such a way that it ends at the specified
position (right-justified).

SCRW0808
Write a string comprising large 8x8 block characters at a set position on the screen.
Input parameters FU32 Number of the string to be displayed
FU33 X starting position, column, 0 to 72 or negative
FU34 Y starting position, line, 0 to 14
FU35 0 for normal display
1 for highlighted display
Output parameters FU32 = 0 if display appears
= -1 if the string does not exist, the position is invalid
or the user interface is not activated
If the X position is negative, the string is displayed in such a way that it ends at the specified
position (right-justified). Internally the module uses the string with the number 0 as an
interim storage location.

SCRW0814
Write a string comprising large 8x14 block characters at a set position on the screen.
Input parameters FU32 Number of the string to be displayed

FST Version 4.02.21 Manual 194


FU33 X starting position, column, 0 to 72 or negative
FU34 Y starting position, line, 0 to 8
FU35 0 for normal display
1 for highlighted display
Output parameters FU32 = 0 if display appears
= -1 if the string does not exist, the position is invalid
or the user interface is not activated
If the X position is negative, the string is displayed in such a way that it ends at the specified
position (right-justified). Internally the module uses the string with the number 0 as an
interim storage location.

SCRXCHG
Switch between the predefined screen pages in the driver.
Input parameters FU32 Number of the screen page,
indexing from 0
Output parameters None
The predefined screen pages are transferred from the project on startup of the runtime main
program. This module does not switch (flip) between the screen page of the user interface
and the screen of the runtime main program.

4.11.8 Complete example


A complete (though simple) example of the application of the user interface is shown below.
It relates to a hypothetical production plant for chewing gum. The program uses four screen
pages.

Screen Purpose and program status

0 Basic screen for STEP screen_0


1 Ask for production quantity in STEP screen_1
2 Status of production in STEP screen_2, production is simulated using timer
T0
3 Screen for system fault in STEP screen_3
The script for the definition of the screen pages is given below.

; default settings
FEATURE_FLAGS 1
ACTIVATE

; screen 0
SCREEN_INITIAL "[ Chewing Gum Production ]"
TEXT 20 7 0 "The Most Important Food in the World"
TEXT 30 10 40704 " CHEWING GUM "
TEXT 22 15 0 "Chewing Gum Production is Ready."
FUNCTION_KEY 1 "START" ""

; screen 1
SCREEN "[ Chewing Gum Production ]"
TEXT 15 10 0 "How many?"
INPUT_STRING 30 10 5 1
FUNCTION_KEY 1 "START" ""

; screen 2
SCREEN "[ Chewing Gum Production ]"
FST Version 4.02.21 Manual 195
TEXT 25 9 0 "requested"
TEXT 25 11 0 "produced"
TEXT_UNSIGNED -42 9 0 1
FUNCTION_KEY 2 "STOP" ""

; screen 3
SCREEN "[ Chewing Gum Production ]"
TEXT 26 10 1 "Missing Liquid Rubber."
MESSAGE_ERROR " No Chewing without Rubber."
FUNCTION_KEY 1 "continue" ""

In the basic settings it is established that it is not to be permitted to switch from a screen
page to the screen of the runtime main program. As far as the plant operating staff is con-
cerned, therefore, the CI is not accessible. For the automation engineer, on the other hand,
the CI can be reached at any time via a connected host. The program for the production
plant is listed below. It was not considered necessary to show the allocation list in this
context.

0001 "" Chewing Gum Production


0002
0003 "" a trivial example for string and screen driver
0004
0005 "" Dr. F. Haase, D 40597 Düsseldorf
0006
0007
0008 "" -----------------------------------------------------------------------
0009
0010 STEP Init (1) " some initial settings
0011
0012 THEN LOAD K315 " value for F1 key
0013 TO F1_KEY 'value for F1 key
0014
0015 LOAD K316 " value for F2 key
0016 TO F2_KEY 'value for F2 key
0017
0018 LOAD K0 " value of zero
0019 TO ZERO 'zero value
0020
0021
0022 "" -----------------------------------------------------------------------
0023
0024 STEP Screen_0 (2) " initial screen
0025
0026 THEN CMP 1 'SCRKBD
0027
0028 LOAD PARAM_1 'returned parameter 1
0029 TO KEYSTROKE 'the obvious
0030
0031 IF KEYSTROKE 'the obvious
0032 = F1_KEY 'value for F1 key
0033
0034 THEN LOAD ZERO 'zero value
0035 TO AMOUNT 'amount to produce

FST Version 4.02.21 Manual 196


0036 TO NPRODUCED 'produced so far
0037
0038 CMP 2 'SCRXCHG
0039 WITH K1 " flip to screen 1
0040
0041
0042 "" -----------------------------------------------------------------------
0043
0044 STEP Screen_1 (3) " request amount
0045
0046 THEN CMP 1 'SCRKBD
0047
0048 LOAD PARAM_1 'returned parameter 1
0049 TO KEYSTROKE 'the obvious
0050
0051 IF KEYSTROKE 'the obvious
0052 = F1_KEY 'value for F1 key
0053
0054 THEN CMP 5 'STRATOU
0055 WITH K1 "convert user input in string 1
0056
0057 LOAD PARAM_1 'returned parameter 1
0058 TO NERROR "0 if a valid unsigned number
0059
0060 LOAD PARAM_2 'returned parameter 2
0061 TO AMOUNT "user input value, amount to produce
0062
0063 IF " ? user input valid
0064 ( NERROR 'error flag word
0065 = ZERO ) " has to be zero
0066 AND ( AMOUN 'amount to produce
0067 > ZERO ) " should be > 0
0068
0069 THEN CMP 2 'SCRXCHG
0070 WITH K2 " flip to screen 2
0071
0072 " timer 0 for production simulation
0073 LOAD K100 " 1 sec
0074 TO TV0 " to produce a single chewing gum
0075
0076 SET T0 " start timer (i.e. production)
0077
0078
0079 "" -----------------------------------------------------------------------
0080
0081 STEP Screen_2 (4) " production display
0082
0083 THEN CMP 1 'SCRKBD
0084
0085 LOAD PARAM_1 'returned parameter 1
0086 TO KEYSTROKE 'the obvious
0087
0088 IF KEYSTROKE 'the obvious

FST Version 4.02.21 Manual 197


0089 = F2_KEY 'value for F2 key
0090
0091 " stop production
0092 THEN CMP 2 'SCRXCHG
0093 WITH K0 " flip to screen 0
0094
0095 JMP TO Screen_0 (2)
0096
0097 IF N T0 " 1 sec elapsed, simulate production
0098
0099 THEN INC NPRODUCED 'produced so far
0100
0101 CMP 3 'STRUTOA
0102 WITH NPRODUCED 'produced so far
0103 WITH K2 " to string 2
0104
0105 CMP 4 'SCRWRITE
0106 WITH K2 " string 2
0107 WITH K-42 " X
0108 WITH K11 "Y
0109 WITH K1 " highlighted attribute
0110
0111 SET T0 " start again
0112
0113 IF " ? done
0114 NPRODUCED 'produced so far
0115 > AMOUNT 'amount to produce
0116
0117 THEN CMP 2 'SCRXCHG
0118 WITH K0 " flip to screen 0
0119
0120 JMP TO Screen_0 (2) " done, back
0121
0122 IF PLANTERR'error in plant
0123
0124 THEN CMP 2 'SCRXCHG
0125 WITH K3 " flip to screen 3
0126
0127
0128 "" -----------------------------------------------------------------------
0129
0130 STEP Screen_3 (5) " error display
0131
0132 THEN CMP 1 'SCRKBD
0133
0134 LOAD PARAM_1 'returned parameter 1
0135 TO KEYSTROKE 'the obvious
0136
0137 IF ( KEYSTROKE 'the obvious
0138 = F1_KEY ) 'value for F1 key
0139
0140 AND N PLANTERR'error in plant
0141

FST Version 4.02.21 Manual 198


0142 THEN CMP 2 'SCRXCHG
0143 WITH K2 " flip to screen 2
0144
0145 SET T0 " restart timer
0146
0147 JMP TO Screen_2 (4) " continue production

In the example, the steps and the screens are synchronised with each other. In real-world
situations a somewhat more complex method of synchronising will be required. In such
cases it is worth separating the actual automation tasks and representation on the screen
into two different programs. In order to save on computing time for screen display, the
program for this can be started as a cyclical program, for example every 500 msec (cf. func-
tion module F4).

4.11.9 Special applications


For the purposes of this driver for user interfaces, special applications are applications
where representation and operation do not follow the rules of the FST software but instead
are supposed to follow different rules, which are usually customer-specific. Bit 1 must be set
in the FEATURE_FLAGS. This is done with the SCRFLAGS module. Representation on the
screen is then created with two modules.
SCRCLEAR Clear screen
SCRCUGPO Determine current position of cursor
SCRCUSPO Set current position of cursor
SCRCUTYP Set cursor type
SCRPUTS Write a string at a set position on the screen

These modules should be used for special applications only and also work on the screen of
the runtime main program. The modules are not necessary for normal applications.
The module for keyboard interrogation returns all inputs from the keyboard.

SCRKBD Interrogate the last input on the keyboard


You can be returned to normal further processing via the SCRDOKEY module.

SCRDOKEY Process input from the keyboard

4.12 32-Bit Arithmetic


These modules allow performing arithmetic operations on 32 bit values that are hold in two
16-bit FST operands.

Overview
LADD Addition of 32-bit values.
LCMP Comparison of 32-bit values.
LDIV Division of 32-bit values.
LMUL Multiplication of 32-bit values.
LNEG Change of sign for a 32-bit value.
LSUB Subtraction of 32-bit values.

LADD
Addition of 32-bit values.
Input parameters FU32 Low word of the 1st operand
FU33 High word of the 1st operand
FST Version 4.02.21 Manual 199
FU34 Low word of the 2nd operand
FU35 High word of the 2nd operand
Output parameters FU32 Low word of the result
FU33 High word of the result

LCMP
Comparison of 32-bit values.
Input parameters FU32 Low word of the 1st operand
FU33 High word of the 1st operand
FU34 Low word of the 2nd operand
FU35 High word of the 2nd operand
Output parameters FU32 Result in bit form
$xx01 1st operand < 2nd operand (signed)
$xx02 1st operand == 2nd operand (signed)
$xx04 1st operand > 2nd operand (signed)
$01xx 1st operand < 2nd operand (unsigned)
$02xx 1st operand == 2nd operand (unsigned)
$04xx 1st operand > 2nd operand (unsigned)
LDIV
Division of 32-bit values (result = 1st operand / 2nd operand).
Input parameters FU32 Low word of the 1st operand
FU33 High word of the 1st operand
FU34 Low word of the 2nd operand
FU35 High word of the 2nd operand
Output parameters FU32 Low word of the result
FU33 High word of the result

LMUL
Multiplication of 32-bit values.
Input parameters FU32 Low word of the 1st operand
FU33 High word of the 1st operand
FU34 Low word of the 2nd operand
FU35 High word of the 2nd operand
Output parameters FU32 Low word of the result
FU33 High word of the result

LNEG
Change of sign for a 32-bit value.
Input parameters FU32 Low word of the operand
FU33 High word of the operand
Output parameters FU32 Low word of the result
FU33 High word of the result

LSUB
Subtraction of 32-bit values (result = 1st operand - 2nd operand).
Input parameters FU32 Low word of the 1st operand
FU33 High word of the 1st operand
FU34 Low word of the 2nd operand
FU35 High word of the 2nd operand
Output parameters FU32 Low word of the result
FU33 High word of the result

FST Version 4.02.21 Manual 200


4.13 Incremental Encoder
This program module has been designed to use the incremental encoder module IM2x for
your FST IPC projects.
Import
The module IM2X needs to be imported to your project as a program module (e.g. CMP 0).
Functions of the IM2x module

Overview
Function (passed in FE33)
-1 Init/Reset counters
0 Read counter registers (values)
1 Load counter 1 with new value
2 Load counter 2 with new value
3 Load counter 3 with new value

4.13.1 Init/Reset
Input parameters FU32 KSW setting (1 or 2)
FU33 -1
FU34 Operating mode (see table below)
Output parameters FU32 Current status of counter 1
FU33 Current status of counter 2
FU34 Current status of counter 3
The numbers 1, 2 and 4 in the following table refer to 1-, 2- or 4-edge counting on the given
channel. If only a single number is specified for two channels this means that they are cas-
caded.
Please consult the IM20/IM21 data sheets for more details and operating modes. It is,
however, not possible to use the IRQ possibilities of the IM2x hardware with this software
module.

Mode (hex) Channel 1 Channel 2 Channel 3


$1124 1 1 1
$1125 2 1 1
$112D 2 2 1
$116D 2 2 2
$1126 4 1 1
$112E 4 2 1
$116E 4 2 2
$1136 4 4 1
$1176 4 4 2
$11B6 4 4 4
$1320 1 1
$1360 1 2
$13A0 1 4
$1321 2 1
$1361 2 2
$13A1 2 4
$1322 4 1
$1362 4 2
$13A2 4 4

4.13.2 Read counter registers (values)


Input parameters FU32 KSW setting (1 or 2)
FST Version 4.02.21 Manual 201
FU33 0
Output parameters FU32 Current status of counter 1
FU33 Current status of counter 2
FU34 Current status of counter 3

4.13.3 Load counter 1 with new value


Input parameters FU32 KSW setting (1 or 2)
FU33 1
FU34 New given counter value for counter 1
Output parameters FU32 Current status of counter 1
FU33 Current status of counter 2
FU34 Current status of counter 3

4.13.4 Load counter 2 with new value


Input parameters FU32 KSW setting (1 or 2)
FU33 2
FU34 New given counter value for counter 1
Output parameters FU32 Current status of counter 1
FU33 Current status of counter 2
FU34 Current status of counter 3

4.13.5 Load counter 3 with new value


Input parameters FU32 KSW setting (1 or 2)
FU33 3
FU34 New given counter value for counter 3
Output parameters FU32 Current status of counter 1
FU33 Current status of counter 2
FU34 Current status of counter 3

FST Version 4.02.21 Manual 202


4.14 Fast counters
The last two inputs of the second group of the FEC Compact (I1.2 and I1.3) as well as the
first two inputs of HC0x (I0.0 and I0.1) can be used as 1 or 2 independent, high-speed
counters. Still the inputs can be read as standard inputs. For the FEC Standard series the
following inputs are used:

FC4xx, FC5xx - I1.6 and I1.7


FC6xx - I3.6 and I3.7
These counters are interrupt driven and once activated, operate independently of the user’s
control programs and therefore are not affected by factors such as control program scan
time.

4.14.1 Using the module FECCNTR


The program module provides functions for:
• Defining the operating parameters of each Counter
• Activating each Counter
• Resetting each Counter
• Checking the status and current value of each Counter
• Upon achieving the preset value, the fast counter module can be configured to e i-
ther:
• Modify an output word (OW)
• Start a defined program
• Modify an output word (OW) and Start a defined program.
Each fast counter can be independently defined for automatic or manual restarting.

4.14.2 Required drivers


You need to include the driver FECCCNTR to you driver configuration of your project. And use
the "Import Module" function to add the FECCNTR module to your control project.
Using the Fast Counter Module
The Fast Counter module is easily accessed from either Statement List or Ladder Diagram
programs using conventional FST program module syntax. The following sections present
the various functions provided by the Fast Counter module.

4.14.3 Reset of a Fast Counter


input parameters FU32 0 = reset of counter defined in FU33
FU33 0 = counter 0
1 = counter 1
output parameters none
This function provides a means to deactivate a Fast Counter. No harm will occur if a non-
active Fast Counter is Reset.
Example:
IF ... " User defined conditions
THEN SET CMPx " Call Fast Counter module
WITH V0 " Specify RESET function
WITH Vy " Specify which Fast Counter:
" y=0: first counter
" y=1: second counter

4.14.4 Defining the operation of a Fast Counter


input parameters FU32 1 = parameter settings of counter defined in FU33
(only possible if the counter is inactive)

FST Version 4.02.21 Manual 203


FU33 0=first counter
1=second counter
FU34 counter preselect value
(16-bit decimal or HEX)
(range 0 ...65535, $0...$FFFF)
FU35 define desired action when
preselected count value is reached.
0 = no activities (default)
1 = modify an output word
2 = start a program
3 = start a program and modify an output word
FU36 high byte = program number
low byte = output word number
All values must be specified in HEX.
Example:
program no. 12, output word no. 0: $0C00
FU37 high byte = output mask
low byte = value (set or reset)
All values must be specified in HEX.
Example:
set output x.7, outputs x.0...x.6 unchanged: $8080
set output x.7, outputs x.0...x.6 are reset: $FF80
FU38 0 = no automatic restart of a counter
1 = automatic restart of a counter
output parameters none
This function provides the means to define how each of the Fast Counters will operate. This
function should only be called before a Fast Counter is activated or use the Reset function
prior to calling this function.
Each valid input signal pulse is summed and upon reaching this preselect value, the action
defined in parameter 4 will be performed. Four choices are permitted:
No action is taken.
2. A specified digital output word (OW) is be modified
3. A specified Statement List or Ladder Diagram program is started
A specified digital output word is modified AND a specified program is started.

Parameter 5 serves to further define the action(s) specified in parameter 4. This parameter
must be specified in hexadecimal format whereby the high byte indicates the program
number (to start) and the low byte indicates the output word to be modified. If parameter 4
<> V3, then either or both unused bytes are simply ignored.

Examples:
V$0600 specifies output word (OW) 0 and program 6.
V$0901 specifies output word (OW) 1 and program 9.
Parameter 6 only has meaning if Parameter 5 was assigned a value of 1 or 3, indicating that
a defined output word (OW) is to be modified when the defined Fast Counter reaches the
preselect value.
This parameter must be specified in hexadecimal format whereby the high byte indicates the
output "mask" to apply while the low byte, which bits within the specified output word
(OW) are to be Set or Reset. By separating these values, the user can separately specify
which bits are enabled or disabled from modification.

FST Version 4.02.21 Manual 204


Examples:
V$8080 Set output x.7, leave outputs x.0 - x.6 untouched
V$FF01 Set output x.0, reset outputs x.1 - x.7
Parameter 7 allows the programmer to decide whether or not the specified Fast Counter
should be automatically restarted after having reached the preselected value.

4.14.5 Starting a Fast Counter


input parameters FU32 2= start of counter defined in FU33
FU33 0 = first counter
1 = second counter
output parameters none
This function provides a means to activate a Fast Counter. Before this function is called, the
Fast Counter should first be defined.
Note! If you have started a Fast Counter (without Auto-Restart enabled) and the counter
value reaches the preselect value, you must Reset the counter before attempting to start the
counter again.

4.14.6 Status of a Fast Counter

input parameters FU32 3 = status of counter defined in FU33


FU33 0 = first counter
1 = second counter
return parameters FU32 Status
0 = counter active
1 = counter inactive
FU33 current fast counter value
FU34 always 0
This function allows the application program to check the status of a Fast counter.
The status will be equal to V1 in only if ALL of the following conditions are true: The Fast
Counter has been configured AND the preselected count was reached AND Auto-Restart is
NOT enabled. In all other cases FU32 returns V0.

Example:
IF ... " User defined conditions
THEN SET CMPx " Call Fast Counter module
WITH V3 " Specify Status function
WITH Vy " Specify which Fast Counter to check
" Now check results...
IF (FU32 = V0) " Then counter is still active
THEN ... " User defined actions
LOAD FU33 " Get current counter value and
TO R21 " Save it in Register 21

4.15 Positioning
This program module adds support for stepper and servo motors (AM1x and AM20) to your
FST IPC projects.

4.15.1 Import
Import the module AMXX into your project using Project Management - > Import File etc. You
now have available a function module which expects some input (up to 7 integers) and
produces some output (up to 7 integers) via FU32 .. FU38.

FST Version 4.02.21 Manual 205


The module does not really check whether the given parameters fall within the allowed
value range. You will have to look into the current AM1x and AM20 documentation to get an
idea about allowed ranges.

4.15.2 How to use the module


The first input parameter is always the command number (i.e. 0 for get status, 1 for move
absolute, 2 for move relative etc.), the second parameter is always the motor number.
Supported are motor numbers from 1 up to 12, where motor 1 will always correspond to S0
on the module with switch selector 1, motor 2 will always correspond to S1 on the module
with switch selector 1, motor 3 will always correspond to S0 on the module with switch
selector 2 etc.

Motor KSW Label


1 1 S0
2 1 S1
3 2 S0
4 2 S1
... ... ...
11 6 S0
12 6 S1

The first return parameter (FU32) is always a status value.


Additional parameters are returned if the command was a request for information.

4.15.3 Overview
FU32 Function
0 Get status
1 Move absolute
2 Move relative
3 Reference move
4 Override speed
10 Configure polarity
11 Configure start speed and acceleration
12* Set PID values
13 Set actual position
14* Set positioning parameters
15* Set DA output polarity (AM20 < S2.2)
16* Set P division (AM20 > S2.2)
17* Polarity for counting of increments (AM20 >= 2.2)
18* Multiply acceleration by 16 (AM20 >= 2.3)
19* Set Offset for D/A converter
20 Reset module
21 Stop motor
22* Enable or disable motor
23* Delete contouring error
30 Get revision
31 Get speeds / target position
32 Get polarity and PID parameters
33 Get status for AM20 user
40 Move with interpolation I
41 Move with interpolation II

FST Version 4.02.21 Manual 206


4.15.4 Get status
Input parameters FU32 0
FU33 Motor number
Output parameters FU32 Status (see Table 1)
FU33 Switch status (see Table 2)
FU34 Extended status, (see Table 3)
FU35 Low word of current position
FU36 High word of current position
AM20 only FU37 In position status (see Table 4)
AM20 only FU38 Current contouring error

Table 1: Status return values


Value Description
-1 No module present for motor number
0 Motor is stopped
1 Motor is moving
2 Reference move is active

Table 2: Switch status


Bit Description
0 0= Limit switch X (AM1x) or + (AM20) inactive
1= Limit switch X (AM1x) or + (AM20) activated

1 0= Limit switch Y (AM1x) or - (AM20) inactive


1= Limit switch Y (AM1x) or - (AM20) activated

2 0= Reference switch inactive


1= Reference switch activated

Table 3: Extended status


Bit Description

0 0= move direction positive


1= move direction negative

1 0= Linear ramp
1= no ramp (move with starting frequency without ramp)

2 0= Reference move is inactive / finished


1= Reference move is active

3 0= Reset is finished
1= Reset is active

4 0= Brake ramp terminated


1= Brake ramp active
1= Parameter error (after axis has started moving)

5 0= No limit switch r error


1= Limit switch r error is active

6 0= Relative move to actual position


1= Absolute move
FST Version 4.02.21 Manual 207
7 0= Axis is at a standstill
1= Axis is moving

Table 4: In position status / Contouring error / Enable (AM20 only)


Bit Description
0 Bit is set if axis is within position window
Bit is set if axis has contouring error greater than specified maximum

4.15.5 Move absolute


Input parameters FU32 1
FU33 Motor number
FU34 Low word of new position (steps / increments)
Range: 0-65535
FU35 High word of new position (steps / increments)
Range: -128 - +127
FU36 Moving speed
Range / [unit] AM10:
- 0-32000 / [steps / sec]
Range / [unit] AM11:
- 0-16000 / [steps / sec]
Range / [unit] AM20:
- 0-32767 ; [10* incr/sec] < S2.3
- 0-65535 ; [10* incr/sec] >= S2.4
Output parameters FU32 Status (see Table 1)
FU33 Extended status (see Table 3)

4.15.6 Move relative


Input parameters FU32 2
FU33 Motor number
FU34 Low word of relative position (steps / increments)
Range and unit see absolute move
FU35 High word of relative position (steps / increments)
Range and unit see absolute move
FU36 Maximum speed
Range and unit see absolute move
FU37 Direction
1 = positive
-1 = negative
Output parameters FU32 Status (see Table 1)
FU33 Extended status (see Table 3)

4.15.7 Reference move


Input parameters FU32 3
FU33 Motor number
FU34 Speed for reference move
Range and unit see absolute move
FU35 Direction (see Table 5)
Output parameters FU32 Status (see Table 1)
FU33 Extended status (see Table 3)
Important: the speed given for the reference move will be used for the entire movement.
This means you have to give a speed that is suitable as a start/stop frequency since there is
no ramp applied to the reference move.
FST Version 4.02.21 Manual 208
Table 5: Reference move options
Value Description

1 move in positive direction until reference switch reached

-1 move in negative direction until reference switch reached

2 move in positive direction until reference switch reached,


then move in negative direction until reference switch freed

-2 move in negative direction until reference switch reached,


then move in positive direction until reference switch freed

3 move in positive direction until reference switch reached,


then move in positive direction until reference switch freed

-3 move in negative direction until reference switch reached,


then move in negative direction until reference switch freed

4.15.8 Override Speed


Input parameters FU32 4
FU33 Motor number
FU34 Override (0% ... 100%)
Output parameters FU32 Status (see Table 1)

4.15.9 Configure polarity


Input parameters FU32 10
FU33 Motor number
FU34 Polarity of digital outputs, only AM10 and AM11.
Value for AM20 is always "0"
0 = active low
1 = active high
FU35 Polarity of limit switches
0 = normally closed
1 = normally opened
FU36 Polarity of reference switch
0 = normally closed
1 = normally opened
Output parameters FU32 Status (see Table 1)

4.15.10 Configure start speed and acceleration


Input parameters FU32 11
FU33 Motor number
FU34 Start speed
Range / [unit] AM10:
- 0-32000 / [steps / sec]
Range / [unit] AM11:
- 0-16000 / [steps / sec]
Range / [unit] AM20:
- 0-32767 ; [10* incr/sec]
FU35 Acceleration / Deceleration
Range / [unit] AM10, AM11:
FST Version 4.02.21 Manual 209
- 0-32767 / [10*steps / sec²]
Range / [unit] AM20:
- 0-32767 ; [10* incr/sec²] < S2.3
- 0-65535 ; [10* incr/sec²] >= S2.4
Output parameters FU32 Status (see Table 1)

4.15.11 Configure PID values (AM20 only)


Input parameters FU32 12
FU33 Motor number
FU34 P-Factor (range 0-255)
FU35 I-Factor (range 0-255)
FU36 D-Factor (range 0-255)
FU37 V-Factor (range 0-255)
Output parameters FU32 Status (see Table 1)

4.15.12 Set actual position


Input parameters FU32 13
FU33 Motor number
FU34 Low word of new position
FU35 High word of new position
Output parameters FU32 Status (see Table 1)

4.15.13 Set positioning parameters (AM20 only)


Input parameters FU32 14
FU33 Motor number
FU34 maximum allowed contouring error
Range / [unit]:
- 0-32767 / [increments]
FU35 In position window
Range / [unit]:
- 0-2557 / [increments]
Output parameters FU32 Status (see Table 1)

4.15.14 Set D/A output polarity (AM20 > S 2.2 only)


Input parameters FU32 15
FU33 Motor number
FU34 Polarity of D/A output
0 = normal
1 = inverted
Output parameters FU32 Status (see Table 1)

4.15.15 Set P division (AM20 > S2.2 only)


Input parameters FU32 16
FU33 Motor number
FU34 Division
0 = P factor will function normally
1 = P factor will be divided by 16
Output parameters FU32 Status (see Table 1)

4.15.16 Set counter input polarity (AM20 >= S 2.3 only)


Input parameters FU32 17
FU33 Motor number

FST Version 4.02.21 Manual 210


FU34 Polarity of counter input
0 = normal
1 = inverted
Output parameters FU32 Status (see Table 1)

4.15.17 Set acceleration multiplicator (AM20 >= S 2.3 only)


Input parameters FU32 18
FU33 Motor number
FU34 Multiplicator
0 = acceleration normal
1 = acceleration will be multiplied by 16
Output parameters FU32 Status (see Table 1)

4.15.18 Set Offset for D/A converter (AM20 >= S 2.3 only)
Input parameters FU32 19
FU33 Motor number
FU34 Offset:
0 - 127: positive
128-255: negative
Output parameters FU32 Status (see Table 1)

4.15.19 Reset module


Input parameters FU32 20
FU33 Motor number
Output parameters FU32 Status (see Table 1)
Note that if you reset one motor of a two motor module the other one will be reset as well.

4.15.20 Stop motor


Input parameters FU32 21
FU33 Motor number
Output parameters FU32 Status (see Table 1)
Stop movement using the defined acceleration value.

4.15.21 Set / Reset enable (AM20 only)


Input parameters FU32 22
FU33 Motor number
FU34 0 = reset enable output
1 = set enable output
Output parameters FU32 Status (see Table 1)

4.15.22 Delete contouring error (AM20 only)


Input parameters FE32 23: up driver version V1.17
FE33 Motor number
Output parameters FE32 Status (see Table 1)

4.15.23 Get revision (AM20 only)


Input parameters FU32 30
FU33 Motor number
Output parameters FU32 Status (see Table 1)
FU33 Revision number

FST Version 4.02.21 Manual 211


4.15.24 Get speeds / target position
Input parameters FU32 31
FU33 Motor number
Output parameters FU32 Status (see Table 1)
FU33 Start frequency
FU34 Acceleration
FU35 Maximum frequency
FU36 Target position low word
FU37 Target position high word

4.15.25 Get polarity and PID parameters


Input parameters FU32 32
FU33 Motor number
Output parameters FU32 Status (see Table 1)
FU33 Polarity register (see Table 6)
FU34 P-Factor
FU35 I-Factor
FU36 D-Factor
FU37 V-Factor

Table 6: Polarity
Bit Description

0 0= Digital outputs low active


1= Digital outputs high active
Only AM10 and AM11!

1 0= Divisor for P-Factor is off


1= Divisor for P-Factor is on

2 0= Limit switch low active


1= Limit switch high active

3 0= Polarity of the D/A converter is normal


1= Polarity of the D/A converter is inverted

4 0= Reference switch low active


1= Reference switch high active

5 0= Interpolation inactive
1= Interpolation active

6 0= Multiplicator for acceleration is off


1= Multiplicator for acceleration is on

7 0= Count direction is normal


1= Count direction is inverted

4.15.26 Get status for AM20 user


Input parameters FU32 33
FU33 Motor number
Output parameters FU32 Status (see Table 1)
FU33 Status flags (see Table 7)
FST Version 4.02.21 Manual 212
FU34 P-Factor
FU35 I-Factor
FU36 D-Factor
FU37 V-Factor

Table 7: Status for AM20 user


Bit Description

0 0= Enable is off
1= Enable is on

1 1= Motor is stopped
1= Motor is moving

2 0= Reference move is stopped / finished


1= Reference move is active

3 0= Axis is not in position window


1= Axis is within position window

4 0= contouring error is not active


1= Axis is stopped with contouring error

5 0= Positive limit switch inactive


1= Positive limit switch activated

6 0= Negative limit switch inactive


1= Negative limit switch activated

7 0= Reference switch inactive


1= Reference switch activated

4.15.27 Move with interpolation (AM20 >= 2.3 only)


Input parameters FU32 40
FU33 Motor (1,3,5,7,9,11)
FU34 Low word of new position / distance for motor 1
FU35 High word of new position / distance for motor 1
FU36 Low word of new position / distance for motor 2
FU37 High word of new position / distance for motor 2
Output parameters FU32 Status (see Table 1)
FU33 Error code:
0 = OK
-1 = wrong motor number

4.15.28 Move with interpolation (AM20 >= 2.3 only)


Input parameters FU32 41
FU33 Motor (1,3,5,7,9,11)
FU34 Move relative or absolute
0 = absolute
1 = relative
FU35 Maximum speed
FU36 Direction for motor 1 (if relative move)
1 = positive
FST Version 4.02.21 Manual 213
-1 = negative
FU37 Direction for motor 2 (if relative move)
1 = positive
-1 = negative
Output parameters FU32 Status (see Table 1)
FU33 Error code:
0 = OK
-1 = wrong motor number
-2 = Function 40 not yet called

4.15.29 Sample programs

4.15.29.1 Sample program for stepper motor (AM1x)


"" Sample program for stepper motor
"" Uses R0 for motor number

STEP init
"" Start with configuration
IF NOP
THEN LOAD V1
TO R0 'Motor Number

IF NOP
THEN CFM 51 " AMxx module
WITH V20 " Reset
WITH R0 'Motor Number

CFM 51 " AMxx module


WITH V10 " Set polarity
WITH R0 'Motor Number
WITH V1 " Outputs ACTIVE HIGH
WITH V0 " Limit switches normally closed
WITH V1 " Reference switch normally open

CFM 51 " AMxx module


WITH V11 " Set start speed and acceleration
WITH R0 'Motor Number
WITH V10 " 10 steps / sec
WITH V1000 " 10*1000 steps / sec²

STEP loop
IF NOP
THEN CFM 51 " AMxx module
WITH V0 " Get status
WITH R0 'Motor Number

LOAD FU34
TO FW34 'FU34=extended status

IF F1.0 'Start Flag


AND N F34.7 'Run Flag
THEN CFM 51 " AMxx module
WITH V1 " Start absolute move
FST Version 4.02.21 Manual 214
WITH R0 'Motor Number
WITH V2000 " Position low word
WITH V0 " Position high word
WITH V2500 " Moving speed 2500 Hz

STEP
IF NOP
THEN CFM 51 " AMxx module
WITH V0 " Get status
WITH R0 'Motor Number

LOAD FU34
TO FW34 'FU34=extended status

IF F34.7 'Run Flag


THEN NOP

STEP
IF NOP
THEN CFM 51 " AMxx module
WITH V0 " Get status
WITH R0 'Motor Number

LOAD FU34
TO FW34 'FU34=extended status

IF N F34.7 'Run Flag


THEN CFM 51 " AMxx module
WITH V1 " Start absolute move
WITH R0 'Motor Number
WITH V0 " Position low word
WITH V0 " Position high word
WITH V5000 " Moving speed 5000 Hz

STEP wait
IF NOP
THEN CFM 51 " AMxx module
WITH V0 " Get status
WITH R0 'Motor Number

LOAD FU34
TO FW34 'FU34=extended status

IF F34.7 'Run Flag


THEN JMP TO loop
OTHRW JMP TO wait

4.15.29.2 Sample program for servo motor (AM20)

"" Sample program for servo motor


"" Uses R0 for motor number

STEP init
FST Version 4.02.21 Manual 215
"" Start with configuration
IF NOP
THEN LOAD V3
TO R0 'Motor Number

IF NOP
THEN CFM 51 " AMxx module
WITH V20 " Reset
WITH R0 'Motor Number

CFM 51 " AMxx module


WITH V10 " Set polarity
WITH R0 'Motor Number
WITH V0 " Always 0 for AM20
WITH V0 " Limit switches normally closed
WITH V1 " Reference switch normally open

CFM 51 " AMxx module


WITH V11 " Set start speed and acceleration
WITH R0 'Motor Number
WITH V5 " 10*5 steps / sec
WITH V1000 " 10*1000 steps / sec²

CFM 51 " AMxx module


WITH V12 " Set PID parameters
WITH R0 'Motor Number
WITH V1 " P factor
WITH V2 " I factor
WITH V0 " D factor
WITH V3 " V factor

CFM 51 " AMxx module


WITH V14 " Set positioning parameters
WITH R0 'Motor Number
WITH V10000 " Max contouring error [Incr]
WITH V20 " Inposition window [Incr]

CFM 51 " AMxx module


WITH V22 " enable/disable
WITH R0 'Motor Number
WITH V1 " set enable

STEP loop
IF NOP
THEN CFM 51 " AMxx module
WITH V0 " Get status
WITH R0 'Motor Number

LOAD FU34
TO FW34 'FU34=extended status

IF F1.0 'Start Flag

FST Version 4.02.21 Manual 216


AND N F34.7 'Run Flag
THEN CFM 51 " AMxx module
WITH V1 " Start absolute move
WITH R0 'Motor Number
WITH V2000 " Position low word
WITH V0 " Position high word
WITH V2500 " 10*2500 incr/sec

STEP
IF NOP
THEN CFM 51 " AMxx module
WITH V0 " Get status
WITH R0 'Motor Number

LOAD FU34
TO FW34 'FU34=extended status

IF F34.7 'Run Flag


THEN NOP

STEP
IF NOP
THEN CFM 51 " AMxx module
WITH V0 " Get status
WITH R0 'Motor Number

LOAD FU34
TO FW34 'FU34=extended status

IF N F34.7 'Run Flag


THEN CFM 51 " AMxx module
WITH V1 " Start absolute move
WITH R0 'Motor Number
WITH V0 " Position low word
WITH V0 " Position high word
WITH V5000 " 10*5000 incr/sec

STEP wait
IF NOP
THEN CFM 51 " AMxx module
WITH V0 " Get status
WITH R0 'Motor Number

LOAD FU34
TO FW34 'FU34=extended status

IF F34.7 'Run Flag


THEN JMP TO loop
ELSE
JMP TO wait

FST Version 4.02.21 Manual 217


4.16 PID driver
This driver adds 16 PID control loops to your FST-IPC projects. In this document some terms
related to control technology are used, for explanation of these no additional information is
available at the moment.

4.16.1 Driver overview


The driver uses a table with the PID parameters, controller input and controller output. This
table is located in FlagWords. The location where the table starts is set through a function
module.
Configuring the driver and assigning parameters
If you want to use PID in an FST- IPC project, you must enter the PID driver in the driver
configurer and assign the necessary parameters.
Destination drive:
Specify the drive on which the PID driver PIDDRV.EXE is located or onto which it is to be
loaded.

4.16.2 Extended CI commands for PID


This driver extends the IPC command interpreter with the following commands:
!29 Display version number
Display driver info and version number. This information will also be displayed if an un-
known command is entered (for example !29abcdef).

4.16.3 Module for PID


Overview of modules

PIDCFM
Setup and start the driver.
Input parameters FU32 Number of the 1st flagword used for the parameter
table
Output parameters FU32 0 if successful
256 if driver not installed
Note! Calling the PIDCFM function module will reset all flagwords in the complete parameter
table to 0.

4.16.3.1 Parameter table


The following parameter table is the result if the PIDCFM function module is called with
parameter 500:
PID PID PID
loop 0 loop 1 loop 15
Man/Auto FW500 FW516 FW740
Setpoint FW501 FW517 FW741
Process FW502 FW518 FW742
Value
Output FW503 FW519 FW743
Value
Manual FW504 FW520 FW744
Value
Kp FW505 FW521 FW745
Ki FW506 FW522 FW746
Kd FW507 FW523 FW747
Time FW508 FW524 FW748
Constant

FST Version 4.02.21 Manual 218


4.16.3.2 Explanation of parameters
Man/Auto:
If this parameter is 0, the control loop is inactive and the manual value is copied to the
output value. If this parameter is 1, the control loop is active and the output value is calcu-
lated according to setpoint, process value and control parameters.
Setpoint:
The target for the controller in auto mode.
Process value:
The input value for the control loop.
Output value:
The output value from the control loop.
Manual value:
An operator override in case of manual mode.
Kp:
The proportional parameter for the control loop.
Ki:
The integral parameter for the control loop.
Kd:
The differential parameter for the control loop.
Time constant:
Indicator for the interval time with which the control loop calculates its output value.
If the time constant is 0 the control loop calculates approximately every 14 ms, if the time
constant is 1 the control loop calculates approximately every 28 ms, etc.
The Setpoint, Process value, Output value and Manual value are all in the range from 0 to
4095.
The Kp, Ki and Kd values are divided by 100 inside the control loop. So if you set a Kp of 125
in the table, the control loop calculates with 1.25.

4.17 Serial Communication


Version 1.33
This driver allows characters to be sent and received via standard COM ports.

HC1X and HC2X


Up to 4 ports are supported. These can be either COM1..COM4 or COM2..COM5.
Note! The serial port on the HC2X CPUs labelled "COM" is the COM1 port!

HC0X
The interfaces COM and EXT can be used for serial communication. Additional COM ports on
CP3x modules can be used:
• Due to mutual exclusions of external interrupt sources (IRQs) you can
either use COM2 or COM4. If you do so, for HC01 the trimmer no longer can
be used. For HC0X this also requires to change jumper J1 (see the hardware
manual for details). On the HC02 there is no trimmer anyway, and no
jumpers have to be changed.
• Due to mutual exclusions of external interrupt sources (IRQs) you can
either use COM3 or COM5.
• If you want to use COM1 on HC02 you can do so, but this does not allow to
use the ethernet port any longer and requires to change another jumper
(see the hardware manual for details). On the HC01 you can use COM1
without restrictions.

FST Version 4.02.21 Manual 219


FECs
The interfaces COM and EXT can be used for serial communication. Due to very limited
memory in the FC20, only FEC Compacts of the FC3x series and FEC Standards should be
used for serial communication.
Beginning with version 1.31 the driver supports FIFOs. Check the version number with the
CI-Command "!8" which is available since version 1.31.

4.17.1 Selecting and parameterising the driver


If you wish to use the serial driver in an FST project, you must enter the
correct driver(s) according to the table below in the driver configurer and
parameterise it.

4.17.1.1 HC1X and HC2X


Please use the SERIALDR driver.

4.17.1.2 HC0X
If you are using only COM and/or EXT please use the driver COMEXT.
If you are using CP3x please use HC0XCOM instead (this driver includes the
routines for COM and EXT as well).
For HC0X < S2.00 you also need to include the driver FOSEXT if you want to use
the EXT port (HC0X < S1.11 requires the use of FOSSIL2 instead of FOSEXT).

4.17.1.3 FEC Compact


Please use the driver COMEXT.
For the EXT port you also need to include the driver FOSEXT (FC20 < V1.21 and
FC30 < S1.10 require the use of FOSSIL2 instead of FOSEXT).

4.17.1.4 FEC Standard


Please use the driver COMEXT.
Note! Some of the modules provided also require the STRINGS driver.

Destination drive:
Enter the drive containing the serial driver or to which it is to be loaded.

4.17.2 Modules
The modules for serial communication require the serial interface that is used
as parameter (FU32). Please note the following assignment of port numbers:

COM 255
EXT 0
COM1 1
COM2 2
COM3 3
COM4 4
COM5 5
Note! You must not use the serial port that is used for the standard CI with these modules,
except when it is referred to as port 255 (COM).
The standard COM port for the CI is set in the Controller Settings of the FST project.

FST Version 4.02.21 Manual 220


The default setting for the standard COM port is
Controller Port Number
FEC COM 255
HC0X COM 255
HC1X COM1 1
HC2X COM 1
Note! It is not possible to send or receive #0 or Ctrl-T characters over the COM
port (255).

Overview
OPENCOM Open serial interface
CLOSECOM Close serial interface
GETCOM Send character
PUTCOM Receive character
PRINTCOM Send string
READCOM Receive string (incl. delimiter)
READLCOM Receive string (excl. delimiter)
F30 Set interface parameters
F31 Activate CI
F32 Clear buffers
F34 Interrogate status
F35 Change delimiter
BREAKCOM Set/Reset hardware break (SERIALDR only)
SETRTS Active handshake for RS485 (SERIALDR only)
IS485 Check if handshake is active (SERIALDR only)

OPENCOM
Open (initialise) a serial interface with 9600 baud, 8 data bits, no parity.
Input parameters FU32 Serial interface
Output parameters FU32 0 = DONE
1 = ERROR
Use F30 instead of OPENCOM for other com port settings.

CLOSECOM
Close a previously opened serial interface.
Input parameters FU32 Serial interface
Output parameters FU32 0 = DONE
1 = ERROR
GETCOM
Read character from a serial interface.
Input parameters FU32 Serial interface
Output parameters FU32 0 = DONE
1 = ERROR
-1 = NOTHING RECEIVED
For FU32 = DONE FU33 Received char. (0 to 255)

PUTCOM
Write character to a serial interface.
Input parameters FU32 Serial interface
FU33 Char. to be sent (0 to 255)
Output parameters FU32 0 = DONE
1 = ERROR

FST Version 4.02.21 Manual 221


PRINTCOM
Write an FST string to a serial interface.
Input parameters FU32 Serial interface
FU33 Number of FST string to be sent
Output parameters FU32 0 = DONE
1 = ERROR

READCOM
Read characters from a serial string to a delimiter and save to an FST string.
Input parameters FU32 Serial interface
FU33 Number of FST string for the character string.
FU34 Maximum length
FU35 Delimiter (0 to 255)
Output parameters FU32 0 = DONE
1 = ERROR
-1 = NOTHING RECEIVED
The delimiter is not written to the string.

READLCOM
Read characters from serial interface to selected standard end-of-record character (default
is CR) and save to FST string.
Input parameters FU32 Serial interface
FU33 Number of the FST string for the character string.
FU34 Max. length including end-of-record character.
Output parameters FU32 0 = DONE
1 = ERROR
-1 = NOTHING RECEIVED
The delimiter is written with the string.

F30
Open port and set interface parameter.
Input parameters FU32 Serial interface
FU33 Interface parameter
Output parameters None

7 6 5 4 3 2 1 0
Baud rate Char. length Parity

Bit 7 6 5 4 Baud
1 0 0 0 19200
1 0 0 1 9600 (default)
1 0 1 0 4800
1 0 1 1 2400
1 1 0 0 1200
1 1 0 1 600
1 1 1 0 300
1 1 1 1 110

Bit 3 2 Bits/characters
0 0 5
0 1 6
1 0 7
1 1 8 (default)

FST Version 4.02.21 Manual 222


Bit 1 0 Parity
0 0 NONE (default)
0 1 ODD
1 0 NONE
1 1 EVEN

Note! For the COM port (255) only the settings N,8,1 are accepted.
Note! For the COM port (255) of FC20 only the baud rates 9600 or less are useful
due to the optocouplers.

F31
Activate CI.
Input parameters FU32 Serial interface
FU33 Driver mode:
0=Disable CI
1=Enable CI, disabled on receiving the CI command
"X"
2=Enable CI, ignore the CI command "X"
Output parameters None
Note! The standard COM port for the CI cannot be disabled.
The standard COM port for the CI is set in the Controller Settings of the FST project.
The default setting for the standard COM port is
Controller Port Number
FEC COM 255
HC0X COM 255
HC1X COM1 1
HC2X COM 1

F32
Erase interface buffer.
Input parameters FU32 Serial interface
Output parameters FU32 0 = DONE
1 = ERROR

F34
Interrogate settings and status of a serial interface.
Input parameters FU32 Serial interface
Output parameters FU32 Number of records in receive buffer
(separated by standard end-of-record characters).

F35
Change standard end-of-record character. Default is CR (13).
Input parameters FU32 Serial interface
FU33 End-of-record characters (0 to 255)
Output parameters None

BREAKCOM
Send hardware BREAK.
Note! This function is only implemented for the SERIALDR (HC1X and HC2x).
Input parameters FU32 Serial interface
FU33 1 = BREAK on
0 = BREAK off

FST Version 4.02.21 Manual 223


Output parameters None

IS485
Returns current port setting regarding RS485 support.
Input parameters FU32 Serial interface
Output parameters FU32 0 = DONE
1 = ERROR
FU33 1=RTS control for RS485 active
0=normal RS232 operation
Note!
FST driver SERIALDR Version 1.10 or greater is required.
This function is only implemented for the SERIALDR (HC1X and HC2x).

SETRTS
Enables/disables RTS control for RS485 serial communication via SM30 IPC module.
Input parameters FU32 Serial interface
FU33 1 for RS485 operation,
0 for normal RS232 operation
Output parameters FU32 0 = DONE
1 = ERROR
Note!
• Has to be called before opening the port.
• FST driver SERIALDR Version 1.10 or greater is required.
• This function is only implemented for the SERIALDR (HC1X and HC2x).

4.18 TCP/IP driver


Version 1.12
This driver allows the IPC to communicate with other PCs and Controllers using the UDP or
TCP protocol from the TCP/IP protocol suite.

4.18.1 Introduction
In this document terms related to TCP/IP are used, for explanation please refer to one of the
many books and internet sites. A good starting point is http://www.whatis.com where all
kinds of technical terms are explained.

4.18.2 Driver overview


To function properly every TCP/IP participant (host) needs an IP address and netmask. The
FST TCP/IP driver allows 3 ways for configuring these: configuration in the Driver configura-
tion screen, using function blocks or dynamically using the BOOTP or DHCP protocol.
Note! If the IP address is 0 (0.0.0.0) either through configuration or change through a func-
tion block the BOOTP/DHCP protocol will be automatically activated.
If the IP address is set the BOOTP/DHCP protocol will be deactivated.
The FST TCP/IP driver implements the following protocols / services for communication and
testing:

Protocol Port Service Description

ICMP n.a. n.a. Used for PING


UDP 7 echo Returns all data received
UDP 9 discard Discards all data received
UDP 13 daytime Returns string with date and time
FST Version 4.02.21 Manual 224
UDP 19 chargen Returns string with characters
UDP 37 time Returns time as 32bit number
UDP 991 CI Command interpreter
UDP 992 CI_EXT Extended command interpreter
UDP 993 CI_BIN Binary data exchange
UDP 995 EasyIP Data exchange protocol
TCP 7 echo Returns all data received
TCP 9 discard Discards all data received
TCP 13 daytime Returns string with date and time
TCP 19 chargen Sends continual stream of characters
TCP 991 CI Command interpreter (via telnet)

The TCP command interpreter at port 991 can be accessed with a program like TELNET. Start
TELNET with parameters IP number and 991 (i.e. TELNET 10.10.10.1 991), now it is possible
to send and receive just as via the normal RS-232 command interpreter. Please note that
only 1 connection is allowed at the same time and the connection will automatically be
closed after 60 seconds of no interaction.
The command interpreter can also be accessed as follows: send an UDP datagram with the
CI command (without CR / LF) to the FST controller at port number 991 and the result will be
returned. For example DR0 will result in something like =1099.
Using the extended command interpreter on port 992 is similar with a small extension. The
response will be the original question and the CI reply separated by a NULL character. So
when sending DR0 the result will be DR0 NULL character =1099.
Using the TCP (telnet) way is more convenient for users, using UDP is better suited for pro-
grams that need to access FST operands.
Note!
Do not use the Y! command. This command will stop all programs and drivers, since TCP/IP
is implemented as a driver it will be stopped as well !
The LE commands are not available via the telnet interface.

4.18.3 Configuring the driver and assigning parameters


If you want to use TCP/IP in a FST IPC project, you must enter the TCP/IP driver in the driver
configuration and assign the necessary parameters.
Different driver names exist for different target systems, the following table lists the sup-
ported target systems and their driver:

TCPIPDRV PS1-HC1x with PS1-CP10/CP11/CP14


PS1-HC1x with PS1-CP12 (8 bit modus)
PS1-HC2x with PS1-CP10/CP11/CP14
PS1-HC2x with PS1-CP12 (8 bit modus)

TCPIPFEC FEC Compact (FC34,FC44)

TCPIPFC2 FEC Standard (FC440,FC560,FC640,FC660)

TCPIPHC0 PS1-HC02

TCPIP_15 PS1-HC1x with PS1-CP15


PS1-HC2x with PS1-CP15

TCPIPXXX PS1-HC1x with 2 PS1-CP10/CP11/CP14


PS1-HC2x with 2 PS1-CP10/CP11/CP14

FST Version 4.02.21 Manual 225


4.18.4 Configuration of TCP/IP driver for PS1-CP10, CP11, CP12 and CP14:
Destination drive:
Specify the drive on which the TCP/IP driver TCPIPDRV.EXE is located or onto which it is to
be loaded.
Interrupt of CP10/CP11/CP12/CP14 module:
The interrupt as configured on the module. Allowed values are 2, 3, 5, 6 and 7. Make sure
that the jumper on the network module is set accordingly and that there are no conflicts
with other IPC modules.
IO port configuration:
The IO port (in hexadecimal !) as configured on the module. Allowed values are 300, 320,
340 and 360. Make sure that the switches on the network module are set accordingly and
that there are no conflicts with other IPC modules.

IP address:
The IP address. Leave the address to 0.0.0.0 if the address is configured through the IP_IP
function block or dynamically through the BOOTP protocol.

IP netmask:
The IP netmask. Leave the mask to 255.255.255.0 if the netmask is configured through the
IP_MASK function block or dynamically through the BOOTP protocol.

IP address gateway:
The IP address for the standard gateway. Leave the address to 0.0.0.0 if there is no gateway
or the gateway address is configured through the IP_GATE function block or dynamically
through the BOOTP protocol.

4.18.4.1 Configuration of TCP/IP driver for PS1-CP15:


Only destination drive and IP configuration are needed. Additionally there is a configuration
file PKT.INI (in the FST runtime directory) that must be edited to reflect the settings to be
used. Most important parameters are BitRate, Channel, RadioType and SystemId.
The PKT.INI will be downloaded into the IPC when downloading the project. Please make
sure that after modification the file is downloaded since the project download will only
freshen files with different sizes.
Configuration of TCP/IP driver for FEC Compact, FEC Standard, PS1-HC02:
Only destination drive and IP configuration are needed.
Configuration of TCP/IP driver for 2 network cards:
Lots of parameters are needed. Destination drive, port and interrupt number for both cards,
IP configuration for both cards.
Please be careful when using the TCPIPXXX driver:
On the second card BOOTP/DHCP is not possible. The second card only allows a local net-
work (no gateway option for routing).
Functions like EASY_S, EASY_R, UDP_SEND etc. will automatically select the first or second
network card based upon IP configuration and destination IP.
For performance reasons it is advised to use HC20 or better CPUs.

4.18.5 Extende d CI commands for TCP/IP


This driver extends the IPC command interpreter with the following commands:

!26 Display version number


Display driver info and version number. This information will also be displayed if an un-
known command is entered (for example !26?).

FST Version 4.02.21 Manual 226


!26Axx Display ARP resolution table information
Displays information from the Address Resolution Protocol (ARP). The TCP/IP driver holds a
table of 32 IP addresses and Ethernet addresses. If the position (xx) is omitted the displayed
information will automatically cycle through the used positions.

!26B Display BOOTP/DHCP status


Displays status for the BOOTP / DHCP process and the time before the DHCP lease expires if
the IP address was ‘leased’ from a DHCP server.

!26C Display date / time


Displays the actual date, time and timezone offset in the format: YYYY.MM.DD HH:MM:SS.tt
followed by the UTC offset in hours.

!26Da.b.c Resolve hostname to IP address


Resolves the hostname a.b.c to an IP address. For example !26Dwww.festo.com would
search the IP address for www.festo.com

!26D Display name resolver status


Displays the status of the last hostname search. Possible return texts: resolving, resolved
followed by IP address, resolver timed out and resolver error followed by an error code.
When searching for a hostname first enter !26D followed by the hostname, then enter !26D
until the resolver is no longer ‘resolving’.

!26Hxx Display handler table information


Displays information about currently defined TCP and UDP handlers and their state. If the
position (xx) is omitted the displayed information will automatically cycle through the de-
fined handlers.

!26I Display IP configuration


Displays IP address, IP netmask and IP gateway.

!26M Display Ethernet MAC address


Displays the MAC address of the network card.

!26N Display hostname and domain name


Displays the hostname and domain name.

!26Pa.b.c.d Ping IP address


Sends a ping to the IP address a.b.c.d
For example !26P10.10.10.10 would ping 10.10.10.10

!26P Display ping status


Displays the status of the last ping. Possible return texts: not pinging, pinging, host is alive
and timeout.
When pinging a host first enter !26P followed by the IP address, then enter !26P until the
return message is either host is alive or timeout.

!26R Display runtime


Displays the time since the controller restart. Display format: days:hours:minutes:seconds.

!26SH Display interrupt count


Displays the number of interrupts generated by the network module. This information is
only available on HC1X, HC2X controllers with CP10, CP11, CP12 or CP14 network module.

FST Version 4.02.21 Manual 227


!26SI Display IP statistics
Displays IP packet statistics: total send, total received, checksum errors, wrong destination
address.

!26SP Display Ethernet statistics


Displays Ethernet packet statistics: total send, total received, overflow, packet too large,
cannot send.

!26ST Display TCP statistics


Displays IP packet statistics: total send, total received, checksum errors, wrong destination
address, no handler for TCP port.

!26SU Display UDP statistics


Displays IP packet statistics: total send, total received, checksum errors, wrong destination
address, no handler for UDP port, unhandled broadcast.

!26Txx Display IP table contents


Displays the IP addresses currently defined in the IP table. The TCP/IP driver can hold a total
of 32 IP addresses for easy reference.
Note!
The CI commands are mainly intended for diagnostic purposes. In case of problems start
with !26 first. If the IPC returns an ACCESS ERROR this means that the TCP/IP driver is not
included in the project or the hardware configuration is wrong. Then check for packets send
and received with !26SP. If no packets are received this could indicate that the CP10/11/12
interrupt is wrongly configured.

4.18.6 Modules for TCP/IP


Overview of generally used modules
EASY_R Request a block of operands from another IPC
EASY_S Send a block of operands to another IPC
IP_ALIVE Check whether IP address is known
IP_IP Get/set our IP address
IP_MASK Get/set our IP netmask
IP_TABLE Get/set IP address from/to table
All modules return an error code in FU32, see the table with all error codes for an explana-
tion of the individual codes.

EASY_R
Request a block of operands from another controller.
Input parameters
FU32 Index number in IP table
FU33 Operand type,
1=flags,
2=inputs,
3=outputs,
4=registers,
11=strings
FU34 Number of operands wanted (maximum 256)
FU35 Number of first local operand to store response
FU36 Number of first operand in remote controller
FU37 Number of flagword for status

FST Version 4.02.21 Manual 228


Output parameters
FU32 0 if request send, otherwise error
This function module requests a block of operands.
Note!
The operand TYPE specified in FU33 (source of remote data requested) also defines the
Local Operand TYPE where the operand will be stored in the local (requesting) controller.
For example:
IF…
THEN CMP 12 'EASY_R
WITH V3 " Table Index 3
WITH V4 " get Registers
WITH V10 " get 10 Registers
WITH V150 " 1st Remote Reg -> Local R150
WITH V34 " Remote Register data block
" is R34 to R43
WITH V99 " Status in FlagWord 99

If no response is received after approximately 50 milliseconds the status flagword will indi-
cate a timeout. Only 1 request can be active for each index number.

Status values are:


-1 Packet send, no response or timeout yet

0 OK response received, data accepted by partner or


data received from partner

1 Operand type error, partner indicates that the


specified type is not supported

2 Offset error, partner indicates that the specified offset


is not allowed. For example requesting FW20000

4 Size error, partner indicates that the number of


operands send or requested is too large

128 Timeout, no response received from partner

EASY_S
Send a block of operands to another controller.
Input parameters
FU32 Index number in IP table
FU33 Operand type,
1=flags,
2=inputs,
3=outputs,
4=registers,
11=strings
FU34 Number of operands to send (maximum 256)
FU35 Number of first operand to send
FU36 Number of first operand in remote controller
FU37 Number of flagword for status (-1 if no acknowledge wanted)
Output parameters
FU32 0 if data send, otherwise error

FST Version 4.02.21 Manual 229


This function module sends a block o foperands.
Note!
The operand TYPE specified in FU33 (source of data to be sent) also defines the Remote
Operand Type where the data will be stored in the REMOTE (destination) controller.
For example:
IF…
THEN CMP 22 'EASY_S
WITH V3 " Table Index 3
WITH V4 " send Registers
WITH V10 " send 10 Registers
WITH V23 " send local Registers
" R23-R32 to remote controller
WITH V234 " Remote controller will store
" Data in R234-R43.
WITH V98 " Use FW98 for status
If no acknowledgment is received after approximately 50 milliseconds the status flagword
will indicate a timeout. Only 1 unacknowledged send can be active for each index number.

Status values are:


-1 Packet send, no response or timeout yet

0 OK response received, data accepted by partner or


data received from partner

1 Operand type error, partner indicates that the


specified type is not supported

2 Offset error, partner indicates that the specified offset


is not allowed. For example requesting FW20000

4 Size error, partner indicates that the number of


operands send or requested is too large

128 Timeout, no response received from partner

IP_ALIVE
Checks the ARP table, to see if an IP address is known.
Input parameters
FU32 Index number in IP table
Output parameters
FU32 0 if successful, otherwise error
FU33 0 if IP address unknown
1 if IP address known
2 if IP address must be reached through a gateway
Be aware that if a controller is stopped, disconnected or otherwise no longer available it can
take up to 10 minutes before IP_ALIVE indicates that the IP address is unknown.
Other alternatives are available, for example testing the status value from EasyIP packets or
using the function module PING if no EasyIP communication is used.

IP_IP
Set or get the IP address.
Input parameters
FU32 1 to set the IP address

FST Version 4.02.21 Manual 230


2 to get the IP address
FU33 IP address
FU34 IP address
FU35 IP address
FU36 IP address
Output parameters
FU32 0 if successful, otherwise error
FU33 IP address
FU34 IP address
FU35 IP address
FU36 IP address
This module is normally only used in projects with identical controllers (with the same pro-
grams). By using this function module and retentative variables it is then possible to use
identical FST projects on multiple controllers. Other use is when using dynamic addresses
so the controller knows when the IP address is received.

IP_MASK
Set or get the IP netmask.
Input parameters
FU32 1 to set the IP mask
2 to get the IP mask
FU33 IP mask
FU34 IP mask
FU35 IP mask
FU36 IP mask
Output parameters
FU32 0 if successful, otherwise error
FU33 IP mask
FU34 IP mask
FU35 IP mask
FU36 IP mask

IP_TABLE
Set or get an IP address into or from table.
Input parameters
FU32 1 to set the IP address
2 to get the IP address
FU33 index number in IP table
FU34 IP address
FU35 IP address
FU36 IP address
FU37 IP address
Output parameters
FU32 0 if successful, otherwise error
FU33 index number in IP table
FU34 IP address
FU35 IP address
FU36 IP address
FU37 IP address
The IP table is a list of short addresses, which are used by other function modules.

FST Version 4.02.21 Manual 231


4.18.7 More modules for TCP/IP
Overview of special modules
These modules are listed separately because their use requires special expertise, they are
rarely used etc.

DNS_NAME Get/set hostname and domain name


DNSRESOL Resolve hostname to IP address
IP_DNS Get/set IP address for DNS server
IP_GATE Get/set IP address for gateway
IP_MAC Get Ethernet MAC address from network module
PING Ping
SNTPTIME Start time synchronisation
TCP_CLOS Close TCP connection
TCP_HAND Activate TCP handler
TCP_OPEN Open TCP connection
TCP_RES Reset TCP handler
TCP_SEND Send a TCP datapacket
TCP_STAT Status of TCP connection
TCP_STR Send a string through TCP
TFTPFILE Send / request a file
UDP_FW Send a FW block to another IPC
UDP_HAND Activate UDP handler
UDP_SEND Send an UDP datapacket
UDP_STR Send a string through UDP
All modules return an error code in FU32, see the table with all error codes for an explana-
tion of the individual codes.

DNS_NAME
Get or set the hostname and domain name.
Input parameters
FU32 1 to set hostname
2 to get hostname
3 to set domain name
4 to get domain name
FU33 Number of the source string (set),
or destination string (get).
Output parameters
FU32 0 if successful, otherwise error
TCP/IP hosts normally have names in the format name.some.domain.com. In this case the
hostname is 'name' and the domain name is 'some.domain.com'. These names can be set
through BOOTP/DHCP or with this module. This function requires that the FST string driver
is installed in the project.

DNSRESOL
Resolve a hostname to IP address
Input parameters
FU32 1 to start hostname resolution
2 to get status
FU33 Number of the string with host-name to resolve
FU34 Index number in IP table
Output parameters
FU32 0 if successful, otherwise error
FU33 Resolver status
FST Version 4.02.21 Manual 232
-3 if resolver not yet started
-2 if resolver already busy, wait and try again
-1 if resolver busy
0 if resolver finished
1 if resolver timed out
Tries to find the IP address for a hostname. The IP address for DNS server(s) must be known.
This function requires that the FST string driver is installed in the project.

IP_DNS
Set or get an IP address for a DNS server
Input parameters
FU32 1 to set the IP address
2 to get the IP address
FU33 DNS server number (0, 1 or 2)
FU34 IP address
FU35 IP address
FU36 IP address
FU37 IP address
Output parameters
FU32 0 if successful, otherwise error
FU33 DNS server number
FU34 IP address
FU35 IP address
FU36 IP address
FU37 IP address
Up to 3 DNS servers are used when resolving a hostname into an IP address. The servers are
used consecutive (0, 1 then 2).

IP_GATE
Set or get the IP address for gateway.
Input parameters
FU32 1 to set the IP address
2 to get the IP address
FU33 IP address
FU34 IP address
FU35 IP address
FU36 IP address
Output parameters
FU32 0 if successful, otherwise error
FU33 IP address
FU34 IP address
FU35 IP address
FU36 IP address

IP_MAC
Get the Ethernet MAC address.
Input parameters
FU32 Number of string to store the address
Output parameters
FU32 0 if successful, otherwise error
The FST STRING driver must be installed in the project.

FST Version 4.02.21 Manual 233


PING
Send ping or get ping status
Input parameters
FU32 1 to send ping
2 to get status
FU33 IP address
FU34 IP address
FU35 IP address
FU36 IP address
Output parameters
FU32 0 if successful, otherwise error
FU33 Ping status
-1 = pinging
0 = host is alive
1 = timed out (no response after 5 seconds)
2 = not yet pinging
Sends a ping and wait for response. Use this to actively test if a host is alive.

SNTPTIME
Starts time synchronisation and get status
Input parameters
FU32 0 to get status
1 to start synchronisation
2 to start listen for broadcasts
FU33 Time offset to Greenwich Mean Time in hours
FU34 IP address
FU35 IP address
FU36 IP address
FU37 IP address
Output parameters
FU32 0 if successful, otherwise error
FU33 status
FU34 number of seconds since last synchronisation
-1 if not synchronised
The time synchronisation uses standard time codes (to allow worldwide synchronisation)
therefore the time difference with Greenwich Mean Time must be known. For some sample
values see the table at the end.

The status codes are:


-1 busy,
0 time synchronised,
1 timedout (no response from NTP server),
2 if listening active.
Timeserver programs are available from freeware to commercial packages and can be run on
standard windows PCs.

TCP_CLOS
Closes a TCP connection
Input parameters
FU32 Index number for handler
Output parameters
FU32 0 if successful, otherwise error

FST Version 4.02.21 Manual 234


TCP_HAND
Installs a handler to receive TCP datapackets
Input parameters
FU32 local port number to use
FU33 Number of first flagword to receive data
Output parameters
FU32 0 if successful, otherwise error
FU33 Index number for handler
Some additional data is written if a datapacket is received. See table below for layout. The
handler number returned in FU33 must be stored and used to send TCP datapackets.

TCP_OPEN
Actively opens a TCP connection

Input parameters
FU32 Index number for handler
FU33 Index number in IP table
FU34 Destination port number
Output parameters
FU32 0 if successful, otherwise error

TCP_RES
Resets closed TCP handler to listen state
Input parameters
FU32 Index number for handler
Output parameters
FU32 0 if successful, otherwise error

TCP_SEND
Send a TCP datapacket
Input parameters
FU32 Index number for handler
FU33 number of bytes to send
FU34 number of first flagword to send
Output parameters
FU32 0 if successful, otherwise error

TCP_STAT
Returns status of TCP connection
Input parameters
FU32 Index number for handler
Output parameters
FU32 0 if successful, otherwise error
FU33 1 if connected (send possible)
FU34 Extended state
FU35 Number of unacknowledged bytes in send buffer

Extended state values are:


0 LISTEN waiting for tcp_open request from remote
1 SYNSENT tcp_open send, waiting for remote
2 SYNRCVD tcp_open received, acknowledge send, waiting for
remote
3 ESTABLISHED connection open, data can be transferred

FST Version 4.02.21 Manual 235


4
5 FINWAIT1 tcp_close send, waiting for remote
6 FINWAIT2 close acknowledged
7 CLOSEWAIT not used
8 CLOSING our close acknowledged and remote close received
9 LASTACK close received, close send, waiting for acknowledge
10 TIMEWAIT after closing, timer is started after that -> CLOSED
11 CLOSED connection closed waiting for TCP_RES

TCP_STR
Send a string through TCP
Input parameters
FU32 Index number for handler
FU33 Number of string to send
Output parameters
FU32 0 if successful, otherwise error
The FST STRING driver must be installed in the project.

TFTPFILE
Send or requests a file.
Input parameters
FU32 1 to send a file
2 to request a file
FU33 index number in IP table
FU34 number of the string with our file-name
FU35 number of the string with the remote filename
FU36 number of flagword for status
Output parameters
FU32 0 if successful, otherwise error
Uses the string driver for filenames. A waiting time of around 1 second must be inserted
between 2 transmissions with TFTPFILE.

Status values:
-1 Busy with file transfer.
0 File transfer successfully finished
1 Timeout error
2 Local file not found
3 Error reading from local file
4 Local file already exists (overwrite is not allowed, use
the FDELETE function module first)
5 Error writing to local file
127 Unexpected message received during file transfer
128 Received unknown error message
129 Received NOFILE error message
130 Received access error message
131 Received disk full error message
132 Received illegal operation error message
133 Received TID error message
134 Received file exists error message
135 Received NOUSER error message
136 Received option error message

FST Version 4.02.21 Manual 236


UDP_FW
Send a block of flagwords to another IPC.
Input parameters
FU32 index number in IP table
FU33 number of flagwords to send (maximum 256)
FU34 number of first flagword to send
FU35 number of first flagword in target IPC
Output parameters
FU32 0 if successful, otherwise error
This function module just sends a block of flagwords, no retry is done if the target is un-
available and no indication is given if the target did not receive the flagwords. This module
has lost its use, use the module EASY_S instead.

UDP_HAND
Installs a handler to receive UDP datapackets
Input parameters
FU32 local port number to use
FU33 Number of first flagword to receive data
Output parameters
FU32 0 if successful, otherwise error
Some additional data is written if a datapacket is received. See table below for layout.

UDP_SEND
Send an UDP datapacket
Input parameters
FU32 local port number to use
FU33 index number in IP table
FU34 Destination port number
FU35 number of bytes to send
FU36 number of first flagword to send
Output parameters
FU32 0 if successful, otherwise error

UDP_STR
Send a string through UDP
Input parameters
FU32 Local port number to use
FU33 Index number in IP table
FU34 Destination port number
FU35 Number of string to send
Output parameters
FU32 0 if successful, otherwise error
The FST STRING driver must be installed in the project.

4.18.7.1 Modules for second network card


IP_IP2 Get/set IP address for 2 nd network card
IP_MASK2 Get/set IP netmask for 2 nd network card

IP_IP2
Set or get the IP address.
Input parameters
FU32 1 to set the IP address
2 to get the IP address
FST Version 4.02.21 Manual 237
FU33 IP address
FU34 IP address
FU35 IP address
FU36 IP address
Output parameters
FU32 0 if successful, otherwise error
FU33 IP address
FU34 IP address
FU35 IP address
FU36 IP address

IP_MASK2
Set or get the IP netmask.
Input parameters
FU32 1 to set the IP mask
2 to get the IP mask
FU33 IP mask
FU34 IP mask
FU35 IP mask
FU36 IP mask
Output parameters
FU32 0 if successful, otherwise error
FU33 IP mask
FU34 IP mask
FU35 IP mask
FU36 IP mask

4.18.8 EasyIP status values


Status values are:

-1 Packet send, no response or timeout yet

0 OK response received, data accepted by partner or


data received from partner

1 Operand type error, partner indicates that the


specified type is not supported

2 Offset error, partner indicates that the specified offset


is not allowed. For example requesting FW20000

4 Size error, partner indicates that the number of


operands send or requested is too large

128 Timeout, no response received from partner

4.18.9 Data received by handlers


Handlers write data to flagwords if a packet is received. Also written is the IP address, port
number of the datapackets sender. The following table lists all data stored (FWx is the in-
stalled flagword):
FWx Number of packets received by handler
FWx + 1 Sender IP address
FST Version 4.02.21 Manual 238
FWx + 2 Sender IP address
FWx + 3 Sender IP address
FWx + 4 Sender IP address
FWx + 5 Sender port number
FWx + 6 Number of databytes
FWx + 10 Start of actual datapacket
Note that the received size is the number of bytes, not the number of words.

4.18.10 Time offsets


Some values for the time offset:
Anchorage -9
Buenos Aires -3
London 0
Wetzlar +1
Cairo +2
Moscow +3
Jakarta +6

4.18.11 Error codes


If FU32 is <> 0 then the function module returned an error, following table lists the error
codes:
99 Invalid parameter
100 TCP/IP driver not loaded
101 Illegal IP address
102 Illegal table index (> 15)
103 Table position empty
104 Invalid port number
105 Invalid handler index (>15)
106 TCP send not possible, not connected
107 String driver not loaded
108 Illegal string number (too high)
109 Error in host- or domain name
110 Error modifying string
111 Invalid TCP handler
112 Unknown operand type
113 Datablock too large
114 Invalid value for status flagword
115 Table position already waiting for response
116 Invalid operand number to store response
117 Cannot send, cable disconnected, collision or other error
118 TFTP already sending or receiving

FST Version 4.02.21 Manual 239


5 Help Topics
Understanding the Help Viewer
This version of the FST Online Help is built using the Microsoft HTML Help system.
HTML Help files are displayed in a browser-like window, not in the full version of Internet
Explorer with all its toolbars, favorites lists, and icons visible to the end user, but in a three-
paned help window. The top pane contains the toolbar, the left pane contains the navigation
methods, and the right pane displays the topic - with all the functionality of the browser
intact. The navigation pane contains the Contents, Index and Search tabs. By clicking topics
in the table of contents or the Index you can explore any information within the Help. From
the Search tab you can locate every occurrence of a word or phrase that may be contained in
any topic.
Viewing topics
In a topic, you can click underlined words to see other information related to the topic.
To link to another topic, link to a Web page, link to a list of other topics, or link to an applica-
tion, click the colored underlined words.
To see whether a word or phrase contained in a topic is in the Index, select (highlight) the
word or phrase and press F1.
Locating Information in the FST Online Help
There are several methods for finding the information you need, and numerous ways to
combine methods so that your search is quick and efficient. The options discussed below
are accessible in the navigation pane in the left part of the MSDN Library viewer.
To find a topic from the viewer's navigation pane
Table of Contents Click the Contents tab to browse through topics by title. The table of
contents is an expandable list of everything that is available in the FST Online Help.
Keyword Index Click the Index tab to see a list of index entries, and then either type a word
or scroll through the list. Similar to the index in a printed book, topics are often indexed
under more than one entry.
Full-Text Search Click the Search tab to locate every occurrence of a word or phrase that
may be contained in a topic.
To view a topic found through any of these navigation methods, click the entry in the naviga-
tion pane to display the corresponding topic in the topic pane.
Context Help
Use the Context Help command to obtain help on some portion of FST.
When you choose the toolbar's Context Help button , the mouse pointer will change to
an arrow and question mark. Then click somewhere in the FST window, such as another
toolbar button. The help topic will be shown for the item you clicked.
If you press the F1 key the help topic will be shown for the active window or command.
To hide or show the navigation pane
The navigation pane is displayed by default in the Help Viewer. If you want to hide it, click
View from the toolbar, then uncheck the Navigation Tabs option. To display the navigation
pane, click View from the toolbar and check the Navigation Tabs option.
Note! If you close the browser with the navigation pane hidden, it will reopen that way.

FST Version 4.02.21 Manual 240


5.1 Navigating Using the Table of Contents
To view the table of contents, click the Contents tab in the navigation pane.

To view a topic, click the topic in the table of contents.


To expand or contract a node
• To open an item in the table of contents, click the plus sign (+) in front of a node to
expand that node, then double-click the item you want to see.
• Click the minus sign (-) in front of a node to contract that node.
• You also can navigate the nodes by using the UP and DOWN arrow keys to move ver-
tically, and the LEFT and RIGHT arrow keys to expand and contract the nodes.
• You can also use the Previous and Next buttons on the toolbar.

FST Version 4.02.21 Manual 241


5.2 Looking for Index

To locate a topic using the index


In the navigation pane, click the Index tab and then either type or select a keyword you want
to find information about.
After you have selected a keyword, click Display.
From the list of topics found, select the topic you want and then click Display.

5.3 Finding Information with Full-Text Search


A basic search of topics consists of the word or phrase you want to find. You can use wild-
card expressions, nested expressions and Boolean operators to refine your search.

FST Version 4.02.21 Manual 242


To perform a full-text search
In the navigation pane, click the Search tab and then type the word or phrase you want to
find.
Click List Topics. Your search will return the first 500 hits.
Highlight the topic you want, and then click Display. (Alternatively, you can display any topic
by double-clicking it.)
Search Syntax
The basic rules for formulating queries are as follows:
Searches are not case-sensitive, so you can type your search in uppercase or lowercase
characters.
You can search for any combination of letters (a-z) and numbers (0-9). You cannot search for
single letters (a, b, c, etc.) and the following reserved words: an, and, as, at, be, but, by, do,
for, from, have, he, in, it, not, of, on, or, she, that, the, there, they, this, to, we, which, with,
you.
Punctuation marks such as the period (.), colon (:), semicolon (;), comma (,), and hyphen (-)
are ignored during a search.
Group the elements of your search using "double quotes" or (parentheses). You cannot
search for quotation marks.
Note! If you are searching for a filename with an extension, you should group the entire
string in double quotes, ("filename.ext"). Otherwise, the search will treat the period as an
OR operator.

FST Version 4.02.21 Manual 243


Words, Phrases, and Wildcards
You can search for words or phrases and use wildcard expressions. The table below de-
scribes the results of these different kinds of searches.
Search for Example Results

A single word Select Topics that contain the word "se-


lect." (You will also find its gram-
matical variations, such as "selec-
tor" and "selection").

A phrase "new operator" Topics that contain the literal phrase


–or– "new operator" and all its grammati-
'new operator' cal variations. Without the quotation
marks, the query is equivalent to
specifying a new AND operator,
which will find topics containing both
of the individual words, instead of
the phrase.

Wildcard expressions Esc* Topics that contain the terms "ESC,"


"escape," "escalation," and so on.
The asterisk cannot be the only
character in the words.

80?86 Topics that contain the terms


"80186," "80286," "80386," and so
on. The question mark cannot be the
only character in the term.

*86 Topics that contain the terms "386,"


"486," "x86," "QEMM386," "8086,"
and so on.

Operators: AND, OR, NOT, and NEAR


The AND, OR, NOT, and NEAR operators allow you to refine your search. The following table
shows how to use each of these operators.
Search for Example Results

Both terms in the same topic dib AND palette Topics containing both the
–or– words "dib" and "palette."
dib & palette

Either term in a topic raster OR vector Topics containing either the


–or– word "raster" or the word
raster | vector< "vector."

The first term without the ole NOT dde Topics containing the word
second term –or– "OLE," but not the word
ole ! dde "DDE."

Both terms in the same user NEAR kernel Topics containing the word
topic, close together "user" within eight words of
the word "kernel."

FST Version 4.02.21 Manual 244


Rules for Nested Expressions
The basic rules for searching topics using nested expressions are as follows:
You can use parentheses to nest expressions within a query. The expressions in parenthe-
ses are evaluated before the rest of the query.
If a query does not contain a nested expression, it is evaluated from left to right. For exam-
ple, "Control NOT active OR dde" finds topics containing the term "control" without the
term "active", or topics containing the term "control" and not "dde". (On the other hand,
"control NOT (active OR dde)" finds topics containing the term "control" without either of
the terms "active" or "dde".)
Nesting allows you to create more complex search expressions. For example, "control AND
((active OR dde) NEAR window)" finds topics containing the term "control" along with the
terms "active" and "window" close together, or containing "control" along with the terms
"dde" and "window" close together.
You cannot nest expressions more than five levels deep.
To highlight words in searched topics
When searching for words in Help topics, you can specify that each occurrence of the word
or phrase you searched for is highlighted in the topics that are found.
To highlight all instances of a search word or phrase, click Options on the toolbar, and then
click "Search Highlight On".
To turn off this option, click Options on the toolbar, and then click "Search Highlight Off".
Note! If you are viewing a long topic, only the first 500 instances of a search word or phrase
will be highlighted.
Navigating Using the Table of Contents
To view the table of contents, click the Contents tab in the navigation pane.

FST Version 4.02.21 Manual 245


6 Index
Allocation list 22, 32, 52, 53, 54, 64, FEC Standard 11, 43, 44, 110, 140, 141,
65, 68, 81, 149, 196 142, 143, 166, 203, 220, 225, 226
Analog 140 Find and replace 66
Autostart 41 Font 33, 64, 67, 69, 81
CI command 13, 42, 63, 99, 101, 102, Formatting 65
109, 112, 218 FST operand 46, 47
Clipboard 16, 17, 19, 47, 64, 66 Function module 12, 107, 147, 231, 237
Clock 108, 109 HC01 142, 219
COM 11, 54, 55, 56, 80, 87, 100, 101, HC02 110, 219, 225, 226
219, 220, 221, 223 HC0X 11, 12, 43, 44, 87, 92, 95, 100, 103,
Communication 11, 12, 44, 100, 148, 106, 107, 108, 110, 140, 141, 142, 166,
154, 158, 160, 166, 168, 169, 219, 220, 203, 219, 220, 223
224 HC16 11, 101
Communication port 55, 79 HC20 10, 11, 92, 107, 226
Controller COM port 44 IF 70, 71, 72, 73, 74, 75, 76, 77, 78, 90,
Digital 114, 212 94, 156, 157, 158, 159, 196, 197, 198,
Download 10, 11, 12, 13, 16, 21, 22, 28, 203, 205, 214, 215, 216, 217, 229, 230
29, 31, 32, 33, 40, 41, 42, 43, 44, 45, Import 24, 36, 201, 206
46, 49, 51, 62, 63, 167 Imported module 23, 32, 36
Drive 9, 11, 43, 44, 51, 62, 63, 110, 142, IO area 46, 48, 83
144, 148, 156, 160, 162, 175, 187, 220, IO module 46, 47, 48, 82, 83, 99
226 IO script 82, 83, 84
Driver 9, 10, 11, 12, 22, 32, 42, 46, 48, Kernel 44, 88, 103
49, 50, 51, 55, 57, 82, 84, 85, 88, 92, 99, Keyword 67, 188, 240, 242
100, 102, 108, 110, 113, 140, 143, 144, LOAD 72, 73, 75, 76, 159, 196, 197, 198,
145, 146, 147, 148, 156, 159, 160, 161, 205, 214, 215, 216, 217
162, 165, 166, 167, 169, 170, 171, 174, Main runtime program 145, 185, 190,
175, 176, 177, 180, 183, 184, 185, 186, 191, 192, 194, 195, 199
187, 189, 190, 192, 193, 195, 196, 199, Module call 64, 65, 67, 68, 162
203, 218, 219, 220, 225, 226, 227, 228, Operand 32, 42, 52, 53, 54, 58, 59, 60,
232, 233, 236, 239 61, 63, 64, 65, 68, 69, 70, 73, 74, 75, 81,
Driver files 46 88, 91, 92, 93, 94, 97, 102, 103, 105,
Error 12, 42, 56, 57, 91, 95, 96, 97, 98, 148, 149, 152, 163, 164, 199, 200, 225,
99, 100, 101, 104, 105, 113, 140, 141, 228, 229, 230, 238
142, 148, 152, 153, 154, 155, 156, 163, Operating system 49, 64, 88
165, 168, 169, 170, 171, 172, 173, 174, OTHRW 70, 71, 72, 73, 74, 90, 215
175, 178, 179, 180, 181, 182, 183, 184, Password 45, 56, 57, 58, 63, 91, 92, 102
197, 198, 199, 207, 221, 222, 223, 224, Print 17, 31, 32, 33, 47, 49, 53, 67, 81,
228, 229, 230, 231, 232, 233, 234, 235, 145, 152
236, 237, 238, 239 Program module 94, 157, 169, 199, 203,
Error number 98, 99, 147, 163, 170, 171, 205
172, 173, 174 Real-time clock 10, 108, 109
Error output 42, 97, 98 RESET 71, 72, 73, 74, 90, 91, 94, 96
Error program 42, 96, 97, 98, 113, 141, Retentive 91, 92, 107, 175
149 RS232 10, 54, 56, 80, 224
FEC 11, 12, 43, 44, 87, 92, 95, 96, 103, Serial interface 221
106, 110, 140, 141, 142, 143, 166, 167, SET 70, 71, 72, 73, 74, 90, 91, 94, 197,
168, 169, 203, 220, 221, 223, 225, 226 198, 203, 205
FEC Compact 43, 44, 110, 141, 142, 143, Shift 75
166, 203, 220, 225, 226 Shortcut 17, 64, 65, 67
FST Version 4.02.21 Manual 246
Source 22, 23, 24, 29, 30, 36, 38, 45, 66,
179, 180, 182, 219, 232
Start 13, 14, 20, 41, 42, 43, 75, 91, 95,
96, 97, 110, 142, 144, 195, 206, 208,
214, 215, 216, 217, 227
Start/stop input 41, 95
Startup batch 43
Startup file 110
Step 11, 12, 60, 69, 70, 71, 72, 73, 74,
75, 77, 94, 104, 167, 205, 214
Step number 95, 96, 98, 104
String module 177
Subroutine 35, 37
THEN 70, 71, 72, 73, 74, 75, 76, 77, 78,
90, 94, 155, 156, 157, 158, 159, 176,
196, 197, 198, 199, 203, 205, 214, 215,
216, 217, 229, 230
Timer 12, 59, 70, 73, 89, 90, 93, 105,
111, 195, 197, 199
TO 71, 72, 74, 75, 76, 159, 196, 197, 198,
199, 205, 214, 215, 216, 217
Undo 17, 18, 66
Version 1, 10, 11, 12, 13, 26, 32, 35, 38,
41, 95, 148, 175, 184, 219, 220, 224

FST Version 4.02.21 Manual 247


7 Modules
Module name Meaning

7.1 32 Bit Arithmetik


LADD Addition of 32-bit values.
LCMP Comparison of 32-bit values.
LDIV Division of 32-bit values.
LMUL Multiplication of 32-bit values.
LNEG Change of sign for a 32-bit value.
LSUB Subtraction of 32-bit values.

7.2 AS-Interface modules


ASI_Mode Sets the reaction of the ASI driver to configuration errors
ASI_Stat Interrogates execution control level (OUF) flags
ASI_Para Transfer a parameter to an ASI slave at runtime
ASI_Res Restart cyclic update

7.3 Modules for accessing the user interface


SCRATTR Calculate screen attribute
SCRCLEAR Clear screen
SCRCUGPO Determine current position of cursor
SCRCUSPO Set current position of cursor
SCRCUTYP Set cursor type
SRCDOKEY Execution of a keyboard input
SCREDIT Add an input field
SCREKBD Clear keyboard buffer
SCRFILL Fill an area with space characters
SCRFKEY Specify the label of a function key
SCRFLAGS Set feature flags
SCRFLIP Toggle between screen page and FST CI
SCRFRAME Draw a frame
SCRKBD Interrogate the last input on the keyboard
SCRMSG Display a string in the message line
SCRNEW Draw a new, blank screen
SCRPUTS Write a string at a set position on the screen
SCRUPDT Refresh screen contents
SCRWRITE Write a string at a set position on the screen
SCRW0808 8x8 block characters
SCRW0814 8x14 block characters
SCRXCHG Switch between screen pages

7.4 File Handling Modules


FCREATE File create
FOPEN File open
FCLOSE File close
FCLOSALL File close all
FDELETE File delete
FSEEK File seek
FSEEKX File seek extended
FWRITE File write
FST Version 4.02.21 Manual 248
Module name Meaning
FREAD File read
FWRITSTR File write string
FREADSTR File read string

7.5 Get date and time modules


F10 Set time
F11 Set date
F12 Get time
F13 Get date

7.6 FEC Remote E/A-Expansion


REMDIAG The Remote FEC software package also includes software for
monitoring the status of the FEC Remote I/O devices from within
the user application program. If you want to include this capability
in your application, you need to import the REMDIAG Remote FEC
error counter into your FEC MASTER project.

7.7 Function blocks


F40 Configuration of a fieldbus participant
F41 Read parameter field
F42 Write parameter field
F43 Reset all cyclical outputs on the fieldbus.
F44 Status interrogation for a fieldbus participant

F47 Set error handling


F48 General configuration

7.8 Festo Fieldbus Slave Module


FBSLAVE If you want to use the IPC to become a fieldbus slave, you must
enter and parameterise the FBSLAVE driver in the configurer.

7.9 Incremental Encoder for FEC and HC0X CPUs


ABRESET To reset the counter value call the module ABRESET.
ABMODE Pin I0.7/I1.0/I3.0 can be used to reset the counter. The counter
will be reset if I0.7/I1.0/I3.0 is active and a positive edge is de-
tected on one of the A/B inputs. You can choose between 4
modes.

7.10 Profibus DP (CP62) Modules DP


DP_USIF Get the current USIF status
DP_GETSL Checks whether a diagnostic request is present
DP_GETDG Obtains diagnostic information from a DP slave
DP_CONTR Profibus function „Global Control Request“

7.11 Profibus FMS Drivers


FMSREAD Read (polled response)
FMSWRIT write (polled response)
PID Driver PID Driver
PIDCFM PID Regulator

FST Version 4.02.21 Manual 249


Module name Meaning

7.12 Positioning with AM10, AM11 or AM20 or AM30


AMXX (only AM10, 11, Positioning with stepper motor or servo electrics
20)
AM30CFM Positioning with servo pneumatics

7.13 Function blocks to control the execution of programs


F4 Start cyclical execution of a program
F8 Stop all cyclical programs
F23 Interrogate whether a program is ready for execution
F26 Control programs whose numbers are stored in variables

7.14 Serial communication


OPENCOM Open serial interface
CLOSECOM Close serial interface
GETCOM Send character
PUTCOM Receive character
PRINTCOM Send string
READCOM Receive string (incl. delimiter)
READLCOM Receive string (excl. delimiter)

F30 Set interface parameters


F31 Activate CI
F32 Clear buffers

F34 Interrogate status

F35 Change delimiter

BREAKCOM Set/Reset hardware break (SERIALDR only)


SETRTS Active handshake for RS485 (SERIALDR only)

IS485 Check if handshake is active (SERIALDR only)

7.15 Further modules


Blink General blink bits
FIFO "First-in-first-out" memory
LOADSYNC Synchronisation of project (re)loading

7.16 Fast Counter for FEC and HC0x


FECCNTR Defining the operating parameters of each Counter, activating
or resetting each Counter, checking the status and current
value of each Counter

7.17 String modules


STRADDR Determine internal address of a string

STRAPPND Append a character at the end of a string


STRATOH Convert a hexadecimal string into a word

FST Version 4.02.21 Manual 250


Module name Meaning

STRATOI Convert a string into a signed word


STRATOIX Convert a string into a signed word

STRATOU Convert a string into an unsigned word

STRCAT Combine two strings in a third string

STRCHECK Memory check

STRCHGET Extract a character from a string

STRCHSET Replace a character in a string

STRCI Execute a CI command

STRCLR Delete a string

STRCMP Compare two strings character by character,


differentiating between upper and lower case
STRCPY Copy string

STRDEL Delete part of a string

STRDUMP Display a number of strings

STRFILL Create a string with a specified number of identical characters


STRFILLW Fill a string with another string, right- or left-justified

STRFINDC Find a character in a string

STRFINDS Find a substring in a string

STRGROW Enlarge the string memory for an individual string


STRHTOA Convert a word into a hexadecimal string
STRICMP Compare two strings character by character,
not differentiating between upper and lower case

STRINIT Initialisation or re-initialisation

STRINSRT Insert a string into another string


STRITOA Convert a signed word into a string

STRLEFT Left substring

STRLEN Length of a string

STRLOWER Convert a string to lower case

STRMID Convert a string to lower case

FST Version 4.02.21 Manual 251


Module name Meaning
STRNCMP Compare the first characters of two strings,
differentiating between upper and lower case

STRNICMP Compare the first characters of two strings,


not differentiating between upper and lower case
STRRIGHT Right substring

STRSTAT Status of string driver

STRUPPER Convert a string to upper case

STRUSAGE Used and free memory

STRUTOA Convert an unsigned word into a string

7.18 Modules for TCP/ IP


EASY_R Request a block of operands from another IPC.
EASY_S Send a block of operands to another IPC.
IP_ALIVE Check whether IP address is known
IP_IP Get/ set our IP address.
IP_MASK Get/ set our IP netmask
IP_TABLE Get/ set IP address from/ to table.
DNS_NAME Get/set hostname and domain name
DNSRESOL Resolve hostname to IP address
IP_DNS Get/set IP address for DNS server

IP_GATE Get/set IP address for gateway

IP_MAC Get Ethernet MAC address from network module


PING Ping
SNTPTIME Start time synchronisation
TCP_CLOS Close TCP connection

TCP_HAND Activate TCP handler

TCP_OPEN Open TCP connection

TCP_RES Reset TCP handler

TCP_SEND Send a TCP datapacket

TCP_STAT Status of TCP connection


TCP_STR Send a string through TCP

TFTPFILE Send / request a file

UDP_FW Send a FW block to another IPC

UDP_HAND Activate UDP handler


UDP_SEND Send an UDP datapacket
FST Version 4.02.21 Manual 252
Module name Meaning
UDP_STR Send an UDP datapacket

FST Version 4.02.21 Manual 253

You might also like