FST4 Manual
Non-author Non-aut horiized DO DOCversion versi on Bernhard Plagemann Beck IPC GmbH http:/ htt p:/ / www www.be .beck ck-ipc -ipc.c .com om// fst mail to:
[email protected]
FST Version 4.02.21 Manual
1
Contents 1
Release Notes ....................................... ........................................................... ........................................ ......................................... ............................ ....... 9 1.1 Installation of the FST 4.02 ....................................... ........................................................... ........................................ ...................... 9 1.2 Uninstalling................................................... Uninstalling............................... ........................................ ........................................ .................................. .............. 9 1.3 Known Problems................................... Problems....................................................... ........................................ ........................................ ...................... 9 1.3.1 ONLINE HELP ...................................... .......................................................... ........................................ .................................. .............. 9 1.3.2 EXTERNAL TOOLS....................... TOOLS........................................... ........................................ ....................................... ................... 10 1.3.3 TCP/IP........................... TCP/IP............................................... ........................................ ......................................... .................................... ............... 10 1.3.4 IO1x/IO4x........................................................ IO1x/IO4x.................................... ........................................ ........................................ ...................... .. 10 1.1.1 HC1X + RTC + DRAD + FESTOBUS ....................................... ...................................................... ............... 10 1.1.2 HC2X + AS-INTERFACE (CP96)................... (CP96) ....................................... ........................................ ...................... .. 10 1.1.3 HC2X + OM22 PLC SAFETY..................... SAFETY......................................... ......................................... .......................... ..... 10 1.1.4 FIND & REPLACE ...................................... .......................................................... ......................................... .......................... ..... 10 1.1.5 STARTUP STARTUP DRIVE ....................................... ........................................................... ......................................... .......................... ..... 11 1.1.6 FILE HANDLING HANDLING WITH FLOPPY DISK ....................................... ................................................... ............ 11 1.1.7 ONLINE 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.................... 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 Windo ws Basics.................................... 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............................ Border................................................ ......................................... .......................... ..... 15 2.1.1.4 Scrollbars.................................. Scr ollbars...................................................... ......................................... .................................... ............... 15 2.1.2 The Toolbar............................. Toolbar................................................. ........................................ ......................................... .......................... ..... 16 2.1.3 The Status Bar.................. Bar ...................................... ........................................ ........................................ ................................ ............ 17 2.1.4 The Menu.................................... Menu........................................................ ........................................ ........................................ ...................... .. 17 2.1.4.1 The Window Menu Commands.................................. Commands...................................................... ...................... .. 18 2.1.4.2 The Edit Menu Commands ........................................ ............................................................ ...................... .. 18 2.1.5 Viewing Viewing Properties ...................................... .......................................................... ......................................... .......................... ..... 19 2.1.6 Terminating FST ...................................... .......................................................... ........................................ ............................. ......... 19 2.2 Getting Help ....................................... ........................................................... ........................................ ........................................ ...................... .. 20 2.2.1 The Aboutbox....................... Aboutbox........................................... ........................................ ........................................ ............................. ......... 20 2.2.2 Tip of the Day.............................. Day.................................................. ........................................ ........................................ ...................... .. 20 2.2.3 Help Topics................... 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........................ Comment............................................. .................................... ............... 22 2.3.1.2 Controller Types ........................................ ............................................................ ....................................... ................... 22 2.3.1.3 Organisation Organisatio n on Hard Disk................. Disk ..................................... ......................................... .......................... ..... 22 2.3.2 The Project Tree Window ..................................... .......................................................... .................................... ............... 23 2.3.3 Open an Existing Project.................. Project ...................................... ......................................... .................................... ............... 24 2.3.4 Creating a New Project............................... Project................................................... ......................................... .......................... ..... 25 2.3.5 Close the Current Project ..................................... .......................................................... .................................... ............... 26 2.3.6 The Project Settings ....................................... ........................................................... ........................................ ...................... .. 26 2.3.6.1 The Project Directory.......... Direct ory.............................. ........................................ ........................................ ...................... .. 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.................... Controller ...................... .. 29 2.3.11 Uploading Project Sources from the Controller..................... 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....................... Restore........................................... ......................................... .......................... ..... 34 2.5 Managing Control Programs........................... Programs............................................... ........................................ ............................. ......... 34 2.5.1 Creating New Programs ....................................... ............................................................ .................................... ............... 34 2.5.2 Importing Modules from the Library ...................................... ......................................................... ................... 36 2.5.3 Program Properties........................ Properties............................................ ........................................ ....................................... ................... 37 2.5.4 Deleting a Program ..................................... ......................................................... ......................................... .......................... ..... 38 2.5.5 Open a Program for Editing.................. Editing ...................................... ........................................ ................................ ............ 39 2.5.6 Compiling a Program ...................................... .......................................................... ........................................ ...................... .. 39 2.5.7 Selecting Programs for Download............................ Download................................................ ................................ ............ 40 2.6 Controller Settings ....................................... ........................................................... ........................................ ................................ ............ 41 2.6.1 Run Mode (Controller Settings).................. Settings) ...................................... ......................................... .......................... ..... 41 2.6.2 Drives (Controller Settings) ...................................... .......................................................... ................................ ............ 43 2.6.3 Options (Controller Settings) ....................................... ........................................................... ............................. ......... 44 2.6.4 Password (Controller Settings)....................... Settings)........................................... ........................................ ...................... .. 45 2.6.5 Download (Controller Settings) ...................................... ........................................................... .......................... ..... 45 2.7 The IO Configuration.................................... Configuration........................................................ ........................................ ................................ ............ 46 2.7.1 The IO Configuration Window ........................................ ............................................................. .......................... ..... 46 2.7.2 Adding and Editing IO Modules.................. Modules ...................................... ......................................... .......................... ..... 47 2.8 The Driver Configuration.................... Configuration ........................................ ........................................ ........................................ ...................... .. 49 2.8.1 The Driver Configuration Window ...................................... .......................................................... ...................... .. 49 2.8.2 Adding a New Driver............................. Driver................................................. ........................................ ................................ ............ 50 2.8.3 Editing Driver Options ........................................ ............................................................ ....................................... ................... 51 2.9 The Allocation List........................................ 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....................................... List......................................... .. 54 2.10 Online 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 Contro ller Password................................ Password.................................................... ............................. ......... 57 2.10.4 Changing the Controller Controll er Password........................... Password............................................... ................................ ............ 58 2.10.5 The Online Online Display Display ..................................... ......................................................... ......................................... .......................... ..... 58 2.10.6 Online Goto............................. Goto................................................. ........................................ ......................................... .......................... ..... 60 2.10.7 Changing the Online Display Format ........................................ ....................................................... ............... 60 2.10.8 Changing the Update Interval Interval of the Online Display Display ................................ ................................ 60 2.10.9 Modifying Online Display Operand Values Values ......................................... .............................................. ..... 61 2.10.10 File Transfer ...................................... .......................................................... ........................................ ................................ ............ 62 2.10.11 The Online CI Terminal................. Terminal ..................................... ......................................... .................................... ............... 63 2.11 Programming in Statement List....................................... List........................................................... ............................. ......... 64 2.11.1 The Statement List Editor ..................................... .......................................................... .................................... ............... 64 2.11.2 The Shortcuts Window ...................................... .......................................................... ....................................... ................... 67 2.11.2.1 Inserting Module Calls................... Calls ....................................... ........................................ ................................ ............ 67 2.11.2.2 Statement List Preferences ..................................... .......................................................... .......................... ..... 68 2.11.3 Statement List Online ........................................ ............................................................ ....................................... ................... 69 2.11.4 Statement List Program Structure................................................ Structure............................................................ ............ 70 2.11.4.1 Step program ....................................... ........................................................... ......................................... .......................... ..... 70 2.11.4.2 Parallel logic program.................... program ........................................ ........................................ ................................ ............ 71 2.11.4.3 Executive part ...................................... .......................................................... ......................................... .......................... ..... 72 3 FST Version 4.02.21 Manual
2.11.4.4 Comments ........................................ ............................................................ ........................................ ............................. ......... 72 2.11.5 Statement List Instructions Reference................. 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.................. calls ...................................... ........................................ ........................................ ............................. ......... 77 2.11.6 Customising FST ........................................ ............................................................ ......................................... .......................... ..... 78 2.11.6.1 The Project Directory.................................. Directory...................................................... ....................................... ................... 78 2.11.6.2 Communication Port Preferences ...................................... ..................................................... ............... 79 2.11.6.3 Statement List Preferences ..................................... .......................................................... .......................... ..... 80 2.11.6.4 Print Preferences.................... Preferences ........................................ ........................................ ....................................... ................... 81 2.11.7 The FST Runtime Runtime Library ..................................... .......................................................... .................................... ............... 82 2.11.7.1 IO Scripts (Runtime Library).................... 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.................. Tool ...................................... ............................. ......... 86 3 The FST PLC Operating System (Kernel) ........................................ ............................................................ ...................... .. 88 3.1 PLC operands ....................................... ........................................................... ........................................ ....................................... ................... 88 3.1.1 Inputs Inputs ...................................... .......................................................... ........................................ ......................................... .......................... ..... 88 3.1.2 Outputs................................. Outputs..................................................... ........................................ ........................................ ............................. ......... 88 3.1.3 Flags Flags ....................................... ........................................................... ........................................ ......................................... .......................... ..... 89 3.1.4 Registers.................... Register s........................................ ........................................ ........................................ ....................................... ................... 89 3.1.5 Timers Time rs..................... ......................................... ........................................ ........................................ ........................................ ...................... .. 89 3.1.6 Counters ........................................ ............................................................ ........................................ ....................................... ................... 90 3.1.7 Constants........................................................ Constants.................................... ........................................ ........................................ ...................... .. 90 3.1.8 Function units.............................. units.................................................. ........................................ ........................................ ...................... .. 90 3.1.9 Programs Progr ams ....................................... ........................................................... ........................................ ....................................... ................... 91 3.1.10 Program statuses.................................... statuses........................................................ ......................................... .......................... ..... 91 3.1.11 Errors.. Error s...................... ........................................ ........................................ ........................................ ....................................... ................... 91 3.1.12 Initial execution flags................................... 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 Multitasking ........................................ ............................................................ ........................................ ........................................ ...................... .. 94 3.2.1 The Start/Stop Switch........................................... 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.......................... Errors.............................................. ....................................... ................... 98 3.3.4 Error handling function modules................. 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.................... commands........................................ ......................................... ........................ ... 106 4 FST Version 4.02.21 Manual
3.4.11 Commands for forcing inputs and outputs.................. outputs ....................................... ........................ ... 106 3.4.12 Commands embedded in drivers........................................... drivers........................................................ ............. 108 3.5 The Real-time Clock ....................................... ........................................................... ........................................ ........................... ....... 108 3.5.1 Setting the clocks manually.................. manually ...................................... ........................................ .............................. .......... 109 3.5.2 Function modules for setting and reading the real-time real-tim e clock ............... 109 3.6 Miscellaneous ....................................... ........................................................... ........................................ ..................................... ................. 110 3.6.1 Mass storage for programs, drivers and files................. files ...................................... ........................ ... 110 3.6.2 RAM for programs and drivers ....................................... ............................................................ ........................ ... 110 3.6.3 Function blocks ........................................ ............................................................ ........................................ ........................... ....... 111 4 FST Drivers Reference Refere nce.................... ........................................ ........................................ ........................................ .............................. .......... 113 4.1 Input and output modules ...................................... .......................................................... ........................................ .................... 113 4.1.1 PLC security...................................... security.......................................................... ......................................... .................................. ............. 113 4.1.2 Digital input and output modules ........................................ ............................................................ .................... 114 4.1.2.1 IMXX ....................................... ........................................................... ........................................ ..................................... ................. 114 4.1.2.2 OMXX OMXX ....................................... ........................................................... ......................................... .................................. ............. 117 4.1.2.3 TM10................................................ TM10............................ ........................................ ........................................ ........................... ....... 125 4.1.2.4 ASXX ........................................ ............................................................ ......................................... .................................. ............. 125 4.1.2.5 Address assignment matrix.................... matrix ........................................ ........................................ .................... 127 4.1.3 Analog input and output modules ....................................... ........................................................... .................... 129 4.1.3.1 IO1X...... IO1 X.......................... ........................................ ........................................ ........................................ .............................. .......... 130 4.1.3.2 IO4X...... IO4 X.......................... ........................................ ........................................ ........................................ .............................. .......... 132 4.1.3.3 I06X..................................... I06X......................................................... ........................................ ........................................ .................... 137 4.1.3.4 IO7X...... IO7 X.......................... ........................................ ........................................ ........................................ .............................. .......... 137 4.1.3.5 Address assignment matrix.................... matrix ........................................ ........................................ .................... 139 4.2 FEC and HC0x.................. HC0x ...................................... ........................................ ........................................ ..................................... ................. 140 4.2.1 Local Ios.................. Ios ...................................... ........................................ ........................................ ........................................ .................... 140 4.2.1.1 FEC Standard................. Standard ..................................... ........................................ ......................................... ........................ ... 140 4.2.1.2 FEC Compact..................... Compac t......................................... ........................................ ........................................ .................... 141 4.2.1.3 HC0X ........................................ ............................................................ ......................................... .................................. ............. 141 4.2.1.4 Debouncing Debouncing of Inputs ....................................... ........................................................... .............................. .......... 141 4.2.2 IO extension.................. extension ...................................... ........................................ ......................................... .................................. ............. 141 4.2.3 Analogue Potentiometer ....................................... ............................................................ .................................. ............. 142 4.2.4 Rotary Switch................................. Switch..................................................... ........................................ ..................................... ................. 142 4.2.5 Fast counters ........................................ ............................................................ ........................................ .............................. .......... 142 4.2.6 Incremental Encoder...................... Encoder.......................................... ........................................ ..................................... ................. 143 4.3 Actuator Sensor Interface ...................................... .......................................................... ........................................ .................... 144 4.3.1 The ASi configurer ...................................... .......................................................... ......................................... ........................ ... 144 4.3.2 CI commands.......................... commands.............................................. ........................................ ......................................... ........................ ... 146 4.3.3 Error numbers................... number s....................................... ........................................ ........................................ .............................. .......... 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.......................... commands.............................................. ........................................ ......................................... ........................ ... 156 4.4.8 Error numbers................... number s....................................... ........................................ ........................................ .............................. .......... 156 4.5 Festo Fieldbus Slave ...................................... .......................................................... ........................................ ........................... ....... 156 4.5.1 Selecting the driver and assigning parameters............................... parameters...................................... ....... 156 4.5.2 How to use the module FBSLAVE ........................................ ......................................................... ................. 157 4.5.3 Cyclic updates....................................... updates........................................................... ........................................ .............................. .......... 158 4.5.4 Get status.......................... status.............................................. ........................................ ........................................ .............................. .......... 158 4.5.5 A-cyclic updates................... updates ....................................... ........................................ ........................................ ........................... ....... 158 4.5.6 Sample program ...................................... .......................................................... ........................................ ........................... ....... 159 5 FST Version 4.02.21 Manual
4.6 Profibus DP (CP62) ........................................ ............................................................ ........................................ ........................... ....... 159 4.6.1 Selecting the driver and assigning parameters............................... parameters...................................... ....... 159 4.6.2 Configuration............................................ Configuration........................ ........................................ ........................................ ........................... ....... 160 4.6.3 Error messages from the driver.................. driver ...................................... ......................................... ........................ ... 160 4.6.4 Modules................................ Modules.................................................... ........................................ ........................................ ........................... ....... 161 4.7 Profibus FMS (CP62).................. (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 director y........................................ ............................................................ ........................................ ........................... ....... 163 4.7.5 Error return codes from function modules................... modules ....................................... ........................... ....... 165 4.7.6 Error codes in status variable ...................................... .......................................................... ........................... ....... 165 4.7.7 Heterogeneous networks................................... 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................................. FEC...................................................... .................................. ............. 167 4.8.4 Master at Runtime ...................................... .......................................................... ......................................... ........................ ... 168 4.8.5 Slave at Runtime ........................................ ............................................................ ......................................... ........................ ... 168 4.8.6 Diagnostic Program Module (REMDIAG).............................. (REMDIAG)............................................... ................. 169 4.9 File Handling Modules ....................................... ........................................................... ......................................... ........................ ... 169 4.9.1 Operation result codes ...................................... .......................................................... ..................................... ................. 174 4.10 Strings................................................ Strings............................ ........................................ ........................................ ..................................... ................. 175 4.10.1 Configuring the driver and assigning assigning parameters .................................. .................................. 175 4.10.2 Initialisation of strings ........................................ ............................................................ ..................................... ................. 175 4.10.3 Extended CI commands for strings strings................... ....................................... ..................................... ................. 176 4.10.4 Modules for handling strings ....................................... ........................................................... ........................... ....... 176 4.11 Screen and Keyboard................. Keyboard ..................................... ........................................ ......................................... ........................ ... 184 4.11.1 Introduction ....................................... ........................................................... ......................................... .................................. ............. 184 4.11.2 Operation of the user interface..................................................... interface............................................................... .......... 185 4.11.3 Functionality.................. Functionality ...................................... ........................................ ......................................... .................................. ............. 185 4.11.3.1 Attributes.......................... Attributes.............................................. ........................................ ......................................... ........................ ... 186 4.11.3.2 Feature flags.................... flags ........................................ ........................................ ......................................... ........................ ... 187 4.11.4 Configuring the driver and assigning parameters .................................. .................................. 187 4.11.5 Initialising the user interface......................................................... 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 use r interface................... interface....................................... .................... 189 4.11.7 Modules for accessing the user interface..................................... 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.................... 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..................................... counters......................................................... ........................................ ..................................... ................. 203 4.14.1 Using the module FECCNTR ...................................... .......................................................... ........................... ....... 203 4.14.2 Required drivers ...................................... .......................................................... ........................................ ........................... ....... 203 4.14.3 Reset of a Fast Counter 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................... Counte r....................................... ......................................... .................................. ............. 205 4.15 Positioning ...................................... .......................................................... ........................................ ........................................ .................... 205 6 FST Version 4.02.21 Manual
4.15.1 Import ...................................... .......................................................... ........................................ ......................................... ........................ ... 205 4.15.2 How to use the module.................. module ...................................... ........................................ ..................................... ................. 206 4.15.3 Overview ........................................ ............................................................ ........................................ ..................................... ................. 206 4.15.4 Get status.......................... status.............................................. ........................................ ........................................ .............................. .......... 207 4.15.5 Move absolute......................... absolute............................................. ........................................ ......................................... ........................ ... 208 4.15.6 Move relative........................... 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.................... acceleration ......................................... ........................ ... 209 4.15.11 Configure PID values (AM20 only) ........................................ ..................................................... ............. 210 4.15.12 Set actual position.................... 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............................................ 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.................. 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 program s........................................ ............................................................ ........................................ .................... 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 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..................... Compac t......................................... ........................................ ........................................ .................... 220 4.17.1.4 FEC Standard................. 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:......................... PS1-CP15:................................ ....... 226 4.18.5 Extended CI commands for TCP/IP ........................................ .................................................. .......... 226 4.18.6 Modules for TCP/IP................... 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.................................. values...................................................... ........................................ .................... 238 7 FST Version 4.02.21 Manual
4.18.9 Data received by handlers ...................................... .......................................................... ........................... ....... 238 4.18.10 Time offsets....................................... offsets........................................................... ........................................ .............................. .......... 239 4.18.11 Error codes........................................... codes............................................................... ........................................ ........................... ....... 239 5 Help Topics............................ Topics................................................ ........................................ ........................................ ........................................ .................... 240 5.1 Navigating Using the Table of Contents................... Contents ....................................... ..................................... ................. 241 5.2 Looking for Index ..................................... ......................................................... ......................................... .................................. ............. 242 5.3 Finding Information with Full-Text Search................................. Search..................................................... .................... 242 6 Index ...................................... .......................................................... ........................................ ........................................ ........................................ .................... 246 7 Modules Modules ....................................... ........................................................... ........................................ ......................................... .................................. ............. 248 7.1 32 Bit Arithmetik ....................................... ........................................................... ......................................... .................................. ............. 248 7.2 AS-Interface modules ........................................ ............................................................ ......................................... ........................ ... 248 7.3 Modules for accessing the user interface.............................. interface................................................... ........................ ... 248 7.4 File Handling Modules ....................................... ........................................................... ......................................... ........................ ... 248 7.5 Get date and time modules............................. modules................................................. ........................................ ........................... ....... 249 7.6 FEC Remote E/A-Erweiterung 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............................... CPUs............................................ ............. 249 7.10 Profibus DP (CP62) Modules DP.................................... DP........................................................ ........................... ....... 249 7.11 Profibus FMS Drivers ..................................... ......................................................... ......................................... ........................ ... 249 7.12 Positioning with AM10, AM11 or AM20 or AM30.......................... 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.................... HC0x ........................................ ......................................... ........................ ... 250 7.17 String modules................................... modules....................................................... ........................................ ..................................... ................. 250 7.18 Modules for TCP/ IP ....................................... ........................................................... ......................................... ........................ ... 252
FST Version 4.02.21 Manual
8
1
Release el ease No Nott es
March March 13th, 13t h, 2001 Here is release rel ease 4.02.21 of o f FST FSTfor for Windows. Windows. This is i s the the second product pro duct release release on CD-R CD-RO OM of the FST for Windows (FST4). 1.1
Install Inst all ation ati on of the th e FST 4.02
When your CD CD drive dri ve has has Aut Autoo Insert Notifi Noti ficatio cationn enabl enabled, ed, a menu will wil l appear with wit h the option opt ion to instal i nstalll FST4. You can also manually init ini tiate iat e the t he instal i nstallat latio ionn by starting start ing SETUP.EX .EXEin t he\ INST INSTALL subdirectory. This version uses uses an Install InstallS Shield setup, which will wil l add appropriate entries entri es in the t he Start Start menu menu for you. If you do not have the permission to t o install inst all programs on your PC PC, this this version can also also be install inst alled ed from the t he self-extracting self-extracti ng file fi le FS FST40221.EX 40221.EXEi n the t he \ INST INSTALL subdire subdir ectory. ct ory. It will wil l try t ry to create create a direc dir ector tory/ y/ folder C:\ FST40221. You You can chang changee this thi s during the t he installation install ation to whatever whatever you like. l ike. This hi s FST FST4 does NOT NOT touch any of your system system INI files fi les (WIN.INI, SYST SYSTE EM.INI,...) M.INI,. ..) It wil wi ll NOT replace repl ace any any system library li brary (xxx.DL (xxx.DLL, xxx.VX xxx.VXD,...) D,...) and it will wil l currentl cur rentlyy NOT NOT t ouch the t he registry regist ry in your box (exce (except pt for the t he Uninstall Uninstall informa infor matition on when when using the InstallShield setup). Also install inst all t he tool t oolss in the t he \ TOOLS folder fol der of the t he CD CD-RO -ROM if required. requi red. Some modules and drivers dri vers that have been been part of former f ormer FS FST releases can can be found in the t he \ OLDLIB folder fol der of t he CDCD-R ROM. Use Use these these drivers only onl y if required requi red for f or old ol d projects. proj ects. Please Please regard regard the t he important import ant information i nformation in the t he RE READMEfiles fi les for the individual i ndividual drivers. 1.2
Uninstalling
If you installed inst alled FS FST 4 using the InstallShield setup, the t he uninstall information i nformation is i s stored in the Windows regist registry. ry. FST FST 4 can be removed from fr om your PCusing usi ng the t he Wi Windows Cont Control rol Panel (Software). To get rid ri d of any FS FST 4 version install inst alled ed from a sel self-ex f-exttracting racti ng zip zip fil f ilee simply remove the installation install ation directory/ folder, usuall usuallyy C: C: \ FST40220, and and all all its it s subdirectori subdirectories es// folders. 1.3
Known Probl ems
1.3. 1.3.11 ONLINE ONLINE HELP HELP The FS FST 4 Onli Online ne Help Help uses the HTML Help Help viewer. This requires requi res that t hat you have Internet Int ernet Explorer 4 or highe hi gherr installed. i nstalled. The HTML HTML Help Help Install Inst allat atiion and Update package p ackage (HHUP (HHUPD.E D.EX XE in the t he \INS \ INST TALL ALL folder) fol der) wil will update your installat i nstallation ion to t o the t he latest version (on a W Windows indows NT NT system system this t his requires that t hat you have admini administrator strator privileges privi leges). ). The The update will wil l not be exec executed uted if i f you already have have a newer version of HTML Help Help install inst alled. ed. Windows indows 2000 users should shoul d not run the t he HT HTML Help Help Installat Instal lation ion and Update Packa Package. ge. Help Help component component updates updates are provided via vi a Windo Windows ws servi service ce packs. packs. For more information inf ormation see see http:/ http: / / www.microso www.microsoftft.co .com. m. If you do not want to t o use Internet Expl Explorer orer the t he contents of the t he FS FST 4 Onli Online ne Help Help are also availabl avail ablee in PDF PDFformat format in the t he fol folder \ MANUA MANUALLS of the t he CDCD-R ROM. FST Version 4.02.21 Manual
9
If you want to make a printout print out of tthe he ent ent ire Onli Online ne Help Help iti t is suggested suggested to t o use the PD PDFverversion. 1.3.2 EXTE XTERNAL TOOLS TOOLS This his version version of FST 4 sti st ill uses uses some DO DOS programs, programs, e.g. the t he OW OWS t ools. ool s. Some of these t hese programs programs will wil l not work correctl correctlyy if the current FS FST project is i s stored in a path that t hat is i s not accordi according ng to t o DOS DOS rules, i.e. i .e. no spaces, spaces, max. 8+3 8+3 characters per fol f older der name. Pl Pl ease ease use a project path that t hat is i s according according to DOS rules if you want to t o use these programs. programs. On Windo Windows ws 2000 all DOS tools tools are troublesome trou blesome and the mouse does not work. wor k. It is currently not possibl possiblee to use Ethernet Ethernet for f or the t he online features of the t he fieldbus configuraconfigurators. 1.3.3 1.3.3 TC TCP/ IP Befor Beforee you can use TC TCP/ IP for programming (download) (downl oad) and online onl ine displays di splays you once have to download downl oad a project proj ect includi i ncluding ng the TCPIP driver dri ver via the t he RS RS232 connection. connect ion. When using TC TCP/ IP for downloading downl oading a project, proj ect, pleas pl easee make make sure not to t o select the t he option opti on " Delete project project before download" in the Control Controller ler Sett Settings, ings, since since this thi s will also stop the TCP/ IP dri driver. When sett setting ing a pass password word for the t he control controller ler this t his will wil l prevent modifica modifi catitions ons for both, bot h, serial seri al and TCP/ IP access. 1.3.4 IO1x/ IO1x/ IO4x IO4x Use the versions with wit h a suffi suffixx " N" together with wit h kernel kernel 2.23.01 or later lat er only. The The versions versions without wit hout " N" will wil l work with wi th any kernel kernel 2.2x, but may block the t he PL PLCcycle cycle on defecti defective ve or missing hardware. Therefore Therefore they t hey are are no longer included inclu ded in the t he FS FST standard instal i nstallat lation. ion. If If required requi red you can install inst all them from the t he folder fol der \ OLDLIB of the install inst allati ation on CD CD-RO -ROM. If an upgrade of your you r CP CPU modul modulee is required requi red pleas pl easee contact your loca lo call Festo dealer. 1.1.1 HC1X + RTC+ DRAD + FESTO FESTOBUS BUS When the t he HC1X is equipped equi pped wit wi t h a ZL16/ ZL16/ ZL17 chip, chip , accessing accessing the t he real-ti real -time me clock the t he FS FST modules modul es F1x F1x will wil l cause the Festo Festo fieldbu fi eldbuss IO update updat e to stop st op after aft er some t ime. The The problem probl em is under investi investiga gatition. on. 1.1.2 HC2X + AS-INTE AS-INTER RFACE ACE (CP96 (CP96)) Only up u p to t o t wo CP CP96 modules modul es with wit h the t he switch swit ch settings sett ings KSW KSW= 1 and KS KSW= 4 can be used together with wit h the t he HC20 CP CPU. The The switch swit ch positions posit ions KSW KSW= 2 and KSW KSW= 3 lead l ead to memory memory conflicts. 1.1.3 HC2X HC2X + OM22 OM22 PLCSAFE SAFETY Only IO modul modules es OM22 OM22 wit wi th a version of P16 or higher higher can be operat operat ed in i n PLC PLCSafety afet y mode on t he HC20 HC20 CPU. PU. 1.1.4 1. 4 FIND & REPLAC PLACE E When using the t he Find Find or Replace function functi on of the t he ST STL Edit di tor, the t he All Allocati ocation on List List Edit di tor or the t he Message Message Wind Window ow pleas pl easee close the Find Find// Replace dialog dialo g box before closing closi ng the th e edieditor/ messag messagee window from which whi ch you opened opened the Find/ Find/ Replace dialog. di alog. The The dialog box will wil l only work for the editor edit or window from fr om which it was opened. opened. If you want to t o searc searchh in another window plea pl ease se close close the dialog di alog box and reopen reopen it again again after aft er you have selec selectt ed the other ot her editor window.
FST Version 4.02.21 Manual
10
1.1. 1. 1.55 STAR STARTUP TUPDRIVE DRIVE Be careful when you change the drive for the STARTUP.BAT file (Controller Settings - Drives). Make sure sur e that t hat the AUT AUTOEXEC.BATof t he control cont rolller looks l ooks for for a START ARTUP.BAT UP.BATon that t hat driv drivee and delete delet e all START ARTUP.BAT .BAT files fi les on any other ot her drives dri ves (using the t he Fil Filetransfer etransfer tool). ool) . For For infor i nfor-mation on possible STARTUP.BAT locations consult the manual or online help (chapter PLC operating system system - miscell miscellane aneous). ous). Usua Usuallllyy it is best to t o keep the default for each each controller controll er t ype: ype: FECs: B: - HC0X: HC0X: B: - HC1X: HC1X: C: - HC20: HC20: C: 1.1.6 FILEHANDLING WITH FLOPPY LOPPYDISK DISK If no floppy fl oppy in the t he drive and and you try to t o acce access ss it wit wi t h the file fi le handling modules no error message message is returned. retu rned. 1.1.7 ONLINE If you have problems problems with wit h the t he online connec connectition on you should should set the baud baud rate to t o 2400. This This is oft of t en the case case when Festo Festo fiel f ieldbus dbus is i s act active or the t he CP CPU is busy wit wi th communication, communicati on, e.g. on other serial serial ports. por ts. Avoid long l ong steps steps in control programs programs that are exec executed uted freque fr equentl ntlyy since this thi s will shorten the t ime slot for CI communication. communicati on. Please Please note that t hat calling call ing CF CFMs may may take a considerable amount of time, especially especiall y if several several CF CFMs are call called ed in sequence in the t he same same step, e.g. AMX AMXX. Call Calling ing CMP CMPss is uncritical uncrit ical since si nce a task switch swit ch (invisibl (invi siblee step) is inserted i nserted after aft er each each call call automatically. 1.1.8 FIRST RST LOGI LOGIN TO NEWHC1 HC16 If you have problems probl ems connecti connection on to t o a new HC HC1X CPU try using using a baud rate rat e different dif ferent from fr om 9600. If you are not not succe success ssful ful try tr y the followi fol lowing: ng: Exit xit FST • Reboot eboot the HC1X HC1X • Execute SEND SENDBR BRK K.EX .EXE t hat can be found found in i n the t he direct di rectory ory where where you have inst i nstall alled ed • FST 4 Choose the t he CO COM port por t you are ar e using using for for FST • St art FST and and try t ry again (do ( do not reboot the HC1X) 1X) • Once you have succe successful ssfully ly loaded a FS FST project proj ect the t he problem probl em no longer exists exist s since then th en FST is directl di rectlyy started start ed when the t he CP CPU is booted. boot ed. 1.4
What i s new compared compared t o FST 4.01.16 •
• • •
•
• •
•
• • •
It is i s now possibl possiblee to download the project without wit hout updating updati ng the driver files fil es.. This This feature tur e can can be useful useful if making making minor change changess to old projects. pr ojects. Control ont rollers lers of t he FE FECStandard family famil y are now support ed. FST 4 is is now also avail avai lable abl e in German. German. In the t he Engli English sh version the t he user can can select ifi f he he wants to t o use the the keyword EL ELSE i nstead of OTHRW HRW in Statemen Stat ementt list. li st. In the driver options opti ons dialog is i s now a help help button but ton to t o open the driver' dri ver'ss chapter chapter in the t he online onli ne help. help. New New and imported import ed programs or modul modules es are are now selected selected for f or download downl oad by default. default . When importing import ing modules modul es from the library li brary more than one module can can be sel selected ected at the same time ti me.. Modules can can now be imported from fr om any any directory ifi f required requi red (this (thi s is a useful useful feature for module developers). New tab in i n the t he Onli Online ne Displ Display ay for Strings Stri ngs.. Platform latf orm dependen dependentt choices choices for contr controll oller er settings setti ngs.. Show CO COM port or IP address in tit t itle le bar of t he ST STL Online nli ne window.
FST Version 4.02.21 Manual
11
•
1.5
The local local IO for FECand HC0X HC0X control cont rolllers are now automa aut omatt ically call y added to t o the t he IO configuration fi guration by default for f or new projects. Bug fixes fi xes since sin ce FST 4.01.16
• • • •
• • • • •
1.6
Longer timeout t imeoutss for CI communication communicati on allow all ow connect connect ion to busy CP CPUs. Out of range r ange constant constantss in STL STL are no longer ignored. i gnored. Allow ll ow switching program stat status us in i n online onli ne display even even wit withh fast update speed. speed. Direct print pr inting ing of source source code programs programs that are not selected selected for download is now possible. Sorted printout pri ntout of source code code and and compil compilation ation log. l og. Correct display di splay of large timer t imer values. Regard egard special case case for EW in online onli ne display displ ay user defined tab. t ab. Enable switch swit ch selecti selection on for IO I O modules modul es only if more than one choice possi possi ble. Sorted ort ed print out of cross-referen cross-reference ce list. li st. What i s new compared compared t o FST 3
Note! Changed Changed run-ti run-t ime code. FST 4 now compiles compil es code for CFMs, which whi ch do NOT NOT include a task t ask switch. swit ch. For For thi t hiss to t o work, wor k, CFMs no longer longer may have ST STEPs. Thi Thiss gives you a chance to have simpl si mplee and direct direct " subrousubr outines" . The The old FS FST 3.x met method prohibi prohi bitt ed this thi s ent entirirely. ely. The The behaviou behaviourr of CMP CMPss hasn’ hasn’tt been touched. In most cases you cannot cannot see the t he difference dif ference at all. all . If you have used CF CFMs with wit h steps st eps change change t hem to CMPs MPs - and (in (i n most cases) cases) forget for get thi t hiss issue. The new rules rul es are easy easy to t o remember: • • • • • • • •
A program may call CMPs and CFMs (unchanged), Calli all ing a CMP CMP always includ i ncludee a task switch swit ch (unchanged), (unchanged), The called call ed CMP CMP may have steps st eps (unchanged), (unchanged), Calling all ing a CF CFM will wi ll not cause cause a task swit swi tch (new). A CMP CMP may call CFMs (unch (unchanged) anged),, But a CMP CMP may NOT NOT ca calll another anot her CMP (unchanged). A CFM may call cal l other ot her CFMs (new), (new), But a CF CFM may NOT NOT call a CMP CMP (new). (new).
In a diagram t he rule looks as follows: foll ows: Program rogram -- calls call s --> CFMs -- calls call s --> CMP CMPss CMP -- call calls --> CFMs CFM -- call calls --> CFMs The FS FST kernel (PLC (PLCoperating operati ng system) system) from version versi on 2.24.3 will wi ll check check thi t hiss at run-ti ru n-time. me. If you get error 36, check check which function functi on module you are calli calling ng in the t he step where where the error occurred. occurr ed. Rename Rename this thi s module modul e as a CMP CMP and change your programs pr ograms accordingly. accordingl y. The modules modul es FW FWRITST ITSTRand FRE FREADST ADSTR Rof t he FST FSTrunt ru ntiime lilibrary brary are ar e using usi ng steps st eps and can be used as CMPs CMPs only. only. •
Mr. West Westrik ri k from f rom Festo-N Festo-NLL has has contribut contri buted ed the t he TC TCP/ IP part part of t he FS FST 4 software. soft ware. After a first fir st download downl oad of the t he FS FST TCP/ IP driver, dri ver, it is also possible possibl e to use TC TCP/ IP for all online onli ne tasks t asks - from fr om CI CI commands commands to downloading. downl oading. Simply change the th e sett settings ings in " Extras >>FS >FST Pref Preferences erences >>Communi >Communiccati at ion port port " .
FST Version 4.02.21 Manual
12
The communicati communication on met method has changed changed significantl signif icantly. y. Well Well,, we st still il l use the old fashioned CI CI but we did further furt her analysis analysis on the implementati implementation. on. The The obvious situasituation ti on where where you wil willl see this thi s is a faster login to t o the remote remote control controller. ler. Make and and Download Download are separat separated, ed, a Bui Build ld All is also available. avail able. • " Make" Make" will wil l only onl y compil compilee and and link li nk what has bee beenn change changed. d. T This his is what you are used used ttoo with FST 3.x. 3.x. " Build" Build" , contrary contrary to " Make," Make," will compile compile and and link li nk every everything. thing. Our Our " Make" Make" is pretty cleve clever. r. So So you don't need need the " Buil Build." d." But But whene wheneve verr in i n doubt - it' it ' s ava availilab able. le. There is a project specific specifi c IPC IPCcontroller controll er setting, setti ng, which lets let s you automaticall automaticallyy stop • and unload a project on tthe he IPC IPCcontroller control ler when downloading. downl oading. Run-time un-ti me optio opt ions ns are are select selectable able one by one instead of two t wo pre-confi pre-configured gured run-time run-ti me • modes modes (" Machine Machine Mode" Mode" and "U " Unit Mode" Mode" in FS FST 3.x noti notion.) on.) An AUT AUTO OSTART ART run-time run-t ime opt o ptiion is i s availabl avail able. e. • All kinds of online onli ne displays can can be used used at the t he same same time ti me,, have the online onli ne display in in • one window, a CI CI terminal terminal in another anot her window wind ow and ST STL online onli ne in one or more additional ti onal windows. Then Then t ry to transfer t ransfer a file fi le to or from fr om the control controller. ler. Conversion of FST 3.x Projects to FST 4.x • The conversi conver sion on progr pr ogram am FST FST3TO 3TO4. 4.E EXE is accessibl accessible by menu entry ent ry " Extras xt ras >>Conver >Convertt • FST 3.x Projects" Proj ects" . Just Just select the right ri ght path pat h (of (of FST FST IPC3.x or t he FS FST IPC3.x proj pr oject ect path) and select select a project to t o convert. convert. •
It is recommende recommendedd to t o rebuil rebuildd the t he enti entire re project by selecting menu item " Project >>B >>Buil uildd Project" roject" or click the appropriate appropriate toolbar button. butt on. What is still stil l inc i ncomplete omplete The " Tip of the Day" Day" is just ju st a start. It is not a very powerful powerful wizard. Ideas Ideas aand nd new tips ti ps are welcome. What is i s sti stillll missing missing Here is a list li st of things, t hings, which are are not yet impleme impl emented nted in this t his version: Ladder diagram d iagram • Windows version versi on of OWS • The following foll owing new features/bug features/ bug fixe fi xess require an update of the kernel version (firmwa (f irmware re): ): • get runtime runt ime error when call calling ing CF CFMs with wit h steps (2.24.03) version checki checking ng when starting start ing STL STL online onli ne (2.24.02) • improved PLC Safety method (2.24.02) • online display di splay of counters (2.23.03) (2.23.03) • IO1x/ IO1x/ IO4x IO4x (2.23.01) • • You can can check check the detailed detail ed version version with wit h the t he CI CI comman commandd " L!" . If this t his results result s in " ACC ACCESSERROR" you have have kernel kernel versi ver sion on 2.22 2.22 or less. If you an upgrade of your CPU modul modulee is required requi red pleas pl easee contact your local lo cal Festo Festo • dealer. 1.7
History
20.02.2001 4.02.21 CD-RO -ROM " Edition dit ion April pri l 2001" 14.08.2000 4.01.16 CD-RO -ROM " Edit di tion io n August 2000" 2000"
FST Version 4.02.21 Manual
13
2
FST4 User documentat document atii on
2.1
The Main Mai n Wi ndow
If you start st art FS FST a splash splash screen screen will be shown. shown. It will wil l be hidden hi dden automati automatica callllyy after a few f ew seconds seconds.. Cli Click ck on it to dismiss it immediately. FST works wit wi th a so-called mult mul tiple iple document interf i nterfac acee (MDI). (MDI). For For each document document a child chil d window wind ow will wi ll be opened inside insi de the t he FS FST main window. wi ndow. The chil childd windows wi ndows can be acces accessed sed and arranged arranged with wit h the t he comma commands nds of the t he Win indow dow menu. menu.
The size size and and position positi on of the t he window is stored between between sess sessions. ions. If the resolution resolut ion of the screen screen changes, changes, the FS FST main window wind ow will wil l rece r eceive ive the t he default size and and position posit ion from f rom Wi Wi ndows. 2.1.1 2.1.1 Windows Basi Basics This topic t opic describes describes the t he most most important import ant standa st andard rd controls control s of Windows: Windows: The Ti Ti t le Bar • The System Menu Menu • The Wi Window Border Bor der • 2.1.1.1 2.1. 1.1
The Tit le Bar
The title tit le bar is located along along the top of a window. It contains the name name of the t he appl applica icatition on and/or and/ or the docume document. nt. To To move move the t he window, drag the tit t itle le bar.
The titl ti tlee ba barr can contain contain the t he following buttons: but tons: Click li ck the Minimise Minimi se button to t o reduce the window to t o an icon. Click li ck the Maximise Maximise button but ton to t o enlarge the active window to t o fill fi ll the avail available able space space.. Click li ck the Res Restore tore button butt on to return r eturn the t he active active window to t o its it s size and posit position ion before you chose chose the Maximi Maximise se or Minimise Mini mise command. command. Click li ck the Close Close butt but ton to close the window. windo w. FST Version 4.02.21 Manual
14
2.1.1.2 2.1. 1.2
The System menu
If you click cli ck on the title tit le bar icon commands:
the System menu menu will wil l be shown. shown. It offers the following fol lowing
Restore Use this command command to return r eturn the t he acti active ve window to its it s size and and position posit ion before you chose the Maximise or Minimi Mi nimize ze command. command. Size Use Use this thi s command command to display di splay a four-heade four- headedd arrow so you can can size size the act active window wit wi t h t he arrow keys. keys. Note! This This command command is unavailable unavail able if you maximi maximise se the window. Move Use Use this thi s command command to displ d isplay ay a four-headed four-headed arrow so you ccan an move move the active window wi ndow or dialog box with wit h the t he arrow arrow keys. Note! This This command command is unavailable unavailabl e if you maximise maximi se the window. Minimize Use Use this thi s command command to reduce the wi window ndow to t o an icon. Maximize Use this command command to t o enlarge the acti active ve window to fill fi ll the available space. space. Next Use Use this thi s command command to switch swit ch to the t he next next open document document window. windo w. FS FST determines determi nes which window is i s next next according according to t o the t he order in which whi ch you opened opened the windows. Previous Use Use this thi s command command to switch swit ch to the t he previous open document document window. FS FST determi dete rmines nes which window is i s previous according according to the order in i n which you opened opened the t he windows. Close Use t his command to close the window. wind ow. Clo Closing sing the t he FST main window will t ermin erminate ate FS FST. 2.1.1.3 2.1. 1.3
The Window in dow Border
Drag the size bars bars at the t he corners corners or edges edges of the t he window to t o size the window using tthe he mouse. 2.1.1.4
Scrollbars
Scrollbars are displayed displayed at the right ri ght and bottom bot tom edges of of the t he window. The The scroll scroll boxes boxes inside the t he scroll scroll bars indicate your vert vertical ical and horizontal locati location. on. Drag Drag the slider or click cli ck on the arrow buttons butt ons to move the location. locati on.
FST Version 4.02.21 Manual
15
2.1.2 The Toolbar ool bar The toolbar tool bar is displaye displ ayedd across across the top t op of the t he FST main window, window, below belo w the t he menu menu bar. The t oolbar oolbar provides provi des quick mouse access access to many tools tool s used in FS FST. To hide hi de or display di splay the t he Tool Toolbar, bar, choose " View >>Toolbar" oolb ar" from from the menu. A check check mark appears next to t o the menu item it em when the Tool Toolbar bar is displayed. di splayed.
The following foll owing tools t ools can be direct direct ly acces accesse sedd from fr om the toolbar. t oolbar. The The tools tool s that are currentl currentlyy not available avail able are dimmed (greyed). (greyed). Creat reatee a new program program (Ctrl+N) Open a program for editing edit ing (Ctrl+O) Save the program code code in the t he currentl currentlyy acti active ve editor window (Ctrl+S) Save Sa ve all all unsaved changes changes Remove the currently currentl y selected data from f rom the t he document document Rem emove ove the currently se selected lected data from f rom the t he document document and put it on the t he clipboard (Ctrl+X) Copy select select ed data onto the t he cli clipboard pboard (Ctrl+C) Insert Inse rt a copy of the cli clipboard pboard content contentss at at the t he insert insertion ion point (Ctrl+V) Reve everse rse the last editing edit ing acti action, on, if poss possibl iblee (Ctrl+Z) Find something in the t he currentl currentlyy acti active ve edit editor or window (Ctrl+F) Compile the t he program program in the t he acti active ve edit editor or window (Ctrl+F7) Prepare the project for download (changes only) only) (F7) (F7) Prepare the project for download (rebuil (rebuildd all all)) Transfe ransferr the t he project project to t o the controller controll er (F5) Open the Online Control Panel Open an (other) Onli nline ne Displ Display ay window Open the t he Onl Onliine CI CI Termi Terminal nal Open the t he Fil Filee Transfer Transfer window wi ndow Prirint nt the contents of the t he currently currently active window (Ctrl+P) Context Help (Shift+F1)
FST Version 4.02.21 Manual
16
2.1.3 The St atus Bar Bar The st st atus bar is displayed di splayed at the t he bottom bott om of the th e FS FST FST main window. window. To display di splay or hide the t he status bar, select " View >>Stat >Status us Bar" Bar" from the t he menu. menu. A chec checkk mark appears appears next next to t o the t he menu menu item it em when when the t he status bar is displaye di splayed. d. The st st atus bar offers the followi fol lowing ng featur features es:: • The left area of the status st atus bar describes actions acti ons of menu items it emsas you use the arrow keys to navigate navigat e through through menus. Thi Thiss area similarl simi larlyy shows me messages ssages that descri describe be the actions of toolbar tool bar buttons butt ons as as you depress depress them, before releasing releasing them. If after aft er viewing the descript description ion of the toolbar t oolbar button but ton command command you wish not not to exec execute ute the t he comma command, nd, then release release the mouse button butt on while the pointer point er is off the t he toolbar button. but ton. • The second second area area shows the number of lines li nes and the cursor positio posit ionn or the the number of entries entri es in the t he currentl currentlyy acti active ve window. window. The right areas areas of the t he status bar i ndicate ndicate which of the following fol lowing keys are are latched • down: Indicator Description
CAP
The Caps Lock key is latched at ched down. down.
NUM NUM SCRL
The Num Lock key is latched atched down. down. The Scrl Scrl Lock Lock key is latched atched down.
INS
Insertion Inserti on mode is act act ive. Use t he Ins key t o t oggle.
2.1.4 The Menu The menu menu is i s displayed across across the top t op of the FST main window, window, below the title tit le bar. bar.
From the t he different dif ferent pull pul l down menus you can can acces accesss the followi fol lowing ng commands: commands: Project roj ect menu
Work with wit h projects and and exit FST. FST. Edit menu
Undo, Cli Clipboard pboard commands, commands, find fi nd and replace, select select all, all , delete delet e View menu
Display the Project Tree window, start start the t he various internal tools t ools like li ke the IO Config onfigurat uratio ionn or the Contr ontroll oller er Sett Settings ings,, display the messa message ge window window,, show or hide the toolbar toolbar,, status bar and and STL short shortcut cutss Insert menu
Add new programs or modules to the projec proj ectt and make make new entri entries es to the t he acti active ve window, e.g. adding a New New Driver Program menu
Manage Mana ge cont cont rol programs and and print the contents of the t he active active window
FST Version 4.02.21 Manual
17
Online nl ine menu
Various onli online ne tools like li ke the Online Display and and download of the t he acti active ve proj projec ectt Extras menu
Edit preferences preferences,, manage t he FST Library, Library, configure confi gure and exec execut utee ex external ternal tools t ools Window in dow menu
Close the t he act act ive window wi ndow and arrange th thee chil childd windows windo ws Help window windo w
Onli nline ne Help Help,, Tip of the t he Day Day,, About FST 2.1.4.1 2.1. 4.1
The Window in dow Menu Commands
FST works wit wi th a so-called so-call ed multip mult iple le document interf i nterfac acee (MDI). (MDI). For For each document document a child chil d window wind ow will wil l be opened inside insid e the FS FST main window. The Windo Window w menu menu offers off ers the follo fol lowing wing commands, commands, which enable you to arrange the child windows wind ows in t he FS FST main window. wi ndow. Close Use Use this thi s command command to close the active acti ve client window. windo w. FS FST suggest suggest s that you save change changess to your document document before you close it. If you close cl ose a document document without wit hout saving, saving, you lose all changes changes made made since the last time you saved it. it . You can also clo close se a window window by using the Close lo se icon on the th e document's window. window. Cascade Arranges Arranges windows in i n an overl overlapped apped fashion. Tile il e horizontal Arranges rranges windows vertica verti callllyy in i n non-overlapped tiles. ti les. Tile il e vertica verti call Use Use this thi s command command to arrange multip mult iple le opened windows side by side. Arrange Icons Use Use this thi s command command to arrange the icons for minimised mini mised windows at the t he bottom bott om of the t he FS FST main window. If there is an open open documen documentt window wi ndow at the t he bottom bott om of the t he FST main window, window, then some or all of the icon i conss may may not be visible vi sible because because they will be undernea underneath th this thi s docudocument ment window. Window ind ow 1, 2, ... FST displays displays a list li st of currentl curr entlyy open document windows wind ows at at the t he bottom bott om of the Window Window menu. A check check mark appears in front fr ont of the t he document document name of the t he act active window. wi ndow. Choose Choose a document ment from f rom this list l ist to make its window acti active ve.. 2.1.4.2 2.1. 4.2
The Edit di t Menu Commands
The Edi Editt menu offers of fers the t he followi fol lowing ng commands: commands: Undo
Use this thi s command command to reverse reverse the last editing edit ing acti action, on, if possibl possible. e. Cut
Use this command command to t o remove t he currentl currentlyy selected selected data dat a from the t he document document and put it on the clipboard. cli pboard. This This command command is unavail unavailable able if there is no data currently selected. FST Version 4.02.21 Manual
18
Cutting utt ing data to t o the t he cl cl ipboard replaces replaces the contents previously previously stored there t here.. Copy
Use Use this thi s command command to copy selected selected data onto ont o the clipboard. cli pboard. This command command is unavail unavailable able if there is i s no data currentl currentlyy selected. selected. Copying data to t o the t he clipboard replaces replaces the contents previously stored st ored there. Paste
Use this command command to inse i nsert rt a copy copy of the t he cli clipboard pboard contents contents at the inse i nsert rtion ion point. poi nt. This comma command nd is unavail unavailable able if the clipboard cli pboard is empty. Delete
Use Use this thi s command command to remove the currently current ly selected data dat a from the t he document. document. This command command is unavailable unavail able if there is no data currently currentl y selected. selected. The removed dat data is NO NOT copied to t o the th e clipboard. Find
Use this thi s comma command nd to find f ind a cert certain ain text withi wi thinn the acti active ve edit editor or window using the standard Find dialog. Repeat
Use this command command to t o repeat repeat t he last find. fi nd. Replace
Use this command command to replace a certain certain tex t extt within wit hin the t he acti active ve edit editor or window by another text using the t he standard Replace Replace dialog. Select All
Selects elects everythi everything ng in t he document. document. 2.1.5 Viewing Properties roperti es Select elect " View >>Properti >Properties es"" from the t he menu menu or " Properties roperti es"" from the t he right click cli ck popup menu menu to display di splay and and edit the t he propert properties ies of the select select ed entry entry in i n the acti active ve window. 2.1.6 2.1.6 Terminat ermi natiing FST Select " Project roj ect >>Exit >Exit"" from fr om the the menu to end your FST sessio session. n. FST prompts you to save documents with unsaved changes. You can also use the Clo Close se command command on the th e applicati appli cation on System menu icon of the FSTmain wi window ndow .
FST Version 4.02.21 Manual
or click cli ck the Close Close
19
2.2
Getting ett ing Help
2.2.1 The Aboutbox About box Select " Help Help >>A >>About bout FST" to display displ ay the copyright notice notice and versio versionn number of your copy of FST.
2.2.2 Tip of t he Day Day Select elect " Help >>Tip >Tip of the Day" Day" to display di splay a dialog box with wit h a short short tip. t ip.
The Tip Tip of the t he Day Day dialog dial og is also al so shown on each start-u start-upp of FST unless you disable di sable the t he option ti on " Show Tips Tips on StartUp" StartUp".. • Click li ck the Nex Nextt button butt on to show another tip. ti p. Close the the dialog box by cli clicking cking the t he Close Close butt but t on. • 2.2.3 Help Help Topics opi cs Select " Help Help >>Help >Help Topics" from fro m the menu to t o display di splay the t he opening screen screen of the t he FS FST Online nli ne Help. From the t he opening screen, you can can jump ju mp to to step-by-step instruct inst ructions ions for f or using usi ng FS FST and vari vari ous types of reference information 2.2.4 Context ont ext Help Help Use the t he Cont Context ext Help command command to t o obtain obt ain help hel p on some portion port ion of FST. When you choose choose the toolbar' tool bar'ss Context Help button butt on , the mouse pointer point er will wil l chang changee to an arrow and questi qu estion on mark. Then click somewhere in t he FS FST window, window, such as another toolbar tool bar button. The The help hel p topic topi c wil willl be shown shown for the item it em you cli clicke cked. d. FST Version 4.02.21 Manual
20
If you press pr ess the F1 F1 key the help topic t opic will wil l be shown shown for the active acti ve window or command. command. 2.2.5 2.2.5 The Message Window The mess messag agee window is i s used used to t o log res r esult ults, s, e.g. e.g. of trans tr anslati lating ng a program program or downloading downloadi ng the t he project.
Select " View >>Messa >Message ge Wind Window" ow" to bring bri ng the message message window windo w to the t he top and view its it s contents. Note! If you close the messa message ge window, its it s cont cont ents will wil l be lost.
FST Version 4.02.21 Manual
21
2.3
Working orki ng with wit h Projec roj ects ts
Everything verythi ng in FST is organised organised in i n projects. proj ects. A project proj ect contains contai ns your source code code for programs, p rograms, imported import ed (compil (compiled) ed) modules from the library, l ibrary, the t he IO and driver configurations, configurati ons, the Alloca Allocation ti on List List and seve several ral settings sett ings and propert properties. ies. 2.3.1.1 2.3. 1.1
Project roj ect Nam Name e and Comment
Each project proj ect has a short name and a comment. comment. The name name can can be up to t o 8 characters characters long and is used to identif ident ifyy the t he project and will wil l also be trans tr ansferred ferred to the controller control ler when it is downloaded. The The project name is not case case sensiti sensitive ve and must must be unique within wit hin the t he same same project directory. directory . The The charac character ter set t hat is i s allowed for project names names is not restricted, restri cted, but it i t is recommen recommended ded to limit l imit it to charact charact ers, numbers numbers and underlines. underl ines. Space Spacess are are not allowed. all owed. The comme comment nt can be up to 255 cha characters racters long. Different Diff erent from from the project pro ject name the project pr oject commen commentt will wil l not be available available at runtime runt ime (in the t he control controller) ler) but can can be used used to give a short short descript description ion for f or your projects pr ojects for easier easier recognit recognition. ion. Whenev Whenever er you have to select select a project in in FST this comment will wil l be displayed di splayed together toget her with wit h the projec proj ectt name and can be used used for sorting sorti ng lists. li sts. An An even even more detai detailed led descrip descriptition on can can be stored in the t he project documentati documentation on,, which is usuall usuallyy a simple text file. fi le. 2.3.1.2
Controll ontr oller er Types
FST supports support s several several control contr oller ler types t ypes of the IPCfamily. famil y. In order to t o choose t he correct correct dri d rivers vers or options opti ons for the t he control controller ler your project is designed designed for, your project has a controller controll er type attri att ribute. bute. Projects Projects can only be downloaded downloaded to a controller control ler of the correct correct t ype. You You are free to change cha nge the contr controll oller er type of a project if required. Note! There There is a separate separate instance of some project project parts for f or each each controller control ler type t ype within wit hin a project. If you switch between between control controller ler types t ypes,, you will work on the set set of project parts part s that belongs to the t he current current controller control ler type. t ype. Common ommon for all controller controll er types project proj ect name and comment comment • your source code for pro• grams • the project documentati documentation on the Allocation Allocati on List List •
2.3.1.3
Different if ferent set for each each control controller ler type t ype imported (compil (compiled) ed) programs programs from the l i• brary the IO configuration • • the driver configuration the control controller ler sett settings ings •
Organisation rganisatio n on Ha Hard rd Disk
Everything that t hat belongs to a projec proj ectt is stored in i n a single directory on your hard disk. The The name name of that t hat direc di rector toryy is the t he project's project' s name. name. T The he project name is not stored at any other locatio lo cation. n. F For or each project proj ect there t here is i s a file fi le PR PROJECT.FW .FW4 in i n the t he project' proj ect'ss dire di rect ctory, ory, which whi ch is is used used to t o store the t he current current settings sett ings and and elements elements of that project such as the comment and and controller controll er type. Pleas Pleasee do not not modify modi fy this thi s file fil e manua manualllly. y. There are are more files fil es in the t he project's project' s directory to t o store program source source code, code, the t he project documentatio documentat ion, n, the t he All Allocati ocation on List List and others others which are creat created and mana managed ged by FS FST and/ and/ or relate relatedd tools. tool s. If you want to store your own files fi les or files fil es created created by other tools t ools that belong to the t he project in i n the same same directory, you can can do so, but be careful careful with wit h choosing choosing names. No general rul ru le can be given which whi ch names are not used by FST FST.. FST Version 4.02.21 Manual
22
All projects are subdirec subdir ectori tories es of one comm common on project root r oot directory. There There is no index file fi le listi li sting ng the existing projec proj ects. ts. FS FST will wil l create create new projects projects as subdirectories of that project root direc di rectory tory and will look for existing projects projects in i n that direc di rectory. tory. The project proj ect root directory directory can be anywhere on your computer, the t he network or even removremovable media. It need not necessaril necessarilyy be a subdirectory subdirectory of your you r FS FST install inst allati ation. on. It is recommended mended that you use this thi s project root r oot directory for f or storing st oring FS FST projects only. Do not choose choose the same same directory dir ectory as the t he one you have used used for f or FS FST 3.x projects. proj ects. FS FST 4.x will wi ll not allow all ow creating creating a new project if i f a direc di rector toryy with wit h the t he desired desired projec proj ectt name name already already exist exists. s. You can cha change nge the projec proj ectt root directory . This This allows all ows organisi organising ng your projects on groups. However However you have to reme r emember mber the t he different dif ferent loca lo cattions where you have stor stored ed FS FST projects. proj ects. If you want to t o use DOS based t ools ools for you projec proj ectt, such as as fieldbus fiel dbus configurator configur ators, s, use a project proj ect path that t hat does not cont c ontain ain long l ong file fil e names names (max. (max. 8 characters) characters) or spaces. spaces. 2.3.2 2.3.2 The Project roj ect Tree Window indow The Proj Project ect Tree Tree window gives you an an overview of all the parts that t hat belong bel ong to a project and can be used used as a shortcut short cut bar to t o acces accesss the corresponding corr esponding tools. t ools. Double click cli ck on the item it em or use the right click popup menu for more features on some some item it ems. s. When you create create a new new projec proj ectt the projec proj ectt tree tr ee will be displayed by default. default . You You can close close it as any any MDI MDI child window wi ndow if you don't don' t need need it. it . You You can can display displ ay the project tree t ree again again or bring bri ng it to the top t op by selecti selecting ng " View >>Project >Project Tree" Tree" from the t he menu. menu.
The project tree t ree basicall basicallyy has always the same same entr entries. ies. Only Only the t he items it ems " Programs" , " CMPs" MPs" and " CFMs" will wil l have chil childd item it emss depending depending on the programs you are using using for the individi ndividual project. pro ject. The Project roj ect Tree Tree offers the th e following foll owing features features for access accessing ing programs progr ams:: Double oubl e cli click ck on the entry entr y of a source code code program to ope openn it in the t he edit editor or.. For For imi m• ported port ed modules no source ccode ode is available. avail able. They They cannot cannot be edited. edit ed. • Right click on a program program entr entryy and and then t hen selec selectt " Properties roperti es"" from the t he popup menu menu to open the Program Propert Properties ies dialog di alog . This This dialog will wil l allow a llow chang changing ing the t he program' program' s name, name, comment comment,, type t ype and and number. It is i s not possible possibl e to change a program's program' s language once once it has been created created • To delet deletee a program right click cli ck on a progra program m entry entry and then select select " Delete" from the popup menu. You You can also press pr ess the DEL DEL key to delete del ete the t he selected program. pr ogram. FST Version 4.02.21 Manual
23
•
•
•
All programs that have a check check mark mark in i n the t he box left to t he name name and and commen commentt will wil l be be downloaded downloaded to the t he control controller. ler. If a program is not checke checkedd it will wil l not be available available at runtime. runt ime. Select Select only only one version of the t he same same program at the t he same same time. ti me. Right click on a program program entry entry or the t he " Programs" rograms" , " CFMs" or " CMPs" MPs" folder fol der and and then selec selectt " Insert..." Insert..." from the right click popup men menuu to ins i nsert ert a new source code program.. program Right click on a program program entry entry or the t he " Programs" rograms" , " CFMs" or " CMPs" MPs" folder fol der and and then selec selectt " Import..." Import..." from the popup menu menu to impo i mport rt an alread alreadyy com compil piled ed module from the library. library.
2.3.3 Open an Existing xist ing Project roj ect In order order to work with wit h a project and its it s parts you have to load l oad it into int o the t he FS FST de devel velopme opment nt environment. To open an already existing existi ng project proj ect select " Project roj ect >>Open..." >Open..." from from the menu. Then Then the Open Project Project dialog will wil l be displayed that lists l ists all al l projec proj ects ts in i n the currently configured project project directory. Select Select the t he project you want want to t o open by double clicking clicki ng on it or type t ype its name in the t he edit field fi eld below the t he list box and and select select the t he OK OK button. butt on. The The currentl currentlyy open project project - ifi f any - will wi ll be closed and the selected selected project proj ect will wil l be loaded l oaded into int o the FS FST development environment. The same same dialog with wit h a differe diff erent nt caption capti on is used to select select a project for backup backup..
The Open Project dialog offers the following features: The name, comment comment and the t he cont control roller ler type t ype are displayed displ ayed for each project in i n a sep sepaa• rate column. • Adjust the width widt h of each each column by moving moving the t he sepa separator rator in i n the header header with wit h the mouse. Each ach column of the t he list li st box can be sort sorted ed alphabeti alphabetica callllyy by clicking clicki ng on the column col umn • header. Cli Click ck again again to t o reverse the sorting sorti ng order. You can only only display di splay projects for one controller controll er type by making the t he appropriate se• lection lecti on in the t he combo combo box above the list l ist box. If you only want to t o display the projec proj ectt names in a simple list, li st, toggle t oggle the radio but• tons in the t he upper upper right corner corner of the t he dialog. The size size and and position positi on of most windows will be restored restored to t o how it was the last time t ime before you closed the project. proj ect. The The name, name, comme comment nt and controll contro ller er type of the t he current currently ly active acti ve pro ject is i s displayed displayed in the t he cap captition on of the t he FST main window. window. To access access t he projects you have mo most st rec r ecently ently worked on up to t o eight projects are listed li sted in in the Project Project menu menu just j ust before the t he Exit Exit comman command. d. Simply select select the project pr oject you want to open. FST Version 4.02.21 Manual
24
When you start FST the projec proj ectt t hat was open when you quit FST the last time t ime will wi ll be opened automatically. Note! You You can have more than one instance i nstance of FS FST running, runni ng, but the same project proj ect can be opened opened only once at at the same same time ti me.. If a projec proj ectt is opened opened it is marked with a lock l ock file. fil e. 2.3.4 Creating reati ng a New New Project roj ect To create creat e a new project select " Project roj ect >>New..." >New..." from fro m the the menu. Then Then the th e New New Proj Projec ectt dialog will wil l be displaye displ ayedd that allows you to enter the t he name name for the t he new new project in i n an edit field. fi eld. Select Select the t he OK OK button butt on to t o create create a new projec proj ectt with wit h that t hat name. name. The The currentl currentlyy open pro jec j ectt - if i f any - will wil l be closed closed and the new project wi willll be loaded into the FS FST development development environment. The same same dialog with wit h a different dif ferent caption is i s also used used for renaming or copying copyingaa project and t o restor restoree a project from fr om backup or uploaded sources. sources.
The New New Project Project dialog offers the t he followi fol lowing ng features: A list li st of the t he already already existi existing ng projects projects in the t he current current projec proj ectt direc di rectt ory will help avoid avoid • using the t he same same name name again. again. The comment comment and the t he controller control ler type t ype are displaye displ ayedd for each each projec proj ectt in a separate column. • Adjust the widt wi dthh of each each column by moving moving the separator separator in i n the header header with wit h the mouse. Each ach column of the list l ist box can can be sorted alphabetica alphabeti callllyy by clicking cli cking on the t he column • header. Cli Click ck again again to t o reverse the sorting sorti ng order. • If you only want want to t o display the project nam names es in a ssimple imple list l ist,, toggle the t he radio radio buttons in the t he upper upper right corner corner of the t he dialog. Note! The proj projec ectt nam namee is limit li mited ed to 8 charac characters. ters. • • Note! The proj project ect name name must not contain contai n spaces. spaces.
FST Version 4.02.21 Manual
25
2.3.5 Close t he Current urr ent Project roj ect Select elect " Project >>Close" from the t he menu menu to t o close the currently currentl y acti active ve project project.. It is, however, however, not neces necessa sary ry to t o close a project project before opening another projec proj ectt orcrea or creatt ing a new project since this thi s is done automati automatica calllly. y. 2.3.6 The Projec roj ectt Settings ett ings After crea creatt ing a new projec proj ectt you will automatically be prompted to enter a commen commentt for the t he new project project and have the possibilit possibil ityy to select a co controller ntroller type type.. You You can change these set set-tings ti ngs again again later by selecti selecting ng " Project >>S >>Sett ettings.." ings.." from the t he menu menu or " Project Sett Settings" ings" from the Proj roject ect Tree window .
The Project Project Settings ett ings dialog offers of fers you also the t he following foll owing features: Change hange the name name of of the t he project project by entering enteri ng it into i nto the t he edit edit field. fi eld. • Click li ck on the button but ton with wi th three t hree dots to t o get get a list li st with wit h the already already exis existt ing projects. projects. • That dialog di alog is the t he same same as as it is used for entering enteri ng the name of a new project. project. • The date dat e when the t he project proj ect was created, which whi ch F FS ST version has h as been been used and the t he user user name will be displayed. 2.3.6.1
The Projec roj ectt Directo Directory ry
Using differen diff erentt project pr oject direc dir ectori tories es is useful to t o sort a larger amount amount of projects in groups. But you have to remember the diff di fferent erent locati l ocations ons where you you have stored FS FST projects. proj ects. If you you want t o view or change change the current common root directory directory for f or FS FST projects, proj ects, select " Extras xtr as >>Preferences >Preferences..." ..." from fro m the menu. menu. In the tabbed dialog di alog that will wil l be displayed displ ayed select the Gene General ral tab. t ab. Enter Enter the t he path of the t he new new direc dir ector toryy or press the Browse Browse button butt on to select select an already existi existing ng directory. Relati Relative ve paths paths (beginning with wit h a dot) are subdirectori subdirectories es of the directory directory where you have install inst alled ed FS FST.
.
FST Version 4.02.21 Manual
26
After ft er chang changing ing the direc di rectory tory path pat h and closing closing the t he dialog the currentl currentlyy open project will wil l be closed. Note! If you want to t o use DOS DOS based based tools tools for you proj pr oject, ect, such as as fieldbus fiel dbus configurators, configurat ors, use a projec proj ectt path p ath that t hat does not contain cont ain long l ong file fi le names (max. (max. 8 charact characters) or spaces. spaces. 2.3.7 The Project roj ect Explorer xplor er If you want t o delete, copy or rename rename projects use the t he Proj Project ect Explor Explorer. er. To open the t he Proj Projec ectt Explorer dialog select select " Project >>E >>Explore..." xplore..." from the t he menu. menu. A list li st with wi th all al l projects pr ojects in the t he current project direc di rector toryy will be displayed in a dialog box.
FST Version 4.02.21 Manual
27
Above the list li st box there t here are seve several ral buttons but tons to t o exec execute ute tthe he following foll owing operati operations ons:: Create a new project . You You will wil l be prompted prompt ed for a project name and and sett settings ings Open the selected project. proj ect. Delete the t he selected selected projec proj ectt . Create a copy of the t he select selected ed project. proj ect. You You will wi ll be prompted prompt ed for a name and and settings sett ings as for a new project. project . This will display the Project Sett ettings ings dialog for the t he selec selected ted projec proj ectt that t hat allows you to change change the project' s name, name, commen commentt and contr controll oller er type. The Proj Project ect Explor Explorer er dialog also offers off ers the following foll owing features: featu res: • The projects are listed toge t ogether ther wit wi t h their thei r comment comment and the controller controll er type; each each displayed for each each project i n a separate separate column. Adjust the width widt h of each each column by moving moving the t he sepa separator rator in i n the header header with wit h the • mouse. • Each ach column of the list l ist box can can be sorted alphabetica alphabeti callllyy by clicking cli cking on the t he column header. Cli Click ck again again to t o reverse the sorting sorti ng order. To change change the name of a project proj ect select iti t and then t hen cli click ck on the name. An An inplace inpl ace edit • field fi eld appears. appears. When When you are are finished fi nished press press the " Enter" key or click outside out side the edit field. fi eld. To To cance cancell editing edit ing press " Esc" sc" . You can only display displ ay projects for one control controller ler type t ype by making making the t he appropriate appropriate se• lection lecti on in the t he combo combo box above the list l ist box. If you only want want to t o display the project nam names es in a simple list, list , toggle the radio buttons but tons in the t he upper right corner corner of the t he dialog. 2.3.8 Preparing t he Project roj ect for Download Download Before a project can be downloaded and executed executed on the controll contr oller er its it s components components must be compil compiled ed to a binary format. The The result resultss will be linked li nked together together to t o the project project runfil runf ile. e. To prepare the project for download select select " Project >>M >>Make ake Proj Projec ectt " from the t he menu. menu. All modifica modifi catitions ons are are automatically saved saved to t o disk and the progress and and result of the compilation compilat ion and linking li nking is i s displayed in the t he mess message age window.
FST Version 4.02.21 Manual
28
" Make Project" Project" will wil l only onl y compil compilee the programs that have not been chang changed ed since since the last make. If you want to t o compile compil e all programs programs regardless regardless whether they t hey are are changed changed select select " Project >>B >>Buil uildd Project" Project" instead. This This is i s recomm recommende endedd after aft er restoring a projec proj ectt from ana nother ot her computer or a change change in the t he FS FST version, in i n case case the translat t ranslators ors have been changed. changed. 2.3.9 Downloading the Project to the Controller ontrol ler To download the t he project to the t he control controller, ler, select select " Online nli ne >>Download >Download Project" Project" from the t he menu. menu. All required requir ed files fil es wil willl be trans t ransferred ferred to the t he control controller. ler. The The Download Download dialog d ialog gives gi ves you you some information inf ormation about the t he progress progress of the trans tr ansfers. fers. Press Press t he Abort Abort button but ton to t o stop the t he downloading. downloadi ng. Watch Watch the t he messa message ge window for detail d etails. s.
Note! • •
Befor Beforee you can can download downl oad a project it has to be prepared prepared for download first. fi rst. Projects can only only be downloaded to a cont cont roller roll er of the t he same same type as spec specifified ied in i n the t he project settings.
2.3.10 Downloading ownlo ading an Update of the th e Project roj ect to the Cont Control roller ler Instead of downloading the t he complete complete projec proj ectt to the t he control controller, ler, it is also possible possible to trans t ransfer fer only onl y the changes. changes. To download an update of the project to the controller, control ler, select " Online nli ne >>Update >Update Proj Project" ect" from the t he menu. menu. All All required files fi les will wil l be transfe t ransferred rred to the controller. controll er. The The Update Update dialog gives you you some informati information on about the t he progress progress of the trans t ransfers. fers. Pres Presss the Abort button but ton to to stop the t he downloading. Watch Watch the message message window for f or details. detai ls.
An update can only be downloaded if you at least once downloaded the complete compl ete project to t o the same same control controller. ler. An update is not possible possibl e If you add or remove r emove programs. • After ft er some chang changes es to the t he driver configuration. confi guration. • •
2.3.11 Uploading ploading Proj Projec ectt Sources Sources from the t he Control ont roller ler It is i s possibl possiblee to store the t he source sourcess of a project in the t he controller. controller. If you want the t he source sourcess to be stored in the t he control controller ler you have to select the option opt ion " Load sources sources"" in the Download tab t ab of the Controller Settings dialog. FST Version 4.02.21 Manual
29
To upload upload the sources that have h ave been st stored in the t he cont control roller, ler, select " Online nli ne >>Upl >Upload oad Project" from the t he menu. menu. The The control controller ler will wil l be searche searchedd for the t he source sourcess aand nd the file fi le will wil l be uploaded. upl oaded. The The Upl Upload oad Source Source dialog gives you some some informati infor mation on about the t he progress of the t he trans tr ansfer. fer. Press Press the Abort Abort button butt on to stop the t he uploading. View View the t he messa message ge window for more details.
Then the Upload Upload Project Project dialog di alog will wil l be displaye di splayedd that t hat allows all ows you to enter the t he name name for the uploaded project in i n an edit edit field. fi eld. Selec Selectt the t he OK OK button butt on to restore the projec proj ectt wit wi t h that name. The currently currentl y open project - if any - will wil l be closed closed and the uploaded project project will wil l be loade l oadedd into int o the t he FS FST development environment. envi ronment.
The Upload Upload Project Project dialog di alog offers the t he following foll owing features: A list li st of the t he already already existi existing ng projects projects in the t he current current projec proj ectt direc di rectt ory will help avoid avoid • using the t he same same name name again. again. The comment comment and the t he controller control ler type t ype are displaye displ ayedd for each each projec proj ectt in a separate column. • Adjust the width widt h of each each column by moving moving the separator separator in i n the header header with wi th the mouse. Each ach column of the list l ist box can can be sorted alphabetica alphabeti callllyy by clicking cli cking on the t he column • header. Cli Click ck again again to t o reverse the sorting sorti ng order. • If you only want to t o display the projec proj ectt names in a simple list, li st, toggle t oggle the radio buttons in the t he upper upper right corner corner of the t he dialog. Note! The proj projec ectt nam namee is limit li mited ed to 8 charac characters. ters.
FST Version 4.02.21 Manual
30
2.3.12 Listing ist ing the Compiled ompil ed Project roj ect File il e If you select select the t he menu menu item " Project >>List >List Projec roj ectt Fil File" e" you will get a listing list ing of the t he contents contents of the project file fi le in the t he mess messag agee window. This This file fi le is i s the result result of preparing the project for downloadand download and will be transferred to the t he control controller. ler. This This feature featur e can can be useful useful for debugging.
. Note! This This function functi on is only available after preparing the t he project project for download. 2.3.13 Removing Intermediat Int ermediatee Files il es During the t he process of preparing the project for download severa severall intermediate i ntermediate files fil es will wil l be generated. In order to t o free disk space you can can clean clean up the t he project project by selecting " Project roj ect >> Clean Up" Up" from from the menu. If you want want to t o download the project project again to a control controller, ler, all required r equired files fil es will wil l be created created again. This function functi on is automatically automaticall y call called ed before backing up a project . 2.3.14 The Project roj ect Document ocumentati ation on FST does not not implement it' it ' s own text editor. edit or. For For writi wri ting ng your project documentati documentation on you can can use any any tool you like. li ke. By defaul defaultt for f or each new project an empty empt y fifile wit wi t h the t he fifile name name PROJECT.TX .TXT wil wi ll be created creat ed in tthe he project' project'ss directory. directory. Double Double click on the item it em "P " Project roject Docume ocumentation" ntation" in tthe he Project Tree window wi ndow or select " View >>Proj >Project ect Documentati Documentation" on" from the t he menu menu to to open the docudocument ment with wi th whichever whichever tool is i s regist registere eredd for .t . t xt files fi les on your PC PC. You can can change change the name and/or and/ or extension extension ifi f you like l ike by choosing choosing " Properties roperti es"" from the t he right click popup menu of the entry " Project Docume Documentati ntation" on" in tthe he Project Project Tree Tree window. window. Make sure sure you use an ext ext ension ension that t hat is i s registered on your PCfor the editi edi ting ng tool you want t o use. E.g. E.g. using the t he ext ext ension ension .doc will wil l usuall usuallyy open Microsoft Microsoft Word. 2.4
Printi ri nti ng Projec roj ects ts
You can print all or selected selected parts part s of the t he current current project project.. Select elect " Project >>P >>Print rint..." ..." from the t he menu menu to display d isplay the t he dialog to t o select select the parts part s you want want to print.
FST Version 4.02.21 Manual
31
Title Page:
The titl ti tlee page page displays the project proj ect name name together wit wi th some informati inf ormation on on the FS FST version, date dat e and time ti me and and the t he user name. name. Documentation:
The project proj ect documentation documentat ion will wil l only be print pri nted, ed, ifi f t he file fi le PR PROJECT.TX .TXT still sti ll exists. If I f you have change changedd the t he name name and/ and/ or extension extension of the projec proj ectt documentati documentation, on, you have to use the tool you are are using using to edit the file fil e for printing printi ng..
Controller Settings:
The optio opt ions ns you have chosen. chosen. Project Tree:
The project tree t ree shows shows all all programs programs in a sorted list l ist including includi ng the comment. comment. If a program program is is selected selected for f or download is i s indicated indicated by an asterisk. Input and Output Modules: Modules:
Print the IO configurat configuration. ion.
Drivers:
Print the driver configuration configurati on including the options opt ions for each each driver Allocation List:
Print the Allocation List. Program Properties:
Print the fil f ilee size and and date and other information inf ormation for each each program. program. Log Files:
Print the results result s of the t he last compilation compilati on for source code code programs programs or the source path path for imported import ed modules. modules. Cross ro ss Refer Reference: ence:
The cross-referen cross-reference ce is a list li st of all operands operands that t hat are used in your programs together together with wit h their thei r occurrence occurrence in a sorted list. li st. FST Version 4.02.21 Manual
32
Note! Printing rint ing the t he cross-refere cross-reference nce list li st requires r equires that you prepare the projec proj ectt for download before you you start printi pri nting, ng, since since the required required data dat a to build bui ld the t he cross cross referenc referencee list li st will wil l be coll collected ected while whil e the programs are compil compiled. ed. • You can can also print the contents of the t he currentl currentlyy acti active ve window by selecti selecting ng " Program >>Pri >Print" nt" from the menu. Before Before printing print ing starts start s you will be asked asked for the printer pri nter and the paper paper size using using the t he standard standard Printer rint er Setup Setup dialog. di alog. Whil Whilee the pages pages are formatt formatted ed and and sent to t o the t he printer print er you can can stop the t he printing print ing process process by pressing pressing the Canc Cancel el button but ton in i n the Abort Print Printing ing dialog di alog that is displaye di splayed. d. •
A header header and footer foot er will wil l be b e print pri nted ed on each each page page except except the t he tit ti tle page. The The header header shows t he project' project' s name name,, controller controll er type and and comme comment nt and which project part is i s printed print ed on this thi s page. page. The The footer contains the t he page page number, number, time t ime and date date of the printout pri ntout.. Note! Headers Headers and footers foot ers cannot cannot be b e customised. customi sed. You can cha change nge the print pri nt font and the margin margin widths of the t he printout . 2.4.1 Print ri nt Preferences You can can change change the print font and the margin margin widths wi dths of the printout printout.. Select " Extras xtr as >>Pref >Prefererences ences..." ..." from the menu. menu. In the tabbed dialog that will be displayed displayed selec selectt the t he tab " Print" rint " .
FST Version 4.02.21 Manual
33
If you press the Browse Browse button butt on you will be aske askedd for a printer print er to display di splay the correc correctt list l ist of avail available able fonts before the standard font selecti selection on dialog is displaye di splayed. d. Note! If you choose choose the margins sma smallller er than the minimum mini mum printer margins, the printout print out will wi ll be cli clipped. pped. 2.4.2 Project roj ect Backup Backup and Restore Projects will be backe backedd up as standard standard zip files. fi les. Select " Project roj ect >>Backup" >Backup" from from the menu to selec selectt the t he project you want to t o update. updat e. Then Then choose choose the locati location on for the t he backup backup file fil e using using the standard file fil e dialog. Aft After er removing all intermediate interm ediate files fi les all fil f iles es in the t he project project direc di rectory tory will wil l be zipped zipped and stored in the file fi le you have select selected. ed. We use the worl wor ld wide wi de accept accepted ed ZIP ZIP format format (RF (RFCs 1950 to t o 1952). 1952). Many TH THX t o Jean-l Jean-loup oup Gailly ail ly and Mark Adler for zlib. zlib . Select elect " Project >>R >>Res estor tore" e" from the t he menu menu to t o restore a projec proj ect.t. Using the t he standard standard fil f ilee dialog select select a zip zip ffililee that contains a FS FST projec proj ect.t. It will wil l be rest rest ored at the t he curre current nt project directory and opened into int o the t he FS FST de development velopment environment. 2.5
Managing Managi ng Cont ontrol rol Programs rogr ams
Programs, rogr ams, CMP CMPss and CF CFMs represent represent pieces pi eces of executabl execut ablee code. Since Since programs, programs, CMP CMPss and CFMs are handled handl ed very simil si milar ar they t hey are referred refer red to t o as programs progr ams as a comm common on name. A project can cont contain ain up to 64 programs, pr ograms, 100 program modules (CMP (CMPs) s) and 100 function funct ion modul modules (CF (CFMs). For For each program program FS FST can store stor e up to t o 9 versions, versi ons, but bu t only onl y one version version can be used used in the t he control controller ler at the t he same same time. ti me. You can write writ e program yourself with wit h FS FST using the t he St Statement List language or use the ala lready compi compiled led program pr ogram of the t he FS FST library li brary for special special tasks that usuall u suallyy have been created created from from Csource code. code. No mat mat ter how program pro gram have been created created (in (i n terms t erms of source code), always a compil compiled ed version version (machine (machine code) code) will wi ll be used used in i n the t he contr controll oller. er. 2.5.1 2.5.1 Creati reat ing New Programs rogr ams To create a new source code program select " Program >>New..." >New..." from from the menu. Then Then the New Program Program dialog will wil l be displayed that allows you to t o select select the program type, number and version versi on and to enter a comm comment. ent. Select the th e OK OK butt but ton to create a new program with wit h those sett settings. ings. It will wil l be automati automatica callllyy opened opened for editing. edit ing. You can also also invoke i nvoke the New New Program Program dialog from fr om the right ri ght click popup menu menu of t he Project Tree window wind ow or from the Insert Insert menu menu (" Insert Insert Program..." Program...",, " Insert Insert CMP CMP..." ..." , " Insert Insert CF CFM..." ). The same same dialog with wit h a different dif ferent caption is used to add imported modules from the library li brary and to save programs with wit h a different diff erent name. name .
FST Version 4.02.21 Manual
34
Type:
Select elect " Program" rogram" if you want want to t o create create a program, program, "C " CMP" MP" if you want want to t o create create a subrouti subroutine ne with wit h or without steps and and " CFM" if you want want to t o create create a subroutine subrouti ne without wit hout steps. Number:
This number is i s used used to refer r efer to the program or subroutine subrout ine later lat er in the t he code. code. A program can can have the the numbers numbers from from 0 to t o 63, CMP CMPss and CF CFMs from fr om 0 to t o 99. You can assign assign the t he numbers numbers as you you like, li ke, but note the t he following foll owing special special case cases: s: Only Program Program 0 will wil l be exec execut uted ed aut automati omatica callll y on start-up. start-u p. The context of Program 63 will wil l be used for CI commands, commands, avoid using usi ng this thi s number for propr ograms. If you import i mport a program wit wi t h a fil f ilee name like li ke F F<
it is recom r ecommended mended to use the the number . Version:
FST can can store sto re up to 9 versions versi ons of each each prog pr ogram. ram.
Comment:
This tex t extt will wi ll be displayed displayed in list l istss aand nd capti captions ons for easier easier identifi identi fica catition on of the program. program. The The string stri ng can can be up to t o 255 characters characters long. The New New Program Program dialog dial og offers the t he following foll owing features: f eatures: A list li st of the t he already already exist existing ing programs in th t he ccurrent urrent projec proj ectt will wi ll help avoid using the • same same number again. The program name name and comment comment are displayed di splayed for f or each each project pr oject in a separate column. Adjust the width widt h of each each column by moving moving the t he sepa separator rator in i n the header header with wit h the • mouse. • Each ach column of t he list li st box can be sort sorted ed alphabeti alphabetica callllyy by clicking cli cking on the column header. Cli Click ck again again to t o reverse the sorting sorti ng order. If you only want to t o display the t he program program name namess without wit hout comments comments in i n a simple simple list l ist,, • toggle the radio buttons but tons in the t he upper upper right ri ght corner corner of the t he dialog. dialog.
FST Version 4.02.21 Manual
35
Note! •
•
There can can be only one program with wit h the t he same same type, number and ve versio rsion! n! If you try t ry to to create create a program program that already exist exist you will wil l be prompted to t o overwrit overwritee it. If another version for the source code code program you you are about to t o create create exists the t he new program program will wil l be a copy copy of the t he already already exist existing ing program if it is a source code code program of the t he same language.
2.5.2 Importing Importi ng Modules from the Library To import a module from the t he library li brary select select " Program rogram >>Import..." >Import..." from the t he menu. menu. Then Then a dialog box will wil l be displayed displayed that allows all ows you to select select the file fi le for import. import . You can can also invoke the Import Module Modul e dialog from the t he right click popup menu of the Project Tree window wind ow (" Impo Import... rt..."" ). Select a filenam f ilenamee and and press the OK OK button butt on or double doubl e click the t he file fil e name name to open a dialog as for New Progr Program am to select the th e program type, number and version. The comment comment text t ext entry entr y will wil l be automatica automati callllyy initiali init ialise sedd to the t he file fil e name name in the t he library. li brary. Selec Selectt the t he OK OK button butt on to import the file fi le as program from the t he library with wit h that type, number number and version. version.
The Import Import Module dialog offers off ers the following foll owing features: The file fil e name, name, size and date are displayed displayed for each each file fil e in the t he library li brary in a separate • column. • Adjust the width widt h of each each column by moving moving the t he sepa separator rator in i n the header header with wit h the mouse. Each ach column of the list l ist box can can be sorted alphabetica alphabeti callllyy by clicking cli cking on the t he column • header. Cli Click ck again again to t o reverse the sorting sorti ng order. • If you only want to t o display the file fil e name namess without further information in a simple list, toggle the radio buttons butt ons in the upper upper right corner corner of the t he dialog. The original ori ginal source code language language and FS FST vversion ersion number is i s displayed displayed for the se• lected lected file fil e in the field below the list box. Note! There is a different library l ibrary for f or each each co control ntroller ler type. type . The The correct correct folder fol der will wil l be selected selected • automatically. automaticall y. If you later l ater change change the control controller ler type t ype the modules have have to be rereimported import ed from the t he library li brary for the new controller controll er type. You You can can however however switch back to the t he previous previous contr controll oller er type without re-import re-importing ing since the imported import ed modules modules are are stored in separate separate files fi les for each each contr controll oller er type. You can can chang changee the import folder fol der manua manuallllyy by selec selectiting ng the " ..." button. butt on. this t his can be • useful useful if you develop develop your own modules and stor storee them in a differen diff erentt location. FST Version 4.02.21 Manual
36
2.5.3 Program Properties ropert ies The name and comment ooff a program can can be changed changed using usi ng the t he Program Program Propert Properties ies dialog. di alog. To show the Program Properties dialog select it in the Project Tree window and select " Properties roperti es"" from the right ri ght click cli ck popup menu. menu. Selec Selectt the t he OK OK button butt on to change change the propert properties ies of the t he program program after editing edit ing the fields fiel ds of the dialog. You can also also invoke i nvoke the Program Program Properti Properties es dialog from the t he right click popup menu menu of the editor edit or window of that t hat program or from the View View menu. menu.
Language:
The source code language of the t he program.
Type:
Select elect " Program" rogram" if you want want to t o have have a program, program, " CMP" MP" if you want want to t o create create a subrout subroutine ine with wit h or without wit hout steps and and " CFM" if you want to create create a subrout subroutine ine without wit hout steps. Number:
This number is i s used used to to refer to t o the the program or subroutine. subrout ine. A program can can have have the numbers from fr om 0 to t o 63, CMP CMPss and CF CFMs from fro m 0 to t o 99. You can can assign the the numbers as you like, li ke, but note not e t he following foll owing special special cases cases:: • Only Program Program 0 will be exec execut uted ed aut automati omatically cally on start-up. start- up. The context of Program 63 will wil l be used for CI commands, commands, avoid using usi ng this thi s number • for programs. If you import i mport a program with wit h a file fil e name name like li ke F< Fit is recommended recommended to t o use the num• ber ber . Version:
FST can can store stor e up to t o 9 versions versi ons of each each program. pro gram. Comment:
This tex t extt will wi ll be displayed displayed in list l istss aand nd capti captions ons for easier easier identifi identi fica catition on of the program. program. The The string str ing can can be up to t o 255 characters characters long. File, il e, Size and Dat Dat e:
Some informati information on on the program's fil f ilee on your computer computer FST Version 4.02.21 Manual
37
Last Last compiled: compil ed:
Date of the t he last succes successful sful compil compilati ation on of the t he source source code program. See See the tab " Log file" fi le" for the t he compiler compiler output if any. any. Version:
The operati operating ng system system version version of the compil compiled ed program, program, see see the tab " log file" fi le" for the t he path path name name of the source file fi le in the t he library. libr ary. Note! •
•
There can can be only one program with wit h the t he same same type, number and ve versio rsion! n! If you try t ry to to create create a program that already exists exists you will wil l be prompted prompt ed to overwrite overwrit e it. it . The language of a program progr am cannot cannot be changed! changed!
2.5.4 Delet Deletii ng a Program To delete a program from the project select select " Program >>Delete... >Delete..."" from t he menu. Then Then a dialog box will wil l be displaye di splayedd that t hat allows all ows you to select a program. program. Double cli click ck a program program or select select it i t and press the OK OK button butt on to delete delet e it. it . You can also also delete del ete programs pro grams by selecti selecting ng it and pressing the t he DE DEL key or via the t he right click cli ck popup menu menu using the t he Proj roject ect Tree window. window .
The Delete Program dialog offers the following features: • The name and comment comment are displayed displ ayed for each program iinn a separate column. • Adjust the width widt h of each each column by moving moving the separa separator tor in tthe he header header with wit h the t he mouse. Each ach column of the list l ist box can can be sorted alphabetica alphabeti callllyy by clicking cli cking on the t he column • header. Cli Click ck again again to t o reverse the sorting sorti ng order. • You can can only display display programs of one type or language by making the appropri a ppropriate ate selecti selection on in the t he combo combo boxes boxes above above the list li st box. If you only want to t o display the t he program program name namess without wit hout comments comments in i n a simple simple list l ist,, • toggle the radio buttons but tons in the t he upper upper right ri ght corner corner of the t he dialog.
FST Version 4.02.21 Manual
38
2.5.5 Open a Program for Edit di t ing To open a source code program for edit edi ting select " Program >>Open..." >Open..." from from the menu. The The Open Program Program dialog will wil l be displayed that allows you to t o select select a program. program. Double Double click cl ick a program program or select select it and and press press the " OK" button butt on to open it in tthe he edit editor or windo wi ndow. w. You can can also open a program for editing edit ing by double doubl e cli clicking cking on it in tthe he Project Tree window or via the t he right click popup menu of the t he Project Project Tree Tree window. The same same dialog with wit h a different dif ferent caption capti on is used to select a program to be deleted or a module to t o be call called ed.
The Open Open Program Program dialog dial og box offers the th e following foll owing features: feat ures: The program name and comment comment are displayed di splayed for for each program in a separat separatee col• umn. • Adjust the width widt h of each each column by moving moving the t he sepa separator rator in i n the header header with wit h the mouse. Each ach column of the list l ist box can can be sorted alphabetica alphabeti callllyy by clicking cli cking on the t he column • header. Cli Click ck again again to t o reverse the sorting sorti ng order. You can only display di splay programs of one type or language language by making the appropri a ppropriate ate • selecti selection on in the t he combo combo boxes boxes above above the list l ist box. If you only want to t o display the t he program program name namess without wit hout comments comments in i n a simple simple list l ist,, • toggle the radio buttons but tons in the t he upper upper right ri ght corner corner of the t he dialog. 2.5.6 Compiling ompil ing a Program To check the t he syntax of a source code program compile compile it. it . Open the program for editing edit ing,, then select " Program >>Compil >Compile..." e..." from from the menu and and watch the output out put in the t he messag messagee window.
FST Version 4.02.21 Manual
39
Note! •
•
Unsaved nsaved changes changes in the t he source code will automati aut omatically cally be saved saved prior pri or to t o the compi compi lation. The result resultss of the compilat compilation ion will wil l also be st st ored in a log file. fi le. To To view it select " View >>Properti >Properties es"" from the menu. menu. Then Then selec selectt the t he "L " Log file" fil e" tab ta b of t he Program Prope Properrtities es dialog
2.5.7 Selecting electi ng Programs for Download Select elect " Program >>Selec >Selectt for Download..." from the t he menu menu to t o display displ ay a dialog box that allows you to select select the programs for download. d ownload. If a program pr ogram has has a check check mark mark in i n the t he box next next to t o it it will be download downloaded ed to the control controller. ler. You can also also select the t he programs programs by placing a chec checkk mark in the box next to t o it in the t he Project Tree window wind ow..
FST Version 4.02.21 Manual
40
The Select Select Programs Programs for Download Download dialog di alog offers off ers the followi fol lowing ng features: • The program name and comment comment are displayed di splayed for for each program in a separat separatee column. Adjust the width widt h of each each column by moving moving the t he sepa separator rator in i n the header header with wit h the • mouse. • Each ach column col umn of the t he list li st box can be sort sorted ed alphabeti alphabetica callllyy by clicking cli cking on the t he column column header. Cli Click ck again again to t o reverse the sorting sorti ng order. You can can only display display programs of one type or language by making the appropri a ppropriate ate • selecti selection on in the t he combo combo boxes boxes above above the list li st box. If you only want to t o display the t he program program name namess without wit hout comments comments in i n a simple simple list l ist,, • toggle the radio buttons butt ons in the upper upper right corner corner of the t he dialog. Note! Only Only one version of t he same same program can can be selected selected for f or download. downl oad. 2.6
Controll ontr oll er Settings ett ings
There are several several runt r untime ime and download downl oad options opt ions for f or a FS FST project. proj ect. They They can be modif modified ied using the tabbe t abbedd dialog dial og Control Controller ler Sett Settings. ings. Double click on the t he ent entry Cont Control roller ler Set Set tings in the t he Proj Project ect Tree Tree or select select " View >>Cont >Control roller ler Settings" ett ings" from the menu menu to show the t he Controller ontrol ler Sett Settings ings dialog. 2.6.1 Run Mode (Cont (Control roller ler Settings) ett ings) The Run Run Mode tab is the t he default tab of the Contr ontroll oller er Sett Settings ings dialog.
Autostart:
Check heck this thi s option ifi f you want want the t he project project to t o start after aft er download download without wit hout giving givi ng an an explicit explicit Run command command and and regardless regardless of the t he Start Start// Stop input. input . The default default sett setting ing is Off Off.. Start/ Stop input:
Check heck this t his option opt ion ifi f you want to t o configure a sta start/ rt/ stop input input.. Enter Enter the t he input t o be used used in the edit box. box. Note! It will wil l not be chec checked ked if there t here is any hardware hardware configured configured for this t his input. input . If there t here is no hardware hardware confi configured gured for this t his input it is always off off unless explicit explicitly ly set by CI CI command command or a driver. The default sett setting ing is Off. Off. FST Version 4.02.21 Manual
41
Reset programs: pro grams:
Check heck this t his option opt ion if i f you want all programs programs to be inactivated (resett (resetted) ed) - rather than t han stopped stopped (breaked) (breaked) - ifi f The sta start/ rt/ stop switch switch is switche swit chedd to stop st op (falling (fall ing edge) edge) • An error occurs without wit hout the presence presence of an error program • Check heck this t his option opt ion ifi f you do not want want - in i n addition additi on to activating activati ng program program P0 P0 - all stopped (breaked) programs to be re-activated if The start start// stop switch swit ch is switched to run (rising edge) • The CI command command " R" is exec executed uted • The default sett setting ing is i s On. On. Delete project before download:
Check heck this t his option opt ion ifi f you want the t he project project that is active on the contr controll oller er to be unloaded from t he memory memory before the download. download. If this t his option opti on is not checked checked the operati operation on of the t he project project in the t he control controller ler will wil l continue conti nue during the file fil e transfers transfers that are nece necess ssary ary to download the new project project . Note! Do not enable this thi s option opti on if you want to t o use TC TCP/ IP for downloading downl oading the projec proj ectt . Delet Deleting ing the t he project will wi ll also stop all al l FS FST drivers dri vers including includi ng TC TCP/ IP. IP. The default default sett setting ing is Off Off.. Error output: out put:
Check heck this thi s option ifi f you want want the t he out output put specified specifi ed in the edit edit box below below to t o reflect the error state of the t he controller. controller. Note! It will wil l not be chec checked ked if any hardware hardware is confi configured gured for this thi s output. output . • The error output will wil l not be swit switche chedd off unles unl esss the error is reset. reset. • The default default sett setting ing is Off Off.. Error program:
Enter nter a program number other oth er than zero zero (1..63) to t o configure configur e it as error program. program . In case of an error error this t his program will wil l be started. The default default sett setting ing is i s 0 (Off (Off). ). Reset outputs:
Check heck this thi s option ifi f you want want all outputs output s to be rese resetttted ed if The sta start/ rt/ stop switch switch is switche swit chedd to stop st op (falling (fall ing edge) edge) • • The CI command command " S" is exe execu cuted ted • An error occurs without wit hout the presence presence of an error program When the project is i s started - rather than using the old values values from the t he retentive • storage of operan operands ds The default sett setting ing is i s On. On.
FST Version 4.02.21 Manual
42
2.6.2 Drives ri ves (Cont (Control roller ler Settings) ett ings) Select elect the Drives tab on the t he Control ontroller ler Sett ettings ings dialog.
Project File:
Enter the t he drive where the project file fi le should be stor stored ed on the controller. controll er. If the t he drive you you want want is i s not not list l isted ed in the combo combo box you can can simply simply type t ype the drive dri ve letter. If the drive you choose choose is availabl availablee of the controller control ler will wil l be checked checked prior to t o the download. The default depends depends on the controller control ler type t ype FECComp ompact B: FECStand Standar ardd B: HC0X B: HC1X C: HC2X C: Startup Batch:
Enter the t he drive where the startup start up batch file fil e should should be stored on the controller. controll er. If the t he drive you you want want is i s not listed li sted in the combo combo box you you can can simply type the drive letter. lett er. If the drive dri ve you you choose choose is avail available able of the t he control controller ler will wi ll be chec checked ked prior to t o the download. Only Only choose a drive dri ve where the t he STA STARTUP.BAT .BAT will be automati aut omatically cally started. start ed. This depends on the t he controller control ler type t ype you you are using. The default depends depends on the controller control ler type t ype FECComp ompact B: FECStand Standar ardd B: HC0X B: HC1X C: HC2X C:
FST Kernel: FST Version 4.02.21 Manual
43
Enter the t he drive where the FS FST kernel resides resid es on the controller. control ler. If I f the t he drive you want is i s not listed li sted in the combo box you can can simply type t ype the drive dri ve letter. lett er. If there t here is a FS FST kernel kernel installed instal led on the t he drive dri ve you choose choose wil willl be checked checked prior to the download. The default depends depends on the controller control ler type t ype FECComp ompact A: FECStan Standa darrd A: HC0X A: HC1X A: HC2X C: 2.6.3 Options pt ions (Cont (Control roller ler Settings) ett ings) Select the Opti Options ons tab of the t he Controller Settings dialog.
Controller COM port:
There can can be more t han one COM port on a cont control roller ler.. This This optio opt ionn indicates indi cates the FST PLC operating system which CO COM port on the controller control ler should shoul d be used used for CI communication communication.. The default depends depends on the controller control ler type t ype FECComp ompact FECStan Standa darrd HC0X HC1X HC2X
0 0 0 1 1
Additional parameters:
This tex t extt will wi ll be appende appendedd to the t he kernel kernel'' s comma command nd line. li ne. It is usuall usuallyy blank and mea meant nt ffor or future fut ure extensions. extensions.
FST Version 4.02.21 Manual
44
2.6.4 Password assword (Contr (Controll oller er Settings) ett ings) Select the Password tab of the Controller Settings dialog.
Enter nt er a password that will wi ll be activat activated ed on on the control controller ler when t he project is i s start started. ed. If you do not want a password password leave leave this thi s field fiel d blank. 2.6.5 Download (Cont (Control roller ler Settings) ett ings) Select elect the Download Download tab t ab in the t he Control ontroller ler Sett ettings ings dialog.
Download Source our ce Fil Files: es:
Check heck this t his option opt ion ifi f you want all source files fi les that are nece necess ssary ary to restore the t he project to t o be stored on the t he contr controll oller er in a ZIP ZIP file. fi le. To later res r estor toree the projec proj ectt select select " Online nli ne >>Upload >Upload Project" from the menu. menu.
FST Version 4.02.21 Manual
45
Dow ownload nload modified driver fil f iles es::
If you do not want to t o update the driver files fi les in the controller, controll er, unchec uncheckk this t his option. opti on. This This may may be useful useful if the controller controll er has has been been programme programmedd with wit h a differe diff erent nt F FS ST install insta llati ation on with wit h a different dif ferent driver dri ver version. version. Usually Usually this t his option opt ion should be ena enabled. bled. This option opt ion does not affect the t he driver confi configurations gurations since they are are stored inside the t he project file fi le ttoge ogether ther with wit h the programs and modules. modules. 2.7
The IO Configurat onfi guratii on
The IPC IPCis a modular modul ar system and there are numerous input and output out put modules modul es available. availabl e. They are are usually usuall y acces accessed sed by your cont control rol programs trough trou gh the FS FST input inpu t and output out put operope rands. If you want to t o use an IOmodule in i n your project you have have to configure it in order to t o assign assign it t o the t he FS FST input and output operands operands you want want to use for them t hem.. The The physical physical configuration configurati on of your control cont roller ler hardware does not not automati aut omatically cally determine det ermine the FS FST operands that are used to t o access access the hardware. hard ware. Each ach IO module occupies occupi es a cert certain ain range r ange in the t he IO area area of t he processor. Many modules support several several ranges ranges that usuall usuallyy can can be selected selected by a rotary rot ary switch on the t he bottom bott om side of these units. unit s. To To identif ident ifyy a module for the t he FS FST IO configuration configurati on select select it i t from the t he list li st of supported port ed modules and and enter the t he chose chosenn switch swit ch set set ting. ti ng. FST will wil l check check your configuration configurati on for valid switch positions posit ions and overlapping in tthe he IO area of the processor. processor. It however however will wil l not sugges suggestt switch swit ch posit positions ions that are sti stillll avail available. able. The The documentation documentation for f or the t he individual modules contains contains the neces necessa sary ry information in formation about the t he occupied IO area of the t he processor. processor. For For some modul modules es there are more more options opt ions than t han just t he selection selecti on of an IO range. Some Some of these options opti ons require requi re modificati modif ications ons on the hardware (e.g. (e.g. jumpers) j umpers) while whil e others are programmable programmable by software, soft ware, i.e. the t he FS FST IO driver. dri ver. All of t hese options opti ons are are usually reflec refl ected ted in i n the name of the IO driver. Make sure sure to always selec selectt the appropriate driver dri ver for the t he module' module'ss configurati configuration. on. More detai details ls are given given in the t he extra extra docudocumentat mentation ion for the t he individual IO modules. modules. You are free to choose any FS FST input or output out put word you like l ike for f or the t he individual indivi dual modules. How many many input and/or and/ or output out put words a module module occupies occupies is list l isted ed in the t he special special documentadocumentat ion for f or the t he modules. FS FST will wil l check your configurati configur ation on for overlapping overl apping in i n the FS FST operands. If there t here is an input word required requi red for output modules these these operands oper ands are usuall usuallyy used used for status information. i nformation. This This is described described in i n the module's module' s docume documentat ntation ion as well well.. Please note that th at there t here is a separate separate IO configurat confi guratio ionn for each co controll ntroller er type. type. If you switch a project from one control controller ler type t ype to another another the t he IOconfi configuration guration will wil l be empty. empty. If you swit switch ch back back however, however, you again again will wi ll have the original ori ginal IO configurati configuration on for that t hat controller controll er type. In the IO configurati configuration on you can can only inse i nsert rt IO modules that are available available for the current controll controller er type sett setting ing of the t he project. project. 2.7.1 The IO Configurati onfi guration on Window To open the IO Configurat onfi guration ion window wi ndow select " View >>IO Configurat onfi guration. ion..." .." from from the menu or simply double double click on the " IO Configurati onfiguration" on" entry entry in i n the Proj rojec ectt Tree window. window . A MDI MDI child chil d window with wit h the current current IO configurati configuration on is shown.
FST Version 4.02.21 Manual
46
The IO Configurati Configuration on window offers of fers the t he following foll owing features: • The IO driver dri ver descri descript ption, ion, the switch swit ch set set ting and FS FST operands are displayed for each each module modul e in a separate column. Adjust the width widt h of each each column by moving moving the t he sepa separator rator in i n the header header with wit h the • mouse. • The list li st is i s always always sorted by definit defini t ion. The order reflects the t he exec execut ution ion order at runtime ti me.. It is not possible possible to t o sort the t he list alphabeti alphabetica cally. lly. You can move the entries entri es using the th e clipboard. clip board. The cli clipboard pboard commands are are avail• able from the Edit menu or the t he right click popup menu and and always refer refer to t o the t he seselected entries entri es.. Insertion is i s always always done before the select select ion, if i f no entry ent ry is i s selected selected at the end end of the t he list. In the status stat us line li ne the current current number of entries entr ies is shown. • To remove the t he select selected entries entri es from the t he IO configurati configur ation on simply simpl y press the DEL DEL key or • select select " Edit >>Delete" >Delete" from the t he menu menu or " Delete" from the t he right click cli ck popup menu. menu. To insert a new new entry simply simpl y press t he INS INS key or select " Insert >>IO module" modul e" from fr om • the menu or " Insert Insert IO module" from the right ri ght click cli ck popup menu menu or double cli click ck an an empt emptyy line. To edit an entry select select " View >>Properti >Properties es"" from the menu menu or " Properties roperti es"" from the t he • right click popup menu menu or double click on the t he entry entry you want to t o edit. To print pr int t he current current IO configurati configuration on select select " Module >>Print >Print"" from the t he menu. menu. • Note! • •
There is no undo function funct ion available. avail able. All changes are immediately immediatel y saved saved to disk. di sk. If an entry refers to a module type t ype that is i s unknown to the t he F FS ST library li brary the missing file fi le name name will wil l be shown in brackets brackets []. To selec selectt another type of IO module for the t he entr entryy open it for f or editing edit ing as for any other entry. entr y. A projec proj ectt with wit h an IOconfiguration configurati on that concontains unknown IO modules cannot cannot be downloaded to tthe he cont control roller. ler.
2.7.2 Adding ddi ng and Edit di t ing IO Modules Modul es To insert a new IOmodule to t o the t he IO configurat configuration ion select select " Insert Insert >>IOmodule..." from the t he menu, menu, " Insert Insert IO module" module" from the right click cli ck popup menu menu of the IO Confi onfigurat guration ion window wi ndow or simply si mply double click cli ck on an empty empty line l ine in the t he IO Configuration onfigurati on window. To change t he settings sett ings of an IO configurati configuration on entry entry select select it i t in tthe he IO Confi onfigurati guration on window and selec selectt " View >>Propert >Properties" ies" from the menu, menu, " Properties roperti es"" from the right click popup menu menu or simply si mply double click cli ck on the setting sett ing you want to t o change change.. The IO Module Entry Entry dialog di alog will wil l be shown shown that allows you to t o enter the t he required settings. sett ings.
FST Version 4.02.21 Manual
47
Select the t he IO module type: t ype:
Select elect the IO module module from fr om the list l ist of available module types t ypes that corresponds corresponds to your hardware. For For some module module types more than one IO driver dri ver is avail available. able. Select Select the t he one t hat fit f itss your needs. Please Please note that th at some options opt ions can be acti activated vated by simply simpl y choosing the th e approappropriate pri ate IO driver dri ver while whil e others require requir e hardware settings sett ings (e.g. jumpers) or even a special special version version of the module. Detail Detailss for the t he individual indivi dual modules are given given in the t he extr extraa documenta documenta-t ion for each each module. module. Switch:
Enter here the switch swit ch sett setting ing for f or the t he IO module. Each IO module module occupies a cert certain ain range r ange in the t he IO area area of the t he processor. Many modules support several several ranges ranges that usuall usuallyy can can be selected selected by a rotary rot ary switch on the t he bottom bott om side of these units. unit s. For For some IO drivers this t his switch swit ch sett setting ing might be used used for other purposes p urposes.. IW: IW:
Enter nter here the FS FST input inp ut word you would woul d like li ke to use u se to access access t he IO modules modul es input data from your programs. programs. If the t he IO module supplies suppli es more more than one input word conse consecutive cutive input i nput words will wi ll be used. How How many input inp ut words are used for each each IOmodule modul e can can be read in the t he extra extra documentati documentation on for the t he individual indivi dual IO module. module. OW:
Enter nter here the FS FST output out put word you would woul d like li ke to use u se to access access t he IO modules modul es output data from your programs. programs. If the IO module module supplies suppli es more more than one output word consecuti consecutive ve output out put words will wi ll be used. How How many output out put words are used for each each IO module modul e can can be read in the extr extraa docume documentat ntation ion for the individual i ndividual IO module. Note! •
•
FST will wil l check your configuration configurat ion for f or overlapping overl apping both bot h in the t he IO range of the t he processor and t he FS FST operands. If there t here is an input word required r equired for output out put modules only only thes t hesee operands operands are are usually used for status information. i nformation. This This is i s described described in the t he module' module'ss docume documentati ntation. on.
FST Version 4.02.21 Manual
48
2.8
The Driver ri ver Configurat onfi guratii on
Certain functions f unctions in i n the t he control controller ler (such as fieldbus operation) are supported supported by drivers. These drivers dri vers are are normally normall y started start ed before the th e FS FST operating operati ng syst system when when the th e cont control roller ler is is powered up. FST suppor supportts the t he manageme management nt of these drivers. FST handl handles es loading loadi ng and preparati preparations ons for automatic starting start ing of the drivers dri vers.. The The driver configuration configurati on is used to select and configure configure the t he drivers for a project project.. Each ach driver dri ver has its it s driver number. This number is usually usuall y used for only onl y one driver, except except there are more drivers that t hat are for the t he same same purpose. In one proj project ect you can only use one driver with wi th the same number. number. Some Some drivers use the functions functi ons of other ot her drivers. In this t his case case both drivers have to be configured configured for f or the t he project. For For most drivers dri vers there are are options, opti ons, which are individual indivi dual for each driver. There are drivers that th at require requi re a more comprehensive comprehensive configurati configur ation, on, such as a fieldbu fi eldbuss conconfiguration. fi guration. This This configuration configurati on is usuall usuallyy edited using a spec special ial configuration configurat ion tool t ool and stored in a file. fi le. T The he contents contents of this thi s file fil e are are incorpora incorporated ted into the t he projec projectt file fil e that will wil l be downloaded to the controller controll er and and will wil l be used used by the driver. Please note note that t hat there t here is a separate separate driver dri ver confi configuration guration for f or each each co controller ntroller type type.. If you switch swit ch a project from fr om one one control controller ler type t ype to another another the t he driver configurati configuration on will be empty. empty. If you switch back back however, however, you again again will wi ll have the original ori ginal driver dri ver configurati configuration on for that t hat concontroll tr oller er type. In the driver configurat configuration ion you can can only insert drivers dri vers that are available available for the current current controller control ler type sett setting ing of the project. project. 2.8.1 The Driver ri ver Configurat onfi guration ion Window ind ow To open t he Dri Driver ver Configurati onfi guration on window select " View >>Dri >Driver ver Confi Configurati guration..." on..." from fr om the menu menu or simply double cli click ck on the " Driver Configura Configuratition" on" entry entry in i n the t he Project Tree window. window. A MD MDI child window with wit h the t he current current driver configuration is shown
The Driver Driver Configurati Configuration on window offers the t he following foll owing features: The name, name, number, number, required other ot her drivers driv ers and a short short descriptio descript ionn are displayed for • each each driver dri ver in a separat separatee column. Adjust the width widt h of each each column by moving moving the t he sepa separator rator in i n the header header with wit h the • mouse. Each ach column of the list l ist box can can be sorted alphabetica alphabeti callllyy by clicking cli cking on the t he column • header. header. Cli Click ck again again to t o reverse the sorting sorti ng order. In the status line l ine the current number of entr entries ies will be shown. shown. • To remove the selected selected drivers dr ivers from fr om the driver dri ver configurati configur ation on simply simpl y press the DE DEL • key or or select select " Edit >>Delete" >Delete" from the menu menu or " Delete" from the t he right click cli ck popup popup menu. • To insert a new new driver dri ver simply press the INS key or select select " Insert Insert >>Driver..." >Driver..." from the t he menu menu or " Insert Insert Driver..." from the right click cli ck popup menu menu or or double click on an empt emptyy line in the t he configurat configuration ion window. To edit a driver' driver'ss opti options ons select select that t hat driver dri ver and and then " View >>Propert >Properties" ies" from the t he • menu menu or " Properties roperti es"" from the right click cli ck popup menu menu or double cli click ck on the driver. • To print pri nt tthe he current current driver dri ver configurati configurati on select select " Program >>Print" rint " from the t he menu. menu. FST Version 4.02.21 Manual
49
Note! • •
There is no undo function funct ion available. avail able. All changes are immediately immediatel y saved saved to disk. di sk. If an entry refers to a dri driver ver that is i s unknown to the FS FST library li brary its it s name name will be shown shown in brackets brackets []. If you select select " View ie w >>Properti >Properties es"" for that t hat driver, dri ver, the option opti on sett settings ings will wil l be shown if avail available. able. Howev However, er, they cannot cannot be edited. edit ed. A project wit wi t h a driver confi configuration guration that t hat contains unknown drivers cann cannot ot be downloaded downloaded to t o the controller.
2.8.2 Adding a New New Driver To insert i nsert a new driver to the t he configurati configuration on selec selectt " Insert Insert >>Driver..." >Driver..." from the menu, menu, " Insert Insert Driver..." from the right click popup men menuu of the t he Dririver ver Confi Configurati guration on window or simply double doubl e click on an empty line. li ne. T The he Selec Selectt Driver dialog di alog will wil l be shown shown that allows you to to choose choose a driver. Double Double click cli ck on the driver dri ver you want want t o add or press the OK OK button butt on to t o add the selected driver.
The Selec Selectt Driver dialog di alog offers the t he following foll owing features: • The name, name, number, required requir ed other drivers dri vers and and a short desc d escriript ption ion are displayed for each each driver dri ver in a separat separatee column. Adjust the width widt h of each each column by moving moving the t he sepa separator rator in i n the header header with wit h the • mouse. • Each ach column of the list l ist box can can be sorted alphabetica alphabeti callllyy by clicking cli cking on the t he column column header. Cli Click ck again again to t o reverse the sorting sorti ng order. If you only want want to t o display the driver names names without wit hout descript description ion in a simple list, list , tog• gle the radio buttons butt ons in the upper upper right corner corner of the t he dialog. After ft er insert inserting ing the driver you automa automatitica callllyy will be prompted prompted to t o edit the driver's options .
FST Version 4.02.21 Manual
50
2.8.3 Editing dit ing Driver Options pt ions To change change the options opt ions of a driver selec selectt it i t in i n the Dririver ver Configura onfiguratt ion window and select " View >>Properti >Properties es"" from the t he menu, menu, "P " Properties roperti es"" from the t he right click cli ck popup menu menu or simply simply double click on it. i t. The Driver Driver Opti Options ons dialog will be shown shown that allows all ows you to make the required sett settings. ings. The Driver Driver Options dialog di alog is different di fferent for each each driver depending on the required r equired settings setti ngs.. The The required settings setti ngs are are described described in the t he separa separate te documentati documentation on for the t he individual indivi dual drivers dri vers.. This is an exa example mple how a typica typi call dialog di alog will look like: l ike:
For each each option opti on there is a default default value avai available. lable. If you want to t o reset reset all options opt ions to their t heir defaults, press the Default Default button. but ton. Most drivers dri vers are asking asking for a controller controll er drive. Enter Enter here the drive dri ve of the controller control ler where you want want the driver dri ver exe executable cutable file fi le to t o be downloaded downloaded or where it already reside resides. s. If t he chosen chosen drive is avail available able on the contr controll oller er will be chec checked ked prior to t o downloading the project. Press the Help Help button but ton to t o open the driver's driver' s chapter chapter in the t he online help viewer. Note! The The options opti ons of an unknown driver dri ver cannot cannot be edited. edit ed. They They are are only displayed di splayed in in a simple dialog.
FST Version 4.02.21 Manual
51
2.9
The Al l ocati ocation on List
PLCprograms consist consist of program program code code for handling handl ing of data. This data is available avail able in i n the form f orm of operands. An An operand operand consist consistss of an abbreviat abbreviation ion identif i dentifying ying the t he equipment equipment group and an address address specifying specifying a level level withi wi thinn the group. Outpu Outputt 3 in i n output word 5, for example, example, is identif ident ified ied as O5.3. FST also allows all ows you to use symbol symbolic ic designations designati ons for the t he operands: output outp ut O5.3 may swit switch ch a motor motor on and off, for f or exam example, ple, in which whi ch cas casee you can can refer refer to t o it as " MotorOn" MotorOn" in your programs. progr ams. In this thi s way you can make make the programs progr ams more easil easilyy comprehensibl comprehensible, e, and also retain ret ain a clear overview even when when there th ere is a large number of operands. You are largely free f ree to decide on the t he names names of the th e symbol symbolic ic operands yourself. yourself . A name may consist consist of up to t o nine chara characters, cters, but the t he first charac character ter must be a letter lett er or an underline charact character (_). You You can can use any combinat combination ion of lett l etters, ers, digit digi ts or underlines underli nes for the t he subsubsequent charact characters, but no spaces. spaces. The The designat designation ion must, must , however, be different diff erent from fr om that of an absolut absolutee operand. In the foll f ollowing owing the t he direct entry of an operand operand (such (such as O5.3) O5.3) is referred to t o as an an absolut absolutee operand, whereas an ent entry ry in symbolic symboli c form (MotorOn (Mot orOn)) is referred referr ed to as a symbolic symboli c operand. operand. The assignment assignment of symbolic symboli c operands operands to absolute absolut e operands operands is defined in the t he All Allocati ocation on List List.. It is advisable to creat creat e the All Alloca ocatition on List List before program entry and then only to t o use the symboli symbolicc operand operand designati designations ons in the t he contr control ol programs. programs. The The All Alloca ocatition on LList ist can can be edited edit ed with wit h the Allocation List editor, edit or, covering covering all functional fu nctional aspects. aspects. It is i s aalso lso possible to inse i nsert rt operands in the t he course course of program progr am entr entry, y, however. 2.9.1 The Allocation ll ocation List Editor dit or To open the All Alloca ocatition on List List editor select select " View >>All >Alloca ocatition on List List"" from the t he menu menu or simply s imply double cli click ck on on the " Alloc ll ocation ation List" List" entry entry in the t he Proj roject ect Tree window. window . A MDI MDI child chil d window with wit h the current current Alllloca ocatition on List List is shown.
The All Alloca ocatition on List List editor edit or offers off ers the following foll owing features: features: • The absolute absolut e operand, the symbolic symboli c operand and and a comment comment are displayed di splayed for each each entry in i n a separate separate column. Adjust the width widt h of each each column by moving moving the t he sepa separator rator in i n the header header with wit h the • mouse. Each ach column of the t he list li st box can be sorted sorted alphabeticall alphabeti callyy by clicking cli cking on the t he column • header. Cli Click ck again again to t o reverse the sorting sorti ng order. In the status line l ine the current number of entr entries ies will be shown. shown. • The use of different di fferent icons i cons makes makes it easy easy to disti di stinguish nguish inputs input s and and outputs output s from in• ternal operands. FST Version 4.02.21 Manual
52
•
•
•
• •
To remove r emove t he selected selected entri ent ries es from the t he All Allocati ocation on List List simply simpl y press the DEL DEL key or select select " Edit >>Delete" >Delete" from the t he menu menu or " Delete" from the t he right click cli ck popup menu. menu. To insert a new new entry simply si mply press pr ess t he INS INS key or select " Insert >>O >>Operand..." perand..." from fr om the menu menu or " Insert Insert Operand" perand" from the right click popup menu menu or double cli click ck an an empt emptyy line. To edit an entry select select " View >>Properti >Properties es"" from the menu menu or " Properties roperti es"" from the t he right click popup menu menu or double click on the t he entry entry you want to t o edit. To print pri nt the current Allocati llocation on List List select select " Program >>Print >Print"" from the t he menu. menu. To find fi nd and replace replace text in i n the t he comm comments ents use the appropriate functions funct ions from fr om the Edit menu.. menu
Note! There There is no undo function functi on avail available. able. All changes changes are immediately immediat ely saved saved to t o disk. di sk. 2.9.2 Adding ddi ng and Edit di t ing Allocati ll ocation on List Entr Entries ies To insert an operand to the t he Allocation List select " Insert >>Operand..." >Operand..." from from the menu, menu, " Insert Insert Opera Operand" nd" from the right click cli ck popup popup menu menu of the t he Alllloca ocatition on List List editor edi tor or simply double click on an empty empty line li ne in the All Alloca ocatition on List List editor. edit or. It is i s aalso lso possible to add entries entri es to the t he All Alloca ocatition on List List while whil e typing the control progra pr ograms ms in the Stat tatem ement ent List editor edit or.. To change an entry in i n the th e Alllloca ocatt ion List selec selectt it i t in i n the Alllloca ocatition on List List editor edit or and select " View >>Properti >Properties es"" from the t he menu, menu, "P " Properties roperti es"" from the t he right click cli ck popup menu menu or simply simply double doub le click cli ck on the operand you want to t o change. change. The All Alloca ocatition on List List Entry dialog di alog will be shown shown that allows you to enter the t he required sett settings. ings.
Absolute Operand:
Enter here theabso the absolut lutee operand, operand, e.g. e.g. O3.2 or or FW4. FW4. Symbolic Operand:
Enter here the sym symboli bolicc operand, operand, e.g. MotorOn Mot orOn.. You are largely l argely free fr ee to decide on the t he names names of the t he symbolic symbolic operands yourself. A name name may may consist consist of up to t o nine charac characters, ters, but t he first character character must must be a letter or an underline charact character (_). You You can can use any combinat combination ion of lett l etters, ers, digit digi ts or underlines underli nes for the t he subsubsequent characters, but no spaces. spaces. Comment:
Enter here a short comment for t he operand. It can be up to 36 charact characters long. If you use an an operand in your programs, programs, its i ts comment comment from fr om the Allocation List wi willll be autoautomati matica callllyy insert inserted ed into the t he program program text.
FST Version 4.02.21 Manual
53
Note! • •
•
There can can be only one entry for f or the t he same same absol absolut utee or symbolic symboli c operand. The symbolic symbolic operand operand must be different di fferent from that t hat of an absolute absolute operand. operand. You can can enter an absolut absolutee operand operand with wit h or without wi thout a symboli symbolicc design designation, ation, but a symbolic symboli c operand always always requires requi res an absolut absolutee operand .
2.9.3 Selecting electi ng an Operand from fr om t he Allocati ll ocation on List The Select Select Operand Operand dialog di alog is is used for diff di fferent erent purposes pu rposes where you you have to select select an operoper and. It allows all ows you to choose an operand operand from the t he Allocation List or to enter it directly (absolute lut e or symbolic) symbolic) in the t he edit edit field fi eld below the t he list box. Pres Presss the OK OK button butt on to accept accept the t he operoper and entered.
The Select Operand dialog offers the following features: • The absolute absolut e operand, symbol symbolic ic operand and comment comment of each All Alloc ocat ation ion List entry are displayed in i n a separat separat e column. Adjust the width widt h of each each column by moving moving the separator separator in i n the header header with wit h the t he • mouse. • Each ach column of the list l ist box can can be sorted alphabetica alphabeti callllyy by clicking cli cking on the t he column header. Cli Click ck again again to t o reverse the sorting sorti ng order. 2.10
Online nl ine Mode
The FS FST programming environment and the controll contr oller er can can establish establi sh a communica communicatition on link li nk via an RS RS 232 or TCP TCP/ IP connect connection. io n. T Thi hiss link li nk is i s used to transfer t ransfer the t he compiled compil ed and and linked li nked project to t o the t he control controller ler and to t o exchan exchange ge information for debugging, debugging, for exam example ple operand values. Usin Using g the th e RS RS 232 connectio connect ion n
The tradit tr aditional ional way to connec connectt to the controller control ler is i s serial serial communica communicatition on over RS RS 232. 232. This This is is using the t he CO COM ports port s of the t he PC PCand IPC IPCand a simpl simplee point t o point poi nt connect connect ion. Usin Using g the t he TCP/ IP connecti connection on
Using Using TCP TCP/ IP to connect to t o the t he controller control ler has some advantages advantages over the RS RS 232 connectio connection, n, e.g. higher transmission t ransmission speed and and the t he possib possibililitityy to connect several several controll contr ollers ers and and PC PCs in a networ network. k.
FST Version 4.02.21 Manual
54
2.10.1 Connect onnect ing the t he Control ont roller ler to t o the PC PCfor Online Onli ne Mode If using u sing RS RS232 connect connect the controller control ler and your PCwith wit h a null modem cable. cable. Make sure to use the CO COM port por t of your PCyou have configured confi gured in i n your Communication Port Preferences (the (t he default is CO COM1). On On the th e cont control roller ler side si de use t he CO COM port you have confi configured gured to t o be used used for the t he CI in the Control ontroller ler Sett ettings ings.. This is by default defaul t t he RS RS232 port on the t he CP CPU modmodule ule of your controller, control ler, labelled label led CO COM or CO COM1. Before you can go online onli ne via TC TCP/ IP you also have to t o load load a project proj ect includi i ncluding ng the t he TC TCPIP driver into int o the t he control controller ler first f irst.. You You also have to select select TCP/ IP in the t he Communication Port Preferences and enter enter the t he IP address address of the t he control controller. ler. Make sure the controller controll er and the PC PC are connect connect ed to the t he same same net network. To test t est the t he connec connectition on to the controller control ler select " Online nli ne >>Login" >Login" from the t he menu. menu. A small small dialog box will wil l be displaye di splayedd that t hat informs inf orms you you about the t he progress progress of of the t he login procedure procedure and will wil l display di splay the result and other useful useful inform i nformati ation on about about the t he controller controll er if the login is sucsuccessful.
Press the Retry Retry button but ton to start the login l ogin procedure aga again. in. Press the Clo Close se butt but ton to dismiss di smiss the dialog dial og box. Note! This This dialog di alog box is also also displayed displayed when starting start ing other ot her online onli ne displays. In these c ases ases the dialog di alog box will be hidden automatically on succes success. s. 2.10.1.1 2.10 .1.1
Communication ommunicati on Port Preferences
Select " Extras xtr as >>Preferences >Preferences"" from the t he menu to open the t he Preferences Preferences tabbed dialog. di alog. Select Select " Communica ommunicatition on Port" Port" to choose choose the comm communica unicatition on method method and configure the t he specifi specificc settings.
FST Version 4.02.21 Manual
55
If you want to use TC TCP/ IP for the t he online connection connection select the t he " use TC TCP/ IP" IP" radio button, but ton, or " use RS RS232" t o use RS RS232. For the t he RS RS232 connect connect ion you have to specif specifyy a com port and a baud rate. rat e. The The com port can be selected select ed from the t he first fi rst combo box. It offers of fers all COM ports port s found on your PC. Choose Choose the baud rate from the t he second second combo combo box. Please Please note that t hat not all controllers controll ers all allow ow high baud rates. rates. 9600 is usually usuall y a good good choice, if not successful, successful, try t ry 2400. Please Please see see t he system system documentati documentation on of the control controller ler for details detail s If using usi ng TC TCP/ IP you have t o enter the t he IPaddress of the th e cont control roller. ler. If you chec checkk the option opti on " Save in Project" Project" the sett settings ings will be stored stored in the t he project project rather rat her t han for FST in general. Press the OK OK button butt on to a ccept ccept the t he new new settings setti ngs.. All online displays di splays wil willl be closed closed automatiautomat ically if you have made any cha changes. nges. 2.10.2 2.10.2 The Onli nl ine Control ont rol Panel The Onli Online ne Cont Control rol Panel is i s used to to Display the t he name name of the t he project project that t hat is i s currentl currentlyy loaded into the t he co controller ntrol ler • St art and stop the t he project project • Unload the t he projec proj ectt • Reboot the t he control controller ler • Display the t he error error in i n the controller controll er • Reset eset any error error in the t he cont cont roller roll er • Display ispl ay if the t he control controller ler is i s protected by a password password (locked) • Lock or unlock the t he control controller ler • • Change the password password of t he control contr oller ler To start t he Cont Control rol Panel select " Online nli ne >>Cont >Control rol Panel" from from the menu. A small small • MDI MDI child window wi ndow with the t he control controlss is shown shown
FST Version 4.02.21 Manual
56
Project
The name of the t he project currentl currentlyy loaded loaded in the controller controll er is displayed displayed in a text field, fi eld, or " none>" if no project is loade l oaded. d. Press the Run button butt on to start start the project. This This will wil l activate activate program 0 and acti activa vate te any any stopped programs depending on the Control ontroller ler Sett ettings ings.. Press the Stop button butt on to stop the projec proj ect.t. This This will wil l inactivate inactivat e (reset (reset ) all program programss and reset reset all outputs output s depending depending on t he Contr ontroll oller er Sett Settings ings.. Press the Break Break button butt on to break break the project. This will wil l stop stop (break) (break) any acti active ve program depending depending on the t he Control ontroller ler Set Set titings ngs.. Press the Unload button butt on to unload unload the project. All drivers are killed kil led and the project is unloaded from the t he memory. memory. To To load the t he project again you hav havee to download it or reboot the t he controller. Press the Boot Boot button but ton
to reboot the cont cont roller. roll er.
Error
The number number and a short short descri descripti ption on of the t he error in the t he controller controller are displaye displ ayedd in a text field. fi eld. Press the Res Reset et button but ton to t o reset reset the error in i n the controller. controll er. Password
If the t he controll controller er is protected by password (locked) is indicated indicated by the two radio buttons but tons for
the locked or unlocked state. Press either eit her the Lock or Unlock radio butt but t on t o lock or unlock the t he control controller. ler. If you want to t o unlock the control controller ler you have have to enter the t he password password.. The button butt on next next to t o the radio buttons but tons is labelled labell ed eit either her " Set Pas Password" sword" if currentl currentlyy no pas password is stored stor ed in the controller, control ler, or " Change hange Pass Password" word" if a password password is stored in the t he controlcontroller. Cli Click ck on it to t o se sett or change change the password password that is stored in i n the contr controll oller er . Note! If no password password is stored in the t he control controller ler iti t can be unlocked without enterin enteringg a • password. There is also the possibi possibilility ty to t o store a password password with wit h the t he project . • Befor Beforee you can can go online onli ne you have to con connec nectt the controller control ler to t o your PCand PC and possibly • confifigure con gure the online sett settings ings.. 2.10.3 Entering ntering the Cont Control roller ler Pass Password word If the t he controll controller er is protected by a password and you you want to unlock unl ock it for f or having full acce access ss you have to t o type t ype in t he password. password. The FS FST Password assword dialog di alog is i s displayed displ ayed to enter ent er the t he passpassword.
FST Version 4.02.21 Manual
57
Note! Note! If no password password is stored in the t he control controller ler iti t can can be unlocked unlocked without wit hout entering ent ering a pas password. 2.10.4 2.10 .4 Changing hanging t he Control ont rolller Password To change the password stored in the t he controll controller er open the Online Control Panel . Press the butt but ton labelled labell ed " change change Password" assword" or " Set Pass Password" word" . The The Change Password assword dialog di alog will wil l be displayed.
Old Password:
If you want to t o change change the password password you have have to enter here the old pas p assword sword first. fir st. New Password:
Enter here the t he new password. password. Leave Leave blank bl ank to erase the password from fr om the th e cont controll roller. er. Again:
Enter here the t he new password password again again (same as as for " New New Pass Password: word:"" ). Not Not e! There There is also also the t he possibil possibilitityy to store st ore a pass password word with wit h the projec proj ect.t. See Controller Settings.. tings 2.10.5 The Online nli ne Display ispl ay The Onli Online ne Display Display is i s used used to t o display di splay and modif modifyy the t he current current values of the PLCope operan rands ds.. To start the Onli Online ne Display Display select select " Online nli ne >>Onli >Online ne Display" Display" from the t he menu. menu. A MDI MDI child chil d winwi ndow with wit h several several tabs t abs is shown. shown.
FST Version 4.02.21 Manual
58
The Onli Online ne Display Display offers off ers the foll f ollowing owing features: Click li ck on the t he tabs to select select the t he type of operands operands that are displayed. • Use the scrollbar scroll bar or Page Page keys to select a range within wit hin the t he operands. • • Dirirec ectltlyy go to an operand operand by entering its it s number number in a dialog window. Display ispl ay a mixed mixed list li st of operands operands that are of interes int erestt in the t he Use Userr Defined Defined tab. t ab. • Open two or more Onli Online ne Displ Display ay windows to display di splay several several tabs t abs at at the t he same same time. ti me. • The word values valu es can can be displayed displ ayed in signed, unsigned or hexa hexadecimal decimal format f ormat . • If available avail able the t he bit values of the t he operands are are displaye displ ayedd as sixt sixteen een check check boxes boxes next next • to the operand value. value. If the t he mouse cursor cursor is i s placed over an operand operand value or a checkbox the symbolic • name name is displaye displ ayedd in i n a small small popup window (like (l ike ToolTips) ToolTips) if avail available. able. The updat updatee speed speed can be changed. • Modify operan operandd values. values. • Forcing of inputs input s and and outputs out puts is supported. • The Festo Festo Fiel Fieldbus dbus tab t ab shows the slaves found on the t he bus and allows all ows scanning scanning or • assigning assigning the config configurati uration on in the t he master. master. Modifying Modif ying Operand Values Values
There are are the t he following foll owing shortcuts for f or modifying modif ying operand operand values available: available: • Double click on a word, timer ti mer value value or string str ing to t o open the Modify Operand Operand dialog dial og (Modify Timer, Timer, Modify Str String) ing) for it. it . Check heck (or uncheck) uncheck) the boxes for the t he single bits bit s to toggle their t heir value. • Check heck (or unc u nchec heck) k) the t he boxes boxes for the t he timer ti mer and and counter states stat es to start (or stop) t he • timer ti mer or counter. • Select elect the new program program run state from the t he combo combo box to start s tart,, stop or inacti inactivate vate the program. Please Please note that programs can can only be stopped from fr om the active acti ve st st ate. Festo Fieldbus
The Festo Festo Fiel Fieldbus dbus tab tab shows the slaves found found on the th e bus when selecting selecti ng the tab t ab the fir f irst st t ime. If the t he confi configurati guration on in the t he master master has chan change gedd select select " Refresh efresh Display" Display" from the t he right click popup menu menu to update the list. li st. FST Version 4.02.21 Manual
59
To update the configuration configurati on in the t he mas master ter according according to t o the actual configuration configurati on in the t he bus select select " Scan can for Actual Actual Configurati Configuration" on" from the right click popup menu. menu. Please Please note that t hat this t his will wil l tem t emporaril porarilyy disconnec disconnectt all al l slaves from the t he mas master. ter. All fiel f ieldbus dbus outputs output s are are reset reset ttoo zero. zero. To assign assign the t he nominal nominal configuration confi guration (i.e. (i .e. the slaves used used by the control programs) programs) to the master' master'ss slave slave list select " Assign ssign Nominal Nominal Configurati Configuration" on" from the right ri ght click cli ck popup menu. menu. Please lease note that this thi s will temporarily disc di sconne onnect ct all slaves slaves from the t he master. master. All fieldbus f ieldbus outputs outpu ts are reset reset to t o zero. zero. User User Defined Defin ed List
You can display a list of operands of different dif ferent types t ypes that are of intere int erest st i n the User User Defined Defined tab. To To confi configure gure an an entr entryy click the label button. but ton. A dialog will be shown shown that allow all ow you to choose or enter an operand . Note! • The operands configured configured for the t he User User Defi Defined ned tab are stored wit wi t h the the project as ababsolute solut e operands. operands. Befor Beforee you can can go online onli ne you have to con connec nectt the controller control ler to t o your PCand PC and possibly • confifigure con gure the online sett settings ings . 2.10.6 Online nli ne Goto... ot o... To position posit ion on a cert certaain operand within wit hin the t he acti active ve page page of the t he Onli nline ne Displ Display ay or a step in Stat tateme ement nt List Onli nline ne select select " Online nli ne >>Goto..." >Goto..." from the menu menu or " Goto.." from the t he right click popup menu. menu. The Goto... Goto... dialog will wil l be display displ ayed ed that allows all ows you you to enter the t he number number of the operand ope rand or step.
2.10.7 2.10.7 Changing hangi ng t he Onlin nlinee Display Displ ay Format The word values of the t he online onli ne displays displ ays can be displayed displ ayed in signed, unsigned or hexadecimal hexadecimal format. Selec Selectt the appropriate mode from f rom the Onli Online ne menu menu or the t he right click popup menu. 2.10.8 Changing the Update Update Interval Int erval of the Onli Online ne Display ispl ay To change the update updat e speed speed of t he act active online onl ine display di splay select " Online nli ne >>Change >Change Update Update Speed..." peed..." from the t he menu. menu. The Online Online Update Update Speed Speed dialog will wil l be shown shown that t hat allows all ows you to enter ent er the update updat e interva int ervall in millisec mill iseconds. onds. The The allowed range is from 10ms to 10000ms; the t he default value is 1000ms. 1000ms.
FST Version 4.02.21 Manual
60
Note! The sett setting ing is i s vali validd for all online onli ne windows of the same same type, e.g. all all Onli nline ne Displ Display ay windows.. windows 2.10.9 Modifying Modif ying Onli Online ne Display ispl ay Operand Values To modify modi fy an operand value place the mouse cursor over it and press the right mouse butbut ton (or select it i t using the t he Tab Tab and Dir Directio ectionn keys and and press the Cont Context ext Menu key). Select Select " Modify operand..." from the t he popup menu. menu. Depe Depending nding on the operand operand type a dialog is shown that allows all ows you to change change the value. value. Press Press the Modif Mo difyy button butt on to trans tr ansfer fer the t he new new value value to t o the t he controll controller. er.
To simply simpl y toggle a one-bit operand Select elect " Toggle" oggle" from the popup menu. menu. Forcing Inputs Input s and Out Output puts s
Inputs Input s and outputs output s can can also be forced using the t he Modify Modif y Operand Operand dialogs. dial ogs. Press Press the Force Force button butt on to forc f orcee the input or output to tthe he new new value value entered entered in the t he controller controller ins i nstead tead of the Modify button. but ton. To To un-force an input or output enter " N" for the t he new new value value before press pressing ing t he Force Force button. butt on.
Note! In the th e online onli ne displays displ ays t he valu values es are are always shown shown as seen seen by the control contr ol programs. pr ograms. To reset all all inputs input s aand nd outputs output s to their t heir natural value select select " Clear Force Force Table" from the t he right click popup menu menu of the t he Onli nline ne Displ Display ay window FST Version 4.02.21 Manual
61
2.10.10File Transfer The File Transfer window offers the following features: Display ispl ay the files fil es and directori directories es on the differe diff erent nt drives dri ves of the t he control controller ler • • Information Informati on on the file fi le dates and and sizes Information Informati on on the free fr ee spac spacee on the controller controll er drives • Upload files fi les from the control controller ler to t o the PC PC • Delete files fi les on the control controller ler • • Download files fi les from the t he PC PCto the controller control ler To open the t he Fil Filee Transfer Transfer window wi ndow select " Online nli ne >>Fil >Filee Transfer" Transfer" from fr om the the menu. A MDI MDI child chil d window with wit h a directory directory list l isting ing of the t he control controller ler and seve several ral buttons but tons is shown. shown.
Display the t he contents contents of the parent direc di recto tory ry (Pare (Parent nt Dir) Download a file fi le from fr om the PC PCto the controll contr oller er (Downlo (Download) ad) Upload a file fi le or display di splay the contents of a subdirectory (Upload) Delete a file fi le on the t he control controller ler (Delet (Delete) e) Stop the current trans t ransfer fer (Stop) Transfer the t he currently currentl y displayed displ ayed directory directory again (Refresh) (Refresh) Display ispl ay simpl simplee list of file fi le names names (List (List)) Display the t he date and size of each each fil f ilee (Detail (Details) s) Directory Listing
If you open the Fil Filee Trans Transfer fer window wi ndow all files fi les and directories directori es of the t he current current drive and working directory direc tory of the control controller ler is displayed. Subdirectories Subdirectories (folders) will be labelled with wit h a folder icon ; files fil es are labelled labell ed with wit h a sheet sheet icon . The directory path path is shown in the combo combo box in tthe he toolbar of the Fil Filee Trans Transfer fer window. In the t he status line li ne of the t he Fil Filee Trans Transfer fer window the t he sizes sizes of the selected selected and the sum of all files fi les are shown as as well as the t he free space space of the drive dri ve.. To To display displ ay the date and size of each file, fil e, press the Detail Detailss radio button but ton in i n the Fil Filee Trans Transfer fer window's window' s toolbar. To swit switch ch back back to the t he FST Version 4.02.21 Manual
62
simple list li st of file fi le names names press press the List List radio button. but ton. To display the contents contents of a subdirec subdire ctory, tor y, double click cli ck on the directory name in the t he list li st box (or select select it and press press the Upload Upload butt but t on. To To display the contents of the parent parent direc di rectory tory or another drive, selec selectt iti t from f rom the combo combo box or pres pr esss the Parent Parent Dir button. but ton. To trans t ransfer fer the t he currentl currentlyy displaye displ ayedd direc di rectory tory again again press the Refresh Refresh butt but t on. Note! Note! Displaying the direct direct ory takes a littl lit tlee time. While While the information informati on is transferred the lights li ghts in the t he stat status us bar bar will wil l be red. As As soon soon as as the transfer is finished it will wil l be switched to green green again. again. If you want to t o stop the t he current current trans t ransfer fer press the Stop Stop button. butt on. Uploading ploadi ng Fil Files es to the t he PC PC
To upload upl oad a file fi le from the controller control ler to t o the PC PCdouble click cli ck on the file fil e name name in the list li st box (or select select it i t and press t he Upload Upload button). but ton). You You will wil l be asked asked for the t he locat locat ion where to store the file fi le on your PCusing the standa st andard rd fil f ilee dialog. During the fil f ilee transfer the progress progress is shown in the t he stat status us bar bar and the lights li ghts are switched to red. If you want to t o stop the t he current current trans t ransfer fer press the Stop Stop button. but ton. Deleting files fi les on the controller controll er
To delete a file fil e on the contr controll oller er select select iti t and press the Delete Delete butt but t on. You will wil l be asked if you are sure, then the file fi le is removed removed from the t he control controller. ler. Downloading ownloadi ng files fil es from the PC PC
To download a file fi le from fr om the PC PCto the controller control ler press the Download Download button. but ton. You will wil l be asked asked to select select a file fi le for download using the standard standard file fi le dialog. The The file fil e will be transferred to the t he directory of the controller controll er of which the directory is currently displaye di splayedd (see (see the combo combo box in the toolbar). t oolbar). During During the t he file fil e transfer the progress progress is shown in the t he stat status us bar and and the lights li ghts are swit switche chedd to red. r ed. If you want want to t o stop the t he current current trans t ransfer fer press the Stop Stop button. but ton. Remarks • Befor Beforee you can can go online onli ne you have to con connec nectt the controller control ler to t o your PCand PC and possibly confifigure con gure the online sett settings ings.. The Fil Filee Trans Transfer fer window does not work correctl correctlyy if the controller controll er is protec prot ected ted by a • password (locked). 2.10.11T 2.10.11The he Online Onli ne CI CI Terminal The FS FST PLCoperatin operat ingg system is i s communicati communicating ng with wit h the the FST FSTprogram program using usi ng the the so-cal so-callled Command Interpret Int erpreter er (CI). (CI). The CI CI offers of fers various vari ous commands commands to t o display di splay and modify modi fy operand op erand values, start and stop control cont rol programs, transfer tr ansfer files fi les etc. These These commands commands are are used by the FST online onli ne displays. displ ays. If you want t o type t ype the CI CI commands commands directl directlyy you can do so for special special purposes purposes by using the CI CI Terminal Terminal.. To To start t he CI CI Terminal Terminal in a MDI chi child ld window window select " Online nli ne >>Terminal" >Terminal" from from the menu. menu.
FST Version 4.02.21 Manual
63
Note! Before you can can go online onli ne you have t o co conne nnect ct the t he cont controll roller er to your PC PC and possibl possiblyy configure con figure the t he online sett settings ings.. Enter the t he CI CI command command in the t he edit field fi eld at the bott bot t om of the t he window. Press Press the Enter Enter key or t he Send Send butt but ton to send the command. command. The The command command and and the th e reply reply will wi ll be displayed displ ayed in the window above. Press the Ent Enter er key or the Send Send butt but t on again again to t o repeat the t he last command. Press the Clear Clear button but ton to erase erase the contents of the display di splay window. Press the Login Login butt but ton to start st art a login. l ogin. If success successful ful t he versio versionn of the t he FS FST operating operat ing system, the controller control ler type t ype and and the name of the t he loaded loaded project is i s displayed. 2.11
Programm rogr ammin ing g i n St atement List
The St Statement List (STL (STL) langua l anguage ge is a text t ext-based -based language for programming control cont rol programs grams in i n FST FST.. 2.11.1 The Statement List List Edit Editor or This chapter describes th thee features and user user interface int erface of the t he St Statement List edit edi t or. For For a descript description ion of the stateme st atement nt List language language see see the separate separate documentati documentation on on that t hat subject. The Stat Statem ement ent List editor edit or offers off ers the following foll owing features: Automati utomaticc formatt formatting ing of the t he entered entered lines li nes of tex t extt • • Standard Windo Windows ws text edit edi tor features feat ures such such as undo undo,, clipboard support, support , find an andd replace Insert Inse rt and overwri overwrite te mode • Short hortcut cut bar for all keywords • • Automati utomaticc prompt prompt for Allocation List entries entri es • Automatic inse i nserti rtion on of the t he commen commentt to opera operands nds of the t he All Alloca ocatition on List List Insert Inse rtion ion of opera operands nds from the Allocation Allocati on List List • Dialog based insert insertion ion of module call callss • Synt yntax ax check • • A dif different ferent font f ont for f or the t he program t ex extt ca cann be selected selected Before you can can start programming in i n St Statement List you have to crea creatt e a project first. fi rst. Then add a new St St atement List program to th t hat projec proj ectt . The The Stat Statem ement ent List List editor edit or will wil l be automatically mati cally opened. op ened. Of Of course you can also open an already existing existi ng program from the t he current current FST Version 4.02.21 Manual
64
project. If I f you have opened opened a program, program, you will wi ll see see the code of the t he program in the work area of the Statement Statement List editor. edit or. If you have crea created ted a new program, program, the t he work area is blank.
Auto Format
You can now now start to enter the program text. Whenev Whenever er you leave a line li ne it will wil l be formatted formatt ed according according to its i ts syntax. If there t here are are syntax syntax errors in the line, l ine, formatting formatt ing is not possibl possible, e, and and t he line will wil l stay st ay as as you have have entered entered it. it . Allocation List Support
If there t here is an operand operand in the formatted formatt ed line, which is entered entered in the All Alloca ocatition on List List with wit h a commen comment,t, that comme comment nt will wi ll be used used as the com commen mentt for the t he line, li ne, if it i t has not not already a comment comment entered. The automatic automat ic comment comment for f or operands is prefixed pref ixed by a simple quote quot e and cannot cannot be edited edit ed in the t he Stat Stateme ement nt List editor. edi tor. If a line li ne is formatted formatt ed and and an operand operand is dedet ected, ected, that t hat is not yet entered in the t he All Alloca ocatition on List List,, you will be prompt prompted ed to make an Alllloc ocation ation List en entry try.. If you do not want to t o enter the operand, operand, click the t he canc cancel el button but ton or pres pr esss t he ES ESCkey. The The aut automati omaticc prompt for f or Allocation Allocat ion List entri ent ries es can be switched swit ched off completely in the Stat tateme ement nt List editor edi tor preferenc preferences es.. Select Select " Insert >>Operand" >Operand" from fro m the menu menu to choose an operand from the th e All Allocati ocation on List List to be inserted at the t he current current cursor posit position ion instead of typing it. it . Inserting Inserti ng K Keywords eywords Using Using the t he S Short hortcut cut Bar Bar
The Stat tatem ement ent List shortcut short cut bar allows an overview overview and and quick insertion inserti on of all available avai lable Statem tat ement ent List instructi i nstructions. ons. For For each each keyword a button butt on is available available from a float fl oating ing toolbox. t oolbox. Inserting Module Calls Using a Dialog Box
If you use the Module Call Call dialog for inse i nsert rting ing a module call comme comments nts for f or the t he call call parameparameters will be insert inserted ed automati automatica callllyy for modules from the library. li brary. Syntax Test
If you want to check check the syntax of the source code code in the t he currentl currentlyy open edit editor or window wi ndow you can simply simpl y compil compilee the program.
FST Version 4.02.21 Manual
65
Clipboard li pboard Support uppor t
The St Statement List edit edi tor supports support s the Wind Windows ows Cli Clipboard. pboard. This allows you ttoo copy or move portions port ions of tex t extt within wit hin the t he program, program, between between different dif ferent programs that are opened opened in FS FST or to to excha exchange nge text with wi th other Windows applica appli catitions. ons. Before you can move move or copy text you have to make a select selectio ion. n. Drag the mouse over over the t he portion port ion you want to t o selec select,t, or hold down the shift key while you are are moving moving the t he insert insertion ion point with wit h the direc di rectition on keys. keys. To To select select all t ext ext select select " Edit >>Selec >Selectt All" ll " from the t he menu. menu. From the Edit Edit menu menu or right ri ght click cli ck popup menu menu choose choose "C " Cut" ut " or " Copy" . The The cut cut or copied t ext is plac pl aced ed onto the Cli Clipboard pboard and and is available available for pasting. Move the insertion insert ion point poi nt to t o the t he location locati on where you you want to t o insert the tex t extt and select select " Edit >>Pas >Paste" te" from the t he menu menu or " Paste" aste" from the right click popup men menu. u. Note! If you simply simpl y delete text by pressing pressi ng the DE DEL key or select select ing " Edit di t >>D >>Delet elete" e" from fro m the menu menu or " Delete" elete" from the right click popup menu, menu, the deleted deleted text will not be copied copied to the t he Clipboard. Undoing Changes
To undo the last modifi modi fica cattion select " Edit >>Undo" >Undo" from fro m the menu. menu. To To undo all changes changes you have made since you last saved the program or opened it close cl ose the program without wit hout saving. Note! Preparing Preparing the t he project for f or download (Make) or compiling compili ng the progra pr ogram m ttoo check check the t he syntax will automatically save all changes. Find in d and Replace epl ace
To find certain tex t extt withi wi thinn the Stat Statem ement ent List List source source ccode ode posit position ion the t he insert insertion ion point from where you want to t o start t he search search and and select " Edit di t >>F >>Find ind"" from from the menu. The The standard Find dialog di alog will wil l be displayed. Enter Enter the t he text you want to searc searchh for and selec selectt any options. opti ons. Then cli click ck the Find Find next button but ton to t o find, fi nd, select select and scroll scroll to the t he next next occurrence occurrence of tthe he text to to find. fi nd. The The Find Find dialog di alog will wil l be b e kept open. Cli Click ck the Find Find Next Next button but ton again to t o proceed proceed to t o the t he next occurrence of the t he text. Cli Click ck the Cance Cancell but bu t ton to dismiss di smiss the Find Find dialog. di alog. To replace cert certain ain tex t extt in the t he Stat Statem ement ent List List source source code code posit position ion the t he insert insertion ion point poi nt ffrom rom where you want to t o start t he search search and and select " Edit di t >>Replace" >Replace" from from the menu. The The stansta ndard Find Find and Replace Replace dialog dial og will wil l be displayed. displayed. In the t he " Find What?" What?" text box type the t he searc searchh text. In the t he " Replace eplace Wit With:" h:" text box type t ype the replacem replacement ent tex t ext.t. Select elect any find options. opti ons. Cli Click ck the Find Find next button but ton to t o find, fi nd, select select and scroll scroll to t o the next occurrence occurrence of tthe he text to t o find. fi nd. Then Then click cli ck on Replace Replace to replac repl acee the current selection selecti on with wit h the the replacement replacement text. t ext. Cli Click ck on Replace Replace all to replace all occ o ccurrences urrences at once. Click li ck the Cance Cancell butt but ton to dismiss di smiss the dialog. dial og. If you want t o search search for the t he same same text as the th e last search again again select " Edit di t >>Find >Find Next" Next " from the t he menu. menu. This This will wil l direc di rectltlyy find, fi nd, select select and scroll scroll to the next next occurrenc occurrencee without opening the t he standard standard Find Find dialog. Insertion Inserti on and Overwrit Overwrite e Mode
For the t he Stat Statem ement ent List editor edit or you can toggle betwee betweenn insertion inserti on or overwrite overwrit e mode wit withh the t he INSkey. If the editor is i s in insertion mode the text " INS" INS" is visible visibl e in the status line. li ne. By By dedefault the Stat Statem ement ent List List editor edi tor starts st arts up in insertion mode. Saving Changes
The changes changes you make to the t he source code code will wil l be b e saved saved to fil f ile... e... • If you yo u explicit expli citlly save it by select select ing " Program >>Save >Save"" , " Program >>Save >Save As..." or " Program >>Save >Save All All"" from fr om the menu. When you are changing changing the the program properties propert ies • • Prior to compil compiling ing it (syntax (syntax check) check) or preparing the proj projec ectt for download downl oad (make). (make). • If the t he project project is closed. closed. Prior to printing pri nting the t he projec project.t. • FST Version 4.02.21 Manual
66
Select " Program >>Save >Save As" As" if you want to make a copy of the t he program. The same same dialog as for creating a new program program will be displayed. displayed. The The original program will not be erased. erased. It will wi ll keep the the source code code how iti t was saved saved the t he last time before befor e the Save Save As. As. Printing
Select elect " Program >>Print >Print"" to print the source code code of the t he acti active ve Stat Statem ement ent List editor. edi tor. You will wil l be prompted to t o save save any any unsaved unsaved modifi modifica catitions ons first. first . Then Then the standard standard print pri nt dialog di alog will be shown shown to select a printer pri nter Changing the Text Font
The font used for the t he program text can be changed changed in the t he Statement List Preferences. Preferences . 2.11.2 The Shortcuts hort cuts Window Window The Stat Stateme ement nt List shortcut short cut bar allows all ows an an overview overview and quick insertion inserti on of all avai avai lable Statemen tatementt List instructi instructions ons.. For For each each keyword a button butt on is avail available able from a float fl oating ing toolbox. t oolbox. To display the t he shortcut shortcut bar select select " View >>Shortcut >Shortcut bar" from the t he menu menu or " Shortcut bar" from the right click cli ck popup menu. menu. Cli Click ck on the keyword to insert it at the t he insert insertion ion point of the active Stat Statem ement ent List List editor window.
Note! •
•
•
The shortcut shortcut bar will wil l be automatica automati callllyy hidden, if the active window is not a St St atement ment List editor edit or and will be displayed displayed again again ifi f you make a Statem tat ement ent List editor edit or the t he acti active ve window. window. If you do not want the shortcut bar to be displayed displayed close the floating floati ng toolbox tool box window by clicking its it s close icon in the titl ti tleba ebarr or select select " View >>Shortcut >Shortcut bar" bar" from the menu menu or " Shortcut hortcut bar" bar" from the right click popup men menuu again. again. The visibili visibi lity, ty, size and and position posit ion of the Shortcuts window wi ndow will wil l be saved saved between between FS FST sessions. The St Statement List instruct inst ructio ions ns are also also available avail able from fr om the " Insert >>S >>ST TL InstrucInstr uction" menu. menu.
2.11.2.1
Insert Inserting ing Module Calls all s
To insert i nsert a module call call at tthe he current current editing edit ing position posit ion of your program selec selectt " Insert Insert >>Mod>Module Call Call"" from the menu. Ali A list st with wit h all program and and function modules of the project will be displayed. Choose Choose the one you want want to t o call call by double clicking cli cking it, it , or select iti t and press press the OK butt but t on. Then the Module Call Call dialog is i s displayed. Enter Enter the t he required parameters parameters in the t he edit fields fi elds after the t he keyword keyword " WITH ITH" . If a descript description ion fil f ilee is avail available able for the t he module module you have selected, selected, a comme comment nt for f or each of the parameters will wil l be displayed. displayed. If you choose t he OK OK butt but t on the module call call including includi ng the commen comments ts will wi ll be inserted into int o your source code. code.
FST Version 4.02.21 Manual
67
The module Call Call dialog also offers off ers the following fol lowing fea f eatur tures es Select another anot her module by changing the selection of the t he combo combo box and the number • in the first row. • To se select lect a module modul e from the list li st of avail available able modules modules of the project click on the button with wit h three dots dots in the t he first row. Click li ck on the buttons with thre t hreee dots on it next next to tthe he param parameter eter edit fields f ields to choose • an operand operand from the t he All Allocati ocation on List List . 2.11.2.2 2.11 .2.2
St atement List Preferences
To view or change the preferences for the t he Stat tatem ement ent List editor edit or select " Extras >>Pref >Prefererences ences"" from the t he menu menu and and select select the t he " STL editor" edit or" tab.
Prompt for Alloca ll ocati tion on List entries entri es::
Check heck this t his option opt ion ifi f you want to t o be prompted for Allocation Allocati on List List entries if a new new operand operand is used in the t he St Statement List source code FST Version 4.02.21 Manual
68
Use ELSE instead of OTHRW:
Check thi t hiss optio opt ionn ifif you want t o use the t he ST STL keyword keywor d EL ELSEinst instead ead of OTHR OTHRW W. The default defaul t is OTHRW. Font:
The font name name and size used used for the Statement Statement List editor windows are displayed in the t he preview window using the actual actual font. font .
Default:
Click li ck this thi s button butt on to use the Windows Windows default default font. font . Browse:
Click li ck this thi s button butt on to display di splay the standard standard font selecti selection on dialog to make your your selecti selection. on. Note! • •
The options opti ons and and the t he font are common common for all Statem tat ement ent List editor edit or windows. If you change change the font it will wil l be used for newly opened windows only. only. Re Re-open the t he project to t o apply the t he new new font for the t he already already open editor edit or windows as well well .
2.11.3 Statement List Onli Online ne Statement List List Online nli ne all allows ows debugging debugging your programs online. St Status informati inf ormation on and operand values are displayed di splayed and operand values can be modified. modifi ed. To To start st art STL Online nli ne open the program for editing edit ing first. fi rst. Then Then select select " Online nli ne >>Onli >Online" ne" from the menu menu or " Online" nli ne" from the right ri ght click cli ck popup menu. menu. T The he window will wil l now be swit switche chedd to t o online onli ne mode. mode. T Too switch swit ch back back to editing edit ing mode, mode, select select " Online nli ne >>Edit >Editor" or" from the menu menu or " Editor" dit or" from the right click popup menu. menu.
STL Online nli ne offers the t he following foll owing features: f eatures: The acti active ve step step is i s highlighted highli ghted and its it s name name and and number number displaye di splayedd in i n a status line. l ine. • The curr current ent values of the t he operands are displayed displ ayed next next to t o their their occurrence occurrence i n the t he • source code. • The program run stat status us is displaye di splayedd in i n a status line. l ine. The current FS FST runtime runt ime error is i s displayed displ ayed in the status st atus line. l ine. • FST Version 4.02.21 Manual
69
• • •
• • •
Dirirec ectltlyy scroll scroll to t o a step by entering its it s number number in a dialog window. The word values valu es can can be displayed displ ayed in signed, unsigned or hexa hexadecimal decimal format f ormat . If the t he mouse cursor cursor is i s placed over an operand operand value the t he symbolic symboli c name name is displayed displ ayed in a small small popup window (like (l ike ToolT ToolTips) ips) ifi f available. The updat updatee speed speed can be changed. Modify or toggle operand values values Forcing of input i nputss and outputs outputs is supported.
Modifying Modif ying Operand Values Values
There are are the t he following foll owing shortcuts for f or modifying modif ying operand operand values available: available: • Double click on a word or titimer mer value value to t o open the Modi Modify fy Operand Operand dialog for it. • Double click cli ck on the " OFF" or " ON" value of a single bit operand operand to toggle t oggle its value.
2.11.4 Statement List List Program Program Structure ruct ure An ST STL control program is made up of a number of statements. st atements. By way of an eexampl xample, e, take t ake the followi fol lowing ng short short program: STEP IF
AND THEN THEN SET OTHRWSET ...
Switch1 I1.1 O1. O1.0 Horn
Each individ indi vidual ual line line represents a stateme stat ement nt for f or the t he cont control roller. ler. A st statement is i s compos composed ed of the following foll owing parts: parts: STL instructi inst ructions ons (e.g. IF, AND, THEN, SET, OTHRW) • PLCop operan erands ds (e.g. (e.g. inputs inputs or output outputs) s) " Switch1" and and " Horn" are symbolic operands. operands . • When you are ent entering ering a new program you can writ wri t e it as a: a: Step program • Parallel logic program • • Executive part 2.11.4.1
St ep program
A step program pr ogram can can cont contain ain up to t o 255 steps (1 to t o 255). Each Each st st ep can can be labelled labell ed with wit h a symboli symbolicc step mark. In a step program program you can set set up branche br anchess or jumps j umps to t o other ot her parts part s of the t he program (JMP (JMP TO step mark). mark). Your Your program then continues conti nues with wit h a step other than the direc dir ectltlyy following foll owing step. A st st ep may consist consist of one or more mor e sentences. sentences. A complete complet e sentence cont contains ains an IF clause, a THEN HEN cl clause and possibl possi blyy an OT OTHRW HRW clause. The first fi rst sentence of a step may be an inco incommplete plete sentence sent ence.. In t his case case thi t hiss is an executi executive ve part only (THE (THEN...). N...). This THE THEN clause clause is is always exec executed, uted, without wi thout an input condition. condit ion. The program is execut executed ed step by step. st ep. Note! Control ont rol does not pass to the next step st ep unti unt il a THE THEN or OT OTHRW HRW statement statement has has been executed executed in tthe he last sentence sentence of the current current step. Unti Untill this t his condit condition ion is met met , the instructions instructi ons in the current step are executed executed again, cyclically cyclicall y each each time ti me the program is execut executed. ed. The ST STL language does does not use " edge triggering" tri ggering" . Condit Conditions ions are evalu evaluated ated for truth rut h each each time ti me t hey are proces processe sedd without wit hout regard as as to their t heir prior pri or status.
FST Version 4.02.21 Manual
70
Exampl xamplee of a simple si mple step st ep program: STEP Mark1 IF I1.0 THEN SET F1. F1.55 OTHRW RESET F1.5 STEP Mark2 THEN THEN RESET SET F0.0 0. 0 IF F1.5 THEN SET O0.7 O0. 7 SET F0.0 OTHRW SET O0.0 JMP TO Mark1 STEP IF AND THEN SET STEP ... 2.11.4.2
Mark3 F0.0 I0.0 O0.4 O0. 4 Mark4
Parallel logic logi c program
A parall parallel el logic l ogic program consists consists purely of sentences; sentences; in i n ot other her words no step marks are programmed. programmed. This This means means that a parallel parallel logic l ogic program is identica identi call to t o a step of a step propr ogram. Branches Branches cannot cannot be programmed in a parallel parall el logic l ogic program. The first fi rst sentence sent ence in a parallel paral lel logic logi c program may may be an incomplete incomplet e sent sentence ence.. All subsequent sentences must be complete complet e sent sentence ences. s. A parallel logic l ogic program is processe processedd cycli cyclica callllyy until unti l it is reset (as is a ladder diagram proprogram). gram). If you want the t he program to be exec execut uted ed only once, once, you must reset it i t in the t he last sentence. Example xample of a parallel logic logi c program (P1) (P1) that t hat is i s executed executed only once: THE THEN RESE RESET T F0.0 0. 0 IF N I1.0 THEN THEN SET O0.7 O0. 7 IF I1.7 THEN THEN SET O1.7 O1. 7 OTHRWSET F0.0 RESET SET O1.7 ... ... IF F0.0 AND I1.0 THEN THEN SET O1.0 O1. 0 RESET SET P1 OTHRWRESET RESET P1
FST Version 4.02.21 Manual
71
2.11.4.3
Execut xecutive ive part
An executi executive ve part part is essent essential ially ly struct st ructured ured in i n the same way as as an incomplete incomplet e sen senttence in a parallel parall el logic logi c program. There There is no introduct int roductio ionn with wit h a THEN HEN clause. All All of the t he statements entered are exec execut uted ed without wit hout an input condition. condit ion. No branching branching is i s possibl possiblee within wit hin the t he proprogram. If you enter ent er an IFclause further furt her on in the t he executi executive ve part, part , an error result resul ts. Exam Exampl plee of an executive part: SET F0.0 RESET SET O1.0 LOAD V50 TO TW7 SET T7 CMP2 ... 2.11.4.4
Comments
There are two types t ypes of comment comment that you can add add to t o your STL STL program: Short comment commentss with wit h up to t o 36 characters characters can be appended to a program line. li ne. They They are introduced int roduced with wit h one quotation quotat ion mark. mark. Example: IF N I1.7 " No signal from fr om sensor Long comments comments can can ext extend over a whole whol e line. li ne. They They are are introduced int roduced with wit h two quotat qu otation ion marks. Example: " " This is i s a long comme comment nt that t hat can be as long as an an entire enti re line. li ne. 2.11.5 Statement List List Instruct Inst ructions ions Reference Reference This chapter gives an overview overview of the Statement List instructions. instr uctions. 2.11.5.1
Stateme tat ement nt List Organisation rganisati on
The ST STEP stateme stat ement nt is very import i mportant ant in i n sequence programs as it determines the structure of the t he program or, ifi f branche br anchess are used, used, the t he sequence sequence of proces pr ocessing. sing. STEP can can be follo fol lowed wed by a step mark wit wi th a maximum maximum of nine charact characters or a number (label). (l abel). A step mark is i s required requir ed if you want to t o branch to this t his step step from elsewhere in the t he ST STL program. Example: STEP Setup ... ... THEN THEN JMP TO Setu Set up During the t he translation translati on process process the steps are renumbe renumbered red interna int ernalllly, y, beginning at step st ep 1 through thr ough to the t he maximum maximum number. number. Note! In an STL STL program program a step is i s not processe pro cessedd unti unt il a THE THEN N or OTHR OTHRW W clause in i n the t he last l ast • sentence of the t he preceding step has been executed. executed. • Processing rocessing of a step program is not cycli cyclical. cal.
FST Version 4.02.21 Manual
72
IF always introduces int roduces a conditional condit ional part. part . Operands Operands can can be interrogated int errogated and linked li nked by logical associations associations within wit hin the t he statement. statement. The result result represents represents the condition condit ion for f or furt f urther her process process-ing. Example: IF I1.0 AND AND N I1.1 I1.1 ... THEN introduce intr oducess the execut executive ive part. This part is executed executed ifi f the t he condit condition ion is i s true. t rue. The The state stat ement may may contai containn comman commands ds to modify modif y outputs output s or flags fl ags etc., to carry carry out arithme arit hmett ic operaoperations, ti ons, to activate timers t imers or counters, counters, or to t o call call other programs or or program modules. modules. Example: THEN LOAD V10 V100 TO TP7 ... OTHRW HRW introduces int roduces a second, second, alternati alt ernative ve exec execut utive ive part. part . This This part is execut executed ed if the result of the conditio condit ional nal part of the t he step is not true and hence hence the THE THEN N clause ca cannot be executed. executed. Example: ... THEN SET O1.0 O1. 0 OTHRW RESET O1.0 2.11.5.2
STL conditional condit ional part
These stateme stat ement ntss enable enable you to construct complex input condit condi t ions. This is i s the logica l ogicall operator AND AND. It allows logical l ogical AND ANDing ing of a number number of input conditions conditi ons.. The condit condition ion is i s fulfil fulf illed led when all all ANDed input condit conditions ions are true. Example: IF I1.0 AND I1.1 THEN THEN SET O1. O1.0 OTHRWSET O1.7 This hi s is the the logical operator operat or OR OR. This This operator operat or allows all ows you to creat creat e a logical logi cal express expression ion wit wi t h severa severall input i nput conditions. condit ions. The The condit condition ion is fulfi ful filllled ed when when at least one of of the t he condit conditions ions is true. tr ue. Example: IF I1.0 OR I1.1 OR I1.7 THEN THEN SET O1. O1.0 OTHRWSET O1.7 This hi s is the t he logical logi cal operator EXOR. Thi Thiss allows allows you to create a logical logi cal expression expression wit wi t h two t wo input condit conditions. ions. The The condit condition ion is fulfi ful filllled ed when when only one or the other input condit condition ion is true. tr ue. FST Version 4.02.21 Manual
73
Example: IF
I1.0 EXOR I1.1 THEN THEN SET O1. O1.0 OTHRWSET O1.7
NOP NOP means means No operation. operati on. You You can use this thi s stateme stat ement nt when you want t o carry out an execu execu-tive ti ve part without an input con condit dition. ion. Example: IF NOP THEN THEN SET F1. F1.00 This is a negation. negation. It allows you to inve i nvert rt an input condition. condit ion. In the t he exa example mple below, if output out put O1.0 is not acti active, ve, the program jumps to the t he Setup Setup step. st ep. Example: IF N O1.0 O1. 0 THEN THEN JMP TO Setu Set up 2.11.5.3 2.11 .5.3
STL Execut xecutive ive part
SET activates acti vates a one-bi one-bitt operand. operand. You You can use this thi s for setting sett ing an output outp ut t o logical logi cal one, for example. RESET is the t he counterpart to SET SET. It deact deact ivates ivat es one-bit one-bi t operands, used, for example, example, for f or sett setting ing an output to logic l ogical al zero. zero. A LO LOAD stat stateme ement nt rea r eads ds a regist register er or a multibit multi bit operand, operand, ii.e. .e. its it s value value is i s written writ ten to t o a multibit multi bit accum accumulat ulator. or. Normall Normallyy this t his statem stat ement ent is i s followed fol lowed by the keyword T TO O, indicating i ndicating the t he desti destinnation ti on of the operation. operation. Example: THEN LOAD V500 TO TP31 A TO stateme stat ement nt assigns assigns a value to t o a word operand. TO specifies specifi es the destinati desti nation on of the t he opoperation. Example: THEN LOAD V100 TO R6 The value 100 is lo l oaded aded into i nto reg r egist ister er 6. A JMP TO statement causes the program to branch to a specific program step. Example: STEP Mark IF I1.0 THEN THEN SET O1. O1.0 JMP TO Star Startt ... ... FST Version 4.02.21 Manual
74
STEP Start ... The program branches t o the the step mark St St art and the t he program continues ex executi ecuting ng there. 2.11.5.4 2.11 .5.4
Special fun functi ctions ons - Extended STL
These functions funct ions allow all ow you to enter statements st atements for multi mul tibi bitt operands in your STL STL program. The higher-order byte and and the t he lower lower -order byte are swappe swappedd in i n the multibi mult ibitt accumulator accumulator.. Example: THEN LOAD V$55AA TO OW0 SWAP TO OW1 $55AA is loaded l oaded to t o OW0, OW0, bu butt $AA55 $AA55 is i s loaded lo aded to t o OW1. OW1. The SHIF SHIFT T instructi instr uction on execut executes es a swap between the t he Singl Singlee Bit Accumulat Accumulator or (S ( SBA) BA) and a Single Singl e Bit Operand (SB (SBO O). This instructi i nstruction on can can be used to construct construct Shift Registers of varying lengths...longer or shorter short er than the t he 16 bit manipulati manipul ations ons performed by the SH SHLL and SHR SHRinstruct inst ructions. ions. To operate properly, prop erly, the t he SBA SBA must fir f irst st be loaded l oaded and and then t hen any any number of single singl e bit SHIFT HIFT' s can be programmed. Example: STEP 10 IF I1.0 " input acti activated vated THEN LOAD I1.1 TO F0.0 " a flag fl ag is used here t o avoid " writing to an input, input, which which " would otherwise occur occur SHIFT SHIFT O1.1 " SWA SWAP P F0.0 0.0 <->O1.1 SHIFT SHIFT O1.2 " SWAP SWAP O1.1< O1.1<->O1.2 SHIFT SHIFT O1.3 " SWAP SWAP O1.2< O1.2<->O1.3 SHIFT SHIFT O1.4 " SWAP SWAP O1.3< O1.3<->O1.4 STEP 20 IF N I1.0 " wait for input to go away away THE THEN JMP TO 10 " repeat epeat SHL stands for shift left. left . This This statement is used to shift the contents of the t he mult multibi ibitt accum accumulat ulator or one bit position posit ion to t o the left. left . The The right-most right-most bit bi t is i s filled fil led with wit h a zero. zero. The The eff effec ectt is is multipl mult iplication ication by 2. If you call call the SHL SHL statement statement three thr ee times in succes succession, sion, this t his is i s equiva equivalent to t o multiplication multi plication by 2x2x2 2x2x2,, the t herefore refore mult multipli iplica catition on by 8. Example: THEN LOAD V16 SHL TO R7 The value value of R7 is i s then t hen 32. SHRstands for shift right. right . This This statement is used to shift the contents of the t he mult multibi ibitt accumulator one bit position positi on to the right. The The left -most -most bit is fill fi lled ed with a zero. zero. The The effect effect is is division divi sion by 2. In simil similar ar fashion fashion to t o SH SHL, repeated repeated shifting shift ing to t o the right ri ght results result s in division divi sion by 2 each each time. t ime. FST Version 4.02.21 Manual
75
Example: THEN LOAD V16 SHR TO R7 The value of R7 is is then t hen 8. The effect effect of tthis his stateme stat ement nt is i s the same as that of SHL exc except ept tthat hat tthe he highest-orde highest-order, r, leftleft most bit bi t is shift shif t ed out of the acc accumulator umulator and is re-inserted re-inserted as an an overfl overflow ow on the right as the lowe l owest-o st-order rder bit. bit . As in the case case of SH SHR, the t he bits in i n the multibi mult ibitt accumulator accumulator are shifted, shift ed, but this t his time t ime to the t he right. ri ght. The right-most bit bi t is pushed out of the accumulator accumulator and re-inserted as the highest highest-order order bit. bit . A BID BID st st atement atement converts converts the t he cont cont ents of the multi mul tibit bit accum accumulat ulator or from f rom binary bi nary to BCD reprepresentation. resentati on. You You can use BCD BCD code code to t o drive dr ive LED LEDs on control cont rol panels, for f or example. e xample. Example: THEN LOAD IW0 BID BID TO OW7 A DEB st statement converts convert s the contents content s of the t he multibi mult ibitt accumulator from from BC BCD to binary code. This conversion is i s necess necessary ary if you have connected connected BCD BCD swit switches ches to an input inpu t in your you r controlcont roller and you want want to trans t ransfer fer the switching swit ching stat status us of the switches from the input word for processing processing in i n a counter. Example: THEN LOAD IW7 DEB TO CW7 This command complements (INVerts) the contents of the multibit accumulator using the one's complemen complementt method. Example: THEN LOAD OW1 INV INV AND IW1 TO OW1 This command command complements complements the contents of the multibi mult ibitt accum accumulator ulator using the two' t wo'ss comcomplement method. In principle, pri nciple, the t he effect effect of using the t he CP CPL instructi instr uction on is the t he same same as as multiplymulti plyi ng a number by -1 when when appl applied ied to t o signed intege int egers. rs. Example: IF ( R32 < V0 ) THEN LOAD R32 CPL TO R22 FST Version 4.02.21 Manual
76
2.11.5.5
Arithme rit hmeti tic c functions
The INC INCrement instruct inst ruction ion increa i ncreases ses t he valu valuee of any multib mult ibitit operand by 1. Unli Unlike ke other arithme arit hmetiticc instructions, instructi ons, the INC INCrement rement operation operati on may may be carried carried out directly without wi thout the need to first fi rst load l oad the operand operand to be INC INCremented remented to the t he mult multibi ibitt accumulator. While hil e the INCreme INCrement nt instructi i nstruction on can can be used used with wit h any multibit multi bit operand, operand, it is most often of ten used in conjuncti conjunction on with wit h Counters. Counters. Example: IF I 1.3 THEN INC R9 The DE DECrement rement instruc i nstructition on reduces t he valu valuee of any mul multtibit ibi t operand operand by 1. Unli Unlike ke other arithme arit hmetiticc instructions, instructi ons, the DEC DECrement rement operati operation on may be carried carried out directly directl y without wit hout the need need to t o first fi rst load l oad the operand operand to t o be DE DECremented remented to t o the t he multibit multi bit accu accumulator. mulator. While hil e the DEC DECrement rement instruction instructi on can can be used used with wit h any mult multibi ibitt operand, operand, iti t is most oft of t en used used in i n conjunction with wi th Counters. Example: IF I2.2 AND N I3.6 I3.6 THEN DEC R9 In addition additi on to the t he stat statem ements ents previously previously explained, the following followi ng arit arithme hmetiticc operations operations are available: (, ), +, -, * , / , <, <= , =, = , >= , >, <> These functions funct ions allow all ow you to program arithmeti arit hmeticc operati operations ons and and compari comparisons. sons. Example: IF ( FW00 FW = V1234 ) AND ( R1 <> V0 ) THEN... Note! In statements of this t his type t ype you must be absolutely absolut ely clear whet whet her you need need parentheses (brackets), (brackets), and if so for which express expressions. ions. It is i s aallll too easy to corrupt t he logical logical structure st ructure by omitti omit ting ng or wrongly plac pl acing ing parentheses parentheses.. 2.11.5.6
Module call calls s
The Call Functi Function on Module instruct inst ruction ion is i s used used to request execut executii on of an ext external program progr am routine. rout ine. Function Function modules modul es may may be considered considered simi similar lar to t o special special function functi on call calls. s. Function uncti on modules modul es may may be writ wri t t en in one of several langua l anguages ges including includi ng ST STL aand nd C. C. Some program modules may may use function funct ion unit uni ts (FU (FU) to pass informati infor mation on to/ from from user proprograms grams and function modules. Depe Depending nding upon the t he specifi specificc function functi on module being call called, ed, it may be necessary to provide several parameters when using a CFM, see WITH instruction. Note! CF CFMs must not contain contai n steps. No task t ask switch swit ch takes place pl aceafter aft er a call t o a CF CFM. The Call Call Program Module instr i nstructi uction on is used to request r equest executi execution on of an ext external program routine. rout ine. Program Program modules may may be consid considered ered simi similar lar to t o subroutines. subrout ines. FST Version 4.02.21 Manual
77
Program modules modul es may may be writ wri t t en in one of several several languages including includi ng ST STLand C. C. Some program modules may may use function funct ion unit uni ts (FU (FU) to pass informati infor mation on to/ from fro m user user programs and program modules. D Depending epending upon the t he specifi specificc program modul modulee being call called, ed, it may be necessary to provide several parameters when using a CMP, see WITH instruction. Note! It is not permissibl permissiblee to use the CMP CMP instruction instr uction from f rom within wit hin a program module. module. After ft er each each call call to a CMP CMP a task switch swit ch will take plac pl acee to allow al low for f or steps inside i nside the program modules. The WIT WITH H instruct inst ruction ion is i s used to pass parameters parameters to t o function funct ion or program module calls using t he function units uni ts (FU (FU). Example: IF I1.2 THEN CFM CFM 0 WITH V2 2.11.6 2.11.6 Customi ust omising sing FST There are are several several possibili possibi litties to customise cust omise the FS FST program and runtime runti me library. lib rary. Preferences FST offers off ers some options opti ons that can be set set to t o indivi ind ividual dual needs or preferenc pref erences. es. Select " Extras xtr as >>Preferences >Preferences"" from fro m the th e menu menu to t o open the t he Preferences Preferences dialog. di alog. 2.11.6.1
The Projec roj ectt Directo Directory ry
Using differen diff erentt project pr oject direc dir ectori tories es is useful to t o sort a larger amount amount of projects in groups. But you have to remember the diff di fferent erent locati l ocations ons where you you have stored FS FST projects. proj ects. If you want to view or change t he curr current ent common root dir d irectory ectory for f or FS FST projects, proj ects, select " Extras >>Preference >Preferences..." s..." from fro m the menu. menu. In the th e tabbed dialog di alog that th at will wi ll be displaye displ ayedd select select the Gene General ral tab. t ab. Enter Enter the t he path of the t he new new direc dir ector toryy or press the Browse Browse button butt on to select select an already existi existing ng directory. Relati Relative ve paths paths (beginning with wit h a dot) are subdirectori subdirectories es of the directory directory where you have instal led FS FST.
FST Version 4.02.21 Manual
78
After ft er chang changing ing the direc di rectory tory path pat h and closing closing the t he dialog the currentl currentlyy open project will wil l be closed. Note! If you want to t o use DOS DOS based based tools tools for for you project, proj ect, such as as fieldbus fiel dbus configurators, configurat ors, use a project path p ath that t hat does not contain cont ain long l ong file fil e names (max. 8 charact characters) or spaces. spaces. 2.11.6.2 2.11 .6.2
Communicatio ommunicat ion n Port Preference refer ences s
Select " Extras xtr as >>Preferences >Preferences"" from the t he menu to open the t he Preferences Preferences tabbed dialog. di alog. Select Select " Communica ommunicatition on Port" Port" to choose choose the commun communication ication method and configure the specif specific ic settings.
FST Version 4.02.21 Manual
79
If you want to use TC TCP/ IP for the t he online connection connection select the t he " use TC TCP/ IP" IP" radio button, but ton, or " use RS RS232" t o use RS RS232. For the t he RS RS232 connect connect ion you have to specif specifyy a com port and a baud rate. rat e. The The com port can be selected from fr om the fir f irst st combo box. It offers off ers all COM ports port s found on your you r PC PC. Choose Choose the baud rate from the t he second second combo combo box. Please Please note that t hat not all controllers controll ers all allow ow high baud rates. rates. 9600 is usually usuall y a good choi choice, ce, if not success successful ful,, try t ry 2400. Please Please see see the system documentati documentation on of the control controller ler for details. If using usi ng TC TCP/ IP you have t o enter the t he IP address of the control contr oller. ler. If If you check the option opt ion " Save in Project" Project" the settings setti ngs will wil l be stored in the t he project project rather r ather than for FS FST in general. general. Press the OK OK button but ton to acce accept pt the new settings. sett ings. All All online displays di splays wil willl be closed closed automat automat ically if you have made any cha changes. nges. 2.11.6.3 2.11 .6.3
St atement List Preferences refer ences
To view or change the preferences for the t he Stat tatem ement ent List editor edit or select " Extras xtras >>Pref >Prefererences ences"" from the t he menu menu and and select select the " STL editor" tab.
FST Version 4.02.21 Manual
80
Prompt for Alloca ll ocati tion on List entries entri es::
Check heck this t his option opt ion ifi f you want to t o be prompted for Allocation Allocati on List List entries if a new new operand operand is used in the t he St Statement List source code Use ELSE instead of OTHRW:
Check thi t hiss opti opt ion if i f you want t o use the t he ST STL keyword keyword EL ELSEinstead nstead of OTHR OTHRW W. The defaul default is OTHRW. Font:
The font name name and size used used for the Statement Statement List editor windows are displayed in the t he preview window using the actual actual font. font . Default:
Click li ck this button but ton to t o use the Wi Wi ndows default font. f ont. Browse:
Click li ck this thi s button butt on to display di splay the standard standard font selecti selection on dialog to make your your selecti selection. on.
Note! • •
The options opti ons and and the t he font are common common for all Statem tat ement ent List editor edit or windows. If you change the font f ont it will wil l be used used for newly opened opened windows only. Re Re-open the t he project to t o apply the new font for the t he already already open open editor windows wi ndows as well.
2.11.6.4
Print ri nt Preferences references
You can can change change the print font and the margin margin widths wi dths of the printout printout.. Select " Extras xtr as >>Prefe >Preferrences ences..." ..." from the menu. menu. In the tabbed tabbed dialog that will wi ll be displayed displayed selec selectt the t he tab "P " Print" rint " .
FST Version 4.02.21 Manual
81
If you press the Browse Browse button butt on you will be aske askedd for a printer print er to display di splay the correc correctt list l ist of avail available able fonts before the standard font selecti selection on dialog is displaye di splayed. d. Note! If you choose choose the margins sma smallller er than the minimum mini mum printer margins, the printout print out will wi ll be cli clipped. pped. 2.11.7 2.11.7 The FS FST Runti unt ime Library brary FST allows configuring various input and output modules and drivers. All available drivers are registered regi stered in t he FS FST Runt Runtime ime Library. If new hardware is i s develop developed ed new IO scripts script s or drivers dri vers or updates updat es will wil l be b e needed. needed. FS FST gives the necessary support to manage the FST Runtime Library. 2.11.7.1
IO Scripts cript s (Runt (Runtime ime Library) ibr ary)
Select elect " Extras >>Library..." >Library..." from the t he menu menu to t o open the t he FSTLib Librar raryy tool. " IO Module Modules" s" is already the default t ab.
FST Version 4.02.21 Manual
82
The Library Library IO Module dialog offers of fers the foll f ollowing owing features: Select elect the controller control ler type t ype for the library l ibrary from fr om the combo combo box above above the list li st box. • The IO script script descript description, ion, the fil f ilee name, name, and other information i nformation (see (see below) are displayed pl ayed for each installed instal led IO script in a separat separatee colu column. mn. Adjust the width widt h of each each column by moving moving the t he sepa separator rator in i n the header header with wit h the • mouse. Each ach column except except the t he last one of the t he list li st box can be sorted sorted alphabetica alphabeti callllyy by clickcli ck• ing on the t he col column umn header. header. Cli Click ck again again to t o reverse the sorting sorti ng order. If you only want to display di splay the IO scrip scriptt descriptions descripti ons in a simple list, li st, toggle t oggle the radio • buttons butt ons in the upper right corner corner of the t he dialog. To deinstall deinst all the select selected entry from f rom the t he FS FST library li brary press pr ess t he DE DEL key or the t he Deinst Deinstall all • button. To install inst all a new IOscript script press the INS INS key key or the t he Install... button. butt on. • To extract extract the selected ent ent ry onto a floppy or somewhe somewhere re else to be reinstalle reinstalledd later l ater • press the Extract Extract button. but ton. The addit additional ional data in the t he list box is for your information i nformation only and cannot cannot be edited. •
In:
Number Number of input bytes that are used used in i n the t he processo processor'r'ss IO area. area. Out:
Number Number of output bytes that are used used in i n the t he processo processor'r'ss IO area. area. IW: IW:
Number Number of FS FST input inp ut words that t hat are occupied by a module of thi t hiss type. OW:
Number Number of FS FST output out put words that t hat are occupi occupied ed by a module modul e of this t his type. t ype. Switch
The possible possible switch swit ch posit positions ions for a module of this t his type. t ype. FST Version 4.02.21 Manual
83
Installing Install ing a new IO Script Script
To install inst all a new new IO script script press t he INS INS key or the Install... Install ... button. but ton. You You will wil l be asked for the t he path name of the t he new new script script using the standard file fil e dialog. Then Then the new new script script will wil l be i nstalled. stall ed. It is i s now avail available able for your projects. Extracting xtracti ng IO Script Scripts s
To extract extract the selected selected entry entr y onto a floppy f loppy or somewhe somewhere re else to be reinstalled reinstal led later l ater press the Extract... Extract... button. but ton. You You will wil l be asked for the path name name where where to store st ore the script file fi le using t he standard standard file fi le dialog. di alog. Then Then a copy copy of the t he IO scrip scriptt will wil l be created created at the given location. The IO script will wil l not no t be removed from the t he FS FST Library. ibrary. Remarks • • •
•
There is a differen diff erentt libr l ibrary ary for each each of of the t he differen diff erentt controll contr oller er types. Changing the t he FS FST Library ibrary does affect t he FS FST install inst allati ation on rather rat her than t han a single project pro ject.. If you are deinstalling deinstall ing IO script scriptss that are used used by projects, thes t hesee projects no longer can can be loaded loaded into int o the controller control ler with wit h this thi s F FS ST installati inst allation on unless the IO script script will wil l be installed instal led again. again. IO script scriptss aalways lways have have the extens extension ion " .iod" .
2.11.7.2
Drivers ri vers (Runt (Runtime ime Library) ibr ary)
Select elect " Extras >>Library..." >Library..." from the t he menu menu to t o open the FSTLib Librar raryy t ool. ool . From From the t he FST FSTLibrary Librar y dialog sele select ct the tab " Drivers" rivers" .
The FS FST Library ibrary Drivers dialog di alog offers of fers the t he followi fol lowing ng features: featur es: Select the t he control controller ler type t ype for the library l ibrary from the t he combo combo box above above the list li st box. • The driver name, the driver' dri ver'ss number, dependencies dependencies and and a short short descri descript ption ion are dis• played for each each install i nstalled ed driver in i n a separate separate column. • Adjust the width widt h of each each column by moving moving the separator separator in i n the t he heade headerr with wi th the mouse. Each ach column exce except pt the las l astt one of the t he list li st box can be sort sorted ed alphabet alphabet ically by click• ing on the t he col column umn header. header. Cli Click ck again again to t o reverse the sorting sorti ng order. FST Version 4.02.21 Manual
84
•
•
• •
If you only want want to t o display the driver name namess in a simple si mple list, li st, toggle t oggle the radio radio buttons but tons in tthe he upper upper right ri ght corner corner of the dialog. To deinstall deinst all the select selected entry from f rom the t he FS FST library li brary press pr ess t he DE DEL key or the t he Deinst Deinstall all button. To install inst all a new new driver press the INS INS key or the Install... Install ... button. but ton. To extract extract t he selected selected entry onto a floppy or somewhe somewhere re else to be reinstalled llater ater press the Extract Extract button. but ton.
Installing Installi ng a new driver driver
To install inst all a new new driver dri ver press press the INSkey or the Install... Install ... button. but ton. You You will wil l be asked for the t he path name of the t he new new driver using the t he standard standard file fi le dialog. di alog. Then Then the new driver will be installed. instal led. It is i s now avail available able for your projects. Extracting xtracti ng Drivers
To extract extract the selected selected entry entr y onto a floppy f loppy or somewhe somewhere re else to be reinstalled reinstal led later l ater press t he Extract... Extract... button. but ton. You You will wil l be asked for the t he path name name where where to store st ore the driver dri ver files fil es using the standard file fil e dialog. Then Then a copy of the driver dri ver and and all required r equired files fi les will wil l be creat creat ed at the t he given location. locati on. The The driver will wi ll not be be removed removed from fr om the FS FST Library. ibrary. Remarks • • •
•
There is a different diff erent library for each each of the t he different controller control ler types t ypes.. Changing the t he FS FST Library ibrary does affect t he FS FST install inst allati ation on rather rat her than t han a single project pro ject.. If you are deinstalling deinstall ing drivers dri vers that are used used by projec proj ectt s, these projects projects no longe l ongerr can be loaded loaded into int o the controller controll er with this t his FS FST installati install ation on unless unless the drivers wil willl be ini nstalled stal led again. again. FST driver scripts script s always have the extension " .dmk" .
2.11.8 External Tool Toolss FST allows all ows call calling ing external tools t ools directl di rectlyy from the t he Extr Extras as menu menu and to pass to these t hese programs parameters such as the name of the t he currently currentl y open projec proj ectt . Select Select " Extras >>Configonfi gure Tools..." Tools..." from the t he menu menu to t o open the Tools Tools dialog. dial og. T This his dialog di alog allows adding, removing removing or editing the t he list of externa externall tools. t ools.
FST Version 4.02.21 Manual
85
The Tools Tools dialog di alog offers off ers the followi fol lowing ng features: Add a new tool too l to t o the t he Extr Extras as menu menu Remove the selected tool t ool from fr om the t he Extr Extras as menu menu Edit the settings sett ings for the t he selec selected ted tool t ool Execut xecutee the selected tool t ool Move the selected selected tool one position positi on to the t he top Move the selected selected tool t ool one posit position ion to t o the bottom bott om Note! • •
The tools tool s appear appear in the t he order in the t he list li st box as they are in the t he Extras Extras menu. menu. Only the t he first 25 tools tool s will be added added to t o the t he Extras Extras menu. menu.
2.11.8.1
Adding ddi ng or Modifying Modif ying an External Tool
From the t he Tools dialog: Press the New New butt but ton to add a new tool t o the t he Extr Extras as menu menu or Press the Properti Properties es button butt on to edit the settings setti ngs for the t he selec selected ted tool t ool The External External Tool dialog dial og will wil l be opened to enter the required settings. sett ings.
Title:
Enter nter here the text t ext that t hat will wi ll appear in the t he Extr Extras as menu. menu. You You can use the Ampersand Ampersand sign (&) to define defi ne the following foll owing charac character ter as the shortcut shortcut.. It will wi ll be underli underlined ned in the menu menu text. To To insert insert an Ampe Ampersa rsand nd type "&&" " &&" . Program:
Enter here the path for the program to be exec execut uted. ed. Press Press the " ..." button butt on to browse br owse through the fil f iles es on your your computer. It is also possible to t o use the macros macros desc described ribed below Parameters:
Enter here the t he paramet parameters for your program. p rogram. It is also possible possi ble to use the macros de described scribed below. FST Version 4.02.21 Manual
86
Wait for Complet Completion: ion:
If this t his option opt ion is i s enabled, enabled, when when call calling ing the t he tool, the FS FST main main window wi ndow will be minimised minimised until unt il the exec executi ution on of the tool has t erminat erminat ed. If you you do not chec checkk this thi s option, the t he tool will wil l just j ust be called call ed and and FS FST and and the t he tool run in i n parallel. Release elease CO COM por p ortt s:
Enable this thi s option, opti on, if the tool t ool will wi ll use the CO COM port that is used for FS FST. If you enable enable this t his option opti on you you should should also enable enable the option opti on " Wait for f or Completi Completion" on" . Reload project: pr oject:
This option opti on will only work if you also enabled enabled the option opti on " Wait for f or Completi Completion" on" . If the execu execu-t ion of the t he tool has been been finishe fini shed, d, the current projec proj ectt will wi ll be read read in again again to update updat e aany ny changes the tool may have caused. Macros
The followi fol lowing ng macros macros will wil l be replaced replaced in i n the t he program and and parameter parameter strings: str ings: <<>> wher wheree FST.E FST.EX XE sleeps sleeps <<>> one of " runtime runti me.," .," e.g. e.g. " Runtime unti me.F .FE EC" replacement for obsolete <<>>and <<>> <<>> path to directory directory with wit h project project directories directories <<>> path at h to t o ccuurrent ent project ect, = = <<>>\ << T_CUR>>> <<>> new entr entry, y, " HC1X," 1X," " FEC," " HC2X," 2X," " HC0X" 0X" <<>> new new entry, entry, " GB" , " D" The following foll owing macros macros will wil l be replac repl aced ed in the t he parame parameter ter string st ring only: <<>> e.g. " COM1" <<>> e.g. e.g. " 9600" 9600" <<<#1>>>(obsolete) " VFNM" VFNM" <<<#2>>>(obsolete) " x" <<<#3>>>(obsolete) <<>> <<<#4>>>(ob >( obso sollete) et e) " IPC IPC" <<<#5>>>(obsolete) << COM_PORT>>>" / " << AUDRATE>>>" / 9000"
FST Version 4.02.21 Manual
87
3
The FST PLCOperat peratii ng System yst em (Kernel (Kernel))
In order or der to t o use an IPCas PL PLC, the t he necessary necessary PLC PLCoperati operat ing system system software soft ware must be loaded loaded into the IPC. For this, FST uses the runtime kernel FSTPCR22.EXE. This contains PLC propert ies that are always always required. The The kernel kernel is also responsibl responsiblee for loading l oading and exe executi cuting ng the user project. For the t he controll contr ollers ers that t hat are prepared for f or FS FST, the t he FS FST PLCoperating operat ing system syst em is automaticall aut omaticallyy start star ted on power-up. Addi Additt ional parts part s of the th e PL PLCoperating operati ng syst syst em can can be subsequently subsequentl y loaded into int o the controller control ler as modules modules and/ and/ or as drivers dri vers together with wit h a user user project. The The properties propert ies of t he FS FST PLCoperating operati ng system are described described in i n the t he followi fol lowing ng secti sections. ons. 3.1
PLC PLCoperands oper ands
PLCprograms consist consist of program program code for handling handli ng of data. dat a. This This data dat a is avail available able to t o the t he PL PLC in the t he form of operands. It contains not only the t he values values of operands, operands, but also flags and and many special operands wit wi th specific specifi c properties. propert ies. These These operands are the classical PLC PLCoperands. Operands perands with wit h a value value of one bit only are differe diff erentiated ntiated from fr om those with 16 bits, bi ts, called words. In some case cases, s, the operands can can be used used either eit her as a bit value or t ogether in i n the t he form of a word value. In the t he case case of FS FST software soft ware this applies appli es to all inputs, input s, all output out puts, s, and all all flags fl ags.. All other ot her operands operands can can only be used used either eit her as word word or only onl y as bit. Where operands operands can can be acc acces essed sed eit either her as bit or joint j ointly ly in i n the t he form of a word, the t he convenconvention ti on is that the t he least least significant significant bit (extrem (extremee right) contains contains the bit with the number number 0. It therefore follows that the most most significa signifi cant nt bit bi t (extreme left) left ) is bit number 15. 15. Other operands have have special special propert pr operties ies defined defined by the operating operati ng syst syst em. For For example exampl e all counters can be used either eit her in the t he form of a counter count er value as count counter er word CW CW and in the t he form of a 1-bit counter counter status stat us C(expir (expired ed or not expir expired). ed). Timers Timers are a similar case, case, having having a t imer word TW and a timer ti mer stat status us T. T. The FST PLCoperati operat ing system ensures that t hat these operands alw always ays change their values val ues accordingl accordingly. y. The individual indivi dual operand types and and their t heir applica appli catition on in programs are desc described ribed in the t he followfollo wing. Abbreviations b - Bit number number w - Word number Value ranges ranges of multibi mult ibitt operands: All All multibi mult ibitt operands are are 16-bit values. values. 0 t o 65535 (Unsigned (Unsigned decimal) -32768 to +32767 +32767 (Signed decimal) $0000 $0000 to $FF $FFFF(Hexadecimal) (Hexadecimal) 3.1.1 Inputs 256 possibl possiblee input words (0 to 255) each each with wit h 16 bits bit s (0 to 15), can be address addressed ed as words and as bits. bit s. Input (bit): Syntax: Iw.b Operations: Interrogate Input word: Syntax: Operations:
IWw Compare
3.1.2 Outputs 256 possible output out put words (0 to 255) each each with wit h 16 bits bit s (0 to 15), can be address addressed ed as words and as bits. bit s. FST Version 4.02.21 Manual
88
Output (bit): (bit ): Syntax: Operations: Output word: Syntax: Operati perat ions:
Ow.b Interrogate, set, set, reset, reset, assign, assign negated OWw Load, compare
3.1.3 Flags 10,000 flag fl ag words (0 to 9999) eac eachh with wit h 16 bits bi ts (0 to t o 15), can be address addressed ed as words words and as bits. Flag (bit) (bi t):: Syntax: Fw.b Operations: Interrogate, set, set, reset, reset, assign, assign negated Flag word: word: Syntax: FWw Operations: perat ions: Load, compare compare 3.1.4 Registers 256 registers regist ers (0 to 255), can only be addressed addressed as words. Syntax: Rw Operati perat ions: Load, compare 3.1.5 Timers 256 timers timers (0 to t o 255), can be programm programmed ed as pulse pul se timer ti mer (T) (T) Timer status (bit): (bit ): Syntax: Synt ax: Tnn, TONnn, TONnn, TOF TOFFnn Operatio perat ions: ns: Interrogate, Int errogate, set, reset, assign, assign, assign negated Timer value: value: TWnn Operations: perat ions: Load, compare compare Timer preset: preset : Operations: perat ions:
TPnn Load, compare compare
A pulse timer t imer allows an output to be b e acti activated vated for a pre-determined pre-determined time ti me by an input pulse. A pulse timer ti mer responds responds only to a rising edge of the input i nput condit condition ion (pulse (pul se). ). This This occurs occurs when there is i s a chang changee in status st atus from fr om 0 to t o 1. The The pulse starts the t he time ti merr (Tnn= (Tnn=1). 1). The The timer ti mer preset preset (start value) is loade l oadedd into int o the time ti merr word and the time ti merr starts start s running. The The time ti merr word is is then decreme decremented nted until unt il:: It reac r eaches hes the value 0, the timer ti mer has t hen expi expired red (Tnn= (Tnn=0, 0, TW TWnn=0) nn= 0) • Another rising ri sing edge edge (pulse) is detected detected in i n the conditional conditi onal part, as a result result of which • the timer ti mer is start started ed again again (timer restart) The timer ti mer status is i s reset reset (Tnn= (Tnn= 0, Twnn=0) Twnn=0) •
FST Version 4.02.21 Manual
89
A pulse at at input i nput I0.1 acti activates vates the output for the t he length length of time t ime determined determined by the timer ti mer preset preset (10 seconds). seconds). The The normall normallyy closed closed contact contact in the t he first fir st rung prevents the timer t imer from being restart restarted ed if it is already acti active. ve. Example: IF
AND AND N THEN SET WITH IF THEN THEN SET OTHR OTHRWRESET SET
I0.1 T1 T1 10S T1 O0. O0.1 O0.1
3.1.6 Counters Operations: One-bi ne-bitt : Interrogat Int errogate, e, set, reset, assign, assign assign negat negat ed Multibi Mult ibitt : Load, compare compare C0 t o C255 Counter ount er stat status, us, one-bit CW0 to CW255 Counter word, multibit CP0 t o CP255 Counter ount er preset, preset, mult mul tibit bi t 3.1.7 Constants Operati perat ions: Vnnnn
Load, compare Multibit
3.1.8 Function units unit s 256 function functi on units, unit s, 7 of which whi ch (32 to 38) are used for passing passing parameters, parameters, the t he rest rest are avai availl able able for general use. Operati perat ions: Load, compare FU0 t o FU255 Mult Mul tibit ib it Function uncti on unit uni t s FU32 FU32 to FU38 are available avail able for f or each program because they are used for f or passp assing parameters to t o modules. modul es. Only Only the t he program’s own FUs FUs can be acces accessed sed from wit wi thin hi n the th e programs, progr ams, the syntax synt ax is therefore t herefore simply si mply FUw. The FUs FUs of all programs can can be addressed in FST Version 4.02.21 Manual
90
t he command command interpret int erpreter, er, for which whi ch the program number has to be specifi specified: ed: FU FUp.w (p = program number, w = FU number 32 to t o 38). 3.1.9 Programs Operations: perat ions: P0 t o P63
Interrogat Int errogate, e, set, reset reset One-b One-bii t
3.1.10 Program statuses stat uses Operations: Interrogate, set, set, reset, reset, assign, assign negated PS0 to PS63 One-b One-bii t The program and program status stat us operands provide provi de informati infor mation on about the t he st status of a program: P PS Stat Status 0 0 Inactive 0 1 No meaning 1 0 Act Act ive but suspended 1 1 Act Act i ve and being processed A program with wit h the the number x can be started start ed and st stopped via the t he operand Px. Px. Aft After er having been started start ed with wit h the t he command command SE SET Px, Px= Px=11 and PS PSx=1. x= 1. When When it is stopped st opped wit wi t h the t he comcommand mand RE RESET SET Px, Px, Px=0 Px= 0 and PSx=0. Sx=0. The acti active pro program gram Px can be be suspend suspended ed wit wi th RESET SET PSx PSx.. 3.1.11 Errors Operations: perat ions: E EW
Interrogate, Int errogate, reset One-bit Multibit
3.1.12 Initial Init ial exe execution cution flags When a program is executed executed for the t he first time t ime the initi ini tial al exec execut ution ion flag f lag is 1, then t hen it is set automatically to 0. Operations: Interrogate FI One-bi One-bitt , for each each program program There are are separate separate init ini tial execution executi on flags fl ags for each program. Addressing Addressing is as for functi f unction on units. 3.1.13 Retentive etent ive operands If operands are are retentive retent ive this means means that their value is preserved preserved during power off. On the t he different dif ferent controller control ler types t ypes different parts p arts of the FS FST operands operands are retent retentive. ive. FECs A drop in operating operati ng voltage volt age results result s in some of the operands being copi copied ed to flash disk: FW0 to t o 255 25 5 R0 to t o 127 TP0 to t o 127 C0 to t o 127 CP0 to t o 127 127 Password HCXX Part of the t he zero-power zero-power RA RAM is used for retent r etentive ive storage stor age of operands. As a result result,, nearly all operands can can be made made retentive: retent ive: FW R FST Version 4.02.21 Manual
91
TV C, CP, CW FU Password 3.1.13.1
Configuration onfigurati on of the driver for retentive operands operands
For the FEC FECCompact ompact,, FEC FECStandar Standard, d, HC0X HC0X and HC20 HC20 CPUs CPUs the the above-ment above-mentiioned operands oper ands are always always retentive. retent ive. It is not necessary necessary to to configure configur e any any driver or somet something hing else. el se. The The retenti ret entive ve storage of the t he operands cannot cannot be swit switched ched off. Use the the function functi on module F9 F9 (see below) to res r eset et all operands operands if required. requi red. In order to t o make the above-mentioned above-menti oned operands retentive retent ive in i n the t he HC HC1X CPUs, the t he driver dri ver for retentive retenti ve operands operands " DRAD" must be selected selected and parameteri parameterise sedd in i n the t he driver configuration configurati on of each each projec proj ectt that wants wants to t o use retentive operands operands.. For For " Special pecial parameters" parameters" , the t he default sett setting ing " -q" should normall normallyy remain. remain. This This option opti on suppress suppresses es multil mult iline ine output on the concont roller rol ler screen screen when when the driver is started. start ed. 3.1.14 Function uncti on modules modul es for modifying modif ying operands operands Overview CHEC HECKSUM SUM Checksum hecksu m for a subrang subrangee of flag fl ag words wor ds COPY OPY Copy a subrange subrange of flag fl ag words words DINDE DINDEX XMW Indexed decrementi decrementing access access t o flag fl ag words words F9 Reset operand operandss IINDEX IINDEXMW Indexed incrementi ncrementing access access t o flag fl ag words word s NINDE NINDEX XMW Del Delete ete certain cert ain range of flag fl ag words word s RINDEX INDEXMW Indexed Ind exed read access t o flag words wor ds WINDE INDEXMW Indexed writ wri t e access access t o flag fl ag words word s CHECKSUM
Check sum for a subrange subr ange of flag fl ag words Input parameters FU32 Number Number of t he first fi rst flag fl ag word FU33 Number of t he last flag fl ag word Output utp ut parame parameters ters FU32 Check heck sum sum Note! The The chec checkk sum is formed by simpl simplee addi additt ion of the flag words. COPY
Copy a subrange of flag f lag words word s Input parameters FU32 Number Number of t he first fi rst source source flag fl ag word FU33 Number of the first fi rst target flag word FU34 Number Number of flag fl ag words Output utp ut parame parameters ters None Note! The flag word ranges may may overlap. DINDEXMW
Indexed decrementi decrementing ng acces accesss to flag fl ag words Input parameters FU32 Index t o flag fl ag word Output utp ut parame parameters ters FU32 Value Value read Note! The The given flag fl ag word will be decreme decremented nted by 1 ifi f it i t is not already 0. FST Version 4.02.21 Manual
92
F9
Reset operands Input parameters FU32 = 0 =1 =2 =3 =4 Output utp ut parame parameters ters None
Reset eset all registers, regist ers, counters, timers, flags fl ags Reset eset all registers Reset eset all flag fl agss Reset eset all time ti mers rs Reset eset a ll counters
IINDEXMW
Indexed increment incrementing ing access access to flag flag words. Input parameters FU32 Index of t he flag fl ag word Output utp ut parame parameters ters FU32 Val Val ue t hat i s read Note! The The given flag fl ag word will wil l be increme i ncrement nted ed by 1 if it is not a lready lready 65535 ($FF ($FFFF). NINDEXMW
Delete defined range of flag words Input parameters FU32 Index of t he flag fl ag word FU33 Number of flag fl ag words t o be deleted delet ed Output utp ut parame parameters ters None RINDEXMW
Indexed read acces accesss to flag fl ag words Input parameters FU32 Index of t he flag fl ag word Output parameters FU32 Value Value read WINDEXMW
Indexed write writ e acce access ss to flag fl ag words Input parameters FU32 Index of t he flag fl ag word FU33 New value val ue Output utp ut parame parameters ters None
FST Version 4.02.21 Manual
93
3.2
Multitasking
The FS FST PL PLCoperating operati ng system supports support s multi mul tittasking. It I t can can execut executee the the processing cycles of a number number of programs programs one after the t he other (referred to t o as tasks). Whil Whilee in a task one program is being bei ng processed, processed, the t he other currentl cur rentlyy active active programs are are not processed. processed. However, However, execuexecution ti on of the program pr ogram seg segmen ments ts and switching swit ching to the next program pr ogram (task chang change) e) takes place so quickly that t hat tthe he programs programs appea appearr to t o run in i n parallel. This is known as pseudo-pa pseudo-parallel rallel program executi execution. on. A task change takes t akes place: In STL STL step programs pr ograms:: after aft er a step st ep has been processed processed • In ST STL parallel logic programs: at the end of the program • In LD LDR programs: at the end of the t he program and after execution executi on of a jump j ump • In all programs: after aft er a program module (C (CMP MP)) is called call ed • A program program n can be acti activated vated (started) (start ed) and deactivated deactivated (stopped) from fr om within wit hin ana n• other ot her program program or module. The The program is act act ivated ivat ed by sett setting ing the t he operand Pn, Pn, and deacti deactivated vated by resetti resetting ng it. it . STEP IF THEN SET
Call
I0.1 P2 RESET P4 A rising ri sing edge at I0.1 activat act ivates es program number number 2 and deactivates deactivat es program number number 4. The program represented here and program 2 then run in i n pseudo-parall pseudo-parallel el mode. Note! Pseudo-parallel processing processing of a number of programs pr ograms may may considerabl considerablyy slow down exec executi ution on of individual indi vidual programs programs in comparison comparison with wit h execution execution of one program on its it s own. own. If several several program pr ogramss are running in pseudo-parallel pseudo-parallel mode, mode, the t he order in which they t hey are • process processed ed is identical i dentical to t o the t he order in which the t he programs programs were activated. activated. When a program program starts another program, program, init i nitiall iallyy the latt l atter er program is only acti activated vated (included cluded in the t he list of programs programs to be proces processe sed). d). It is i s not not st started arted unti untill it i t is i s 'its 'i ts turn' . In the t he first fi rst example, example, program pr ogram 0 (ST (STL) start st artss program 4 (LDR (LDR)) in in step 1, program pr ogram 4 in turn t urn starts start s program 3 (LDR (LDR). ). The order in i n which which they are processed processed is as follows: fol lows: •
Program rogr am 0 Program rogr am 4 Program rogr am 0 Program rogr am 3 Program rogr am 4 Program 0 ... etc. In the t he ST STL program, only one step st ep is executed each time ti me In the t he second second example, example, program pro gram 0 (ST (STL) start st artss program 4 (STL (STL) in i n step 1, program prog ram 4 in i n turn t urn starts start s program 2 (ST (STL) in step st ep 2. The The order of proces pr ocessing sing is i s as follo fol lows: ws: Program rogr am 0 Step 1 Program rogr am 4 Step 1 Program rogr am 0 Step 2 Program rogr am 4 Step 2 Program rogr am 0 Step 3 Program rogr am 2 Step 1 Program rogr am 4 Step 3 Program 0 ... etc. et c. FST Version 4.02.21 Manual
94
Note! •
•
•
Function uncti on modules and and program modules are a fixed fi xed part part of the t he call calling ing program program (i.e. sub-rout sub-rou tines). They They are are not processed processed in parallel parall el with wit h the calling calli ng program. They They are are processed processed in the t he task of the t he call calling ing program. progr am. A task change change always takes place aft after er a program module module is i s call called, ed, not after aft er the call of a function module modul e (This (This is i s a new new feature of FST versio versionn 4!). There is no limit to the t he number number and and type of programs that can can be active act ive at the t he same same time. For diagn di agnostic ostic purposes the current status st atus of a program can can be determi determi ned in online onli ne mode with the display di splay comman command. d. The The response response from the command command interpreter int erpreter to t o the t he DPn command command takes the foll fo llowing owing form: for m: = ,0,, ype>: STL= STL=0; 0; LDR LDR, FUP= FUP=1; 1; C= 2 Descripti escription on of the t he third thir d parameter: parameter: ..,..,0,.. The program is inactive. It is i s not not iinvolved nvolved in the task change change.. (Pn= (Pn=0) 0) ..,..,2,.. The program is active, but suspended. It is i s involved in the tas t askk change change.. (Pn= (Pn=1, 1, PS PSn=0) n= 0) ..,..,3,.. The program is active and running. Its It s task is being processed. processed. (Pn= (Pn=1, 1, PS PSn=1) n= 1)
3.2.1 The Start/ tart / Stop Switch wit ch After ft er reboot reboot the t he project project will wi ll always start automa aut omatitica callllyy unless unless you you have have a start/ stop input or built in run/ stop switch. switch. A start/ stop input or built in run/ stop switch switch has has the same same infl uence ence on the running state state of the t he project. The The start start// stop input i nput can be configured in the t he Control ontroller ler Sett ettings ings of the project. At start-up st art-up the project will only start automatically iiff the interna int ernall switch swit ch (if any) is swit switche chedd to run and and the s tart/ stop input (if confi configure gured) d) is set. set. During run time t ime a reacti reaction on is always edge edge sensit sensitive. ive. A falling fall ing edge (switching from run to t o stop) will wil l cause cause all programs to be inac i nactitivated vated (reset(resetted) or stopped (breaked), (breaked), depending depending on on the option opti on " Reset eset programs" programs" of the t he Controller Settings.. Settings A rising risi ng edge edge// switching from stop to t o run will wil l start st art program 0 and and all stopped st opped (breake (breaked) d) programs, programs, depending depending on the option opt ion " Reset eset programs" programs" of the t he Controller Settings. Settings. 3.2. 3.2.22 The Run LED LED The Run Run LED LED of t he FE FECand HC0X HC0X control cont rolllers shows the t he current current stat status us of operat operatiion: GREEN progr pr ograms ams are executed execut ed YELLO LLOW no progr pr ograms ams are executed execut ed RED an FST error occurred 3.2.3 Functi unction on blocks to control control the exe execution cution of programs programs Overview F4 St art cycli cyclica call executi execution on of a program. F8 St op all cycli cyclical cal programs. F23 Interrogate Int errogate whether a program is ready for executi execution. on. F26 Control ontr ol programs whose numbers are stored in variables. variables . FST Version 4.02.21 Manual
95
F4
Start cyclical cycli cal executi execution on of a program. Input parameters FU32 Program rogr am number, number, 0 t o 63 FU33 Ti me i n msec, 1 t o 65535 or 0 to t o deactivate deactivate Output utp ut parame parameters ters None Note! The resolutio resolut ionn is is 13.74 msec (5ms for tthe he FE FECStandard). All times im es specif specified ied in FU33 • are truncated tru ncated to t o a multip mult iple le of 13.74 msec (5ms for the t he FE FECStandard). Instead Inst ead of 100 msec, therefore, only 96.18 msec (100ms for the FEC Standard). • Function uncti on module modul e F4 F4 can be used more more than th an once. once. In order to t o stop c yclica ycli call processing processing for a program pr ogram again, again, a value 0 must be specified specifi ed in FU33. FU33. See See also F8 F8 A cycli cyclical cal program must reset iti tself wit wi t h RE RESET P in order to t o be called call ed again again when wh en • the next interval i nterval has elapsed. elapsed. F8
Stop all cyclical programs. Input paramet parameters None Output ut put parameter parameterss None Note! This module terminates the t he cyclical cyclical processing processing of program pr ograms. s. It is effec eff ectitive ve for all proprograms grams that are entered entered as cycli cyclica call with wit h F4, F4, it i t is therefore t herefore not selective. F F44 must be used used to to remove a single single program from cyclical cycli cal processing. processing. F23
Interrogate whether a program is ready for executi execution. on. Input paramet parameters FU32 Number of t he program Output ut put paramet parameters FU32 = 0 Program does not exist or is not ready for execut execution ion = -1 Program can be start star t ed F26
Control ont rol programs whose numbers are are stored in i n variables. Input paramet parameters FU32 Number of t he program FU33 = 0 St art program progr am = 1 Stop program program = 2 Resume interrupt int errupted ed program = 3 Interrupt program program Output ut put paramet parameters None 3.3
Error rr or Handli ng
Errors rrors can always occur in an automated automat ed syst syst em. One One has t o diff di fferenti erentiate ate program errors and syst syst em error errors. s. A program error, for f or example, example, is i s division divi sion by zero. A system error error,, for example, example, is the t he failu fai lure re of an I/ O ggroup. roup. The FS FST PL PLCoperating operati ng system detec det ectts numerous errors erro rs and and handles them th em in a fixed way. The The user user can partici part icipate pate in in error handling handli ng and, if required, in solution solut ion of the t he problem. The The error error program is intende int endedd for this t his purpose. If an error error occurs during opera operatition, on, a number number is i s entered entered into i nto the t he error word. This This number numbe r corresponds corresponds to the error that has occurred occurred (error number). number). At the t he same same time ti me two other ot her numeric values are are stored, specifying specifyi ng more closely the t he location locati on where t he error error occurred. Generally, t hese are are program number and step st ep number. If t he program does does not have any steps, the t he step number is zero. zero. If t he error does not occur in a program, the t he program number number is 255. In the t he case case of I/ O errors, the base address address of of the t he corresponding corresponding module module is i s entered in the second second position, positi on, otherwise ot herwise zero. zero. FST Version 4.02.21 Manual
96
A new new error error can be entered entered if the error word has the value zero, zero, that is, ifi f no other ot her error has occurred. occurred. This This means means that only the t he first fir st error is stored. stor ed. LLater ater errors are ignored. If an error output outpu t has been been configured, this follows fol lows the error word. If it iiss non-ze non-zero, ro, it is set. set. When When it is reset, reset, the error output out put is also reset. reset. Otherwise the error output out put can can be interroga int errogated ted by a program in the t he same same way way as any any other output. output . 3.3.1 Error handling without wit hout error program If a new error error is i s ent ent ered, all all programs are st st opped and and all out puts put s (exce (except pt the error output) out put) are reset reset (only if the t he opti option on " Reset eset Output Outputs" s" in the t he Contr ontroll oller er Sett Settings ings is selected). The error word and other ot her informati inf ormation on can can be interrogated int errogated as operand Eor EW EW or wit wi th funct ion module F22, F22, subfunction 0. The error is not reset reset by this thi s interroga int errogatition. on. It can be rese resett by resetting resett ing the t he error error E or EW EW or with wit h function funct ion module modul e F22, F22, subfunction subfunct ion 1. If E or EW EW is set to t o a non-zero value, this t his corresponds to the t he occurrence occurrence of a new error error and is is only possibl p ossiblee if EW was previously previousl y zeroed. zeroed. Unloading the active projec proj ectt in the t he control controller ler (Y) (Y) or loading l oading a new new project deletes del etes the error word and and the error output, but not the t he start starting ing and and stopping of the project or individual indivi dual programs progr ams (CI, (CI, Run/ Run/ St op swit switch). ch). Note! Before restart restarting ing a project foll f ollowing owing an error, error, the t he error should be deleted (acknowl(acknowledged) edged) to t o allow the t he detecti detection on of a new error. error. 3.3.2 Error handling with wit h error program The error program p rogram is i s basically basicall y a normal FS FST program – but i t cannot be be program P0. P0. The program to be used as eerror rror program pr ogram is defined in t he Control ontroller ler Sett ettings ings for the t he project project or with wit h function functi on module F21. F21. F F21 21 also allows the t he program program to be modified modifi ed or deactivated deactivated at any time. When set set via vi a the Control ontroller ler Set Set titings ngs,, the t he linker-loader li nker-loader checks checks whether the selected program exists. Functi Function on module F21 F21 does not carry out this hi s check. check. If a non-ex non-exist istent ent program pr ogram is selected, the t he syst system behaves behaves as as if no error program pr ogram were set. set. If an error occurs, the th e error error program p rogram is called immediatel i mmediatelyy and exclusivel exclusively. y. T The he programs programs act act ive at the t he time ti me of error occurrence occurrence " sleep" as long as as the error program is being exec execut uted ed (act (act ive). If the error occurs in a program, this thi s program is stopped before the error program is called. The error program can be a step program. progr am. Instead of the t he normal task t ask change change,, a simple I/ O scan scan is carried out, out , but no other other programs are executed. executed. This applies appli es also for cyclical cycli cal programs. The The statuses statuses of programs can can be modi modifified ed in the t he error program (or via vi a the CI), CI), but t hese hese conti continue nue to " sleep" as long as as the error program is ex exec ecuting. uting. When function functi on module F22, F22, subfuncti subfunction on 2 is called, called, the " sleeping" sleeping" programs programs aare re " woken" woken" . Task change change between the program pr ogramss now takes t akes place again again as usual. All active active programs are exec execut uted, ed, with wit h exec executi ution on conti continuing nuing at the t he interruption interrupt ion point. poi nt. Status changes changes by the error program are are taken into int o account. account. Calling alli ng function functi on module F22, F22, subfunction subfuncti on 2 also deletes delet es the error. If function functi on module F22, F22, subfunction 2 is i s called called without wit hout an error error program being exc exclulusively exec execut uted, ed, the error is deleted delet ed without any other other action acti on being taken. The The error will not be inactivated automati automatica calllly, y, however. however.
FST Version 4.02.21 Manual
97
F22, subfunction 3 resets resets all programs programs and outputs output s (even (even if the t he flag " Reset eset Programs Programs"" of the Controller ontrol ler Sett Settings ings is not set). set). The error and and any error error output out put are retai retained. ned. It is i s not important i mportant whether the t he call call comes comes from the t he error program or elsewhere and independent of whether whet her an error is set or whether whet her an an error program is configured and/ or acti active. ve. If an error occurs occurs while whil e the error program is ac actt ive, all programs programs are stopped and all all outputs outpu ts are reset reset in i n machine machine code. code. It is not important import ant whether the t he error program was was start started ed by an error or by a normal program call. call. If no error was entered, entered, the t he new new error is entered. If the t he old error was was not not deleted, delet ed, error error number number 39 " double error" is entered. entered. The The two additional addit ional inforinf ormation items i tems contain contain the t he error error source, as as usual usual (i.e. (i .e. the number of the t he error error program pr ogram and the active acti ve step of the t he error program when when the t he error occurred). occurred). 3.3.3 Special pecial trea tr eatment tment of I/ O Errors The I/ O errors 11 and 12 are are trea tr eated ted a lit l ittt le bit bi t different. dif ferent. Once Once error 11 or 12 has occurred occurred another error 11 or 12 wil willl not happen happen again. again. To enable enable error 11 or 12 again, you have to exec execute ute function f unction module modul e F25 F25 (see (see below). If a projec proj ectt is started start ed with wit h the t he Rcomman command, d, I/ O errors will wil l also be enabled enabled again. again. 3.3.4 Error handling function functi on modules Overview F21 Set or interrogate int errogate a program for error handling. F22 Set error handling. handli ng. F25 Set error handling in the event event of I/ O errors. F21
Set or interroga int errogate te a program for error handling handli ng Input paramet parameters FU32 Number Number of t he program for error handling handli ng or 0 to reset the function, functi on, or an inadmissible program program number (>= 64) to t o determine determi ne the curcurrent rent setti set ting ng.. Output ut put paramet parameters FU32 Current number of t he program for error handling Note! Note! Alterna Alt ernatitively, vely, an error error program pr ogram can can also also be set in i n the Control ontroller ler Sett ettings ings of the project. F22
Set error handling handli ng Input paramet parameters
FU32
=0 =1 =2 =3
Output ut put parameters
FU32 FU33 FU34 FU35
Read out t he error stack st ack Read ead out the error stack and delete the error Error restart, read out the error stack and delet deletee the error Non-recoverable Non-recoverable error, abort program execution
Error number Program rogram number numb er Step number number Always 0 (error (error address)
F25
Set error handling handli ng in the event event of I/ O errors Input paramet parameters FU32 = 0 Deactivat Deactivatee t he error detectio detect ionn = 1 Activate the error detecti detection, on, default setting setti ng Output ut put paramet parameters None FST Version 4.02.21 Manual
98
3.3.5 Overview of error numbers The FS FST control contr oller ler errors errors are numbered and and normally normall y appear appear wit wi th very brief bri ef additional addit ional informa infor matition on and some sometitime mess without wit hout explanatory explanatory tex t ext.t. The following foll owing contains contains an overview of the error error messages of t he FS FST PL PLCoperatin operat ingg system. system. The error status st atus can be displayed displ ayed with wit h the t he CI CI command command " DF" . The The response consists of 3 numeric numeric values. values. The The first is the t he error error number, the other two t wo give addit addit ional information i nformation on the situati sit uation on in which the t he error occurred. occurred. Normally Normally the second second value is the t he program numbe numberr and the third thi rd value is the t he step number. number. If the t he program program number number is i s 255, the error does not result from a program but from f rom an external external cause. cause. A typica typi call cause cause of this t his type t ype of error is i s an I/ O module fault. fault . Here, Here, as in other ot her case cases, s, the third t hird value contains a value value giving givi ng additional additi onal informa infor matition on on the error cause cause.. In the t he cas casee of I/ O module errors, this value gives the input or output word number in which the error occurred. The The module module can then be more more easily easily ident i dentii fied fi ed via the I/ O configuration. configurati on. In the case case of driver dri ver errors, errors, the third t hird value contai contains ns a numeric numeric value indicating the t he number number of the t he driver. For For tes t estt purposes, purposes, the " MF MF"" comman commandd of the CI CI can can be used to genera generatt e an error. error. This method allows al lows a projec proj ect’t’ss error handling to t o be tes t ested. ted. Error number number 0 2
Meaning Meaning of t he error Notes on error elimination elimi nation No error Checksum hecksum error in project file fi le Completely reload entire enti re PROJECT.RUN. project.
6
Program 0 to be started, start ed, but Create and load l oad program progr am 0. not found. At tempt to set or delete a non- Correct program or load l oad existent program or program missing program. status.
7
9
11
Cannot start projec proj ectt due to error in project project file fil e PROJECT.RUN.
Check and reload proj pr oject. ect. Possibly a driver is used but not load l oaded ed or a driver driver is is loaded but cannot cannot be use u sedd becaus becausee condit conditions ions for its it s use are not met. Possibly Possibly the required hardware for the t he driver is i s missing missing or incorrectl incorrectlyy confi configured. gured. Poss Possibl iblyy the t he controller control ler is i s out of memory. memory. I/ O module defective, output Replace eplace I/ O module, module, elimiel imishort-circuit or supply voltage nate short-circuit or connect connect missing missing at I/ O module. voltage volt age supply.
12
I/ O module not found.
Check heck I/ O module. module. Possibl ossiblyy configure switch swi tch sett settings ings on module or in I/ O configuration. configuration.
13
Watchdog activated acti vated
A driver, dri ver, module modul e or IO script blocked blocked the t he FS FST kernel for f or more than 1 second.
14
Could not find fi nd driver to start.
Incorporate Incorporate driver, paramparam-
FST Version 4.02.21 Manual
99
A required driver dri ver could could not be eter et erise ise correctly correctly in i n driver found or the driver reported configuration configurat ion and check check not ready as as it could not be hardware. initialised. Possibly ossibl y the requireme requir ements nts for the driver dr iver (hardware, (hardware, paramet parameters) were not not met. 36
Nested Nested CMP/ CFM or CMP/ CFM Change program structure not ffound ound when called. called.
39
Double oubl e error, error in proprogram. Cannot read projec proj ectt file fi le (PROJECT.RUN).
Eliminate li minate source of error.
Arithme rit hmetiticc error.
Correct program. program.
57 59
Reload project. proj ect.
Note! Note! Drivers and modules can can tri t rigge ggerr other ot her errors that t hat are not listed li sted here. Thes Thesee are then described described in i n the appropriate appropriat e driver documentati documentation. on. 3.4
The Command ommand Int erpreter erpr eter (CI) (CI)
All Fest est o controllers control lers have a Comma Command nd Interpreter. Int erpreter. It is generall generallyy call called ed " CI" . The The CI CI is i s not a man-mac man-machine hine interface i nterface.. It is often of ten used manually, manually, however, as it provides a really simple interface. int erface. The The Command Command Interpreter Interpr eter int i nterface erface is also used for a range of tasks t asks by the FS FST programming tool. t ool. The various program part partss of the t he FS FST software soft ware handl handlee communicati communication on with wit h the t he connec connected ted cont cont roller roll er automatica automati callllyy and provide a much much more powerful powerful and and convenconvenient user user interface i nterface.. The CI, CI, which wh ich is i s part of t he of t he FS FST PL PLCoperating operat ing system, syst em, can be operated as a terminal termi nal or terminal t erminal emulator emul ator via the t he controller’ control ler’ss seri serial al interf i nterfac acee (usually (usuall y CO COM or CO COM1). As an opopt ion the t he CO COM port t hat is used for t he CI CI on the t he controller control ler can be changed changed to another anot her CO COM port in the Controller Settings of each each projec project.t. This is part pa rticularly icularly useful, if you want want to make make use of a FIF FIFO O t hat is support supported ed by e.g. CO COM2, but but not COM1. This is i s the naming conve conventi ntion on for the main CI CI CO COM port for the t he differe diff erent nt contr controll oller er types: Control ont roller ler
Port number
Descri escript ption ion
FECs
0
the built buil t in " COM" port
HC0X
0
the built buil t in " COM" port (de(default) the " COM1" port on an addit ional io nal CP3x modul modulee the " COM2" port on an additional ional CP CP3x module
1 2
FST Version 4.02.21 Manual
100 100
HC16
HC2X
1
the built buil t -in " COM1" port (default) or t he " COM1 port on an addit addi t ional CP3x module, if the t he built built in " COM1" port has been been disabled disabled first f irst
2
the " COM2" port on an addit ional CP3x module modul e
1
the built buil t -in " COM" port (de(default) or the " COM1" port on an additional addit ional CP3x module,
2
the " COM2" port on an additional ional CP CP3x module
In addit addi t ion t o the t he CI CI int i nterface erface on a CO COM port, port , CI CI commands can can be entered via the t he connected connected keyboard keyboard and the t he result resul ts displayed disp layed on the t he connected monit moni t or for for HC1X HC1X and HC2X CPUs. Using Using FS FST drivers dri vers a CI CI int i nterface erface can can be made avail available able on addit addi t ional interfaces int erfaces like li ke CO COM port por ts and over TC TCP/ IP. Please note that t hat the t he addi addittional CI CI interfaces int erfaces are rest restricted ricted in some features featu res (see (see below). 3.4.1 Command input inp ut CI commands commands consists mainly mainl y of a single singl e line li ne as input inp ut and a response in the t he same same line. li ne. The The majorit major ityy of commands are not case-sensit case-sensitive. ive. Incorrect entri ent ries es can can be corrected wit wi t h Back Back-space (Ct (Ctrl H) before concluding wit wi t h CR CR(Ent (Enter). er). Example: >DF= DF= 0,0, 0,0,00 > The DF DFcomma command nd interroga int errogates tes the t he cont cont roller’s roll er’s error status. st atus. If no error is i s present, present, the controller responds " = 0,0,0" . Foll Following owing pressing pressing of the keys D, D, F, F, and CR CR, the t he entr entryy is shown in the t he screen and the th e IPC IPCadds its it s response response and and redisplays redispl ays its it s prompt. prompt . Invalid Invali d commands commands result in the error error message " ACCESS ERROR" or, rarely, rarel y, the t he abbreviat abbrevi ated ed form form " ERR" . Also, an acoust ic signal sounds from the speaker. speaker. Command
" \ r"
Response
" response>" \ r\n> r\ n>\ 21"
Error rr or Response esponse
command> " b\ r\ nACC nACCESSERROR\ OR\ r\n> r\ n>\ 21"
FST Version 4.02.21 Manual
101 101
3.4.2 3.4.2 Chaini haining ng of CI commands Nearl Nearlyy all commands can be chained. chained. The The CI CI processed processed the chained chained commands in sequence sequence and the t he respect respective responses are are grouped. Semicol Semicolons ons must separate comma c ommands nds from f rom different dif ferent comman commandd groups. Exampl xample: e: The The individu indi vidual al commands commands for starting start ing program P0 P0 and interrogati interr ogating ng 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 t he same same command command group (that (t hat is, i s, several several display display or modify modi fy commands) commands) can can be sepa separated rated by a comma comma only, without wit hout repetiti repeti tion on of the first fi rst character character for selecti selection on of the t he command command group. group . Example: Example: R0, R0, F FW W16 and I0.3 are to be displ di splaye ayed. d. As individu indi vidual al commands: >DR0= DR0=43 4322 >DMW16= 0 >DE0. DE0.3= 3= 1 > The same command sequence chained: chained : >DR0, DR0, FW16, E0.3= 432= 0=1 0= 1 > Mult Mul t i-line i-l ine commands commands cannot cannot be chained. chained. For For example, example, commands for changing a valu valuee with wit h entry of the old ol d value. Chaining Chaining is i s also not possibl possiblee for comma commands nds that are to be passed passed on to drivers. drivers. 3.4.3 Mass Mass display A minu minuss sign can be added to the end of commands commands for the display displ ay of values. Then, Then, 16 consecuti consecutive ve valu values es are are shown as a mass mass display. displ ay. This This display di splay method is i s also permissible permissibl e for bit operands. operands. Example: xample: The command " DR1" displays displays Regist Register er 1. >DR1=0 DR1= 0 > By contrast, contrast , the th e command command " DR1-" simult simul taneously aneously shows Registers Registers 1 to 16. >DR1-= DR1-=0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0 0,0,0,0 > 3.4.4 Password assword protec prot ectition on Access to the controller can be secured by password. If a password is set, MODIFY access and access access to drivers dr ivers in i n the t he CI CI is i s disabled. disabl ed. The The commands commands to set a password (LC (LC) and to t o lock l ock or unlock unl ock the controller control ler (LX) (LX) are descri described bed in the t he sections sections below. There are are some rules rul es for the t he password password protecti prot ection: on: A password consist consistss of 3 to 20 visib vi sible le ASC ASCII characters with wit h the th e exce excepti ption on of the t he comma (that (t hat is, i s, no spaces, spaces, tabs, IBM ext ext ended ended etc.). et c.). If a password password is set set it i t is i s stor stored ed in the controller controll er during power off, if retentive retenti ve operands operands has been acti activated. vated. Then Then if the controller control ler is powered powered on or rebooted, the contr controll oller er will wil l be be locked if a password password is set. If no retentive retenti ve memory memory is avail available able a password password can can also be stored within wit hin a projec proj ectt . Then Then this password password will be set set and the controller controll er locked when the project is i s loaded. The The password password for the project project is i s set set within wit hin the Control ontroller ler Sett Settings ings of the project.
FST Version 4.02.21 Manual
102 102
3.4.5 3.4.5 Overview vervi ew of CI commands The following foll owing description descript ion of the t he comma commands nds uses uses the abbreviations abbreviati ons in the table t able shown bebelow: Bit num numbe berr Block lock numb numbeer Driver river numbe numberr Progra rogram m num numbe berr Register egister num numbe berr Timer imer numb numbeer Word number number Counter ounter num numbe berr Station tation num numbe berr Enter the t he vali validd value instead of " " . The The value value range depends depends on on the t he operand. operand. 3.4.6 Activating ctivat ing the CI / Logon Logon DC4 (Ct (Ctrl T) Logon and output out put of t he kernel version The CI CI reports report s to the connected connected terminal t erminal after aft er either eit her DC4 (Cont (Control-T) rol-T) has been entered or a hardware BRE BREAKhas been transm tr ansmitittted. Any command command being processed processed is i s interr i nterrupt upted. ed. The controller control ler res r espo ponds nds with wit h " FESTO IPC IPCV2.nn" and the normal normal prompt pr ompt " >" in the t he following foll owing line. li ne. Please note note that th at a hardwar har dwaree BRE BREAKwil wi ll not not be detected det ected by b y FE FECand HC0X HC0X control cont rolllers! Sending a hardware BRE BREAKalso sets the t he transm tr ansmissi ission on speed on the th e controller control ler side to to a standar standardd rate rat e of 9600 or 2400 Baud, Baud, depending on one of tthe he following foll owing methods: methods: After ft er BRE BREAK switch swit ch cycli cyclically cally 2 times t imes to 9600 Baud, Baud, 1 times t imes to 2400 2 400 Baud (default). (default ). Always 9600 Baud Baud (old (ol d method) • Always 2400 Baud (useful for slow modem connect connections and Fiel Fieldd PC PCNet ali al ias • MpRAM). After ft er BRE BREAK switch swit ch cycli cyclically cally 3 times t imes to t o 2400 Baud, 2 times t imes to 9600 Baud. • All met met hods allow changing changing to t o any baud rate after login l ogin (see the MV comman command). d). After bootboot ing method 1 will wil l be selected. selected. After loading l oading a project using usi ng Field Field PCNet Net method method 4 will wil l automatically mati cally be applied. appl ied. The method methodss 1, 2 and 4 all allow ow a connec connecttion ion with wit h the the any old FS FST host software. From From time t ime to time ti me the login may not not succe succeed ed at once. Try Try again again by hitti hit ting ng a key as as displayed displayed by the t he FS FST host software. soft ware. The The new FS FST host software soft ware 3.21 knows about tthe he diffe dif ferrent baud rates and wil willl adapt to t o them. •
The login l ogin method can also be selected by b y the t he function funct ion module COM1MET M1METH. COM1METH
Input paramet parameters
Return etur n parameters
FU32 0 2x9600, 1x2400 1 always 9600 2 always 2400 3 3x2400, 2x9600 FU32 current/ new login logi n method
3.4.7 3.4.7 X Release int interface The X command command releases releases the t he serial port used for the th e CI CI (usually (usual ly COM1). This comman co mmandd only onl y works when entered entered via the t he serial serial port. port . 3.4.8 Commands for display of operands and statuses stat uses DA[< DA[.]. BN> Display ispl ay output out put bit bi t DAW[.]< .] Displa isplayy output output word word FST Version 4.02.21 Manual
103 103
DB Display Displ ay progr program am modul module The respon response se consis consists ts of " = ,0, , " . The first fi rst value is i s the th e module type, t ype, either eit her ST STL= 0 LDR LDR// FUP= UP= 1 or C= C= 2. The second value, memory range, is i s always always 0. The third thi rd value shows the status of the calling calli ng program. program. The last value is the current step number within withi n the module. DBF Disp isplay lay fun function tion module The respon response se consis consists ts of " = ,0, , " . The first fi rst value is i s the module modul e type, eit ei ther STL STL= 0 LDR LDR/ FUP= UP= 1 or C= C= 2. The second second value, val ue, memory range, is i s always 0. The third thi rd value shows the status of the calling calli ng program. program. The last value is the current step number within withi n the module. DD Display current current sett setting ing for decimal/ decimal/ hexade hexadecima cimall display of words The output output is " = D" for decimal decimal display, display, unsigne unsignedd " = S" for decimal decimal display, display, signe signedd " = H" for hexade hexadecima cimall displa di splayy DE[< DE[.]. BN> DEW[.]< .]
Display Displ ay input i nput bit bi t Displa isplayy input input word word
DF Display error status stat us word Output: Value of the t he status word Number Number of program in which whi ch the error occurred Step number number within wit hin this thi s program for exam example, ple, " = 59,3,24" . In the t he event event of I/ O errors, the program number number shows the value 255 and the step st ep number number shows the number of the input or output outpu t word in i n which the error error occurred occurred DM. BN> Display Displ ay flag fl ag bit bi t DMW MW<
Displa isplayy flag flag word word
DO Disp isplay lay fun function tion unit The global function units FU0 to FU31 and FU39 to FU255 can be displayed. DO< DO. Display Displ ay local lo cal funct fu nctiion unit uni t The local function funct ion unit uni t s FU32 FU32 t o FU38 FU38 can be displayed. These These function funct ion unit uni ts are separat separat e for each each program. DP< DP Displ Display progr pr ogram am stat st atus us 6 values valu es are given as a response. The first fi rst value is i s the th e module type, t ype, either eit her ST STL= 0 LDR LDR// FUP= UP= 1 or C= C= 2. The second second value, val ue, memory range, is i s always 0. The program program status is i s the third thi rd value. Eit Either her 0 for inac i nactitive, ve, 2 for acti active ve and and halted, or 3 for f or active acti ve and and processing. The fourt four th value is is the step number. It I t is i s non-zero non-zero for STL STL step programs and ladder diagrams with wit h branches as as long as the program pr ogram is active. acti ve. When When a step program is not yet a ctive ti ve,, it is in step 0. The two las l astt values are are the number and the step of a called module, if i f appropriate. appropri ate. DR< DR FST Version 4.02.21 Manual
Displ Display ay regi regist ster er 104 104
DS< DS DT< DT DTA DTE DTV DTW
Display program init ini t ial executi execution on flag fl ag Display timer status stat us for pulse pul se timer Displa isplayy timer timer status tatus for for switch witch-off -off dela delayy timer timer Display isplay timer timer status for switch witch-on -on dela delayy timer timer Disp isplay lay time timer preset Disp isplay lay time timer word
DV Display ispl ay baud rate The DV DV command command shows t he current current baud rate setting. sett ing. Possibl Possiblee valu values es are "= " = 1200" , " =2400" =2400",, "=480 " =4800" 0",, "=96 " =9600 00"" , "=19 " =1920 200" 0",, "=38 " =3840 400" 0" or " =5600 =56000" 0".. DZ< DZ DZV DZW
Display Displ ay counter count er stat st atus us Disp isplay lay coun unte terr pre preset Disp isplay lay counter ter word
3.4.9 Commands for modifying modif ying values The comma commands nds for modifying modif ying operands c an also be given without wit hout entry entry of a new valu value, e, that is, as a display di splay command. command. The The current value is i s then t hen returned and can be reset reset with wi th a new value or retained ret ained by pressing the th e Ent Enter er key. MA[.]< .] WN>.= {0 | 1} MAW[.]< .] WN>=
Modi Modiffy out out put pu t bit bi t Modi Modiffy out output put word word
MD={D MD={ D | S | H} Set display display mode The display mode mode can can be set set to t o decimal decimal unsigned unsigned " = D" , decimal decimal signed " = S" or to t o hexahexadec decimal imal " =H" . ME[.]< .] . .= {0 | 1} MEW[< MEW[.]< .]=
Mod Modify input np ut bit bi t Modi Modiffy input nput word word
MF= MF= number> Modify Modif y error word The value 0 deletes the current error. Any Any other ot her value genera generates tes the t he appropriate runtime runt ime error. MM >. .= {0 | 1} MMW< MMW=
Modi Mod ify flag bit bi t Modify Modi fy flag fl ag word word
MO< MO= number> Modify global function unit Modifi Modi fies es global function funct ion units unit s F FU0 U0 to FU31 FU31 and FU39 FU39 to FU FU255. MO< MO.= r> Modify Modify local local functi function on unit Modifi Modi fies es local function funct ion unit u nitss FU FU32 to t o FU38. FU38. These These function funct ion unit uni ts are separate separate for each each program. MR< MR= >
Modify register register
MT= {0 | 1} MT< MTA MT A= {0 | 1} MTE MT E= {0 | 1} MTV MT V= number> MTW MT W=
Modify Modif y (start/ (start / stop) stop ) pulse pul se timer Modify Modif y (start/ (start / stop) switch-off swit ch-off delay timer Modify Modif y (start/ (start / stop) switch-on swit ch-on delay timer Modify time ti merr preset preset Modify Modi fy timer word
MV=< MV= >
Set baud baud rate rate
FST Version 4.02.21 Manual
105 105
The bau baudd rate is set set by " MV= MV= 1200" 200" , " MV= MV= 2400 2400"" , " MV= MV= 4800 4800"" , " MV= MV= 9600 9600"" , " MV= MV= 1920 19200" 0" , " MV= MV= 38400" or " MV= MV= 56000". 56000" . The The baud baud rate can can be abbreviated abbreviated to 2 characters, characters, for examexample, ple, " MV= MV= 96" 96" . Note! " MV= MV= 56000" is not available availabl e for FE FECand HC HC0X controll contr ollers. ers. MZ= {0 | 1} MZV MZ V= number> MZW MZ W=
Set count counter er Set counter preset Set counter word
3.4.10 Program control commands commands B Interrupt all current current programs programs BP< BP Interru Int errupt pt single singl e program progr am R St art or continue conti nue program If the t he option " Reset eset Progra Programs ms"" of the t he Contr ontroll oller er Sett Settings ings is selected program P0 P0 is started start ed or continued. conti nued. If the t he flag is not set set all stopped (breaked) (breaked) programs are are also conti continued. nued. RB[,[,[, ... [,[,]]]]]]] Call program module The comman commandd " RB" call callss a loaded program program module (one that is i s included in the projec proj ect). t). Note! The command command uses uses the context of program P63, P63, which which should be kept reserved for this t his purpose. The The required requir ed paramet parameters must be passed passed with wit h the t he call call.. A parameter parameter may be omitomi tt ed. In this t his case, case, the previous value is used. It ret retuurns = FU32>, FU33>, FU34>, FU35>, FU36>, FU37>, FU38>. Example: RB7,14,,9=4712,103,0,0,0,0,0 Call CMP 7 with wit h FU32= FU32=14, 14, FU33=O U33= Old value, val ue, FU34= FU34=9, 9, Result Resultss F FU32= U32=4712, 4712, FU33=103, U33= 103, FU34 FU34 to 38= 38= 0 RF< RF[, FU32>[, FU33>[, ..... [,< [, FU37>[,]]]]]]] Call function functi on module The comma command nd " RF" call callss a loaded loaded function functi on module (one that is i s included in the t he project) project).. Note! The command command uses uses the context of program P63, P63, which which should be kept reserved for this t his purpose. pur pose. The The requi required red paramet parameters must be passed passed with wit h the t he call call.. A parameter parameter may be omitomi tted. In this thi s case, case, the previous value is used. It ret retuurns = FU32>, FU33>, FU34>, FU35>, FU36>, FU37>, FU38>. RP S SP
Start or conti cont inue program pro gram St op all programs Stop Stop prog pr ogra ram m PN>
3.4.11 Commands ommands for forcing forci ng input inpu ts and output out putss All inputs input s aand nd outputs output s can can be selecti selectively vely forced to 0 or 1. If an input bit b it is forced to 0 or 1, t his is visible visibl e to the program and and the CI. CI. If an output bit is forced to 0 or 1, this thi s remains remains invis invi sible ibl e to the program and and the t he CI, CI, that t hat is, i s, output bits bit s read read out remain remain unchanged. unchanged. Co Complete plet e input and output words can can also also be forced.
FST Version 4.02.21 Manual
106 106
Note! •
• • •
I/ Os may may only be forced during t roubleshooting. roubleshooti ng. A" finished" fi nished" product must not concontain forc f orced ed I/ Os. The force table is not retentive. retenti ve. The force table tabl e is automaticall automat icallyy deleted by a Ycommand command or by loading loa ding a projec proj ectt . This fea f eatur turee is not avail available able for all cont cont roller roll er types t ypes.. Forcing Forcing is supported for HC1x and HC20 CPUs in general, for FECs and HC0X CPUs starting from kernel version 2.25.
The followi fol lowing ng CI CI commands commands are avail available able for forcing forcing I/ Os: YF DAF DAF. BN> Result
Del Delete complete complet e force for ce t able able Displ Display out out put put bit bi t =0 =1 =N
Forced t o 0 Forced t o 0 Not force for cedd
DAWF Display isplay output word word Result esult " = xxxx xxxxxx xxxx xxxx xxxx xxxxxx xxxx"" , bitwise bit wise with wit h =0 Forced orced to 0 =1 Forced t o 0 =N Not force for cedd DEF DEF. Result:
Displ Disp l ay i nput nput bit bi t =0 =1 =N
Forced t o 0 Forced t o 0 Not force for cedd
DEWF Display isplay input input word word Result esult " = xxxx xxxxxx xxxx xxxx xxxx xxxx xxxx xx"" , bitwise bit wise with wit h =0 Forced t o 0 =1 Forced t o 1 =N Not force for cedd MAF< MAF. BN>= {0 | 1 | N} Entry nt ry in force force t able abl e for for output out put bit setti sett ing =0 Force to 0 =1 Force to 1 =N Do not force MAW MAWF= {val | N} Entry nt ry in force for ce t able for output out put word setting sett ing = val Force to value given =N Do not force MEF MEF. BN>= {0 | 1 | N} Entry nt ry in force force t able abl e for for input nput bit bi t sett sett ing =0 Force to 0 =1 Force to 1 =N Do not force MEW MEWF= {val | N} Entry nt ry in force force t able able for for input word word set set t ing = val Force to value given =N Do not force FST Version 4.02.21 Manual
107 107
3.4.12 Commands ommands embedded embedded in drivers dri vers The FS FST PLCoperating operati ng system allows all ows drivers dri vers in the t he project proj ect to t o suppleme suppl ement nt standard commands with wit h driver-s dri ver-specifi pecificc comman commands. ds. Dri Driver-s ver-specifi pecificc commands commands are ent entered ered with wit h a leading exclam exclamati ation on mark mark " !" followed fol lowed by the driver number number and and the comma command nd itse it selflf.. >! > A driver does not have ttoo support own commands, commands, however. however. Many drivers dri vers respond to an empty command command with wit h status stat us informati infor mation. on. Generally, Generally, driver dr iver commands commands have have a simi similar lar strucst ructure to standard st andard commands. commands. For example, example, the t he string stri ng driver wit wi th the driver dri ver number 3 has display commands commands for strings stri ngs in which the t he appropriate string stri ng number number is i s used. used. Example: >!3D12= !3D12= ‘FESTO STO 3.5
The Real-t eal -time ime Cl ock ock
The task of a real time t ime clock is to t o always have have the correct time t ime-of-day -of-day and date avai avai lable, even even if the controller control ler is i s swit switche chess off and later lat er on again. again. In addition addit ion there t here is also a system system clock, i.e. i .e. the th e DO DOS clock. When When the system starts start s (after reboot or power on) the t he system system clock clock is automatica automati callllyy set set to the t he real real time t ime clock. clock. During runtime runt ime the system clock clock is i s updated from the t he system system time ti mer. r. FST comes comes with a set set of modules modul es that allow to read and and write wri te the t he system system and real-t real-time ime clocks. The The modules to read and write writ e the real time t ime clock also synchroni synchronise se the syst syst em clo clock ck with wit h the t he real real time t ime clock clock each each time ti me the module is call called. ed. Note! There are are different dif ferent real time t ime clocks clocks avail available able on the different di fferent controller control ler types t ypes.. FECs
No real t ime clock available, avail able, only t he system clock.
HC0X HC0X There is a real tit i me clock clock in the CP CPU modul modul e. This hi s clock is battery batt ery buffered and lasts for about 10 years. HC1X There can be two different dif ferent real time t ime clocks clocks in the syst syst em: 1. t he I2C I2Cbus RTC 2. the SRAM RTC The I2Cbus real-t real -time ime clock is i s not on t he CP CPU modul modules, es, but depending on the t he busboard either eit her on the busboard b usboard or in i n the DC/ DCvoltage volt age conversion conversion module. modul e. Systems based on a 3-slot busboard have no I2C bus real-time real-t ime clock. clo ck. A Gol Goldcap dcap capacit capacitor or supplies the real real -time clock with volt age for 3 to t o 5 days days only. The SR SRAM RTCis inside insi de the th e CP CPU module modul e and battery batt ery buffered. buf fered. It I t lasts last s 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 RTCis found f ound in i n the t he system it will wil l be preferred preferr ed to t o the t he I2Cbus RT RTC. HC2X HC2X This This CPU is equi equ ipped pp ed wit wi t h a SR SRAM RTC. The SRAM SRAM RTCis inside nsi de t he CPU module and batt battery ery buffered. It las l astt s for about 10 years. years.
FST Version 4.02.21 Manual
108 108
3.5.1 Setting ett ing the clocks manually manually The I2Creal-t real -time ime clock of t he HC HC1X can be set wit wi t h the the Bios setup. How to t o do this t his is i s dedescribed scribed in i n the t he docume documentati ntation on that t hat comes comes with wit h the t he hardware. hardware. Note! You You will wi ll need a screen screen and keyboard connected. To set the t he clock using FS FST you have to download a projec proj ectt with wit h the t he modules to set t he realrealtime ti me clock, clock, that t hat are described described below, into int o the t he control controller. ler. The modules modules can can be executed executed with wit h the CI CI command command " RF" or " RB". B" . Example: >RF10,8,30,0,0 > If you have imported import ed the the module F10 F10 as CF CFM10, this t his commands set sets the the real-time real-ti me clo clock ck and the system clock clock to t o 08:30. 3.5.2 Function modules modules for sett setting ing and and reading reading the real real -time -t ime clock clock Overview F10 Set t ime F11 Set Set date dat e F12 Get time F13 Get date dat e F10 Set time t ime Input paramet parameters
Output ut put paramet parameters F11 Set date dat e Input paramet parameters Output ut put paramet parameters F12 Get time t ime Input paramet parameters Output ut put paramet parameters
F13 Get date dat e Input paramet parameters Output ut put parameters paramet ers
FST Version 4.02.21 Manual
FU32 FU33 FU34 FU35 None
Hour (0 t o 23) Minut Minu t e (0 t o 59) Second (0 t o 59) 1/ 100 Seconds econds (0 to 99)
FU32 Year ( 1980 t o 2099) FU33 Month Mont h (1 t o 12) FU34 Day (1 t o 31) None None FU32 FU33 FU34 FU35
Hour (0 t o 23) Minut Minu t e (0 t o 59) Second (0 t o 59) 1/ 100 Seconds econds (0 to 99)
None FU32 FU33 FU34 FU35
Year (1980 (1980 t o 2099) Month Mont h (1 t o 12) Day (1 t o 31) Day of week (0=S (0= Sunday, 6=S 6= Saturday) atur day)
109 109
3.6
Miscellaneous
3.6.1 Mass storage stor age for programs, drivers dri vers and files fi les The FST PLC operating system uses DOS drives to store the project and drivers. Which drive is used can be selected in the t he Controller Settings of the project project or the t he Driver Sett Settings ings in the Driver Configuration. Configuration . On the different di fferent controller control ler types t ypes different dif ferent drives dri ves are available: available: FECCompact ompact
On dri drive B: are 120 KB (FC (FC20 90 KB, KB, FC34 H01 or newer 370 KB) KB) avail available able for programs and and drivers. Also, Also, the t he Start Startup up file fi le - which which is is generated automaticall automat icallyy by FS FST - should shoul d be loaded on this thi s drive. Drive A: A: is i s occupi occupied ed by syst syst em files. fil es. No No user files fi les can be stor stored ed on this thi s drive.
FECStandard Standard
On drive dri ve B: are 360 KB availabl avail ablee for for programs programs and drive dri vers. rs. Also, t he Startup art up fil f ilee - which is generated generated automaticall automat icallyy by FS FST - should shoul d be loaded on this drive. dri ve. Drive A: A: is i s occupi occupied ed by syst syst em files. fil es. No No user files fi les can be stor stored ed on this thi s drive.
HC0X HC0X
On drive dri ve B: are 120 KB (HC02 (HC02 H02 or newer 370 KB)availabl B)avail ablee for for programs programs and drivers. Also, Also, the t he Start Startup up fil f ilee - which is generated generated automaticall automat icallyy by FS FST - should shoul d be loaded on thi t hiss drive. dri ve. Drive A: A: is i s occupi occupied ed by syst syst em files. fil es. No No user files fi les can be stor stored ed on this thi s drive.
HC1X HC1X
ROM/ RAM disk: di sk: If no diskette diskett e drive is connec connected ted to t o the control controller ler or no disk is ini nserted, t he RO ROM/ RAM drive dri ve is becomes drive A. The RO ROM areas areas of thi t hiss drive already alr eady cont contains ains various variou s driver fil f iles es for use with wit h the t he FS FST. The RA RAM area has approx. 84 KB available availabl e for the t he project proj ect file fi le and/ and/ or other drivers. drivers. Flash-Disk: The Fl Flash-Disk is drive dri ve C. C. This drive dri ve has has 512 KB KB available available for f or the t he project fil f ilee and other drivers dri vers.. Also, the t he St Startup art up fil f ilee- which whi ch is generated generated automatica automati callllyy by FS FST should be loaded on this thi s drive.
3.6.2 RAM for programs and drivers dri vers For executi execution on the project proj ect and drivers have to be loaded into int o memory. memory. The The following foll owing amount of memory memory is approximatel approximatelyy availabl availablee for the projec proj ectt and drivers dri vers for the t he differen diff erentt controll contr oller er types. FECCompa ompact ct FECStand Standar ardd HC0X HC0X HC1X HC1X
290 290 KB (FC20 (FC20 30KB) 200 200 KB 290 290 KB 430 430 KB
Note! For For each ST STL instructi instr uction on approx. 10 bytes bytes of code are generat generat ed.
FST Version 4.02.21 Manual
110 110
3.6.3 Function uncti on blocks bl ocks An import impor tant way of extending the t he FS FST PLCoperating operati ng system is by incorporat i ncorporating ing (import (i mport)) ready modules modules into int o a project and loading loadi ng them with wit h the t he project. project. Such modules modules can can be written in any suppo supportrted ed programmi pro gramming ng language language (ST (STL, LDR LDR,, C). C). Several Several Cmodules modul es have been been prepared prepared for for special special tasks. t asks. These These can can be called call ed either eit her as CF CFM or CMP. Note! Further urt her modules modul es are are descri described bed in the t he secti sections ons above. above. Most driver dri ver packages packages also include incl ude modules. These These are described described in i n the appropriat appropr iatee • driver documentati documentation. on. Overview BLIN BLINK K Gener eneral al blink bits FIFO IFO Fi rst-in-f rst- in-firirst-out st-out memory LOADSYNC Sync ynchronis hronisation ation of of project project (re)loa (re)loading ding •
BLINK
General eneral blink bl ink bits bi ts Input parameters parameters Output ut put paramet parameters
None FU32 4 bli bl i nk bit bi t s
Bit Change / sec Frequency / Hert Hertzz 0 0.25 2 1 0.5 1 2 1 0.5 3 2 0.25 Note! This module does not use a timer. ti mer. The The module has t o be call called ed repeatedly repeatedly in i n order to t o update the blink bits. bit s. FIFO
First-in-fi ir st-in-first-out rst-out storage Input parameters FU32 Mode = 0 To reset t he FIFO IFO = 1 To incorporat incorp oratee t he value from fr om FU 33 into int o FIFO IFO = 2 To read out t he next value from fr om FIFO IFO = 3 To determine determi ne t he number of values stored stor ed in FIFO IFO Ot herwise no function FU33 If mode = 1 the new value Output parame parameters ters FU32 If mode (input (i nput)) ... = 1 Returns 0 if succe successful, ssful, otherwise otherwi se 1 if no memory = 2 Next Next value from fr om t he FIFO IFO or 0 ifi f FIFO IFO empt emptyy = 3 Number Number of values stored stor ed in t he FIFO IFO Otherwise therwi se no value returned retu rned LOADSYNC
Synchronisati ynchronisation on of project (re-)loading (re-)loading Input parameters FU32 = 0 Prevent project proj ect loading loadi ng = 1 Allow ll ow project project loading FST Version 4.02.21 Manual
111 111
Output parame parameters ters None Note! The CI CI commands S and Y! Y! Always switch swit ch over to t o project pr oject loading loadi ng allowed. all owed.
FST Version 4.02.21 Manual
112 112
4
FST Driver Dri vers s Referen eference ce
This manual descri describes bes the dri d rivers vers and modules of t he FS FST Runtime unt ime Library. 4.1
Input and output modules
This chapter chapt er describes the th e input and output out put modules modul es supported support ed by the t he FS FST IPC IPC. Thi Thiss chapt chapter er is not intende int endedd to t o replace the manual manual supplied, however, however, but focuses focuses on special special points point s of FST IPC IPCapplicati appli cation. on. For For pin p in assignment assignment and technical t echnical data dat a pleas pl easee refer to t o the t he manual supplied pli ed with the t he hardwa hardware. re. 4.1.1 4.1.1 PLCsecurit securi t y Most I/ O modules are are equipped with wit h a PL PLCsecurit securityy function. functi on. This This allows all ows the runtime runt ime system system (FS (FST IPC IPCKernel) to t o monitor monit or the t he presence presence of configured confi gured modules modul es when a project proj ect is i s started start ed and the function functi on of the t he module at at runtime. runt ime. An An FS FST error is triggered t riggered if a fault faul t is detected. The The error numbers used are 11 12
I/ O stage defecti defective ve I/ O module module not found or duplicated
Error rro r 12
If Error Error 12 occurs, the configured confi gured module could not be found or there t here were were several several modules modul es with wit h the t he same same physical physical I/ O address address on the busboard. Error rro r 11
If Error 11 occurs, occurs, either eit her the module m odule is i s faulty, fault y, you have not not connec connected ted the t he required external external power supply, supply, or there t here is a short short-c -circuit ircuit.. For For information inf ormation on this, thi s, see see the status input word for the t he appropriate appropri ate module. modul e. An An additional addit ional FST input inp ut word has been been assigned assigned to t o each each module t hat supports support s this thi s feature. The The assignme assignment nt of tthe he individual indivi dual bits bi ts is i s module-spec module-specifific ic as shown shown in tthe he following foll owing table. Pleas Pleasee note that the t he status input word is updated during duri ng eac eachh cycle. cycle. Procedure for overl overload/ oad/ short-circuit
In the t he event event of a short-c short -circui ircuitt (or an overload), please please observe observe the following fol lowing points. point s. It must be ensured ensured that the t he output cannot cannot be set until unti l the t he caus causee of the t he problem has has been been eliminated. elimi nated. If you are working in i n machine machine mode and and have not set an error error program pr ogram,, all outputs are automati automatica callllyy switche swit chedd off when an an error occurs. In system mode– or if an error program has been start started ed – you you yourself must ensure ensure that the output out put involved is i s reset. reset. You You can can evaluate evaluate the error informati information on and and the status input word to determine the output i nvolved. Here Here you should should bear in mind that t hat the t he outputs output s are normally normally grouped in sets of 8 that t hat must be reset reset together. Working without PLC security
If you do not wish to t o use the PL PLCsecurit securityy function functi on for a module, you can selec selectt the appropriate pri ate module modul e driver in i n the FS FST IPC IPCI/ O configurer. confi gurer. The The follo fol lowing wing table t able shows the I/ O modules and and the appropriate drivers without securit security. y. Module Modul e OM11 OM40 OM21 IM11 IM51
Driver ri ver without wit hout PLCsecuri securitt y OM10 OM10 OM20 IM10 IM10
FST Version 4.02.21 Manual
113 113
4.1.2 Digital igit al input and output modules The followi fol lowing ng table shows an an overview overview of the t he digital digit al modules available. available. They are are descri described bed in the t he followi fol lowing ng secti sections. ons. Module IM10 IM11 IM11 IM12 IM12 IM51 IM51 OM10 OM11 OM12 OM40 OM20 OM21 OM22 OM70 OM70 OM74 OM74 TM10 TM10 AS11 AS11 AS12 AS12 AS13 AS13 AS14 AS14
Features eatures 2x8 digital digit al inputs input s 2x8 2x8 digital digital inputs inputs 4x8 4x8 digital digital inputs inputs 2x8 2x8 digital digital inputs inputs (npn) (npn) 2x8 digit digi t al outputs outpu ts 2x8 2x8 digital outputs 4x8 4x8 digital outputs 2x8 2x8 digital outputs (1A) (1A) 8 digit digi t al inputs, input s, 8 digit digital al outputs 8 digital inputs, inputs, 8 digit digital al outputs 2x8 2x8 digital inputs, inputs, 2x8 2x8 digital outputs output s 6 relays (changeover (changeover contacts) 6 relays (change (changeove overr contacts) contacts) 16 relays (break contacts) 16 relays relays (break (break contac contacts) ts) 16 digit di gital al input inp utss (TT (TTL), 16 digit di gital al outputs out puts (TT (TTL) 16 digital digit al inputs (TT (TTL), 16 digital digi tal outputs output s (TT (TTL) 8 pushbut pushbuttt ons, 8 LEDs LEDs 32 LEDs LEDs (red/ (red/ green) 16 switches swit ches (E-M-E (E-M-E) 32 LEDs LEDs (green) (gr een)
4.1.2.1 IM10
Ident/ Check/ heck/ Status tat us */ */ 1 */ */ 2 */ */ 1 */ */ 1 */ */ 2 */ */ 1 */ */ 1 */ */ 2 */ */ 0 */ */ 0 */ */ 0 -
IMXX
2x8 opto-isolated opto-isolated digital inputs Inputs: Outputs: Input words: words: Output ut put words: Switch posit positions: ions: Sum of inputs: input s: Sum of outputs: outp uts: Special features: Module identifica identifi catition: on: Module Modul e check: check: Status information (addit (additional ional input words): words):
16 1 1 to 9 144
Assignment ssignment of input i nput words:
IW 15 0 E1
14
13
FST Version 4.02.21 Manual
12
11
10
9
8
7
6
5 E0
4
3
2
1
0 114 114
IM11 PLCsecurit securi t y
2x8 opto-isolated opt o-isolated digital digi tal inputs input s with wit h PL PLCsecurit securityy and contr control ol LEDs for the inputs i nputs Inputs: 16 Outputs: Input words: words: 1 Output ut put words: Switch posit positions: ions: 1 to 9 Sum of inputs: input s: 144 Sum of outputs: outp uts: Special features: Module identifi ident ifica catition: on: Yes Module Modul e check: check: Yes Status information (addit (additional ional input words): words): 1 Assignment ssignment of input i nput words:
IW 15 14 0 E1 1 St atus 1
13
12
11
10
9
8
7
6
5 4 E0 St atus 0
3
2
1
0
Assignment ssignment of status stat us registers: registers:
Bit no. 0 1 2 3 4 5 6 7
Name Name NO24V -
Function uncti on Reserved Reserved Reserved No external voltage volt age Reserved Reserved Reserved Reserved
IM12 PLCsecurit securi t y
4x8 opto-isol opt o-isolated ated digit di gital al input i nputss with wit h PL PLCsecuri securitty and cont control rol LEDs for external 24V suppl supplyy Inputs: 32 Outputs: Input words: words: 2 Output ut put words: Switch wit ch positions: posit ions: 1 to F Sum of inputs: input s: 480 Sum of outputs: outp uts: Special features: Module identifi identi fica catition: on: Yes Module Modul e check: check: Yes Status information (addit (additional ional input words): words): 2
FST Version 4.02.21 Manual
115 115
Assignment ssignment of input i nput words:
IW 0 1 2 3
15 14 13 E1 E3 St atus atu s E1 St atus atu s E3
12
11
10
9
8
7
6
5 4 3 E0 E2 St atus at us E0 St atus atu s E2
2
1
0
Assi ssi gnment gnment of status st atus registers: regist ers:
Bit no. 0 1 2 3 4 5 6 7
Name Name NO24V -
Function uncti on Reserved Reserved Reserved No external voltage volt age Reserved Reserved Reserved Reserved
IM12
4x8 opto-isolat opt o-isolated ed digit digi tal input i nputss with wit h PL PLCsecuri securitty and cont control rol LEDs for external 24V suppl supplyy Inputs: 32 Outputs: Input words: words: 2 Output ut put words: Switch wit ch positions: posit ions: 1 to F Sum of inputs: input s: 480 Sum of outputs: outp uts: Special features: Module identifica identifi catition: on: No Module check: check: No Status tat us informa infor matition on (addit (additional ional input words): words): Assignment ssignment of input i nput words:
IW 15 0 E1 1 E3
14
13
12
11
10
9
8
7
6
5 E0 E2
4
3
2
1
0
IM51 PLCsecurit securi t y
2x8 opto-isolated opt o-isolated digital digi tal inputs input s with wit h PL PLCsecurit securityy and contr control ol LEDs for the inputs i nputs Inputs: 16 Outputs: Input words: words: 1 Output ut put words: Switch posit positions: ions: 1 to 9 Sum of inputs: input s: 144 Sum of outputs: outp uts: Special features: npn (negative switching) Module identifi identi fica catition: on: Yes Module Modul e check: check: Yes Status information FST Version 4.02.21 Manual
116 116
(addit (additional ional input words): words):
1
Assignment ssignment of input i nput words:
IW 15 14 13 0 E1 1 St atus atu s E1
12
11
10
9
8
7
6
5 4 3 E0 St atus atu s Eo
2
1
0
8
7
6
5 A0
2
1
0
Assignment ssignment of status statu s registers:
Bit no. 0 1 2 3 4 5 6 7
Name Name NO24V -
4.1.2.2
Function uncti on Reserved Reserved Reserved eserv ed No external voltage volt age Reserved Reserved Reserved Reserved
OMXX
OM10
2x8 opto-isolated opto-isolated digital outputs Inputs: Outputs: Input words: Output ut put words: Switch posit positions: ions: Sum of inputs: input s: Sum of output outp uts: s: Special features: Module identifica identifi catition: on: Module Modul e check: check: Status information (addit (additional ional input words): words):
16 1 1 to 9 144
Assignment ssignment of output out put words:
OW 15 0 A1
14
13
12
11
10
9
4
3
OM 11 PLC PLCsecuri securit y
2x8 opto-isolated opto-isolat ed digital digit al outputs out puts with wi th PLCsecurit securityy and control control LEDs for the t he outputs output s Inputs: Outputs: 16 Input words: Output ut put words: 1 Switch posit positions: ions: 1 to 8 Sum of inputs: input s: Sum of output out puts: s: 128 Special features: Module identifi identi fica catition: on: Yes Module check: check: yes FST Version 4.02.21 Manual
117 117
Status information (addit (additional ional input words): words):
1
Assignme ssignment nt of input i nput and output words:
OW 0 OW 0
15 14 13 A1 15 14 13 St atus atu s A1
12
11
10
9
8
7
12
11
10
9
8
7
6
5 4 3 A0 6 5 4 3 St atus atu s A0
2
1
0
2
1
0
Assignment ssignment of status statu s registers:
Bit no. 0 1 2 3 4 5 6 7
Name Name OVRLD VRLD NO24V -
Function uncti on Reserved Overl Overload oad / short circuit circuit Reserved No external voltage volt age Reserved Reserved Reserved Reserved
OM12 PLC PLCsecuri securit y
4x8 opto-isolat opt o-isolated ed digital digit al output out putss with wit h PL PLCsecuri securitt y and and control LEDs for external 24V supply suppl y and overload Inputs: Outputs: 32 Input words: Output ut put words: 2 Switch wit ch positions: posit ions: 1 to F Sum of inputs: input s: Sum of outputs: outp uts: 480 Special features: Module identifica- Yes tion: Module Modul e check: check: Yes Status information (additi (additiona onall input 2 words): Assignme ssignment nt of input i nput and output words:
OW 0 1 IW 0 1
15 14 13 A1 A3 15 14 13 St atus atu s A1 St atus A3
12
11
10
9
8
7
12
11
10
9
8
7
6
5 4 3 A0 A2 6 5 4 3 St atus atu s A0 Status Stat us A2
2
1
0
2
1
0
Assignment ssignment of status statu s registers:
Bit no. 0 1 2 3
Name Name OVRLD VRLD NO24V
Function uncti on Reserved Overl Overload oad / short circuit circuit Reserved No external voltage volt age
FST Version 4.02.21 Manual
118 118
4 5 6 7
-
Reserved Reserved Reserved Reserved
OM12
4x8 opto-isolated opto-isolat ed digital digit al outputs out puts with wi th cont cont rol LED LEDs for external 24V supply supply and overload Inputs: Outputs: 32 Input words: Output ut put words: 2 Switch wit ch positions: posit ions: 1 to F Sum of inputs: input s: Sum of outputs: outp uts: 480 Special features: Module identifica identifi catition: on: No Module check: check: no Status tat us informa infor matition on (addit (additional ional input words): words): Assignme ssignment nt of input i nput and output words:
OW 15 0 A1 1 A3
14
13
12
11
10
9
8
7
6
5 A0 A2
4
3
2
1
0
2
1
0
2
1
0
OM40 PLC PLCsecurit securi t y
2x8 opto-isolated opt o-isolated digital digit al outputs out puts with wi th PLCsecurity security and control control LEDs for the outputs out puts Inputs: Outputs: 16 Input words: Output ut put words: 1 Switch posit positions: ions: 1 to 8 Sum of inputs: input s: Sum of outputs: outp uts: 128 Special features: feat ures: 2.5 A max. ; 1 A nom. per channel channel Module identifi identi fica catition: on: Yes Module Modul e check: check: Yes Status information (addit (additional ional input words): words): 1 Assignment ssignment of input i nput and output out put words wor ds::
OW 0 IW 0
15 14 13 A1 15 14 13 St atus A1
12
11
10
9
8
7
12
11
10
9
8
7
6
5 4 3 A0 6 5 4 3 St atus atu s A0
Assignment ssignment of status statu s registers:
Bit no. 0 1 2 3
Name Name OVRLD VRLD NO24V
Function uncti on Reserved Overl Overload oad / short circuit circuit Reserved No external voltage volt age
FST Version 4.02.21 Manual
119 119
4 5 6 7
-
Reserved Reserved Reserved Reserved
OM20
2x8 opto-isolated digital digit al outputs, 2x8 opto-isolated digital inputs i nputs Inputs: 8 Outputs: 8 Input words: 1 Output words: 1 Switch wit ch positions: positi ons: 1 to 9 Sum of inputs input s 72 Sum of outputs output s 72 Special features f eatures Module identi identification: fication: Module check: Status information (additional (additi onal input words): Assignment ssignment of i nput and output words:
IW 15 0 OW 15 0
14
13
12
11
10
9
8
14
13
12
11
10
9
8
7 E0 7 A0
6
5
4
3
2
1
0
6
5
4
3
2
1
0
OM21 PLC PLCsecuri securit y
2x8 opto-isolated digit di gital al outputs, out puts, 2x8 opto-isolated digital digi tal inputs input s with PLC PLCsecurit securityy and and control LEDs for the t he inputs input s aand nd output outp utss Inputs: 8 Outputs: 8 Input words: words: 1 Output ut put words: 1 Switch posit positions: ions: 1 to 8 Sum of inputs input s 64 Sum of outputs output s 64 Special features f eatures Module identifi identi fica catition: on: Yes Module Modul e check: check: Yes Status information (addit (additional ional input words): words): 1 Assignment ssignment of input and output words:
IW 15 14 13 0 1 St atus atus EO OW 15 14 13 0
12 12
11 11
10 10
9 9
8 8
7 6 EO 7 A0
5
4
3
2
1
0
St atus at us A0 6 5 4 3
2
1
0
Assignment ssignment of status statu s register A0:
Bit no. 0 1
Name Name OVR OVRLD
FST Version 4.02.21 Manual
Function unct ion Reserved Overload verl oad / short circuit circuit 120 120
2 3 4 5 6 7
NO24V -
Reserved No ext external voltage volt age Reserved Reserved Reserved Reserved
Assignment ssignment of o f status statu s register E0:
Bit no. 0 1 2 3 4 5 6 7
Name Name NO24V -
Function unct ion Reserved Reserved Reserved No ext external voltage volt age Reserved Reserved Reserved Reserved
OM22 PLC PLCsecuri securit y
2x8 opto-isolated digit di gital al outputs, out puts, 2x8 opto-isolated di digit gital al inputs input s with PLC PLCsecurit securityy and and control contr ol LEDs LEDs for external 24V supply suppl y and overload Inputs: 16 Outputs: 16 Input words: words: 1 Output ut put words: 1 Switch wit ch positions: posit ions: 1 to F Sum of inputs input s 240 Sum of outputs output s 240 Special features f eatures Module identifi identi fica catition: on: Yes Module Modul e check: check: Yes Status tat us informa infor matition on 2 (addit (additional ional input words): words): Assignme ssignment nt of input i nput and output words:
IW 0 1 2 OW 0
15 14 13 E1 Status Stat us E0 St atis ati s E1 15 14 13 A1
12
11
10
9
8
7
12
11
10
9
8
7
6
5 4 3 E0 Status Stat us A0 St atus atu s A1 6 5 4 3 A0
2
1
0
2
1
0
Assignment ssignment of o f status st atus register r egister Ax:
Bit no. 0 1 2 3 4 5
Name Name OVRLD VRLD NO 24V -
Functio unct ionn Reserved Overload verl oad / short circuit circuit Reserved No external voltage volt age Reserved Reserved
FST Version 4.02.21 Manual
121 121
6 7
-
Reserved Reserved
Assignment ssignment of status stat us register regist er Ex: Ex:
Bit no. 0 1 2 3 4 5 6 7
Name Name NO24V -
Function uncti on Reserved Reserved Reserved No external voltage volt age Reserved Reserved Reserved Reserved
OM22
2x8 opto-isolated digital digit al outputs, output s, 2x8 2x8 opto-isolated digital digit al inputs input s wit withh control control LEDs for external 24V supply and overload Inputs: 16 Outputs: 16 Input words: words: 1 Output ut put words: 1 Switch wit ch positions: posit ions: 1 to F Sum of inputs input s 240 Sum of outputs output s 240 Special features f eatures Module identifica identifi catition: on: No Module check: check: No Status tat us informa infor matition on (addit (additional ional input words): words): Assignme ssignment nt of input i nput and output words:
IW 0 OW 0
15 E1 15 A1
14
13
12
11
10
9
8
14
13
12
11
10
9
8
7 6 E0 7 6
5
4
3
2
1
0
5 A0
4
3
2
1
0
OM70 PLC PLCsecuri securit y
6 relay rel ay output out putss (changeover (changeover contacts) contact s) wit wi t h PL PLCsecuri securitty and control contr ol LEDs Inputs: Outputs: 6 Input words: Output ut put words: 1 Switch positions: 1 to 9 Sum of inputs: input s: Sum of outputs: outp uts: 56 Special features: feat ures: Relay changeove changeoverr contacts Module identifi identi fica catition: on: Yes Module Modul e check: check: Yes Status information (addit (additional ional input words): words): FST Version 4.02.21 Manual
122 122
Alloc ll ocation ation of the t he output words:
OW 15 0
14
13
12
11
10
9
8
7
6
5 4 3 2 1 0 K5 K4 K3 K2 K1 K0
OM70
6 relay output out putss (changeove (changeoverr contacts) wit wi t h indica indi catt or LE LEDs Inputs: Outputs: 6 Input words: Output ut put words: 1 Switch posit positions: ions: 1 to 9 Sum of inputs: input s: Sum of outputs: outp uts: 56 Special features: feat ures: Relay changeov changeover er contacts Module identifica identifi catition: on: Module Modul e check: check: Status information (addit (additional ional input words): words): Assignment ssignment of output out put words:
OW 15 0
14
13
12
11
10
9
8
7
6
5 4 3 2 1 0 K5 K4 K3 K2 K1 K0
OM74 PLC PLCsecurit securi t y
16 relay rel ay output out putss (break contacts) wit wi t h PL PLCsecuri securitty and control-L control- LEDs Inputs: Outputs: 16 Input words: Output ut put words: 1 Switch wit ch positions: posit ions: 1 to F Sum of inputs: input s: Sum of outputs: outp uts: 240 Special features: feat ures: Reed relay, break contacts Module identifi identi fica catition: on: Yes Module Modul e check: check: Yes Status information (addit (additional ional input words): words): Assignment ssignment of output out put words:
OW 15 0 K1
14
13
12
11
10
9
8
7 6 K0
5
4
3
2
1
0
OM74
16 relay outputs (break contacts) with indicator LEDs Inputs: Outputs: 16 Input words: Output words: 1 Switch wit ch positions: posit ions: 1 to F Sum of inputs: input s: Sum of outputs: outp uts: 240 FST Version 4.02.21 Manual
123 123
Special features: feat ures: Module identifica identifi catition: on: Module Modul e check: check: Status information (addit (additional ional input words): words):
Reed relay, break contacts
Assignment ssignment of output out put words: wor ds:
OW 15 O K1
14
13
12
11
10
9
8
7
6
5 K0
4
3
2
1
0
OM75 PLC PLCsecuri securit y
16 relay rel ay output outp utss (break contacts) wit wi t h PL PLCsecuri securitty and control-L control- LEDs max. max. switching swit ching current per relay contact contact 2 A Inputs: Outputs: 16 Input words: Output ut put words: 1 Switch wit ch positions: posit ions: 1 to F Sum of inputs: input s: Sum of outputs: outp uts: 240 Special features: feat ures: Reed relay, break contacts Module identifi identi fica catition: on: Yes Module Modul e check: check: Yes Status information (addit (additional ional input i nput words): words): Assignment ssignment of output out put words:
OW 15 0 K1
14
13
12
11
10
9
8
7
6
5 K0
4
3
2
1
0
OM75
16 relay output out putss (break cont contac actts) with wit h indicator indi cator LED LEDs max. max. switching swit ching current per relay rel ay concontact 2 A Inputs: Outputs: 16 Input words: Output ut put words: 1 Switch wit ch positions: posit ions: 1 to F Sum of inputs: input s: Sum of outputs: outp uts: 240 Special features: feat ures: Reed relay, break contacts 2A Module identifica identifi catition: on: Module Modul e check: check: Status information (addit (additional ional input words): words): Assignment ssignment of output out put words:
OW 15 0 K1
14
13
FST Version 4.02.21 Manual
12
11
10
9
8
7
6
5 K0
4
3
2
1
0 124 124
4.1.2.3 TM10 TM10 PLCsecuri securit y
16 digit digi t al output out putss (TT (TTL), 16 digit di gital al input i nputss (TT (TTL), wit wi t h PL PLCsecuri securitt y Inputs: 16 Outputs: 16 Input words: words: 1 Output ut put words: 1 Switch posit positions: ions: 1 to 9 Sum of inputs: input s: 144 Sum of outputs: outp uts: 144 Special features: feat ures: TTL (5V) Module identifi identi fica catition: on: Yes Module Modul e check: check: Yes Status information (addit (additional ional input words): words): Assignme ssignment nt of input i nput and output words:
IW 0 OW 0
15 E1 15 A1
14
13
12
11
10
9
8
7
14
13
12
11
10
9
8
7
6
5 E0 6 5 A0
4
3
2
1
0
4
3
2
1
0
4
3
2
1
0
4
3
2
1
0
TM10
16 digit di gital al output out putss (TT (TTL), 16 digit di gital al inputs i nputs (TTL (TTL) Inputs: 16 Outputs: 16 Input words: words: 1 Output ut put words: 1 Switch posit positions: ions: 1 to 9 Sum of inputs: input s: 144 Sum of outputs: outp uts: 144 Special features: feat ures: TTL (5V) Module identifica identifi catition: on: Module Modul e check: check: Status information (addit (additional ional input words): words): Assignme ssignment nt of input and output words:
IW 0 OW 0
15 E1 15 A1
4.1.2.4
14
13
12
11
10
9
8
7
14
13
12
11
10
9
8
7
6
5 E0 6 5 A0
ASXX
AS11
Universal display/ di splay/ switchswit ch-module module with wit h 8 pushbuttons pushbutt ons and and 8 LE LEDs Inputs: 8 Outputs: 8 Input words: words: 1 Output ut put words: 1 Switch posit positions: ions: 1 to 6 FST Version 4.02.21 Manual
125 125
Sum of inputs: input s: Sum of outputs: outp uts: Special features: feat ures: Module identifica identifi catition: on: Module check: check: Status information (addit (additiona ionall input words) words)
48 48 Pushbuttons ushbut tons and LEDs only
Assignme ssignment nt of input i nput and output words:
IW 15 0 OW 15 0
14 13 ESC 14 13 ESC
12 7 12 7
11 11
10 6 10 6
9 9
8 5 8 5
7 7
6 4 6 4
5 5
4 3 4 3
3 3
2 2 2 2
1 1
0 1 0 1
AS12
Universal display/ di splay/ switchswit ch-modul modulee with wit h 32 LE LEDs (16 red, 16 green) Inputs: Outputs: 32 Input words: Output ut put words: 2 Switch posit positions: ions: 1 to 5 Sum of inputs: input s: Sum of outputs: outp uts: 160 Special features: feat ures: LEDs LEDs only onl y Module identifica identifi catition: on: Module check: check: Status information (addit (additional ional input words): words): Assignment ssignment of output out put words:
OW 15 14 13 0 A (green) 1 B (red)
12
11
10
9
8
7
6
5
4
3
2
1
0
5
4
3
2
1
0
AS13
Universal display/ di splay/ switchswit ch-modul modulee with wit h 16 swit switches ches (E-M-E (E-M-E)) Inputs: 32 Outputs: Input words: words: 2 Output words: Switch posit positions: ions: 1 to 5 Sum of inputs: input s: 160 Sum of outputs: outpu ts: Special features: feat ures: 16 switche swit chess (E-M-E (E-M-E)) Module identifica identifi catition: on: Module check: check: Status information (additi (additiona onall input words): words): Assignment ssignment of input i nput words:
IW 15 0 A
14
13
FST Version 4.02.21 Manual
12
11
10
9
8
7
6
126 126
1
B
AS14
Universal display/ di splay/ switchswit ch-modul modulee with wit h 32 LE LEDs (green) Inputs: Outputs: 32 Input words: Output ut put words: 2 Switch posit positions: ions: 1 to 5 Sum of inputs: input s: Sum of output out puts: s: 160 Special features: feat ures: LEDs LEDs only onl y Module identifica identifi catition: on: Module check: check: Status information (addit (additional ional input words): words): Assignment ssignment of output out put words:
OW 15 0 A 1 B 4.1.2.5
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Address assignment assignment matrix matri x
The following foll owing tables t ables are are very helpf helpful ul for planning pl anning ad-dress ad-dressing ing of the t he individual modules. The The columns show t he I/ O modules, the th e rows show the processor processor I/ O a ddresses. ddresses. The module address is set set by b y means means of the t he rotary rot ary switch swit ch on the underside of tthe he module. Depending Depending on the module and switch position, posit ion, the t he range range shown shown for the t he swit switch ch posit position ion is i s assigned. assigned. All All addresses addresses are shown shown in hexadecimal hexadecimal notati not ation. on. The same same swit switch ch position positi on may occur occur for different dif ferent modules, but any single single processor processor I/ O address can can only onl y be assigned assigned once. This This means that a module assigns all t able rows associ associ ated with wit h a switch swit ch position. positi on. T There here is a separa separate te address range range for inputs input s and outputs. output s. The The FST IPC IPCI/ O configurer configur er supports support s you in assigning addresses / switch swit ch positions. posit ions. You You would woul d always begin with wit h the module that t hat take t akess up the fewest fewest I/ I / O addresse addresses, s, as it is then t hen eas easier ier to to find space for the remaining modules. Table 2: Address assignment assignment digit di gital al output out put modules part I
120-123 220-223 320-323 1A0-1A3 2A0-2A3 3A0-3A3
AS11 1 2 3 4 5 6
FST Version 4.02.21 Manual
127 127
Table 3 address assignment assignment digit di gital al output out put modules part II
OM10 OM11+ OM12 OM74+ OM 40 OM 75 75 110 1 1 1 1 111 112 2 2 2 113 210 3 3 2 3 211 212 4 4 4 213 310 5 5 3 5 311 311 312 6 6 6 313 313 170 7 7 4 7 171 171 172 8 8 8 173 173 270 9 5 9 271 271 272 A 273 273 370 6 B 371 371 372 372 C 373 373 114 7 D 115 115 116 E 117 117 214 8+ F 215 215
OM20+ OM 70 1 2 3 4 5 6 7 8 9
OM21 OM22 TM10 AS12 AS13 1 2 3 4 5 6 7 8
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
1
1
2
2
3
3
4
4
5
5
A B C D E F
Table 4 address assignment assignment digit di gital al input inpu t modules modul es part 1
120-123 220-223 320-323 1A0-1A3 2A0-2A3 3A0-3A3
FST Version 4.02.21 Manual
AS11 1 2 3 4 5 6
128 128
Table 5 address assignment assignment digit di gital al input inpu t modules modul es part II
110 111 112 113 210 211 212 213 310 311 312 313 170 171 172 173 270 271 272 273
IM10 1
IM11 1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
IM12 1
2
3
OM20 1 2 3 4 5 6 7 8 9
OM21 1 2 3 4 5 6 7 8
4
5+
OM22 OM22 1
TM10 TM10 1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
AS13 AS13 1
2
3
4
5
A+
4.1.3 Analog input and and output modules The followi fol lowing ng table tabl e gives an an overview of available avail able analog modules. modul es. These These are described described in in the following fol lowing secti sections. ons. Table 6: Overview Overview of analog input and output outpu t modules modul es
Modul Modulee IO10 IO11 IO12 IO40
Features eatur es 8 analog input inp utss 8 analog input inp utss 8 analog input inp utss 4 analog input inputss
IO41
4 analog input inputss
IO48 IO48
4 analog analog inputs inpu ts
IO60 IO61 IO70
4 analog analog output out putss 4 analog analog output out putss 4 analog output out putss
IO71
4 analog output out putss
IO73
4 analog output out putss
FST Version 4.02.21 Manual
Range(s) 0…4.096V 0…20mA 0…10V 0…10V -5V…+5V +5V 0...+5V -10V…+10V 0...10V -5V...+5 0...20mA 4...20mA -10V… -10V…+10V -10V… -10V…+10V -10V…+10V 0…10V -10V…+10V 0…10V 0…20mA 4…20mA
Resolut esolu t ion 12 bit bi t 12 bit bi t 12 bit bi t 12 bit bit
PLCSecuri Securitty */ -/ -
16 bit bit
*/ -/ -
12 bit
*/ -/
12 bit bi t 12 bit bi t 12 bit
-
12 bit 12 bit
129 129
4.1.3.1 IO10
IO1X
8 analog inputs, input s, 0 to 4.096V, 12-bit 12-bit Input words (channels): (channels): Output words (channels): Switch wit ch positions: posit ions: Sum of inputs: input s: Sum of outputs: outpu ts: Range: ange: Resolut esolution: ion: Special features: Module identifica identifi catition: on: Modul Modu l e check check::
8 1 to 4 32 0 t o 4,096V 4,096 V 12 bit
Assignment ssignment of input i nput words:
IW 15 0 1 2 3 4 5 6 7
14
13
12
Register value 0 100 200 500 1000 2000 4095
11 10 9 Channel # 1 Channel # 2 Channel # 3 Channel # 4 Channel # 5 Channel # 6 Channel # 7 Channel # 8
8
7
6
5
4
3
2
1
0
Physical value 0.000 V 0.100 V 0.200 V 0.500 V 1.000 V 2.000 V 4.095 V
IO11
8 analog analog inputs, i nputs, 0 to t o 20mA, 20mA, 12bit Input words (channels): (channels): 8 Output words (channels): Switch posit positions: ions: 1 to 4 Sum of inputs: input s: 32 Sum of outputs: outpu ts: Range: ange: 0 t o 20mA Resolut esolution: ion: 12 bit Special features: Module identifica identifi catition: on: Module Modul e check: check:
FST Version 4.02.21 Manual
130 130
Assignment ssignment of input i nput words:
IW 15 14 0 1 2 3 4 5 6 7 Register value 0 205 1024 2048 3072 4095
13
12
11 10 9 Channel #1 Channel #2 Channel #3 Channel #4 Channel #5 Channel #6 Channel #7 Channel #8 Physical value 0 mA 1 mA 5 mA 10 mA 15 mA 20 mA
8
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
IO12
8 analog analog inputs, input s, 0 to 10V, 10V, 12 bit Input words (channels): (channels): 8 Output words (channels): Switch posit positions: ions: 1 to 4 Sum of inputs: input s: 32 Sum of outputs output s Range: ange: 0 t o 10V Resolut esolution: ion: 12 bit Special features: Module identifica identifi catition: on: Module Modul e check: check: Assignment ssignment of input i nput words:
IW 15 0 1 2 3 4 5 6 7
14
13
12
Register value 0 410 819 2048 4095
FST Version 4.02.21 Manual
11 10 9 Channel # 1 Channel # 2 Channel # 3 Channel # 4 Channel # 5 Channel # 6 Channel # 7 Channel # 8
8
Physical value 0V 1V 2V 5V 10V
131 131
4.1.3.2 IO4X IO40 -10 - 10V V to …+10V
4 analog i nputs, -10V to…+10V , 12 bit b it Input words (channels): (channels): 4 Output words (channels): Switch posit positions: ions: 1 to 6 Sum of inputs: input s: 24 sum of of outputs: out puts: Range: -10V -10V t o …+10V Resolut esolution: ion: 12 bit Special features: Module identifi identi fica catition: on: Yes Module Modul e check: check: Assignment ssignment of input i nput words:
IW 15 0 1 2 3
14
13
12
11 10 9 Channel # 1 Channel # 2 Channel # 3 Channel # 4
8
7
6
Register egist er value
Physical value
- 2048 - 1024 0 205 1023 2047
- 10 V - 5V 0V 1V 5V 10 V
5
4
3
2
1
0
5
4
3
2
1
0
IO40 IO40 0V t o 10V
4 analog inputs, input s, 0V to 10V , 12 bit bi t Input words (channels): (channels): 4 Output words (channels): Switch posit positions: ions: 1 to 6 Sum of inputs: input s: 24 Sum of outputs: outpu ts: Range: 0V t o 10V Resolut esolution: ion: 12 bit Special features: Module identifi identi fica catition: on: Yes Module Modul e check: check: Assignment ssignment of input i nput words:
IW 15 0 1 2 3
14
13
12
FST Version 4.02.21 Manual
11 10 9 Channel # 1 Channel # 2 Channel # 3 Channel # 4
8
7
6
132 132
Register value 0 410 819 2048 4095
Physical value 0V 1V 2V 5V 10 V
IO40 -5V -5 V to +5V
4 analog input inp uts, s, -5V t o +5V +5V,, 12 bit Input words (channels) (channels) Output words (channels): Switch posit positions: ions: Sum of inputs: input s: Sum of outputs: outpu ts: Range: Resolut esolution: ion: Special features: Module identifi identi fica catition: on: Module Modul e check: check:
4 1 to 6 24 -5V -5V t o +5V 12 bit Yes
Assignment ssignment of input i nput words:
IW 15 0 1 2 3
14
13
12
11 10 9 Channel # 1 Channel # 2 Channel # 3 Channel # 4
Register value -2048 -1024 0 205 1023 2047
8
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
Physical value -5.0 V -2.5 V 0.0 V 1.0 V 2.5 V 5.0 V
IO40 0V t o 5V
4 analog inputs, input s, 0V to 5V, 5V, 12 bit bi t Input words (channels): (channels): Output words (channels): Switch posit positions: ions: Sum of inputs: input s: Sum of outputs: outpu ts: Range: Resolution: Special features: Module identifi identi ficcation: ati on: Module Modul e check: check:
4 1 to 6 24 0V t o +5V 12-bit Yes
Assignment ssignment of input i nput words:
IW 15 0
14
13
12
FST Version 4.02.21 Manual
11 10 9 Channel # 1
8
133 133
1 2 3
Channel # 2 Channel # 3 Channel # 4 Register egist er value
Physical value
0 410 819 1638 2048 4095
0.0 V 0.5 V 1.0 V 2.0 V 2.5 V 5.0 V
IO41 -10V to +10V
4 analog input inp uts, s, -10V to +10V, +10V, 16 bit Input words (channels): (channels): Output words (channels): Switch posit positions: ions: Sum of inputs: input s: Sum of outputs: outpu ts: Range: Resolut esolution: ion: Special features: Module identifi identi fica catition: on: Module Modul e check: check:
4 1 to 6 24 -10V -10V t o +10V 16 bit Yes
Assignment ssignment of input i nput words:
IW 0 1 2 3
15 14 13 Channel # 1 Channel # 2 Channel # 3 Channel # 4
12
11
10
9
Register egist er value
Physical value
-32768 -16384 0 3279 16383 32787
- 10 V - 5V 0V 1V 5V 10 V
8
7
6
5
4
3
2
1
0
IO41 IO41 0V to 10V
4 analog inputs, input s, 0V to 10V, 10V, 16 bit bi t Input words (channels): (channels): 4 Output words (channels): Switch posit positions: ions: 1 to 6 Sum of inputs: input s: 24 Sum of outputs: outpu ts: Range: 0V t o 10V Resolut esolution: ion: 16 bit Special features: Module identifi identi fica catition: on: Yes FST Version 4.02.21 Manual
134 134
Module Modul e check: check: Assignment ssignment of input i nput words:
IW 0 1 2 3
15 14 13 Channel # 1 Channel # 2 Channel # 3 Channel # 4
12
11
10
9
8
Register egist er value
Physical value
0 6554 13107 32768 65535
0V 1V 2V 5V 10 V
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
IO41 IO41 -5V - 5V to +5V
4 analog input inp uts, s, -5V t o +5V +5V,, 16 bit Input words (channels): (channels): 4 Output words (channels): Switch posit positions: ions: 1 to 6 Sum of inputs: input s: 24 Sum of outputs: outpu ts: Range: -5V -5V t o +5V Resolut esolution: ion: 16 bit Special features: Module i dentifica dentifi catition: on: Yes Module Modul e check: check: Assignment ssignment of input i nput words:
IW 0 1 2 3
15 14 13 Channel # 1 Channel # 2 Channel # 3 Channel # 4
Register value -32768 -16384 0 6554 16383 32767
12
11
10
9
8
Physical value -5.0 V -2.5 V 0.0 V 1.0 V 2.5 V 5.0 V
IO48 IO48 0 t o 20mA
4 analog analog inputs, input s, 0 to 20mA, 20mA, 12 bit Input words (channels): (channels): 4 Output words (channels): Switch posit positions: ions: 1 to 6 Sum of inputs: input s: 24 FST Version 4.02.21 Manual
135 135
Sum of outputs: outpu ts: Range: ange: Resolut esolution: ion: Special features: Module identifi identi fica catition: on: Module Modul e check: check:
0 t o 20mA 12 bit Yes
Assignment ssignment of input i nput words:
IW 15 0 1 2 3
14
13
12
11 10 9 Channel # 1 Channel # 2 Channel # 3 Channel # 4
8
Register egist er value
Physical value
0 204 819 1024 2048 4095
0 mA 1 mA 4 mA 5 mA 10 mA 20 mA
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
IO48 IO48 4mA to 20mA
4 analog inputs, input s, 4mA to 20mA, 20mA, 12 bit bi t Input words (channels): (channels): 4 Output words (channels): Switch posit positions: ions: 1 to 6 Sum of inputs: input s: 24 Sum of outputs: outpu ts: Range: ange: 4mA t o 20mA Resolut esolution: ion: 12 bit Special features: Module identifi identi fica catition: on: Yes Module Modul e check: check: Assignment ssignment of input i nput words:
IW 15 0 1 2 3
14
13
12
Register value 0 1024 2048 3072 4095
FST Version 4.02.21 Manual
11 10 9 Channel # 1 Channel # 2 Channel # 3 Channel # 4
8
Physical value 4 mA 8 mA 12 mA 16 mA 20 mA
136 136
4.1.3.3
I06X
IO60/ IO60/ IO61 IO61 -10V to +10V
4 analog analog outputs, output s, -10V to 10V, 10V, 12 bit Input words (channels): (channels): Output utpu t words (channe (channels): ls): 4 Switch posit positions: ions: 0 to 4 Sum of inputs: input s: Sum of outputs: outp uts: 20 Range: ange: -10V to 10V Resolut esolution: ion: 12 bit Special features: Module identifica identifi catition: on: Module Modul e check: check: Assignme ssignment nt of output out put words: OW 15 14 13 12 11 10 9 0 Channel # 1 1 Channel # 2 2 Channel # 3 3 Channel # 4 Register value -2048 -1024 0 1024 2047
8
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
Physical value -10 V -5 V 0V 5V 10 V
4.1.3.4 IO7X IO70/ IO70/ IO71 IO71 0V to 10V 10 V
2 analog analog output out puts, s, 0V t o 10V, 10V, 12 bit Input words (channels): (channels): Output utpu t words (channe (channels): ls): Switch posit positions: ions: Sum of inputs: input s: Sum of outputs: outp uts: Range: Resolut esolution: ion: Special features: Module identifica identifi catition: on: Module Modul e check: check:
2 0 to 4 10 0V t o 10V 12 bit
Assignment ssignment of output out put words: wor ds:
OW 15 0 1
14
13
12
11 10 9 Channel # 1 Channel # 2
Register egist er value
Physical value
0
0V
FST Version 4.02.21 Manual
8
137 137
410 819 2048 4095
1V 2V 5V 10 V
IO70/ IO70/ IO71 IO71 -10V to +10V
2 analog analog output out puts, s, 0V t o 10V, 10V, 12 bit Input words (channels): (channels): Output utpu t words (channe (channels): ls): 2 Switch posit positions: ions: 0 to 4 Sum of inputs: input s: Sum of outputs: outp uts: 10 Range: ange: -10V t o 10V Resolut esolution: ion: 12 bit bi t Special features: Module identifica identifi catition: on: Module Modul e check: check: Assignment ssignment of output out put words: wor ds:
OW 15 0 1
14
13
12
11 10 9 Channel # 1 Channel # 2
8
Register egist er value
Physical value
-2048 -1024 0 1024 2047
-10V -5 V 0V 5V 10 V
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
IO73 IO73 0 to t o 20mA
2 analog analog output out puts, s, 0 to 20mA, 20mA, 12 bit Input words (channels): (channels): Output utpu t words (channe (channels): ls): 2 Switch posit positions: ions: 0 to 4 Sum of inputs: input s: Sum of outputs: outp uts: 10 Range: ange: 0 t o 20mA Resolut esolution: ion: 12 bit Special features: Module identification: Module Modul e check: check: Assignment ssignment of output out put words: wor ds:
OW 15 0 1
14
13
Register value 0 205 FST Version 4.02.21 Manual
12
11 10 9 Channel # 1 Channel # 2
8
Physical value 0 mA 1 mA 138 138
819 2048 4095 4.1.3.5
4 mA 10 mA 20 mA Address assignment assignment ma matr tr i x
The following foll owing tables are very very helpful for plann pl anning ing addressing addressing of the t he individual indivi dual modules. The columns show the th e I/ O modules, modul es, the rows show the t he processor processor I/ O addresses. addresses. The The modmodule address is set by means means of the rotary rot ary switch on the t he underside underside of the module modul e. Depending epending on the module and swit switch ch posit position, ion, the t he range range shown shown for the t he swit switch ch posit position ion is i s assigne assigned. d. All addresses addresses are shown shown in hexadecimal hexadecimal notati not ation. on. The same same swit switch ch position positi on may occur occur for different dif ferent modules, but any single single processor processor I/ O address can only onl y be assigned once. This means means that a module assigns assigns all table tabl e rows assoc associated iated with wi th a switch position. posit ion. There There is a separate separate address range for input i nputss and and output out puts. s. The FS FST IPC IPCI/ O configurer configur er supports support s you in assigning assigni ng addresses addresses / switch swit ch positio posit ions. ns. You You would always always begin with wit h the t he module module that t hat takes t akes up tthe he fewest fewest I/ O addresse addresses, s, as it is then t hen easier easier to t o find fi nd space space for the t he remaining remaining modules. Table 7: Address assignment assignment analog output out putss part I IO10 IO11 140-15F 140- 15F 1 1 240-25F 240- 25F 2 2 1CO1CO-1DF 3 3 2CO2CO-2DF 4 4
IO12 1 2 3 4
Table abl e 8: Address Address assignment assignment analog output out putss part II IO40 IO41 1 A4 1 1 1 A5 2 A4 2 2 2 A5 3 A4 3 3 3 A5 1 A6 4 4 1 A7 2 A6 5 5 2 A7 3 A6 6 6 3 A7 Table 9: Address assignment assignment analog output out putss part III IO60 IO61 IO70 300-303 0 0 0 304-307 1 130-133 1 1 2 134-137 3 230-233 2 2 4 234-237 1BO-1B3 3 3 1B4-1B7 2BO-2B3 4 4 2B4-2B7 FST Version 4.02.21 Manual
IO48 1 2 3 4 5 6
IO71 0 1 2 3 4
IO73 0 1 2 3 4
139 139
Table 10: Address assignment assignment analog input inpu ts part I IO10 IO11 140-15F 140- 15F 1 1 240-25F 240- 25F 2 2 1CO1CO-1DF 3 3 2CO2CO-2DF 4 4
IO12 1 2 3 4
Table 11: Address assignment assignment analog input inpu ts part II IO40 IO41 1 A4 1 1 1 A5 2 A4 2 2 2 A5 3 A4 3 3 3 A5 1 A6 4 4 1 A7 2 A6 5 5 2 A7 3 A6 6 6 3 A7 Table abl e 12: Address Address assignment assignment analog input inpu ts part III IO60 IO61 IO70 300 0 0 0 304 1 130 1 1 2 134 3 230 2 2 4 1B0 3 3 2B0 4 4 4.2 4. 2
IO48 1 2 3 4 5 6
IO71 0 1 2 3 4
IO73 0 1 2 3 4
FEC and and HC0x
The special special IO drivers for f or FE FECand HC0x controller control lerss are descri described bed in i n this t his topi t opic. c. 4.2.1 Local Ios 4.2.1 4.2.1.1 .1
FEC St andard andar d
In the t he IO configurati configur ation, on, select the t he module that th at corresponds with wit h your hardware, e.g. FC FC440. The input inpu t s of the t he FE FECStandard are grouped int i ntoo FS FST input inp ut and output out put words. If you select t he " word" option opt ion th t hat is i s aavailable vailable for each FE FECStandard type, 16 inputs input s or outputs output s aare re acce access ssibl iblee through each each FS FST input or output out put word. If you select select the t he default default IO script script (without (wit hout " word" ), 8 inputs input s or outputs output s aare re acc access essibl iblee through the 8 least least signifi signi fica cant nt bits bi ts each each FS FST input or output word. For the t he analog IO separate separate modules modul es must be selected: Standard Analo Analogg Input 0-20mA and and Standard Analo Analogg Out Output put 0-20mA. 0-20mA. PLCSafet Safetyy is is availabl avail ablee throu th rough gh a separate separat e module: modul e: FE FECStandard PLCSafet Safety. y. This module modu le will wil l generate FS FST error 12 ifi f the t he hardware cannot be iidenti dentifified ed as a FE FECStandard. FST Version 4.02.21 Manual
140
Error 11 will wi ll be genera generatt ed if no supply suppl y voltage volt age is present present on the outputs out puts or an overload occurs on an an output out put.. The The reason reason will wil l be b e made made avail available able through t hrough the t he FS FST input inp ut word you specified specified when inc i ncludi luding ng tthe he 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 t he actual actual status, st atus, to t o be sure t hat the t he reason reason is availabl availablee later you should should write wri te an error program. program. 4.2. 4. 2.1. 1.2 2
FEC Compact omp act
In the t he IO configurati confi guration, on, select the t he module FE FEC. You You do not have to enter a switch swit ch position posit ion here. Enter Enter the t he number number of the FS FST input and output words that are to be used for the t he local IOs IOs (e.g. both bot h 0). The 12 input inpu t s of the t he FE FECCompact are divided divi ded into int o two two groups. 8 on the t he first fi rst,, 4 on the t he secsecond group. The The 8 bits of the t he first group are represented represented in the t he 8 least least significant bit bi t s of the t he input word given (e.g. (e.g. I0.0 to t o I0.7). The The 4 bits bit s of the t he secon secondd group are represented represented in i n the t he 4 least significa signifi cant nt bits bi ts of the followi fol lowing ng input word (e.g. (e.g. I1.0 to I1.3). The 8 outputs output s are represented represented in the t he 8 least least significa signifi cant nt bits bi ts of the output out put word given (e.g. (e.g. O0.0 to t o O0.7). O0.7). 4.2.1.3
HC0X
The 8 IOs of HC0X can be used as input inpu ts or output out puts. s. Enter the t he module HC HC0X into int o the t he IO confi configurati guration. on. You You do not have to enter a switch swit ch position positi on here. Enter Enter the t he number number of the FS FST input and output words that are to be used for the t he local IOs IOs (e.g. (e.g. both bot h 0). This This will wil l alloca all ocate te one input and two output out put words. The 8 IO bits bit s are represented represented as the 8 lea l east st significant signif icant bits bi ts of input and output word given (e.g. I0.0 to I0.7, O0.0 ttoo O0.7). O0.7). The The 8 least least significa signifi cant nt bits bit s of the t he second second output word (e.g. OW1) is used to define which pins are used as input or output: outp ut: if a bit is set this t his means means that the corresponding corresponding pin is an output, output , otherwise it is i s an an input. 4.2.1.4
Debouncing of Inputs Input s
The inputs input s have a delay delay time t ime of 5 ms. An addit addi t ional delay can be achieved by using usi ng the t he logical l ogical IO module DEBO DEBOU UNCE. Ent Enter er iti t into int o the IO confi configuration guration but behind the definition definit ion of the t he input word you want ttoo debounce debounce.. The The complet completee IW you specify specify will wil l be debounce debounced. d. T The he status of its i ts bits bi ts will wi ll only change change if the t he new new value has been read for two consecutive IO scans. You can increase the number of consecutive IO scans by entering DEBOUNCE for several times for the same input word. 4.2.2 IO extension HC0x HC0x and FEC FECCompact can be connected connect ed to t o an (addi ( additt ional) onal ) FE FECvia vi a the t he EX EXT interf int erface ace and a special special (short!) cable. cable. Note! For the t he FE FECSt CStandard series the IO extension extension is i s not available. avail able. If you want to t o have more more than t han one extension extension module, use the IO extension extension driver, which whi ch is descri described bed in a separat separat e chapt chapter. er. To access access the remot remotee IO from fr om your progr p rograms ams you have to enter ent er the t he module modul e Remot Remotee FE FEC (HC0X (HC0X)) or FECSlave (FE (FECCompact) ompact) int i ntoo the t he IO configurat confi guratio ion. n. You You have have to to give gi ve the the number of the FS FST input and output words (e.g. (e.g. 2 for f or both). bot h). FST Version 4.02.21 Manual
141
The 12 inputs input s of the t he remote FE FECare divided divi ded into int o two two groups: 8 on the t he first fi rst,, 4 on the t he second second group. The The 8 bits bit s of the first fi rst group are represe represented nted in the t he 8 least least significant signif icant bits bit s of the input word given (e.g. I2.0 to I2.7). The The 4 bits bit s of the t he secon secondd group are represented represented in the t he 4 least signifi significa cant nt bits bi ts of the following foll owing input word (e.g. (e.g. I3.0 to I3.3). I3.3). The 8 output out putss are represe represented nted in the t he 8 least least significant signif icant bits bit s of the t he output word given (e.g. (e.g. O2.0 to t o O2.7). O2.7). The remote remot e FE FECmust not have a cont control rol program program runni running. The FECmust be in the t he factory fact ory settings. sett ings. Delet Deletee any files fi les from drive dr ive B: using the t he Fil Filee transfer util ut ilitityy of FS FST IPC IPC. The RUN RUN// STOP swi swittch must be in i n posit positio ionn STO STOP. FSTError rror 99 9 9 wil wi ll occur if i f a FE FEChas local l ocal IO I Os configured confi gured and is i s also accessed accessed as remote remot e F FE EC. 4.2.3 Analogue Potenti ot entiometer ometer FECCompact and HC01 HC01 are equipped equi pped wit wi th an analogue potenti pot entiometer. ometer. It can be adjusted adjust ed using a screwdriver screwdriver in i n the t he range range 1 to 63. To read the values from your programs pro grams enter the t he module Tri Trimmer mmer into int o your IO configurati confi guration on and spec specififyy the input word you want want to t o use for the actual actual trimmer tr immer value. value. 4.2.4 Rotary ot ary Swit wi tch FECStandard cont control rollers lers are equi equipped pped with wit h a rotary rot ary switch swit ch with wit h 16 positio posit ions ns (0-15), (0-15), which whi ch also serves serves as as run/ stop switch, swit ch, where where 0 means means stop and all other ot her positions positi ons run. To read the t he switch position posit ion (1-15) (1-15) from fr om your programs programs enter the module Rotary Rotary Swit Switch ch into int o your IO configuration confi guration and specify specify the t he input word you want want ttoo use for the actual actual switch position. For compatibi compati bililitty reasons for t he FE FECStandard the module modul e Tri Trimmer mmer is still sti ll available. availabl e. The The swit switch ch posit positions ions will result result in tthe he following values values:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 1 5 8 12 16 21 26 32 36 41 46 50 54 59 63
4.2.5 Fast counters count ers The last two input inp utss of the t he second second group of o f the t he FE FECCompact (I1.2 and I1.3) I 1.3) as well as the first fi rst two inputs input s of HC0x (I0.0 and I0.1) can be used as 1 or 2 independent, independent, high-speed high-speed counters. Sti Stillll,, the t he inputs input s can can be read read as standard standard inputs. i nputs. For the t he FE FECStandard series the t he followi fol lowing ng input inp utss are used: FC4xx, FC5xx - I1. I1.66 and and I1.7 FC6xx - I3.6 I 3.6 and I3.7 I3. 7 FST Version 4.02.21 Manual
142
These hese counters are interrupt driven and once activated, activated, operate operate independentl independentlyy of the user’s control contr ol programs pr ograms and therefore therefo re are not affected af fected by factors fact ors such as cont control rol program scan scan time. Include the module modul e Fas Fastt counter to t o your IO confi configuration. guration. Enter 0 as swit switch ch if you are using counter 0, 1 for counter 1. Specify Specify the t he input word you want to t o hold the t he counter counter value. The count counter er value is incremented on each each rising risi ng edge of the t he correspondi corresponding ng input signal. Please lease note that the counter count er values cann cannot ot be reset. reset. If this thi s is required the t he driver described described i n a separate separate chapter chapt er can be used instead. inst ead. 4.2.6 Incremental Incremental Encoder The first fi rst two input inp utss of the t he second second group of t he FE FECCompact (I1.0 (I1. 0 and I1.1) as well as the input inp utss I0.2 and I0.3 of HC0x HC0x can can be used used as increment incremental al encoder up to t o 200Hz. 200Hz. Opt Optional ionally ly a reset reset signal signal can can be connected connected to t o I0.7. Still Sti ll,, the t he inputs input s can can be read as standard standard inputs. input s. For the t he FE FECStandard series the t he followi fol lowing ng input inp utss are used: FC4xx, FC5xx - I1.4, I1.4, I1.5 I1.5 and I1.70 I1.70 FC6xx - I3.4, I3. 4, I3.5 and I3.0. I3. 0. This encoder encoder is interrupt i nterrupt driven and once once acti activated, vated, operates operates indepe i ndependen ndentltlyy of the user’s control contr ol programs pr ograms and therefore therefo re are not effected ef fected by factors fact ors such as cont control rol program scan scan time. Include Includ e t he modul modulee Incremental Incremental Encoder Encoder to your IO configurati configur ation on and specif specifyy the input word for the t he counter counter value (e.g. (e.g. IW5). IW5). The The following foll owing input word will wil l hold hol d the t he direction (e.g. IW6). IW6). ABRESET
To reset the counter count er value val ue call the module modul e ABR ABRE ESET SET. Input parameters parameters none Output ut put paramet parameters none ABMODE
Pin I0.7/ I1.0/ I3.0 can can be used used to reset reset the t he counter. counter. The The counter counter will wil l be reset reset if I0.7/ I1.0/ I3.0 is active acti ve and and a positive posit ive edge is detected on one of the t he A/ A/ B inputs. input s. You You can choose choose bet bet ween ween the followi fol lowing ng modes modes:: Input parameters parameters FU32 reference/ reference/ reset reset mode: 0 no reset 1 directi direction on 0, sin 3 direction directi on 0, continuous 5 direc dir ectt ion 1, single 7 direction directi on 1, continuous Output ut put paramet parameters none
FST Version 4.02.21 Manual
143
4.3
Actuator Sensor ensor Interface Int erface
The Act Act uator uator Sensor Sensor Int I nterface erface (AS (ASi) connects connects sensors and act actuators uator s quickly quickly and cheaply to to t he IPC-PS IPC-PS1. 1. Up to t o 4 CP CP96 AS-I AS-Int nterf erface ace modu modules les can be used, each wi witt h up to t o 31 slaves. sl aves. The inputs and outputs output s of the t he slaves slaves are copied copied to t o the user defi defined ned local local function f unction unit s of the FST IPC. Selecting electi ng and and paramet parameterising erisi ng the driver dri ver If you want t o use the t he AS-Int AS-Interface erface in a FS FST IPC IPCproject, proj ect, you fir f irst st have to t o add and parameterparameterise the ASI ASI driver dri ver in the t he driver confi configuration. guration. Target drive: Enter nt er the t he drive dri ve that t hat contains contai ns the t he AS AS-Interface -Int erface driver ASIDR ASIDRV V.EX .EXE or to t o which whi ch it is to t o be loaded. 4.3.1 4.3.1 The ASi ASi configurer confi gurer Start the t he confi configurer gurer in i n the FS FST software soft ware via the Extr Extras as >AS >AS-Interac -Int eracee confi configurati guration on from fro m the menu. Note! In order to be b e able able to t o use the online features of the t he configurat configuration ion tool, t ool, th t he AS-Interfac -Interf acee driver dri ver must must be acti active ve on the IPC IPC-PS -PS1. It is sufficient suffi cient to t o load (into (i nto the t he co controller) ntrol ler) the t he project for which which you have configured confi gured the t he AS ASi driver, dr iver, without wit hout programs. The The IPC IPCmust then t hen be rerebooted. This This will wil l be done automati automatica calllly. y. Selecting electi ng the t he mast mast er Selecting electi ng Edi Editt >Modul Number/ IO-a IO-assignment ssignment from fr om the menu opens a selection selecti on window allowing all owing you to t o choose one of 4 masters. The The number of the th e master master corresponds to t o the t he address set on t he CP CP96 module. modul e. This selection selecti on window also defines defi nes t he base base address address for the t he I/ O image to which whi ch the AS ASi slave/ IOs IOs are are copi copied. ed. This This address must be given for correct configurati confi guration on of the th e master master module. modul e. A CP96 module modul e (AS (ASi master) always occupi occupies es 8 I/ O words in i n the the local I/ O area of t he FST IPC. IPC. Figure igur e 1: Selecti Selecting ng the Master module modul e and and assigning an I/ O address
Configuring onfiguri ng individual stations stat ions The main main function functi on of the configurer is the t he configurat configuration ion of the t he individual ASi bus stations stati ons (slaves). Here, Here, confi configurat guration ion means setting sett ing the t he ID and I/ O codes of a slave. Confi Configurat guratio ionn can can be done offline, offl ine, that t hat is, i s, without wit hout a link li nk to t o the t he IPC IPC. If there are sev several ASi ASi masters masters in i n one IPC IPCsystem, this th is procedure procedure has to be repeated for each each master. mast er. The The select select ion of o f the t he desired master is done by Edi Editt >Modul Number/ Number/ IO-assignment IO-assignment from f rom the t he menu. menu. At runtime runti me – during the t he initi ini tialisati alisation on phase– t he confi configurati guration on data of each each mast mast er is comcompared with the t he data data in i n the t he referenc referencee list. li st. A master master is i s only reconfigured reconfigured if the data does not match. This This approach prevents prevents a relatively relat ively long l ong delay when when a project is i s restarted restart ed (as would be cause causedd by reprogramming reprogramming of the t he master master list l ists). s). This This delay only occurs occurs the t he first fir st time t ime a project is started, st arted, when the t he confi configuration guration is changed, changed, and when a master master is i s swapped. swapped. FST Version 4.02.21 Manual
144
Selecting electi ng Edi Editt >Confi >Configurat guratio ionn form the th e menu menu shows shows the configured confi gured slaves from from 1 to 31 are shown with wit h I/ O address, ID, ID, I/ O code and and paramet parameters. Any Any slave can can be selected for fo r furt fu rther her processing with wit h the cursor keys or the mouse. mouse. Edit Double clicking cli cking on a slave or selecti selecting ng Edit Edit from the t he right mousebutt mousebutton on popup menu opens an input window allowing all owing editing editi ng of the t he ID code, code, I/ O code and parame parameters ters of the selected selected slave. slave. ID and and I/ O code should be take t akenn from the t he appropriate document documentation ation for the t he slave. slave. Entry of a parame parameter ter is i s optiona opti onal.l. This parameter parameter (0 to t o F) F) is transmitt t ransmitted ed to the slave when when the t he mast master is i s restarted. restart ed. When When slaves are designed designed accordingly, accordingl y, such parameters can be used used to to set set cert certain ain properties properti es (such (such as the sensit sensitivi ivity ty of an ultraso ult rasound und sensor). sensor). Figure 2: Entering a slave sl ave into the t he confi configuration guration
Delete Pressing ressing the t he Delete Delete key allows you to t o delete the t he selected selected slave from the t he nominal nominal list. li st. Nominal-actual comparison When selecti selecting ng Nominal Nominal// actual compare from the t he right mousebutt mousebut ton popup menu a comcomparison of the t he slaves slaves in the nominal list li st with wi th the t he slaves slaves prese present nt on the t he AS ASi bus bu s is started. start ed. All All deviations deviati ons are are displayed in a dialog. If the t he nominal nominal list l ist is empty – for example example in the t he case case of a new projec proj ectt – all all slaves slaves on the bus are are inserted inserted into i nto the t he nominal list. l ist. Naturally, the t he referreference ence list li st can be edit edited ed in t he normal normal way. There must be a connect connect ion t o the t he IPC IPC. The AS ASi driver dri ver must be instal i nstalled. led. The IPC IPCmain runru ntime ti me program program must be acti active. ve. Figure igur e 3: Result Result of the t he nominal-actual comparison
Printing rint ing the configurati configuration on Select elect ing File il e >Print >Print from the menu menu or pressing pressing
prints print s the confi configuration. guration.
Address programming of individual slaves Note! There There must be a link li nk to t o the t he IPC IPC. The ASi driver dri ver must be install inst alled. ed. The The IPC IPCmain runt ru ntime ime program must be act act ive. FST Version 4.02.21 Manual
145
By default, default , all al l ASi slaves have the address addr ess 0. Each Each AS ASi slave sl ave can can be assigned a new address addr ess by address programming. This can also also be done for f or slaves sl aves t hat already have an address address other ot her than t han 0. Each Each AS ASi slave must have a unique address addr ess (per master). The addresses addresses can be modified modifi ed by first fi rst selecting Edit Edit >Slave >Slave Address Addresses es and and then from fr om the list l ist use drag drag and drop to change change the t he slave. Online nli ne manipulati manipulation on of individual indi vidual slaves Note! There There must be a link li nk to t o the t he IPC IPC. The ASi driver dri ver must be install inst alled. ed. The The IPC IPCmain runt ru ntime ime program must be act act ive. The slaves slaves detected detected on t he bus are are displayed with wit h their t heir I/ Os in the t he AS ASi online onl ine display. The The display is dynamic. dynamic. In other words, the display is automatically updated to t o reflect the t he stat status us of the inputs. Manipulating slave outputs First position positi on the selection selection highlight hi ghlight on the slave sl ave whose outputs output s are are to be manipul manipulated. ated. Now Now it possibl possiblee to manipulate the t he outputs output s by doublecli doubleclicking cking on the output, output , by pressing pressing keys F5 F5 to F8, or by using usi ng the right ri ght mousebutton popup menu. menu. 4.3.2 4.3.2 CI commands !7DLE !7DLES Display Displ ay list li st of current slaves !7DSxx !7DSxx
Display ispl ay slave (IO, ID, +inputs) +input s) (xx = 1 to t o 1F) 1F)
!7DO !7DOUF
Display control contr ol flags fl ags
!7D !7DHARD
Disp isplay lay hard/ rd/ soft re reaction tion (0 = soft, 1 = hard) hard)
!7MMA
Modify Modif y Master Master Address (= 1 t o 4) (Valid (Valid for all following foll owing comma commands). nds).
!7MSA
Modify Modi fy Slave Address (= old old address, new new slave address)
!7MPM !7MPM
Modify Modif y Project Mode (=0 (= 0 or = 1)
!7MA
Modify Modi fy Output ut put (= slave address, address, output word)
!7MSP
Modify Modi fy Slave Parameter (= slave address, address, paramet parameter)
!7MHAR !7MHARD
Modify hard/ soft reacti reaction on (=0 (= 0 or = 1)
!7MER !7MERR
Modify Modi fy error status stat us (=0) (= 0) (Restart after runtime error)
All numeric numeri c values given for the t he Modify Modif y command command must be entered in i n hex. The The comman commandd is is not case case sensit sensitive. ive. The commands commands are used used in the t he first fi rst line li ne of the t he AS ASi configur conf igurer. er. The The comcommands are not int i ntended ended for manual entry. entr y. They They are only documented 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 eli eliminati mination on 700 No configuration configurati on data found for ASi driver 701 No mast master found 702 703 704 711 Sl ave failure fail ure 712 713 714 The cycli cyclical cal part of the t he driver monitors monit ors the Confi Configg OK OK flags fl ags of all configured configur ed masters. masters. If " hard" error reaction reaction is i s set, set, the t he failure of a slave slave result resultss in error number number 710 + master master ada ddress (1 – 4) being bei ng entered int i ntoo the the IPC IPCerror word. wor d. Program Program executi execution on is stopped. st opped. If an error handling routine rout ine has been been entered entered into int o the t he IPC IPCconfi configuration, guration, this t his is i s now start started. ed. If this t his behaviour is i s not desired, hard error rreac eacttion can be switched swit ched off with wit h the th e AS AS-I_Mode module (see below) below).. 4.3.4 Function unct ion modules Overview ASI_Mode I_Mode Sets t he reaction reactio n of t he ASi driver dri ver t o configurati configur ation on errors ASI_S ASI_Stt at
Interrogates Int errogates executi execution on control contr ol level (OU (OUF) flags fl ags
ASI_P ASI_Para ara
Transfer a parameter t o an ASi slave at runtime runt ime
ASI_R ASI_Res es
Restart cyclic cycli c update updat e
ASI_Mode
Sets the t he react react ion of t he AS AS-I driver dri ver to configuration configurat ion errors Input paramet parameters FU32 = 0 Soft reaction reacti on > 0 Hard Hard reaction reacti on Output ut put parameters paramet ers FU32 = -1 OK = 0 Driver not loaded loaded Note: The AS ASI_Mode module modul e can only be used with wit h the t he AS ASi dri d river. ver. ASI_Stat
Interrogat Int errogates es executi execution on control level (OUF (OUF) flags fl ags Input parameters FU32 Master address (1 t o 4) Output utp ut parame parameters ters FU32 = -1 OK = 1 Mast Mast er address address invalid invali d = 10 Master Master not found FU33 St atus atu s flags fl ags For the t he significance significance of the t he individual indivi dual bits, bi ts, plea pl ease se refer refer to t o the t he AS ASi master master document documentaation. ti on. If hard error reac r eacttion io n has been swit switched ched off wit wi th the ASi ASi module, modul e, the user can can use ASI_St I_St at to to interroga int errogate te the t he Config Config OKflag fl ag of the individual i ndividual master master and derive deri ve the desired reacti reaction on to t o the t he error from the result result..
FST Version 4.02.21 Manual
147
AS-I_Para
Transfer a parameter to t o an AS ASi slave sl ave at at runt r untime ime Input parameters parameters FU32 Master address (1 t o 4) FU33 Sl ave address (1 t o 31) FU34 Parameter aramet er value valu e (0 t o $0F) Output ut put parameters paramet ers FU32 = -1 OK = 1 Master Master address address invalid invali d = 2 Slave address address invalid invali d = 3 Parameter arameter value invalid invali d = 10 Master Master not found = 11 Master Master time ti meout out FU33 Error rror code
Overview of possibl po ssiblee error codes: HFUN HFUN_OK _OK 0x00 0x00 Execut Executiion successful successful HFUN HFUN_NO _NOK K 0x01 0x01 Executi xecut ion not successful successful HFUN HFUN_S _SNA NA 0x02 0x02 Slave Slave not not i n LAS LAS HFUN_MOF MOFF 0x0C 0x0C Mas Master ter is off offline line MAS-IBUS MAS-IBUSY 0xFD Master Mast er not ready read y HOST HOSTTO TOUT UT 0xF 0xFE Master Mast er t imeout meout Note: If the slave is not found, f ound, error erro r code 0x02 0x02 is returned ret urned (Slave not in LAS LAS). ASI_Res
Rest est art cyclical cyclical update updat e (including error monitor monitoring) ing) followi fol lowing ng a runtime error (slave (slave failure) failur e) Input paramet parameters None Output ut put parameters paramet ers FU32 = -1 OK = 0 Driver not loaded loaded Note: The ASI_R ASI_Res es module can only onl y be used wit wi t h the t he AS ASi driver. dri ver. 4.4
Festo Fi eldbus el dbus Master Mast er
Version Version 2.22 The fieldbus allows you to link l ink up distant di stant I/ O modules (plant (plant -floor -fl oor units) unit s) with your IPC-PS -PS1 to form for m a system system network. network . Communicati Communication on between the modules modul es and and the t he IPC IPCis controll contr olled ed by t he PS PS1-CP 1-CP61 fieldbus fi eldbus module. modul e. This This module modul e has a fieldbus fi eldbus inte i nterf rface ace to which whi ch you can conconnect up to 31 partici part icipants, pants, when using repea repeater ter technology t echnology up to 99. Addi Addittional FS FST operands are are avail available able for cyclical cyclical inputs i nputs and outputs out puts of the participants. part icipants. Modules can can be used t o interrogat int errogatee statuses statu ses and execute execute a-cycli a-cyclicc commands. commands. 4.4.1 Set Festo fieldbu fi eldbuss parameters If you want to use the FE FESTO fieldbu fi eldbuss in a project, proj ect, you must enter ent er and parameteri parameterise se the FESTO STOBUS BUS driver dri ver in i n the t he confi conf igurer. gurer . Destination estinat ion Drive:
Enter here the target drive for the Festo fieldbus driver IPCFB22.EXE. CP61 switch setting:
Enter the t he switch position posit ion here which you have set set on the t he rear rear of your fieldbus fi eldbus module (PS (PS1CP61). Interrupt number: number:
Enter the t he number number of the t he interrupt that the fieldbus fi eldbus module is allowed to use for communicacommunication wit wi t h the t he CP CPU. Check Check which interrupt int erruptss have already been assigned assigned for other ot her modules. modul es. FST Version 4.02.21 Manual
148
fieldbus fieldb us baud baud rate:
Here Here you can can specify specify the t he baud rate for data transmission t ransmission on the fieldbus. fi eldbus. The permissibl permissi blee values are 375, 187.5, 62.5 and 31.25 kilobaud. kil obaud. Highest station stat ion address:
Enter nter here the highest partici part icipant pant number you are using. The The permissible permissibl e range range is 1..99. Soft error behaviour:
Enter nter here if you want to use the soft error behaviour. behavi our. Valid Vali d entries entr ies are Yes Yes and and No. Use nominal configuration:
Enter here if you want t o use the nominal configuration. configurat ion. Valid entri ent ries es are are Yes Yes and and No. 4.4.2 Soft error behaviour behaviour Programmers rogrammers can can choose between two options opt ions for the response response to configurati confi guration on problems probl ems during start-up: The default default is the t he " hard" error response response.. In the event event of errors er rors during start-up, neither Program 0 nor the t he error program is start started. ed. Optionally, pti onally, " soft" error response response can can be selec selected. ted. . In the t he even eventt of errors during star star-t -tup, up, the t he response response is as for other errors, that is, i s, sett setting ing of the t he error error word, and project stop or error program executi execution. on. The desired desired error res r esponse ponse can can be set set in i n the t he configurat configuration ion dialog di alog for the t he fieldbus fi eldbus (see (see above). above). Hard Hard error response response is the default sett setting. ing. 4.4.3 Using the nominal confi configuration guration Alterna lt ernatitively, vely, the programmer programmer can can define the t he slave list to t he FB FB master master in i n the t he form of a nominal configurati configuration. on. If a configured configured participant is i s not not found f ound during start-up, start -up, normal error handling for trans t ransmission mission errors result. result. The missing missing participant parti cipant can can then join joi n the fieldbus fi eldbus at a later stage wit without hout reinitialisa reiniti alisatition on of the bus. Please note that t hat only onl y those participants parti cipants can can be entered that are also also used in one of t he loaded programs. programs. It is imma i mmatt erial whether the t he program is ever ever executed executed or not. not . The individual participants parti cipants must must be used used with their t heir full ful l scope of I/ Os, as as otherwise the participant parti cipant is i s not addressed. addressed. If the t he user user reinit reini tialises ial ises with wit h CF CFM48,1 or CI, CI, the t he Actual Actual configur conf igurati ation on is used as as usual. usual. 4.4.4 The Festo fieldbu fi eldbuss configurer configur er The planning and and control instrume instr ument nt for program gene generati ration on is t he fieldbus configurer. Y You ou use this thi s to define the (nominal) (nominal) configuration configurati on of the filedbus fil edbus.. You can then: Print out the t he configurati configuration on data that you have entered entered and conne connect ct tthe he parti par ticipan cipants ts with wi th the aid of the list Compare the actual actual and nominal configurations configurati ons in order to correct correct connec connectition on errors. You use the fieldbus fi eldbus confi configurer gurer to create the nominal configuration configurati on of the t he fieldbus. fieldbu s. You You should do this t his before you enter the alloca all ocatition on list li st (and the t he programs programs)) so that you can can immediately diat ely assign assign symbolic identifi identi fiers ers to the t he operands operands that are created. created. Note! As part of the syntax test carried out on the t he programs programs there is a check check as to whether the t he fieldbus fi eldbus operands that have been been entered have a correspondi corresponding ng ent entry ry in the t he fieldbus fiel dbus conconfiguration. In the t he following foll owing the fieldbus I/ O modules are referred to as participants. parti cipants.
FST Version 4.02.21 Manual
149
Calling alli ng the fieldbus fi eldbus confi configurer: gurer: The FE FESTO STO Fieldbus eldbus confi conf igurer is configur confi gured ed as an ex external ternal tool t ool , and can can be act act ivated ivat ed in the t he Extras xtras menu. Selecting electi ng the type: If you have not yet created created a fieldbus fi eldbus configuration configurati on in the t he project, you must use Edit Edit >Type >Type actual actual.. from f rom the t he menu. menu. A window appears appears showing you the types t ypes that are available fr from om Festo. Here you you can select the t he types that th at are to be b e used used in your proj p roject ect for example by doubleclicking on them t hem with wit h the mouse. mouse. Figure 1: Defi Defining ning fieldbus fi eldbus participant parti cipant types t ypes
Note! If you remove a type from the project-s project -spec pecifific ic type t ype file fil e for which there t here is already already an entry entry in in the configuration, configurati on, tthe he designation designation Unknown Unknown type t ype will wil l subsequentl subsequentlyy appear appear in the t he configurer configurer instead of the type. t ype. You You should delete any such such entries entri es..
FST Version 4.02.21 Manual
150 150
Edit confi configuration guration Once you have completed completed type t ype selection selection for your current current project you can enter enter the t he participartic ipants by selecti selecting ng Edi Editt >Confi >Configu gurati ration on from the t he menu. menu. After ft er select selecting ing Insert from f rom the the local menu a window windo w appears appears where you confi configure gure the participant: Figure 2: Configuring onfiguri ng fieldbus fi eldbus participant parti cipant
Enter the t he participant’s participant’ s number number and type that t hat you want to t o insert. The permissible permissible entries entri es are explained explained in the t he table below: Abbr. Meaning Meaning
Permissibl ermissi blee entry ent ry
PA
1 t o 99
Partici art icipant pant number
Type Type of participant parti cipant
The fieldbus fi eldbus partici part icipants pants stored in the type file fi le are offere off eredd for selecti selection on in a window.
IW
Number umber of input units
It is only possible to specify specify the input units in the case case of types where the number of inputs input s may may vary vary (1 to 16).
OW
Number Number of output units
It is only possible possibl e t o specif specifyy the output unit unitss in the case case of types where the number number of outputs out puts may vary (1 to 16). Conclude your entri ent ries es by pressing pressing the t he OK OK butt but t on. The fieldbus participant parti cipant is inse i nsert rted ed in the t he configurati configuration on file fi le in ascending ascending order order accordi according ng to the participant parti cipant number. A mess message age in the t he messa message ge shows the time ti me in which whi ch the controller control ler forwards I/ O information informati on to the filedbus fil edbus peripherals. Modify: Highlight ighli ght the t he part participant icipant that t hat you want want to t o modify, and acti activate vate the Modif Modifyy functi function on by doubleclicking or selecting Modify Modif y from the t he local local menu. As As in the t he cas casee of Insert, a window apa ppears pears similar t o that t hat in i n Figure Figure 2. The The entr entries ies can can then be overwritten. overwritt en. Delete: You can delet deletee a filedbus fil edbus part participant icipant by selecti selecting ng delete from the t he local menu. Test functions functi ons In order to t o ensure ensure proper operati operation on on the filedbus, fi ledbus, on the one hand hand various tests are carried ri ed out by the IPC IPCrun-time run-t ime system system while whil e on the other ot her hand hand the t he fieldbus configurer also offers a test test option. FST Version 4.02.21 Manual
151 151
When a project is i s started, the t he run- time t ime system system detects the actual actual confi configuration guration and compares it with wit h the nominal nominal configuration. configurati on. If the nominal nominal configuration configurati on is not a subset subset of the t he actual actual configuration, configurati on, an error is reported. report ed. The Compa Compare re nominal/ nominal/ actual actual function supports support s the testing testi ng of the t he configurati configuration on data from t he PC PC. To be able to t o execut executee this thi s function, funct ion, your PCmust be connect connect ed to t o the t he IPC IPCin t he proper way. Compare nominal/ actual: When you you acti activate vate this thi s function from f rom the local menu the actual actual confi configuration guration is i s read read from the IPC IPCand is compared with wit h the the nominal configurat confi guration ion that t hat was drawn up on the th e PC PC. If the t he configurati confi gurations ons are are identical, ident ical, a message message appears appears in the t he messag messagee line. li ne. If discrepa di screpancies ncies occur occur during the t he compa comparison, rison, the t he following foll owing window appears appears aft after er you activate activate this t his function. functi on. Figure igure 3: Nominal and actual comparison
You are shown shown the number of deviations deviat ions between bet ween t he nominal nominal configur conf iguration ation and the t he act act ual configuration. If there t here is no nominal nominal confi configuration guration file fi le in the project direc di rectory, tory, the t he actual actual configuration t hat is read from fro m the IPC IPCis stored stored as the nominal confi configurat guration. ion. The file fil e cont contains ains no comments, comments, however, so these detail detailss need need to t o be added. added. This function functi on can can be used used for init i nitial ial creation creation of the configuration configurati on file. fi le. The The precond precondii tion ti on for this, thi s, however, however, is that the t he fieldbus and all all participants parti cipants are avail available. able. Print fieldbus fi eldbus configurati configuration on Selecti electing ng File il e >Print >Print from the menu menu or pressing pressing
prints print s the confi configuration. guration.
4.4.5 Programming fieldbus fi eldbus operands fieldbus fi eldbus inputs input s and and outputs out puts can be addres addresse sedd with wit h the t he following foll owing syntax in Ladde Ladderr diag di agram ram or Statement Statement list l ist programs: programs: Inputs (bits): Ip.w.b Ip.w.b Outputs utpu ts (bits): (bit s): Op.w.b Input words: Output ut put words:
IWp.w IWp.w OWp.w
p = participant participant number number w = word number b = bit numbe numberr The word number is assigned assigned from 0 onwards onwards for each partici part icipant, pant, separately separatel y for input inp utss and and output out puts. s. F For or example, example, if you use the fieldbus fi eldbus module I/ O extens extension ion 405 with wi th 3 input cards cards and 2 output cards cards (1 word each) each) as participant 5, the t he following foll owing operands operands are created: created:
FST Version 4.02.21 Manual
152 152
I5.0.0 to I5.2.15 but also O5.0.0 5.0. 0 t o O5.1.15 5.1.15
and
IW5.0 IW 5.0 to IW IW5.2, 5.2,
and
OW5.0 t o OW5.1.
Most fieldbus fi eldbus modules occupy occupy only only one word; this thi s is then word 0. In the printout print out of the t he filedbus configurati configuration on you you will wil l find fi nd an an aid to addressing addressing for each each participant. 4.4.6 Function uncti on blocks bl ocks Overview F40 Configuration onfigurati on of a fieldbus fi eldbus participant. parti cipant. F41 Read parameter paramet er field fi eld.. F42 Writ ri t e parameter field. fi eld. F43 Reset eset all cycli cyclica call output out putss on the filedbus. fi ledbus. F44 Status tat us interroga int errogatition on for a fieldbus fi eldbus participant. parti cipant. F47 Set error handling. handli ng. F48 General eneral configurati configur ation. on. F40
Configuration onfigurati on of a fieldbus participant. parti cipant. Input parameters FU32 fieldbus fi eldbus participant parti cipant number, number, 1 t o 99 Output parame parameters ters FU32 = -1 Nominal Nominal and actual data agree =0 Nominal and actual actual data differ dif fer FU33 Participant: arti cipant: act act ual t ype FU34 Participant: arti cipant: number number of inputs input s in bytes FU35 Participant: arti cipant: number number of outputs output s in bytes If you are using the nominal configuration confi guration (see Sec Sectition on 1.2) nominal and actual actual data will wil l always agree agree by defi definit nition. ion. F41
Read ead parame parameter ter field fi eld of an an “int “ intelli elligen gent” t” participant. parti cipant. Input parameters FU32 fieldbus fi eldbus participant parti cipant number, number, 1 to 99 FU33 Address of the partici part icipant pant word, 0 t o 255 Output parame parameters ters FU32 = -1 Command successfu successfullly processe processedd =0 Error, fieldbus fi eldbus participant parti cipant not responding responding FU33 Participant arti cipant status stat us FU34 Partici art icipant pant word of address FU35 Partici art icipant pant word of address address + 1 FU36 Partici art icipant pant word of address address + 2 FU37 Partici art icipant pant word of address address + 3 For a descript description ion of the participant part icipant status see F44. F44. F42
Write rit e param parameter eter field of an “intelli “ intellige gent” nt” participant. participant. Input parameters FU32 fieldbus fi eldbus participant parti cipant number, number, 1 to 99 FU33 Number Number of word parameters, 1 t o 4 FST Version 4.02.21 Manual
153 153
FU34 Address of partici part icipant pant word, 0 t o 255 FU35 Partici art icipant pant word for address FU36 Partici art icipant pant word for address address + 1 FU37 Partici art icipant pant word for address address + 2 FU38 Partici art icipant pant word for address address + 3 Output parame parameters ters FU32 = -1 Command successfull successful ly processe processedd = 0 Error, fieldbus fi eldbus participan parti cipantt not responding responding FU33 Participant arti cipant status stat us For a descript description ion of the participant part icipant status see F44. F44. F43
Reset eset all al l cyclical output out puts. s. Input parameters parameters None Output ut put paramet parameters None F44
Status tat us interroga int errogatition on for a participant. parti cipant. Input parameters FU32 <>0 Number of the partici part icipant pant =0 Reset eset all error entries Output parame parameters ters FU32 St atus of t he partici part icipant pant FU33 number of short-t short- t erm errors error s FU34 number of long-t long -term erm errors FU35 t otal ot al error count FU36 Partici art icipant pant address for last error The status (FU (FU32) contains the t he following fol lowing information: i nformation: Bit 7 = 1 ASC ASCII data present Bit 6 error error bits Bit 5 (see (see manual manual of filed fi led bus participant) parti cipant) Bit 4 . Bit 3 . Bit 2 . Bit 1 . Bit 0 = 0 a-cyc a-cyclilicc participant =1 cycli cyclicc participant parti cipant The number number of short -term -t erm error errorss is incremented in case case of cycli cyclicc communicati communication on error (no response, response, checksum checksum error error etc.). The The maximum maximum value is i s 255. It will wil l be reset reset to 0 after aft er sucsuccessful cessful cyclic cycli c communicati communication on Checking for broken communication communicati on can be done by using F44 F44 and then t hen testi t esting ng for FU33 > some value The The number of long term t erm errors is incremented if communication communicati on had error (short term <>0) and communicat communicatio ionn is restored rest ored The total tot al error count is increme i ncrement nted ed in case case of cycli cyclicc communicati communication on error (no response, response, checksum error etc.) F47
Status interrogation for a participant (FU32=1). Set exception handling programs (FU32=1). Input parameters FU32 = 1 Except xception ion handling handli ng program assignment assignment FU33 Bit0 Bit 0 = 1 FU34 has the program program number Bit1 Bit 1 = 1 FU35 FU35 has the program number number FST Version 4.02.21 Manual
154 154
Bit2 Bit 2 = 1 FU FU36 has the program number FU34 Program number for transmission errors FU35 Program number for errors in a field fi eld bus partici part icipant pant FU36 Program number for AS ASCII dat dat a with wit h field fi eld bus partici part icipant pant Output parame parameters ters None All programs must always be given. given. If a non-existent non-existent or inva i nvalilidd program is given or if the bit bi t is deleted in i n the mask, the program is deactivated deactivated for f or event event handling. handli ng. Example: THEN CFM47 WITH V1 WITH V3 WITH V3 WITH V17 WITH V0 In the t he event event of a transmission t ransmission error (such as cable break), Program Program 3 is set set. If a partici part icipant pant error occurs (such (such as short-circuit short-circuit at participant part icipant output), output ), Program Program 17 is started. If a response response t o an a-cycli a-cyclicc comman commandd arrives arri ves (such (such as the participant parti cipant is holdi hol ding ng an AS ASCII file fi le ready), re ady), no program is started. The act act ivated ivat ed programs are exec execut uted ed in the t he normal sequence sequence (that is, by increa i ncreasing sing program number). number). Foll Following owing complet completion ion of handling, they t hey should should deacti deactivate vate themse themselves lves in order or der to to allow all ow themselves to be call called ed again. again. Input parameters FU32 = 2 Status tat us interroga int errogatition on Output parame parameters ters FU32 Always Always 0 FU33 St atus of t he partici part icipant pant FU34 Value of short-t short- term error FU35 Value alu e of long-term error FU36 Total ot al number of errors error s FU37 fieldbus fi eldbus address address of the participant parti cipant with wit h last error error F48
Register actual actual confi configuration guration and status st atus or use nominal nominal confi configuration. guration. Input parameters FU32 = 1 Configuration onfigurat ion acquisi acquisitition on =2 Status interrogati interrogation on after configuration configuration acquisiti acquisition on =3 use nominal confi configuration guration Output ut put parameters if FU32 FU32 = 1 FU32 = -1 Configuration onfigurat ion acquisi acquisitition on running Output parameter parameter if FU32 = 2: FU32 = 1 Configuration onfigurat ion acquisi acquisitition on running =2 Actual ctual configura configuratition on = nominal nominal configura configuratition on =3 Actual configuration configurati on <>nominal configuration configurati on =4 No configuration configurati on avail available able Output ut put parameters if FU32 = 3 None All fieldbus f ieldbus outputs output s are are deleted deleted prior to t o configurati configuration on acquisit acquisition. ion. fieldbus fi eldbus inputs are not updated for a period of up to t o several several seconds. seconds. The use of the t he function functi on with wit h FU FU= 2 does not make sense. sense. When When a partici part icipant pant list l ist is given gi ven (see Secti ection on 1.2) actual actual and nominal nominal data of this t his option opti on match match by definition. definit ion. FST Version 4.02.21 Manual
155 155
Example program for F48: STEP 1 THEN THEN CFM 48 WITH ITH K1 STEP 2 THEN CFM 48 WITH ITH K2 IF FU32 <>K1 THEN NOP
" Configurat onfi guration ion acquisition acquisit ion
" St atus interrogati int errogation on
STEP 3 IF FU32 <>K2 THEN ... 4.4.7 4.4 .7 CI commands The Festo Festo fieldbu fi eldbuss has has the driver driver number 0. For For histor hi storical ical reasons, " !0" can be ent entered ered instea insteadd of of " $" . !0FA !0F A Assign nominal configurat confi guratio ionn !0FC !0F C Display ispl ay partici part icipant pant number !0FII !0F Reinitiali einit ialisa satt ion (acquisit (acquisition ion of actual actual confi configuration) guration) Respons esponsee " = 1" for succe success ss,, else " = 0" . !0FN !0F N Cyclic display displ ay of partici part icipant pant Displays the definit defi nition ion of one part participant icipant per cycle. cycle. Output comprises comprises participan parti cipantt number, number, type number, number, number number of output bits bit s and and number number of input bits. bi ts. !0FR !0F R Start/ tart / conti continue nue cyclic cyclic transfer of data !0FS !0F S St op cycli cyclicc t ransfer of data 4.4.8 Error numbers No 14
60
4.5
Meaning Meaning of error Criti ri tica call driver error. Projec roj ectt cannot cannot be started st arted even with “ soft” errors rrors Actual configuration configurati on is not a superse supersett of tthe he nominal nominal configuration
Notes on elimination elimi nation This error occurs occurs if the fiel fi elddbus driver was not not found or problems occur occur starting starti ng the firmware fi rmware of t he CP CP 61 Correct fiel f ieldbus dbus configurati configuration on or connect connect missing participant part icipant
Festo Fi eldbus el dbus Slave
This package all allows ows you to t o operate operat e the IPCas an an intell int elligent igent slave in a Festo Festo fiel f ieldbus. dbus. 4.5.1 Selecting electi ng t he driver dri ver and assigni assigning ng paramet parameters If you want w ant to t o use the IPC IPCto become a fieldbus fieldbus slave, you must must enter ent er and parameterise parameteri se the FBSL BSLAVEdriver dri ver in the configurer. configur er. The followi fol lowing ng entries entri es are required: Desti estination nation Drive: Enter nter here here the t he target t arget drive dri ve for for the t he Festo Festo CP61 fif irmware FBS FBSLA LAVE VE.BIN. .BIN. CP61 switch swit ch setting: sett ing: FST Version 4.02.21 Manual
156 156
Enter the t he switch swit ch position positi on here, here, which you have set set on the rear of your fieldbus f ieldbus module (CP61). 4.5.2 4.5.2 How t o use t he module module FBSLA BSLAVE VE Import t he FBS FBSLLAVE AVEfile fi le into i nto your FS FST-IPCprojec proj ectt . In t he followi fol lowing ng examples examples I will wil l assume assume t hat it i t was imported as a program module module with wi th number number 0 (CMP (CMP 0). Initialisa Initi alisatition/ on/ configura configuratition on First the firmware f irmware must must know things thi ngs like fieldbus fi eldbus address, address, baud rate etc. Input parameters FU32 1 = Initiali Init ialisa satition/ on/ confi configura guratition on FU33 Switch wit ch setting sett ing of CP61 (4..7) FU34 Baud rate rat e (0..3) (0..3) 0 = 31.25 31.25 Kbit/ Kbit/ s 1 = 62.5 62.5 Kbit/ Kbit/ s 2 = 187.5 187.5 Kbit/ Kbit/ s 3 = 375 KBit/ KBit/ s FU35 Participant arti cipant number (slave address) (1..99) (1.. 99) FU36 Output ut put bytes byt es (0..24) (0..24 ) or words (0..12) FU37 Input bytes (0..24) or words (0..12) FU38 1 = Byte oriented ori ented 2 = Word oriented Output parame parameters ters None Repeated init i nitial ialisi ising ng has no effect, only after aft er reloading rel oading the t he binary binary code (FBS (FBSLLAVE.BIN) .BIN) can t he CP CP61 be reconfigur r econfigured. ed. You You need to t o reboot the IPC IPCt o do so. If inputs i nputs and outputs output s are mentioned mentioned I will wi ll use them as as seen seen from the slave’s perspective. perspective. So So i f in i n this thi s documen documentt I use the word input, it means means input as seen seen by the slave and output as seen by the t he mast mast er. Example: IF NOP THEN THEN CMP 0 ' FBSLAVE FBSLAVE WITH ITH V1 " Initial Init ialise ise WITH ITH V4 " Swit wi t ch setting sett ing CP61 WITH ITH V3 " Baud Baud rate (3=375 (3= 375 Kbit/ bit / s) WITH ITH V1 " Partici art icipant pant number ( slave address ) WITH ITH V24 " Inputs Input s WITH ITH V24 " Output ut putss WITH ITH V1 " Byte oriented ori ented From the t he master master this t his slave will wil l be b e seen seen as follows: fol lows: PA 1
Type IW FB-IP B-IPC(byte) (byt e) 24
OW 24
Example: IF NOP THEN THEN CMP 0 ' FBSLAVE WITH ITH V1 " Initiali Init ialise se WITH ITH V4 " Swit wi t ch setting sett ing CP61 FST Version 4.02.21 Manual
157 157
WITH ITH WITH ITH WITH ITH WITH ITH WITH ITH
V3 V1 V8 V12 V2
" Baud Baud rate (3=375 (3= 375 Kbit/ bit / s) " Partici art icipant pant number ( slave address ) " Inputs Input s " Output ut putss " Byte oriented ori ented
From the t he master master this t his slave will wil l be b e seen seen as follows: fol lows: PA Type IW OW 1 FB-IP B-IPC(word) (word) 8 12 4.5.3 Cyclic ycli c updates updat es The input and output data of the t he IPC IPCfieldbus fi eldbus slave are are kept kept in a flag f lag word area defined by the user. The The cont cont ents of thes t hesee flags fl ags can can be read read to t o and from inputs i nputs and outputs out puts or processed elsewhere wit wi t h the t he help of an STL STL or LDR LDR program. program. To read/writ read/ writee the data that is cycli cyclica callllyy updated to the t he mas master ter we use a range of flag fl agwords, words, which are read from/ fr om/ copied to t o the the dual port por t ed RA RAM of the t he CP CP61 by calling call ing CF CFMxx as as follows: fol lows: Input parameters parameters FU32 2 = Cyclic update updat e FU33 1st flag fl agword word for outputs output s FU34 1st flag fl agwords words for inputs input s Output ut put paramet parameters None Example: IF THEN THEN CMP 0 WITH ITH WITH ITH WITH ITH
NOP ' FBSLAVE FBSLAVE V2 " Cyclic ycli c update updat e V10 " 1st flag fl ag word for output out putss V20 " 1st flag fl ag word for inputs input s
4.5.4 Get status stat us The communicat communication ion status stat us can be request requested by calling call ing CMP CMPxx xx as as follows: fol lows: Input parameters FU32 0 = get status stat us Output parame parameters ters FU32 status The status statu s is returned ret urned into int o FU FU32, and has the followi fol lowing ng meaning: meaning: bit bi t 0 reserved reserved can can be 0 or 1 bit bi t 1 reserved reserved can can be 0 or 1 bit bi t 2 1 if there is no cyclic cyclic communica communicatition on with wit h a fieldbus fi eldbus master master bit bi t 3 1 if there is cyclic cyclic communica communicatition on to a fieldbus fi eldbus master master bit 4 reserved reserved can can be 0 or 1 bit bi t 5 reserved reserved can can be 0 or 1 bit bi t 6 reserved reserved can can be 0 or 1 bit bi t 7 reserved reserved can can be 0 or 1 bit bi t 8 - 15 reserved reserved always 0 4.5.5 A-cyc A-cyclilicc updates updat es It is possible possibl e to access access a data field fi eld of 256 words. To To write wri te a value to a parameter parameter you would use the following: Input parameters FU32 3 = writ wri t e parameter FU33 parameter field fi eld number number FU34 paramet parameter field fi eld value Output utp ut parame parameters ters FST Version 4.02.21 Manual
158 158
None To read the t he parameter: Input parameters FU32 4 = read parameter FU33 parameter field fi eld number Output utp ut parame parameters ters FU32 paramet parameter field fi eld value 4.5.6 Sample program " " Example xample program for Fes Festo to fieldbus fi eldbus Slave Slave STEP init IF NOP THEN HEN CFM 62 WITH ITH V1 WITH V$D400 V$D400 WITH ITH V3 WITH ITH V1 WITH ITH V24 WITH ITH V24 WITH ITH V1 STEP loop IF NOP THE THEN LOAD LOAD IW1 TO FW9000 IF THEN HEN CFM 62 WITH ITH WITH ITH WITH ITH IF THEN HEN LOAD TO IF THEN THEN JMP TO TO loop 4.6
NOP V2 V9000 V9100
" fieldbu fi eldbuss slave module modul e " Initiali Init ialise se " Base address CP61 module modul e " Baud rate rat e (3=375 (3= 375 Kb) " Sl ave address " Output ut put bytes " Input bytes byt es " Byte oriented ori ented " Some input nput s " fieldbus fi eldbus output out put byte 0 " field fi eldbus bus slave modul module " Cyclic ycli c update updat e info inf o " fieldbus fi eldbus outputs outpu ts start at FW9000 " fieldbus fi eldbus inputs input s start at FW9100
NOP FW9100 " fieldb fi eldbus us i nput byte byt e 0 OW1 OW1 " LEDs LEDs on AS14 AS14 NOP
Profi Prof i bus DP(CP62) (CP62)
Wi t h thi t hiss driver dri ver and the t he CP CP62 module modul e you can connect connect Prof Profib ibus us DPslaves to the t he IPC IPCand to use them t hem wit wi t h the t he FS FST IPC IPC. Note! Before you can use the CP CP62 module modul e it must be configured confi gured using usi ng the SyCon SyCon configuraconfi guration ti on software soft ware from the company company Hil Hilsc scher. her. The inputs/ outputs output s of the modules modules are are copied copied cyclically cyclically to t o the local local function functi on units (inputs, (input s, outputs output s or flag fl ag words) words) configured configured by the t he user. user. 4.6.1 Selecting electi ng t he driver dri ver and assigni assigning ng paramet parameters If you want t o use the t he Prof Profibu ibuss DP DP driver dri ver in an FS FST IPC IPCproject proj ect you must enter the t he PD PDP driver dri ver in the t he driver configurer confi gurer and assign assign the t he neces necessary sary parameters. parameters. Note! The driver dri ver uses the t he same driver number as PRO PROFI -DP for for CP CP60. It I t can not be used together in i n the t he same same project. project. FST Version 4.02.21 Manual
159 159
Desti estination nation drive:
Specify the IPC IPCdrive dri ve on which whi ch tthe he Prof Profib ibus us DPdriver dri ver PDP PDP.E .EX XE is located l ocated or onto ont o which whi ch it is t o be loaded. loaded. CP62 swit ch position: posit ion:
Enter the t he address switch swit ch position posit ion of t he CP CP62 module modul e here. DR-R DR -RAM AM si size:
This hi s can can be either eit her 2 or 8. Use FW as IW:
If you select " Y" then the t he process process data data will wi ll be copied into FWs instead of IWs. IWs. Use FW as OW:
If you select " Y" then the t he process process data data will wi ll be copied into FWs instead of OWs. OWs. Offset for Inputs:
Enter nter the the index where the input inpu t area of the t he process process data starts. start s. Offset for f or Outputs: Output s:
Enter the t he index where where the t he output area of the process data data starts. st arts. 4.6.2 Configuration Before you can use t he CP CP62 module modul e it must be b e configured configur ed using the t he SyC SyCon on configurati confi guration on software soft ware from the company Hilscher. For DP-Master, DP-Master, followi fol lowing ng Parame Parametters should be used: Start up behaviour: behaviour: • ut omatt ic release of communicat communicat ion by the t he system system after aft er system system in i ni tialised. ti alised. ο Automa Watchdog time: t ime: • ο 300ms • Addressing mode: Word address (Important!) ο Process Data exchange: ο Buffered, program control controlled led data trans t ransfer fer Error reaction: reaction " Hard" or " Soft" oft " (e.g.: part participant icipant missing or non non-con -confifigure guredd ο The error reaction participant partici pant on the t he bus) depends depends on the BusBus- Para Parame meter ter setting sett ing " Auto Clear" . " Auto Clear Clear On" On" := Hard reaction. reaction. 4.6.3 Error rro r messag messages es from the th e driver dri ver The driver enters ent ers the followi fol lowing ng error numbers in the t he FP FPCerror word: wor d: No Meaning Meaning of the error Pointer oint er t o error correcti correction on 1001 There is no communication communicati on Probable robable cause: between driver and Profibus - Card Card address is not t he same card with drive dri verr configur configuration ation - No No vali validd configurati configuration on in the card system configuration (SyCon) 1004 Configures onfi gures Slave not in t he Only for f or hard reaction Bus 1005 Input range exceeding exceeding 1006 Output ut put range exceeding exceeding
FST Version 4.02.21 Manual
160 160
4.6.4 Modules Overview DP_U DP_US SIF DP_GE _GETSL DP_G DP_GE ETDG DP_CONTR
Get t he current curr ent USIF USIF stat st atus us Checks whether whet her a diagnost di agnostiic request requ est is present present Obtains bt ains diagnost di agnostiic info informat rmatio ionn from from a DPslave Profi rof ibus funct functiion " Global Control ont rol Request" equest "
DP_USIF
The Use Userr Interfac Int erfacee status cannot be edit edited; ed; iti t will wil l give back back the t he actual actual status. The module operates in i n conjunction conjuncti on with wit h the t he DP DP driver dri ver (PD (PDP). Input paramet parameters
None
Output ut put parameters paramet ers
FU32 = -1 OK = 0 driver not loaded loaded FU33 Current urr ent stat status us or 0 = system system not not correctl correctlyy initialised initi alised
DP_GETSL
Checks whet whet her a diagnostic diagnosti c request is prese pr esent nt.. Input paramet parameters None Output ut put parameters paramet ers FU32 = -1 OK = 0 driver not loaded loaded FU33 address address of first fi rst participant parti cipant with wit h diagnosti diagnosticc requi requi sition sit ion or $FFFF = no request present FU34 address of first fi rst missing partici part icipant pant DP_GETDG
Request diagnosti di agnosticc informati infor mation on from a DP DP slave. This This should shoul d be used used in conjunction conjunct ion wit wi t h the DP_GETSL module. Input paramet parameters FU32 Address of t he slave (0 t o 126) FU33 Offset in diagnosti diagnosticc information informati on FU34 Group roup select sel ect Output ut put parameters paramet ers FU32 = -1 OK = 0 driver not loaded loaded = 1 slave address address invalid invali d FU33 Profib rof ibus us status stat us of t he operation operati on FU34 Length of diagnos di agnosttic informati inf ormation on in bytes byt es (not incl. length byte) FU35-38 The The diagnosti diagnosticc informati infor mation on in consecutive consecuti ve Order Profibus rofi bus status of the t he operati operation, on, typica typi call values: 00 OK C3 Partner art ner not responding 04 No parallel parall el master-slave function functi on possible Will il l give back back max. max. 4 Words of diagnosti diagnosticc information informati on for every every call. FST Version 4.02.21 Manual
161 161
Note! The The module call must be repeated as many times ti mes as necessary necessary until unti l the t he valu valuee 0 is returned in i n FE FE33. The The other values are not valid until unti l t his is i s the t he case case.. DP_CONTR
Profibus rofi bus function " Global Control Control Request" equest" . Input parameters parameters FU32 Slave address addr ess or 127 = all slaves slaves (broadcas (broadcast) t) FU33 Control ont rol command FU34 Group roup select sel ect Output ut put parameters paramet ers FU32 = -1 OK = 0 driver not loaded loaded FU33 Profib rof ibus us status stat us of t he operation operati on All transfer parameters in i n BYT BYTEformat. for mat. Profibus rofi bus status of the t he operati operation, on, typica typi call values: 00 OK C3 Partner art ner not responding 04 No parallel parall el master-slave function functi on possible Note! The The module call must be repeated as many times ti mes as nece necessary ssary until unti l the t he valu valuee 0 is returned in i n FE FE33. The The other values are not valid until unti l t his is i s the t he case case.. 4.7
Profi Prof i bus FMS (CP (CP62)
With it h thi t hiss driver dri ver you can operate the t he Festo Festo IP I PCin a Prof Profib ibus us F FMS MS net network using the t he CP CP62 module modul e of the t he IPC IPCproduct range. Note! Before you can use the CP CP62 module modul e it must be b e configured configur ed using the t he SyC SyCon on configuraconfi guration ti on software from the t he company company Hil Hilsc scher. her. There are no external confi configurati guration on files. fi les. The bus parameters, parameters, Communicati Communication on Reference Reference List and Obj Object ect Directory Director y must be configured confi gured through t hrough SyCon. SyCon. 4.7.1 Configuri onfi guring ng t he driver dri ver and assigning parameters If you want want t o use the t he Prof Profiibus FMS FMS driver driver in i n a FST FSTIPCproj pro ject, you must enter ent er the t he PR PROFIFMS IFMS driver dri ver in the t he driver configurer confi gurer and assign assign the t he necess necessary ary paramet parameters. Destination drive: Specif Specifyy the t he drive dri ve on which whi ch the the Prof Profib ibus us FMS FMS driver dri ver PRO PROFIFMS.E IFMS.EX XE is located l ocated or or onto ont o which whi ch it is to t o be loaded. loaded. CP62 switch position: Enter the switch swit ch position posit ion as set set on the t he CP CP62 module. modul e. The The default defaul t of CA CA means means that t he CP CP62 modul module uses a base memory segment of CA00h CA00h Note! Make sure that the memory memory used by the t he CP CP62 is not in use by other ot her modules. modul es. 4.7. 4.7.22 Extend xt ended ed CI commands commands for PROFIFMS IFMS This driver dri ver ext extends the IPC IPCcommand command interpret int erpreter er with wit h the t he followi fol lowing ng commands: commands: !39 Display driver identifi identi fica catition on and version version number number Display driver dri ver info and version number. number. This information informati on will wil l also be displayed if an ununknown command command is i s entered (for (f or example !39?). !39?). 4.7.3 Function uncti on modules modul es Overview FMSRE MSREAD Read (pol (pollled response) response) FST Version 4.02.21 Manual
162 162
FMSWR MSWRIT
Writ ri t e (pol (polled response) response)
FMSREAD
Read (polled (pol led response) Input parameters parameters
Output ut put parameters paramet ers
FU32 FU33 FU34 FU35 FU36
Communicati ommuni cation on reference reference (CR (CR= 1 t o 32) Object bj ect index ind ex (20 t o 65535) Object bj ect subindex subind ex (0 t o 241) Number Number of the flag fl ag word for st st atus variable variabl e Low byte, identifi identi fica catition on of the operand operand type for data data 0 = Input word 1 = Output word 2 = Flag word 3 = Register High byte, identifi identi fica catition on of the Profi Profibus bus data data type t ype 1 = Boolean Boolean 2 = Integer8 Integer8 3 = Integer16 Integer16 4 = Integer32 Integer32 5 = Unsigned8 nsigned8 6 = Unsigned16 7 = Unsigned32 8 = Floating point 9 = Visible Visibl e-string 10 = Octet-stri ctet-string ng 11 = Date 12 = Time-of-day 13 = Time-differenc ime-dif ferencee 14 = Bit-s Bit -string tring FU37 Number of the (first) (fi rst) operand operand word for data data FU38 Expected length in bytes byt es FU32 Error rror number = 0 Successful uccessfully ly processed processed >0 Error (see table)
Status tat us variable
=0 =1 >1
Succe Successfull ssfullyy complet completed ed Still ti ll being processe processedd Terminated by error (see table)
FMSWRIT
Write (polled response) Input parameters parameters Outpu Outputt paramet par ameter erss
FU32 … FU38 See FMSREAD MSREAD FU32 See FMSRE MSREAD
Status Stat us vari variable abl eSee FMSR FMSRE EAD 4.7.4 Object directory If other ot her Prof Profibu ibuss FMS FMS partici part icipants pants want t o access access FS FST operands, the t he operands must be configured configur ed in the Obj Object ect Dir Directory ectory (in (i n SyC SyCon on configurator). configurat or). Ent Entering ering operands is optional, opti onal, ifi f t hey are missi missing ng in the t he Obj Objec ectt Direc Dir ecttory the t he operands are simpl simplyy not access accessibl ible. e. FST Version 4.02.21 Manual
163 163
Please note that not all al l operands are acce accessibl ssible. e. Only Only Input Inpu twords, Out Output putwords, words, Regist Registers ers and a limi l imitted range of Flagwords lagword s can be acces accessed. sed. When operands are ent entered ered they should be entered according according to t o the the following foll owing table: t able: Index 100 101 102 103 110 111 112 113 120 121 122 123 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231
Designation esignati on as per IPC IPC EW0-EW 0-EW63 EW64-EW 64-EW127 EW128-E 128 -EW W191 EW192-E 192 -EW W255 AW0-AW 0-AW63 AW64-AW 64-AW127 AW128-AW 128-AW191 AW192-AW 192-AW255 R0-R63 0-R63 R64-R127 64-R127 R128-R191 128-R191 R192-R255 192-R255 MW0-MW MW 0-MW63 63 MW64-MW MW 64-MW127 127 MW128-MW MW 128-MW191 191 MW192-MW MW 192-MW255 255 MW256-MW MW 256-MW319 319 MW320-MW MW 320-MW383 383 MW384-MW MW 384-MW447 447 MW448-MW MW 448-MW511 511 MW512-MW MW 512-MW575 575 MW576-MW MW 576-MW639 639 MW640-MW MW 640-MW703 703 MW704-MW MW 704-MW767 767 MW768-MW MW 768-MW831 831 MW832-MW MW 832-MW895 895 MW896-MW MW 896-MW959 959 MW960-MW MW 960-MW1023 1023 MW1024-MW MW 1024-MW1087 1087 MW1088-MW MW 1088-MW1151 1151 MW1152-MW MW 1152-MW1215 1215 MW1216-MW MW 1216-MW1279 1279 MW1280-MW MW 1280-MW1343 1343 MW1344-MW MW 1344-MW1407 1407 MW1408-MW MW 1408-MW1471 1471 MW1472-MW MW 1472-MW1535 1535 MW1536-MW MW 1536-MW1599 1599 MW1600-MW MW 1600-MW1663 1663 MW1664-MW MW 1664-MW1727 1727 MW1728-MW MW 1728-MW1791 1791 MW1792-MW MW 1792-MW1855 1855 MW1856-MW MW 1856-MW1919 1919 MW1920-MW MW 1920-MW1983 1983 MW1984-MW MW 1984-MW2047 2047
FST Version 4.02.21 Manual
Type
Access
Array(64) Array( 64)** U16 Array (64)* (64)*U16 U16 Array(64) Array( 64)** U16 Array(64) Array( 64)** U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)* Array(64)*U U16 Array(64)*U rray(64)* U16 Array(64)*U Array(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16 Array(64)*U rray(64)* U16
Read Read Read Read Read Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e Read/ writ wri t e 164 164
4.7.5 Error return codes codes from function functi on modules If FU FU32 is <>0 then the function functi on module returned an error, followi fol lowing ng table list l istss the error codes: 198 Function not impleme impl emented nted (call Festo) 199 PROFIFMS IFMS driver dri ver not loaded 200 Invalid Invali d paramet paramet er 201 No message message number available avail able (255 outstanding out standing requests) requests) 4.7.6 Error codes codes in status variable Following oll owing table t able lists li sts some of the possible error values: values: 42h 66
Connection onnecti on has been aborted abort ed
43h 67
Too many parall paral lel services servi ces on one CR
80h 128
Connection onnecti on could not be opened
81h 129 129
Error in application applicati on of remote partner
4.7.7 Het Heterogeneous erogeneous networks networ ks When integrati int egrating ng FP FPC-405 or PS1-CP 1-CP60 into i nto the th e Prof Profib ibus us network networ k make sure to t o verify veri fy the t he bus parame parameters. ters. In the t he SyC SyCon on confi configurator gurator set t he baud rate to 500 kBits/ secon secondd and optimise to user. Then Then edit the bus parameters. parameters. When using the t he FP FPC-405 wit wi th default defaul t bus parameters set as fol follows: lows:
FST Version 4.02.21 Manual
165 165
Also the t he Comm Communication unication references references differ slightl sl ightlyy from the t he default default sett settings, ings, viewed viewed from fr om the CP62:
4.8
FECRemote emot e I/ O Expansi on
Introduction This docume do cument nt descri describes bes the how to t o expand an FE FECCompact controll contr oller er wit wi t h 1 to t o 4 additiona ti onall modules modules to provide up to 100 I/ O points. Note! The I/ O Expansion is i s not available availabl e for t he FE FECStandard series. The archit architecture ectur e consists consist s of several FE FECCompacts in i n a Master-S Master- Slave arrangement. The Master FE FECcontains contai ns all of usual user-appl user-applicat ication ion programs programs as well well as a special special soft sof tware driver dri ver to manage communication communicati on with wit h the the slave FECs. If only onl y a singl singlee ext ext ension ensi on module is is required requi red you can also also use the t he IO script FECSlave without wit hout install inst alling ing drivers. dr ivers. See See the chapter " FECand HC0X HC0X"" for details. detai ls. The Slave Slave FE FECs do not contain cont ain any user-applicati user-appli cation on programs but must be b e loaded wit wi t h 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 t he daisy chain. However, However, doing doi ng so has been experienced experienced as not being stable st able in i n some situati sit uations ons and and is i s there t herefore fore not recomm recommende ended. d.
FST Version 4.02.21 Manual
166 166
The modules must be connected connected together t ogether using usi ng Festo Festo cable part number 183635. When When planning a system, system, plea pl ease se note that I/ O updates may may require up to t o 25 millisec mil liseconds onds due to the nature of the t he serial serial data bus. 4.8. 4.8.22 Confi onfi guri guring Slave FECs Every FE FECmodule, modul e, which you wil wi ll use as a slave device, has to be configured confi gured in i n the th e follow fol lowing ing manner. It is suggested that t hat you create creat e a separat separatee FST FSTproj project call called FE FECSLAV SLAVE E, which whi ch wil will contain contain data dat a that must be loaded loaded into int o every every slave. slave. No N o user written writ ten programs are are required. It is only onl y necessary to add the t he FC FCSLAV SLAVE Edri driver to t o the t he FE FECSLAV SLAVE E proj pro ject and load iti t into nt o the t he controller. controll er. The The follow foll ow provides step-by-s step-by-step tep instructions: instruct ions: 1.C 1.Create reat e the t he FCSLAV SLAVE E project proj ect 2.Select t he FC FCSLAV SLAVE Eproj project ect as the t he curr current ent project pro ject 3.Open 3.Open the Driver Confi Configurati guration on 4.Insert the FCSLAVE driver 5. You You will wil l be prompted prompt ed for a Desti Destinati nation on Dri Drive. ve. Acc Accept ept the t he default B response. response. 6. A list li stin ingg of ALL ALL conf configu igured red dri drivers vers will wi ll be shown. The FE FECSLAV SLAVE E driver dri ver " FCSLAV SLAVE E" should shoul d be l isted. Loading the t he Slave Slave Software int i ntoo the t he FE FEC 1. Connect Connect your PCt o the t he CO COMM port por t of the t he FE FECSlave using using the the appropri appro priat atee cable 2. Set the t he Run/ Run/ Stop swit swi t ch of the t he slave FE FECt o STO STOP 3. Switch Swit ch on the t he Power Power to t o the t he Slave Slave FE FEC 4. Download Downl oad t he FECSLAV SLAVE Eproj pr ojeect 5. You You will wil l rec r eceive eive a warning: warning: " No IO sca scann table, t able, no programs." programs." This is i s correct, correct, as only drivers will be loaded. 6. Set Set t he Run/ Run/ Stop switch swit ch of the t he slave FE FECt o the t he RUN RUN positio posit ion. n. Note! Unti Untill all slaves and the master master are connec connectt ed and and the power is cycled, cycled, iti t is likel l ikelyy that t hat a Red or Orange LE LED wil wi ll be be shown. This is i s normal. normal . 7. After Aft er the t he next next power cycle, the t he FE FECSlave should shoul d operate operat e in the t he slave mode. 8. Repeat Repeat thi t hiss Loadi Loading ng process process for any ot other FE FECSlaves. 4.8.3 Configuri onfi guring ng t he Master FEC Adding the th e Dri Driver ver
The master FE FECis programmed pr ogrammed and executes executes all of the user-appl user-applicati ication on programs. As with wit h standalone standalo ne FE FECcontrollers, control lers, the t he syst syst em I/ O configurati configur ation on has to be recorded. Addit ddi t ionally, ional ly, the the special special FCMAS MASTERsoftware soft ware driver dri ver must to t o be included i ncluded in i n the t he FS FST project. The following foll owing provides step-by-step step-by-step instructi i nstructions: ons: Create (or ( or select) sel ect) your you r FS FST project. project . Insert t he FC FCMAST MASTERdriver dri ver to t o the the Driver Conf Configu igurat ratiion You will wil l be prompted prompt ed for a Desti Destinati nation on Dri Drive. ve. Acc Accept ept the t he default B response response A li sti st ing of ALL configured configured dri dr ivers wil will be shown. The FE FECMaster dri d river ver " FCMAST MASTER" should shoul d be listed.
Selecting electi ng and adding I/ O Entries ntr ies
The user user now must select select one of t wo avail available able I/ O entries entri es in the t he Mast Mast er Project. Project. The step-bystep-bystep process is present below. Please Please refer to t o the follo fol lowing wing section. secti on. How However, ever, the user must first selec selectt which I/O I/ O entry entry is i s best best suited suit ed to the t he application. application. The possible possibl e select selections ions are: FST Version 4.02.21 Manual
167 167
FEC Slave
If this t his I/ O entry is selected, selected, then during system system initiali init ialisa satition on the master master checks checks if all expected pect ed slave slave devices respond. respond. If a configured slave sl ave does does not respond r espond then system error 11 is generated. generated. During runtime runti me,, ifi f any slave device device fails to t o respond, system system error 11 will wil l be generated. -orFECSlaves wit wi t hou houtt error err or 11 11
This hi s I/ O entry entr y react react s in the th e sam samee way way during the t he initial init ialisat isation ion phase. However, However, exces excessive sive runtime runt ime communicat communication ion errors error s between the master master and any slave slave device will wil l not generat generatee an an error. Each of the t he FE FECSlave nodes must be b e entered int i ntoo the t he FS FST Project roj ect I/ O configurat confi guration ion of the t he FEC Master. You will wil l be prompted for: Switch: Enter 0 for f or the t he first fi rst slave sl ave,, 1 for f or the t he second second slave slave etc. IW: IW: Enter the starting start ing IW (Input Word) number nu mber for t he Slave. Slave. Eac Eachh FE FECrequires requi res 2 Input words and each each unit uni t must be b e assigned assigned unique, uni que, non-overlapping ranges. ranges. OW: Enter the starting start ing OW (Out (Output put Word) number for f or the t he Slave. Slave. Eac Eachh FE FECrequires requi res 1 Output word and each each unit uni t must be b e assigned assigned unique, uni que, non-overlapping ranges. ranges. Note! Don’t forget that t hat the t he FE FECmaster master also must be entered entered into i nto the I/ O confi configurati guration! on! Optional pt ional I/ O Entry
If desired the t he user may also also include i nclude the t he FE FECSlaves Error Error Counter ount er I/ O entry in i n the t he mast mast er project. This This will wil l trac t rackk the t he total tot al global expansion expansion bus errors errors that occur. occur. If this t his is i s desir desired ed then include incl ude the module modul e " FECSlaves Error Error Count Counter" er" into int o the t he IOconfigura confi gura-tion. ti on. For For the IW enter the number number of a non-con non-conflflicti icting ng " virtual" virt ual" IW (Input Word), Word), which will be used used to store st ore the global error, count. Runtime Functioning The following foll owing describes describes the t he functionality functionali ty of a configured and wired system. 4.8.4 Master Master at Runtime unti me Upon power power up the t he master master will wi ll init ini tialise ial ise the the remote (slave) FE FECmodules. modul es. If there there is a discrepancy crepancy between the expect expected versus t he act actual configurat confi guratio ionn (the (t he expected expected slaves do not respond); respond); then t hen an an I/ O stage defective defective error will wil l be genera generated ted and system error error 11 will wil l be stored. If during dur ing operation a communications communications problem deve develops lops (and the appropriate appropriat e I/ O entry is included) incl uded) then t hen exce excessive ssive communicati communications ons errors result in system error 11 being generat generat ed and the Master Master will wi ll stop attem att empti pting ng to t o update the t he slave slave FE FECI/ O points. point s. The system system can can be reinitiali reinit ialise sedd by toggling t oggling the t he Run/ Run/ Stop switch or cycling cycling power.
4.8.5 Slave at Runtime unt ime Upon power power up the t he slave slave will check check the Run/ Run/ Stop switch. swit ch. If the t he swit switch ch is in the t he Stop Stop posi posi t ion, io n, the t he slave softw soft ware driver will wi ll not be be processed processed and and no acces accesss from the t he master master can occur. If the t he switch swit ch is in the t he Run Run posit posi t i on, then t hen the FE FECslave software soft ware is processed. Interpret Int erpreting ing t he RU RUN Led Led in i n Slave Devices Devices FST Version 4.02.21 Manual
168 168
Red Flashing lashi ng Orange Flashing lashi ng Green Green
Communicati ommunications ons error No communi communica catt ions with wit h master Slave being init ini tialised ial ised by mast mast er Communicati ommuni cations ons normal
4.8.6 4.8.6 Diagnosti Diagnost ic Program rogram Module Module (RE (REMDIAG MDIAG) The Remote Remote FE FECsoftware soft ware package package also includes incl udes software soft ware for monit moni toring ori ng the th e status stat us of the t he FECRemote I/ O devices devices from within wit hin the t he user user applicatio appli cationn program. If you want ttoo include inclu de this thi s capabi capabililitty in i n your applicati appli cation, on, you need to import impor t t he RE REMDIAG MDIAGRemote Remote FE FECerror counter into nt o your your FECMAST MASTERproj project ect Using the REMDIAG Module Use the foll fo llowing owing guideli gui delines nes to access access to t o RE REMDIAG MDIAGmodule from f rom with wi thin in your Statement List or Ladder Diagram program: Get error counters count ers Input paramet parameters Output ut put paramet parameters
Reset eset total t otal error counter Input parame parameters ters Set retry ret ry counter Input paramet parameters
4.9
FU32 1 (get error counter) FU32 Short t erm error count 0 if communication communicati on OK OK <>0 if error er ror in i n last cycle(s) FU33 Total ot al error count, wraps from 65535 back back to 0 FU32 2 (reset (reset t otal error counter) FU32 3 (set t otal ot al error counter) count er) FU33 Value for retry ret ry counter. 0 = disa di sable ble
Fil e Handli ng Modules Modul es
Some standard CF CFM give access access to t he file fi le systems syst ems on diskett disket tes, hard disks, di sks, RA RAM-disks, M-di sks, etc. as support supported ed by the MS-DO MS-DOS S operati operating system syst em on HC1X HC1X and HC2X HC2X CPUs. Us. It is possibl possi blee to to have up to t o 6 open files fi les at a time. t ime. If more m ore files fil es than this thi s are opened opened the CF CFM returns with wi th error number 4 (too (t oo many many open files fil es). ). The naming naming conven conventition on uses uses numbers numbers for fil f iles es.. If the fil f ilee number number is i s in the t he range range 0 to 32767, t hat is if it i t is i s a positive posit ive number, number, it will wil l be translated into int o a file fi le name name directly. directl y. F For or example example file fi le number number 17 results results in a " 17" file fil e name name in the curren currentt working directory directory of the current current disk. di sk. For a negat negative file fi le number the t he CF CFM search search the stri st ring ng driver and use the str string ing wit wi t h the t he opposite sit e number number as as file fil e name. name. For For example example if t he file number number is " -3" and the string stri ng number number 3 contains " C:\ MYD MYDATA.BIN" .BIN" this will wi ll become become the name name of the associat associated ed file. fil e. All file fi le access access CF CFM pass jobs to t o the t he MS-DO MS-DOS S task for furt f urther her processing and retu return rn immed i mmedii ately. atel y. The The real job jo b will wil l be done by the t he MS-D MS-DO OS t ask somewhat somewhat later l ater on a first fi rst comes comes first fi rst served base. base. So So more than t han one operation operati on can be issued at the t he same same time. ti me. All read read or write wri te data dat a functions use flag words as storage for read or written writ ten data. The The reason is, that only onl y the flag fl ag words words offer a meaningful meaningful amount amount of memory. memory. All CF CFM return retu rn a result and support an operation operati on status stat us variable. variabl e. A CFM result of zero means the operation operati on has been started, start ed, but need not be complete complet e (and (and usually usuall y is not). A none zero zero CFM result shows an error condition. conditi on. The The operation operati on is i s not started and the t he actu actual al returned ret urned value indicates the error ttype, ype, for example example invalid parameters. parameters. A stat status us variable value of FST Version 4.02.21 Manual
169 169
zero zero means success. success. Whil Whilee the value is -1, the operation operati on is still sti ll busy, not yet completed. complet ed. If any error error occurs, the value will wil l becom b ecomee >0 and the actual value can be used to obtain obt ain furt f urther her information inf ormation of the kind ki nd of the t he error. error. For For a list li st of error values see see below. below. Do not remove remove a diskette diskett e while whil e there is i s an open file fil e on it. it . Doing such such in i n MS-DO MS-DOS S wil willl proproduce lost clusters cl usters or even e ven worse. Remember, emember, MS-DO MS-DOS S updates updat es the file fi le allocat al location ion table t able not steadily. steadil y. The The method used by MSDOS DOS woul wouldd take t ake too much time. t ime. MS-DO MS-DOS updates it when a file fi le is i s closed. To To make sure that t hat all writt wri tten en data is part of a file fil e and and all alloca all ocated ted memory memory (clusters) (clusters) is noted in the t he file fil e all alloc ocaation ti on table the file fi le has to be close closed. d. A simple simple but effecti effective ve trick is to t o position positi on to the t he desired desired end of the file, fi le, write wri te zero bytes to that location and close the fil file. e. T This his will wil l force f orce MS MS-DO -DOS to allocate enough enough memory memory from the disk and update update the t he file fil e allocation table. t able. Doing Doing this t his results sult s in the best chance chance to save the integrity int egrity of the t he file fil e ssystem ystem on a disk. Another strateg strat egyy uses uses a " check check point a file" fil e" method. method. Request equest and save save the current position posit ion of the t he file fil e read/ read/ write writ e pointer. Then Then close close the file, fi le, open it again, and see seekk to t o the saved saved posi posi tion. ti on. T This his also ens ensures ures all data will be written writt en to the disk and the file allocation table will be updated. updat ed. If the th e CHKDSK DSK-command finds fi nds lost clust cl usters ers on a disk, the t he file fil e all allocati ocation on table tabl e has has not been been updated at the t he right moment. The The first method method preve pr events nts this t his nearly nearly always, the second second is less sure sure but even even saves saves part partiall iallyy written writ ten clusters to t o the t he disk. The CI CI commands S and and Y and the t he QUIT QUIT and EX EXIT commands commands wil wi ll aut aut omati omat ically call y close close all fil fi les. Overview FCREATE FOPE OPEN FCLOSE LOSE FCLOSA LOSALL LL FDELE DELETE FSEE SEEK FSEE SEEKX FWRITE FREAD FREAD FWRITST ITSTR FREADST ADSTR R
File creat createe Fi le open op en Fi le clos cl osee Fil e clos cl osee all al l File del delete et e File il e seek Fil e seek extend ext ended ed Fi le wri wri t e Fil e read File wri write stri st ring ng File read read stri st ring ng
FCREAT File Create Create a new file or open an an exist existing ing file fi le for reading and and writing. writ ing. If the t he file fil e exists exists it will wil l be t runcated runcated to t o zero zero length. Input parameters: parameters: FU32 File number for for the t he MS-DO MS-DOS S File il e name. name. A positive posit ive number number is i s directly directl y conve convert rted ed into a file fi le name. name. The number number 17 trans t ranslat lates es into a fil f ilee name name " 17" . A nega negatt ive number number is i s used used as opposit oppositee index into the t he string table t able in the t he str string ing driver. dri ver. The The asso associated ciated string stri ng contains contains the t he file fil e name name.. FU33 Number Number of flag fl ag word FW FW used for status st atus report r eport.. The status is is FW[FU33] [FU33] = -1 while whi le functi fu nction on is busy, = 0 when completed complet ed success successful fully, ly, = >0 error number after aft er failure. fail ure. FU34 Number of flag f lag word FW for the requested file f ile handle. handl e. Valid when the status flag f lag word shows 0. This This handle has to be used with wit h all further furt her opera operations ti ons wit withh the opened opened file. FST Version 4.02.21 Manual
170 170
Output utp ut parameters: parameters: FU32 = 0 OK, function functi on has been started, start ed, = >0 error number after failure. fail ure. Function Function is not started. start ed. FOPE OPEN File Fil e Open Open Open an existi existing ng file fil e in the t he given mode. mode. Input parameters: parameters: FU32 File number for for the t he MS-DO MS-DOS S fil fi le name. name. A positive posit ive number number is i s directly convert converted ed into a file fi le name. name. The number number 17 trans t ranslat lates es into a file fi le name "17" " 17" . A negative negative number is used aass opposit oppositee index into the t he string table t able in the t he str string ing driver. dri ver. The The asso associated ciated string stri ng contains contains the t he file fil e name name.. FU33 Number Number of flag f lag word FW FW used for statu st atuss report. report . The status is is FW[FU33] [FU33] = -1 whi w hile le function funct ion is i s busy, = 0 when completed complet ed success successful fully, ly, = >0 error number after fail f ailure. ure. FU34 Number Number of flag fl ag word FW FW for the t he request request ed file fil e handl handle. e. Valid when the status flag fl ag word shows 0. This This handle has to be used with all further furt her opera operations ti ons wit withh the opened opened file. FU35 Mode in which whi ch to open op en the file. fi le. 0 = read-only acces access, s, 1 = writewrit e-only only acces access, s, 2 = read/ read/ write writ e aacc cces ess. s. Output utp ut parameters: parameters: FU32 = 0 OK, OK, function funct ion has been started, start ed, = >0 error number number after aft er failure. fail ure. Function Function is i s not started. start ed. FCLOSE File Close Close a previously previously opened file. fil e. Aft After er closing a file fil e the t he file fil e handle handle is i s no longer vali validd and cannot cannot be used for any furt further her operati operation. on. Input parameters: parameters: FU32 File il e handl handlee for the t he MS-DO MS-DOS S file fi le as obtained obt ained from file fi le open or file fil e create create functions FU33 Number of flag f lag word FW used for status stat us report. report . The status is is FW[FU33] [FU33] = -1 while whi le functi fu nction on is busy, = 0 when completed complet ed success successful fully, ly, = >0 error number after aft er failure. fail ure. Output utp ut parameters: parameters: FU32 = 0 OK, functi fu nction on has been started, start ed, = >0 error number number after failur f ailure. e. F Function unction is i s not started. FCLOSALL File Close All Close all currently currentl y open files fil es.. Aft After er closing all all files fi les the file fi le handles are are no longer vali validd and cannot cannot be used for any further furt her operation. operation. Input parameters: parameters: FU32 Number Number of flag fl ag word FW FW used for status stat us report. report . FST Version 4.02.21 Manual
171 171
The status is is FW[FU33] [FU33] = -1 while whi le functi fu nction on is busy, = 0 when completed complet ed success successful fully, ly, = >0 error number after aft er failure. fail ure. Output utp ut parameters: parameters: FU32 = 0 OK, function functi on has been started, start ed, = >0 error number number after failur f ailure. e. F Function unction is i s not started. FDELETE File Delete Delete a fil f ile. e. T The he file fil e to be deleted may not be open. Input parameters: parameters: FU32 Fi File number for fo r the t he MS-DO MS-DOS S file fi le name. The number number 17 translates into a file fil e nam namee " 17" . FU33 Number Number of flag fl ag word FW FW used for status stat us report. report . The status is is FW[FU33] [FU33] = -1 while whi le functi f unction on is busy, = 0 when completed complet ed success successful fully, ly, = >0 error number after failur fai luree Output utp ut parameters: parameters: FU32 = 0 OK, function functi on has been started, start ed, = >0 error number after aft er failure. Func Functition on is not started. FSEEK File Seek Move the file fi le read/ read/ write writ e pointer to a specifi specified ed posit position. ion. The The posit position ion is given in bytes. bytes. Input parameters: parameters: FU32 Fil Filee handle for fo r the t he MS-DO MS-DOS S file fi le as obtained from fr om file fil e open or file fi le create creat e functions. FU33 Number of flag fl ag word FW FW used for statu st atuss report. report . The The status stat us is The status is is FW[FU33] [FU33] = -1 while whi le functi fu nction on is busy, = 0 when when completed completed succe successfull ssfully, y, = >0 error number after fail f ailure. ure. FU34 Low word of 4 byte file fi le pointer point er position. posit ion. FU35 High word of 4 byte file fi le pointer point er position. positi on. Output utp ut parameters: parameters: FU32 = 0 OK, function functi on has been started, start ed, = >0 error number number after failur fai lure. e. F Function unction is i s not started. FSEEKX File Seek Extended Move the file fi le read/ read/ write writ e pointer to a spec specifified ied absolut absolutee or or relative relati ve position. posit ion. The The posit position ion is given in bytes. Input parameters: parameters: FU32 Fi Fi l e handle for the t he MS-DO MS-DOS S file fi le as obtained obtai ned from file fi le open or fil f ilee create create functions. FU33 Number of flag f lag word FW used for status stat us report. report . The status is is FW[FU33] [FU33] = -1 while whi le functi fu nction on is busy, = 0 when when completed complet ed success successful fully, ly, = >0 error number after failur fai luree FU34 Low word of absolut absolutee or relative relati ve 4 byte file fi le pointer point er position. positi on. FST Version 4.02.21 Manual
172 172
FU35
High word of absolut absolutee or relative relati ve 4 byte file fi le pointer point er position. posit ion.
FU36
0=abs 0= absolut olute, e, start from beginning of file fi le 1=relati 1= relative ve,, start start from f rom current current posit position ion 2=relative, 2= relative, start start from f rom end end of file. fil e.
FU37
Number Number of flag fl ag word FW used t o return ret urn t he new position. posit ion.
The new posit position ion is i s given as as follows: fol lows: FW[FU [FU37] Low word of absolute absolut e 4 byte byt e file fi le point poi nter er positio posit ion. n. FW[FU [FU37+1] High word of absolute absolut e 4 byte byt e file fi le point poi nter er position. posit ion. Output utp ut parameters: parameters: FU32 = 0 OK, OK, function funct ion has been started, start ed, = >0 error number number after aft er failure. fail ure. Function Function is i s not started. start ed. FWRITE Write File Write rit e some some portion porti on of the t he flag words to an open file. fil e. T The he amount amount is i s given in bytes. Input parameters: parameters: FU32 File il e handle for t he MS-DO MS-DOS S file fi le as as obtained obt ained from fr om file fi le open open or file fil e create functions. FU33 Number Number of flag fl ag word FW used for status stat us report. report . The status is is FW[FU33] [FU33] = -1 while whil e function funct ion is busy, = 0 when completed complet ed success successful fully, ly, = >0 error number after failur f ailure. e. FU34 Number of the first fi rst flag fl ag word FW that has to be written. writ ten. FU35 Number Number of the th e bytes byt es t hat have t o be writ wri t t en. Writing rit ing 0 bytes wil willl trunc t runcate ate the file fil e at at the current current ffililee pointer posit position. ion. If t he numbe numberr of bytes is odd, odd, only the low byte of the t he last last flag word will be written writt en.. Output utp ut parameters: parameters: FU32
= 0 OK, functi fu nction on has been started, start ed, = >0 error number number after aft er failure. failur e. Function Function is i s not started. start ed.
FREAD Read Read Fi le Read some some portion port ion of t he flag flag words from an open file. fi le. The amount is i s given in bytes. byt es. Input parameters: parameters: FU32 File il e handle for the MS-DO MS-DOS S file fi le as obtained obt ained from file fil e open or file fil e create functions. FU33 The status is is FW[FU33] [FU33]
Number Number of flag fl ag word FW used for status stat us report. report . = -1 while whil e function funct ion is busy, = 0 when completed complet ed success successful fully, ly, = >0 error number after aft er failure. fail ure.
FU34
Number Number of t he first fi rst flag fl ag word FW t hat has t o be read.
FU35
Number Number of t he bytes byt es t hat have t o be read.
FST Version 4.02.21 Manual
173 173
If the t he number number of bytes is odd, only the low byte of the t he last last flag f lag word will be read. read. FU36
Number Number of flag fl ag word FW for t he number of bytes byt es t hat actually have been read.
Output utp ut parameters: parameters: FU32
= 0 OK, functi fu nction on has been started, start ed, = >0 error number number after aft er failure. failur e. Function Function is i s not started. start ed.
FREADST ADSTR RRead stri st ring ng fro f rom m ffiile Read ead string from file fil e unti untill delimit deli miter er is found. Input parameters: parameters: FU32 File il e handle for t he MS-DO MS-DOS S file fi le as obtained obt ained from fro m file fi le open or file fi le create functions. FU33
Number Number of string. str ing.
FU34
Number Number of t he bytes byt es t hat will wil l be checked checked (max).
FU35
Deli Delimit miter er (0..255). 0: delimi del imitter is i s CR CRLF.
Output utp ut parameters: parameters: FU32= 0 DONE DONE,, functi fu nction on has been execut executed ed successfull successful ly 200 St ring driver dri ver not found 201 Reached EOFbefore before deli delimiter mit er was found. found. File point poi nter er remains remains unchanged. unchanged. 202 Checked given amount of charact characters before delimit deli miter er was found. found . File il e point poi nter er remains unchanged. >0 Error, rror, see below. bel ow. FWRITST ITSTRWrit ri t e stri string ng to t o fif ile. Write rit e sstri tring ng plus delimit delimiter er to file. fi le. Note! This This module modul e needs needs to be call called ed more than t han once once in order to t o execute execute the t he function. funct ion. Input parameters: parameters: FU32 Fil Filee handl handlee for the t he MS-DO MS-DOS S file fi le as obtained obtai ned from file fi le open or file fi le create functions FU33 Number Number of string. str ing. FU34 Number Number of the t he bytes that will wi ll be written writ ten (max). (max). FU35 Delimiter (0..255). 0: deli del imiter mit er is i s CR CRLF, LF, -1:no delimit deli miter er appende appendedd Output utp ut parameters: parameters: FU32 = 0 DONE DONE,, functi fu nction on has been execut executed ed successfull successful ly 200 St ring driver dri ver not found >0 Error, rror, see below. bel ow. 4.9.1 Operati peration on result codes codes Most functions functi ons wil willl set a status value in a flag word. The status statu s value has followi fol lowing ng meanings: meanings: FST Version 4.02.21 Manual
174 174
-1 BUS BUSY 0 OK >0 ER ERROR
Functio unct ionn not yet completed compl eted,, Functi unct ion complet compl eted ed successful successfully ly,, Function uncti on failed fai led t o complete complet e successfull successfully, y, t hat is an error, value speci speci fies fi es error error type. t ype.
If the t he status value is i s >0 it is regarded an an error. 2 File il e not found 3 Path not found 4 Too many open files fi les 5 Access Access denied deni ed 6 Invali Invalidd handle number number 12 Invalid Invali d access access code 100 Invalid Invali d paramet paramet er 101 Disk full ful l 102 Out of memory 4.10
Strings
Version 1.01 1. 01 The FS FST string str ing dri d river ver makes a new new addit addi tional io nal data dat a type typ e avail available: able: t he ST STRING data type. The The default default sett setting ing provides support for f or 256 strings stri ngs.. Individual Indivi dual strings str ings are addressed addressed by way of the t he string stri ng number. St Strings ri ngs may may con contt ain any charact characters with wit h the t he excepti exception on of the t he NUL NULLL charact character (hexadecimal (hexadecimal $00). Strings ri ngs can be as long as neces necessary sary withi wit hinn the t he scope scope of the t he set memory requireme requir ement nt.. The The strings stri ngs are not retentive. retent ive. 4.10.1 Configuri onfi guring ng t he driver dri ver and assigning parameters parameters If you want t o use stri st rings ngs in an FS FST IPC IPCproject, proj ect, you must enter t he ST STRINGS INGS driver dri ver in the t he driver configurer confi gurer and assign assign the t he necess necessary ary paramet parameters. IPC drive: Specify the drive dri ve on which whi ch the t he stri st ring ng driver dri ver STR STRINGS INGS.EX .EXEis located locat ed or onto ont o which it is to t o be loaded. loaded. Reserved eserved memory in i n bytes: byt es: Enter the t he maximum maximum memory capacit capacityy to to be used for stri st rings. ngs. The The permissible permissibl e range is from fr om 5 to 65000 bytes. The The default default sett setting ing is 5 kilobyt ki lobytes es.. This This setting sett ing can also be specified specifi ed or modifi modi fied ed using the t he ST STRINIT module. modul e. Number of strings: Enter the t he maximum maximum number of stri st rings. ngs. The The permissible permissibl e range is from f rom 5 to 1024 strings stri ngs.. The The default default sett setting ing is 256 strings stri ngs.. File il e with wit h default assignme assignments: nts: Enter the t he nam namee of the file fil e that contains the initiali init ialisa satition on values values for the strings. stri ngs. The The format format of this thi s file fil e is desc described ribed in the t he following followi ng sec sectition. on. 4.10.2 Initialisa Initi alisatition on of stri strings ngs A simple text fil f ilee is used used for init i nitiali ialising sing strings. The The file fil e name name must must have the extension extension " TXT" . Eac Eachh line li ne in the file fi le is a string. stri ng. The The first line li ne is str string ing 0. Missing Missi ng strings stri ngs are are init ini tialised ial ised as blank strings. str ings. Any new-l new-line ine charact characters (CR (CRor LF) in i n the the text file fi le are removed. Special Special characters are represented by a combinati combination on of two t wo charac characters, ters, the t he '\' \ ' charac character ter and another charac character. ter. The following foll owing special special charact characters are possible: possibl e: \ a alert aler t Bell Bell charac character ter (audible signal) signal) \ b backspac backspacee Move position positi on one charac character ter to the left FST Version 4.02.21 Manual
175 175
\ f formf formfeed eed
Form feed (FF (FF)
\ n linefeed li nefeed Line feed (LF) (LF) \ r retur r eturnn
\ t t ab
New New line li ne (CR (CR) Tabulator charac character ter
\
Hexade Hexadecimal cimal definit defi nitio ionn of a charact character; must begin with wit h a digit, digit , for exam example ple " \ 0A8" 0A8" (corre (correcct) rather rather than " \ A8" (incorre (incorrecct). The ' \ ' charac character ter is represe represented nted by two backslashe backslashes: s: '\ \ ' . 4.10.3 Extended CI CI commands commands for stri st rings ngs When strings are used used in i n a project, in other ot her words when the string stri ng driver has been loaded, the t he command command set of the t he CI CI is suppleme suppl ement nted ed by the string str ing driver. dr iver. The additiona additi onall comma commands nds for the t he string driver dri ver are shown shown below. !3Dx Display ispl ay string str ing x !3Mx=tex !3Mx=t extt Set string stri ng x with wit h the sequenc sequencee of charac characters ters ' text' !3S Status tat us indica indi catition on Resul esult " = count count= = ,stor ,st orage= age=< , >" , where where XX = Number of strings str ings YY = Reserved memory capacit capacityy ZZ = OK, if stri str i ng memory memory is i s OK OK, or = BAD BAD, if string stri ng memory memory is defecti defective ve In these comma commands, nds, " !3" is the t he prefix for a CI CI call call in a driver; in this t his case case it is in drive dri verr 3 for strings. 4.10.4 Modules for handli handling ng strings stri ngs There is a number of ready r eady-- prepared pr epared modules, which can be used used for handling handli ng strings stri ngs.. Thes Thesee must must be imported import ed into int o a project in i n the usual way. The The various various strings conc concerned erned are spec specifified ied with wit h the t he string number. In order to t o delete string str ing 5, that t hat is i s to reduce it t o length lengt h 0, the t he ST STRCLRmodule module must be invoked. The STRCLR module may have been imported as CMP 73, for example. In STL STL t he program lines l ines appear as follow fol lows: s: THE THEN . . . CMP 73 73 " delet del etee wit wi t h STR STRCLR WITH ITH V5 " from string str ing 5 In order to t o copy string stri ng 6 into int o string str ing 12, the t he ST STRCPY module modul e must be invoked. i nvoked. The STR STRCPY module modul e may have been impor i mportted as CMP CMP 74, for f or example. In STL STL the the program program lines li nes appear appear as follows: foll ows: THEN THEN . . . CMP 74 " copy with wit h STR STRCPY WITH ITH R0 " from fr om string str ing with wit h number number in R0 R0 WITH ITH V12 " t o st st ring ri ng 12 Most string stri ng modules modules return a result for f or error detecti detection. on. Overview of modules: modu les: FST Version 4.02.21 Manual
176 176
STRADDR ADDR STR STRAPP APPND STR STRATO ATOH STR STRATO ATOI STR STRATO ATOIX STR STRATO ATOU STR STRCAT STRC STRCHEC HECK STRCHGET STRCHSET STR STRCI STR STRCLR STRCMP STR STRCPY STR STRDEL DEL STRDUMP DUMP STRFILL STRFILL ILLW STRFIND INDC STR STRFINDS INDS STR STRGROW STR STRHTO HTOA STR STRICMP ICMP STRINIT INIT STRINS INSRT STR STRITOA ITOA STRLEFT STR STRLEN LEN STR STRLOWER STRMID STR STRNCMP NCMP STR STRNICMP NICMP STRRIGH IGHT STR STRSTAT STAT STRUPPER STR STRUSAG USAGE E STR STRUTO UTOA
Det Determine ermi ne internal nternal address address of a stri string ng Append a character charact er at t he end of a stri st ring ng Convert a hexadecimal stri string ng into nt o a word word Convert onvert a stri string ng into nt o a signed signed word word Convert onvert a stri string ng into nt o a signed signed word word Convert a stri string ng into nt o an unsigned unsi gned word word Combine ombi ne t wo stri strings ngs in a third hi rd stri string ng Memo Memorry check check Extract xtract a chara characte cterr from a string Replac eplacee a chara characte cterr in a string Execute xecut e a CI command command Delet Delet e a stri st ring ng Compare t wo stri strings ngs character charact er by character, character, differentiat dif ferentiating ing between upper and lower case case Copy opy stri st ring ng Delete Delet e part part of a stri st ring ng Display Displ ay a number number of stri st rings ngs Create a string str ing with wit h a specif specified ied number of identi id entica call characters characters Fill a string string with anothe notherr string, tring, rightright- or left-jus left-justified tified Find a chara haraccter in a string string Find a substri subst ring ng in a stri st ring ng Enlarge nlarge t he stri string ng memory for an indivi ndi vidual dual stri str ing Convert a word into nt o a hexadecimal stri string ng Compare t wo stri strings ngs character charact er by character, character, not differe diff erenti ntiating ating between upper upper and lower case case Initiali Init ialisa satition on or re-initiali re-init ialisa satition on Ins Insert a string tring into anothe notherr string tring Convert a signed signed word word into nt o a stri st ring ng Left substri tring Length Length of a stri st ring ng Convert onvert a stri st ring ng t o lower ower case Middl Mid dlee substring substr ing Compare t he first fi rst characters characters of t wo stri st rings, ngs, differentiat dif ferentiating ing between upper and lower case case Compare t he first fi rst characters characters of t wo stri st rings, ngs, not differe diff erenti ntiating ating between upper upper and lower case case Right ight sub ubsstring tring Status Stat us of stri st ring ng driver dri ver Convert onvert a string to upper upper case case Used and free ree memory memory Convert onver t an unsigned unsi gned word into int o a string str ing
STRADDR Determine the internal i nternal address of a string. stri ng. Input parameters FU32 Number of t he string str ing Return etur n parameters FU32 Offset ff set of t he address 0 if string number number is i s invali invalidd FU33 Segment egment of t he address 0 if string number number is inva i nvalilidd As the lengths of the t he strings stri ngs concerned concerned are are subject to t o dynamic change, change, the strings strings may need need to be moved within wit hin the t he string stri ng memory. memory. The The direct consequence consequence of FST Version 4.02.21 Manual
177 177
t his is i s that after the t he address address of of a string str ing has been been det det ermined it may may change change immediately as a result of string st ring operations operati ons with other strings. st rings. The The addresse addressess of strings st rings are therefore to be used under special special conditions. conditi ons. STRAPPND Append a charact character at the t he end of a string. str ing. Input paramet parameters FU32 Number Number of t he string str ing FU34 charact charact er t o append Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error STRATOH Convert a hexadecimal hexadecimal stri st ring ng into int o a word. Input paramet parameters FU32 Number Number of t he string str ing Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error FU33 Result esul t ant val value Space charact characters and and tabulator tabul ator characters at the t he beginni beginning ng and and end of the string stri ng are all allowed. owed. A ' $' character character before befor e the hexadecimal hexadecimal numeric charact characters is also allowed. STRATOI Convert a string stri ng into int o a signed word. Input paramet parameters FU32 Number Number of t he string str ing Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error FU33 Resultant esult ant value valu e Space charact characters and and tabulator tabul ator characters at the t he beginni beginning ng and and end of the string stri ng are all allowed. owed. A ' +' or ' -' charac character ter before the numeric numeric charac characters ters is also allowed. STRATOIX Convert a string stri ng into int o a signed word. Input paramet parameters FU32 Number Number of t he string str ing FU33 String ri ng positio posit ionn for t he conversion Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error FU33 Resultant esult ant value valu e FU34 Number Number of characters characters used for the conversion conversion Space charact characters and and tabulator tabul ator characters at the t he beginni beginning ng and and end of the string stri ng are all allowed. owed. A ' +' or ' -' charac character ter before the numeric ccharac haracters ters is also allowed. STRATOU Convert onvert a string stri ng into int o an unsigned word. Input paramet parameters FU32 Number Number of t he string str ing Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error FU33 Resultant esult ant value valu e Space charact characters and and tabulator tabul ator characters at the t he beginni beginning ng and and end of the string stri ng are allowed. A ' +' charac character ter before before the t he numeri numericc charac characters ters is i s also allowed. STRCAT Combine two strings stri ngs in a third thi rd string. stri ng. Input paramet parameters FU32 Number Number of t he first fi rst source string str ing FU33 Number Number of the second second source string str ing FU34 Number umber of the desti destination nation string stri ng FST Version 4.02.21 Manual
178 178
Return et urn parameters
FU32 0 if success successful ful,, otherwise ot herwise error
STRCHECK Memory check check for the t he string stri ng memory. memory. Input paramet parameters None Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error STRCHGET Extract an indexed character character from fr om a st string. ri ng. Input paramet parameters FU32 Number Number of t he string str ing FU33 Character haract er index, 1 for first fi rst charac character ter of the t he str string ing Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error FU33 Extract xtracted ed character character STRCHSET Replace an indexed character character in i n a string. str ing. Input paramet parameters FU32 Number Number of t he string str ing FU33 Character index, 1 for first fir st character character FU34 Replacement epl acement character charact er in lower-order byt byt e Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error STRCI Execute xecut e a CI CI command. command. Input paramet parameters
FU32 Number Number of t he string str ing with wit h t he CI command command FU33 Number Number of the string string for the result of the t he command command Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error The string stri ng resulting result ing from from the command command must not be more than 80 charac charactters long. l ong. The result of t he CI CI command command is not int i nterpret erpreted. ed.
STRCLR Delete a string. str ing. Input paramet parameters FU32 Number Number of t he string str ing Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error This is i s the same as clearing clearing a string stri ng or reducing its it s length length t o 0. STRCMP Compare two stri st rings ngs character character by character. Input paramet parameters FU32 Number Number of t he first fi rst string str ing FU33 Number Number of t he second second string str ing Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error FU33 1 ifi f charac characters ters in first fi rst string st ring >characters in second string 0 if both bot h stri strings ngs are identical -1 if charac characters ters in first string
179 179
Input paramet parameters Return etur n parameters STRDEL Delete part of a str string. ing. Input paramet parameters
Return etur n parameters
FU32 Number Number of t he source string str ing FU33 Number umber of the desti destination nation string stri ng FU32 0 if success successful ful,, otherwise ot herwise error
FU32 Number Number of t he string str ing FU33 Index for first character character t o be deleted, 1 for first fi rst character character FU34 Number of characters FU32 0 if success successful ful,, otherwise ot herwise error
STRDUMP Produce rodu ce a debug output outpu t of a seri series es of strings stri ngs on the monitor monit or of the t he IPC IPC. Input paramet parameters FU32 Number Number of t he first fi rst string str ing FU33 Number of t he last string str ing Return eturn parameters paramet ers None This module modul e should not be used in normal operat operation. ion. If necessary necessary the extended CI CI commands commands of the t he string stri ng driver can be used. used. STRFILL Create a st string ri ng with wit h a specif specified ied number of identi i dentical cal characters. characters. Input paramet parameters FU32 Number Number of t he string str ing FU33 Number of characters FU34 Filler character charact er Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error STRFILLW Fill il l a string with wit h another another string, right- or left-j left-jus ustitified. fied. Input paramet parameters FU32 Number of t he string str ing t o be created FU33 Number Number of charact characters for this thi s string str ing >0 for right-justi right-j ustifified ed <0 for left-justif left -justified ied FU34 Number Number of t he string str ing t o be t ransferred Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error If the t he length length specif specified ied for the t he str string ing to be created created is too short, the t he result resulting ing string is i s truncated. truncated. STRFINDC Find a charact character er in a stri st ring. ng. Input paramet parameters Return etur n parameters STRFINDS Find a substring substri ng in a st st ring. Input paramet parameters Return etur n parameters
FU32 FU33 FU32 FU33
Number Number of t he string str ing Character haract er t o be found found 0 if success successful ful,, otherwise ot herwise error >0 position, posit ion, 1 for first fir st charact charact er 0 if charac character ter not found
FU32 FU33 FU32 FU33
Number Number of t he string str ing in which whi ch t o search search Number Number of t he substring substr ing t o be found 0 if success successful ful,, otherwise ot herwise error >0 position, posit ion, 1 for first fir st charact charact er 0 if substri substring ng not not found
STRGROW FST Version 4.02.21 Manual
180 180
Enlarge the string str ing memory for a singl singlee st string ri ng from the available availabl e memory. memory. Input paramet parameters FU32 Number Number of t he string str ing FU33 New New maximum maximum size size of the string str ing in charact characters (without \0 at the t he end end of the stri string) ng) Return etu rn paramet parameters FU32 0 if success successful ful,, otherwise ot herwise error The exist existing ing string stri ng is retained unchange unchanged. d. After this t his a string stri ng with wit h a length up to the maximum maximum length set here ca cann be written writ ten to t o the t he address address determined determined with wit h STR STRADDR ADDR.. Each Each other other invocat i nvocatio ionn of a stri st ring ng module modul e can change change the the set value val ue again. STRHTOA Convert a word int i ntoo a hexadecimal hexadecimal stri st ring. ng. Input paramet parameters FU32 Value alu e t o be converted convert ed FU33 Number Number of t he string str ing Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error A '$' ' $' charac character ter is inserted i nserted before the t he four hexade hexadecima cimall numeric numeric characters. characters. STRICMP Compare two stri st rings ngs character character by character. Input paramet parameters FU32 Number Number of t he first fi rst string str ing FU33 Number Number of t he second second string str ing Return etur n parameters FU32 0 if success successful ful,, otherwi otherwise se error FU33 1 if i f characters characters in first fi rst string stri ng >characters >characters in second string stri ng 0 if both bot h stri strings ngs are identical -1 if charac characters ters in first string
181 181
Transfer ransfer the left l eft substring substri ng of a specif specified ied length into i nto a string. stri ng. Input paramet parameters FU32 Number Number of t he source string str ing FU33 Number of characters FU34 Number umber of the desti destination nation string stri ng Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error If the t he source source st st ring is i s shorter shorter than the specif specified ied length, the t he source source string stri ng is copied. STRLEN Lengt engt h of a string. str ing. Input paramet parameters Return etur n parameters
FU32 Number Number of t he string str ing FU32 0 if success successful ful,, otherwise ot herwise error FU33 Length
STRLOWER Convert onvert a string to t o lower lowe r case. case. Input paramet parameters FU32 Number Number of t he string str ing Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error Note! Count Country-spec ry-specifific ic characters like li ke Ä, Ä, Ö, Ü are not convert converted. ed. STRMID Convert onvert a middle substring substri ng from a specifi specified ed starting starti ng position and of a specifi specified ed length into a string. Input paramet parameters FU32 Number Number of t he source string str ing FU33 Start character character in t he source string, str ing, 1 for the t he first charac character ter of the source string stri ng FU34 Number of characters FU35 Number umber of the destination destinati on string stri ng Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error If the t he starting start ing position positi on is not found in the source source str string, ing, a blank string stri ng is produced. produced. If the t he source source string stri ng is too short, the t he desti destination nation string str ing is shortened accordingly. STRNCMP Compare ompare the t he first fi rst charac characters ters of two strings stri ngs.. Input paramet parameters FU32 Number Number of t he first fi rst string str ing FU33 Number Number of t he second second string str ing FU34 Number of characters Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error FU33 1 if i f characters characters in first fi rst string stri ng >characters >characters in second string stri ng 0 if both bot h stri strings ngs are identical -1 if charac characters ters in first string
182 182
Return etur n parameters
FU32 0 i f success successful ful,, otherwise otherwise error FU33 1 if i f characters characters in first fi rst string stri ng >characters >characters in second string stri ng 0 if both bot h stri strings ngs are identical -1 if charac character ter in first string
The set memory size for strings strings Maximum Maximum number of strings stri ngs Memory used by stri strings ngs Free memory remaini remaining
STRUPPER Convert a stri st ring ng ttoo upper case. case. Input paramet parameters FU32 Number Number of t he string str ing Return etur n parameters FU32 0 if successful successful,, otherwise ot herwise error Note! Count Country-spec ry-specifific ic charact characters like like ä, ö, ü are not converted. convert ed. STRUSAGE Det Determine the th e amount amount of used and and free fr ee memory for strings. str ings. Input paramet parameters None Return eturn parameters paramet ers FU32 Memory used by stri strings ngs FU33 Free memory remaini remaining ng STRUTOA Convert onvert an unsigned unsigned word into int o a string. str ing. Input paramet parameters FU32 Value alu e t o be converted convert ed FU33 Number Number of t he string str ing Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error STR2FLAG Copy a string stri ng into int o a flag fl ag word area. area. Input paramet parameters FU32 FU33 FU34 Return etur n parameters FU32 FU33
Number Number of t he string str ing Maximum number of characters characters t o be copied Number Number of t he flag fl ag word 0 if success successful ful,, otherwise ot herwise error Number Number of charact characters actually actuall y copied
FLAG2STR Copy a flag fl ag word area into int o a st string. ri ng. FST Version 4.02.21 Manual
183 183
Input paramet parameters
FU32 Number Number of t he string str ing FU33 Number of charact characters t o be copied FU34 Number Number of t he flag fl ag word Return etur n parameters FU32 0 if success successful ful,, otherwise ot herwise error Each ach flag fl ag word contains contai ns two characters. characters. The STR STR2FL 2FLAGand FLA FLAG G2STR 2STRmodules modul es are part part icularl icul arlyy useful useful in conjunct conjunctiion wit wi t h t he fil fi le modules modul es FR FREAD and FW FWRITEwhen iti t is necessary necessary to t o writ wri te strin str ings gs to to a file. fi le. The The specifi specified ed flag fl ag word area area is used for interme int ermediat diatee storage. storage. 4.11
Screen Screen and Keyboard
Version 1.02 The purpose of this t his driver dri ver is to allow all ow the design of a simple, texttext - based based operating interface i nterface for projects proj ects using the t he FS FST IPC IPCsoftware, soft ware, working worki ng directl dir ectlyy on the t he IPC IPC. It is i s not not intended i ntended to replace sophisticated user user interfac int erfaces es with wit h this thi s driver. In particular, parti cular, there t here are no graphical representations representat ions involved invol ved or complex complex windowing, windowi ng, nor even even list li st boxes or such features. The The emphasis emphasis here is placed clearly on simplici simpl icitty. For many applications, however, however, a simple simpl e user user interface i nterface of this t his kind ki nd is i s entirely entirel y adequa adequate. te. Typical project pr ojects, s, which may be abl ablee to use this thi s user user interface, int erface, would have only a small number of displays di splays for alphanumeric alphanumeric values values and would allow all ow only a few inputs i nputs or selections selections t o be made. 4.11.1 Introduction The user int i nterface erface is based on the t he familiar famil iar FST software. soft ware. It has very very much the t he same same looklook and-feel as this does. It has a blue fram fr amee with wit h a titl ti tlee for the t he work area, area, a message message line li ne and and eight function f unction keys. The The method method of operating operati ng this user interfac interf acee is simi similar lar to t o that of operat operat ing the FST.
The user interface int erface is divided di vided int i ntoo indivi ind ividual dual screen pages. pages. The The various screen pages pages are are access accessed ed via vi a a number, beginni b eginning ng at 0. Each Each screen screen page contains a useruser- defi nable nable number of fixed f ixed frames, frames, tex t extt blocks, display displ ay areas areas and and input i nput fields. fi elds. Swit Switching ching from one screen screen page page to another is i s normally normall y taken care of by the t he user user program progr am in the FS FST. There There are appropriat appropr iatee program modules, modules, which deal deal with wit h this. t his. All screen pages pages are independent of each each other. ot her. The amount of memory space space provided allows all ows for up to t o 50 screen pages, pages, each each with wit h a maximum of of 50 input fields. All input fields fi elds use the string str ing data type from the t he string driver. dri ver. There There are are no dynamic dynamic displays. It is an easy easy matter matt er to t o create such displays, di splays, however, by invoki i nvoking ng the t he SC SCRWRITE ITEmodule. modul e. It is possible to switch swit ch between between the t he FS FST user interfac int erfacee provided by this t his driver dri ver and and the t he com command interpreter of the main runtime program (FSTPCR22). If the necess necessary ary extr extraa effort is made, it is also possible to t o set up specialspecial-purpose purpose scre screen en representations representations (for example example to suit particular parti cular customer customer requirem requir ements). ents). There There is a number of FST Version 4.02.21 Manual
184 184
modules for this t his purpose, which disreg disregard ard the conditions conditi ons that otherwise ot herwise gene generally, rally, apply appl y and which access access the screen and and keyboard directl di rectly. y. 4.11.2 Operati peration on of the user user interface The met method of operati op erating ng the user interface int erface is based based on that for t he FS FST software. soft ware. The The table tabl e below shows shows the functi functions ons of of the t he keyboa keyboard rd but without wit hout the t he standard standard letters let ters that are entered in tthe he respec respectitive ve input fields. fi elds. Keyboard TAB ENTER Down Arrow
Function Move t o t he next next input field fi eld
Shifthift TAB Up arrow
Move Move to the previous previous input field
HOME
Move to the first fi rst input field fi eld
END
Move to the last input field fi eld
BS
In overtype mode: mode: one character character t o the left; left ; in insert mode: mode: delete t he charcharacter acter to t o the left of the t he cursor cursor
Left Left arrow
One charact character t o t he left lef t
Right arrow
One character character t o t he right ri ght
INS
Toggle between overtype mode (cursor is an underline underl ine character) and inse i nsert rt mode (cursor (cursor is i s a block) block)
DEL DEL
Delete elet e t he charact character at t he position posit ion of t he cursor
Alt-F Alt -F10 10
Switch wit ch t o t he screen screen of the main runtime runt ime program progr am (can be deacti deactivated) vated)
Process Processiing of t he entr ent ry of o f ESC, SC, F1 t o F10, 10, CTRLTRL-UP UP AR ARROW, OW, CTRL TRL-DOWN DOWN AR ARROW, OW, PAG PAGE-UP, UP, PAGE-DOWN, CTRL- HOME, CTRL-END, CTRL-PAGE-UP and CTRL-PAGE-DOWN must be dealt with wit h by the user program. program. All inputs input s of standard charac charactt ers (letters (lett ers and and digits) digi ts) are made made directly directl y into int o the vari vari ous strings stri ngs that are provided for each each input field. f ield. 4.11.3 Functionality If necess necessary, ary, strings stri ngs assigne assignedd for input fields fi elds are shortened shortened to the maximum length length of tthe he defined input field. fi eld. In the case case of input i nput fields f ields for passwords, passwords, the t he length length is i s reduced reduced to zero zero before edit editing; ing; i.e. i. e. the string stri ng is deleted. It is possibl possiblee to switch between the FS FST user user interfac int erfacee and the command command interpreter int erpreter of the runtime runti me main main program. program. This This can be done done in two t wo ways: ways: either eit her directly directl y via the t he keyboard keyboard or by the user program program in i n the t he FS FST via the t he SCR SCRFLIP module: modul e: In the t he CI: CI: The Fcommand command switches swit ches to t o the t he current screen screen page. FST Version 4.02.21 Manual
185 185
The D command command switches swit ches to a specifiable specifi able page. Switching by a program: The SC SCRFLIP modul modulee switches swit ches bet between the current curr ent page of the t he user interf i nterface ace and and the t he runrun t ime main program. The SCRXCHGmodule modul e switches swit ches between between the the pages of the user interf nt erface. ace. To switch swit ch to the t he screen screen of the main runtime runt ime program from the screen screen page page itse it selflf:: Enter nt er ALT ALT-F10 -F10 on the t he keyboard (this (t his functi f unction on can be deacti deactivated). vated). Note! The str string ing driver dri ver is a prerequisite prerequisit e and is always used used for handling handli ng strings stri ngs.. 4.11.3.1
Attributes
The FS FST software soft ware makes makes use of several standardised standardi sed colou colourr attr at trib ibut utes es for representing parts part s of the t he screen. screen. These These standard att at tribut ri butes es are are access accessib ible le via vi a a numberi numbering ng system. Number umber Attribut Attr ibutee 0 Normal Normal screen screen attribut att ributee 1 Highlighti ighli ghting ng scree screenn attribut att ributee 2 Attribut tt ributee of the frame 3 Attribut tt ributee of edited fields 4 Attribut tt ributee of function keys keys 5 Attrib tt ribut utee of the messag messagee line li ne 6 Attrib tt ribut utee of t he messag messagee line li ne in the event event of errors In some case casess the attribut att ributee can can be freely chosen. chosen. It consists of one word (16 bits); bit s); its i ts highe hi gherrorder byte contains the attribut att ributee and and its it s lower-order lower-order byte must be equa equall to t o zero. zero. The higher-order higher-order byte contains the t he followi fol lowing: ng: Bits Use 0 t o 7 Always 0 8 t o 11 Foreground colour 0 = blac bl ack, k, 1 = blue bl ue,, 2 = green, green, 3 = cyan, cyan, 4 = red, red, 5 = magenta, magenta, 6 = brown, brown, 7 = light li ght grey, grey, 8 = dark grey, grey, 9 = light l ight blue, blue, 10 = light li ght green, green, 11 = light l ight cyan, cyan, 12 = light li ght red, red, 13 = light li ght magenta, magenta, 14 = yellow, 15 = white 12 t o 14 Background Background colour 0 = blac bl ack, k, 1 = blue bl ue,, 2 = green, green, 3 = cyan, cyan, 4 = red, red, 5 = magenta, magenta, 6 = brown, brown, 7 = light grey FST Version 4.02.21 Manual
186 186
15
= 0 for normal normal display = 1 for flashing display display This means, means, for example, example, that the attribu att ribute te $9E (= $80 + $10 +$0E +$0E)) is i s the attribut att ributee for flash f lash-ing display di splay of yellow yell ow characters characters on a blue bl ue background. background. 4.11.3.2
Feature eatur e flags fl ags
The following foll owing properties properti es can can be set set with wi th the t he use of ffea eatu ture re flags. B i t
V Meaning a l u e
0
0 ALT ALT-F10 -F10 switching swit ching enabled 1 ALT ALT-F10 -F10 switching swit ching disabled disabl ed
1
0 Normal use of t he keyboard 1 Direct reading of the keyboard keyboard for special special applications applicati ons
2
0 Normal use of the keyboard keyboard 1 Reading eading of the the keyboard wit wi th handshake via SCR SCRKBD
3
0 No automatic automati c act act ivation ivati on 1 Automatic Automat ic activati acti vation on (== (= = ACTIVAT IVATE)
15 Set by the driver in the event event of syntax syntax errors If bit 2 is i s set set (handshake (handshake with SCRKBD), BD), iti t must be ensured ensured that all inputs input s will be picked up by the user program program becaus becausee otherwise input will wil l be blocke bl ocked. d. Bit 15 is set by the t he driver during processing processing of the initi ini tialisati alisation on data. data. 4.11.4 Configuri onfi guring ng t he driver dri ver and assigning parameters parameters If you you want t o use the the screen driver dri ver in i n an FST FSTIPCproj project, you must enter enter the t he SC SCREEN driver dri ver in the t he driver configurer confi gurer and assign assign the t he necess necessary ary paramet paramet ers. The The driver for f or the t he user inte int erface makes makes internal use of the driver dri ver for strings stri ngs.. This driver must therefore also also be confi configgured. IPC drive: Specify the drive dri ve on which whi ch tthe he screen screen driver dri ver SCREEN.EX N.EXE is located l ocated or onto ont o which whi ch it is to t o be loaded. Screen type: Here Here you must specif specifyy the type t ype of video card that is connect connect ed: CGA CGA card wit wi t h 80x25 80x25 characters charact ers MGA MGA MGA MGA card wit with 80x25 characters HGC HGC HGC HGCcard wit wi th 80x25 charact char acters ers EGA EGA card wit wi th 80x25 charact char acters ers VGA VGA VGA VGA card wit wi t h 80x25 characters charact ers BG20 BG20 BG20 BG20 on the IPCwit wi t h 40x30charac 40x30charactters The default defaul t setting sett ing is CG CGA. File il e with wit h screen layout [.TXT [.TXT]: Here you you must specify specify the t he name name of of the t he file fil e that contains the data for init i nitiali ialising sing the user user interface. FST Version 4.02.21 Manual
187 187
4.11.5 Initiali Init ialising sing the user user interfac int erfacee In principle principl e the user user interfac int erfacee does not require any initiali init ialisa satition on data becaus becausee it can can be configured and parameterised entirely via modules during execution of the user program. It is however considerabl considerablyy simpler and clearer, as well as being more economical economical with wit h avai avai lable space, space, to carry out initi ini tialisati alisation on with separate separate files fi les intended solely solely for this t his purpose. purpose. 4.11.5.1
Initialising Initi alising the user user interfac int erface e in text form
The text form supports support s the t he syntax syntax described described in the foll f ollowing. owing. Eac Eachh line l ine may contain contain only onl y one statement statement relating relati ng to the screen screen layout. Lines beginning beginning with wi th a semicolon semicolon ‘;’ ‘ ;’ are comm comments. ents. Blank lines li nes may may be insert inserted ed to improve readabili readability. ty. A st st atement atement consists consists of one keyword keyword and a larger or small smaller er number number of additional additi onal parameters, parameters, depending depending on the t he type of statement. statement. Additional ddit ional comments comments after aft er a complete complete statem st atement ent in i n the t he same same line as the statem stat ement ent itself i tself are allowed, but they must must also begin begin with wit h ‘;’. ‘; ’. There are two types t ypes of statem stat ement: ent: init i nitiali ialisa satition on statements statements and stat statem ements ents for the definiti defini tion on of screen pages. Initialisation statements must always be placed before the statements for screen screen pages. pages. Numeric Numeric values must always al ways be specif specified ied in i n decimal form. for m. St St rings ri ngs are are ene nclosed closed between between single or double quotati quotation on marks, marks, such such as in ‘T ‘ Text’ ext’ or " Text" ext" . Str Strings ings for the t he t itles it les of frame f ramess must contain contain the t he usual usual FST chara characters, cters, such as as in " [ Tit Title le ]" . Initialisa Initi alisatition on statements statements ACTIVATE Display on the t he screen screen is acti activated vated immediat immediately ely after the t he project is i s loaded. FEATURE_FLAGS The feature flags fl ags are are set set to the value val ue that is passed passed here. As As the fea f eatt ure flags fl ags also contain the ACTIVAT IVATEflag, fl ag, itit is i s necessary necessary eit either to t o leave leave out ACTIVAT IVATEor to t o place pl ace it after aft er FEATUR ATURE E_FL _FLAGS. AGS. The The meanings of of the t he indi i ndivi vidual dual bit bi t s of t he feature feat ure flags f lags are explained expl ained above. 4.11.5.2
Statements tatement s for screen screen pages
SCREEN SCREEN_INITIAL St art of the t he definit defi nition ion of a screen page with wit h iti ts tit t itle. le. The SC SCREEN_INIT N_INITIAL IAL stateme stat ement nt must not be used more than th an once, once, because only one o ne page can can be the fir f irst st page p age.. TEXT ng> For display di splay of non-varying non-varying tex t extt on the t he screen screen page. page. If the t he X position posit ion is i s negative, negative, the t he text is is displayed such such that the t he string stri ng ends ends at the specifi specified ed posit position ion (right -justifi -justi fied). ed). TEXT_ST _STRING < posit ion>< posit ion> e>< TEX TEXT_SIG T_SIGNE NED D numb er> TEX TEXT_UN T_UNSIG SIGNE NED D numb er> TEX TEXT_HE T_HEXWORD numb er> For display di splay of the t he contents contents of a string stri ng or of a flag f lag word as a signed signed value, an unsigned unsigned value or a hexadecimal hexadecimal value. When When the t he hexadecimal hexadecimal form f orm is i s used, there there are always 4 characters characters displa di splayed. yed. Unwan Unwanted ted characters characters may need need to t o be overwritten. overwrit ten. A typica typi call situation sit uation is display di splay of a short short string st ring at a position posit ion that t hat previously contained a longer string. If the t he X position posit ion is i s nega negatt ive, the tex t extt is i s displayed such such that the t he str string ing ends at the t he spec specifified ied posit position ion (right(right- justified). justif ied). MESSAGE MESSAGE ESSAGE_ER _ERRO ROR R FST Version 4.02.21 Manual
188 188
Display Displ ay for for the message line; li ne; a maximum of 78 characters. characters. In the t he case of MESS MESSAG AGE E_ER _ERROR the display di splay is made made with the attribut att ributee for error messa messages ges.. FUNCTION_KE TION_KEY Y < r>< ng> ng> Strings tr ings for the t he upper and and lower l ower halves halves of a label for f or a function functi on key, each each consisting consisting of up to to 8 characters. INPUT INPUT_S _ST TRING < h> > INPUT_P INPUT_PAS ASSW SWOR ORD D < on>< on>< h> er> Definition efinit ion of a positioned posit ioned input field. fi eld. All inputs i nputs are made made in strings. str ings. Thes Thesee must must then be evaluat evaluated ed by the t he user user program by means means of appropriate appropri ate string stri ng functions. functi ons. For For details detai ls refer to to t he desc descript ription ion of the t he str string ing driver. dri ver. The The width specif specified ied here is the max maximum imum length of the t he edited edit ed str string, ing, and the string numbe numberr indicates i ndicates the number number of the t he str string ing (in the t he str string ing driver) dri ver) t hat is used for t he edited edit ed string. str ing. When INPUT INPUT_P _PA ASSWORD is used, the t he contents content s of t he string stri ng are are not displaye di splayed. d. FRAME < h>< > For drawing a frame, frame, positioned posit ioned with wit h the t he top left l eft-hand -hand corner corner (x,y) (x,y) and a frame titl ti tle. e. Even Even if t he title tit le is blank it must be spec specifified. ied. The The title titl e must must not be longer than the spec specifified ied width widt h less two. Example Below is a simpl simplee exam exampl plee consist consisting ing of three t hree screen screen pages pages for the t he production product ion of an exextraordinarily tr aordinarily important import ant basic basic foodstuff foodstuf f for mankind. mankind. ; default setting setti ngss FEATURE_FLAGS 1 ACTIVATE ; screen screen 0, first fi rst screen screen SCREEN_INITIAL N_INITIAL " [ Chewing hewi ng Gum Produ roduct ctiion ]" TEXT 30 10 0 " Chewing hewi ng Gum Prod Product uctiion is i s Ready" Ready" FUNCTION_K UNCTION_KE EY 1 " STAR START" T" " " ; screen screen 1, interrogation of production producti on quanti quantity ty SCREEN " [ Chewi Chewing ng Gum Pro Product ductiion ]" TEX TEXT 20 10 0 " How many?" INPUT_STRING 45 10 5 1 FUNCTION_KE UNCTION_KEY Y 1 " STAR START" T" " SYST SYSTE EM" FUNCTION_KE UNCTION_KEY Y 2 " STOP" STOP" " SYSTE SYSTEM" M" ; screen 2, error SCREEN " [ Chewi Chewing ng Gum Pro Product ductiion ]" TEXT 20 10 1 " Production roduct ion Interrupt Interrupted" ed" MESSA MESSAG GE_ER _ERROR" Nothi Not hing ng Works Works Wi Wit hout hout Gum" um" FUNC UNCTION_K ION_KE EY 1 " conti cont inue" " " Switching wit ching between between the individual indi vidual screen screen pages pages and and evaluat evaluation ion of the input i nput of the production producti on quantity quantit y takes place place within wit hin the t he control control program and is not shown here. here. 4.11.6 Extended CI CI commands commands for the t he user user interface int erface This driver dri ver includes a comma command nd interpreter int erpreter add-on add-on to allow al low operation of t he user interface int erface via the t he comma command nd interpreter. i nterpreter. FST Version 4.02.21 Manual
189 189
The additio addit ional nal commands commands are as as follo fol lows: ws: !4F Toggle bet bet ween t he user interface int erface and t he screen screen of t he main runtime runti me program (flip (fli p display). display). Within it hin the t he user user interface i nterface you you can can switch swi tch back to the t he scree screenn of the t he main main runti r untime me program program via t he keyboard by press pr essiing ALT ALT-F10 -F10 (thi (t hiss function funct ion can be deacti deactivated). vated). The response returned is " = 0" when when the system system swit switch ches es to the t he scre screen en of of the t he runti runtime me main main program, program, and and " = 1" is returned ret urned when the system sswit witches ches to the screen screen of the t he user user interface. int erface. !4Dx Select screen page x. The respo respons nsee returned returned is " = 0" if it was was not possible possible to t o selec selectt the page, page, where whereas as "= " = 1" is returned ifi f the system succe succeeds eds in switching swit ching to the specif specified ied screen screen of the t he user user interface. i nterface. !4S Status tat us output. outp ut. If the t he screen screen of the main runtime runt ime program is currentl currentlyy displayed, the respons responsee that is returned is i s " = 0, fl ags>," . If a page of the t he user interface int erface is displayed, displ ayed, t he response response is " = 1, fl ags>,, number>" . In these comma commands, nds, " !4" is the t he prefi prefixx for a CI CI call call in a driver; in i n this thi s cas casee it is in driver dri ver 4 for t he user user interf i nterfac ace. e. 4.11.7 Modules Modul es for access accessing ing the user user interface int erface There is a number of ready r eady-- prepared modules modul es that can be used for operating operat ing the t he user interface. int erface. These These must be import impor t ed into int o a project in i n the usual way, where they can be used used as CFMs or CMPs. Overview of modules modul es SCR SCRATTR ATTR Calcul alculat atee screen att at t ribu ri butt e SCR SCRCLEAR LEAR Clear ear scr screen SCRCUGPO Det Determine ermi ne current current posit posi t ion of cursor SCRCUSP USPO Set curren currentt posi posit ion of cursor cursor SCR SCRCUTY UTYP Set cur cursor sor type ype SRC SRCDOKE DOKEY Y Executi xecut ion of a keyboar keyb oardd input npu t SCREDIT Add an input npu t fi eld el d SCREKBD Clear keyboar keyb oardd buf buffer SCRFILL Fill an area wit wi t h space characters charact ers SCRFKEY Speci Specify t he label of a funct fu nctiion key SCR SCRFLAG LAGS Set featur eat uree flags SCR SCRFLIP Toggle Toggl e between bet ween screen screen page page a nd FSTCI SCR SCRFRAME Draw a frame rame SCRKBD Interrogate Int errogate t he last input inp ut on t he keyboard SCRMSG MSG Display Displ ay a stri st ring ng i n t he message line SCR SCRNEW NEW Draw a new, blank bl ank screen SCRPUTS Writ ri t e a stri st ring ng at a set posit posi t ion on t he screen SCRUPDT UPDT Refre efresh sh screen screen cont cont ents ent s SCRWRITE Writ ri t e a stri string ng at a set posit posi t ion on t he screen SCRW0808 0808 8x8 block bl ock characters charact ers SCRW0814 0814 8x14 block bl ock characters charact ers SCR SCRXCHG Swit Swit ch between bet ween screen screen pages pages The SC SCRCLEAR LEARand SCR SCRPUTS UTS modules modul es shoul should not not be used used unl unless ess absolut absol utel elyy necessary necessary because because they circumve cir cumvent nt the check check for for an activated acti vated screen page. page. SCRATTR
Calculate screen screen att attribut ributee Input parameters FST Version 4.02.21 Manual
FU32 Foreground Foreground colour FU33 Backgro Background und colour colour 190 190
Output ut put parameters parameters
FU34 Flashing option opt ion if not equal equal to 0 FU32 At t ribut rib utee
SCRCLEAR
Clear screen. Input parameters None Output ut put parameters None This module shoul sh ouldd be used used for special applicati appl ications ons only and also also works work s on the screen screen of the runtime runti me main program. The The modul modulee is not necessa necessary ry for normal applicati appl ications. ons. SCRCUGPO
Determine current current position posit ion of cursor. cursor. Input parameters None Output ut put parameters parameters FU32 X starting starti ng position, posit ion, column, 0 t o 79, in t he case case of errors error s-1 FU33 Y starting start ing position, posit ion, line, 0 t o 23, in t he case case of errors error s-1 This module modul e shoul shouldd be used for special applicat appl ications ions only onl y and also also works on the t he screen screen of the runtime runti me main program. The The modul modulee is not necessa necessary ry for normal applicati appl ications. ons. SCRCUSPO
Set current position posit ion of cursor. cursor. Input parameters parameters FU32 X starting starti ng position, posit ion, column, 0 to 79 FU33 Ystarting starti ng position, posit ion, line, 0 to 23 Output ut put parameters None This module modul e should be used for special special applicatio appli cations ns only and also also works work s on the screen screen of the runtime runti me main program. The The modul modulee is not necessa necessary ry for normal applicati appl ications. ons. SCRCUTYP
Set cursor type. t ype. Input parameters
FU32 0 = No cursor 1 = Underline cursor 2 = Block cursor cursor Output ut put parameters None This module modul e should be used for special special applicatio appli cations ns only and also also works work s on the screen screen of the runtime runt ime main program. progr am. The Themodule modul e is not necessary necessary for normal nor mal applications. applicat ions.
SCRDOKEY
Execution of a keyboard input. Input parameters FU32 Keyboard Keyboard input inp ut Output ut put parameters None This module modul e should be used for special applicat appl ications ions only onl y and also also works work s on the screen screen of the runtime runti me main program. The The modul modulee is not necessa necessary ry for normal applicati appl ications. ons. SCREDIT
Add an input field. f ield. Input parameters
Output ut put parameters parameters FST Version 4.02.21 Manual
FU32 FU33 FU34 FU35
Xposition posit ion Y posit posi t ion Width = 0, standard input field = 1, input field for f or passw password ord (stri (string ng not not visible) FU36 St ring ri ng number FU32 = 0 if display displ ay appears appears 191 191
= -1 if the t he position position is not admissible, admissible, the string does does not exist or the t he user user interface int erface is not activated acti vated Before Before editing editi ng is carried carried out, the string str ing that t hat is i s passe passedd is shortened to the t he maximum maximum length as spec specifified ied in width. wi dth. In the t he cas casee of non-visible non-visibl e strings for passwords, passwords, the string stri ng is deleted before befor e editing edit ing (length (l ength 0). The SC SCREDIT module modul e adds an an input inpu t field fi eld to t o the the current screen. Thi Thiss is not no t retained after switching swit ching to a different dif ferent screen screen page, page, howeve however. r. SCREKBD
Clear keyboard buff bu ffer er Input parameters Output ut put parameters
None None
SCRFILL
Fill il l an area with wit h space charact charact ers. Input parameters parameters FU32 FU33 FU34 FU35 FU36 Output ut put parameters parameters FU32
X starting start ing position, positi on, column, 0 to 79 Y starting start ing position, posit ion, line, 0 to 24 Width, dt h, >= 1 Height Height , >= 1 Attribute = 0 if display displ ay appears appears = -1 if position is not admiss admissible ible or t he user user interface int erface is not act act ivated
SCRFKEY
Specif pecifyy the label l abel of a function functi on key. Input parameters FU32 FU33 function key FU34 key key Output ut put parameters parameters FU32
Number Number of t he functi fu nction on key, 1 t o 8 Number of the string stri ng for the upper
half of the
Number of the string stri ng for the lower lower half half of the function functi on
= 0 if display displ ay appears appears = -1 - 1 if the t he string does does not not exist, exist, the t he number number of the function functi on key is not admissible or the t he user user interfac interf acee is not activated Each function functi on key has an an upper and a lower string. str ing. Each Each st string ri ng may contain up u p to t o 8 characters.
SCRFLAGS
Set properties propert ies of the t he user user interface i nterface (feat (feat ure flags fl ags). ). Input parameters parameters FU32 0 = Interrogate Interrogate current current sett setting ing 1 = New sett setting ing If FU32 = 1 FU33 Featur eaturee flags fl ags Output ut put parameters FU32 Current urr ent setting sett ing of t he feature feat ure flags fl ags The basic basic setting sett ing is i s 0. SCRFLIP
Toggle the screen screen display displ ay bet between t he current currently ly selected screen screen page in this t his driver dri ver and t he screen of t he main mai n runt ru ntiime program pro gram FST FSTP PCR22. Input Inp ut paramet parameters ers FU32 0 FSTP STPCR22 screen 1 Currently urrent ly selected screen screen page in t his driver dri ver Output ut put parameters None SCRFRAME FST Version 4.02.21 Manual
192 192
Draw a frame. Input parameters parameters
Output ut put parameters
FU32 FU33 FU34 FU35 FU32
X starting starti ng position, posit ion, column, 0 to 78 Y starting start ing position, posit ion, line, li ne, 0 t o 23 Width, dt h, >= 2 Height Height , >= 2 = 0 if display displ ay appears = -1 if position posit ion is not admissible admissible or or t he user user interfac int erfacee is not activated activat ed
SCRKBD
Interrogate the last input i nput on the t he keyboard. keyboard. Input parameters None Output ut put parameters parameters FU32 = 0 if no input is avail available able <>0 last input Currently urrentl y the followi fol lowing ng inputs are supported. Key Hexadecimal Hexadecimal Low-order Low-order byte byt e Decimal ESC 001B 001B 27 Charact haracter er codes F1 013B 013B 315 Scan codes codes F2 013C 013C 316 F3 013D 317 F4 013E 013E 318 318 F5 013F 319 F6 0140 320 F7 0141 321 F8 0142 322 F9 0143 323 F10 0144 324 PAGE UP 0149 0149 329 329 PAG PAGE DOWN DOWN 0151 0151 337 337 CTRL ARROW ARROW LEFT LEFT 0173 371 CTRL TRL ARRO ARROW W RIGHT 017 0174 372 37 2 CTRL END 0175 01 75 373 37 3 CTRL TRL PAGE PAGE DOWN 0176 37 374 CTRL TRL HOME 0177 0177 375 375 CTRL TRL PAGE PAGE UP 018 0184 388 38 8 If direc di rectt rea r eading ding of the t he keyboard keyboard is activated activated (feature flag fl agss bit 1 = 1), all inputs i nputs are retur returned ned wit wi t hout process pro cessiing. Normal processing processing can be carried carri ed out using usi ng the the SC SCRDOK DOKEYmodule. modul e. SCRMSG
Display ispl ay a string stri ng in t he messag messagee line, li ne, optionally opti onally as an error message message.. Input parameters FU32 Number Number of t he string str ing t o be displayed displayed FU33 0 for normal display display 1 for an error message message Output ut put parameters FU32 = 0 if display displ ay appears = -1 if the string stri ng does does not exist exist or t he user user interfac int erfacee is not activated activat ed To delete delet e the message message line, use a blank stri st ring. ng. SCRNEW
Draw a new, blank bl ank screen in i n the t he same way as FS FST. Input parameters None Output ut put parameters None FST Version 4.02.21 Manual
193 193
This module should only be used used if the t he option opti on of initiali init ialisa satition on is not not used but instead the scree screenn is built bui lt directly directl y by programming programming in the t he user user program. SCRPUTS
Write ri te a string stri ng at at a set set position posit ion on the t he screen screen.. Input parameters FU32 Number Number of t he string str ing t o be displayed displayed FU33 X starting starti ng position, posit ion, column, column, 0 to 79 FU34 Y starting start ing position, posit ion, line, 0 to 24 FU35 0 for normal display display 1 for highlighted hi ghlighted display display Output ut put parameters parameters FU32 = 0 if display displ ay appears appears = -1 if the t he string does does not exist, e xist, the posit position ion is invali invalidd or the t he user user interfac int erfacee is not activated activat ed This module modul e should be used for special special applicatio appli cations ns only and also also works work s on the screen screen of the runtime runti me main program. The The modul modulee is not necessa necessary ry for normal applicati appl ications. ons. SCRUPDT
Refresh screen contents. Input parameters None Output ut put parameters None The only item it emss redisplayed are are data from the t he operand operand memory memory and strings stri ngs,, but not edited edit ed strings. SCRWRITE
Write ri te a string stri ng at at a set set position posit ion on the t he scree screenn Input parameters FU32 Number Number of t he string str ing t o be displayed displayed FU33 X starting start ing position, posit ion, colu column, mn, 0 t o 79 or negat negat ive FU34 Y starting start ing position, posit ion, line, 0 to 24 FU35 0 for normal display display 1 for highlighted hi ghlighted display display Output ut put parameters parameters FU32 = 0 if display displ ay appears appears = -1 if the t he stri string ng does does not exist, exist, the t he positi position on is invali invalidd or the t he user user interfac int erfacee is not activated activat ed If the t he Xposition posit ion is i s negative, negative, the string stri ng is displayed in such such a way way that it i t ends at the specif specified ied posit position ion (right-justi (right-justified). fied). SCRW0808
Write rit e a string stri ng comprisi comprising ng large 8x8 8x8 block bl ock characters characters at at a set set position positi on on the t he screen screen.. Input parameters FU32 Number Number of t he string str ing t o be displayed displayed FU33 X starting start ing position, posit ion, colu column, mn, 0 t o 72 or negat negat ive FU34 Y starting starti ng position, positi on, line, li ne, 0 t o 14 FU35 0 for normal display display 1 for highlighted hi ghlighted display display Output ut put parameters parameters FU32 = 0 if display displ ay appears appears = -1 if the t he stri string ng does does not exist, exist, the t he positi position on is invali invalidd or the t he user user interfac int erfacee is not activated activat ed If the t he X position posit ion is i s negative, negative, the str string ing is displaye di splayedd in such a way t hat it ends at the t he spec specifified ied position posit ion (right-justi (ri ght-justifified). ed). Internall Internallyy the module module uses uses the st st ring with wit h the number number 0 as as an an interim int erim storage storage locati location. on. SCRW0814
Write rit e a string stri ng comprisi comprising ng large 8x14 block cha charac racters ters at a set position posit ion on the t he screen screen.. Input parameters FU32 Number Number of t he string str ing t o be displayed displayed FST Version 4.02.21 Manual
194 194
FU33 X starting start ing position, posit ion, column, 0 to 72 or negative negative FU34 Y starting start ing position, posit ion, line, li ne, 0 t o 8 FU35 0 for normal display display 1 for highlighted highli ghted displa displayy Output ut put parameters parameters FU32 = 0 if display displ ay appears appears = -1 if the t he string does does not not exist, exist, the t he position position is invali invalidd or the t he user user interfac int erfacee is not activated activat ed If the t he Xposition posit ion is i s negative, negative, the string stri ng is displayed in such such a way that it ends at the t he specif specified ied position posit ion (right-justi (ri ght-justifified). ed). Internall Internallyy the module module uses uses the st st ring with wit h the number number 0 as as an an interim int erim storage storage locati location. on. SCRXCHG
Switch wit ch between the predefined predefi ned screen screen pages pages in the driver. dri ver. Input parameters FU32 Number Number of t he screen screen page, indexing from 0 Output ut put parameters None The predefined screen screen pages pages are transferred from fro m the project proj ect on startup start up of the t he runtime runt ime main program. This This module modul e does not swit swi tch (flip) (fli p) between the screen screen page of the t he user user interface int erface and the th e screen screen of the runtime runt ime main main program. 4.11.8 Complete omplet e example example A complete complete (though (t hough simple) exam example ple of the applica appli catition on of the user interfac int erfacee is shown below. It relates to a hypothetica hypotheti call production plant for chewing gum. gum. The The program uses uses four screen screen pages. Screen
Purpose and program status stat us
0 1 2
Basic Basic screen for STE STEP screen_0 screen_0 Ask for producti produ ction on quantit quant ityy in STEP screen_1 screen_1 St atus of production product ion in STEP screen_2, screen_2, production product ion is simulated simul ated using timer T0 3 Screen for for system system fault faul t in STE STEP screen_3 The script script for the t he definition definit ion of the screen screen pages pages is given below. below. ; default sett settings ings FEATURE_FLAGS 1 ACTIVATE ; screen screen 0 SCREEN_INITIAL N_INITIAL " [ Chewing hewi ng Gum Gum Pro Produ ducti ction on ]" TEXT 20 7 0 " The Most Important Import ant Food Food in i n the t he Worl World" d" TEXT TEXT30 10 4070 407044 " CHEWING HEWING GUM " TEXT 22 15 0 " Chewing hewi ng Gum Gum Producti Product ion is i s Ready." Ready." FUNCTION UNCTION_KE _KEY Y 1 " STAR START" T" " " ; screen screen 1 SCR SCREEN " [ Chewing hewi ng Gum Gum Pro Produ duct ctiion ]" TEXT 15 10 0 " How many?" INPUT_STRING 30 10 5 1 FUNCTION UNCTION_KE _KEY Y 1 " STAR START" T" " " ; screen screen 2 SCR SCREEN " [ Chewing hewi ng Gum Pro Produ duct ctiion ]" FST Version 4.02.21 Manual
195 195
TEXT 25 9 0 " requested" request ed" TEXT 25 11 0 " produ produced" ced" TEXT TEXT_UNSIG _UNSIGNE NED D -42 -42 9 0 1 FUNCTION_K TION_KE EY 2 " STOP STOP"" " " ; screen screen 3 SCR SCREEN " [ Chewing hewi ng Gum Pro Produ duct ctiion ]" TEXT 26 10 1 " Missing Missi ng Liq Liqui uidd Rubber." Rubber." MESSA MESSAG GE_ER _ERROR" No Chew Chewiing wit wi t hout hout Rubber ubber."." FUNC UNCTION_K ION_KE EY 1 " conti cont inue" " " In the basic basic sett settings ings it is i s establi establishe shedd that it i t is i s not not to t o be permitted permit ted to t o swit switch ch from a screen screen page to the screen screen of the t he runtime runti me main main program. As As far as the plant operati operating ng staff is i s conconcerned, therefore, therefor e, the CI CI is not accessible. accessible. For For the t he automation automati on engineer, on the other ot her hand, t he CI CI can be reached reached at any time t ime via vi a a connected connected host. The program for the t he production product ion plant is i s listed list ed below. below. It was not considered considered nece necess ssary ary to show the all alloca ocatition on list li st in i n this t his context. 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 001 2 0013 001 3 0014 0015 0016 001 6 0017 0018 0019 0019 0020 0021 0022 0023 0024 0025 0026 02 6 0027 0028 002 8 0029 0029 0030 0031 0031 0032 0033 0034 0034 0035
" " Chewing Gum Productio roduct ionn " " a trivi tr ivial al exam example ple for string stri ng and screen screen driver " " Dr. F. Haase, aase, D 40597 Düsseldorf Düsseldorf " " -----------------------------------------------------------------------------------------------------------------------------------STEP Init
(1)
" some initi ini tial al settings setti ngs
THEN LOA LOAD D K315 " value val ue for F1 key TO F1_KEY 1_KEY' value val ue for F1 key LOAD LOAD K316 " value value for fo r F2 key TO F2_KEY 2_KEY' value val ue for F2 key LOAD LOAD K0 " value valu e of zero TO ZER ZERO ' zero value value " " -----------------------------------------------------------------------------------------------------------------------------------STE STEP Screen_0 Screen_0
(2)
THEN THEN CMP 1
" init nitial screen ' SCR SCRKBD
LOAD LOAD PAR PARAM_1 TO KEY KEYSTR STROKE OKE IF =
'ret ' retur urned ned paramet parameter er 1 ' t he obvi obviou ouss
KEY KEYSTR STROKE OKE ' t he obvi obviou ouss F1_KE 1_KEY' value valu e for for F1 key
THEN THEN LOAD LOAD ZER ZERO ' zero value val ue TO AMOUNT 'am 'amount to prod roduce
FST Version 4.02.21 Manual
196 196
0036 TO NPR NPRODUC DUCED ' produced prod uced so far 0037 0038 0038 CMP 2 'SC ' SCR RXCHG XCHG 0039 WITH ITH K1 " flip fl ip t o screen screen 1 0040 0041 0042 " " -----------------------------------------------------------------------------------------------------------------------------------0043 0044 STE STEP Screen_1 Screen_1 (3) " request request amount 0045 0046 0046 THEN THEN CMP 1 ' SCR SCRKBD 0047 0048 LOAD LOAD PARAM_1 ARAM_1 'ret ' returned urned parameter paramet er 1 0049 0049 TO KEY KEYSTR STROKE OKE ' t he obvi obvious ous 0050 0051 0051 IF KEY KEYSTR STROKE OKE ' t he obvi obviou ouss 0052 = F1_KE 1_KEY' value valu e for for F1 key 0053 0054 0054 THEN THEN CMP 5 ' STR STRATOU ATOU 0055 WITH ITH K1 " convert user input inp ut in string str ing 1 0056 0057 005 7 LOAD LOAD PAR PARAM_1 'ret ' retur urned ned paramet parameter er 1 0058 TO NER NERROR " 0 if a valid vali d unsigned unsi gned number number 0059 0060 006 0 LOAD LOAD PAR PARAM_2 'ret ' retur urned ned paramet parameter er 2 0061 0061 TO AMOU MOUNT " use user inpu inputt value, lue, amount ount to prod produc ucee 0062 0063 IF " ? user input valid 0064 ( NER NERROR 'erro ' errorr flag fl ag word word 0065 = ZERO ) " has t o be zero 0066 AND ( AMOUN AMOUN ' amount to produce produce 0067 > ZERO ) " should be >0 0068 0069 06 9 THE THEN CMP 2 ' SCRX SCRXC CHG 0070 WITH ITH K2 " flip fl ip t o screen screen 2 0071 0072 " time ti merr 0 for producti production on simulati simulation on 0073 LOAD LOAD K100 " 1 sec 0074 TO TV0 " t o produce produ ce a single singl e chewing gum 0075 0076 SET T0 " start time ti merr (i.e. production) producti on) 0077 0078 0079 " " ------------------------------------------------------------------------------------------------------------------------------------0080 0081 STEP Screen_2 creen_2 (4) " producti produ ction on display display 0082 0083 08 3 THEN THEN CMP 1 ' SCR SCRKBD 0084 0085 008 5 LOAD LOAD PAR PARAM_1 'ret ' retur urned ned parameter parameter 1 0086 0086 TO KEY KEYSTR STROKE OKE ' t he obvi obviou ouss 0087 0088 0088 IF KEY KEYSTR STROKE OKE ' t he obvi obviou ouss FST Version 4.02.21 Manual
197 197
0089 = F2_KE 2_KEY' value valu e for for F2 key 0090 0091 " stop producti production on 0092 09 2 THEN THEN CMP 2 ' SCRX SCRXC CHG 0093 WITH ITH K0 " flip fl ip t o screen screen 0 0094 0095 0095 JMP TO Screen_0 (2) (2 ) 0096 0097 IF N T0 " 1 sec elapsed, simulate simul ate producti produ ction on 0098 0099 0099 THEN INC NPRODUCED ' produc produced ed so far 0100 0101 0101 CMP 3 'ST ' STR RUTOA UTOA 0102 WITH ITH NPR NPRODUC DUCED ' produced prod uced so far 0103 WITH ITH K2 " t o string stri ng 2 0104 0105 0105 CMP 4 'SC ' SCR RWRITE WRITE 0106 WITH ITH K2 " string str ing 2 0107 WITH ITH K-42 -42 " X 0108 WITH ITH K11 " Y 0109 WITH ITH K1 " highlighted highli ghted attribu att ribute te 0110 0111 SET T0 " start st art again 0112 0113 IF " ? done 0114 NPR NPRODUCED ' produced so far 0115 > AMOUNT ' amount t o produce 0116 0117 11 7 THEN THEN CMP 2 ' SCRX SCRXC CHG 0118 WITH ITH K0 " flip fl ip t o screen screen 0 0119 0120 JMP TO Screen_0 Screen_0 (2) " done, don e, back 0121 0122 012 2 IF PLANT LANTE ERR' error err or in plant pl ant 0123 0124 124 THEN THEN CMP 2 ' SCRX SCRXC CHG 0125 WITH ITH K3 " fli fl i p t o screen screen 3 0126 0127 0128 " " ------------------------------------------------------------------------------------------------------------------------------------0129 0130 STEP Screen_3 creen_3 (5) " error displ di splay ay 0131 0132 0132 THEN THEN CMP 1 ' SCR SCRKBD 0133 0134 0134 LOAD LOAD PAR PARAM_1 'ret ' retur urned ned paramet parameter er 1 0135 0135 TO KEY KEYSTR STROKE OKE ' t he obvi obviou ouss 0136 0137 0137 IF ( KEY KEYSTR STROKE OKE ' t he obvi obviou ouss 0138 = F1_KE 1_KEY ) ' value valu e for fo r F1 key 0139 0140 014 0 AND AND N PLANT LANTE ERR' error err or in plant pl ant 0141 FST Version 4.02.21 Manual
198 198
0142 14 2 0143 0144 0145 0146 0147
THEN THEN CMP 2 SET SET
' SCRX SCRXC CHG WITH ITH K2 " fli fl i p t o screen screen 2 T0
" restart timer
JMP TO Screen_2 Screen_2 (4) " continu continuee product prod uctio ionn
In the t he exam exampl ple, e, the steps and the scre screens ens are are synchroni synchronised sed with wit h each each other. other. In real-worl real -worldd situati sit uations ons a somewhat somewhat more compl complex ex method of synchronising synchronisi ng will wil l be required. requi red. In such such case casess it is worth wort h separati separating ng the actual automa aut omatition on tasks and represe representat ntation ion on the screen screen into int o two t wo different dif ferent programs. programs. In order to t o save save on computi computing ng time ti me for screen screen display, the program for this hi s can can be started start ed as a cycli cyclical cal program, for f or example example every every 500 msec (cf. (cf. funcf unction module F4). 4.11.9 Special pecial appli applica catitions ons For the t he purposes purposes of this t his driver dri ver for user interfac int erfaces es,, special special applications are applicati applications ons where represe representati ntation on and operati operation on do not follow fol low the t he rules of the t he FS FST ssoft oftware ware but instead i nstead are supposed supposed to foll f ollow ow different dif ferent rules rul es,, which are usually usually customer customer -specif -specific. ic. Bit 1 must be set in the t he FE FEATUR ATURE E_FLA _FLAG GS. This is i s done done wit wi t h the t he SCR SCRFLAG LAGS modul module. Repr Represent esentat atiion on the t he screen screen is then creat created with wit h two modules. modul es. SCR SCRCLEAR LEAR Clear ear scr screen SCRCUGPO Det Determine ermi ne current current posit posi t ion of cursor SCRCUSP USPO Set Set current current posit posi t ion of cursor SCRCUTY UTYP Set cursor cur sor type ype SCRPUTS Writ ri t e a stri string ng at a set posit posi t ion on t he screen These modules should be used used for special special applicati appl ications ons only and also work on the t he screen screen of the runtime runtime main program. The The modules are are not necessary necessary for normal applicati appl ications. ons. The module for keyboard keyboard interrogation i nterrogation returns r eturns all inputs input s from the t he keyboard. keyboard. SCRKBD Interrogate Int errogate t he last input inp ut on t he keyboard You can be return ret urned ed to t o normal normal furt f urther her processing processing via vi a the th e SC SCRDOK DOKEY module. modul e. SCRDOKE DOKEY Y 4.12
Process rocess input npu t from fr om t he keyboar keyb oardd
32-Bit 32-Bit Arit hmeti hmetic c
These hese modules allow performing performi ng arit arithme hmetiticc operati operations ons on 32 bit values t hat are hold in two t wo 16-bi 16- bitt FS FST operands. operands. Overview LADD LCMP LDIV LDIV LMUL MUL LNE LNEG LSUB
Addit ddi t i on of 32-bit 32-bi t values. Comparison ompari son of 32-bit values. Division ivi sion of 32-bit 32-bi t values. Multipl Mult iplicati ication on of 32-bit values. values. Change of sign for a 32-bi 32- bitt value. Subtracti ubt raction on of 32-bit 32-bi t values.
LADD
Addition ddit ion of 32-bit values. values. Input paramet parameters FST Version 4.02.21 Manual
FU32 Low word of t he 1st operand FU33 High word of t he 1st operand 199 199
Output ut put paramet parameters
FU34 FU35 FU32 FU33
Low word of the 2nd operand High word of t he 2nd operand Low word of t he result resul t High word of t he result
LCMP
Comparison of 32-bit 32- bit values. Input paramet parameters FU32 FU33 FU34 FU35 Output ut put paramet parameters FU32
Low word of t he 1st operand High word of t he 1st operand Low word of t he 2nd operand High word of t he 2nd operand Result in bit bi t form for m $xx01 1st operand <2nd operand (signed) $xx02 1st operand operand = = 2nd operand (signed) $xx04 1st operand >2nd operand (signed) $01xx 1st operand <2nd operand (unsigned) $02xx 1st operand operand = = 2nd operand operand (unsigne (unsigned) d) $04xx 1st operand >2nd operand (unsigned)
LDIV
Division ivisi on of 32-bit values (result (result = 1st operand operand / 2nd operand). operand). Input paramet parameters FU32 Low word of t he 1st operand FU33 High word of t he 1st operand FU34 Low word of the 2nd operand FU35 High word of t he 2nd operand Output ut put paramet parameters FU32 Low word of t he result resul t FU33 High word of t he result LMUL
Multiplication Multi plication of 32-bit values values.. Input paramet parameters FU32 FU33 FU34 FU35 Output ut put paramet parameters FU32 FU33
Low word of t he 1st operand High word of t he 1st operand Low word of the 2nd operand High word of t he 2nd operand Low word of t he result resul t High word of t he result
LNEG
Change of sign for fo r a 32-bi 32-bitt value. val ue. Input paramet parameters FU32 FU33 Output ut put paramet parameters FU32 FU33
Low word of t he operand High word of t he operand Low word of t he result resul t High word of t he result
LSUB
Subtrac ubtr actition on of 32-bit values (result (result = 1st operand operand - 2nd operand). operand). Input paramet parameters FU32 Low word of t he 1st operand FU33 High word of t he 1st operand FU34 Low word of the 2nd operand FU35 High word of t he 2nd operand Output ut put paramet parameters FU32 Low word of t he result resul t FU33 High word of t he result
FST Version 4.02.21 Manual
200 200
4.13
Incremental Increment al Encoder
This hi s program module has been designed designed to t o use the increm i ncremental ental encoder encoder module modul e IM2x for your FST IPC projects. Import The module IM2X needs needs to be b e import impor t ed to your project pr oject as a program module (e.g. CMP CMP 0). Functions of the IM2x module Overview Functi unction (passed (passed in i n FE FE33) -1 Init/ Init / Reset eset counters counters 0 Read counter registers regist ers (values) 1 Load counter 1 with wit h new value 2 Load counter 2 with wit h new value 3 Load Load counter count er 3 wit wi t h new value value 4.13.1 Init/ Reset eset Input parameters parameters
FU32 KSWsett sett i ng (1 or 2) FU33 -1 FU34 Operatin perat ingg mode (see t able able below) below) Output ut put paramet parameters FU32 Current status stat us of counter 1 FU33 Current status statu s of counter 2 FU34 Current status statu s of counter 3 The numbers numbers 1, 2 and 4 in i n the t he following foll owing table t able refer to t o 1-, 2- or 4-edge counting on the t he given channel. channel. If only a single number is specif specified ied for fo r two two channels channels this thi s means means t hat they t hey are are cascascaded. Please lease consult consult the IM20/ IM21 data sheets sheets for more details detail s and and operating operati ng modes. modes. It is, however, however, not possible to t o use the IRQ IRQ possibi possibililitities es of the IM2x hardware hardware with this t his software module. Mode Mode (hex) $1124 $1125 $112D $116D $1126 $112 $112E E $116 $116E E $1136 $1176 $11B6 $1320 $1360 $13A0 $13 A0 $1321 $1361 $13A1 $13 A1 $1322 $1362 $13A2 $13 A2
Channel 1 1 2 2 2 4 4 4 4 4 4 1 1 1 2 2 2 4 4 4
Channel 2 1 1 2 2 1 2 2 4 4 4
Channel 3 1 1 1 2 1 1 2 1 2 4 1 2 4 1 2 4 1 2 4
4.13.2 Read counter registers regist ers (values) Input parameters parameters FU32 KSW setti sett ing ( 1 or 2) FST Version 4.02.21 Manual
201 201
Output ut put paramet parameters
FU33 FU32 FU33 FU34
0 Current status stat us of counter 1 Current status statu s of counter 2 Current status statu s of counter 3
4.13.3 Load counter 1 with wit h new new value Input parameters parameters FU32 KSWsett sett i ng (1 or 2) FU33 1 FU34 New New given counter valu valuee for counter 1 Output ut put paramet parameters FU32 Current status stat us of counter 1 FU33 Current status statu s of counter 2 FU34 Current status statu s of counter 3 4.13.4 Load counter counter 2 with wit h new new value value Input parameters parameters FU32 KSWsett sett i ng (1 or 2) FU33 2 FU34 New New given counter valu valuee for counter 1 Output ut put paramet parameters FU32 Current status stat us of counter 1 FU33 Current status statu s of counter 2 FU34 Current status statu s of counter 3 4.13.5 Load counter 3 with wit h new new value Input parameters parameters FU32 KSWsett sett i ng (1 or 2) FU33 3 FU34 New New given counter valu valuee for counter 3 Output ut put paramet parameters FU32 Current status stat us of counter 1 FU33 Current status statu s of counter 2 FU34 Current status statu s of counter 3
FST Version 4.02.21 Manual
202 202
4.14
Fast counters
The last two input inp utss of the t he second second group of the t he FE FECCompact (I1.2 (I1. 2 and I1.3) as well as the first fi rst two inputs input s of HC0x (I0.0 and I0.1) can be used as 1 or 2 independent, independent, high-speed high-speed counters. Still Sti ll the input inpu t s can can be read as standard input i nputs. s. For For the t he FE FECStandard series the th e followi fol lowing ng inputs are used: FC4xx, FC FC5xx - I1.6 I1.6 and I1.7 I1.7 FC6xx - I3.6 I3. 6 and I3.7 I3. 7 These hese counters are interrupt driven and once activated, activated, operate operate independentl independentlyy of the user’s control contr ol programs pr ograms and therefore therefo re are not affected af fected by factors fact ors such as cont control rol program scan scan time. 4.14. 4.14.11 Using the t he modul module FE FECCNTR NTR The program module provides functions for: Defining efi ning the t he operating operati ng paramet parameters of each each Count Counter er • • Activati cti vating ng each each Count Counter er Resetti esett ing each Count Counter er • Checking the t he status stat us and current value val ue of each Count Counter er • Upon achieving achieving the t he preset preset value, va lue, the t he fast counter module can be configured configured to t o eie i• ther: Modify an output word (OW (OW) • Start a defined program • Modify an output word (OW (OW) and Start Start a defined program. • Each ach fast counter count er can can be independent independently defined defi ned for automatic automat ic or manual manual restarti rest arting. ng. 4.14.2 Required equir ed drivers dri vers You need to t o include i nclude the t he driver dri ver FE FECCCNTR NTR t o you driver dri ver configurat confi guration ion of your proj p rojec ectt. And use the " Import Module" function functi on to t o add the t he FE FECCNTRmodule to t o your control project. Using Using the t he Fast Fast Count Counter er Module Modul e The Fast Fast Count Counter er module modul e is easily easi ly acces accessed sed from eit ei ther Statement List or Ladder Diagram Diagram programs using conventi conventional onal FS FST program module modul e syntax. The The followi fol lowing ng sect sections prese pr esent nt t he vari various ous functions funct ions provided provi ded by the Fast Fast Count Counter er module. 4.14.3 4.14.3 Reset of a Fast Count Counter er input inp ut parameters FU32 0 = reset of counter count er defined defi ned in FU33 FU33 0 = counter 0 1 = counter counter 1 output parame parameters ters none This functi f unction on provides provi des a means means t o deact deact ivate ivat e a Fast Fast Count Counter. er. No harm will occur occur if i f a nonactive acti ve Fast Fast Counter ount er is i s Reset. Reset. Example: IF ... " User ser defined defi ned condit conditions ions THEN HEN SET SET CMPx " Call all Fast Count ounter er modul mod ulee WITH V0 " Specify Specif y RESET SET functi unct ion WITH ITH Vy " Speci Specify which whi ch Fast Counter: ount er: " y=0: first counter ounter " y=1: seco second nd counter counter 4.14.4 Defining efi ning the operation operati on of a Fast Count Counter er input inp ut parameters FU32 1 = parameter settings sett ings of counter defined defi ned in FU33 (only possibl possiblee if the t he counter counter is inactive) inacti ve) FST Version 4.02.21 Manual
203 203
FU33 0=fi 0= first rst counter counter 1=second counter FU34 counter preselect value (16-bit (16-b it decimal or HEX HEX) (range 0 ...65535, ...65535, $0...$ $0...$F FFFF) FU35 define defi ne desired action acti on when preselect preselected count value val ue is reac r eached. hed. 0 = no activit activities ies (defa (default ult)) 1 = modify modify an output word 2 = start a program program 3 = start st art a program and modif modifyy aann output word FU36 high byte byt e = program number low byte = output word numbe numberr All values must be specified specifi ed in HEX HEX. Example: program no. 12, 12, output word no. 0: $0C00 $0C00 FU37 high byte = output mask mask low byte byt e = value (set (set or res r eset) et) All values must be specified specifi ed in HEX HEX. Example: set set output out put x.7, outputs outpu ts x.0...x.6 unchang unchanged: ed: $8080 set set output outpu t x.7, output out putss x.0...x.6 x.0...x.6 are rese resett : $FF $FF80 FU38 0 = no automatic automati c restart of a counter 1 = automa aut omatiticc restart restart of a counter counter output parame parameters ters none This his function functi on provides provi des the means means to define defi ne how eac eachh of the t he Fast Fast Count Counters ers will wil l operate. ope rate. This functio funct ionn should only onl y be call called ed before a Fast Fast Count Counter er is act act ivated ivat ed or use t he Rese Resett functi f unction on prior to t o ccalling alling this thi s functi function. on. Each ach valid input i nput signal pulse pul se is summed and upon reaching reaching this thi s preselect preselect value, the t he acti action on defined in parameter 4 will be performed. Four choices are permitted: No acti action on is taken. t aken. 2. A spec specifified ied digital digi tal output word (OW (OW) is be modified modifi ed 3. A specifi specified ed St Statement List or o r Ladder Ladder Diagram program is started start ed A spec specifified ied digit di gital al output out put word is modified modif ied AND AND a specifi specified ed program program is started. start ed. Paramet arameter 5 serves serves to furt fu rther her define defi ne the act action(s) specified specifi ed in parameter 4. This This parameter must be specified in hexadecimal format whereby the high byte indicates the program number number (to (t o start) and the low byte byt e indicates the output word to be modified. modifi ed. If parame parameter ter 4 <>V3, >V3, then t hen either eit her or both bot h unused bytes are simply ignored. i gnored. Examples: V$0600 specifies specif ies output out put word (OW) (OW) 0 and program 6. V$0901 specifies specifi es output word (OW) (OW) 1 and program pr ogram 9. Paramet arameter 6 only has meaning meaning ifi f Parameter Parameter 5 was assigned assigned a valu valuee of 1 or 3, indicat i ndicat ing that t hat a defined output out put word (OW) (OW) is to t o be modified modif ied when the t he defined Fast Fast Count Counter er reaches reaches the preselect value. This his paramet parameter must be specif specified ied in i n hexad hexadecimal ecimal format whereby the high byte byt e indicates indi cates the output " mask" mask" to apply while while the t he low byte, which which bit bitss within the specif specified ied output output word (OW (OW) are to t o be Set Set or Rese Resett. By separating separati ng these t hese valu values, es, the user u ser can separatel separatelyy specify which bits bit s are enabled enabled or disa di sabled bled from modifica modifi catition. on.
FST Version 4.02.21 Manual
204 204
Examples: V$8080 Set Set output out put x.7, leave outputs output s x.0 - x.6 untouched untouched V$FF $FF01 Set Set out ou t put x.0, reset out puts put s x.1 - x.7 x.7 Paramet arameter 7 allows all ows the programme pro grammerr to t o decide whether or not the specif specified ied Fast Fast Count Counter er should be automatically restarted after having reached the preselected value. 4.14.5 Starting art ing a Fast Count Counter er input inp ut parameters FU32 2= start of counter defined defi ned in FU33 FU33 0 = first fi rst counter 1 = second second counter counter output parame parameters ters none This functi fu nction on provides provid es a means means to activate acti vate a Fast Fast Count Counter. er. Befor Beforee this thi s function functi on is called, the t he Fast Counter Counter should shoul d first f irst be defined. Note! If you have started start ed a Fast Count Counter er (without (wit hout Auto-R ut o-Restart estart enabled) and the counter value reache reachess the pres pr eselec electt value, you must must Reset eset the t he counter counter before attempti at tempting ng to start the counter again. 4.14.6 St atus atu s of a Fast Count Counter er input inp ut parameters
FU32 3 = status stat us of counter defined defi ned in FU33 FU33 0 = first fi rst counter 1 = second second counter counter return ret urn parameters FU32 St St atus atu s 0 = counter act act ive 1 = counter counter inacti inactive ve FU33 current fast counter value FU34 always always 0 This function f unction allows all ows the applica appli catition on program to check check the t he status of a Fas Fastt counter. counter. The status will wil l be equal equal to V1 in only ifi f ALL ALL of tthe he following foll owing conditions conditi ons are are true: tr ue: T The he Fas Fastt Counter has been configured AND the preselected count was reached AND Auto-Restart is NOT NOT enabled. enabl ed. In all al l ot other cases FU32 return returnss V0. V0. Example: IF ... THEN HEN SET SET CMPx WITH ITH V3 WITH ITH Vy
" User ser defined condit conditions ions " Call all Fast Count ounter er modul mod ulee " Specify St atus function funct ion " Speci Specify which whi ch Fast Counter ount er t o check " Now chec checkk results... IF (FU (FU32 = V0) " Then counter is still sti ll active acti ve THEN ... " User defined defi ned actions acti ons LOAD LOAD FU33 " Get Get current curr ent counter count er value valu e and TO R21 " Save it in Register egist er 21
4.15
Positioning
This program pr ogram module adds support for stepper and servo motor motorss (AM1x (AM1x and AM20) AM20) to t o your FST IPC IPCproj pr oject ects. s. 4.15.1 Import Import the module AMXX AMXX into int o your proj pr ojec ectt using Proj Project ect Manageme Management nt - >Import >Import File il e etc. You You now have available available a function f unction module which which expects expects some some input (up to t o 7 integers i ntegers)) and produces produ ces some output outpu t (up to t o 7 int i ntege egers) rs) via vi a FU32 FU32 .. FU38. FU38. FST Version 4.02.21 Manual
205 205
The module does not not really check check whether the t he given parame parameters ters fall fal l within wit hin the t he allowed all owed value range. range. You You will wi ll have to look l ook into i nto the current AM1x and and AM20 AM20 documentati documentation on to t o get an idea about allowed ranges. ranges. 4.15.2 How to use t he module The first fir st input i nput parameter parameter is i s always always the command command number number (i.e. 0 for f or get status, st atus, 1 for f or move absolut absolute, e, 2 for move relat relative ive etc.), the t he secon secondd parameter parameter is always the motor number. number. Supported upport ed are motor numbers from 1 up to 12, where motor 1 will wi ll always corres correspond pond to S0 on the module with wit h switch selector selector 1, motor 2 will wi ll always correspond correspond to S1 on the module with wit h switch swit ch selec selector tor 1, motor 3 will wi ll always correspond correspond to S0 on the module with wit h switch swit ch selector selector 2 etc. Motor Mot or KSW Label Label 1 1 S0 2 1 S1 3 2 S0 4 2 S1 ... ... ... 11 6 S0 12 6 S1 The first fi rst return return parameter (FU (FU32) is always a st st atus value. Additional ddit ional parameters parameters are returned if the command command was a reques requestt for information. i nformation. 4.15.3 Overview FU32 Function 0 Get status stat us 1 Move absolute absolut e 2 Move relative 3 Reference efer ence move 4 Override verri de speed 10 Configure polarity polarit y 11 Configure onfi gure start speed speed and accelerati acceleration on 12* Set PID values values 13 Set actu actual al position posit ion 14* Set positioning positi oning parame parameters ters 15* Set DA output polarity polarit y (AM20 (AM20 S2.2) >S2.2) 17* Polarit olari ty for counting counti ng of increments (AM20 >= 2.2) 18* Multipl Mult iplyy acce accelerati leration on by 16 (AM20 (AM20 >= 2.3) 19* Set Offse ff sett for D/ A converter converter 20 Reset eset module modul e 21 Stop motor 22* Enable or disable motor 23* Delete contouri contouring ng error 30 Get revision 31 Get speeds speeds / target position positi on 32 Get polarit pol arityy and PID parameters 33 Get status stat us for AM20 user 40 Move Move with wit h interpolation I 41 Move Move with interpolat interpolat ion II
FST Version 4.02.21 Manual
206 206
4.15.4 Get stat status us Input parameters parameters Output ut put parameters paramet ers
AM20 only AM20 only onl y
FU32 FU33 FU32 FU33 FU34 FU35 FU36 FU37 FU38
0 Motor Mot or number St atus atus (see Table abl e 1) Swit wi t ch stat status us (see Table abl e 2) Extended xtended statu status, s, (see Table able 3) Low word of current position posit ion High word of current position posit ion In positio posit ionn status stat us (see Table 4) Current urr ent contour contouriing error error
Table 1: Status tat us return retur n values Value Description -1 No module modul e present for motor number 0 Motor is stopped 1 Motor is moving moving 2 Reference efer ence move is active active Table 2: Switch wit ch status Bit Description 0 0= Limit imi t switch swit ch X (AM1x) (AM1x) or + (AM20) inactive inacti ve 1= Limit imi t switch swit ch X (AM1x) (AM1x) or + (AM20) (AM20) act act ivated 1
0= Limit imi t switch swit ch Y (AM1x) (AM1x) or - (AM20) (AM20) inactive inacti ve 1= Limit switch swit ch Y(AM1x (AM1x)) or - (AM20) acti activated vated
2
0= Reference switch swit ch inactive inacti ve 1= Reference switch swit ch acti activated vated
Table 3: Extended statu st atuss Bit Description 0
0= move move directi direction on posit positive ive 1= move direction directi on nega negatitive ve
1
0= Linear ramp 1= no ramp ramp (move with wit h starting starti ng frequenc frequencyy without wit hout ramp)
2
0= Reference eference move is inactive inacti ve / finished fi nished 1= Reference move move is active acti ve
3
0= Reset eset is finished fi nished 1= Reset eset is active acti ve
4
0= Brake Brake ramp terminated 1= Brake Brake ramp ramp active 1= Paramet arameter error (after (aft er axis axis has st started arted moving)
5
0= No limit li mit swit switch ch r error 1= Limit imi t switch swit ch r error is active active
6
0= Relative elati ve move to actu actual al position posit ion 1= Absolute bsolut e move move
FST Version 4.02.21 Manual
207 207
7
0= Axis is at a standstill standsti ll 1= Axis is moving
Table 4: In position posit ion status stat us / Contouring ontouri ng error error / Enable (AM20 (AM20 only) Bit Description 0 Bit is set set if axis axis is within wit hin position position window Bit is set if i f axis has contouri contouring ng error greater greater than t han spec specifified ied maximum maximum 4.15.5 Move absolute absolut e Input parameters parameters
Output ut put parameters paramet ers 4.15.6 Move relative relati ve Input parameters parameters
Output ut put parameters parameters
FU32 1 FU33 Motor Mot or number FU34 Low word of new position posit ion (steps / increments) Range: 0-65535 0 -65535 FU35 High word of new position posit ion (steps / increments) Range: -128 - +127 FU36 Moving Movi ng speed Range / [unit [uni t ] AM10: AM10: - 0-32000 0-32000 / [steps [steps / sec] sec] Range / [unit [uni t ] AM11: AM11: - 0-16000 0-16000 / [steps [steps / sec] sec] Range / [unit [uni t ] AM20: AM20: - 0-32767 ; [10* incr/ sec] sec] = S2.4 FU32 St atus atus (see Table abl e 1) FU33 Extended st status atus (see Table able 3) FU32 2 FU33 Motor Mot or number FU34 Low word of relative posit position ion (steps / increme increments) nts) Range and and unit uni t see absol absolut utee move FU35 High word word of relat relative ive position posit ion (steps (steps / increme increments) nts) Range and and unit uni t see absol absolut utee move FU36 Maximum Maximu m speed Range and and unit uni t see absol absolut utee move FU37 Direction 1 = posit positive ive -1 = nega negatitive ve FU32 St atus atus (see Table abl e 1) FU33 Extended st status atus (see Table able 3)
4.15.7 4.15.7 Reference efer ence move Input parameters parameters
FU32 3 FU33 Motor Mot or number FU34 Speed for reference reference move Range and and unit uni t see absol absolut utee move FU35 Directi Direct ion (see Table able 5) Output ut put parameters paramet ers FU32 St atus atus (see Table abl e 1) FU33 Extended st status atus (see Table able 3) Important: the speed given for the t he reference reference move move will be used used for f or the t he entire moveme movement. nt. This means means you have have to give a speed speed that is suitable suit able as a start/ stop frequen f requency cy since since there is no ramp applied appli ed to the t he reference move. FST Version 4.02.21 Manual
208 208
Table 5: Reference move move options opt ions Value Description 1
move in positive posit ive direction directi on until unti l reference reference switch swit ch reached reached
-1
move in negati negative ve direction directi on until unti l reference reference switch swit ch reached reached
2
move in positive posit ive direction directi on until unti l referenc referencee switch reache reached, d, then move in negati negative ve directi direction on until unti l reference reference swit switch ch freed
-2
move in negat negat ive directi direction on until unt il reference switch swit ch reached, reached, then move in positive posit ive direction directi on until unti l reference reference sswit witch ch freed freed
3
move in positive positi ve direction directi on until unti l reference reference switch reache reached, d, then move in positive posit ive direction directi on until unti l reference reference sswit witch ch freed freed
-3
move in negat negat ive directi direction on until unt il reference switch swit ch reached, reached, then move in negati negative ve directi direction on until unti l reference reference swit switch ch freed
4.15.8 4.15.8 Override verri de Speed Speed Input parameters parameters Output ut put parameters paramet ers 4.15.9 Configure polarity polarit y Input parameters parameters
Output ut put parameters paramet ers
FU32 FU33 FU34 FU32
4 Motor Mot or number Override verri de (0% ... 100%) St atus atus (see Table abl e 1)
FU32 10 FU33 Motor Mot or number FU34 Polarit olari ty of digit digi tal output out puts, s, only AM10 and AM11. AM11. Value for AM20 M20 is i s always " 0" 0 = active low 1 = acti active ve high high FU35 Polarity olarit y of limit li mit switches 0 = normally normall y closed closed 1 = normally normall y opened opened FU36 Polarit olari ty of reference switch swit ch 0 = normally normall y closed closed 1 = normally normall y opened opened FU32 St atus at us (see Table abl e 1)
4.15.10 Configure onfi gure start speed speed and accelerati acceleration on Input parameters parameters FU32 11 FU33 Motor Mot or number FU34 Start Star t speed Range / [unit [uni t ] AM10: AM10: - 0-32000 0-32000 / [steps [steps / sec] sec] Range / [unit [uni t ] AM11: AM11: - 0-16000 0-16000 / [steps [steps / sec] sec] Range / [unit [uni t ] AM20: AM20: - 0-32767 ; [10* incr/ i ncr/se sec] c] FU35 Accelerati cceleration on / Dec Decelerati eleration on Range / [unit [uni t ] AM10, AM10, AM11: FST Version 4.02.21 Manual
209 209
Output ut put parameters paramet ers
- 0-32767 0-32767 / [10*steps [10*steps / sec²] sec²] Range / [unit [uni t ] AM20: AM20: - 0-32767 ; [10* incr/ i ncr/se sec²] c²] = S2.4 FU32 St atus atus (see Table abl e 1)
4.15.11 Configure onfi gure PID values (AM20 only) Input parameters parameters FU32 12 FU33 Motor Mot or number FU34 P-Factor (range (r ange 0-255) FU35 I-F I-Factor (range 0-255) FU36 D-Facto -Factorr (range 0-255) FU37 V-Fac V-Factt or (range (range 0-255) Output ut put parameters paramet ers FU32 St atus atus (see Table abl e 1) 4.15.12 Set actual actual position posit ion Input parameters parameters FU32 FU33 FU34 FU35 Output ut put parameters paramet ers FU32
13 Motor Mot or number Low word of new positio posit ionn High word of new position posit ion St atus atus (see Table abl e 1)
4.15.13 Set positioni posit ioning ng parameters (AM20 (AM20 only) Input parameters parameters FU32 14 FU33 Motor Mot or number FU34 maximum maximum allowed all owed contouring contouri ng error Range ange / [unit]: [unit ]: - 0-32767 / [increme [increments] nts] FU35 In position posit ion window windo w Range ange / [unit]: [unit ]: - 0-2557 / [increments] [increments] Output ut put parameters paramet ers FU32 St atus atus (see Table abl e 1) 4.15.14 Set D/ A output polarity polari ty (AM20 (AM20 >S 2.2 only) Input parameters parameters FU32 15 FU33 Motor Mot or number FU34 Polarity olari ty of D/ A output 0 = normal normal 1 = inverted inverted Output ut put parameters paramet ers FU32 Status Stat us (see Table 1) 4.15.15 Set P divisi di vision on (AM20 >S2.2 >S2.2 only) Input parameters parameters FU32 16 FU33 Motor Mot or number FU34 Division 0 = P factor factor will wi ll functi function on normally normally 1 = P factor will wil l be divided divi ded by 16 Output ut put parameters paramet ers FU32 St atus atus (see Table abl e 1) 4.15.16 Set counter input inp ut polarit pol arityy (AM20 >= S 2.3 only) Input parameters parameters FU32 17 FU33 Motor Mot or number FST Version 4.02.21 Manual
210 210
Output ut put parameters paramet ers
FU34 Polarit olar ityy of counter input inp ut 0 = normal normal 1 = inverted inverted FU32 St atus atus (see Table abl e 1)
4.15.17 Set accelerati acceleration on multip mult iplilicator cator (AM20 >= S 2.3 only) Input parameters parameters FU32 18 FU33 Motor Mot or number FU34 Multiplicator 0 = acce accelerati leration on normal 1 = acce accelera leratition on will be mult multipli iplied ed by 16 Output ut put parameters paramet ers FU32 St atus atus (see Table abl e 1) 4.15.18 Set Offset ff set for D/ A converter (AM20 (AM20 >= S 2.3 only) onl y) Input parameters parameters FU32 19 FU33 Motor Mot or number FU34 Offset: 0 - 127: posit positive ive 128-255: negati negative ve Output ut put parameters paramet ers FU32 St atus atus (see Table abl e 1) 4.15.19 Reset module modul e Input parameters parameters FU32 20 FU33 Motor Mot or number Output ut put parameters parameters FU32 St atus atus (see Table abl e 1) Note Note that t hat ifi f you reset reset one motor of a two t wo motor module the other ot her one will wil l be reset reset as well. 4.15.20 Stop motor Input parameters parameters
FU32 21 FU33 Motor Mot or number Output ut put parameters paramet ers FU32 St atus atus (see Table abl e 1) Stop moveme movement nt using the t he defi defined ned acc accelerat eleration ion value. valu e.
4.15.21 Set / Reset eset enable (AM20 only) Input parameters parameters FU32 22 FU33 Motor Mot or number FU34 0 = reset reset enable output out put 1 = set set enable enable output Output ut put parameters paramet ers FU32 St atus atus (see Table abl e 1) 4.15.22 Delete elet e contouri contou ring ng error (AM20 (AM20 only) Input paramet parameters FE32 23: up driver dri ver version V1.17 FE33 Motor Mot or number Output ut put parameters paramet ers FE32 St atus atus (see Table abl e 1) 4.15.23 Get revision revisi on (AM20 (AM20 only) Input parameters parameters FU32 30 FU33 Motor Mot or number Output ut put parameters paramet ers FU32 Status Stat us (see Table 1) FU33 Revision evisi on number FST Version 4.02.21 Manual
211 211
4.15.24 Get speeds speeds / target position posit ion Input parameters parameters FU32 31 FU33 Motor Mot or number Output ut put parameters paramet ers FU32 St atus atus (see Table abl e 1) FU33 St art frequency frequency FU34 Acceleration FU35 Maximum frequency fr equency FU36 Target position posit ion low word FU37 Target position posit ion high hi gh word 4.15.25 Get polarit pol arityy and PID parameters Input parameters parameters FU32 32 FU33 Motor Mot or number Output ut put parameters paramet ers FU32 St atus atus (see Table abl e 1) FU33 Polarit olari ty register regist er (see Table 6) FU34 P-Factor FU35 I-Factor FU36 D-Factor FU37 V-Factor Table 6: Polarity olari ty Bit Description 0
0= Digital igit al outputs low acti active ve 1= Digital Digit al outputs high active active Only nly AM10 and AM11!
1
0= Divisor ivi sor for P-Factor -Factor is off 1= Divisor ivi sor for P-Fac -Factor tor is on
2
0= Limit switch low acti active ve 1= Limit swit switch ch high active active
3
0= Polarity olarit y of the D/ A converter converter is normal normal 1= Polarity olari ty of the t he D/ A converter converter is inverted
4
0= Reference eference switch swit ch low act act ive 1= Reference switch swit ch high act act ive
5
0= Interpolation Interpolation inacti inactive ve 1= Interpolation active active
6
0= Multipl Mult iplicator icator for acce accelerati leration on is off 1= Multiplicator Multi plicator for accele acceleration ration is on
7
0= Count direction is normal normal 1= Count direction di rection is inverted invert ed
4.15.26 Get status stat us for AM20 user Input parameters parameters FU32 33 FU33 Motor Mot or number Output ut put parameters paramet ers FU32 St atus atus (see Table abl e 1) FU33 St atus atus flags fl ags (see Table abl e 7) FST Version 4.02.21 Manual
212 212
FU34 FU35 FU36 FU37
P-Factor I-Factor D-Factor V-Factor
Table 7: St atus for f or AM20 user user Bit Description 0
0= Enable is off 1= Enable is on
1
1= Motor is stopped st opped 1= Motor is moving
2
0= Reference eference move is stopped / finished fi nished 1= Reference eference move move is acti active ve
3
0= Axis is not in posit position ion window 1= Axis is within posit position ion window
4
0= contouring error is not acti active ve 1= Axis is stopp stopped ed with contouring contouri ng error error
5
0= Posit ositive ive limit li mit switch inacti inactive ve 1= Positive limit li mit swit switch ch activated activated
6
0= Negative egative limit li mit switch inactive 1= Negative egative limit li mit switch acti activa vated ted
7
0= Reference switch swit ch inactive inact ive 1= Reference switch swit ch acti activated vated
4.15.27 Move with wit h interpolati int erpolation on (AM20 (AM20 >= 2.3 only) Input parameters parameters FU32 40 FU33 Motor (1,3,5,7,9,11) FU34 Low word of new new position posit ion / distanc dist ancee for motor motor 1 FU35 High word word of new position posit ion / distanc dist ancee for motor 1 FU36 Low word of new new position posit ion / distanc dist ancee for motor motor 2 FU37 High word word of new position posit ion / distanc dist ancee for motor 2 Output ut put parameters paramet ers FU32 St atus atus (see Table abl e 1) FU33 Error rr or code: code: 0 = OK -1 = wrong motor motor number 4.15.28 Move with wit h interpolati int erpolation on (AM20 (AM20 >= 2.3 only) Input parameters parameters FU32 41 FU33 Motor Mot or (1,3,5,7,9,11) (1,3,5,7 ,9,11) FU34 Move relative relat ive or absolute absolut e 0 = abso absolut lutee 1 = relative FU35 Maximum Maximu m speed FU36 Direction irecti on for motor motor 1 (if relative relati ve move) move) 1 = posit positive ive FST Version 4.02.21 Manual
213 213
Output ut put parameters paramet ers
-1 = nega negatitive ve FU37 Direction irecti on for motor motor 2 (if relative relati ve move) move) 1 = posit positive ive -1 = nega negatitive ve FU32 St atus atus (see Table abl e 1) FU33 Error rr or code: code: 0 = OK -1 = wrong motor motor number -2 = Functi unction on 40 not yet called
4.15.29
Sample programs
4.15.29.1
Sample program for stepper motor (AM1x) (AM1x)
" " Sample ample program program for stepper motor motor " " Uses ses R0 R0 for motor number STEP init " " Start with config configura uration tion IF NOP THEN LOAD V1 TO R0 IF THE THEN CFM 51 WITH WITH CFM 51 WITH ITH WITH ITH WITH WITH ITH WITH ITH CFM 51 WITH ITH WITH WITH ITH WITH ITH STEP loop IF THE THEN CFM 51 WITH ITH WITH LOAD TO IF
AND N THE THEN CFM 51 WITH ITH FST Version 4.02.21 Manual
' Motor Mot or Number
NOP V20 R0
" AMxx modul modu le " Reset ' Motor Mot or Number
V10 R0 V1 V0 V1
" AMxx AMxx module modul e " Set polarit polari t y ' Motor Mot or Number " Outpu ut putt s ACTIVE ACTIVEHIGH HIGH " Limit imi t switche swit chess normally closed " Reference switch swit ch normally normall y open
V11 R0 V10 V1000
" AMxx AMxx module modul e " Set start speed and accelerat acceleration ion ' Motor Mot or Number " 10 steps / sec sec " 10*1000 10* 1000 steps / sec² sec²
NOP V0 R0
" AMxx modul modu le " Get statu st atuss ' Motor Mot or Number
FU34 FW34
' FU34=extended U34= extended status stat us
F1.0 F34.7 34.7 V1
' St art Flag ' Run Flag " AMxx modul modu le " St art absolute absolut e move 214 214
WITH WITH ITH WITH ITH WITH ITH STEP
IF THE THEN CFM 51 WITH ITH WITH LOAD TO
R0 V2000 V0 V2500
' Motor Mot or Number " Position osit ion low word " Position osit ion high word " Moving Movi ng speed 2500 Hz
NOP V0 R0
" AMxx modul modu le " Get statu st atuss ' Motor Mot or Number
FU34 FW34
' FU34=extended U34= extended status stat us
IF THEN
F34.7 34. 7 NOP
IF THE THEN CFM 51 WITH ITH WITH
NOP
' Run Flag
STEP
LOAD TO IF N THE THEN CFM 51 WITH ITH WITH WITH ITH WITH ITH WITH ITH STEP wait IF THE THEN CFM 51 WITH ITH WITH ITH LOAD TO
V0 R0
" AMxx modul modu le " Get statu st atuss ' Motor Mot or Number
FU34 FW34
' FU34=extended U34= extended status stat us
F34.7 34. 7 V1 R0 V0 V0 V5000 NOP V0 R0
" AMxx modul modu le " Get statu st atuss ' Motor Mot or Number
FU34 FW34
' FU34=extended U34= extended status stat us
IF F34.7 34. 7 THEN THEN JMP TO TO loop OTHRW JMP TO wait 4.15.29.2
' Run Flag " AMxx modul modu le " St art absolute absolut e move ' Motor Mot or Number " Position osit ion low word " Position osit ion high word " Moving Movi ng speed 5000 Hz
' Run Flag
Sample program for servo motor (AM20) (AM20)
" " Sample ample program for servo motor " " Uses ses R0 R0 for motor number STEP init FST Version 4.02.21 Manual
215 215
" " Start with config configura uration tion IF NOP THEN LOAD V3 TO R0
' Motor Mot or Number
IF THE THEN CFM 51 WITH WITH
V20 R0
" AMxx modul modu le " Reset ' Motor Mot or Number
V10 R0 V0 V0 V1
" AMxx AMxx module modul e " Set polarit polari t y ' Motor Mot or Number " Always lw ays 0 for AM20 " Limit imi t switche swit chess normally closed " Reference switch swit ch normally normall y open
V11 R0 V5 V1000
" AMxx AMxx module modul e " Set start speed and accelerat acceleration ion ' Motor Mot or Number " 10*5 steps / sec sec " 10*1000 10* 1000 steps / sec² sec²
V12 R0 V1 V2 V0 V3
" AMxx AMxx module modul e " Set PID parameters paramet ers ' Motor Mot or Number " P factor fact or " I factor " D factor fact or " V factor fact or
V14 R0 V10000 V20
" AMxx AMxx module modul e " Set positio posit ioning ning parameters ' Motor Mot or Number " Max contouring contouri ng error [Incr] " Inposition Inposit ion window [Incr] [Incr]
V22 R0 V1
" AMxx AMxx module modul e " enable/ enable/ disable ' Motor Mot or Number " set enable enabl e
CFM 51 WITH ITH WITH WITH ITH WITH ITH WITH ITH CFM 51 WITH ITH WITH WITH ITH WITH ITH CFM 51 WITH WITH WITH ITH WITH ITH WITH ITH WITH ITH CFM 51 WITH ITH WITH WITH ITH WITH ITH CFM 51 WITH ITH WITH WITH ITH STEP loop IF THE THEN CFM 51 WITH ITH WITH LOAD TO IF FST Version 4.02.21 Manual
NOP
NOP V0 R0
" AMxx modul modu le " Get statu st atuss ' Motor Mot or Number
FU34 FW34
' FU34=extended U34= extended status stat us
F1.0
' St art Flag 216 216
AND N THE THEN CFM 51 WITH ITH WITH WITH ITH WITH ITH WITH ITH STEP IF THE THEN CFM 51 WITH ITH WITH LOAD TO IF THEN STEP IF THE THEN CFM 51 WITH ITH WITH LOAD TO IF N THE THEN CFM 51 WITH ITH WITH WITH ITH WITH ITH WITH ITH STEP wait IF THE THEN CFM 51 WITH ITH WITH LOAD TO IF THEN THEN JMP TO TO loop ELSE JMP TO wait
FST Version 4.02.21 Manual
F34.7 34.7 V1 R0 V2000 V0 V2500
' Run Flag " AMxx modul modu le " St art absolute absolut e move move ' Motor Mot or Number " Position osit ion low word " Position osit ion high word " 10*2500 10* 2500 incr/ sec
NOP V0 R0
" AMxx modul modu le " Get statu st atuss ' Motor Mot or Number
FU34 FW34
' FU34=extended U34= extended status stat us
F34.7 34. 7 NOP
' Run Flag
NOP V0 R0 FU34 FW34 F34.7 34. 7 V1 R0 V0 V0 V5000
NOP
" AMxx modul modu le " Get status stat us ' Motor Mot or Number ' FU34=extended U34= extended statu statuss ' Run Flag " AMxx module modul e " St art absolute absolut e move ' Motor Mot or Number " Position osit ion low word " Position osit ion high word " 10*5000 10* 5000 incr/ sec
V0 R0
" AMxx modul modu le " Get statu st atuss ' Motor Mot or Number
FU34 FW34
' FU34=extended U34= extended status stat us
F34.7 34. 7
' Run Flag
217 217
4.16
PID dri ver
This his driver dri ver adds 16 PID PID cont control rol loops loo ps to your FS FST-IPCprojects. proj ects. In this t his docume d ocument nt some terms related to t o contr control ol tec t echnology hnology are are used, used, for explanati explanation on of these no additi additional onal informa infor matition on is avail available able at the moment. moment. 4.16.1 Driver ri ver overview The driver uses a table wit withh the t he PID PID parame parameters, ters, controller controll er input and control controller ler output. output . This table tabl e is located in FlagW FlagWords. ords. The The locati location on where the table t able starts is i s set set through a function functi on module. Configuri onfi guring ng the driver dri ver and assigni assigning ng parameters parameters If you want to use PID PID in an FS FST- IPCprojec proj ect,t, you must enter the t he PID PID driver in i n the the driver dri ver configurer configurer and assign the t he necess necessary ary parameters. Destination drive: Specify the t he drive dri ve on which whi ch the th e PID PID driver PIDD PIDDRV.EX .EXE is located l ocated or onto ont o which whi ch it is to t o be loaded. 4.16.2 4.16.2 Extended xtended CI commands for PID This his driver extends the t he IPC IPCcommand command interpret int erpreter er with wit h the th e following foll owing commands: commands: !29 Display ispl ay version number Display driver dri ver info and version number. number. This This information i nformation will wi ll also be displayed displayed ifi f an unknown command command is is entered (for example example !29abcdef). 4.16.3 Module for PID Overview of modules modul es PIDCFM
Setup and start the t he driver. Input paramet parameters
FU32 Number Number of t he 1st flagword fl agword used for t he paramet parameter er table Output ut put paramet parameters FU32 0 i f successful successful 256 if driver not installed Note! Call Calling ing the t he PIDC PIDCFM function functi on module will wil l reset all flagwords fl agwords in the complete complet e parameter parameter table to 0. 4.16.3.1
Parameter arameter table tabl e
The following foll owing parameter parameter table t able is the t he result result if the PID PIDC CFM function functi on module is called with wi th parameter 500: PID PID PID loop 0 loop 1 loop 15 Man/ Auto Aut o FW500 FW516 FW740 FW740 Setpoi Setpoint nt FW501 FW517 FW741 Process Process FW502 FW502 FW518 FW742 Value Outpu Outputt FW503 FW519 FW743 Value Manua Manuall FW504 504 FW520 FW744 Value Kp FW505 FW521 FW745 Ki FW506 FW522 FW746 Kd FW507 FW523 FW747 Time Time FW508 FW524 FW748 748 Constant FST Version 4.02.21 Manual
218 218
4.16.3.2 Man/ Ma n/ Auto:
Explanation xplanati on of parameters parameters
If this t his parameter is 0, the contr control ol loop l oop is inactive and the m manua anuall value is copied to the t he output out put value. If this t his parameter parameter is 1, the control loop l oop is acti active ve and and the output value is calcucalculated lat ed according according to t o setpoint, setpoint , process process value and contr control ol parameters. parameters. Setpoint:
The target for the t he control controller ler in i n auto mode.
Process rocess value: valu e:
The input value for the t he contr control ol loop. l oop. Outp utput ut value:
The output value from the contr control ol loop. l oop. Manual value:
An operator operat or override overri de in case of manual mode. Kp:
The proportional proporti onal parameter parameter for the t he control control loop. l oop. Ki:
The integ int egral ral parameter parameter for f or the t he control control loop. Kd:
The differe diff erenti ntial al parameter parameter for the t he control control loop. Time constant: constant :
Indicator Indicator for the t he interval interval time ti me wit withh which the control control loop calculates calculates its output value. value. If the t he time ti me constant constant is i s 0 the control loop calculates approximately approximately every every 14 ms, ms, if the t he time const const ant is i s 1 the t he contr control ol loop l oop calculates approximately approximately every every 28 ms, etc. The Setpoi Setpoint nt,, Process Process value, Out Output put value and Manual Manual value valu e are are all in i n the range from 0 to 4095. The Kp, Kp, Ki and Kd valu values es are divided divided by 100 inside i nside the t he control loop. loop. So if you set a Kp Kp of 125 in the t he table, the control control loop calculates wit withh 1.25. 4.17
Serial eri al Communication ommunicati on
Version 1.33 1. 33 This driver dr iver allo al lows ws characters characters to t o be sent and received via standard st andard CO COM ports. port s. HC1X HC 1X and an d HC HC2X 2X
Up to 4 port portss are support supp orted. ed. These can can be eit either CO COM1..C M1..COM4 or COM2..C M2..COM5. Note! The serial serial port on the t he HC2X CPUs labelled label led " COM" is the t he CO COM1 port! port ! HC0X
The interfaces int erfaces CO COM and EX EXT can be used used for for serial seri al communication. communicat ion. Addit ddi t ional COM ports port s on CP3x modul modules es can be used: u sed: Due to mutual mut ual exclusions of external int i nterrupt errupt sources (IRQ (IRQs) you can • either eit her use CO COM2 or COM4. If you do so, for for HC01 HC01 the t he tri t rimmer mmer no longer l onger can be used. For HC0X this also requires to change jumper J1 (see the hardware manual for details). detai ls). On the t he HC HC02 there t here is no tri t rimme mmerr anyway, and no jumpers j umpers have to be changed. changed. Due to mutual mut ual exclusions of external int i nterrupt errupt sources (IRQ (IRQs) you can • either use COM3 or COM5. If you want to t o use CO COM1 on HC02 you can do so, but this does not allow all ow to to • use the ethernet port any longer longer and requires to t o change change another another jumper j umper (see the the hardware manual for for detail det ails). s). On the HC01 HC01 you can use CO COM1 without restri restrictions ctions..
FST Version 4.02.21 Manual
219 219
FECs
The interfaces int erfaces CO COM and EX EXT can be used for serial communication. communicati on. Due to to very limit li mited ed memory in the FC20, only FEC Compacts of the FC3x series and FEC Standards should be used for serial communicat communicat ion. Beginni Beginning ng with wit h version 1.31 the t he driver support suppor t s FIF FIFO Os. Check Check the version number with wit h the t he CI-Comman I-Commandd " !8" which is available availabl e since since version version 1.31.
4.17.1 Selecting electi ng and paramet parameterising erisi ng t he driver dri ver If you wish wi sh to use the serial driver dr iver in an FS FST project, you must enter the t he correct correct driver(s dri ver(s)) according according to t o the t he table below in i n the t he driver confi configurer gurer and parameterise parameterise it. it . 4.17. 4.17.1.1 1.1
HC1X HC 1X and HC HC2X 2X
Please use the SER SERIALDR IALDRdri driver. 4.17.1.2
HC0X
If you are ar e using using only onl y CO COM and/ or EXT EXT please pl ease use the the driver dri ver CO COMEX MEXT. If you are using CP3x please use HC0XCOM instead (this driver includes the rout routii nes nes for for CO COM and EX EXT as well). well ). For HC0X HC0X
FEC Compact omp act
Please use the t he dri driver ver COMEX MEXT. For t he EX EXT port you also need to t o inclu i nclude de the t he dri dr iver FO FOSEX SEXT (FC (FC20
FECStandard Stand ard
Please use the t he dri driver ver COMEX MEXT. Note! Some of the t he modules modul es provided provi ded also require requi re the t he ST STRINGS INGS driver. Destination drive:
Enter the t he drive containi containing ng the serial serial driver or to t o which it is to t o be loaded. loaded. 4.17.2 Modules The modules for serial communication communication require r equire the t he serial serial interfac int erfacee that is used as parameter parameter (FU (FU32). Please Please note the t he followi fol lowing ng assignment assignment of port numbers: nu mbers: COM 255 EXT 0 COM1 1 COM2 2 COM3 3 COM4 4 COM5 5 Note! You You must not use the serial serial port that is used for the t he standard standard CI CI with wit h thes t hesee modules, modules, except except when iti t is i s referred to t o as port 255 (CO (COM). The standard CO COM port for t he CI CI is is set in i n the t he Control ont roller ler Settings Sett ings of the t he FS FST project. proj ect.
FST Version 4.02.21 Manual
220 220
The default sett setting ing for the standard CO COM port is Control ont roller ler Port Number Number FEC COM 255 HC0X COM 255 HC1X COM COM1 1 HC2X COM COM 1 Note! It is not possible possibl e to send or rece r eceive ive #0 or Ctrl-T rl -T charac charactters over over the t he CO COM port (255). Overview OPE OPENCO NCOM CLOSE LOSEC COM GETCOM PUTC UTCOM PRINTCOM READC ADCOM READLC ADLCOM F30 F31 F32 F34 F35 BRE BREAKC AKCOM SETR SETRTS TS IS485
Open serial seri al interf nt erface ace Close seri serial interf nt erface ace Send charact char acter er Receive ecei ve char character act er Send stri st ring ng Receive stri string ng (incl. (i ncl. delimi del imitter) Receive stri string ng (excl. (excl. deli del imit miter) Set i nterface nterface paramet parameters Activat Acti vatee CI Clear buffers buf fers Interrogate Interr ogate status stat us Change deli del imit mit er Set/ Reset hardw har dware are break br eak (SER (SERIALDR IALDRonly) onl y) Acti Active handsh handshak akee for RS485 (SER (SERIALDRonl only) Check if handshake handshake is active acti ve (SER (SERIALDR IALDRonly) onl y)
OPENCOM
Open (initiali (init ialise) se) a serial interfac int erfacee with 9600 baud, 8 data bits, bit s, no parit parity. y. Input paramet parameters FU32 Serial eri al interface int erface Output ut put parameters paramet ers FU32 0 = DONE DONE 1 = ERROR Use F30 inst i nstead ead of OPE OPENCO NCOM for for other ot her com port port setti sett ings. CLOSECOM
Close a previo previ ously opened seri serial al int i nterface. erface. Input paramet parameters FU32 Serial eri al interface int erface Output ut put parameters paramet ers FU32 0 = DONE DONE 1 = ERROR
GETCOM
Read character character from f rom a serial interface. int erface. Input paramet parameters FU32 Serial eri al interface int erface Output ut put parameters paramet ers FU32 0 = DONE DONE 1 = ERROR -1 = NOTHING RE RECEIVED VED For FU32 = DONE FU33 Received ived char. har. (0 to 255) 255) PUTCOM
Write ri te character character to t o a serial interface. i nterface. Input paramet parameters FU32 Serial eri al interface int erface FU33 Char. t o be sent (0 t o 255) Output ut put parameters paramet ers FU32 0 = DONE DONE 1 = ERROR FST Version 4.02.21 Manual
221 221
PRINTCOM
Writ ri t e an FS FST string str ing to t o a seri serial al interf i nterface ace.. Input paramet parameters FU32 Serial eri al interface int erface FU33 Number of FS FST stri string ng t o be sent Output ut put parameters paramet ers FU32 0 = DONE DONE 1 = ERROR
READCOM
Read characters characters from fr om a seri serial al stri st ring ng to a delimi del imitter and save save to an FS FST string. str ing. Input paramet parameters FU32 Serial eri al interface int erface FU33 Number Number of FST string str ing for the charact charact er string. str ing. FU34 Maximum Maximum length ength FU35 Delimit eli miter er (0 t o 255) Output ut put parameters paramet ers FU32 0 = DONE DONE 1 = ERROR -1 = NOTHING RE RECEIVED VED The delimiter delimiter is not written writ ten to the t he stri string ng.. READLCOM
Read characters characters from serial seri al int i nterface erface to selected standard end-of-record character (default (defaul t is CR CR) and save to t o FST FSTstri st ring. ng. Input paramet parameters FU32 Serial eri al interface int erface FU33 Number Number of the FS FST string str ing for the t he charact character stri string. ng. FU34 Max. length lengt h includi i ncluding ng end-ofend-of-record record character. character. Output ut put parameters paramet ers FU32 0 = DONE DONE 1 = ERROR -1 = NOTHING RE RECEIVED VED The deli delimiter miter is written writ ten with the t he stri string. ng. F30
Open port and set set int i nterface erface parameter. parameter. Input paramet parameters FU32 Serial eri al interface int erface FU33 Interface Int erface parameter Output ut put paramet parameters None 7 6 Baud Baud rate
5
4
3 2 Char. length lengt h
Bit
7 1 1 1 1 1 1 1 1
6 0 0 0 0 1 1 1 1
5 0 0 1 1 0 0 1 1
4 0 1 0 1 0 1 0 1
Bit
3 0 0 1 1
2 0 1 0 1
Bits/ charac characters ters 5 6 7 8 (default) (default )
FST Version 4.02.21 Manual
1
0 Parit ari t y
Baud 19200 9600 (default) (default ) 4800 2400 1200 600 300 110
222 222
Bit
1 0 0 1 1
0 0 1 0 1
Parity arit y NONE NONE(default (defaul t ) ODD NONE EVEN
Note! For For the t he CO COM port (255) only onl y the t he settings sett ings N,8,1 are accepted. accepted. Note! For For the t he CO COM port (255) of FC20 only onl y the t he baud rates rat es 9600 or less are useful due to the t he optocouplers. F31
Act Act ivate ivat e CI. CI. Input paramet parameters
FU32 Serial eri al interface int erface FU33 Driver Driver mode: 0=D 0= Disable isabl e CI CI 1=Enable CI, disabled on receiving the CI command " X" 2=E 2= Enable nable CI, CI, ignore i gnore the t he CI CI command " X" Output ut put paramet parameters None Note! The st standard CO COM port for t he CI CI cannot be disabled. di sabled. The standard CO COM port for t he CI CI is i s set set in the t he Cont Control roller ler Settings Sett ings of t he FS FST project. proj ect. The default sett setting ing for the standard CO COM port is Control ont roller ler Port Number Number FEC COM 255 HC0X COM 255 HC1X COM COM1 1 HC2X COM COM 1 F32
Erase interface int erface buffer. Input paramet parameters Output ut put parameters paramet ers
FU32 Serial eri al interface int erface FU32 0 = DONE DONE 1 = ERROR
F34
Interrogate sett settings ings and and status of a serial serial interfac int erface. e. Input paramet parameters FU32 Serial eri al interface int erface Output ut put paramet parameters FU32 Number Number of records in receive buffer buf fer (separated by standard st andard end-ofend-of-record record chara charact cters). ers). F35
Change standard end-of-record character. Default is CR (13). Input paramet parameters FU32 Serial eri al interface int erface FU33 End-of-recor nd-of-recordd characters character s (0 t o 255) Output ut put paramet parameters None BREAKCOM
Send hardware BREAK. Note! This hi s funct functiion is i s only onl y impl i mplemented emented for for the t he SER SERIALDR IALDR(HC1X (HC1X and and HC2x). HC2x). Input paramet parameters FU32 Serial eri al interface int erface FU33 1 = BRE BREAK on 0 = BREAK off FST Version 4.02.21 Manual
223 223
Output ut put parameters
None
IS485
Returns etu rns current current port setting sett ing regarding RS RS485 support. support . Input paramet parameters FU32 Serial eri al interface int erface Output ut put parameters paramet ers FU32 0 = DONE DONE 1 = ERROR FU33 1=R 1= RTS control cont rol for RS485 active acti ve 0=normal 0= normal RS RS232 operation operati on Note! FST driver SERI ALDR ALDRVersi Version on 1.10 1. 10 or or greater gr eater is requi requ ired. This his funct functiion is i s only onl y impl i mplemented emented for for the t he SER SERIALDR IALDR(HC1X (HC1X and HC2x). SETRTS
Enables/ disables disables RT RTS cont control rol for RS485 serial seri al communication communicati on via vi a SM30 IPC IPCmodule. modul e. Input paramet parameters FU32 Serial eri al interface int erface FU33 1 for RS485 operat operatiion, 0 for normal nor mal RS RS232 operatio operat ionn Output ut put parameters paramet ers FU32 0 = DONE DONE 1 = ERROR Note! Has to be called before opening the port. port . • FST driver driver SER SERIALDR IALDRVersi Version on 1.10 1.10 or greater great er is i s requi requ ired. • This hi s funct functiion is i s only onl y impl i mplemented emented for for the SER SERIALD IALDR R (HC1X (HC1X and HC2x). HC2x). • 4.18
TCP/ IP dri ver
Version 1.12 1. 12 This dri d river ver allows all ows the t he IPC IPCto communicate wit wi t h other ot her PC PCs and Cont Control rollers lers using u sing the t he UD UDP or TCP protocol prot ocol from f rom the t he TC TCP/ IP protocol suite. suit e. 4.18.1 Introduction In this thi s document document terms t erms related relat ed to TC TCP/ IP are used, used, for explanation explanati on please refer to one of the t he many many books and and interne int ernett sites. si tes. A good st st arting arti ng point is i s http:/ / ww www.w w.wha hatis.c tis.com om where all kinds of technical terms are explained. 4.18.2 Driver ri ver overview To function funct ion properly properl y every TC TCP/ IP partici part icipant pant (host) (host ) needs an IPaddress and net net mask. mask. The FST TCP/ IP driver dri ver allows all ows 3 ways for configuring configur ing these: t hese: configurati configur ation on in the t he Dri Driver ver configurat ion screen, screen, using usi ng function funct ion blocks blocks or dynamically dynamicall y using the BOO BOOTP or DHC DHCP protoc prot ocol ol.. Note! If the IP address address is 0 (0.0.0.0) either eit her through configuration configurat ion or change change through a funct ion block bl ock the BOO BOOTP/ DHCP protocol prot ocol will wi ll be automatically automati cally activated. acti vated. If the IP address is set the t he BOO BOOTP/ DHCP protocol prot ocol will wi ll be deact deact ivated. ivat ed. The FS FST TCP/ IP driver dri ver implemen impl ementts the foll fo llowing owing prot pr otocols ocols / services for communicat communication ion and testing: Protocol rot ocol
Port
Service ervi ce
Descrip escriptition on
ICMP ICMP UDP UDP UDP
n.a. 7 9 13
n.a. echo discard di scard daytime dayt ime
Used for PING Retur eturns ns all all data dat a received received Discards all data dat a received Returns etur ns string str ing with wit h date and t ime
FST Version 4.02.21 Manual
224 224
UDP UDP UDP UDP UDP UDP UDP UDP UDP UDP TCP TCP TCP TCP TCP
19 37 991 992 993 995 7 9 13 19 991
chargen t i me CI CI_EXT I_EXT CI_BIN I_BI N EasyIP asyI P echo discard di scard daytime dayt ime chargen CI CI
Returns etur ns string str ing with wit h charact characters Returns etu rns t ime as 32bit 32bi t number Command interpr nt erpret eter er Extended xtended command interp nt erpret reter er Binary Binary data dat a exchange Data exchange prot protocol ocol Retur eturns ns all all data dat a received received Discards all data dat a received received Returns etur ns string str ing with wit h date and t ime Sends contin cont inual ual stream stream of characters characters Command interpr nt erpret eter er (via (vi a t elnet) elnet )
The TC TCP command int interpr erpret eter er at port port 991 can be accessed accessed wit wi th a program program lil ike TEL TELNET NET. Start Start TELNE LNET wit with parameters paramet ers IP number and 991 (i.e. (i .e. TEL TELNET NET 10.10.10. 10.10.10.11 991), 991), now it i t is possibl possiblee t o send and receive receive just j ust as via the normal nor mal RS RS-232 command interpret int erpreter. er. Please Please note that t hat only 1 connecti connection on is allowed at the t he same same time and the conne connecti ction on will wil l automa aut omatt ically be closed closed aft after er 60 seconds seconds of no interaction. i nteraction. The command command interpret int erpreter er can also also be accesse accessedd as follows: fol lows: send an UD UDP datagram wit wi t h the t he CI command command (wit (wi t hout CR / LF) to t o the th e FS FST controll contr oller er at port number 991 and the result will wil l be returned. For For example example DR DR0 will wil l result in something like l ike = 1099. Using the t he extended extended comm command and interpreter on port 992 is similar simil ar with wit h a small small exte extension. nsion. The response will wil l be be the origi or iginal nal questio quest ionn and the CI CI reply repl y separated by a NUL NULLL charact character. So when sending DR0 the result will be DR0 NULL character =1099. Using Using the t he TC TCP (telnet (t elnet)) way is more convenient convenient for users, users, using UD UDP is bett bet ter suited suit ed for propr ograms that t hat need to t o access FS FST operands. Note! Do not use the t he Y! Y! command. Thi Thiss command command will wil l stop st op all programs and driv dri vers, since TC TCP/ IP is implem impl emented ented as as a driver it will wil l be stopped as well ! The LE LEcommands commands are not available avail able via vi a the telnet t elnet interface. int erface. 4.18.3 Configuri onfi guring ng t he driver dri ver and assigni assigning ng parameters If you want t o use TC TCP/ IP in a FS FST IPC IPCproject, proj ect, you must enter the t he TC TCP/ IP driver dri ver in the t he driver dri ver configurati configur ation on and assign assign the necessary necessary paramet parameters. Different if ferent driver names names exist exist for different di fferent targe t argett systems, systems, the t he following followi ng table lists li sts the supported port ed target systems systems and and their driver: TCPIPDR TCPIPDRV V
PS1PS1-HC HC1x 1x wit wi th PS1PS1-C CP10/ CP11/ CP14 PS1-HC1x S1-HC1x wit wi th PS1PS1-C CP12 (8 bit bi t modus) modus) PS1-HC2x S1-HC2x wit wi th PS1-CP S1-CP10/ CP11/ CP14 PS1-HC2x S1-HC2x wit wi th PS1PS1-C CP12 (8 bit bi t modus) modus)
TCPIPF IPFEC
FECCompact ompact (FC (FC34,FC 34,FC44)
TCPIPF TCPIPFC C2
FECStand Standar ardd (FC44 (FC440, 0,F FC560, 560,F FC640, 640,F FC660) 660)
TCPIPHC0
PS1-HC02
TCPIP_15 TCPIP_15
PS1PS1-HC HC1x 1x wit wi th PS1PS1-C CP15 PS1-HC2x S1-HC2x wi with PS1-CP15 PS1-CP15
TCPIPXXX PIPXXX
PS1PS1-HC HC1x 1x wit wi t h 2 PS1PS1-C CP10/ CP11/ CP14 PS1-HC2x S1-HC2x wi wit h 2 PS1-CP S1-CP10/ CP11/ CP14
FST Version 4.02.21 Manual
225 225
4.18. 4.18.44
Confi onf igurat guratiion of TCP/ IP dri driver for PS1-CP S1-CP10, CP11, CP12 and CP14:
Desti estination nation drive:
Speci Specify the t he drive dri ve on which which the the T TC CP/ IP driver dri ver TC TCPIPDR IPDRV.EX V.EXEis located locat ed or onto ont o which whi ch it is to to be loade l oaded. d. Interrupt Int errupt of CP10/ CP11/ CP12/ CP14 module: The interrupt int errupt as confi configured gured on the t he module. Allowed Allo wed values are are 2, 3, 5, 6 and 7. Make sure sure that the jumpe j umperr on the network module is set accordingly accordingly and that there t here are are no confli conflicts cts with wit h other ot her IPC IPCmodules. IO port configuration: configurat ion: The IO port (in (i n hexadecimal hexadecimal !) as configured configur ed on the module. modul e. All Allowed owed values are 300, 320, 340 and 360. Make sure that the switches swit ches on the th e net network module modul e are are set accordi accordingly ngly and t hat there t here are are no confl conflict ictss with wit h other IPCmodules. IP addr address: ess:
The IP address. Leave Leave the address to 0.0.0.0 0.0.0. 0 if the address is configured configur ed through thr ough the t he IP_IP IP_IP function funct ion block bl ock or dynamicall dynamicallyy through thr ough the BOO BOOTP protocol. prot ocol. IP netmask:
The IP netmask. Leav Leavee the mask to 255.255.255.0 if i f the t he netmask is configured through t hrough the t he IP_MA IP_MAS SK function functi on block bl ock or dynamicall dynamicallyy through t hrough the t he BOO BOOTP protocol. prot ocol. IP addr address ess gateway:
The IP address for the t he standard gateway. Leave Leave the address to 0.0.0.0 if i f there t here is no gateway or the t he gateway address address is configured confi gured through t hrough the t he IP_G IP_GA ATEfunction funct ion block block or dynamically t hrough the BOO BOOTP protocol. protocol . 4.18.4.1 4.18 .4.1
Configurat onfi guration ion of TCP/ IP driver dri ver for PS1-CP 1-CP15:
Only destination destinat ion drive dri ve and and IP configurati configuration on are neede needed. d. Additionally Additi onally there t here is a configuration configurati on file fi le PK PKT.INI .INI (in (i n the FS FST runtime runti me directory) directory) that t hat must be edited edit ed to reflec refl ectt the setti set tings ngs to be used. Most important impor tant parameters are BitR Bit Rate, Channel, Channel, RadioType RadioType and and Syst Syst emId. The PK PKT.INI will wil l be downloaded downl oaded into int o the t he IPC IPCwhen downloading downloadi ng the t he projec proj ectt. Please Please make sure that after aft er modif modification ication the t he file is downloaded downloaded since the project download will only freshen freshen files fi les with wit h different dif ferent sizes. sizes. Confi onf igurat gur atiion of of TCP TCP/ IP driver dri ver for f or FECCompact ompact,, FE FECStandard Stand ard,, PS1-HC PS1-HC02: 02: Only destinati desti nation on drive dri ve and and IP configurati configur ation on are needed. needed. Configurat onfi guratio ionn of TC TCP/ IP driver dri ver for 2 network net work cards: Lots of parame parameters ters are needed. needed. Desti Destination nation drive, dr ive, port and interrupt number number for f or both bot h cards, cards, IP configuration configurati on for both bot h cards. cards. Please be careful carefu l when using u sing t he TCP TCPIPXX IPXXX driver: driver: On the the second card BOO BOOTP/ DHC DHCP is not possibl possi ble. e. The The second card only onl y allows all ows a local net net work (no gateway gateway option for routi r outing). ng). Functi unct ions lil ike EAS EASY Y_S, _S, EAS EASY Y_R, _R, UDP UDP_SE _SEND etc. wil wi ll automat aut omatiically call y select select the t he fifirst or second network networ k card card based upon IP configurati configur ation on and destinati desti nation on IP. IP. For perfor p erformanc mancee reasons it is advised to t o use HC20 HC20 or better bett er CP CPUs. 4.18.5 4.18.5 Extended xtende d CI commands for for TCP/ IP This driver dri ver ext extends the IPC IPCcommand command interpret int erpreter er with wit h the t he followi fol lowing ng commands: commands: !26 Display version number Display driver dri ver info and version number. number. This This information i nformation will wi ll also be displayed displayed ifi f an unknown command is entered (for (f or example !26?). !26?). FST Version 4.02.21 Manual
226 226
!26Axx !26Axx Display AR ARP resolutio resolut ionn table informati infor mation on Displays informati inf ormation on from fr om tthe he Address Address Resolut Resolution ion Protocol rot ocol (A ( ARP). The TC TCP/ IP driver holds hol ds a table tabl e of 32 IP address addresses es and and Ethernet Ethernet addresses addresses.. If the position posit ion (xx) is omi t ted the t he displayed information informati on will automatically cycle cycle through the used used positions. positi ons. !26B Display Displ ay BOO BOOTP/ DHC DHCP stat status us Displays Displ ays status stat us for fo r the t he BOO BOOTP / DHC DHCP process pro cess and and the t he time t ime before bef ore the t he DHC DHCP lease expi expires res ifif the IP address address was ‘leased’ ‘l eased’ from f rom a DHC DHCP server. server. !26C Display ispl ay date / time t ime Displays the th e act act ual date, d ate, time t ime and timezone t imezone offset in the format: format : YYYY.MM.DD HH:MM: HH:MM:S SS.tt .t t followed fol lowed by the t he UT UTCoffset off set in i n hours. !26Da.b.c Resolve Resolve hostn hostname ame to IP address Resolves the t he hostname host name a.b.c to t o an IP I P address. address. For For examp example le !26Dwww.festo. !26Dwww.festo.com com would search search the t he IP address for www.festo.com www.f esto.com !26D Display name resolver status stat us Displays the status st atus of the las l astt hostname hostname searc search. h. Poss Possibl iblee return texts: resolvi resolving, ng, resolved resolved followed fol lowed by IP addres address, s, resolver resolver timed t imed out and resolver resolver error err or foll f ollowed owed by an error error code. code. When searching searching for a hostname host name first fi rst enter ent er !26D followed fol lowed by the t he hostname, then enter !26D until unti l the t he resolver resolver is no longer longer ‘resolving’. ‘resolving’ . !26Hxx !26Hxx Display handler handler table t able information Displays ispl ays informati inf ormation on about currently current ly defined defi ned TC TCP and UD UDP handlers and their t heir state. st ate. If t he position posit ion (xx) (xx) is omitted omitt ed the displayed displayed information informati on will automatically cycle cycle through thr ough the dedefined fi ned handlers. handlers. !26I Display ispl ay IP configuration configurati on Displays Displ ays IP address, IP IP netmask netmask and IP gat gateway. eway. !26M Display Displ ay Ethernet herne t MACaddress address Displays the t he MAC MACaddress of the t he network card. !26N Display ispl ay hostname and domain name Displays the th e hostname and domain name. name. !26Pa.b.c.d Ping IP address Sends a ping to t o the t he IP address a.b.c.d For example !26P10.10.10.10 !26P10.10.10.10 would woul d ping pi ng 10.10.10.10 !26P Display ispl ay ping status Displays the status of the t he last last ping. Poss Possibl iblee return tex t exts: ts: not pinging, pi nging, pinging, host is ali alive ve and time ti meout. out. When pinging a host first fi rst enter !26P followed fol lowed by the t he IP address, address, then enter !26P unti untill the return message message is either host is i s alive or timeout. ti meout. !26R Display ispl ay runtime runt ime Displays the time t ime since the controller controll er restart. Display forma for mat:t: days:hours:minut days:hours:minutes es:sec :seconds. onds. !26SH Display ispl ay interrupt int errupt count count Displays the number number of interrupts int errupts generated generated by the t he network network module. This This informa inf ormatition on is is only onl y availabl avail ablee on HC1X HC1X,, HC2X HC2X control cont rolllers wit wi t h CP CP10, CP CP11, CP CP12 or CP14 networ net workk modul module. e. FST Version 4.02.21 Manual
227 227
!26SI !26SI Display ispl ay IP statisti stati stics cs Displays IP packet packet statist st atistics: ics: total t otal send, send, total t otal received, received, chec checksum ksum errors, wrong desti destination nation address. !26SP Display Ethernet statist stat istics ics Displays Ethernet Ethernet packet packet statisti stati stics cs:: total t otal send, send, ttotal otal received, received, overfl overflow, ow, packet packet too t oo large, cannot send. !26S !26ST Display Displ ay TCP stat statiisti stics Displays IP packet packet statist st atistics: ics: total t otal send, send, total t otal received, received, chec checksum ksum errors, wrong desti destination nation address, no handler for TCP port. !26SU Display ispl ay UDPstatist stat istics ics Displays IP packet packet statist st atistics: ics: total t otal send, send, total t otal received, received, chec checksum ksum errors, wrong desti destination nation address, no handler for f or UDP UDP port, port , unhandled unhandl ed broadcast broadcast . !26Txx !26Txx Display ispl ay IP table contents content s Display Displ ayss the IP addresses addresses curr currentl entlyy defined defi ned in the t he IP table. The TCP/ IP driver dri ver can hold hol d a tot to tal of 32 IP addresses addresses for easy easy referenc ref erence. e. Note! The CI CI commands commands are mainl mainlyy intended int ended for diagnosti di agnosticc purposes. In case case of problems probl ems start wit wi t h !26 first fi rst.. If t he IPCretur ret urns ns an ACCESS ER ERRORthis hi s means that t he TC TCP/ IP driver driver is i s not included in i n the t he project or t he hardware hardware configurati configuration on is wrong. Then Then check check for packets packets send and received received with wit h !26SP !26SP. If no packets packets are received received this thi s could indicate i ndicate that the CP CP10/ 11/ 12 interrupt int errupt is wrongly wrongly configured. configured. 4.18.6 Modules Modul es for TCP/ IP Overview of generally generall y used modules EASY ASY_R Request a block bl ock of operands operand s from from another anot her IPC EASY_S Send a bloc blockk of op opeeran rands to another ther IPC IPC IP_ALIV IP_ALIVE E Check whether whet her IP address addr ess is known known IP_IP Get/ et/ set our IP address IP_MA IP_MASK SK Get/ et / set our IP netmask net mask IP_ IP_TABLE Get/ set IPadd ddre resss from from// to tabl tablee All modules modul es return return an error code in FU FU32, see t he table tabl e with wit h all error err or codes for an explanation ti on of the t he individual codes. codes. EASY_R
Request equest a block bl ock of operands from another controller. controll er. Input parameters parameters FU32 Index number in IP t able able FU33 Operand t ype, 1=flags, 2=inputs, 3=outputs, 4=registers, 11=strings FU34 Number of operands operands wanted want ed (maximum 256) FU35 Number Number of first local operand operand t o store response FU36 Number Number of first fi rst operand operand in remote controll contro ller er FU37 Number Number of flagword fl agword for status stat us FST Version 4.02.21 Manual
228 228
Output parame parameters ters FU32 0 if request send, otherwi otherwise se error This functi fu nction on module requests a block of operands. Note! The operand TYPE specified in FU33 (source of remote data requested) also defines the Local Operand Operand TY TYPEwhere the operand will wil l be be stored in i n the the local (requesting) (request ing) control cont roller. ler. For example: IF… IF… THEN THEN CMP 12 ' EASY_R WITH ITH V3 " Table abl e Index 3 WITH ITH V4 " get Registers egist ers WITH ITH V10 " get 10 Registers WITH V150 " 1st Remot Remotee Reg->Local R150 WITH ITH V34 " Remote Register egist er data dat a block bl ock " is R34 R34 to R43 R43 WITH ITH V99 " St atus in FlagWord lagWord 99 If no response response is received received aft after er approximately approximately 50 milli mil lise secon conds ds the status flagw fl agword ord will wil l ind i ndii cate a timeout. ti meout. Only 1 request can be acti active ve for each index ind ex number. number. Status values are: -1 Packet acket send, no response or timeout yet 0
OK response received, received, data accepted accepted by partner part ner or data received received from f rom partner part ner
1
Operand perand type error, partner indica indi cates tes that th at the specifi specified ed type is not supported
2
Offset error, partner indica indi cates tes that the specifi specified ed offset is not allowed. all owed. For For example requesting request ing FW FW20000
4
Size error, partner indica indi cates tes that the number number of operands send send or requested is too to o large
128
Timeout, imeout , no response received received from fro m partner part ner
EASY_S
Send a block of operands to another controller. control ler. Input parameters parameters FU32 Index number in IP t able able FU33 Operand t ype, 1=flags, 2=inputs, 3=outputs, 4=registers, 11=strings FU34 Number of operands operands t o send (maximum (maximum 256) FU35 Number Number of first fi rst operand t o send FU36 Number Number of first fi rst operand operand in remote controll contro ller er FU37 Number Number of flagword for status stat us (-1 if no acknowl acknowledge edge wanted) Output utp ut parameters parameters FU32 0 i f data dat a send, otherwise ot herwise error FST Version 4.02.21 Manual
229 229
This functi f unction on module sends a block block o foperands. Note! The operand TYP TYPEspecif specified ied in FU33 (source (sour ce of data dat a to t o be sent) sent ) also al so defines defi nes the Remote Operand Type Type where the data dat a will wil l be be stored in i n the t he RE REMOT MOTE(destinati (desti nation) on) controll contr oller. er. For example: IF… IF… THEN THEN CMP 22 ' EASY_S EASY_S WITH ITH V3 " Table abl e Index 3 WITH V4 " send Registers egist ers WITH V10 " send 10 Registers egist ers WITH ITH V23 " send local lo cal Registers egist ers " R23-R32 23-R32 to remote control controller ler WITH ITH V234 " Remote controller control ler will wil l store stor e " Dat Dat a in R234-R43. 234-R43. WITH V98 " Use FW98 for fo r stat st atus us If no acknowledgm acknowledgment ent is i s received received after approximately approximately 50 milli mil lise secon conds ds the status stat us flagw fl agword ord will wil l indi i ndicate cate a t imeout. imeout . Only Only 1 unacknowledged send can can be active acti ve for each each index number. Status values are: -1 Packet acket send, no response or timeout yet 0
OK response received, received, data accepted accepted by partner part ner or data received received from f rom partner part ner
1
Operand perand type error, partner indica indi cates tes that the specifi specified ed type is not supported
2
Offset error, partner indica indi cates tes that the specifi specified ed offset is not allowed. all owed. For For example requesting request ing FW FW20000
4
Size error, partner indica indi cates tes that the number number of operands send send or requested is too to o large
128
Timeout, imeout , no response received received from partner part ner
IP_ALIVE
Checks the t he AR ARP t able, able, to t o see if an IP address address is known. known. Input parameters parameters FU32 Index number in IP t able able Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error FU33 0 if IP address address unknown unknown 1 ifif IP address known 2 if IP address must be reached through throu gh a gat gateway Be aware aware that if i f a controller control ler is i s stopped, disconne disconnected cted or otherwise no longer longer avai avai lable it can can take up to t o 10 minutes minut es before IP_A IP_ALLIVEindicates ind icates that t hat the t he IP address is unknown. Other alternati alt ernatives ves are avail available, able, for example example testi t esting ng the status stat us value from EasyIP EasyIPpackets or using the t he functio funct ionn module PING PINGif no EasyIP EasyIPcommunicati communication on is used. u sed. IP_IP
Set or or get the IP address. Input parameters parameters FU32 1 t o set t he IP address FST Version 4.02.21 Manual
230 230
2 to t o get the t he IP address address FU33 IP address addr ess FU34 IP address addr ess FU35 IP address addr ess FU36 IP address addr ess Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error FU33 IP address addr ess FU34 IP address addr ess FU35 IP address addr ess FU36 IP address addr ess This module is normally only used in projects with wit h identica identi call controllers control lers (with (wit h the t he sam samee programs). grams). By By using this function f unction module and retent retentati ative ve variable variabless it is then t hen possibl possiblee to use identi id entical cal FS FST projects proj ects on multip mult iple le controll contr ollers. ers. Ot Ot her use is when using dynamic dynamic addresses so the controll contr oller er knows when the IP address is received. received. IP_MASK
Set or get the t he IP netmask. Input parameters parameters FU32 1 t o set t he IP mask 2 to t o get the t he IP mask mask FU33 IP mask FU34 IP mask FU35 IP mask FU36 IP mask Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error FU33 IP mask FU34 IP mask FU35 IP mask FU36 IP mask
IP_TABLE
Set or get an IP address address into int o or from f rom table. t able. Input parameters parameters FU32 1 t o set t he IP address 2 to t o get the t he IP address address FU33 index ind ex number in IP t able FU34 IP address addr ess FU35 IP address addr ess FU36 IP address addr ess FU37 IP address addr ess Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error FU33 index ind ex number in IP t able FU34 IP address addr ess FU35 IP address addr ess FU36 IP address addr ess FU37 IP address addr ess The IP table tabl e is a list l ist of short addresse addresses, s, which are used used by other ot her function functi on modules.
FST Version 4.02.21 Manual
231 231
4.18.7 More modules for TCP/ IP Overview of special modu modules les These modules modul es are are listed li sted separately because their use requires requi res special special expertise, experti se, they are rarely used etc. DNS_N NS_NA AME Get/ et/ set hostname host name and domain domain name DNSR DNSRESOL SOL Resolve esol ve host hostname name t o IP addre address ss IP_DNS IP_DNS Get/ set IP address address for for DNS DNS server IP_G IP_GATE ATE Get/ set IP address address for for gateway gateway IP_ IP_MAC MAC Get Ethern therneet MAC MACaddre ddresss from from netwo network rk module odule PING Ping ing SNTPTIME IME Start tart time time sync ynchron hronis isaation TCP_C TCP_CLOS LOS Close ose TCP TCP conn connect ectiion TCP_HA _HAND Activate ctivate TCP handle handlerr TCP_OPE P_OPEN N Open TCP TCP conne connect ctiion TCP_RES Reset TCP ha hanndle dler TCP_SE _SEND Send a TCP datapa datapaccket ket TCP_S TCP_STA TAT T Stat Status us of TCP connect connectiion TCP_STR _STR Send a stri st ring ng t hrou hr ough gh TCP TFTPFILE Send / req request a file file UDP_F UDP_FW W Send a FW block bl ock t o another anot her IPC UDP_HA _HAND Activate UDP handle handlerr UDP_SE _SEND Send end an UDP datapac datapacket ket UDP UDP_ST _STR Send a stri st ring ng t hrough hrough UDP UDP All modules modul es return return an error code in FU FU32, see t he table tabl e with wit h all error err or codes for an explanation ti on of the t he individual codes. codes. DNS_NAME
Get or set the t he hostname and domain name. Input parameters parameters FU32 1 t o set hostname host name 2 to get hostnam host namee 3 to t o set domain name 4 to to get domain name FU33 Number Number of t he source string str ing (set), or desti destination nation string stri ng (get). Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error TCP/ IP hosts normally nor mally have names names in the t he format name.some.doma name.some.domain. in.com. com. In this thi s case case the hostname is ' name' name' and the domain name is ''some.doma some.domain.com' in.com'.. These These names names can can be set set through BOO BOOTP/ DHCP or wit wi t h this t his module. modul e. This This functi f unction on requires requi res that the th e FS FST string str ing driver dr iver is installed in the t he project. project. DNSRESOL
Resolve a hostname to IP address Input parame parameters ters FU32 1 to start hostname hostname resolut resolution ion 2 to get status FU33 Number Number of t he string str ing with wit h host-na host -name me t o resolve FU34 Index number in IP t able able Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error FU33 Resolver esolver stat st atus us FST Version 4.02.21 Manual
232 232
-3 if resolver resolver not not yet yet started -2 if resolver already already busy, wait wait and try again -1 if resolver busy 0 if resolver resolver finishe fini shedd 1 if resolver timed ti med out Tries ri es to find fi nd the t he IP address address for a hostname. The IPaddress for DNSserver(s) must be b e known. This function functi on requires that the FS FST string stri ng driver is installed install ed in the t he project. project. IP_DNS
Set Set or get an IP addr address ess for a DNS DNS server Input parameters parameters FU32 1 t o set t he IP address 2 to t o get the t he IP address address FU33 DNS DNS server number (0, 1 or 2) FU34 IP address addr ess FU35 IP address addr ess FU36 IP address addr ess FU37 IP address addr ess Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error FU33 DNS DNS server number numb er FU34 IP address addr ess FU35 IP address addr ess FU36 IP address addr ess FU37 IP address addr ess Up to 3 DNS DNS servers servers are used when resolvi r esolving ng a hostname host name into int o an IP address. address. The servers servers are used consecuti consecutive ve (0, 1 then 2). IP_GATE
Set or get the t he IP address for gateway. gat eway. Input parameters parameters FU32 1 t o set t he IP address 2 to t o get the t he IP address address FU33 IP address addr ess FU34 IP address addr ess FU35 IP address addr ess FU36 IP address addr ess Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error FU33 IP address addr ess FU34 IP address addr ess FU35 IP address addr ess FU36 IP address addr ess IP_MAC
Get t he Et Ethernet MACaddress. address. Input parameters parameters FU32 Number of string str ing t o store sto re t he address Output parame parameters ters FU32 0 i f success successful ful,, otherwise ot herwise error The FST FSTSTRINGdriver dri ver must be inst install alled ed in the t he proj project.
FST Version 4.02.21 Manual
233 233
PING
Send ping or get ping pi ng status Input parameters parameters FU32 1 t o send ping pi ng 2 to get status FU33 IP address addr ess FU34 IP address addr ess FU35 IP address addr ess FU36 IP address addr ess Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error FU33 Pi ng stat st atus us -1 = pinging pinging 0 = host is alive 1 = timed t imed out (no response aaftfter er 5 seconds seconds)) 2 = not yet yet ping pi nging ing Sends a ping and wait wait for res r esponse ponse.. Use Use this thi s to actively acti vely test if i f a host is i s alive. SNTPTIME
Starts tart s time ti me sync synchronisati hronisation on and get get status st atus Input parameters parameters FU32 0 t o get status stat us 1 to start synchronisati synchronisation on 2 to start st art listen l isten for broadcas broadcasts ts FU33 Time offset offset to to Greenwich reenwi ch Mean Time in hours hour s FU34 IP address addr ess FU35 IP address addr ess FU36 IP address addr ess FU37 IP address addr ess Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error FU33 status FU34 number of seconds seconds since last synchronisat synchronisation ion -1 if not synchronised The time ti me synchronisati synchronisation on uses uses st standard time ti me codes (to (t o allow worldwid worl dwidee synchron synchronii sation) sati on) therefore the t he time ti me difference difference with wit h Greenwich Greenwich Mean Time Time must be known. For For some sample sample values see see the table tabl e at the t he end. end. The status codes are: -1 busy, 0 time t ime synchronised, synchronised, 1 timedout t imedout (no response from NTP NTP server), 2 if listen li stening ing acti active ve.. Ti meserver meserver programs are avail available able from fr om freeware to commercial commercial packages and can can be run on on standard windows PCs. TCP_CLOS
Closes a TCP TCP connecti connect ion Input parameters parameters FU32 Index number for for handler handl er Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error FST Version 4.02.21 Manual
234 234
TCP_HAND
Installs Instal ls a handler to receive TCP dat dat apackets apackets Input parameters parameters FU32 local port number number to use FU33 Number Number of first fi rst flagword fl agword t o receive receive data Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error FU33 Index number for for handler handl er Some additional additi onal data is writt wri tten en if a datapacket datapacket is i s received. received. See See table below for layout. l ayout. The handler number nu mber returned ret urned in i n FU FU33 must be stored stor ed and used to t o send TC TCP datapackets. TCP_OPEN
Act Act ively opens o pens a TC TCP connectio connectionn Input parameters parameters FU32 Index number for for handler FU33 Index number in IP t able able FU34 Destinati esti nation on port number Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error
TCP_RES
Reset esets closed TCP TCP handler handler to list l isten en state stat e Input parameters parameters FU32 Index number for for handler handl er Output ut put paramet paramet ers ers FU32 0 if succe successful ssful,, otherwise ot herwise error TCP_SEND
Send a TCP TCP datapack dat apacket et Input parameters parameters FU32 Index number for for handler handl er FU33 number of bytes byt es t o send FU34 number of first fi rst flagword fl agword t o send Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error TCP_STAT
Returns status of TCP connection Input parameters parameters FU32 Index number for for handler handl er Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error FU33 1 if connec connectt ed (send possible) possibl e) FU34 Extended xtended stat statee FU35 Number Number of unacknowledged unacknowledged bytes i n send send buffer buff er Extended state st ate values val ues are: 0 LISTE ISTEN 1 SYNSENT 2 SYNRCVD 3
ESTABL ABLISHE ISHED
FST Version 4.02.21 Manual
waiting wait ing for tcp_open cp_open request from remote tcp_ tcp_op opeen send, nd, waiting waiting for for rem remote tcp_ope tcp_openn rec received, ived, ackno acknowle wledg dgee send send,, waiti waiting ng for remote connecti connection on open, data can be transferred ransferr ed 235 235
4 5 6 7 8 9 10 11
FINWAIT INWAIT11 FINWAIT INWAIT22 CLOSE LOSEWA WAIT IT CLOSING ING LAST ASTACK TIMEW TIMEWAIT CLOSE LOSED D
tcp_close send, waiti wait ing for for remote remot e close close acknowl acknowledged edged not no t used sed our our close lose acknow knowled ledge gedd and rem remote close lose receiv eceived ed close received, close send, waiti wait ing for for acknowledge after aft er closing, closi ng, t imer is start started ed after aft er t hat ->CLO ->CLOSE SED D connecti connect ion closed closed wait wai t ing for TCP_RE _RES
TCP_STR
Send a string through TCP Input parameters parameters FU32 Index number for for handler handl er FU33 Number Number of string str ing t o send Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error The FST FSTSTRINGdriver dri ver must be inst install alled ed in the t he proj project. TFTPFILE
Send or requests a file. fi le. Input parameters parameters FU32 1 t o send a file fi le 2 to request request a file fi le FU33 index ind ex number in IP t able FU34 number number of the string stri ng with wit h our file-na fil e-name me FU35 number of t he string stri ng with wit h the th e remote filename fi lename FU36 number of flagword fl agword for status stat us Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error Uses ses the string stri ng driver for filenam fi lenames. es. A waiting waiti ng time ti me of around 1 secon secondd must be inse i nsert rted ed betwee bet weenn 2 transmissions ransmissions wit wit h TF TFT TPFILE. ILE. Status tat us values: -1 Busy Busy with wit h file fi le trans tr ansfer. fer. 0 File il e trans tr ansfer fer succe successfull ssfullyy finished fi nished 1 Timeout error 2 Local ocal file fi le not found 3 Error reading from local file fi le 4 Local ocal file fi le already exist existss (overwrite (overwrit e is not allowed, use t he FDE FDELLETEfunct fu nctiion modul modu le first fi rst)) 5 Error writing writ ing to local local file fil e 127 Unexpected nexpected message message received received during duri ng file fi le transfer 128 Received unknown unknown error error message message 129 Received eceived NOF NOFILEerror err or message 130 Received access access error error message message 131 Received eceived disk dis k full ful l error message message 132 Received eceived illegal il legal operation operati on error messag messagee 133 Received TID error error message 134 Received eceived file fi le exists error messag messagee 135 Received eceived NOUS NOUSE ERerror err or message 136 Recei eceived opti opt ion error message message
FST Version 4.02.21 Manual
236 236
UDP_FW
Send a block of flagwords fl agwords to t o anot anot her IPC. Input param p arameters eters FU32 index ind ex number in IP t able FU33 number of flagwords t o send (maximum (maximum 256) FU34 number of first fi rst flagword fl agword t o send FU35 number number of first flagword in target target IPC IPC Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error This function functi on module just sends sends a block of flagw fl agwords, ords, no retry is i s done if the t he target is unavail available able and and no indica indi catition on is given if the t he target did not receive receive the flagw fl agwords. ords. This This module has lost its it s use, use the t he module modul e EA EASY_S instead. inst ead. UDP_HAND
Install Inst allss a handler to t o receive UD UDP datapackets Input parameters parameters FU32 local port number number to use FU33 Number Number of first fi rst flagword fl agword t o receive receive data Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error Some addit additional ional data dat a is written writ ten ifi f a datapacket datapacket is i s received. received. See See table below for layout. l ayout. UDP_SEND
Send an UDP datapacket Input parameters parameters FU32 local port number number to use FU33 index ind ex number in IP t able FU34 Destinati esti nation on port number FU35 number of bytes byt es t o send FU36 number of first fi rst flagword fl agword t o send Output utp ut parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error UDP_STR
Send a string stri ng through through UDP UDP Input parameters parameters FU32 Local port number t o use FU33 Index number in IP t able able FU34 Destinati esti nation on port number FU35 Number Number of string str ing t o send Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error The FST FSTSTRINGdriver dri ver must be inst install alled ed in the t he proj project. 4.18.7.1
Modules for second second network card card
IP_IP IP_IP22 IP_MA IP_MAS SK2
Get/ set IP address for 2 nd network networ k card Get/ set IP netmask for 2 nd network networ k card
IP_IP2
Set or get the IP address. Input parameters parameters FU32 1 t o set t he IP address 2 to t o get the t he IP address address FST Version 4.02.21 Manual
237 237
FU33 IP address addr ess FU34 IP address addr ess FU35 IP address addr ess FU36 IP address addr ess Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error FU33 IP address addr ess FU34 IP address addr ess FU35 IP address addr ess FU36 IP address addr ess IP_MASK2
Set or get the t he IP netmask. Input parameters parameters FU32 1 t o set t he IP mask 2 to t o get the t he IP mask mask FU33 IP mask FU34 IP mask FU35 IP mask FU36 IP mask Output parame parameters ters FU32 0 if succe successful ssful,, otherwise ot herwise error FU33 IP mask FU34 IP mask FU35 IP mask FU36 IP mask
4.18.8 EasyIP status stat us values Status values are: -1
Packet acket send, no response or timeout t imeout yet
0
OK response received, received, data accepted accepted by partner part ner or data rec r eceived eived from partner part ner
1
Operand perand type error, partner indica indi cates tes that the specifi specified ed type is not supported
2
Offset error, partner indica indi cates tes that the specifi specified ed offset is not allowed. all owed. For For example requesting request ing FW FW20000
4
Size error, partner indica indi cates tes that the number number of operands send send or requested is too to o large
128
Timeout, imeout , no response received from fro m partner part ner
4.18.9 Data received by handlers Handlers write data to t o flag fl agwords words if a packet packet is i s received. received. Also Also writt wri tten en is the IP address, address, port number number of the datapa dat apacke ckets ts sender. sender. The The following foll owing table t able lists li sts all data stored (FW (FWx is the t he ini nstalled flagword): FWx Number of packets packet s received by handler handl er FWx + 1 Sender IP address addr ess FST Version 4.02.21 Manual
238 238
FWx + 2 Sender IP address addr ess FWx + 3 Sender IP address FWx + 4 Sender IP address addr ess FWx + 5 Sender Sender port por t number FWx + 6 Number of databyt dat abytes es FWx + 10 St art of actual datapacket Note that t hat the t he received received size size is the t he number number of bytes byt es,, not the number of words. 4.18.10 Time offsets Some values values for the t he time ti me offset: Anchorage -9 Buenos Aires -3 London 0 Wetzlar +1 Cairo +2 Moscow +3 Jakarta +6 4.18.11 Error rro r codes If FU FU32 is <>0 then the function functi on module returned retur ned an an error, followi fol lowing ng table list l istss the error codes: 99 Invalid paramet paramet er 100 TCP/ IP driver dri ver not loaded 101 Illega Ill egall IP address 102 Illega Ill egall table t able index (>15) (>15) 103 Table position posit ion empty empty 104 Invalid port number number 105 Invalid Invali d handler index i ndex (>15) 106 TCP send not possibl possib le, not connected 107 String tr ing driver not loaded 108 Illega Il legall string stri ng number number (too high) 109 Error in i n host- or domain name name 110 Error modifying str string ing 111 Invali Inval i d TCP handler handl er 112 Unknown operand operand type 113 Datablock too large 114 Invalid value for status flag fl agword word 115 Table posit position ion already waiti waiting ng for response response 116 Invali Invalidd operand operand number number to t o store response response 117 Cannot send, cable cable disconnect disconnect ed, coll collisi ision on or other error 118 TFTP already alr eady sending sending or receivi receiving ng
FST Version 4.02.21 Manual
239 239
5
Hell p Topics He opi cs
Understanding nderstandi ng the t he Help Help Viewer This his version of t he FS FST Online nli ne Help Help is i s built bui lt using the t he Microsoft Microsof t HTML HTML Help Help system. HTML Help files fi les are displayed in a browser-like browser-like window, wi ndow, not in the t he full ful l version version of Internet Explorer with wit h all its i ts toolbars, t oolbars, favorites favorit es lists, li sts, and icons icons visible to t o the end user, user, but in i n a threethreepaned paned help window. wi ndow. The The top pane contains contains the t he toolbar, tool bar, the left l eft pane con contains tains the t he navigation navigation methods, and and the right pane displays the topic topi c- with wit h all the t he functi functionalit onalityy of the browser browser intact. int act. The The navigat navigatio ionn pane contains contai ns the Cont Contents, ents, Index and Search Search tabs. By clicking cli cking topi t opics cs in the t he table of content contentss or the t he Index Index you can can explore any any informa infor matition on within wit hin the t he Help. Help. From From t he Searc Searchh tab t ab you can can locate every occurrence occurrence of a word or phrase p hrase that may be cont contained ained in in any t opic. Viewing topics t opics In a topic, you can can click underlined words to see see other information informati on related to the t he topic. To link li nk to another topic, topi c, link to t o a Web page, page, link li nk to a list li st of other ot her topics topi cs,, or link li nk to an appli applicacat ion, io n, click the colored unde underli rlined ned words. words. To see whether a word or phrase contained in a topic topi c is in the t he Index, Index, select select (highlight (hi ghlight)) the t he word or phrase phrase and press F1. F1. Locating ocati ng Informati Infor mation on in i n the t he FS FST O Onli nline ne Help Help There are are several several methods for findi f inding ng the inform inf ormati ation on you need, need, and numerous ways ways to combine met methods so that your search is quick qui ck and and efficient. effi cient. The options opt ions discuss di scussed ed below are acce accessibl ssiblee in the t he navigat navigation ion pane in the t he left part of the t he MSD MSDN Library ibrary viewer. To find fi nd a topic from fr om the viewer' viewer'ss navigation navigation pane Table of Cont ontents ents Click li ck the Contents Contents tab t ab to browse br owse through topics t opics by titl ti tle. e. T The he table of contents content s is an an expandable expandable list li st of everythi everyt hing ng that is i s avail available able in the t he FS FST Online nli ne Help. Help. Keyword Index Click li ck the Index tab to see see a list of index i ndex entri entries es,, and then either eit her type a word or scroll scroll through thr ough the list. li st. Similar to t o the index in a printed print ed book, topics are often oft en indexed indexed under more than one entry. Ful ull-Text l-Text Search Click li ck the th e Search Search tab to t o loca lo catt e every every occurrence of a word or phrase phr ase that th at may be contained in a topic. t opic. To view a topic topi c found through t hrough any of of thes t hesee navigati navigation on methods, methods, click cli ck the entry in i n the t he navig navigaation ti on pane to display di splay the corresponding corresponding topic in i n the topic t opic pane. pane. Context ont ext Help Help Use Use the th e Cont Context ext Help command command to t o obtain obt ain help hel p on some portion port ion of FS FST. When you choose choose the toolbar' tool bar'ss Context Help button butt on , the mouse pointer point er will wil l chang changee to an arrow and question questi on mark. Then Then click cli ck somewhere somewhere in the t he FS FST window, such s uch as another anoth er toolbar tool bar button. butt on. The The help help topic t opic will be shown shown for the item it em you cli clicke cked. d. If you press pr ess the F1 F1 key the help topic t opic will wil l be shown for t he acti active ve window or command. command. To hide or show the navigation pane The navigation navigation pane is displaye displ ayedd by default in i n the Help Help Viewer. If you want to t o hide it, i t, click View from fr om the toolbar, t oolbar, then t hen unchec uncheckk the t he Naviga Navigatition on Tabs Tabs option. To display di splay the navigation pane, pane, click cli ck View View from f rom the t he toolbar tool bar and check check the Navigati Navigation on T Tabs abs option. opti on. Note! Note! If you close t he browser browser with wit h the t he nav navigation igati on pane hidden, it will wil l reope r eopenn that way. way.
FST Version 4.02.21 Manual
240
5.1
Navigati ng Using Using the th e Table of Contents ontent s
To view the t he table of content contents, s, click the t he Contents Contents tab t ab in the t he navigati navigation on pane. pane.
To view a topic, topi c, cli click ck the topic topi c in the table tabl e of content contents. s. To expand or contract cont ract a node To open an an item it em in the t he table of contents, click cli ck the plus sign (+) (+) in front fr ont of a node to • expand expand that node, then double-click the t he item it em you want want ttoo see. see. Click li ck the minus sign sign (-) ( -) in i n front of a node to contract that t hat node. • You also al so can navigat navigatee the nodes by using using the th e UP UP and DO DOWN arro arrow w keys to move move verver• t ically, call y, and the t he LE LEFT and RIG RIGHT HTarrow arro w keys to t o expand and contract cont ract the nodes. • You can al also use t he Previou Previouss and Next Next butt but tons on the tool t oolbar. bar.
FST Version 4.02.21 Manual
241
5.2
Looking Looking for Index
To loca l ocate te a topic t opic using the index i ndex In the t he navigati navigation on pane, pane, click the t he Index Index tab and then either eit her type or select select a keyword you want to find fi nd informati information on about. about. After you have select selected ed a keyword, keyword, click cli ck Displ Display. ay. From the list li st of topics topi cs found, select select the topic t opic you want want and then t hen click Display. Display. 5.3
Findi ng Informa Infor mati tion on with wit h Full ul l -Text -Text Search earch
A basic search search of topics top ics consist consistss of the t he word or phrase you want want to t o find. fi nd. You You can use wildwil dcard expressions, expressions, nested expressions expressions and Boolean operators operator s to refine refi ne your search. search.
FST Version 4.02.21 Manual
242
To perform a ful f ull-t l-tex extt searc searchh In the t he navigation navigation pane p ane,, click cli ck the Sea Search rch tab and then type t ype the word or phrase you want want to find. Click li ck List List Topics. Your Your search search will wil l return the t he first fir st 500 hits. hi ts. Highlight ighli ght the t he topic topi c you you want, and then click D Display. isplay. (Alt (Alterna ernatitively, vely, you can can displ display ay any any topic topi c by double-clicking it.) Search Search Syntax Synt ax The basic basic rules rul es for formulati formul ating ng queries are are as follows: foll ows: Searches are are not case case-sensitive, -sensit ive, so you can type typ e your search in uppercase or lowercase characters. You can search search for any combi combinati nation on of letters let ters (a-z) and numbers (0 (0-9). -9). You cannot cannot search for single letters let ters (a, b, c, etc.) and and the followi fol lowing ng reserve reservedd words: an, and, as, as, at, be, but, but , by, do, for, from, f rom, have, have, he, he, in, it, it , not, of, on, or, she, that, the, t he, there, they, this, to, we, which, with, wit h, you. Punctuation unctuat ion marks such as as the period perio d (.), colon (:), (: ), semicolon (;), (; ), comma (,), and hyphen (-) are ignored during dur ing a search. search. Group the t he elements elements of your search using using " double doubl e quotes" or (parenthese (parenth eses). s). You You cannot cannot search search for quotati quot ation on marks. Note! If you are searc searching hing for a filena fil ename me with an extension, extension, you should group the entire enti re string stri ng in double quotes, quotes, (" filenam fi lename.e e.ext" xt" ). Otherwise, Otherwise, the searc searchh will trea tr eatt the t he period period as an an OR operator.
FST Version 4.02.21 Manual
243
Words, Phrases, and Wildcards You can search search for fo r words wor ds or phrases and use wildcard wil dcard expressions. expressions. The table below bel ow describes scribes the t he result resultss of thes t hesee different dif ferent kinds ki nds of searche searches. s. Search for fo r
Example
Results
A single word
Select
Topics that contain the word "select." (You will also find its grammatical variations, such as "selector" and "selection").
A phrase
" new new operator" operator" –or– 'new operator'
Topics that contain the t he literal lit eral phrase phrase " new new operator" operator" and and all its it s ggram ramma matitical cal variations. variati ons. Without it hout the t he quotation quotat ion marks, marks, the query is equivalent to to specif specifying ying a new AND AND operator, which will find fi nd ttop opics ics containing containing both both of the t he indiv indi vidual words, instead of the phrase. phrase.
Wildcard il dcard expressio expressions ns
Esc*
Topics opics that contain cont ain the t he terms " ESC," " esca escape, pe,"" " esca escalati lation," on," and and so so on. on. The asteri asterisk sk cannot cannot be the t he only charac charactt er in the words.
80?86
Topics that contai containn the t he terms " 8018 80186, 6,"" " 8028 80286, 6,"" " 8038 80386, 6,"" and so so on. The The question questi on mark cannot cannot be b e the only character character in the t he term.
* 86
Topics that contain the terms " 386," " 486, 486,"" " x86," 86," " QEMM38 MM386, 6,"" " 8086 8086," ," and so on.
Operators: AND, OR, NOT, and NEAR The AND, AND, OR OR, NOT NOT, and NEAR NEARoperat operators ors all al low you to t o refi refine your search. The foll fol lowing owing tabl t ablee shows how to use each each of these t hese operators. operato rs. Search for fo r
Example
Results
Both terms t erms in the t he same same topic dib AND palette palett e –or– dib & palett palettee
Topics containi containing ng both the t he words words " dib" and "pa " palette. lette.""
Either it her term in a topic
raster rast er ORvector vector –or– raster | vect vect or<
Topics containi containing ng either the t he word word " raste raster" r" or the word word " vec vector."
The first term t erm without the second second term t erm
ole ol e NOT NOT dde –or– ole ! dde
Topics opi cs containing containi ng the word " OLE," but not the word " DDE DDE."
Both terms t erms in the same t opic, close together toget her
user NEAR NEARkernel ker nel
Topics opi cs containing containi ng the word " user" user" within withi n eeight ight words of the word " kerne kernel." l."
FST Version 4.02.21 Manual
244
Rules for Nested Expressions The basic basic rules rul es for searching searching topi t opics cs using nested expressions are as follows: foll ows: You can use parentheses to nest expressions within wit hin a query. The expressions expressions in parenthep arentheses are evaluated evaluated before the t he rest rest of the t he query. If a query does not contain a nested nested expression, expression, it is evaluated from left l eft to right. right . For For examexample, " Control NOT acti active ve ORdde" finds fi nds topics topi cs containing the term " control" without wit hout the t he term " acti active ve"" , or topics containing containing the term "co " control" ntrol" and and not " dde" dde" . (On (On the other other hand, hand, " cont cont rol NOT NOT (acti (active ve ORdde)" finds fi nds topics topi cs contai containing ning the term " contr control" ol" without wit hout either eit her of of the terms terms " acti active ve"" or "dde " dde"" .) Nesti Nesting ng allows allows you to create creat e more complex complex search search expressions. expressions. For For exampl example, e, " control contr ol AND ((acti ((active ve OR OR dde) NE NEARwindow)" finds fi nds topics containi containing ng the term " contr control" ol" along with the t he terms " acti active ve"" and and " window" window" close close together, together, or contain containing ing " control" control" along with the t he terms terms " dde" dde" and and " window" window" close together. together. You cannot nest expressions expressions more than t han five fi ve levels deep. To highlight hi ghlight words in searched searched topics topi cs When searching searching for words in i n Help Help topi t opics, cs, you can can specif specifyy that th at each occurrence occurrence of the word or phrase phrase you searche searchedd for is i s highlighted highli ghted in the t he topics that are found. To highlight highl ight all instances instances of a search search word or phrase, cli click ck Opti Options ons on the toolbar, t oolbar, and then t hen click " Search earch Highlight Highlight On" . To turn off this thi s option, click cli ck Opti Options ons on the toolbar, tool bar, and and then cli click ck " Search earch Highlight ighl ight Off" . Note! Note! If you are viewing a long topic, topi c, only the t he first fir st 500 instanc i nstances es of a searc searchh word or phrase will be highlighted. highlighted. Navigat Navigating ing Using the t he Table Table of Contents ont ents To view the t he table of cont cont ents, click the t he Contents Contents tab t ab in the t he navigati navigation on pane. pane.
FST Version 4.02.21 Manual
245
6
Index
Alloca ll ocatition on list 22, 32, 52, 53, 54, 64, 65, 68, 81, 149, 196 Analog 140 Autostart 41 CI command command 13, 42, 63, 99, 101, 102, 109, 112, 218 Clipboard li pboard 16, 17, 19, 47, 64, 64, 66 Clock 108, 109 COM 11, 54, 55, 56, 80, 87, 100, 101, 219, 220, 221, 223 Communication ommunicati on 11, 12, 44, 100, 148, 154, 158, 160, 166, 168, 169, 219, 220, 224 Communication ommunicati on port 55, 79 Control ont roller ler CO COM port 44 Digital 114, 212 Download 10, 11, 12, 13, 16, 21, 22, 28, 29, 31, 32, 33, 40, 41, 42, 43, 44, 45, 46, 49, 51, 62, 63, 167 Drive 9, 11, 43, 44, 51, 62, 63, 110, 142, 144, 148, 156, 160, 162, 175, 187, 220, 226 Driver 9, 10, 11, 12, 22, 22, 32, 42, 46, 48, 49, 50, 51, 55, 57, 82, 84, 85, 88, 92, 99, 100, 102, 108, 110, 113, 140, 143, 144, 145, 146, 147, 148, 156, 159, 160, 161, 162, 165, 166, 167, 169, 170, 171, 174, 175, 176, 177, 180, 183, 184, 185, 186, 187, 189, 190, 192, 193, 195, 196, 199, 203, 218, 219, 220, 225, 226, 227, 228, 232, 233, 236, 239 Driver files 46 Error 12, 42, 56, 57, 91, 95, 96, 97, 98, 99, 100, 101, 104, 105, 113, 140, 141, 142, 148, 152, 153, 154, 155, 156, 163, 165, 168, 169, 170, 171, 172, 173, 174, 175, 178, 179, 180, 181, 182, 183, 184, 197, 198, 199, 207, 221, 222, 223, 224, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239 Error number 98, 99, 147, 163, 170, 171, 172, 173, 174 Error output 42, 97, 97, 98 Error program pr ogram 42, 96, 97, 98, 113, 141, 149 FEC 11, 11 , 12, 43, 44, 87, 92, 95, 96, 96 , 103, 106, 110, 140, 141, 142, 143, 166, 167, 168, 169, 203, 220, 221, 223, 225, 226 FECCompact 43, 44, 44 , 110, 141, 141, 142, 142, 143, 166, 203, 220, 225, 226 FST Version 4.02.21 Manual
FECStandard Standard 11, 43, 44, 44 , 110, 140, 141, 14 1, 142, 143, 166, 203, 220, 225, 226 Find and replace 66 Font 33, 64, 67, 69, 81 Formatting 65 FSToperand operand 46, 47 Function uncti on module 12, 107, 147, 231, 231 , 237 HC01 HC01 142, 219 HC02 110, 219, 225, 226 HC0X 11, 12, 43, 44, 44 , 87, 92, 95, 100, 103, 106, 107, 108, 110, 140, 141, 142, 166, 203, 219, 220, 223 HC16 HC16 11, 101 HC20 10, 11, 92, 107, 226 IF 70, 71, 72, 73, 74, 75, 76, 77, 78, 90, 94, 156, 157, 158, 159, 196, 197, 198, 203, 205, 214, 215, 216, 217, 229, 230 Import 24, 36, 201, 206 206 Imported module 23, 32, 32, 36 IO area 46, 48, 83 IO module 46, 47, 48, 82, 83, 99 IO scrip scriptt 82, 83, 84 Kernel 44, 88, 103 Keyword 67, 188, 240, 242 LOAD 72, 73, 75, 76, 159, 196, 19 6, 197, 198, 205, 214, 215, 216, 217 Main runtime runti me program 145, 185, 190, 190, 191, 192, 194, 195, 199 Module call call 64, 65, 67, 68, 162 Operand 32, 42, 52, 53, 54, 58, 59, 60, 61, 63, 64, 65, 68, 69, 70, 73, 74, 75, 81, 88, 91, 92, 93, 94, 97, 102, 103, 105, 148, 149, 152, 163, 164, 199, 200, 225, 228, 229, 230, 238 Operating perati ng system 49, 64, 88 OTHRW HRW 70, 71, 72, 72, 73, 74, 74 , 90, 215 Password assword 45, 56, 57, 58, 63, 91, 92, 102 Print 17, 31, 32, 33, 47, 49, 53, 67, 81, 145, 152 Program module 94, 157, 169, 199, 203, 205 Real-time eal-t ime clo clock ck 10, 108, 109 RESET SET 71, 72, 72 , 73, 74, 74 , 90, 91, 91 , 94, 96 96 Retentive etent ive 91, 92, 107, 175 RS232 10, 54, 56, 80, 224 Serial interfac int erfacee 221 SET 70, 71, 72, 73, 74, 74 , 90, 91, 94, 197, 197 , 198, 203, 205 Shift 75 Shortcut hort cut 17, 64, 65, 67 246
Source 22, 23, 24, 29, 30, 36, 38, 45, 66, 179, 180, 182, 219, 232 Start 13, 14, 20, 41, 42, 43, 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 number 95, 96, 98, 104 String module 177 Subroutine 35, 37 THEN HEN 70, 71, 72, 73, 74, 7 4, 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, 105, 111, 195, 197, 199 TO 71, 72, 74, 75, 76, 159, 196, 197, 198, 199, 205, 214, 215, 216, 217 Undo Undo 17, 18, 66 Version 1, 10, 11, 12, 13, 26, 32 32,, 35, 38, 41, 95, 148, 175, 184, 219, 220, 224
FST Version 4.02.21 Manual
247
7
Modules
Module name name 7.1
32 Bit Arithmeti ri thmetik k
LADD LCMP LDIV LDIV LMUL MUL LNEG LNEG LSUB 7.2
Addition Addit ion of 32-bit 32-bi t values. Comparison ompari son of 32-bi 32-b it values. valu es. Division Divisi on of 32-bit 32-bi t values. Multipl Mult iplication ication of 32-bit values. values. Change of sign sign for fo r a 32-bit 32-bi t value. valu e. Subtracti ubt raction on of 32-bit 32-bi t values. values. AS-I AS-Int nterface erface modules modul es
ASI_Mode I_Mode ASI_S ASI_Stt at ASI_P ASI_Para ara ASI_R ASI_Res es 7.3
Sets the reacti reaction on of the ASI driver to configuration configurati on errors Interrogat Int errogates es executi execution on control contr ol level (OU (OUF) flags fl ags Transfer a parameter t o an ASI ASI slave at runtime runt ime Restart cyclic cyclic update updat e
Modules Modul es for acce accessing ssing the th e user user int erface erface
SCR SCRATT ATTR SCR SCRCLEAR LEAR SCRCUGPO SCRCUSP USPO SCR SCRCUTY UTYP SRC SRCDOKE DOKEY Y SCREDIT SCREKBD KBD SCR SCRFILL SCRFKEY SCRFLAG LAGS SCR SCRFLIP SCR SCRFRAME SCRKBD SCRMSG MSG SCR SCRNEW NEW SCRPUTS UTS SCRUPDT UPDT SCRWRITE SCRW0808 0808 SCRW0814 0814 SCR SCRXCHG 7.4
Meaning Meaning
Calcul alculat atee screen att at tribu ri butt e Clear screen scr een Det Determine ermi ne current current posit posi t ion of cursor Set curren currentt posi positt ion of cursor cursor Set cur cursor sor type Executi xecut ion of a keyboar keyb oardd input npu t Add an input nput field fi eld Clear keyboar keyb oardd buff buffer er Fill an area wit wi t h space characters charact ers Speci Specify t he label of a funct fu nctiion key Set featur eat uree flags Toggle Toggl e between bet ween screen screen page page and FSTCI Draw Draw a frame ame Interrogate Int errogate t he last input inpu t on t he keyboard Display Displ ay a stri st ring ng in t he message line Draw a new, blank bl ank screen Writ ri te a stri st ring ng at a set posit posi t ion on t he screen Refre efresh sh screen screen cont cont ents ent s Writ ri t e a stri string ng at a set posit posi t ion on t he screen 8x8 block bl ock characters charact ers 8x14 block bl ock characters charact ers Swit Swit ch between bet ween screen screen pages pages
Fil e Handli ng Modules Modul es
FCREATE ATE FOPE OPEN FCLOSE LOSE FCLOSA LOSALL LL FDELE DELETE FSEE FSEEK K FSEE SEEKX FWRITE FST Version 4.02.21 Manual
File creat createe Fil e open op en Fil e clos cl osee Fi l e clos cl osee all al l File del delete et e Fi l e seek seek File seek extend ext ended ed Fil e wri wri t e 248
Module name name FREAD FWRITST ITSTR FREADST ADSTR R 7.5
Get date and ti me modules
F10 F11 F12 F13 7.6
Set t ime Set date dat e Get t ime Get date date FECRemote emot e E/ A-Expan A-Expansi sion on
REMDIAG
7.7
Meaning Meaning Fi l e read File writ wri t e stri string ng File read read stri st ring ng
The Remote emot e FECsoft software package also includes nclu des software soft ware for for monitori monit oring ng the status stat us of the t he FE FECRemote I/ O devices from withi wit hinn the user appli applica catition on program. program. If you want want to include i nclude this capabili capability ty in your appl applicat icatiion, you need to impor i mportt t he RE REMDIAG MDIAGRemote emot e FE FEC error error count counter er int i ntoo your you r FECMAST MASTERproject. proj ect.
Functi uncti on bloc bl ocks ks
F40 F41 F42 F43 F44
Configuration onfigurati on of a fieldbus fi eldbus participant parti cipant Read parameter parameter field fi eld Writ ri t e paramet parameter field fi eld Reset eset all cycli cyclica call output out putss on t he fieldbus. fi eldbus. Status tat us interroga int errogatition on for a fieldbus fi eldbus participant parti cipant
F47 F48
Set error handling handli ng General eneral configurati configur ation on
7.8
Festo Fi eldbus el dbus Sl ave Modul e
FBSLA BSLAVE VE 7.9
Increment ncremental al Encoder for FECand HC0X CPU PUs s
ABRE ABRESET SET ABMOD BMODE
7.10
To reset t he count counter value val ue call call t he modul modulee ABRESET SET. Pin I0.7/ I1.0/ I3.0 can be used t o reset t he counter. The counter will wil l be reset reset if I0.7/ I1.0/ I3.0 is active active and and a positive posit ive edge edge is dedetected on one of the A/ B inputs. input s. You You can choose between 4 modes.
Profi rof i bus DP (CP (CP62) Modul es DP
DP_U DP_USIF SIF DP_G DP_GE ETSL DP_G DP_GE ETDG DP_C DP_CO ONTR NTR 7.11
If you want t o use t he IPCt o become a field fi eldbus bus slave, slave, you must enter and parameterise parameteri se the FBSL BSLAVEdriver dri ver in i n the t he configurer. confi gurer.
Get t he current curr ent USIF USIF stat st atus us Checks whether whet her a diagnost di agnostiic request request is present Obtains bt ains diagnost di agnostiic informat nformatiion from from a DPslave Profi rof ibus funct functio ionn „ Global lo bal Control ont rol Request“ equest “
Profib rof ibus us FMS Drivers ri vers
FMSRE MSREAD FMSWR MSWRIT PID Driver Dri ver PIDCF PIDCFM FST Version 4.02.21 Manual
Read ( poll pol led response) response) writ wri t e (poll (pol led response response)) PID Driver Dri ver PID Regulat egul ator or 249
Module name name 7.12
Positioni osit ioning ng with wit h AM10, AM11 or AM20 or AM30
AMXX AMXX (only AM10, 11, 20) AM30CF M30CFM 7.13
Positioni osit ioning ng with steppe st epperr motor or servo electr electrics ics Positioni osit ioning ng with wit h servo pneumatics pneumati cs
Functi unction on bloc bl ocks ks to contr control ol the execu executi ti on of programs
F4 F8 F23 F26 7.14
Meaning Meaning
St art cycli cyclical cal executi execution on of a program St op all cycli cyclical cal programs Interrogat Int errogatee whether wheth er a program is ready for executi execution on Control ontr ol programs whose numbers are stored stor ed in variables variabl es Serial communication ommunication
OPENCOM CLOSE LOSEC COM GETCOM PUTC UTCOM PRINTC RINTCOM READC ADCOM READLC ADLCOM
Open serial seri al interf nt erface ace Close serial seri al interf nt erface ace Send char character act er Receive ecei ve chara charact cter er Send stri st ring ng Receive stri string ng (incl. (i ncl. deli del imit miter) Receive eceive stri st ring ng (excl. (excl. deli del imit miter)
F30 F31 F32
Set interface int erface parameters Act Act ivate vat e CI Clear buffers buf fers
F34
Interrogate Interrogate status stat us
F35
Change delimit deli miter er
BRE BREAKC AKCOM SETR SETRTS TS
Set/ Set/ Reset hardw hardware are break break (SER SERIALDR IALDRonly) onl y) Acti Active handsh handshake ake for RS485 (SER (SERIALDRonl only)
IS485
Check if handshake handshake is active acti ve (SER (SERIALDR IALDRonly) onl y)
7.15
Further urt her modules
Blink FIFO IFO LOADSYNC
General eneral blink bli nk bits bit s " First-in-fi ir st-in-first-out" rst-out" memory memory Synchronisat ion of pr project (r (re)loading
7.16 7.1 6
Fast Count er for FECand HC0x Defining the operating parameters of each Counter, activating FECCNTR or resetting each Counter, checking the status and current value of each Counter 7.17
String tr ing modules
STRADDR ADDR
Det Determine ermine int internal address of a stri string ng
STR STRAPP APPND STR STRATO ATOH
Append a character charact er at t he end of a stri st ring ng Convert a hexadecimal stri st ring ng into nt o a word word
FST Version 4.02.21 Manual
250 250
Module name name
Meaning Meaning
STR STRATO ATOI STR STRATO ATOIX
Convert onvert a stri string ng into nt o a signed signed word word Convert onvert a stri string ng into nt o a signed signed word word
STR STRATO ATOU
Convert onver t a stri st ring ng into nt o an unsigned unsi gned word
STR STRCAT
Combine ombi ne t wo stri strings ngs in a third hi rd stri string ng
STRC STRCHEC HECK
Memo Memorry check check
STR STRCHGE HGET
Extract xt ract a character charact er from rom a stri string ng
STR STRCHSE HSET
Replace epl ace a charact char acter er in a stri st ring ng
STR STRCI
Execut xecut e a CI command command
STR STRCLR
Delet Delet e a stri st ring ng
STRCMP STR STRCPY
Compare t wo stri st rings ngs character character by character, charact er, differentiat dif ferentiating ing between upper and lower case case Copy opy stri st ring ng
STR STRDEL DEL
Del Delete ete part of a stri string ng
STRDUMP DUMP
Display Displ ay a number number of stri strings ngs
STRFILL STRFILL ILLW
Create a string str ing with wit h a specified specifi ed number number of identi id entical cal charact characters Fill il l a string stri ng with wit h another string, stri ng, rightri ght- or left-ju left -justi stifified ed
STR STRFINDC
Fi nd a charact character er in a stri st ring ng
STR STRFINDS INDS
Find a substri subst ring ng in a stri st ring ng
STR STRGROW STR STRHTO HTOA STR STRICMP ICMP
Enlarge nlarge t he stri string ng memory for an indivi ndi vidual dual stri string ng Convert a word into nt o a hexadecimal stri string ng Compare t wo stri st rings ngs character character by character, charact er, not differe diff erenti ntiating ating between upper upper and lower case case
STRINIT INIT
Initiali Init ialisa satition on or re-initiali re-init ialisa satition on
STRINSR INSRT STR STRITOA ITOA
Insert a string str ing into int o another string str ing Convert onvert a signed signed word word into nt o a stri st ring ng
STR STRLEF LEFT
Left subst substriring ng
STR STRLEN LEN
Lengt Lengthh of a stri st ring ng
STR STRLOW LOWER
Convert onvert a stri st ring ng t o lower case
STRMID
Convert onver t a stri st ring ng t o lower case
FST Version 4.02.21 Manual
251 251
Module name name STR STRNCMP NCMP
Meaning Meaning Compare t he first fi rst characters of t wo stri st rings, ngs, differentiat dif ferentiating ing between upper and lower case case
STR STRNICMP NICMP STR STRRIGHT IGHT
Compare t he first fi rst characters characters of t wo stri strings, ngs, not differe diff erenti ntiating ating between upper upper and lower case case Right subst substriring ng
STRSTAT
Status Stat us of stri st ring ng driver dri ver
STR STRUPP UPPER
Conver onvertt a stri st ring ng t o upper up per case
STR STRUSAG USAGE E
Used and free ree memory memory
STR STRUTO UTOA
Convert an unsigned unsi gned word int int o a stri string ng
7.18
Modul es for TCP/ IP
EASY ASY_R EASY ASY_S IP_ALIV IP_ALIVE E IP_IP IP_IP IP_MAS IP_MASK K IP_T IP_TAB ABLLE DNS DNS_NA _NAME DNSR DNSRE ESOL SOL IP_DNS IP_DNS
Request a block bl ock of operands operands from fr om another anot her IPC. Send Send a block bl ock of operands operands t o anothe anot herr IPC. Check whether whet her IP address address is known kno wn Get/ set our IP address. Get/ et / set our IP netmask net mask Get/ set IP address from/ to table. tabl e. Get/ set hostname host name and domain domain name Resolve esol ve hostname host name t o IP address addr ess Get/ et / set IP address address for for DNS DNS server
IP_G IP_GATE ATE
Get/ et/ set IP address address for for gateway gateway
IP_MAC PING SNT SNTPTIME TCP_C TCP_CLO LOS S
Get Et Et hernet M MA ACaddress from network module Ping Start t ime synchronisati synchroni sation on Close TCP connec connecttion
TCP_HA TCP_HAND ND
Acti Activate vat e TCP handl handler er
TCP_OPE P_OPEN
Open TCP TCP conne connect ctiion
TCP_R TCP_RE ES
Reset eset TCP TCP hand handller
TCP_SE TCP_SEND ND
Send a TCP TCP dat dat apack apacket et
TCP_S TCP_STA TAT T TCP_STR _STR
Stat Status us of TCP connect connectiion Send a stri st ring ng t hrou hrough gh TCP
TFTPFILE
Send Send / request requ est a fil fi le
UDP_F UDP_FW W
Send a FW block bl ock t o another anot her IPC
UDP_ UDP_HA HAND ND UDP_S UDP_SEND END
Activat Acti vatee UDP UDP handl handler Send an UDPdatapa dat apacke ckett
FST Version 4.02.21 Manual
252 252
Module name name UDP UDP_STR _STR
FST Version 4.02.21 Manual
Meaning Meaning Send an UDPdatapa dat apacke ckett
253 253