You are on page 1of 394

WinSPS Help

Software Manual

Revision

3.21

WinSPS Help

Operating Manual

2002 by Bosch Rexroth AG, Erbach / Germany All rights reserved, including applications for protective rights. Reproduction or handling over to third parties are subject to our written permission.

Contents

1 Contents
1 Contents.........................................................................................................................................................I

2 Installation and License .............................................................................................................................2-1 2.1 Installation: From disk on the PC ...........................................................................................................2-1 2.1.1 License: From the demo version to the full version ........................................................................2-1 2.2 Uninstallation: Removing the software from the harddisk .....................................................................2-1 3 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 4 4.1 4.2 4.3 4.4 4.5 4.6 What you should know before you start ....................................................................................................3-1 Calling up the WinSPS software ............................................................................................................3-1 Multiple calls of the WinSPS software ...................................................................................................3-1 Customizing the WinSPS software ........................................................................................................3-1 New project structure .............................................................................................................................3-2 Revision of existing PROFI projects ......................................................................................................3-2 Conversion of existing PROFI files ........................................................................................................3-3 Project presets .......................................................................................................................................3-4 Files of the WinSPS software.................................................................................................................3-5 Networking, multiple file accesses and read-only mode........................................................................3-7 Error messages of the WinSPS software...............................................................................................3-8 Operating Philosophy ................................................................................................................................4-1 Screen Layout ........................................................................................................................................4-1 Command selection ...............................................................................................................................4-3 Common keys for editor operation.........................................................................................................4-4 Mouse operation ....................................................................................................................................4-5 Mouse cursor symbols ...........................................................................................................................4-6 Special dialog boxes ..............................................................................................................................4-7

5 Introducing WinSPS...................................................................................................................................5-1 5.1 We create program examples together .................................................................................................5-1 5.2 Calling up the WinSPS software ............................................................................................................5-1 5.3 Quitting the WinSPS software................................................................................................................5-1 5.4 Presets and Licensing............................................................................................................................5-2 5.5 By the line: The Instruction List (Bosch IL) ............................................................................................5-6 5.5.1 Modules...........................................................................................................................................5-6 5.5.2 The first programming steps ...........................................................................................................5-6 5.5.3 The Symbol File ..............................................................................................................................5-9 5.5.4 Automatic Symbol Assignment .....................................................................................................5-11 5.5.5 Editing a data module ...................................................................................................................5-12 5.5.6 Summary: Editing..........................................................................................................................5-14 5.6 Connecting to the controller .................................................................................................................5-15 5.7 Loading the program into the controller ...............................................................................................5-15 5.8 Testing the program .............................................................................................................................5-16 5.8.1 Monitor - Your window into the controller .....................................................................................5-16 5.8.2 Programming cycle .......................................................................................................................5-16 5.9 So far, so good - how do we continue?................................................................................................5-17 5.9.1 Structure of the context help.........................................................................................................5-17 5.10 Current flow: The Ladder Diagram (LD) ..............................................................................................5-18 5.10.1 Preparation ...................................................................................................................................5-19 5.10.2 Normally-closed and normally-open contacts...............................................................................5-20 5.10.3 Series connection .........................................................................................................................5-22 5.10.4 Parallel connection........................................................................................................................5-24 5.11 Graphical combinations: Functional Block Diagram (FBD) .................................................................5-28 5.12 Step by Step: The Sequential Function Chart (SFC)...........................................................................5-28 5.12.1 MADAP or step marker technique? ..............................................................................................5-28 5.12.2 Table of contents ..........................................................................................................................5-29 5.12.3 The sequence ...............................................................................................................................5-29

II

Contents

5.12.4 Step element ................................................................................................................................ 5-30 5.12.5 Alternative branch and empty step .............................................................................................. 5-31 5.12.6 Step action ................................................................................................................................... 5-35 5.12.7 Logical operation of a transition ................................................................................................... 5-36 5.12.8 Markings in the sequence ............................................................................................................ 5-37 5.12.9 Cyclical execution of the sequence ............................................................................................. 5-41 5.12.10 Create and load........................................................................................................................ 5-42 5.12.11 The SFC Monitor ...................................................................................................................... 5-43 5.13 Instruction List as per IEC 61131-3 (IEC IL) ....................................................................................... 5-45 5.13.1 Boolean operations ...................................................................................................................... 5-46 5.13.2 Boolean operations Parentheses.............................................................................................. 5-48 5.13.3 Boolean operations Nested parentheses ................................................................................. 5-49 5.13.4 Loading a program and more program examples ....................................................................... 5-52 5.14 Compact and clear: Structured Text (ST) ........................................................................................... 5-54 5.14.1 Declaring variables ...................................................................................................................... 5-55 5.14.2 Instructions................................................................................................................................... 5-58 5.14.3 Modules and module calls ........................................................................................................... 5-60 5.14.4 Project preparations..................................................................................................................... 5-60 5.14.5 Module call in conventional programming ................................................................................... 5-62 5.14.6 Creating and loading.................................................................................................................... 5-65 5.14.7 The ST Monitor ............................................................................................................................ 5-65 6 Programming ............................................................................................................................................ 6-1 6.1 Classic programming Language elements, variables, data types ..................................................... 6-1 6.1.1 Character set.................................................................................................................................. 6-1 6.1.2 Numeric literals .............................................................................................................................. 6-2 6.1.3 String literals .................................................................................................................................. 6-3 6.1.4 Timer literals................................................................................................................................... 6-3 6.1.5 Data types ...................................................................................................................................... 6-4 6.1.6 Variables ........................................................................................................................................ 6-4 6.2 IEC 61131-3 Program Organization Unit (POU)................................................................................ 6-6 6.2.1 Module types.................................................................................................................................. 6-6 6.2.2 Program block (PROGRAM).......................................................................................................... 6-7 6.2.3 Function block (FUNCTION_BLOCK) ........................................................................................... 6-8 6.2.4 Function (FUNCTION) ................................................................................................................... 6-9 6.2.5 Module calls ................................................................................................................................... 6-9 6.2.6 Layout of a POU........................................................................................................................... 6-10 6.3 IEC 61131-3 Language elements, variables, data types ................................................................. 6-11 6.3.1 Declaration of variables ............................................................................................................... 6-11 6.3.2 Elementary data types ................................................................................................................. 6-11 6.3.3 Generic data types....................................................................................................................... 6-12 6.3.4 Derived data types ....................................................................................................................... 6-13 6.3.5 Data type with limited value field.................................................................................................. 6-14 6.3.6 Enumerations ............................................................................................................................... 6-14 6.3.7 Arrays........................................................................................................................................... 6-15 6.3.8 Data structures............................................................................................................................. 6-15 6.3.9 Variables ...................................................................................................................................... 6-16 6.3.10 Directly represented variables ..................................................................................................... 6-16 6.3.11 Variable types .............................................................................................................................. 6-17 6.3.12 Attributes of variables .................................................................................................................. 6-18 6.4 IEC 61131-3 Standard function blocks ............................................................................................ 6-20 6.4.1 SR: Flip-Flop with Set dominant .................................................................................................. 6-20 6.4.2 RS: Flip-Flop with Reset dominant .............................................................................................. 6-21 6.4.3 R_TRIG: Detection of the rising edge.......................................................................................... 6-21 6.4.4 F_TRIG: Detection of the falling edge ......................................................................................... 6-22 6.4.5 CTU: Up counter .......................................................................................................................... 6-22 6.4.6 CTD: Down counter ..................................................................................................................... 6-23 6.4.7 CTUD: Up and down counter....................................................................................................... 6-23 6.4.8 TP: Pulse...................................................................................................................................... 6-24

Contents

III

6.4.9 6.4.10 6.4.11

TON: Switch-on delay ...................................................................................................................6-25 TOF: Switch-off delay ...................................................................................................................6-26 RTC: Set real-time clock ...............................................................................................................6-27

7 Programming languages............................................................................................................................7-1 7.1 Instruction List (Bosch IL).......................................................................................................................7-2 7.2 Ladder Diagram (LD) .............................................................................................................................7-4 7.3 Function Block Diagram (FBD) ..............................................................................................................7-7 7.4 Sequential Function Chart (SFC)...........................................................................................................7-9 7.4.1 MADAP or step marker technique ................................................................................................7-10 7.4.2 Screen layout ................................................................................................................................7-10 7.4.3 SFC Table of contents ..................................................................................................................7-11 7.4.4 SFC sequence level......................................................................................................................7-13 7.4.5 SFC Swap-out...............................................................................................................................7-16 7.4.6 Create SFC project .......................................................................................................................7-16 7.5 Instruction List (IEC IL).........................................................................................................................7-17 7.5.1 Instructions....................................................................................................................................7-18 7.5.2 Current Result CR......................................................................................................................7-19 7.5.3 IL sequences.................................................................................................................................7-21 7.5.4 Label .............................................................................................................................................7-21 7.5.5 Parenthesis ...................................................................................................................................7-22 7.5.6 Instruction set................................................................................................................................7-23 7.5.7 Load instructions LD ..................................................................................................................7-25 7.5.8 Assignments ST, S, R................................................................................................................7-26 7.5.9 Boolean operators AND, &, OR, XOR .......................................................................................7-28 7.5.10 Arithmetic operators ADD, SUB, MUL, DIV...............................................................................7-33 7.5.11 Comparison operators GT, GE, EQ, LE, LT, NE .......................................................................7-35 7.5.12 Jump operators JMP, JMPC, JMPCN .......................................................................................7-36 7.5.13 Call of function blocks CAL, CALC, CALCN..............................................................................7-38 7.5.14 Call of functions ............................................................................................................................7-40 7.5.15 Return RET, RETC, RETCN......................................................................................................7-42 7.6 Structured Text (ST).............................................................................................................................7-44 7.6.1 Creating an ST project ..................................................................................................................7-44 7.6.2 Instructions....................................................................................................................................7-45 7.6.3 Expressions and operators ...........................................................................................................7-46 7.6.4 Assignment ...................................................................................................................................7-47 7.6.5 IF instruction .................................................................................................................................7-47 7.6.6 CASE instruction...........................................................................................................................7-48 7.6.7 WHILE loop ...................................................................................................................................7-49 7.6.8 REPEAT loop ................................................................................................................................7-50 7.6.9 FOR loop.......................................................................................................................................7-51 7.6.10 EXIT instruction.............................................................................................................................7-52 7.6.11 Calling up function blocks .............................................................................................................7-52 7.6.12 Calling up functions.......................................................................................................................7-53 7.6.13 RETURN instruction......................................................................................................................7-54 7.7 IEC 61131-3 Standard compliance ...................................................................................................7-55 7.7.1 Deviations an differences .............................................................................................................7-55 8 Presets.......................................................................................................................................................8-1 8.1 Project structure .....................................................................................................................................8-1 8.2 Directories ..............................................................................................................................................8-2 8.3 Projects ..................................................................................................................................................8-3 8.4 Settings ..................................................................................................................................................8-4 8.5 File names and connections to the controller ........................................................................................8-8 8.5.1 TCP/UDP/IP connection set-up and test ......................................................................................8-10 8.6 Buttons in the Presets dialog ...............................................................................................................8-10 8.6.1 Editor.............................................................................................................................................8-10 8.6.2 Monitor ..........................................................................................................................................8-11 8.6.3 Exit ................................................................................................................................................8-11

IV

Contents

8.6.4 8.7

License......................................................................................................................................... 8-12 Additional functions by calling-up WinSPS ......................................................................................... 8-15

9 Editor......................................................................................................................................................... 9-1 9.1 Calling up the Editor .............................................................................................................................. 9-1 9.2 Screen layout ........................................................................................................................................ 9-2 9.3 Program module.................................................................................................................................... 9-3 9.3.1 Programming languages................................................................................................................ 9-3 9.3.2 Networks ........................................................................................................................................ 9-4 9.3.3 Symbolic operands ........................................................................................................................ 9-4 9.3.4 Input checks and symbol assignment............................................................................................ 9-5 9.4 Symbol file............................................................................................................................................. 9-5 9.5 Data module .......................................................................................................................................... 9-7 9.6 Text file .................................................................................................................................................. 9-8 9.7 Batch file................................................................................................................................................ 9-9 9.8 Documentation ...................................................................................................................................... 9-9 9.8.1 Printing of files................................................................................................................................ 9-9 9.8.2 Print layout ................................................................................................................................... 9-10 9.8.3 Control sequences in the module file........................................................................................... 9-10 9.8.4 Cross-reference list...................................................................................................................... 9-11 9.9 Stacker - Processing log ..................................................................................................................... 9-12 9.10 Connection to the PLC ........................................................................................................................ 9-12 9.11 Comparison ......................................................................................................................................... 9-13 9.12 Load program ...................................................................................................................................... 9-13 9.13 Changing to the Monitor...................................................................................................................... 9-13 10 Editor Menu functions .......................................................................................................................... 10-1 10.1 File Menu............................................................................................................................................. 10-1 10.1.1 New/Open .................................................................................................................................... 10-1 10.1.2 Save ............................................................................................................................................. 10-1 10.1.3 Save as ........................................................................................................................................ 10-1 10.1.4 Save all ........................................................................................................................................ 10-2 10.1.5 Insert file....................................................................................................................................... 10-2 10.1.6 Import symbols............................................................................................................................. 10-2 10.1.7 Compile module (ST) ................................................................................................................... 10-2 10.1.8 Check ........................................................................................................................................... 10-3 10.1.9 Create new project....................................................................................................................... 10-3 10.1.10 Generate file for download ....................................................................................................... 10-3 10.1.11 Compare entire program on disk with the PLC ........................................................................ 10-4 10.1.12 Compare all program modules on disk with the PLC............................................................... 10-4 10.1.13 Compare one program module on disk with the PLC .............................................................. 10-4 10.1.14 Compare two program modules on disk .................................................................................. 10-5 10.1.15 Compare one data module on disk with the PLC..................................................................... 10-6 10.1.16 Compare two data modules on disk......................................................................................... 10-6 10.1.17 Compile C module.................................................................................................................... 10-7 10.1.18 Create C library module ........................................................................................................... 10-7 10.1.19 Print program module file ......................................................................................................... 10-9 10.1.20 Print data module file.............................................................................................................. 10-10 10.1.21 Print symbol file ...................................................................................................................... 10-11 10.1.22 Print Sequential function chart ............................................................................................... 10-11 10.1.23 Print layout.............................................................................................................................. 10-12 10.1.24 Cross-reference...................................................................................................................... 10-14 10.1.25 Create sequence .................................................................................................................... 10-15 10.1.26 Change to module editor ........................................................................................................ 10-16 10.1.27 Change to data module editor ................................................................................................ 10-16 10.1.28 Change to symbol editor ........................................................................................................ 10-16 10.1.29 Change to text editor .............................................................................................................. 10-17 10.1.30 Properties ............................................................................................................................... 10-17 10.1.31 File selector ............................................................................................................................ 10-17

Contents

10.1.32 Exit.......................................................................................................................................... 10-17 10.1.33 Back to sequence................................................................................................................... 10-17 10.2 Edit Menu .......................................................................................................................................... 10-18 10.2.1 Undo........................................................................................................................................... 10-18 10.2.2 Redo........................................................................................................................................... 10-18 10.2.3 Last Stacker result ..................................................................................................................... 10-18 10.2.4 Repeat last command ................................................................................................................ 10-19 10.2.5 Cut.............................................................................................................................................. 10-19 10.2.6 Copy........................................................................................................................................... 10-19 10.2.7 Paste .......................................................................................................................................... 10-20 10.2.8 Change IL to comments............................................................................................................. 10-20 10.2.9 Change comments to IL............................................................................................................. 10-20 10.2.10 Go to PLC instructions for step .............................................................................................. 10-20 10.2.11 Go to FC <K_BETRA> ........................................................................................................... 10-21 10.2.12 Insert pagination..................................................................................................................... 10-21 10.2.13 Create/Delete diagnosis marker............................................................................................. 10-21 10.2.14 Find......................................................................................................................................... 10-22 10.2.15 Replace .................................................................................................................................. 10-22 10.2.16 Find operand address (Single cross reference)..................................................................... 10-23 10.2.17 Go to error line ....................................................................................................................... 10-24 10.2.18 Go to PI no. ............................................................................................................................ 10-24 10.2.19 Go to symbol definition........................................................................................................... 10-24 10.2.20 Delete line in declaration table (ST) ....................................................................................... 10-24 10.2.21 Global data types ................................................................................................................... 10-25 10.2.22 Edit network title ..................................................................................................................... 10-25 10.2.23 Insert before network ............................................................................................................. 10-26 10.2.24 Insert after network................................................................................................................. 10-26 10.2.25 Delete network ....................................................................................................................... 10-26 10.2.26 Split network........................................................................................................................... 10-26 10.2.27 Join with previous................................................................................................................... 10-26 10.2.28 Join with next.......................................................................................................................... 10-26 10.2.29 Create networks automatically ............................................................................................... 10-27 10.2.30 Delete all network commands ................................................................................................ 10-27 10.2.31 Create library module ............................................................................................................. 10-27 10.2.32 Call up parameter list ............................................................................................................. 10-28 10.2.33 Edit parameter list .................................................................................................................. 10-29 10.2.34 I/O configuration (OM3).......................................................................................................... 10-31 10.3 View Menu......................................................................................................................................... 10-34 10.3.1 Instruction List (IL) ..................................................................................................................... 10-34 10.3.2 Ladder Diagram (LD) ................................................................................................................. 10-34 10.3.3 Function Block Diagram (FBD) .................................................................................................. 10-35 10.3.4 Sequential Function Chart (SFC)............................................................................................... 10-35 10.3.5 Structured Text (ST) .................................................................................................................. 10-35 10.3.6 Table of contents ....................................................................................................................... 10-35 10.3.7 One level higher......................................................................................................................... 10-35 10.3.8 Sequence title ............................................................................................................................ 10-36 10.3.9 Overview .................................................................................................................................... 10-36 10.3.10 Show sensitive fields .............................................................................................................. 10-36 10.3.11 Change view: Auto <-> Manual branch.................................................................................. 10-36 10.3.12 Symbolic/Absolute.................................................................................................................. 10-36 10.3.13 Network line On/Off ................................................................................................................ 10-36 10.3.14 Toolbar On/Off........................................................................................................................ 10-37 10.3.15 ST Declaration tables ............................................................................................................. 10-38 10.3.16 Font ........................................................................................................................................ 10-38 10.3.17 Colour selection...................................................................................................................... 10-38 10.4 Toolbox Menu LD........................................................................................................................... 10-39 10.4.1 Edit mode ................................................................................................................................... 10-39 10.4.2 Normally-open contact............................................................................................................... 10-40 10.4.3 Normally-closed contact ............................................................................................................ 10-40

VI

Contents

10.4.4 Connection ................................................................................................................................. 10-40 10.4.5 Assignment (coil) ....................................................................................................................... 10-41 10.4.6 Set (S) ........................................................................................................................................ 10-41 10.4.7 Reset (R).................................................................................................................................... 10-42 10.4.8 Timer Pulse (SI) ...................................................................................................................... 10-42 10.4.9 Timer Extended Pulse (SV) .................................................................................................... 10-42 10.4.10 Timer Switch-on delay (SE) ................................................................................................ 10-43 10.4.11 Timer Remanent switch-on delay (SS) ............................................................................... 10-43 10.4.12 Timer Switch-off delay (SA)................................................................................................. 10-44 10.4.13 Timer Stop (TH)................................................................................................................... 10-45 10.4.14 Timer Reset (RT)................................................................................................................. 10-45 10.4.15 Set Counter (SZ) .................................................................................................................... 10-45 10.4.16 Up Counter (CU) .................................................................................................................... 10-45 10.4.17 Down Counter (CD)................................................................................................................ 10-46 10.4.18 Reset Counter (RZ) ................................................................................................................ 10-46 10.4.19 Jump at RLO = 1 (JPC).......................................................................................................... 10-46 10.4.20 Jump at RLO = 0 (JPU).......................................................................................................... 10-46 10.4.21 Module Call at RLO = 1 (CMC) .............................................................................................. 10-47 10.4.22 Module Call at RLO = 0 (CMU) .............................................................................................. 10-47 10.4.23 Call of a second data module at RLO = 1 (MXC)................................................................... 10-47 10.4.24 Call of a second data module at RLO = 0 (MXU)................................................................... 10-48 10.4.25 End of module at RLO = 1 (EMC) .......................................................................................... 10-48 10.4.26 End of module at RLO = 0 (EMU) .......................................................................................... 10-48 10.4.27 Shift Right ............................................................................................................................... 10-48 10.4.28 Shift Down .............................................................................................................................. 10-49 10.4.29 Insert Branch Before ........................................................................................................... 10-49 10.4.30 Insert Branch After .............................................................................................................. 10-49 10.4.31 Delete Branch......................................................................................................................... 10-50 10.4.32 Check Branch......................................................................................................................... 10-50 10.5 Toolbox Menu FBD ........................................................................................................................ 10-51 10.5.1 And (&) ....................................................................................................................................... 10-51 10.5.2 Or (>=1)...................................................................................................................................... 10-51 10.5.3 Insert FBD pin ............................................................................................................................ 10-51 10.5.4 Delete FBD pin........................................................................................................................... 10-51 10.5.5 Negate FBD pin.......................................................................................................................... 10-52 10.5.6 Exclusive Or (=1) ....................................................................................................................... 10-52 10.5.7 SR flip-flop.................................................................................................................................. 10-52 10.5.8 RS-Flip-Flop ............................................................................................................................... 10-52 10.5.9 Timer - Pulse (SP) ..................................................................................................................... 10-53 10.5.10 Timer - Extended Pulse (SPE) ............................................................................................... 10-54 10.5.11 Timer - Start-up delay (SR) .................................................................................................... 10-54 10.5.12 Timer - Remanent start-up delay (SRE)................................................................................. 10-55 10.5.13 Timer - Shut-down delay (SF) ................................................................................................ 10-56 10.5.14 Up Counter (CU) .................................................................................................................... 10-56 10.5.15 Down Counter (CD)................................................................................................................ 10-57 10.5.16 Up/Down Counter (CU&CD) .................................................................................................. 10-57 10.5.17 Comparator - Equal ................................................................................................................ 10-58 10.5.18 Comparator - Not equal.......................................................................................................... 10-58 10.5.19 Comparator - Greater than ..................................................................................................... 10-58 10.5.20 Comparator - Greater than or equal....................................................................................... 10-59 10.5.21 Comparator - Less than.......................................................................................................... 10-59 10.5.22 Comparator - Less than or equal ........................................................................................... 10-60 10.5.23 Jump at RLO = 1 (JPC).......................................................................................................... 10-60 10.5.24 Jump at RLO = 0 (JPU).......................................................................................................... 10-60 10.5.25 Module call at RLO = 1 (CMC) ............................................................................................... 10-60 10.5.26 Module call at RLO = 0 (CMCI) .............................................................................................. 10-61 10.5.27 End of module at RLO = 1 (EMC) .......................................................................................... 10-61 10.5.28 Output assignment (=)............................................................................................................ 10-61 10.6 Toolbox Menu SFC ........................................................................................................................... 10-62

Contents

VII

10.6.1 Swap out .................................................................................................................................... 10-62 10.6.2 Swap in ...................................................................................................................................... 10-63 10.6.3 Insert sequence ......................................................................................................................... 10-63 10.6.4 Insert description........................................................................................................................ 10-63 10.6.5 Transition/Step........................................................................................................................... 10-64 10.6.6 Simultaneous branch ................................................................................................................. 10-65 10.6.7 Alternative branch ...................................................................................................................... 10-65 10.6.8 Loop ........................................................................................................................................... 10-66 10.6.9 Jump .......................................................................................................................................... 10-67 10.6.10 Step action - Non-remanent (=) ............................................................................................. 10-67 10.6.11 Step action - Reset with priority (R) ....................................................................................... 10-68 10.6.12 Step action - Remanent (S).................................................................................................... 10-68 10.6.13 Step action - With time limit (SP) ........................................................................................... 10-68 10.6.14 Step action - With delay (SR)................................................................................................. 10-68 10.6.15 Step action - Remanent with time limit (SPE) ........................................................................ 10-69 10.6.16 Step action - Remanent with delay (SRE) ............................................................................. 10-69 10.6.17 Step action - Set counter (SC) ............................................................................................... 10-69 10.6.18 Step action - Reset counter (RC) ........................................................................................... 10-70 10.6.19 Step action - Increment counter (CU) .................................................................................... 10-70 10.6.20 Step action - Decrement counter (CD)................................................................................... 10-70 10.6.21 Step action - Module call (CMC) ............................................................................................ 10-70 10.6.22 Step action - PLC instructions................................................................................................ 10-71 10.6.23 AND transition ........................................................................................................................ 10-72 10.6.24 OR transition .......................................................................................................................... 10-72 10.6.25 Negation ................................................................................................................................. 10-72 10.6.26 Comment................................................................................................................................ 10-73 10.6.27 Sequence/Step parameters (MADAP only) ........................................................................... 10-73 10.6.28 Copy automatic conditions to the manual branch .................................................................. 10-74 10.6.29 Options ................................................................................................................................... 10-75 10.7 Control Menu..................................................................................................................................... 10-77 10.7.1 Load ........................................................................................................................................... 10-77 10.7.2 Unload........................................................................................................................................ 10-78 10.7.3 Load date and time .................................................................................................................... 10-79 10.7.4 Load firmware ............................................................................................................................ 10-79 10.7.5 Compare firmware ..................................................................................................................... 10-80 10.7.6 Save program to EPROM .......................................................................................................... 10-80 10.7.7 Save program to Memory Card ................................................................................................. 10-81 10.7.8 Load program from Memory Card ............................................................................................. 10-81 10.7.9 Save program to System ........................................................................................................... 10-81 10.7.10 Load program from System.................................................................................................... 10-81 10.7.11 Memory dump ........................................................................................................................ 10-81 10.7.12 Delete memory ....................................................................................................................... 10-81 10.7.13 Start-up mode......................................................................................................................... 10-82 10.7.14 Run ......................................................................................................................................... 10-82 10.7.15 Stop ........................................................................................................................................ 10-82 10.7.16 Infostatus ................................................................................................................................ 10-82 10.7.17 Reference list ......................................................................................................................... 10-83 10.7.18 Interface test........................................................................................................................... 10-83 10.7.19 System Coordinator (SK Table) ............................................................................................. 10-83 10.7.20 Load date and time................................................................................................................. 10-86 10.7.21 Protocol loader ....................................................................................................................... 10-86 10.7.22 Profibus Projecting ................................................................................................................. 10-86 10.7.23 Load Ethernet projects ........................................................................................................... 10-87 10.7.24 Load IP address ..................................................................................................................... 10-88 10.7.25 Load MAP projecting data...................................................................................................... 10-89 10.7.26 Central Programming ............................................................................................................. 10-90 10.8 Change Menu.................................................................................................................................... 10-94 10.8.1 Monitor ....................................................................................................................................... 10-94 10.8.2 Load + Monitor ........................................................................................................................... 10-94

VIII

Contents

10.8.3 10.9 10.9.1 10.9.2 10.9.3

Presets ....................................................................................................................................... 10-95 Help Menu ......................................................................................................................................... 10-96 Contents..................................................................................................................................... 10-96 Software Service ........................................................................................................................ 10-96 Info ............................................................................................................................................. 10-97

11 Monitor .................................................................................................................................................... 11-1 11.1 Calling up the Monitor ......................................................................................................................... 11-1 11.2 Module check ...................................................................................................................................... 11-2 11.3 Connection to the PLC ........................................................................................................................ 11-2 11.4 Multiple calls........................................................................................................................................ 11-2 11.5 Screen layout ...................................................................................................................................... 11-3 11.6 Program module.................................................................................................................................. 11-4 11.6.1 Programming language................................................................................................................ 11-4 11.6.2 Instruction List (IL) ....................................................................................................................... 11-4 11.6.3 Ladder Diagram (LD) ................................................................................................................... 11-6 11.6.4 Function Block Diagram (FBD) .................................................................................................... 11-6 11.6.5 Sequential Function Chart (SFC)................................................................................................. 11-7 11.7 Data module ........................................................................................................................................ 11-8 11.8 Text file ................................................................................................................................................ 11-9 11.9 Operand field....................................................................................................................................... 11-9 11.10 Data field........................................................................................................................................ 11-12 11.11 Forcing........................................................................................................................................... 11-14 11.12 Trigger - Tracing program and data access .................................................................................. 11-16 12 Monitor Menu functions ....................................................................................................................... 12-1 12.1 File Menu............................................................................................................................................. 12-1 12.1.1 Open ............................................................................................................................................ 12-1 12.1.2 Save ............................................................................................................................................. 12-1 12.1.3 Save as ........................................................................................................................................ 12-1 12.1.4 Save all ........................................................................................................................................ 12-2 12.1.5 Insert file....................................................................................................................................... 12-2 12.1.6 Change to module monitor........................................................................................................... 12-2 12.1.7 Change to data module monitor .................................................................................................. 12-2 12.1.8 Change to text editor.................................................................................................................... 12-2 12.1.9 Change to operand field editor .................................................................................................... 12-2 12.1.10 Change to data field editor ....................................................................................................... 12-2 12.1.11 Change to forcing editor ........................................................................................................... 12-2 12.1.12 File selector .............................................................................................................................. 12-2 12.1.13 Exit............................................................................................................................................ 12-2 12.2 Edit Menu ............................................................................................................................................ 12-3 12.2.1 Undo............................................................................................................................................. 12-3 12.2.2 Redo............................................................................................................................................. 12-3 12.2.3 Cut................................................................................................................................................ 12-3 12.2.4 Copy............................................................................................................................................. 12-4 12.2.5 Paste ............................................................................................................................................ 12-4 12.2.6 Find .............................................................................................................................................. 12-4 12.2.7 Find operand address (Single cross reference) .......................................................................... 12-4 12.2.8 Go to error line ............................................................................................................................. 12-4 12.2.9 Go to PI no. .................................................................................................................................. 12-4 12.2.10 Go to absolute program address.............................................................................................. 12-5 12.3 View Menu........................................................................................................................................... 12-6 12.3.1 Instruction List (IL) ....................................................................................................................... 12-6 12.3.2 Ladder Diagram (LD) ................................................................................................................... 12-6 12.3.3 Function Block Diagram (FBD) .................................................................................................... 12-6 12.3.4 Sequential Function Chart (SFC)................................................................................................. 12-7 12.3.5 Structured Text (ST) .................................................................................................................... 12-7 12.3.6 Table of contents ......................................................................................................................... 12-7 12.3.7 One level higher ........................................................................................................................... 12-7

Contents

IX

12.3.8 Sequence title ...............................................................................................................................12-8 12.3.9 Edit ................................................................................................................................................12-8 12.3.10 Display.......................................................................................................................................12-8 12.3.11 Control .......................................................................................................................................12-8 12.3.12 Flag............................................................................................................................................12-8 12.3.13 Load...........................................................................................................................................12-8 12.3.14 Format .......................................................................................................................................12-9 12.3.15 Symbolic/Absolute.................................................................................................................. 12-10 12.3.16 Network line On/Off ................................................................................................................ 12-10 12.3.17 Toolbar On/Off........................................................................................................................ 12-10 12.3.18 Trace from cursor line ............................................................................................................ 12-10 12.3.19 Overview ................................................................................................................................ 12-11 12.3.20 Show timer and counter values.............................................................................................. 12-11 12.3.21 Font ........................................................................................................................................ 12-11 12.3.22 Color ....................................................................................................................................... 12-11 12.4 Control Menu..................................................................................................................................... 12-12 12.4.1 Run............................................................................................................................................. 12-12 12.4.2 Stop............................................................................................................................................ 12-12 12.4.3 Enable outputs ........................................................................................................................... 12-12 12.4.4 Disable outputs .......................................................................................................................... 12-12 12.4.5 Change module one level Down (Plus) ..................................................................................... 12-12 12.4.6 Change module one level Up (Minus) ....................................................................................... 12-13 12.4.7 Infostatus.................................................................................................................................... 12-13 12.4.8 Configuration diagram................................................................................................................ 12-13 12.4.9 Reference list ............................................................................................................................. 12-14 12.4.10 Load forcing file ...................................................................................................................... 12-14 12.4.11 Unload forcing file................................................................................................................... 12-14 12.4.12 Trigger activate program module ........................................................................................... 12-14 12.4.13 Trigger deactivate program module ....................................................................................... 12-15 12.4.14 Trigger display program module ............................................................................................ 12-15 12.4.15 Trigger Operand Address....................................................................................................... 12-15 12.4.16 Synchronize to cascade no. ................................................................................................... 12-15 12.4.17 Central Programming ............................................................................................................. 12-16 12.5 Change Menu.................................................................................................................................... 12-17 12.5.1 Editor.......................................................................................................................................... 12-17 12.5.2 Presets ....................................................................................................................................... 12-17 13 Communications and networked systems...............................................................................................13-1 13.1 Project configurator ..............................................................................................................................13-1 13.1.1 System-wide communications ......................................................................................................13-1 13.1.2 Program call..................................................................................................................................13-2 13.1.3 Creating and editing a project.......................................................................................................13-3 13.1.4 Control tree - Configuring the system ...........................................................................................13-4 13.1.5 Front Side and Back Side .............................................................................................................13-5 13.1.6 IP addressing ................................................................................................................................13-6 13.1.7 Subnet mask .................................................................................................................................13-7 13.1.8 Ethernet settings ...........................................................................................................................13-9 13.1.9 Checking and enabling a system configuration ............................................................................13-9 13.1.10 File menu Create configuration file ..................................................................................... 13-10 13.1.11 File menu Open configuration file ....................................................................................... 13-11 13.1.12 File menu Save configuration file ........................................................................................ 13-11 13.1.13 File menu Save configuration file as ................................................................................... 13-12 13.1.14 File menu Merge configuration files .................................................................................... 13-12 13.1.15 File menu Print .................................................................................................................... 13-12 13.1.16 File menu Print preview....................................................................................................... 13-13 13.1.17 File menu Print options ....................................................................................................... 13-13 13.1.18 File menu End ..................................................................................................................... 13-13 13.1.19 View menu Toolbar ............................................................................................................. 13-13 13.1.20 View menu Status bar ......................................................................................................... 13-13

Contents

13.1.21 Tools menu Insert................................................................................................................ 13-13 13.1.22 Tools menu Delete .............................................................................................................. 13-14 13.1.23 Tools menu Show one level ................................................................................................ 13-14 13.1.24 Tools menu Show all ........................................................................................................... 13-14 13.1.25 Tools menu Hide (one level) ............................................................................................... 13-14 13.1.26 Tools menu Find.................................................................................................................. 13-14 13.1.27 Tools menu Go to next error ............................................................................................... 13-14 13.1.28 Configuration menu Load .................................................................................................... 13-15 13.1.29 Configuration menu Scan.................................................................................................... 13-17 13.1.30 Configuration menu Simple comparison with PLC.............................................................. 13-18 13.1.31 Configuration menu Detailed comparison with PLC ........................................................... 13-18 13.1.32 Configuration menu Detailed comparison with file.............................................................. 13-19 13.1.33 Configuration menu Check.................................................................................................. 13-19 13.1.34 Configuration menu Load copy ........................................................................................... 13-19 13.1.35 Configuration menu Unload copy........................................................................................ 13-20 13.1.36 Ethernet menu Edit parameters .......................................................................................... 13-20 13.1.37 IP Addresses menu Define ................................................................................................. 13-22 13.1.38 Project protection menu Change system protection ........................................................... 13-23 13.1.39 Project protection menu Edit system password .................................................................. 13-24 13.1.40 Presets menu ......................................................................................................................... 13-24 13.1.41 Presets menu General ........................................................................................................ 13-25 13.1.42 Presets menu IP address range.......................................................................................... 13-25 13.1.43 Presets menu Check function ............................................................................................. 13-26 13.1.44 Presets menu Print set-up................................................................................................... 13-26 13.1.45 Help menu Contents............................................................................................................ 13-26 13.1.46 Help menu Info .................................................................................................................... 13-27 13.2 Central programming ........................................................................................................................ 13-28 13.2.1 Prerequisites .............................................................................................................................. 13-29 13.2.2 Functionality and limitations....................................................................................................... 13-29 13.2.3 Preparations - Installing the PROFIboard.................................................................................. 13-30 13.2.4 Preparations - Bus configuration ............................................................................................... 13-31 13.2.5 Presets ....................................................................................................................................... 13-32 13.2.6 Current information .................................................................................................................... 13-33 13.2.7 Troubleshooting ......................................................................................................................... 13-33 14 14.1 14.2 14.3 14.4 PCL The Control in the PC .................................................................................................................. 14-1 Installation ........................................................................................................................................... 14-1 Starting ................................................................................................................................................ 14-2 Projecting with WinSPS ...................................................................................................................... 14-2 Troubleshooting................................................................................................................................... 14-4

Contents

XI

Installation and License

2-1

2 Installation and License


2.1 Installation: From disk on the PC
The WinSPS software (Order no. 077 925) is supplied on floppy disks or CD-ROM or can be obtained via modem from the Bosch mailbox (see menu item Help, Software Service). Detailed installation instructions are contained in the file: SETUPE.DOC You will find the document READPLC.DOC after installation. This file contains last minute changes and corrections which could not be included in WinSPS-Help or in the control manuals, due to lack of time. Please read this file very carefully.

2.1.1 License: From the demo version to the full version


Following the installation of the WinSPS software it is necessary to license it. License will make you a registered user who has legally purchased WinSPS and is entitled to use it. Previously - in the PROFI software - the right to use was proved by the existence of a dongle. This dongle is no longer used with the WinSPS software and has been replaced with the license. You can find additional information by using the help functions for the preset menu License and in the file READPLC.DOC.

2.2 Uninstallation: Removing the software from the harddisk


If you ever want to remove the WinSPS software from your harddisk, you should do this with the included uninstaller program: Uninstall WinSPS. The installer ensures that only the installed files are deleted. Of course, the project files which you have created with WinSPS will remain untouched. Important: The directory where WinSPS was installed is retained for the following reasons: a. You can easily return to the previous state: Simply install the software again in the same directory. b. The license is not lost (the secret files which contain the license information are not deleted: WINSPS.ENT, WINSPS.KEY, and WINSPS.RST)

If you did not delete the software with Uninstall: In this case, a "vacant software entry" is left in the Windows control panel 'Software'. To delete this entry, you have to proceed as follows: 1 Start the Windows Registry editor (Windows Menu: 'Execute') Regedit

2-2

Installation and License

2 Open the following folders one after the other: HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows CurrentVersion Uninstall 3 Select the entry which has to be deleted, e.g. and delete the entry with Do not delete entries except the "vacant" WinSPS and WinDP keys, respectively 4 Close the registry editor

What you should know before you start

3-1

3 What you should know before you start


3.1 Calling up the WinSPS software
The installer program creates the program group: Bosch on the Windows desktop which you can access via the Start menu and Programs. There you will find the button for the WinSPS software, among other things.

3.2 Multiple calls of the WinSPS software


The WinSPS software can be started more than once. This allows you to edit several files - which can even belong to different projects - simultaneously or view them in the Monitor.

Multiple calls of a software are often not intended by unexperienced users. If you start the WinSPS software and an active copy already exists in the memory, a dialog box will appear to notify you of this condition. You can then choose whether you want to switch to the already active copy or whether you want to start the software once more. If desired, this dialog box can be suppressed with the function switch /d.

3.3 Customizing the WinSPS software


The WinSPS software can be customized via function switches. These switches can be entered both in the command line and in the start-up file WINSPS.INI before you start the software. You will find a complete list of the switches in chapter Presets, Parameters. By calling up the WinSPS software for the first time, the following default settings are made: /A /B /C /D /F4 /I /K59 /T /U1.

Switches in the command line The switches described above can be entered in the command line, separated by commas.

Switches in the start-up file Each switch can be written into the start-up file WINSPS.INI. This file must reside in the WinSPS directory (program directory). In case of duplicate entries, the parameters in the command line may overwrite switch settings in the start-up file. A parameter can be entered in each line of the start-up file. This parameter must be the very beginning of each line. Comments can be introduced with a semicolon. Example: ; File: WINSPS.INI /c ;no copyright message at start-up /b ;no backup messages when saving

3-2

What you should know before you start

In case of incorrect switches, a warning will be displayed when the WinSPS software is called, and all subsequent switches will be ignored. The current function switch settings can be viewed in the main menu via the menu function Settings, Parameters.

3.4 New project structure


The new project structure allows the management of several controllers within one project. Previously, there was a one-to-one relationship between projects and controllers.

Project structure of the PROFI software:

New project structure of the WinSPS software:

In addition, each ZS directory is followed by a WORK directory. This is used to store the working files which have been optimized by the WinSPS software.

3.5 Revision of existing PROFI projects


The module and symbol files to be revised must have been created with PROFI software version 3.0 or later. Older versions need to be converted first using a current version of the PROFI software.

What you should know before you start

3-3

Before you edit existing PROFI projects in WinSPS, you will need to create a new project structure and copy the PROFI projects into this structure. In the PROFI software, the file type was encoded in the controller type. WinSPS does not use this encoding (e. g.: *.P5O for CL500, *.PBO for CL200, *.PCO for CL400 becomes the general type *.PXO in WinSPS). The file type needs to be changed manually before the conversion is made . Moreover, the PROFI project must be present in the same language as the currently selected Windows language setting. If the languages are different, the project can be converted using function switch /S... for the language setting. When the WinSPS Editor or Monitor is called, all files (except for library modules, see below) are converted into a new file format which is suitable for Windows.

Following this operation, is will no longer be possible to edit the project with the PROFI software. Please create a backup copy prior to project conversion if required. Special rules apply to the revision of library modules .

3.6 Conversion of existing PROFI files


The conversion is made automatically when the Editor or the Monitor is called. Conversion results in the following changes (for more explanations see chapter Editor, Language Set):

Program modules Only correctly assigned program modules are converted into the new format. The file structure is largely preserved. Conversion is made into the extended IEC 1131-3 format. Non-conforming characters are replaced with IEC 1131-3-conforming designators. Some special charactes are replaced as follows: PROFI Software + (termination) + (embedded) - (termination) - (embedded) % other WinSPS _PLUS _ (single underscore) _MINUS _ (single underscore) _PERCENT _ (single underscore)

The operand attribute is adapted according to IEC 1131-3:

Attribute for Bit Byte Word

PROFI B BY W

WinSPS B W

3-4

What you should know before you start

For parameters, the previous default attribute (<TAB> instead of operand attribute) changes form Word to Bit. Bit operands are replaced with byte operands unless they are used in bitonly instructions.

Symbol file The file is converted into the ASCII format. This means that the symbol file is no longer format-dependent and can be created and edited with any standard ASCII editor. The memory ID R/E is appended to the absolute module name, separated by a comma. II/IO and EI/EO operands are word operands in WinSPS, not bit operands. Symbols are converted into IEC 1131-3-conforming designators (see program modules). Symbols on byte boundaries are entered twice. The additional symbol is appended with a _B. This symbol can be used to make byte, word and double-word accesses.

Data modules All data modules are extracted from the symbol file. Each data module is stored as a data module file under its symbolic name and the file type .PXD. Symbolically addressed data fields are appended to the symbol file as a global constant definition. Conversion is made into the extended IEC 1131 format. ASCII data fields are converted into the IEC 1131-3-conforming data type STRING.

Operand field/data field file Operand field and data field files cannot be transferred into WinSPS. These files need to be newly created!

All other files are not changed by the WinSPS software.

3.7 Project presets


After the WinSPS software has been called up, the system looks for the project path. If a project path has not yet been specified, a dialog box will notify you of this condition, and the current program directory is used as the project path. The project path can be altered in the presets (main menu).

What you should know before you start

3-5

When you exit from the WinSPS software, status files are stored in the controller status file. These files contain the project and controller presets, the current color and font settings of the editors, the current screen positions and the size of the WinSPS window. The status data will be read when WinSPS is started again. This means that the settings of the previous call are always reconstructed.

3.8 Files of the WinSPS software


Most files and directories are created automatically by the WinSPS software based on the presets. Contrary to the PROFI software, no controller type is encoded with the file type. Instead, the letter X is always used (e. g. the PROFI program module file of a CL500 with file type *.P5O is given the name *.PXO in the WinSPS software). During execution of WinSPS, the following files are accessed.

Files in the ZS directory: The ZS directory contains all files which are associated with the current central processing unit. The WinSPS software must be able to make write accesses to this directory. Program module file; this file contains line control bytes. Changes are only allowed in the Module Editor. *.PXL Library module file; this protected program module file contains executable machine code. *.AS SFC file; this file is edited in the module editor in the Sequential function chart (SFC) programming language. *.ST ST file; this file is edited in the module editor in der Structured Text (ST) programming language. *.PXD Data module file; this file is edited in the Data Module Editor (ASCII format). *.SXS Symbol file; this file is edited in the Symbol Editor (ASCII format). *.OXD Operand field file (ASCII format) DFELD.DXD Data field file (ASCII format); only one data field file with the fixed name DFELD.DXD exists within one central processing unit. FIXIER.FXD Forcing file (ASCII format); only one forcing file with the fixed name FIXIER.FXD exists within one central processing unit. *.WSP Controller state file (default name: PROJECT.WSP); this file replaces the former PROJECT.SPS of the PROFI software. Different controller state files can be used for example to allow individual presets for different editors of a PLC project on a single computer. *.QV *.STP *.BAK Cross-reference file (ASCII format) Batch file (ASCII format) Backup file; WinSPS creates backup files for safety reasons. The creation of these files can be suppressed with the function switch /b. *.PXO

3-6

What you should know before you start

*.DOC, *.LST, *.PRN Text files (ASCII format) Files in the library directory: The library directory (BOSCH.BIB) can be used to store all program modules for several projects. Files in this directory are available for dif. Each controller type requires a separate library diferent projects rectory. You can use a common library directory for the controllers CL350, CL400, and CL500. Files in this directory are of the read-only type; the WinSPS software must be able to make read accesses to this directory: *.PXO *.PXL Program module file; this file contains line control bytes. Changes are only allowed in the module editor. Library module file; this protected program module file contains executable machine code.

Files in the SK directory (CL400 and CL500 only): The SK directory contains the files associated with the current system coordinator. The WinSPS software must be able to make write accesses to this directory. SK.SXK SK table; this files is automatically created and managed by the WinSPS software when the SK table is edited. This directory also contains the files for the transfer (protocol loader) and Profibus protocols (Profibus loader).

Files in the project directory (for Central Programming only): Two files are necessary for the Central Programming. They are made with the help of the PROFIBUS configurator. The WinSPS Software reads these files from the project directory. *.BUS *.TOP Bus parameter file; this file contains important performance data for the PROFIBUS system. Topology file; this file contains the structure of the PROFIBUS network.

Files in the project configurator directory: The project configurator is an editing program which is called up via the project presets of the WinSPS. The project configurator creates the directory _Config_CL550 in parallel with the project path. This directory is used to store the configuration files. *.PCF Configuration file: In this file, networked systems are defined and edited in order to group a linked number of controllers of type CL550 that can communicate with each other.

Files in the WORK directory: The WinSPS software creates and appends an internal WORK directory to each ZS directory. This directory is used to store optimized work files.The WinSPS software must be able to make write accesses to this directory. *.PXA Loadable program module file (opcode); this file is automatically created by the WinSPS software and must not be altered.

What you should know before you start

3-7

*.SXA

Symbol check file; this file is automatically created by the WinSPS software and must not be altered. *.PXQ Optimized internal cross-reference file; this file is automatically created by the WinSPS software and must not be altered. *.EST The WinSPS software uses this file to log all error messages or warnings which have been detected using the Compile or Create new project function. The file has the same name as the associated ST file. DFELD.DXA Data field file opcode; this file is automatically created by the WinSPS software and must not be altered. Files in the temporary directory (TMP): The temporary directory is used by the WinSPS software to store temporary work files. WinSPS reads the path specification from the user environment specification "TMP. The variable is specified in the program System settings under the program group System controls. The WinSPS software must be able to make write accesses to this directory. *.TMP Residues of temporary files after a system crash. These files may be deleted. However, it will be necessary to exit WinSPS first. _WINSPS_.ERR This file is used by the WinSPS software to log all fatal errors that may have occurred. The file may be deleted if required.

3.9 Networking, multiple file accesses and read-only mode


Owing to the increasing complexity of automation projects, it is often necessary that several PLC programmers work on one project at the same time. For this purpose, the WinSPS software provides the necessary interlocking mechanisms for parallel access to project files.

Since Windows itself is a multitasking operating system, there is the additional possibility to make multiple calls of the WinSPS software on one workstation and to run it in separate windows on the screen. This is when the software must allow simultaneous, controlled accesses to project files. Moreover, a customizable editing performance is often desired. For example, it can be required to prevent maintenance staff from altering module or symbol files (read-only mode). Another option to restrict the editing capabilities is to block changes to the program code. Only changes to comments are allowed. This can prevent inadvertent program changes during language conversions of a PLC program. For these purposes, the WinSPS software provides corresponding customizing options (see also paragraph Customizing WinSPS in this chapter). In the standard configuration, all files are opened as usual in Read/Write mode. In case of conflicts, dialog boxes will be displayed:

3-8

What you should know before you start

Same file opened twice for writing You are notified that the file is already being edited. It is possible to open the file in read-only mode in which changes cannot be made to the file. If the file is opened in read and write mode, a copy of the file is created. This copy can be edited. When you try to save the file, another dialog box will ask you if you want to overwrite the original file or save the copy under a new name.

Opening a write-protected file in write mode You are notified that the file is opened in read-only mode. No changes are possible.

3.10 Error messages of the WinSPS software


If undefined program states occur during program execution or if the operating system reports a malfunction, WinSPS will create a unique, selfexplanatory error message in a dialog box.

In addition to the screen output, a file _WINSPS_.ERR will be created in the temporary directory which contains the error text of all occurred errors. In this file, the errors are logged with date, time and additional system data. The evaluation of the error file is helpful for error diagnosis. In case of problems with the WinSPS software, please send a hardcopy of the file to our customer service department. The address is contained in the dialog box or under the menu item Help, Software Service.

Operating Philosophy

4-1

4 Operating Philosophy
Operation of the WinSPS software is generally identical to the operating philosophy of Windows 95 or Windows NT, respectively. WinSPS offers several additional features and particularities which will be described in this chapter. Operating instructions for Windows 95 or Windows NT, respectively, are contained in the documentation which is included with the operating systems and in the Windows help system (accessible via the Help button in the Start menu of the task bar).

4.1 Screen Layout

Contrary to many other Windows programs, all menus and buttons of the toolbar are locked in the WinSPS software depending on the situation, i. e. you will always see which functions are available in the current system state. For instance, in the representation modes LD and FBD, all elements which cannot be inserted are visibly locked, depending on the current insertion mark position. In the Windows system, the mouse position (mouse cursor) is distinguished from the writing cursor position (insertion mark)!

Title bar The title bar contains the typical Windows system switches in the left and right margins. In the area in between, version and copyright information is displayed in Presets mode, and general project information is displayed in the Editor and Monitor. The controller name, controller type, control processor and the current file are indicated here. These data are listed in a dialog box in the case of multiple calls of WinSPS so that the desired WinSPS process can be easily located.

Menu bar The menu bar contains all selectable functions.

4-2

Operating Philosophy

Toolbar The toolbar groups frequently used functions in the form of buttons. A click with the left mouse button activates the corresponding function. In the Editor and Monitor, the toolbar also contains a file selector box which allows the fast opening of files.

If you need a larger work area, you can suppress the toolbar of the Editor or Monitor under the menu item View, suppress Toolbar. The toolbar is scaled automatically. This means that the toolbar always extends across the entire screen at different screen resolutions (e. g. 640 x 480, 800 x 600 etc). Automatic scaling can be disabled with the function switch /i. This has the effect that, particularly when using high-resolution monitors, the entire toolbar is visible even when you work in several smaller windows.

Short Info (Tooltips) If you move the mouse cursor over a button without clicking on it, a short description of the respective function is displayed.

Network line Program modules can be subdivided into individual sections - so-called networks - which can be assigned network comments (=titles). Networks are numbered in consecutive order. The network line displays information about the current network. The network line can be suppressed via the Editor/Monitor menu function View, Networks.

Work area The work area contains the file of the current editor or monitor (program module, data module, symbol, text file, etc.). The writing cursor can usually be found here. Scroll bars allow you to move within the editing area. In the Presets mode, the work area contains several input fields which allow you to define the presets for project, controller and file.

Symbol display In the Editor and Monitor, there is also a symbol display below the work area, which shows all currently used symbols. The separation line between symbol display and input area can be moved so that you can suppress the symbol display or display it at maximum size. To do this, you can either click directly on the separation line and move the line up or down while holding down the mouse button, or you can move the line with the key combination + or + , respectively.

Operating Philosophy

4-3

Monitor display In the Monitor, the work area is subdivided into the program display on the left-hand side and the monitor display on the right-hand side; the latter contains a cyclic display of data and states of the controller. The separation line between the program and monitor displays can be moved. To do this, you can either click directly on the separation line and move the line up or down while holding down the mouse button, or you can move the line with the key combination + or + , respectively.

Status line The status line displays current help information as well as error messages. For example, if the mouse cursor is placed on a menu item, the status line will contain a special information text for this menu function. In the Editor and Monitor, the status line also contains the current line and column position of the writing cursor, the program rung number (RG), the program instruction number and the absolute program address (PAA, Monitor only). The Insert or Replace Editor mode is also displayed (can be toggled via key ). Moreover, there is an indication whether the current file has been opened in Read-only mode (RO).

4.2 Command selection


The menu system under Windows follows several fixed rules. Commands can be selected by using one of four different methods:

Mouse operation via menu bar If you click on a menu item with the left mouse button, this function is either executed or another submenu is activated. The input can be cancelled at any time by clicking outside the menu area or by pressing the key . Individual menu items may be locked (unusable) depending on the context. If the mouse cursor is placed on a menu item, the status line contains a special information text about this menu function. A detailed help text for the current menu function can be called up with the key

Mouse operation via toolbar The toolbar groups frequently used functions in the form of buttons. A click with the left mouse button activates the corresponding function. The symbol adapts to the respective functionality of the current editor. This means e. g. that the buttons in the IL representation differ from those in the FBD representation. Several buttons of the toolbar may be locked (unusable) depending on the context. If the mouse cursor is placed on a button, a short description of the function appears, and the status line contains a special information text. A detailed help text can be called up with the key combination + and by subsequent clicking on the desired button. .

4-4

Operating Philosophy

Keyboard operation via menu bar The menu bar can also be accessed by using the keyboard. By pressing you can temporarily leave the work area and go to the menu the key bar. You can activate the individual menu functions by using the cursor or by entering the underscored letter. You keys and pressing the key can leave the menu level at any time by pressing the key. A special information text for the selected menu item is displayed in the status line. You can call up a detailed help text for the selected menu function by pressing the key.

Keyboard operation via shortcuts The fastest way to operate the WinSPS software without a mouse is provided by so-called shortcuts. These are single keys or key combinations which are pressed to activate a function: Alphanumeric keys Alphanumeric keys are used to execute functions within the Editor in the LD and FBD representations. Combinations using the Control key +...

Key combinations using the key are used in the main menu to access the input fields. In the Editor and Monitor, there are primarily used for file editing functions (e. g. copy, paste, find, replace, ...). Combinations using the Alternate + Control keys + +...

Key combinations using the keys + are not used in the main menu. In the Editor and Monitor, they are primarily used for file functions such as open, save, print,.. and to toggle between editors and display modes. These key combinations are identical in all editors. The current shortcut assignment is shown with the menu item associated with the function (example see illustration: The function Edit Undo can be activated with the shortcut + ).

4.3 Common keys for editor operation


Several keys in the work area of the WinSPS editors have the following function assignments: , ... Cursor Home End Page Up Page Down Ctrl+Page Up + Ctrl+Page Down + Line/column forward/back Go to beginning of line Go to end of line Go to previous page Go to next page Go to previous network/form Go to next network/form

Operating Philosophy

4-5

Ctrl+Home + Ctrl+End + Shift+Cursor + ... Ctrl+Cursor left + Ctrl+Cursor right + Ctrl+Cursor up + Ctrl+Cursor down + Scroll Lock Insert Delete

Go to beginning of file Go to end of file Mark block Editor (FBD): Go to 1st operand Monitor: Move separation line between program and monitor display to the left Editor (FBD): Go to last coupling point Monitor: Move separation line between program and monitor display to the right Move connection line symbol display Move connection line symbol display down Scroll screen without altering writing cursor position (IL, LD and FBD editor) Toggle between Insert/Replace mode Editor (FBD): Insert input pin Delete character after the writing cursor or delete marked text Editor (FBD): Delete input pin or function element Delete character before the writing cursor or delete marked text Go to next tab position Cut marked area and copy into clipboard Copy marked area into clipboard Insert clipboard at writing cursor position

Backspace TAB Ctrl+X, Shift+Del Ctrl+C, Ctrl+Ins Ctrl+V, Shift+Ins Ctrl+Z Ctrl+Y F1 Shift+F1 F6

Undo Redo Help Context help + Toggle active work area (keyboard inputs); e. g. in the module editor between network title and work area Cancel operation Esc Alphanumeric character If marked area exists, it will be replaced with the character Activate menu bar Alt Exit from WinSPS + Alt+F4 Alt+TAB, Operating system functions (change task) Alt+ESC, Alt+Space bar

4.4 Mouse operation


Synchronization If the mouse cursor is in the work area, clicking with the left mouse will synchronize the writing cursor with the current mouse position, i. e. the writing cursor will be set to the current mouse cursor position.

4-6

Operating Philosophy

Block marking A block is marked by dragging the mouse while holding down the left mouse button. When the upper or lower limit of the work area is reached, the work area will scroll accordingly.

Drag & Drop An already marked area can be moved while holding down the left mouse button. If the key is pressed before the mouse button is released, the block is copied .

Double-click A double-click with the left mouse button in the Editor marks a whole word.

Right Mouse Button If you use the right mouse button, an additional context menu with many relative functions will appear regarding various screen areas.

4.5 Mouse cursor symbols


The WinSPS software uses the following special mouse cursors in addition to those commonly used in Windows:

or Drag & Drop: This cursor symbol appears in a marked block area when the left mouse button is held down. This area can be moved or copied to another position by subsequently moving the cursor .

Context help: This cursor symbol appears after the key combination + has been used. If you subsequently position the cursor on any area of the WinSPS screen and press the left mouse button, the context help for this area or function will be displayed . You can reset the context help mouse cursor with the key .

Move separation line: This symbol is displayed if the mouse cursor is placed on the connection line between the work area and the symbol display. The separation line can be moved up or down with the left mouse button depressed.

Move separation line: This symbol is displayed if the mouse cursor is placed on the connection line between the program and Monitor display in the Monitor. The separation line can be moved left or right with the left mouse button depressed. The following mouse cursor symbols are displayed in the SFC editor:

Operating Philosophy

4-7

This symbol is displayed at those positions where no inputs are possible.

At this position, step elements, branches and loops, or step actions can be inserted, deleted, or changed. Also, swap-outs can be inserted here.

As above, but the element will be inserted below this position.

Here, a branch-out can be inserted or deleted in a branch.

At this position, a boolean operation or a negation of a condition can be inserted or deleted.

4.6 Special dialog boxes


The WinSPS software uses special dialog boxes for which the operation and functionality is explained below:

File Open/Save as Owing to the WinSPS project structure, this dialog box has some particular features: The current file type is fixed; this means e. g. that if you work in the symbol editor, only symbol files can be used. When entering the filename, you can leave out the file type.

In the dialog box for File Open, the drive and directory correspond to the current presets in the main menu and cannot be changed. The Readonly option can be used to write-protect the file so that changes to the file cannot be saved. The Network button has no function since only the current ZS directory is edited.

Create batch file A batch file can be used to group user-defined groups of program and/or data modules. These groups can then be used for the editing functions on several files, e. g. for creating printouts, loading etc. Such groups are created directly in the editor function via the call Create batch file. This will call up the Create Batch File dialog box:

4-8

Operating Philosophy

On the left side, all available modules according to the symbol file are listed. On the right side, the current contents of the batch file are listed. All modules marked on the left side can be appended to the end of the batch file via the Add button. All modules marked on the right side can be moved back to the left side via the delete button and thus removed from the batch file. This offers a possibility to determine the sequence of modules in the batch file. When you click on the OK button, the changes in the batch file will be saved.

Stacker (execution log) The Stacker window is used as an execution log for WinSPS functions which process several files. The following functions use the stacker window to log files: - compare functions between file and controller - functions for printing files - function for creating cross-reference listings - loading and unloading functions

The Stacker window shows the total of files to be processed, how many files have already been processed, and which ones contain errors. The processing status is shown.

Operating Philosophy

4-9

All files to be processed are displayed with a processing result. The Stacker window contains a Go to button which can be used to open and edit an incorrect file. The last displayed execution log (Stacker window) that has been used by a function to produce a listing of incorrect files can be displayed once more via the Editor menu item Edit, Last Stacker result. The processed files of the Stacker display can be viewed in one line or as a listing. The selection can be made via the function switch /p.

Color selection This allows to make the color settings for Editor and Monitor:

Select the are for which you want to select a color. The selected area is shown in a box in the lower window. When you click on the Change button, another dialog box will appear where you can choose the desired color. The Default button resets the selected area to the default color. The All Default button resets all colored areas to the default colors.

4-10

Operating Philosophy

Monitor Menu functions

5-1

5 Introducing WinSPS
5.1 We create program examples together
This chapter is not a general introduction to the programming of the controllers but rather a description of the operating principles and advantages of the WinSPS software. This brief introduction using the example of various small programs shows the typical programming steps: presets, editing in various programming languages, loading, and testing. On completion, you should be able to explore the many other useful functions of the WinSPS on your own. You will be assisted by a comprehensive help system which can be called at any time by pressing the keys or + . To perform all programming steps (incl. loading and checking), you will need a controller. The example is quite generic so that you will also be able to use - with minor variations - every Bosch PLCs (CL150, CL200, CL350, CL400, CL500, iCL700, PIC250, PCL or RM65CL).

Do not load the programming example into an active system!

The symbol will prompt you to enter the instructions that follow. The will prompt you to perform the mouse action that follows. symbol We recommend that you print out the WinSPS introduction on paper first, which will make it easier for you to follow each step. Select a high graphical resolution on your printer. You can start now. Good luck!

5.2 Calling up the WinSPS software


The installation program creates the program group Bosch on the Windows desktop which you can access through the Start menu and Programs. You will find several other icons there.

Start the WinSPS software by clicking

5.3 Quitting the WinSPS software


Barely started - here comes already the advice that you can abort the example programs at any time:

Click on the button

, or...

... press the key combination

, or...

...as usual for Windows programs - with

5-2

Monitor Menu functions

5.4 Presets and Licensing


After having started the WinSPS software, you will be in the Preset mode. Here you can make all project and controller related settings which will be retained after you have exited from the program. The preset is divided in different functions: 1 License 2 Directories 3 Projects 4 Presets 5 File names and connection to the controller

You can access the input fields either by mouse click, shortcuts or with repeated use of . License

+...,

Before starting with the presets for your first PLC project, you should do the licensing of the WinPLC software. No PLC projects can be made and edited as long as there is no valid license.

Click on the license button In the license dialog box, you can choose between different license types (Click on the appropriate arrow button to get more information): Soft license Hardlock license 14-day test license

Monitor Menu functions

5-3

Directories

Project path: All PLC projects will be stored after the path name you enter in this field. You can use the proposed directory.

Library path: The Lib. Path determines the directory for shared program modules. If a module is not found in the current ZS directory, the system will try to load the module from the library directory. Accept the proposed setting ( or ).

Projects

Project name: This name is used to create the project directory with the extension .PRJ. One project may also comprise several controllers (even with different types). Accept the proposed setting PROJECT.PRJ. As you can already see, the system proposals save you a lot of work. Of course you can overwrite the system proposals with your own inputs.

Controller: The controller name is the symbolic name of the controller. Please put in a new controller:

Click on the button 'New Controller'

5-4

Monitor Menu functions

A dialog box appears, where you can choose a controller.

You can find the cursor in the entry field for the controller name. Please put in the following name: MYPLC

In case of a typing error, you can erase incorrect characters with .

or

Controller type: The controller type is chosen below the entry field for the controller name: Click on the desired controller type. Please be sure that the controller type is adjusted to the connected controller. Close the dialog box: Click on the button Finish, or...

...with the button Skip the presets Parameter and Author.

File names and connection to the controller Now, file names are given to the controller. Four register cards exist in the multiprocessing controller CL500. Each central unit gets ist own preset.

Monitor Menu functions

5-5

Accept all proposed names, except the data module name. Put the cursor in the data module field and overwrite the entry. The data type .PXD is automatically completed: DATA If an entry field is abandoned empty, the WinPLC software automatically creates the standard name.

Additional presets need to be made if you only want to work in the 'Sequential Function Chart (SFC)' or Structured Text (ST): Please click here for SFC Please click here for ST

All presets for our example are now complete. The presets are saved automatically so that they will be available when WinSPS is called up again. Please switch to the Editor now:

Click on the Editor button

, or...

... press the key combination

(Editor), or...

... with the button

Several dialog boxes appear with the request if new files should be created. Confirm all these requests with 'Yes'.

5-6

Monitor Menu functions

The WinSPS introduction subdivides now to various program examples which are especially conceived for the IL, LD, FBD, SFC, and ST programming languages. You can edit all programming languages - and therefore all program examples - one after another. You should at least process the IL introduction because the principle of modules and networks as well as the working with symbols and data modules is described only there. You can also choose a program example specifically. For this, click on the desired programming language in the illustration below:

5.5 By the line: The Instruction List (Bosch IL) 5.5.1 Modules
The following example program is subdivided into three so-called modules.

The Organizational Module OM1 serves as a cyclic start-up module of the program. OM1 is always required. The Program Module FC1 is called within OM1. FC1 contains the program instructions. Moreover, the program is provided with data, and it provides data itself. For this purpose, the Data Module DM0 is accessed within FC1.

5.5.2 The first programming steps


You are now in the WinSPS Module Editor. The program is created in the Instruction List (IL) programming language. If you are still not in the IL programming language, adjust it now: Click on the IL button.

Monitor Menu functions

5-7

The program instructions are subdivided into networks. First of all, enter a network title for OM1: Click directly on the input field of the network title, or...

Click on the network title button

, or...

... press key

, ...

... and enter the text OM1. Terminate your entry with

As you can see, a comment header has already been entered in the new file. You can recognize comments by a semicolon at the beginning of the line and by the blue color. You can modify or make additions to this comment as desired. Put the cursor under the comment lines (between the last comment line and EM). For doing so, press the key several times. or ; Enter the following instructions. (Create separations with . After the input of CM, please press twice terminate each line with or . Look out for the hyphen directly before the designation PROor ): GRAM. Finally, delete the EM instruction (with

; OM1 for MYPLC ; BA -PROGRAMM PE

Comments are preceded by ; and can be added as desired! ; Module call FC1 ; End of program

5-8

Monitor Menu functions

You will certainly have noticed during the input of the instructions that several characters appear in red on the left side of the line. This is an automatic error check of your inputs. For example, the error code SU is shown. What is the meaning of this error code? If you position the cursor in the error line ( ), you will get an information in the status line:

The source operand in our example is -PROGRAM. This module is not yet known to the system. How you can inform the system of this module is described in the following paragraph Symbol file. But first of all we want to create and edit the program module. Open a new program module with the name PROGRAM: In the Filemenu, click on New/Open, or...

... press the key combination

A dialog box will appear. Enter the following filenames and confirm your input with : PROGRAM Three dialog boxes appear: 1 Please confirm the request if the program module PROGRAM.PXO should be created, with 'Yes'. 2 Another dialog box will notify you that the OM1 you just edited still contains errors. Do not correct the file now. Please remember the error code in OM1 and that the error will be corrected later - by making FC1 known in the symbol file. 3 When prompted whether you want to store OM1, answer with "Yes". Now space has been made in the work area for the FC1 (PROGRAM.PXO). Enter the network title "Motor control" first and also skip the comment header here. The instructions for your first program are as follows. Insert two separation characters after the operator: 2 x or 2 x , and now, delete the EM instruction at the file end (with or ). ; FC1 for MYPLC AN I0.0 A I0.1 AN I0.2 = Q0.0

Monitor Menu functions

5-9

You may want to know why the two separators are necessary. The reason is that each instruction line adheres to a specific format (<TAB> = separator): operator <TAB> attribute <TAB> source operand{,destination operand} In our example, the attribute has been omitted. The attribute need not be entered because the system can determine it by looking at the operator and operand and can create an attribute automatically if required.

This completes the input of the program instruction. As a next step, you will make yourself familiar with the use of symbols. This will also include preparations to make the error codes SU and > disappear.

Click on the Symbolic Editor button

, or...

...press the key combination

5.5.3 The Symbol File


The Symbolic Editor has a different appearance. Here, we do not need the network line, the symbolic display as well as several buttons in the symbol bar:

Here, we also have a pre-defined file. It already contains OM1: OM1,R OM1 ; Cyclic program execution

Position the cursor into the Function Call area (program modules) and or terminate your input enter the following line: Start your input with with it to create an individual line:

5-10

Monitor Menu functions

FC1

PROGRAM

; Program module

Position the cursor into the Data Modules area and change the line for the DM0: DM0,R DATA ; Data module

What is the meaning of these entries? This will become clear if you think or about the line structure of the symbol file (<TAB> = separator ): Type <TAB> Module name/Symbol In the symbol line, a module (type) is assigned a symbolic name. And this in turn makes the module known to the system. A symbolic name can be any name which is suitable as a filename (up to 8 characters). Please note that this name must be the same as the actual filename of the module. The use of symbolic names is not limited to modules. You can also use symbolic names to address operands. First of all, position the cursor into the area for all additional operands: ; the I0.0 I0.1 I0.2 symbolic input designators follow here OFF_key ; any amount of symbol comment can be inserted here Switch_clockwise Switch_counterclockwise

; the symbolic output designators follow here Q0.0 Motor_rotation_clockwise Q0.1 Motor_rotation_counterclockwise

Each line will also be checked in the symbol file, and an error code will be set in case of incorrect inputs. Remember? In our example program, we did not use symbolic operands for the inputs and outputs. Please switch back to the Module Editor to change this:

Click on the Module Editor button

or...

...press the combination

Monitor Menu functions

5-11

5.5.4 Automatic Symbol Assignment


Now you are back in the work area of the program module FC1. Or are you? It looks different:

First, you may note that all error codes > have disappeared. Moreover, all absolute addresses have been replaced with symbolic ones. I0.0 is now OFF_key, I0.1 is now Switch_clockwise etc. The WinSPS software has automatically assigned addresses to symbols. Now the Symbol display in the lower part of the screen will also come to life. Here, all absolute addresses of the current network are listed with their associated symbolic addresses and comments. If you position the or ), a flag will be set in the symcursor into an instruction line ( bolic display. This will give you a complete overview of the symbolic addresses at any time. Position the cursor to the end of the file (below the last instruction line, but before EM). Make the following additions to the program and see how the assignment is made automatically during the input: AN -OFF_key Note that the input of symbolic addresses is checked immediately and is completed in the symbol display.

AN A

I0.1 I0.2 Note that the entered absolute addresses are converted immediately.

Q0.1 Note that the input of a new designator results in an immediate addition to the symbolic display. This means that is makes sense to create the symbol file well before entering the program instructions so that all symbols are available at the time the program is written.

5-12

Monitor Menu functions

Please make sure to save your inputs from time to time to prevent accidental loss of data. The easiest way to do this is to use the command "Save all:

Click on the button

, or...

...press the combination

When requested whether you really want to save the symbol file and the program file, answer with "Yes". The programming process is almost complete now and you could almost load the program into the controller. However, we would like to introduce you to the use of data modules first:

Click on the Data Module button

, or...

...press the key combination

5.5.5 Editing a data module


Here, the picture changes again. You see the same screen layout as in the Symbolic Editor. The Data Module Editor is used to edit one data module. Data modules allow you to access data in the controller. First, it will be necessary to modify the data in order to reserve the PLC memory area for your requirements. Please change the first four data lines (lines below LENGTH): 0 1 2 4 BOOL BYTE INT WORD FALSE (* comment *) 123 12345 0

We will explain the meaning of these input lines: In the first line, the key word LENGTH is used to specify the length of the data module. The length line is followed by the data lines (<TAB> = separator ): data address <TAB> data type <TAB> data or

Monitor Menu functions

5-13

The data address is in the range of 0 through 511 (byte address). You can calculate the next data address using the addressing width of the data type; e. g. - BOOL 1 byte - BYTE - INT - WORD 1 byte 2 bytes 2 bytes

In our example, the maximum length for data modules of 512 bytes has been specified. This allows you to append additional data to the end of the file without having to change the length specification. However, we do not recommend to do this because this method reserves the maximum memory requirement in the controller. If you create a large program with many data modules, this can result in memory problems very soon. In our example, we need exactly 6 bytes. Change the length specification accordingly: Position the cursor into the line with the length definition (by di) several times and rectly clicking into the line or by pressing change LENGTH=6 . The error code DE appears now at all unused lines. It happens to be a warning note that can be ignored in this case. This completes the editing of the data module. Now switch to program module FC1 (PROGRAM.PXO) again in order to integrate the access of the data module into the program:

Click on the Module Editor button

or...

...press the combination Create a new network:

Click on the button for inserting a network after the current network , or...

... press the key combination

, ...

Enter the network title "Access to data module", followed by these instructions:

5-14

Monitor Menu functions

CM L INC T EM

-DATA D4,A A,1 A,D4 ; access to data word 4 (WORD = 0) ; increment by 1 and ; restore to data word 4

The module call CM -DATA prepares the access to the data module. The function of the remaining instructions is explained in the section Program Testing. The EM instructions designates the end of module. This instructions must always be used at the end for program modules. All inputs are now complete. Save everything and recapitulate the entire procedure:

Click on the button

, or...

...press the combination

5.5.6 Summary: Editing


You have created and edited four files: 1 OM1.PXO 2 PROGRAM.PXO 3 DATA.PXD 4 PROJECT.SXS Organizational module OM1, Program module FC1, Data module DM0, and Symbol file.

These files will now be used to create a program which you can then load into the controller. Subsequently, you can monitor and test the execution of this program.

Monitor Menu functions

5-15

5.6 Connecting to the controller


The connection is established via the connection cable K16, K19 between the serial port of your PC and the controller. The current data rate is selected in the presets. You can also make the system perform the settings automatically: In the Controller menu, click on the menu item Interface test. You can monitor the search process in the dialog box. If the message "No controller found" appears, this can have several reasons: - the connection cable is not or not properly connected, - the controller is switched off.

5.7 Loading the program into the controller


Do not load the program example into an active system! If you want to load the program into a CL400 or CL500, you will need to call up the menu item System Coordinator in the Controller menu and make the entries for the SK or ZS module, respectively. To learn how to make the settings, you can now call up the help topic with this key . This editing procedure is not required for all other controllers. You can directly proceed with the loading: In the Controller menu, click on the menu item Load..., or...

...press the combination

A dialog box allows you to make several settings. The default values are correct for this (and most other) program(s). Therefore, you can directly start the loading process: Click on the OK button, or...

...press

The loading process is logged in a dialog box. However, it is very fast so that you may not be able to follow it.

5-16

Monitor Menu functions

A dialog box will ask you if you want to switch the controller to STOP. Confirm this with "Yes". After the program has been loaded into the controller, you will be asked "Switch controller to RUN? Confirm this also with "Yes". Now the program is running in the controller. You can follow the program execution in the Monitor program:

Click on the Monitor button

or...

...press the combination

5.8 Testing the program 5.8.1 Monitor - Your window into the controller
In the Monitor program, you can test the program, check controller and program states, visualize the I/O state, keep track of module calls, force states and manipulate them.

Following the switch-over, you will see the familiar screen with the program module. The work area has an additional vertical limiting line. On the right side of this line, the I/O state or the register contents of the controller are displayed in cyclic form. You can see the cyclic accesses by the controller by looking at the rotating Bosch symbol on the right side of the symbol bar. Now you see which transactions are performed on the data module. First, register A will be loaded with the contents of data word 4. The next command increments the register contents by one value (INC). Subsequently, this value is written back into the data word. On the right side of the screen, the current register contents are displayed. Since this process is performed very fast in controller, you are not able to view each individual step in the Monitor program.

5.8.2 Programming cycle


Bosch controllers offer the big advantage that you can modify a program very quickly without having to stop the controller. Switch back into the Editor:

Monitor Menu functions

5-17

Click on the Editor button

, or...

... make a direct call using the key combination Change the instruction line INC W A,1 ; increment by 1 and

into:

DEC

A,1

; decrement by 1 and

Select the command Load+Monitor:

Click on the button

, or...

...press the key

This command enables the loading process. This will not stop the controller. Subsequently, you will be back in the Monitor program where you can verify the current change. This procedure is most suitable to effect program changes with the controller running. You should be aware of the fact that this loading process will only cause an additional loading of the changes into the controller. We recommend to perform the regular loading procedure from time to time in order to "clean up" the program memory of the PLC.

5.9 So far, so good - how do we continue? 5.9.1 Structure of the context help
You know now how to create a program, to load it into the controller, to test it and to edit it. However, the WinSPS software offers a lot more useful and practical functions. To obtain information about these functions, you can use the context help. This help function provides detailed information about all visible elements of WinSPS and about all items of the menu bar:

5-18

Monitor Menu functions

Screen area: Press the combination + .

The mouse cursor changes its shape and now has a question mark attached to it! Click on the area about which you need more information.

Menu function: Click on the menu bar and position the cursor on the menu item about which you need more information.

Press the key

In addition, all Editor programs provide supporting information about the layout and the language set if you press the key .

5.10 Current flow: The Ladder Diagram (LD)


You are working in the WinSPS Editor. If you have not already selected the Ladder Diagram mode, please call it up now: Click on the Ladder Diagram button (LD).

The following programming example is a simplified control for an electric garage door. This example is also used in the Function Block Diagram (FBD). Please consider the following requirements: - A switch is used to open (ON position) or close (OFF position) the garage door. - The garage door drive motor can run in both directions. - The motor is started and stopped using another input element. - Two sensors supply the door end positions.

Monitor Menu functions

5-19

5.10.1 Preparation
As a first step, the symbol file is edited so that all symbols are available for editing in the Ladder Diagram.

Click on the Symbol Editor button

, or...

...press the key combinaton

In the Symbol Editor, a pre-defined file is displayed which already contains the OM1: OM1,R OM1 ; Cyclic program execution

Position the cursor into the area "Function Call (program modules) and type the following line. Start your entry with or use this to terminate your entry so that a separate line is created:

FC1

PROGRAM

; Program module

Now position the cursor in the area for all other operands and enter the following lines:

; here follow the symbolic input designators I0.0 Switch_Garage_door ; 1 = Open garage door, 0 = Close garage door I1.0 I1.1 Limit_switch_Open_door Limit_switch_Close_door

5-20

Monitor Menu functions

; here follow the symbolic output designators O0.0 Motor_Garage_door ; 1 = Motor ON, 0 = Motor OFF O1.0 Direction_Open_door O1.1 Direction_Close_door

These symbols should be sufficient at the moment. Please return to the Module Editor:

Click on the Module Editor button

or...

...press the key combination

5.10.2 Normally-closed and normally-open contacts

Position the cursor between the comment lines 'EM'.

Insert your first branch 'before' using the

button.

The Ladder Diagram is similar to the circuit diagram of conventioanl relay controllers, comprising contacts and coils. The graphic editing range is limited by so-called busbars in the left-hand and right-hand margins. The LD elements can be inserted between these busbars. Two elements do already exist: a normally-open (NO) contact and an output element on the right side. As a first step, the two directions in which the garage door can move shall be programmed. Complete the input field for the operand of the normally-open contact:

Click on the input field directly above the normally-open contact

or...

Monitor Menu functions

5-21

...press

Enter 'I0.0' into the yellow input field and terminate the entry with . The entry is immediately converted into the symbolic operand. If you do not like this representation, you may switch to absolute operands using the menu option View, Symbolic. In the symbolic view, all aboslute addresses with their associated symbolic addresses and comments are listed at the bottom. Remember the requirement that the garage door needs to be opened with the switch contact closed? This is exactly what the normally-open contact element does. This means that the output assignment needs to be configured with the "Open" direction of movement: Click on the input field directly above the output element

or...

...press

followed by

Enter 'O1.0' and terminate the input with

This already completes the first branch. To insert a new branch, you need to exit from the Edit mode:

Click on the

button...

... and insert a new branch 'after' using the

button.

As you will see, the insertion of a new (program) branch results in an automatic change-over into the Edit mode. You can recognize the Edit mode by the area between the two busbars being covered with a grid. Changes to the Ladder Diagram are only possible in the Edit mode. In this branch, the direction of movement for closing the door shall be defined. The door is closed if the garage door switch is open. Convert the first element into a normally-closed contact by clicking on the button, or...

5-22

Monitor Menu functions

...by pressing the

(zero) key.

Enter 'I0.0' into the input field. Now you also need to edit the operand for the output assignment: Click on the input field of the output element, ...

...enter 'O1.1', ...

...and exit from the edit mode by clicking on the

button.

Now you see both branches superimposed. You can image the Ladder Diagram as a circuit diagram with the current flowing from left to right.

In both branches, the position of the same switch is evaluated. In the first branch, current can flow with the contact closed (NO contact) in order to activate the output which sets the motors direction of roration to "Open". This situation is reversed in the second branch. With the contact open (NC contact), currect flows to the output element in order to set the direction of rotation to "Close". Depending on the position of the switch, a direction of movement is always defined. In the next step, we will make the motor run.

5.10.3 Series connection


The following program branches need to be placed in a new network. For this purpose, you need to change temporarily into the IL (Instruction List) programming language: Click on the IL button.

The network commands become visible in the tool bar. Position the cursor before the EM instruction, ...

Monitor Menu functions

5-23

...and click on the Separate network button You are now in a new network (no. 2). The end-of-module instruction EM has been inserted into this network. If necessary, you can rename the networks. The input field for this name is located next to the network number. For example, network no. 1 could be named "Evaluation of garage door switch", and network no. 2 could be "Motor control". Click on the LD button to return into the Ladder Diagram...

... and also insert a new branch

Program this branch as illustrated in the figure below:

You have already learned in the preceeding paragraph how to program the first element. But how can you insert the second element? This is very easy. The Ladder Diagram has two insertion positions: vertical and horizontal.

If you place the curser on the next free horizontal insertion position in the current flow, you can insert a new normally-closed or normally-open contact (the vertical insertion position will be described later). The direction keys (e.g. etc.) permit fast navigation through the Ladder Diagram. The key (zero) can be used to insert a normally-closed contact, while the key inserts a normally-open contact. In the program branch, two contacts are connected in series. In the IL programming language, this corresponds to an AND combination. The motor will run as long as the direction of motor rotation "Open" is present and the limit switch is not actuated (because it is evaluated as an "Opener"). This method can be directly applied to the reverse direction of movement: Please insert a new branch ...

... by exiting from the Edit mode

...

5-24

Monitor Menu functions

... and by clicking on the

button.

Program this branch as illustrated below:

This completes the garage door control application. However, we want to enhance this control by an automatic light control to demonstrate additional programming options using the Ladder Diagram.

5.10.4 Parallel connection


Change into the Symbol Editor in order to include additional input and output elements for an automatic light control.

Click on the Symbol Editor button (The Edit mode needs to be disabled first, otherwise the Symbol Editor button will not be functional). Position the cursor into the area for all other operands and add the symbol entries: ... I2.0 ... O2.0 Light ... T1 Timer_Light Light_switch

It should be possible to switch the light (O2.0) in the garage on and off using a light switch (I2.0), and it is desired that the light is on for one minute (T1) every time the garage door is opened or closed. Switch back to the Module Editor:

Click on the Module Editor button Create a new network:

Monitor Menu functions

5-25

Click on the IL button.

Position the cursor before the EM instruction, ...

... and click on the Separate network button

Click on the LD button to return to the Ladder Diagram ...

... and insert a new branch

We will create a very simple program branch which you can program as usual:

The branch shown requires a different output assignment than the coil we used before. To achieve this, position the cursor on the output element (see illustration, red frame):

Click on the Timer Elements button (SA).

and select Switch-off Delay

Enter 'T1' into the input field and press A second input field will appear which is used to enter the timer value: Enter the timer value 't#60s' and confirm with

5-26

Monitor Menu functions

You have just programmed a timer element which starts a time period of 60 seconds as a remanent switch-off delay every time the garage door motor is started (actually the light remains on longer than 60 secs because the remaining edge of the running motor must also be considered for the SA timer element).

As you may have noticed, this branch only defines the condition for the timer element. The assignment for switching the light must be created in another branch. Insert a new branch ...

... by exiting from the Edit mode

...

... and by clicking on the

button.

Here, we want to create a parallel circuit: First, enter the address 'I2.0' for the existing normally-open contact.

Position the cursor on the horizontal field below the normally-open contact (see illustration below), or...

... , by using the keyboard, with the

key.

Insert a normally-open contact with... or...

This normally-open contact shall be combined with the output of the timer element:

Monitor Menu functions

5-27

Enter 'T1' into the input field. Now we create the still missing connection to the parallel branch: Position the cursor on the vertical field after the normally-open contact (see illustration below) , and...

... insert a connection using

, or...

... the

key.

Finally, assign the address O2.0 to the output element. This concludes all entries. If you have made everything right, the following circuit will be displayed:

The parallel circuit works as follows: Current can flow from left to right if either the light switch (I2.0) or the timer loop (T1) is closed. This means, the parallel circuit is an OR combination. Please save your entries. The easiest way to do this is to use the command "Save all:

Click on the

button.

You have now learned the basics for programming in the Ladder Diagram. Many useful editing aids and options are provided by the following overview: (please click to select) Additional programming support is available via the on-line help of WinSPS. How you can establish the connection to the controller and load your programs is described in paragraph Connecting to the controller, pp.

5-28

Monitor Menu functions

5.11 Graphical combinations: Functional Block Diagram (FBD)


The help for FBD is in preparation. You can access additional help about editing in the FBD by clicking on the button:

5.12 Step by Step: The Sequential Function Chart (SFC) 5.12.1 MADAP or step marker technique?
If a dialog box for the choice of a chain number appears at the change from the preset to the Editor, then accept the proposal by using the 'OK button. You are in the WinSPS editor. If you are not yet in the SFC programming language, select it now: Click on the SFC button.

Before you start the inputs, you have to choose a programming type: 1 MADAP: Especially for the BOSCH control and operate concept 2 MADAP with BEFA=1: Immediate instruction execution (without BEFA check) 3 Step marker technique according to IEC 1131-3

Click in the menu Step elements on the menu function Presets. Click on the control field programming type: MADAP... Our example uses the MADAP programming type. However, the example can easily be transferred to the step marker technique or to MADAP with BEFA=1. During the course of this example, it is indicated if you have to make other inputs for the step marker technique or the MADAP with BEFA=1, respectively. If you want to work with a programming type other than the MADAP, then activate the appropriate control field. ...Leave the dialog box with You probably get the order to start the editor anew, because the change in the sequence description becomes active only then. If this order does not appear, then do not follow this action:

Monitor Menu functions

5-29

Change back to the menu function Change , Presets, to the presets and subsequently again to the editor. You can now start the inputs.

5.12.2 Table of contents

The table of contents shows the overview of the sequence structure. You can see that a sequence already exists. Click on the field Edit auto (Step marker technique: Edit AS-Data). Now you find yourself on the sequence level.

5.12.3 The sequence

A sequence - as already available - consists of at least one step element. A step element consists of the step with the step action, the BEFA condition (only with the programming type MADAP), and the transition. In the controller, the execution of a sequence begins with Start and ends with the transition before End, just to begin again with Start. Hence, a sequence is executed cyclically.

5-30

Monitor Menu functions

Before you start now with the inputs in the sequence, we will look a little closer to the program example at first:

The sequence of a carwash shall be realized. The carwash consists of a movable unit which moves along a standing vehicle and practises various actions. These actions are set in the following sequence: 1 Undercarriage washing 2 Make vehicle wet 3 Wash vehicle 4 Rinse off vehicle 5 Dry vehicle But how is such a program transferred into the SFC? As you can see in the list, the (step) actions which have to be executed are already defined. How these actions are released (controlled), is still to be settled: There are sensors and actuators in the car wash. The sensors are, e.g., switches, measuring elements, photoelectric barriers, and a card reader. The actuators are, e.g., drives, valves, and indicating elements. Referring to the sequence, it can be summarized: Sensors supply input values which are evaluated in the sequence. Resulting actions of the sequence are passed on to the actuators.

5.12.4 Step element


The first step in our program example is the evaluation of a sensor. This sensor (e.g. photoelectric barrier) checks if a vehicle is in the car wash. This condition is to be indicated in an indicating field: Click on the editing field of the BEFA conditions (see illustration) ...

... and put in -Car

Monitor Menu functions

5-31

Click on the editing field of the step action (see illustration) ...

... and put in -Disp_1 If you have put in the symbol file Wash.SXS in the preset, the symbol comments in the symbol display are listed.

What happens in the sequence? The BEFA condition is checked, and when the condition is true, the corresponding step action is executed. In the programming type step marker technique and MADAP with BEFA=1, the BEFA condition is not available. The programming differs from MADAP. Click on the button to see the programming for the other programming types. Below the step number, any comment can be inserted in the step. Click on the edit field below the step number (see illustration) ...

...and put in Start

5.12.5 Alternative branch and empty step


Next, the card reader shall be evaluated. The card reader gives information on the chosen washing program. There are three washing programs to choose from:

Washing program 1: excluding undercarriage Washing program 2: including undercarriage Washing program 3: full service washing

So there are three alternatives in the washing program.

5-32

Monitor Menu functions

But first, please insert a new step which ought to be responsible for the actions after the regulation of the washing program: Click on the connecting line of the transition (see illustration) ...

The mouse cursor changes its shape

Click on the button Step/Transition A new step element is inserted. Put yourself again to the position of the connecting line of the transition (see illustration) ...

Click on the button Alternative branch An alternative branch with two branches, in addition to a step above the branch, is inserted (see illustration below). The left branch responds to the washing program 1, the right branch responds to the washing program 2 and partially to the program 3.

Monitor Menu functions

5-33

First, the added step (1N2) before the branch shall be edited. In this step, it shall be proved if a valid card is put into the card scanner. In other words: Time is taken until there is a valid card in the card scanner. The step element can be changed to a so-called empty step, because no action has to be taken. The step action and the BEFA condition are missing in the empty step: Click on the qualifier in the step action (see illustration)...

The mouse cursor changes its shape

or

... and erase the step action with the Delete key An empty step occurs. Add the symbol name Card to the input field of the transition before the empty step and the comment for the step Card scanner.

5-34

Monitor Menu functions

What happens in the transition? With the fulfilled transition, the previous step is deactivated and the following step is activated. The following illustration showcases this context. The previous step, its appropriate transition, and separated by a red line the following step:

After the empty step, the evaluation of the card scanner and thus, the definition of the washing program is made: Click on the connecting line (see illustration) of the right transition

The mouse cursor changes its shape

Click on the button Step/Transition

A step element is inserted to the right branch.

Fill in the input fields, as shown in the following illustration...

... and click on the qualifier in the step action

Monitor Menu functions

5-35

Because the transition fulfills the necessary criteria for the execution of the following step action in our example, the instruction execution (BEFA) has been put to logical 1 (-LOG1). As a reaction, the step action is executed in any case. The symbol LOG1 is not in the symbol file WASH.SXS. This symbol is automatically produced at a later date.

5.12.6 Step action


The step action Non-remanent (=) is kept until the current step becomes inactive. In our example, this means that the undercarriage washing is carried out until the next transition is fulfilled. Example: The undercarriage washing shall be made for as long as 15 seconds:

Click on the button Insert step action action with time limit (SP).

and choose the step

A new step action is added (see illustration below). Fill in the input fields (Timer and Time value) of the time element, as shown in the following illustration, and...

...insert to the input field of the subsequent transition the symbolic time operand -T_UCW , and...

... click to the entrance of the transition above (see illustration).

The mouse cursor changes its shape

5-36

Monitor Menu functions

5.12.7 Logical operation of a transition


As already mentioned, the undercarriage washing shall be made not only for washing program 2, but for program 3 as well.

Click on the button OR transition. The transition is extended (connected) by one condition. Insert to the input field -Prog_3 :

Put the mouse cursor on the entrance of the transition below and click on the button Negation

By that, the transition condition is negated (reversed). The entrance of the transition is provided with a circle - the negation symbol. Have you lost track of things? We sum up the inputs which have already been made:

Monitor Menu functions

5-37

Summary of the previous inputs in the right alternative branch-out: When the first transition condition (Prog_2 or Prog_3) is made, the step 1N3 is activated. This step checks the BEFA condition, which supplies a positive result with logical 1 in any case. Now, the step action - and therefore the undercarriage washing (-UCW) - is executed. Simultaneously, a time of 15 seconds is started. When the time is over, the variable -T_UCW is reset. The transition below the step checks the negated condition of this variable. The next step will be activated only when the time is over. Afterwards, the step action undercarriage washing is inactivated.

What have you learned so far? You have already become acquainted with the most important editing functions of the Sequential function chart. You have - filled out the different edit fields - produced a branch - produced an empty step - inserted a step element - realized a step action - added a time element as step action - produced a branch of the transition condition - negated a transition

Actually, the most edit processes are already done. However, we do not want to withhold a SFC element from you, not least to deal with the extensive editing possibilities with markings.

5.12.8 Markings in the sequence


To complete our example with the carwash, please add the sequence. As a reminder, here is once again a list of the sequence and the three washing programs. All red marks are not yet realized:

1 Undercarriage washing 2 Make vehicle wet 3 Wash vehicle 4 Rinse off vehicle 5 Dry vehicle

Washing program 1: excluding undercarriage

5-38

Monitor Menu functions

Washing program 2: including undercarriage Washing program 3: full service washing

Click on the input field by using the button

or

, and fill in the step action Set (S)'

, and...

...fill in the input fields (see illustration)

In the step action, the watering and the drive of the movable washing unit are started in forward direction. That way, the water is spreaded regularly onto the vehicle. Insert another transition/step element by positioning to the branch of the transition and use the button .

Before the washing process of the vehicle begins, go back to the start position. Moving the washing unit forward and backward can be achieved with the interaction Set/Reset: Complete the step action and fill in the input fields as shown in the following illustration: For inserting a step action, put the mouse cursor on the qualifier and click on , and for changing a step action click on .

Put the mouse cursor on the qualifier again (see illustration).

You well certainly remember the still to be realized washing program 3. With the full service washing, the vehicle is washed twice; with the programs 1 and 2 only once.

Monitor Menu functions

5-39

In this case, the programming of a loop is useful. The washing process is executed within the loop. Only with the washing program 3, the loop is executed twice. The loop repetitions have to be counted. That is why we need a counter (index variable), which has to be put before the entry into the loop:

Click on the button Insert step action action Set counter (SC).

and choose the step

Fill in the input fields Counter and Value (see illustration).

Insert another new step element

Fill in Wash to the comment field of this step 1N6 (see illustration below). This step element - and another - shall regulate the washing process within the loop. The loop shall be led around the element which has just been inserted. Mark the area where the loop has to be led around. This process is shown to you via a short video demonstration, if you click on this button

For the marking, put the mouse cursor a little bit above the step 1N6. The mouse cursor changes its shape

5-40

Monitor Menu functions

Click again on this position and keep holding the left mouse button. Move the mouse in the direction of step 1N6. Now, a small rectangle is drawn. As soon as you touch the step, the whole step element is illustrated inversely. Please release the mouse button. You have marked the step element (transition/step). Marked elements can be deleted (button ), copied (copy + insert) or moved (cut + insert). However, you can also put a branch or a loop around the marking. In other words: Marked objects are integrated into the branch or the loop.

Click on the button Loop As desired, a loop is put around the marked element. Furthermore, above this element, another step element is produced before the line with an arrow. Complete the step actions in step 1N6 and 1N7, and fill in all input fields as shown in the following illustration.

Put the mouse cursor on the branch of the transition below the loop

Monitor Menu functions

5-41

What happens in the loop? In the step action immediately before the loop (step 1N5), the counter C_Wash is put on the value two. Step 1N6 starts the washing process (Brush). How the brushes in the carwash are driven, shall not be specified further. The counter is decreased by one value via the step action Decrement counter (CD). Hence, the counter equals one. The movable unit is moved forward and in step 1N7, it is moved backward. Next up is the check of the transition below the loop (which is edited at a later date). The check of the return condition causes a jump (to the top end of the line with the arrow) in the washing program 3, so that the washing process is executed once again. Also, the washing unit has to be at the start position. In the next cycle, the counter is set to the value zero. Next, the condition of the counter has to be evaluated.

5.12.9 Cyclical execution of the sequence


Before you start with the input of the transition condition below the loop, insert the final step elements. In our example, there are still three transition/step combinations necessary:

Click on the button Transition/Step combination three times

Complete now the transition conditions for the exit out of the loop (see illustration).

You can achieve the connection of the transition with the positioning to the entry or the branch in front of the transition and with the execution of or . We are now nearing the completion of our program example. The last steps rinse off and dry the vehicle. Besides, the brush drive of the washing process is still active. It is set back as follows: Complete the step actions and fill in the input fields, as shown in the following illustration. . Likewise at this positions, the conditions are negated

5-42

Monitor Menu functions

The vehicle is now washed and can be driven out of the carwash: Here too, we would like to ask you to complete the inputs:

After moving the vehicle out of the carwash (transition to End), the execution of the sequence starts all over again (Start).

Click on the button

to save the SFC-File

So, thats it for now concerning the editing in the SFC. Now it goes on with creating and loading the sequence.

5.12.10 Create and load


Before loading the SFC file, the sequence has to be created. With the creation, the sequences are changed to IL instructions and edited into program modules. Different symbols of the sequence are edited to the symbol file. There are two ways of creating a sequence: 1 Via the menu function File, Create sequence 2 With the loading via activating the control field Create sequence in the load dialog box.

Monitor Menu functions

5-43

Please decide on one of the two possibilities. If you want to load into the controller, then do not forget to make the connection between PC and PLC .

Do not load the programming example into an active system! As already mentioned, different modules are produced with the creation. However, the module KETTE.PXL (KETTE200.PXL for CL200, KETTE700.PXL for CL700) which does the cascade organization, is not produced. This file is available as a disk with the MADAP software package, which you can order through the Bosch software service. Copy this module to the library or ZS directory. If you make the creation in the load dialog box, then click on the button Options. Activate the field Create cascade call in OM1 in the dialog box and start the creation via the button Create or OK, respectively. The information that all changes in the OM1 are getting lost, appears. Because OM1 has not yet been edited, this does not really matter. Confirm the message with Yes. Now, the dialog box Cascade/Step parameter appears. Here, you have to set the MADAP time parameters Waiting (KWA) and Watchdog timer (KUE) (with the controller CL200, some additional parameter have to be edited): Put the value 30 to the field KWA and the value 40 to the field KUE. All inputs are now finally done. The creation is now executed. The creating process is recorded in a dialog box. If an error occurs (e.g. if you have made wrong inputs), a message appears which lists the position and the cause of the error. In this case, you have to eliminate the errors. If the creation runs without an error, the following message appears: Project has successfully been created.

5.12.11 The SFC Monitor


As with the other programming languages, a SFC program can also be tested with the monitor. When you have loaded the program to the controller, you can immediately change to the monitor. Please remember that you have made a (simplified) program for a carwash. To follow the sequence in the monitor, the corresponding sensors and actuators ought to be connected with the controller. Because this is not the case, we have prepared a special simulation program. It appears at first as a SFC file WASHINCH.AS in the program directory on your harddisk. If you want to execute the simulation in the monitor, then copy the file to the current ZS directory and create and load the SFC with this file. To start running the sequence in the controller, the mode selection has to be realized in MADAP. If you actuate this button , you can see an example for the mode selection for the simulation program.

5-44

Monitor Menu functions

Click on the monitor button On the sequence level, the current condition of the sequence is indicated. Active steps and fulfilled conditions are represented in red. If all conditions (transition or command output) are fulfilled in a complex transition or BEFA, the red line is drawn continuously up to the branch of the transition or BEFA condition (see illustration). A negated condition is represented in red when the negated condition is submitted.

With the menu function View, Show timer and counter values, the Waiting (KWA) and Watchdog timer (KUE) is appended to every step. Furthermore, the current values are distributed at the timer and counter step actions. Activate the function Synchronize to cascade number:

Click on the button . Activate the control field Follow cascade in the dialog box and confirm with OK. Now, the monitor display is always put to the position of the active step. Thus, you can follow the sequence. In the simulation of the program, the condition of the Waiting time (KWA) is checked in every transition. When the Waiting time (3 seconds in our example) is over, the transition will be done. You can see the simulation of the washing program 3. This is the sequential function chart introduction so far. You can get additional support for the WinSPS programming via the online help. You will find detailed general information about the SFC in the ReadSFC.doc file which is contained in the WinSPS program directory.

Monitor Menu functions

5-45

5.13 Instruction List as per IEC 61131-3 (IEC IL)


Please observe the special Presets for the programming according to IEC 61131-3:

In order to avoid any confusion, the following terms are used: IEC IL: Instruction list as per IEC 61131-3. Bosch IL: Classic instruction list (based on DIN 19239).

The following program examples cover the programming in IEC IL. Program examples for the Bosch IL can be found at an earlier point in this section.

The structure of programs according to IEC 61131-3 as well as the input options in the WinSPS Editor are identical for all programming languages according to IEC 61131-3. Different inputs are only made in the declaration part of the Editor, depending on the specific programming language. For this reason, this section will only describe different examples for instructions in the IL programming language. The input of variables in the declaration tables as well as the generation of a loadable project are explained in the section about the ST (Structured Text) programming language.

In IL, execution instructions for the PLC are specified in one line. A complete sequence of instructions (IL sequence) can extend over multiple instruction lines. An IL instruction line is defined by the following format:

5-46

Monitor Menu functions

Please observe this input format. It is particularly important that at least or tab character is entered between the one space character operator and the operand.

Further information about IL instructions:

5.13.1 Boolean operations


The sequence of execution in IL is always top down. The first instruction line of an IL sequence (in Bosch IL: program branch) is always a load instruction "LD" or "LDN". The IL sequence is terminated with an assignment, e.g. ST (Store). Here is a program example:

LD AND OR AND ANDN ST

x20 x21 x22 x23 x24 led0

Different Boolean (logical) operators are used. They have the following meaning:

Operator AND OR ANDN

Boolean

Meaning Boolean AND Boolean OR Boolean AND, negated

Monitor Menu functions

5-47

Overview of the IL instruction set:

The result is assigned to the variable "led0" by means of the assignment operator ST. The program example corresponds to the following Boolean equation:

This corresponds to the following representation in the programming language Function Block Diagram (FBD):

...and the Ladder Diagram (LD) would look like this:

TIP You may also use the short form & (commercial And) for the Boolean operator AND. The above programming example could be entered as follows:

LD & OR AND &N ST

x20 x21 x22 x23 x24 led0

5-48

Monitor Menu functions

5.13.2 Boolean operations Parentheses


In the above example, the Boolean operations were still quite simple. However, it is often required to calculate (combine) partial expressions in order to combine the result obtained here with other operands. Such partial expressions can be entered in parenthesis operators ( ). Detailed information about parenthesis:

The following Boolean equation is a logical combination in which controlled by the arrangement of the parentheses all AND operations " " are executed before the OR operations " ":

This equation corresponds to the following FBD representation:

The last parentheses around the operand "x23" is not necessary because single operands are not placed in parentheses. For this reason, the parentheses are also left out in case of conversion to IL. Each IL sequence must always start with a load operation "LD" or "LDN". However, a load instruction must not be used to open an nesting level. For our example, this means that the first nesting level is not possible but also not necessary, due to the sequence of execution. The equation can be simplified:

Sequence of execution

In IL, this equation is entered as followed:

Monitor Menu functions

5-49

LD ANDN AND OR( AND ) OR ST

x20 x21 x22 x20 x24 x23 led1

To introduce a nesting level, the parenthesis is placed directly after the operator, e.g. "OR(". Each nesting level is terminated in a separate instruction line with the closing parenthesis ). The introduction of nesting levels is only possible with certain operators. List of operators:

Representation of the example in the programming language LD:

5.13.3 Boolean operations Nested parentheses


Expressions in parentheses ( ) can be nested in several levels.

Example 1, FBD:

5-50

Monitor Menu functions

Ladder Diagram:

Boolean equation:

Instruction List:

LD AND AND( AND OR( AND ) OR ) AND AND( OR( ANDN ) ) ST

x20 x21 x22 x23 x22 x24 x00 x26 x27 x20 x01

led2

The example can be simplified. The two AND operations at the beginning of the equation (X20, x21) can be moved to the position of the variablex26. This will shift one nesting level:

LD AND OR( AND )

x22 x23 x22 x24

Monitor Menu functions

5-51

OR AND( AND AND AND( OR( ANDN ) ) ) ST

x00 x20 x21 x26 x27 x20 x01

led2

Example 2, FBD:

Ladder Diagram:

Boolean equation:

Instruction List:

LD AND

x20 x21

5-52

Monitor Menu functions

AND OR( AND ) AND( OR( AND ) ) AND ST

x00 x22 x21 x23 x20 x24

x25 led3

Detailed information about parentheses:

5.13.4 Loading a program and more program examples


You can find additional input examples for the programming in IL in the sections about the IL operators in the chapter Programming. This is a selection:

Load instructions Assignments Boolean (logical) operators Arithmetic operators Comparison operators Jump operators Call of function blocks Call of functions Return operators

Loading a program into the controller Before the program can be loaded into the controller, the project must be generated. Information about this is contained in the section "Generate and load project of the ST programming language:

Monitor Menu functions

5-53

Testing a program You can test a program according to IEC 61131-3 by means of the Monitor.

5-54

Monitor Menu functions

5.14 Compact and clear: Structured Text (ST)


The WinSPS software offers you two variants of ST programming: 1) Combination of an ST program with conventional programming 2) ST program without conventional elements The first variant is especially useful if you want to program certain functions in ST while programming other control functions e.g. conventional IL. In this case, the ST modules are called up by the IL but not vice versa, e.g. CM -Amount With the second variant, however, only ST instructions can be used. This is useful if no programming languages other than ST are to be used in a control program. The different module structure of the two variants is exemplified in the following illustrations:

Combination of IL and ST

ST without conventional program elements

Monitor Menu functions

5-55

Please decide by yourself which variant to choose. Our sample program represents the first variant. Since using the second variant is only slightly different, we will point out these differences in the appropriate places. This will enable you to implement both variants of our sample program.

Before you start making entries in the ST Editor, we want to explain our sample program a bit: The task is to count and add coins of 10 Pf., 50 Pf., 1 DM, 2 DM and 5 DM. Then the total amount is to be given in DM and EURO, e. g. fr die display elements of a coin counting machine.

You are in the WinSPS Editor. If you have not yet selected the programming language Structured Text, please do this now: Click on the ST button.

5.14.1 Declaring variables


The ST Editor is subdivided into different areas.

5-56

Monitor Menu functions

If the declaration tables are not visible, click on the

button.

For the AMOUNT module, select the POU type FUNCTION_BLOCK:

Click on the variable declaration. You will see a table in which the local variables are edited.

Click on the first table field below Variable type.

A selection button will appear Click on the button and select the variable type VAR_INPUT.

Enter a variable name: Double-click on the first table field below Name and ...

... enter the name PF_10 in this field.

Monitor Menu functions

5-57

Following this procedure, please fill in the next two fields Data type and Initial value, as shown in the following illustration:

This concludes the definition (declaration) of the first input variable. This is an integer (INT) variable with the name PF_10 and an initial value of 0. In addition, this is purely an input variable (VAR_INPUT). These important properties of a variable are defined by the international standard IEC 61131-3. If you need further information about these properties or about the layout and use of the declaration tables, please consult the following help function: The declaration tables allow a very convenient entry of variables while providing a very good protection against incorrect entries. You can also edit the variables directly in the ST file. Switch off the declaration tables in order to edit within the text-only representation.

Click on the

button.

The declaration tables are now hidden. Instead, you see the module type and name, as well as the declaration part of the current module: FUNCTION_BLOCK AMOUNT VAR_INPUT PF_10 : INT := 0; END_VAR Please declare other variables which are required for the sample program. In doing this, you may choose whether to make the entries directly in the text or in the declaration tables. The illustrations below show both options. Remember the two ST programming variants: with or without conventional program elements. We want to point out a difference here. If you want to implement the program without a call from the conventional IL, please disregard the variables below and click on this button instead:

Text programming: FUNCTION_BLOCK AMOUNT VAR_INPUT PF_10 : PF_50 : DM_01 : DM_02 : DM_05 : END_VAR

INT INT INT INT INT

:= := := := :=

0; 0; 0; 0; 0;

5-58

Monitor Menu functions

VAR_OUTPUT Amount_in_DM : REAL := 0.0; Amount_in_Euro : REAL := 0.0; END_VAR

Declaration tables:

With the declaration, all relevant variables of the module are declared. Now the program instructions can be entered.

5.14.2 Instructions
Instructions are entered in the instruction part. If you have disabled the declaration tables and want to make your entries in text-only programming mode, please observe that the instructions need to be entered above END_FUNCTION_BLOCK. Enter the following instructions: Amount_in_DM := (int_to_real(Calculate (PF_10, PF_50, DM_01, DM_02, DM_05)) / 100.0); Amount_in_Euro := Amount_in_DM / 1.95583; The first instruction calls up the Calculate function. This function is used to count the coins and is still to be defined (see below). The brackets contain the parameters which are passed to the function, PF_10, PF_50, etc. The result of the function is used to convert from Pfennig into DM (German Deutsche Mark). Since the result of the Calculate function and the variable Amount_in_DM are not of the same type Calculate = INT, Amount_in_DM = REAL , the type conversion int_to_real is required. The last instruction is finally used to convert the DM amount into EURO. You will find further information in the following sections of the WinSPS help: ST programming language Programming according to IEC 61131-3 As mentioned above, the Calculate function needs to be defined. For this purpose, create a new ST file:

Monitor Menu functions

5-59

In the File menu, click on the option New/Open, or...

... press the key combination

A dialog box will appear. Enter the file name Calc and confirm your entry with . The variable declaration and the instructions in this module shall look as follows: FUNCTION Calculate : INT

VAR_INPUT PF_10 : PF_50 : DM_01 : DM_02 : DM_05 : END_VAR

INT; INT; INT; INT; INT;

VAR Total : INT := 0; END_VAR

Total Total Total Total Total

:= := := := :=

Total Total Total Total Total

+ + + + +

PF_10 PF_50 DM_01 DM_02 DM_05

* * * * *

10; 50; 100; 200; 500;

Calculate := Total; END_FUNCTION If you do not want to enter these instructions by hand, you can also copy the texts directly from the help text into the ST Editor. To do so, highlight the above instructions and select the function Edit, Copy or the key + . Within the ST Editor, you can then place the combination copied text in the desired position with Edit, Insert. However, a comment line will be appended: WinSPS Help ... Copyright ... Robert Bosch GmbH

You will need to delete this line!

Meaning of the instructions: In the declaration part, all input variables of this function are declared. The internal integer variable Total is used to form the subtotal.

5-60

Monitor Menu functions

Since the input variables contain the respective number of coins, this number is multiplied with the corresponding monetary value in the declaration part. The result is added to the total with each calculation of the amount. The last instruction assigns the total to the function name. This is mandatory for functions.

5.14.3 Modules and module calls


Please enable the declaration tables if this are not already enabled.

Please switch to the display of the POU type.

If you have entered the instructions as shown, you will see that a POU of the type FUNCTION is used here. This type of module is suitable for making calculations. The result of a calculation is returned to the calling module so that this result can be used in further calculations. This fact is also utilized in our sample program. The return variable of the Calculate function is used in the Amount module to make a direct calculation of the DM amount, see extract from Amount: Amount_in_DM := (int_to_real(Calculate (PF_10, PF_50, DM_01, DM_02, DM_05)) / 100.0); The two modules Amount and Calc shall be sufficient for our simple sample program. In the next step, we will use these modules to create a loadable program. Please save the files, which can be done most conveniently by using the Save all function:

Click on the

button or...

...press the key combination

5.14.4 Project preparations


Switch into the symbol file:

Monitor Menu functions

5-61

Click on the Symbol Editor button

or...

...press the key combination

The symbol file already contains some essential entries. The following line should be there: OM1,R OM1 ; Cyclic program execution

Still remember the two program variants? 1) Combination of an ST program with conventional programming 2) ST program without conventional elements Only if you select the second variant, you will need to change the entry in the symbol file: OM1,R AMOUNT ; Cyclic program execution

As you can see, the ST module Amount is directly entered into the symbol file in the position of the OM1. This is important for the control program since this always starts with the OM1!

Please save the symbol file, e.g. using the Save all function:

Click on the

button or...

...press the key combination

This concludes the most important preparations to create an ST project. This procedure is terminated with the Create project function. But let us consider one more thing first. In the symbol file, we have created a link to our ST program via the entry OM1, R AMOUNT. However, we have only done this for the second programming variant. But what about programming with conventional elements? Obviously, a link to the ST modules has not yet been created. Below, we will show you how this link is created.

5-62

Monitor Menu functions

Variant 1: Call in IL

Variant 2: Call only in ST

If you have generally adopted the second programming variant, you may skip the next paragraph. To do this, click on this button:

5.14.5 Module call in conventional programming


The ST module Amount is to be called up from an IL module. For this purpose, we will use the organization module OM1 which represents the lowest level of conventional programing. Please change into the IL Editor and edit the OM1 module:

Click on the module edutor button

and...

...Click on the IL button

Monitor Menu functions

5-63

If you have entered the proposed filenames during the preparation, you can now edit the OM1. Otherwise you will need to enter OM1 in the editing field for the filename:

Place the insertion mark after the comment lines but before the instruction EM. In order to be able to call a module from the conventional environment, this module must be a FUNCTION_BLOCK. In our case, only the FB Amount is available. Press the key combination + or...

... In the Edit menu, click on the Call parameter list menu option. A dialog box will open in which you can select a module. All function block modules (FB, FUNCTION_BLOCK) are listed. Since only one FB module has been created in our example, only this one will be displayed:

Confirm the selection of the AMOUNT module by clicking on the Continue button. In the next dialog box, instances are selected. What are instances ? In our example, we have created a function block with the name Amount. More precisely, however, this is only a type name. Now, we have a FB module of the type Amount. The actual name is defined through the instance. This instantiation or formation of instances is very similar to the declaration of variables. Please have a look at the following example: VAR_GLOBAL Coin_counter1 : AMOUNT; Coin_counter2 : AMOUNT; END_VAR

5-64

Monitor Menu functions

This variable declaration is used to exemplify that e. g. two different variables or, more precisely: two different instances of the type AMOUNT can be declared. These two instances use the same FM but can be called and evaluated in different places. This means that there are also two separate data areas. In this way, you can e.g. cleanly access several amounts from different coin counters without these affecting each other. This mechanism is used to create modules with a memory. The FB modules (FUNCTION_BLOCK) are such modules. On the contrary, functions (FUNCTION) are without a memory. This is the reason why functions such as Calculate in our example are not displayed in the first place for the purpose of module selection and instantiation. But now back to the dialog box for instance selection. Enter an instance name:

Confirm your entry by clicking on the Continue button. Another dialog box will appear where you can initialize the variables using actual parameters. Double-click on the respective table element under Actual parameter and enter the following initial values:

Terminate your entry by clicking on the Execute button. WinSPS will create different entries in the IL Editor and not visible here in the symbol file. Please do not change these lines especially not the comment lines! Please save the file, e.g. using the Save all function:

Click on the

button or...

Monitor Menu functions

5-65

...Press the key combination

This concludes the integration of the ST module call into the IL and creates a consistent link between the symbol file and all IL and ST modules of the program. The following steps apply again to both programming variants.

5.14.6 Creating and loading


Now we need to create the project. The creation process will compile all ST modules (= convert them into control instructions), check all module calls and finally create an executable control program from all modules. This process will also automatically create various data modules for the instantiation of the function block modules. Do not change the entries in the data modules! In the File menu, click on the menu option Create new project. The creation is then started, and the creation process is logged in a dialog box. If an error is detected (e. g. due to incorrent entries), a message lists the position and cause of the error. In this case you will need to correct the errors. In addition, compilation errors are displayed in the error window. For further information, refer to this Help section: If the creation executes error-free, the message: Project created successfully will appear. If you want to load the program into the controller, please do not forget to establish the connection between the PC and the PLC.

Do not load the programming example into an active system!

5.14.7 The ST Monitor


As with all other programming languages, an ST program can be tested by means of the Monitor. After loading the program into the controller, you may change directly into the Monitor. It would not make much sense to load our simple sample program because, after all, this program does not provide any results. We want to show you which data are displayed in the ST Monitor in the case of a useful program. It should be mentioned that the Monitor allows you to select the instance of the respective module you want to monitor.

5-66

Monitor Menu functions

The current data are displayed in the Monitor data column of the variable declaration. This concludes the explanations about ST progarmming. You can get additional assistance for programming in the WinSPS on-line Help.

Programming

6-1

6 Programming
In the WinSPS software, programming is possible in two different ways: 1) Classic programming 2) IEC 61131-3 programming

Classic programming includes those programming languages that are based on the DIN 19239 standard and VDI directive 2880. Since the introduction of Programmable Logic Controllers from Bosch, this classic programming is used for IL, LD and FBD and has continuously been enhanced to meet the current technical requirements. Based on the experiences with the classic PLC languages, new programming languages and an associated data concept were standardardized internationally by the IEC 61131-3 (DIN EN 61131-3) standard. The WinSPS currently supports the programming in compliance with IEC 61131-3 with the programming languages Sequential Function Chart (SFC) and Structured Text (ST). Detailed information about the standard compliance of the programming language according to IEC 61131-3 are found in the chapter IEC 611313 standard compliance: In addition, there are many places in classic programming where the WinSPS allows to use the terminology of the IEC 61131-3 standard in order to achieve a partial compatibility. A complete overview of the differences between these two programming modes is also contained in this chapter: The language elements of both programming modes are described below. The description of classic programming is based on the IEC 61131-3 standard and pinpoints restrictions and enhancements.

6.1 Classic programming Language elements, variables, data types 6.1.1 Character set
Encoding of the character conforms to the (8-bit) Windows-ANSI character set.

Designator A designator is a sequence of characters, digits and underscores (_) that must start with a letter or an underscore. Underscores are significant. Multiple underscores (__) are not permitted. A designator can contain up to 32 characters. As an extension of IEC 61131-3, uppercase and lowercase letters within designators are significant. "Umlaute" - such as , , , - within designators are not permitted. Here are some examples:

Correct: VOLTAGE_REGULATOR _Rotation_plus Marker_2

Incorrect: VOLTAGE__REGULATOR _rotation_+ 2_Marker

6-2

Programming

By activating the function switch. /O2, a checking process is turned off so that more than one underscore in the symbol naming is permitted. The underscore in the names is significant, e.g. AB_C is not the same as A_BC.

Keywords Keywords (A, O, BYTE ...) must not be used for other purposes, e. g. they are not permitted as variable names.

Use of blanks Outside of keywords, literals and designators, it is possible to use one or several blanks or tabs. Example: A W I3 (* Comment *)

Comments Comments must be enclosed in a special character combination (* and *). Nested comments are not permitted. Any characters from the ANSI character set can be used within comments. As an extension of IEC 1131-3, comments may also be separated by a semicolon. Example: (* IEC-compatible comment notation *) ; permitted comment notation

6.1.2 Numeric literals


A numeric integer literal is defined as a decimal number or a number related to a base. Underscores which are inserted to enhance the readability are allowed and are not significant. Leading underscores are not permitted. Decimal literals are represented in the usual decimal notation. They may be preceded by a sign ( + or - ). Base-related number must not have a sign. The letters A through F for the hexadecimal numbers 10 through 15 may be lowercase or uppercase. Floating point numbers can be written with a decimal point . or in exponential representation. They can also be signed. Logic data are represented by the keywords FALSE and TRUE. Examples for numeric literals: Characteristic: Logic data Integer literals Examples: TRUE (not equal to 0) FALSE (0) -12 0 123_456 +986 2#11111111 (255 decimal) 2#11100000 (240 decimal)

Base-2 literals

Programming

6-3

Characteristic: Base-8 literals Base-16 literals Floating point

Examples: 2#1111_1111_1111_1111 (65535 decimal) 8#377 (255 decimal) 8#340 (240 decimal) 16#FF or 16#ff (255 decimal) 16#1000 (4096 decimal) +523.31 -0.08 398E+4 (Exponent) 4e2 -34E-15

6.1.3 String literals


A string literal (formerly ASCII constant) is a sequence of zero or more characters which is enclosed in single quotation marks (). In strings, the combination of the dollar sign ($) followed by two hexadecimal digits is interpreted as the hexadecimal representation of the 8-bit character code. In addition, character combinations with a leading dollar sign are interpreted as shown in the table below: Character combination $$ $ $L or $l $P or $p $R or $r $T or $t Meaning single dollar sign single quotation mark Line Feed (LF) Form Feed (FF) Carriage Return (CR) Tab stop

Examples for string literals: Characteristics: $ $R$L$0D$0A $$1.00 Examples: Empty string String of length one, with blank String of length one, with single quotation mark String of length 4, with 2 CR and LF characters each String of length 5 which is printed as $1.00

Please also observe the following properties:

6.1.4 Timer literals


Of the possible timer literals according to IEC 61131-3, the current version of the WinSPS software supports the duration type. Data for the duration need to be introduced by the keyword T# or t#. Only seconds (s) and milliseconds (ms) are permitted as units for duration literals. Duration literals cannot be separated by underscores. As an extension to IEC 61131-3, the internal timer specifications via timer value (x = 0 through 999) and timer loop (y = 0 through 3) are still possible (T#x.y). Examples for timer literals: T#14ms T#23.3

6-4

Programming

6.1.5 Data types


The table below lists all data types according to IEC 61131-3 which are supported by the classic programming mode. Keyword: Data Width (Bit): 1 8 16 32 8 16 32 8 16 32 var. Default: Explanation:

BOOL BYTE WORD DWORD SINT INT DINT USINT UINT UDINT STRING(x)

0 0 0 0 0 0 0 0 0 0 $00

OSTRING(x) VSTRING(x)

var. var.

$00 $00

ISTRING TVALUE

var. 16

127.0.0.1 0s

CVALUE REAL LREAL

16 32 64

0 0.0 0.0

Truth value (not equal to 0 => TRUE, equal to 0 => FALSE). Bit sequence of length 8 (0 through 255). Bit sequence of length 16 (0 through 65535). Bit sequence of length 32 (0 through 4.294.967.295). Short integer, signed decimal (-128 through +127). Integer, signed decimal (-32768 through +32767). Double integer, signed decimal (-2.147.483.648 through +2.147.483.647). Unsigned short integer, unsigned number with selectable base in the value field (default: decimal). Unsigned integer, unsigned number with selectable base in the value field (default: decimal). Unsigned double integer, unsigned number with selectable base in the value field (default: decimal). ASCII string of length x. Representation: Hexadecimal 20 through 7F; characters above 7F with leading $ character (e.g. $80). The string is enclosed in quotation marks (e. g. Test). It is also possible to enter special control characters. Octet string of length x. Representation: 2 hexadecimal digital per character (00 through FF). Visible string of length x. Representation: hexadecimal 20 through 7F as US-ASCII characters. Any other characters are not permitted. The string ends with a non-ASCII character (e. g. TAB). TCP/IP Address (e. g. for COM-E modules) Format: xxx.xxx.xxx.xxx Timer. Input in seconds (s), milliseconds (ms) or as a timer value/loop. The input value in s and ms is automatically rounded according to the timer value/loop. Counter. Permitted range 0 through 8191. Floating point (Double word) (1.175494351e-38 through 3.402823466e+38) Floating point (Quad word) (2.2250738585072014e-308 through 1.7976931348623158e+308)

Of the possible IEC 61131-3 data types, only the elementary data type is available. Classic programming does not support the processing of generic and derived data types as well as of the 64-bit data types LINT, ULINT, LWORD.

6.1.6 Variables
Variables are data that are associated with inputs, outputs or a memory address of the PLC. The symbolic representation of variables is made with designators as defined in the Character set section. Symbolic designators are preceded by a hyphen (-).

Programming

6-5

Bit memory locations A direct representation of a bit variable (as an absolute operand) is described by a prefix for the memory location and one or more unsigned integers that are separated by a dot (.). The notation according to IEC 61131-3 that uses a leading per cent sign (%) is replaced with a shorter notation (e. g. I0.0).

Byte/Word/double-word memory locations

A direct representation of a byte/word or double-word variable (as an absolute operand) is described by a prefix for the memory location and one or more unsigned integers. Operands are always counted in decimal byte sizes. For this reason, 16-bit operands can only be used on even addresses, and 32-bit operands only on addresses which can be divided by 4. The former address counting (e. g. I4W) is discontinued. For this reason, the designation I8 will always be input byte 8 for byte addressing, input byte 8/9 for word addressing, and input byte 8/9/10/11 for double-word addressing. The notation according to IEC 1131-3 that uses a leading per cent sign (%) is replaced with a shorter notation.

As an extension to IEC 1131-3, the addresses of some memory locations can be derived from the address operator (&) that is used as a prefix.

Examples: L &M0.0,A ; Load the address of marker M0.0 into accu A The table below contains all prefixes for accesses to memory locations: Prefix: M SM S T P FC D DX DF TI PI SI CY Z N O I Q OM DM Meaning: Memory location: Marker Memory location: Special Marker Memory location: System range Memory location: Timer Memory location: Parameter Non-remanent function call (formerly: PM) Memory location: Data in first data module Memory location: Data in second data module Memory location: data field Timer interrupt register Peripheral interrupt register System interrupt register Carry Flag Zero Flag Negative Flag Overflow Flag Memory location: Input Memory location: Output Organizational module Data module

* * * * * * * * * * * * * *

* *

6-6

Programming

C II IQ EI EQ C DB

* * * * * * *

Memory location: Counter Memory location: Interface Input Memory location: Interface Output Memory location: Extended Input Memory location: Extended Output Memory location: Counter Memory location: Data buffer

Prefixes marked with * are extensions to IEC 1131-3. The table below contains all prefixes for the data width (operand attribute): Prefix: X B W D R L Meaning: Bit size Byte (8 bits) Word (16 bits) Double-word (32 bits) Real (32 bits) Long Real (64 bits)

The bit attribute (X) is the default and can be omitted. The possible combinations of the Memory Location and Data Width prefix tables as well as the address depend on the controller.

6.2 IEC 61131-3 Program Organization Unit (POU) 6.2.1 Module types
In the terminology of IEC 61131-3, program modules are so-called Program Organization Units, in short: POU. There are three types of POUs with different characteristics:

Program block (Keyword: PROGRAM, short: PROG) Main program including the assignment of PLC peripherals, global variables and access paths. Can call up function blocks and functions. In mixed programmig using ST and e. g. classic IL, a PROGRAM POU must not exist. In this case, the main program is implemented through the OM1.

Function block (Keyword: FUNCTION_BLOCK, short: FB) Can have none, on or multiple input parameters. Can have none, one or multiple output parameters. Multiple instances of a function block can be created; these have independent storage areas for inputs, outputs and intermediate results. Has a 'memory', i. e. the local variables of the block retain their (instance-specific) value through multiple calls.

Programming

6-7

It is not the function block itself that is called but always an instance of a function block. In a call, it is not necessary to specify all input parameter; any missing input parameters will retain their values from the previous call or are preset with defaults. Can call up functions and instances of other function blocks.

Function (Keyword: FUNCTION, short: FUN) Can have none, one or multiple input parameters. Returns exactly one return value. Has no 'memory', i. e. it will deliver identical results for identical input values. In every call of the function, it is necessary to specify all input parameters. Can use local variables for intermediate results; however, these will not retain their values through multiple calls. Can call up other functions but not function blocks.

The partitioning into modules achieves a modularization of the automation task and allows the reuse of predefined and tested software components.

6.2.2 Program block (PROGRAM)


The program block PROGRAM is the main program of a PLC. In this POU, the PLC starts the program execution and calls up the subprograms (functions and function blocks). The program block must be entered in the symbol file as OM1.

Examply entry in the symbol file: OM1,R HELLO_ST ; Cyclic program execution

In mixed programming including ST and e. g. classic IL, a PROGRAM POU must not exist. In this case, the main program is implemented through the OM1. The program block has special properties: - This is the only place where directly represented variables, i. e. physical PLC addresses: %I, %Q, %M can be declared. - VAR_GLOBAL can be used, so that access to this data is possible in subprograms through VAR_EXTERNAL. - It is called up by the operating system of the PLC, i. e. the main program must never be called up from functions or function blocks. - It starts with the keyword PROGRAM and ends with END_PROGRAM.

6-8

Programming

Example of a small ST-Program: PROGRAM HELLO_ST VAR OUTPUT AT %Q0.0 : BOOL; INPUT AT %I0.0 : BOOL; Enable_signal : BOOL; END_VAR IF INPUT=TRUE THEN Enable_signal:=TRUE ELSE OUTPUT:=0; END_IF END_PROGRAM (* Start and name of POU *) (* Declaration section *)

(* Instruction section *)

(* End of program *)

6.2.3 Function block (FUNCTION_BLOCK)


Function blocks are parametrizable POU with static variables (with memory). They are the key tool to structure PLC programs. Multiple instances of a function block can be created; these have independent storage areas for inputs, outputs and intermediate results. They are called up by programs or other function blocks and can themselves call up functions and function blocks.

Example of an ST function block: FUNCTION_BLOCK AMOUNT VAR_INPUT PF_10 : PF_50 : DM_01 : DM_02 : DM_05 : END_VAR

INT INT INT INT INT

:= := := := :=

0; 0; 0; 0; 0;

VAR_OUTPUT Amount_in_DM : REAL := 0.0; Amount_in_Euro : REAL := 0.0; END_VAR Amount_in_DM := (int_to_real(Calculate (PF_10, PF_50, DM_01, DM_02, DM_05)) / 100.0); Amount_in_Euro := Amount_in_DM / 1.95583; END_FUNCTION_BLOCK

Programming

6-9

6.2.4 Function (FUNCTION)


Functions have input parameters but no output parameters. Functions return exactly one element as a return value. The function name itself is used as an internal variable to assign the return value. Internal variables are not static, i. e. they have no memory. With identical input values. a function will always return an identical return value, regardless of when and how often the function is called up. This is why local variables must not be declared as buffered. Global variables must not be used. Function blocks (FUNCTION_BLOCK) must not be called up within the function. However, other functions may be called up.

Example of an ST function: FUNCTION Calculate : INT VAR_INPUT PF_10 : PF_50 : DM_01 : DM_02 : DM_05 : END_VAR

INT; INT; INT; INT; INT;

VAR Total : INT := 0; END_VAR

Total Total Total Total Total

:= := := := :=

Total Total Total Total Total

+ + + + +

PF_10 PF_50 DM_01 DM_02 DM_05

* * * * *

10; 50; 100; 200; 500;

Calculate := Total; END_FUNCTION

6.2.5 Module calls


The following rules apply to the mutal call of POU: PROGRAM may call FUNCTION_BLOCK and FUNCTION but not vice versa. FUNCTION_BLOCK may call FUNCTION or FUNCTION_BLOCK. FUNCTION may only call FUNCTION.

6-10

Programming

A POU must not call up itself (recursion).

6.2.6 Layout of a POU


POU consist of two sections: Declaration section and Instruction section

The declaration section is used to pass all variables that are used in the current POU. Variables are symbolic designators which are assigned data types (e. g. BOOL or address). The instruction section contains the instructions to be executed by the PLC.

Example using a small ST program: PROGRAM HELLO_ST VAR OUTPUT AT %Q0.0 : BOOL; INPUT AT %I0.0 : BOOL; Enable_signal : BOOL; END_VAR IF INPUT=TRUE THEN Enable_signal:=TRUE ELSE OUTPUT:=0; END_IF END_PROGRAM (* Start and name of POU *) (* Declaration section *)

(* Instruction section *)

(* End of program *)

Programming

6-11

6.3 IEC 61131-3 Language elements, variables, data types

6.3.1 Declaration of variables


The IEC 61131-3 standard specifies: elementary and derived data types.

Elementary data types are predefined data types that are designated by keywords (e. g. BOOL, SINT, etc.). The initialization value of a data type is defined by the assignment operator ":=". If no initialization value has been specified, the default specified by IEC 61131-3 is assumed as a predefined value (e. g. 0 for numeric data types). Derived data types are user-defined data types which are derived from the elementary data types and used under a new name. They are declared between the keywords TYPE and END_TYPE.

6.3.2 Elementary data types


Elementary data types are predefined data types that are designated by keywords (e. g. BOOL, SINT, etc.). The initialization value of a data type is defined by the assignment operator ":=". If no initialization value has been specified, the default specified by IEC 61131-3 is assumed as a predefined value (see table: Default). Please also observe the following characteristics: Keyword BOOL BYTE WORD DWORD SINT INT DINT USINT UINT UDINT REAL LREAL Datawidth 1 8 16 32 8 16 32 8 16 32 32 64 Default 0 0 0 0 0 0 0 0 0 0 0.0 0.0 Explanation Truth value (not equal to 0 => TRUE, equal to 0 => FALSE). Bit sequence of length 8 (0 through 255). Bit sequence of length 16 (0 through 65535). Bit sequence of length 32 (0 through 4.294.967.295). Short integer, signed decimal (-128 through +127). Integer, signed decimal (-32768 through +32767). Double integer, signed decimal (-2.147.483.648 through +2.147.483.647). Unsigned short integer, unsigned number with selectable base in the value field (0 through 255). Unsigned integer, unsigned number with selectable base in the value field (0 through 65.535). Unsigned double integer, unsigned number with selectable base in the value field (0 through 4.294.967.295). Floating point (Double word) (1.175494351e-38 through 3.402823466e+38) Floating point (quad word) (2.2250738585072014e-308 through 1.7976931348623158e+308) Timer. Input in seconds (s), milliseconds (ms) or as a timer value/loop. The input value in s and ms is automatically rounded according to the timer value/loop Calendar date Time of day

TIME

16

0s

DATE TIME_OF_DAY

D#0001-01-01 TOD#00:00:00

6-12

Programming

Keyword DATE_AND_TIME STRING

Datawidth var.

Default DT#0001-01-0100:00:00 $00 (Leerstring)

Explanation Date and date ASCII string. Representation: Hexadecimal 20 through 7F; characters above 7F with leading $ character (e.g. $80). The string is enclosed in quotation marks (e.g. Test). It is also possible to enter special control characters.

6.3.3 Generic data types


The generic data types can be used to summarize the elementary data types into groups. They are preceded by the prefix ANY. The following data types are summarized into groups:

Generic Data Type ANY_INT

Subordinate Data Types SINT INT DINT USINT UINT UDINT REAL LREAL ANY_INT ANY_REAL BOOL BYTE WORD DWORD DATE TIME_OF_DAY DATE_AND_TIME all

Explanation Signed/unsigned integer

ANY_REAL

Floating point number

ANY_NUM

Numbers

ANY_BIT

Bit sequence

ANY_DATE

Date, time

ANY

All of the above types, as well as string, period of time and derived data types

The grouping also results in a hierarchical order, with the data type ANY being on the highest level.

Programming

6-13

Generic data types (ANY...) are only used to form descriptive groups of elementary data types. They cannot be used for the declaration of variables or for the processing of programs.

Overloaded functions The attributes of general data types are used in many standard functions. This allows the application of the input variables of a function not only to one but to multiple data types. With this property, they are called overloaded or overloadable functions.

Generic data types can only be used for standard and manufacturer functions. The programming of user-defined overloaded functions (user functions) is not possible.

Example The input parameter IN of the standard function SHL (Bit shift left) is of the generic data type ANY_BIT. This means that the data types BOOL, BYTE, WORD and DWORD are admissible.

During a call, all overloaded input parameters and possibly also the function value must have the same data type or the same data width. For example, if the compare function LT is called up, both parameters to be compared must be of the same (elementary) data type.

6.3.4 Derived data types


Derived data types are user-defined data types that are derived from elementary data types and used under a new name. They are declared between the keywords TYPE and END_TYPE. A data type defined in this way can then be used in the variable declaration.

Example of a derived data type: By declaring derived data types, you can introduce your own designations for data types in declaration blocks VAR...END_VAR. The data type INT is designated as Analog_value: TYPE Analog_value : INT; END_TYPE VAR Value1: Analog_value;

6-14

Programming

END_VAR Please also observe the following characteristics:

6.3.5 Data type with limited value field


The use of derived data types allows it to limit the value field for the data type used. Data types with limited value fields are in preparation.

Example of a data type with limited value field: The data type INT is not defined using the full value field32768 through +32767. Through the assignment of the derived data type Temperature, the variable Boiler_temperature can only assume values from 10 through +10. A similar restriction applies for the variables Measured_value1 and Measured_value2. TYPE Analog_value : INT (-128..128); Voltage : INT (0..150); Temperature : INT (-10..10); END_TYPE VAR Measured_value1 : Analog_value; Measured_value2 : Voltage; Boiler_temperature : Temperature; END_VAR

The limiting values (x..y) are entered separated by two dots without blanks. The positive numbers can be entered without the + sign.

6.3.6 Enumerations
The declaration of a data type enumeration defines a list of variables, the values of which a data element can assume. For the declaration of the data type enumeration, the name is followed by the list of variables in parentheses; the individual elements must be separated by commas. The initialization value can be defined after the closing parenthesis ). If no initialization is made during the declaration, the data element will be assigned the value of the first element of the enumeration list at the time of initial program execution.

Example: The type traffic_light can assume one of the three states red, yellow or green. A variable is initialized with the state yellow. If the initialization is missing, this variable would be automatically assigned the value of the first element, i. e. it would assume the state red. TYPE Traffic_light: (red, yellow, green):= yellow; END_TYPE

Programming

6-15

VAR Main_street : Traffic_light; Side_street1 : Traffic_light; Side_street2 : Traffic_light; END_VAR

6.3.7 Arrays
It is possible to summarize multiple data elements of the same type in a field (array). A field can consist of elementary or derived data types. Declaration is done using the keyword ARRAY and the definition of the number of field elements as well as the specification of the data type. Please also observe the following characteristics:

Example: The declaration makes the variable Field1 a data field with five data elements of the type INT. TYPE Field_5_INT : ARRAY [1..5] OF INT:=[1,13,5,34,2]; END_TYPE VAR Field1 : Field_5_INT; END_VAR

6.3.8 Data structures


It is possible to summarize multiple data elements of different types to form a data structure. A structure can consist of elementary or derived data types. Declaration of a structure is done using the keyword STRUCT and a list of structure elements while specifying their data types. To be able to access a structure element in the declaration section, enter the variable name declared as the structure and separated by a dot the name of the structure element. Please also observe the following characteristics:

Example: Initialization at the time of declaration. TYPE System_data : STRUCT Measured_value1 : BOOL := 1; Measured_value2 : INT := -15; Measured_value3 : UINT := 100; Measured_value4 : REAL := 10.2; END_STRUCT; END_TYPE VAR Station1 : System_data; Station2 : System_data;

6-16

Programming

END_VAR

Example: Initialization after declaration. TYPE System_data: STRUCT Measured_value1 : BOOL; Measured_value2 : INT; Measured_value3 : UINT; Measured_value4 : REAL; END_STRUCT := (Measured_value1 Measured_value2 Measured_value3 Measured-value4 END_TYPE VAR Station1 : System_data; Station2 : System_data; END_VAR

:= := := :=

1, -15, 100, 10.2);

Through the assignment of the type System_data, the variables Station1 and Station2 receive the characteristics of the structure System_data, i. e. they receive one data element each of the types BOOL, INT, UINT, and REAL.

6.3.9 Variables
Variables designate data elements with variable content. They can be subdivided into two groups: Variables used for the intermediate storage (buffering) of internal data, and directly represented variables which are linked to input and outputs or markers of the PLC.

A variable is coded by a name, the so-called designator. The name starts with a letter (A-Z, a-z) or underscore (_) and can be a sequence of lowercase and uppercase characters, numbers and underscores. Please also observe the following characteristics: Blanks and German Umlaut characters are not permitted in variable names. Keywords must not be used as variable names. The length of variables is limited to 32 characters.

6.3.10 Directly represented variables


Physical addresses, such as all inputs/outputs and markers, can be specified directly. Directly represented variables must be declared, but it is not mandatory to assign symbolic names. In this case, the operands are specified with their physical addresses, starting with the % character. Within the declaration block, the physical address is preceded by the keyword AT, separated by a blank.

Programming

6-17

Syntax: The variable for an input is coded with %I, an output is coded with %Q and a marker is coded with %M. The data width is specified as follows: Designator X or blank B W D Meaning Bit Byte Word Double word Size 1 bit 8 bit 16 bit 32 bit Example %I0.0 or %I0.0 %IB0.0 %QW0.0 %QD0.0

Example: Declaration of physical operands with and without assigned symbolic name. VAR AT %I0.0 : BOOL; (* without symbolic name *) Input_1 AT %I0.1 : BOOL; (* with symbolic name *) END_VAR

Directly represented variables may only be defined in POUs of the type PROGRAM.

6.3.11 Variable types


In the declaration section of a POU, the types of all variables used are defined. There, you need to declare all variables that you use in the instruction section of a POU. Each variable type is coded with a keyword. Variables of the same type are specified in a declaration block. A declaration block starts with a keyword, e. g. VAR or VAR_GLOBAL depending on the variable type and ends with the keyword END_VAR. The table below contains an overview of the different variable types and their application: Keyword VAR | | | END_VAR VAR_GLOBAL | | | END_VAR Application Local variable; only valid within the POU in which it has been declared. Access rights external: none internal: Read/Write Permitted in PROG FB FUN

A variable is declared as a global variable if itshall be external: Read/Write PROG valid in a program as well as in all FBs that are called internal: Read/Write up by this program. A global variable declared in the program is known both within the program and the FBs which are called up by this program. In all called-up FBs in which this global variable is used, it must be declared as VAR_EXTERNAL with the same designator (name). If a global variable is used within an FB, it must be de- external: Read/Write PROG clared as VAR_EXTERNAL with the same designator internal: Read/Write FB (name).

VAR_EXTERNAL | | | END_VAR VAR_INPUT

Declare an input variable if the variable shall only be external: Write

PROG

6-18

Programming

| | | END_VAR VAR_OUTPUT | | | END_VAR VAR_IN_OUT | | | END_VAR

read within a POU or if it shall be used for parameter transfer in a function or a function block. This means that the variable must not be changed in this POU.

internal: Read

FB FUN

Output variable of a function block

external: Read internal: Read/Write

PROG FB

An IN_OUT variable is read by the FB, processed and external: Read/Write PROG output under the same name. Since an operation on an internal: Read/Write FB IN_OUT variable will directly affect the contents of the transfered variable, this transfered variable must not be of a type that doese not permit a write operation zult, e. g. not a variable with the attribute CONSTANT.

TYPE | | | END_TYPE

The keyword TYPE is used to declare derived data types. Derived data types are special data types which you can derive from the elementary data types.

6.3.12 Attributes of variables


The declaration of local and global variables may be extended with additional attributes: Keyword RETAIN Application Use RETAIN to declare a remanent (battery-buffered) local or global variable. Remanent means that, at the time of a warm-start, the variable declared in this manner will retain the last value that it had before the stop. RETAIN is written after a blank following the keyword VAR or VAR_GLOBAL. Please also observe the following characteristics: The attribute CONSTANT is used if a local or global data element shall be constant, i. e. it shall not be possible to modify the contents. CONSTANT is written after a blank following the keyword VAR or VAR_GLOBAL. If you need a variable with an assignment to a physical address a directly represented variable , you can code this variable with AT in the declaration block.

CONSTANT

AT

If variables within a function block are to be used as remanent variables, this is not possible for individual variables. In this case, the instance of the function block must be declared as remanent.

Example: Declaration of a remanent data element, a remanent function block and a constant data element: VAR RETAIN CounterValue : UINT;

Programming

6-19

END_VAR VAR RETAIN Counter : CTU; END_VAR VAR_GLOBAL CONSTANT ZeroKelvin : INT := -273; END_VAR

Example: Two local variables with the symbolic names of Pump and Valve and one global variable with the symbolic name of Set_value are declared. Two declaration blocks are needed for this purpose. VAR_GLOBAL Set_value: INT:=25; END_VAR VAR Pump AT %Q0.3: BOOL; Valve AT %Q3.1: BOOL; END_VAR (*Declaration block*) (* of type global*) (*Declaration block*) (* of type local*)

6-20

Programming

6.4 IEC 61131-3 Standard function blocks


This section contains the definition of function blocks (FB) that are common for all programming languages according to IEC 61131-3. WinSPS provides a large number of FBs that represent important remanent functions. The table below contains an overview, including the names of the input and output parameters. The second table explains the data type and the meaning of the parameters. Name SR RS R_TRIG F_TRIG CTU CTD CTUD TP TON {T---0} TOF {0---T} RTC Inputs S1,R S,R1 CLK CLK CU,R,PV CD,LD,PV CU,CD,R,LD,PV IN,PT IN,PT IN,PT EN,PDT Outputs Q Q Q Q Q,CV Q,CV QU,QD,CV Q,ET Q,ET Q,ET Q,CDT Description Set dominant Reset dominant Detection of rising edges Detection of falling edges Up counter Down counter Up/Down counter Pulse generator Switch-on delay Switch-off delay Real-time clock

Inputs/ Outputs R S R1 S1 Q CLK CU CD LD PV QD QU CV IN PT ET PDT CDT

Description Reset input Set input R dominant S dominant Output Clock input (CLocK) Count up input Count down input Load counter (LoaD) Counter Down ouput Up output Current counter value Timer input (INput) Timer value (Preset Time) Current timer value (End Time) Date/Timer value (Preset Date and Time) Current data with time (Current Date and Time)

Data type BOOL BOOL BOOL BOOL BOOL BOOL R_EDGE R_EDGE INT INT BOOL BOOL INT BOOL TIME TIME DT DT

6.4.1 SR: Flip-Flop with Set dominant

Programming

6-21

Significance of operands Set1 ReSet Q1 Set condition Reset condition Output state of toggle element

Description Th function block "SR" is used to switch a data element the output "Q1" to the static binary state "1" or "0". Switching between the two states occurs depending on the value of the binary input operand "Set1" and "ReSet". At the start of the processing, the output "Q1" is initialized with the value "0". The initial processing of the function block with the value "1" of the operand "Set1" makes the output "Q1" receive the value "1" it is set. Afterwards, the change of the value of "Set1" has no further impact on the output "Q1". The value 1 of the input operand "ReSet" switches the output "Q" to the state "0" the output is reset. If both input operands have the value "1", the set condition that is met will dominate, i. e. "Q1" is set dominant.

6.4.2 RS: Flip-Flop with Reset dominant

Significance of operands Set Set condition ReSet1 Reset condition Q1 Output state of the toggle element

Description The function block "RS" is used to switch a data element the output "Q1" to the static binary state "1" or "0". Switching between the two states occurs depending on the value of the binary input operand "Set" and "ReSet1". At the start of the processing, the output "Q1" is initialized with the value "0". The initial processing of the function block with the value "1" of the operand "Set" makes the output "Q1" receive the value "1" it is set. Afterwards, the change of the value of "Set" has no further impact on the output "Q1". The value 1 of the input operand "ReSet1" switches the output "Q1" to the state "0" - the output is reset. If both input operands have the value "1", the reset condition that is met will dominate, i. e. "Q1" is reset dominant.

6.4.3 R_TRIG: Detection of the rising edge

6-22

Programming

Significance of operands CLK Q Input operand whose rising edge is detected Output operand, returns the rising edge of "CLK"

Description The function block "R_TRIG" evaluates the state of the input operand "CLK". The transition from "0" in one processing cycle to "1" in the next processing cycle is detected and reported via the output "Q" with the binary value "1". The state "1" on the output is retained only in the processing cycle during which the transition of "CLK" is detected and a rising edge is returned.

6.4.4 F_TRIG: Detection of the falling edge

Significance of operands CLK Q Input operand whose falling edge is detected Output operand, returns the falling edge of "CLK"

Description The function block "F_TRIG" evaluates the state of the input operand "CLK". The transition from "1" in one processing cycle to "0" in the next processing cycle is detected and reported via the output "Q" with the binary value "1". The state "1" on the output is retained only in the processing cycle during which the transition of "CLK" is detected and a falling edge is returned.

6.4.5 CTU: Up counter

Significance of operands

Programming

6-23

CU ReSet PV Q CV

Count pulses, rising edge Reset condition Counter limit Return value: Counter value PV Counter value

Description The function block "CTU" is used as an up counter for pulses supplied by the input operand "CU". Upon initialization, the counter receives the value "0". Each rising edge at the input "CU" increments the counter, i. e. increases its value by 1. The counter value can be cleared with the value "1" of the operand "ReSet". The output operand "CV" supplies the current counter value. If the counter value is lower than the limit "PV", the output operand "Q" has the binary value "0". If the limit is reached or exceeded, the output "Q" will become "1".

6.4.6 CTD: Down counter

Significance of operands CD Load PV Q CV Count pulses, rising edge Set condition Initial value Return value: Counter value # 0 Counter value

Description The function block "CTD" is used as a down counter for pulses supplied by the input operand "CD". Upon initialization, the counter receives the value "0". At the value "1" of the operand "Load", the value preset by the operand "PV" is used as the initial value of the counter. Each rising edge at the input "CD" decrements the counter, i. e. decreases its value by. The output operand "CV" supplies the current counter value. If the counter value is higher than "0", the output operand "Q" has the binary value "0". If the counter value reaches or is lower than 0 , the output "Q" will become "1".

6.4.7 CTUD: Up and down counter

6-24

Programming

Significance of operands CU CD ReSet Load PV QU QD CV Up counter pulses, rising edge Down counter pulses, rising edge Reset condition Load condition Load value Return value: Counter value equal to or greater than PV Return value: Counter value equal to or less than 0 Counter value

Description The function block "CTUD" is used as an up and down counter for pulses. Upon unitialization, the counter receives the value "0". Each rising edge at the input "CU" increments the counter, i. e. increases its value by 1, while a rising edge at the input "CD" decrements the counter, i. e. decreases its value by 1. At the value 1 of the operand "Load", the value which is preset by the operand "PV" is used at the counter value. The counter value can be cleared with the value "1" of the operand "ReSet". While the static state "1" of the operand "ReSet" is maintained, the count conditions or the met load condition do not affect the counter value. The output operand "CV" supplies the current counter value. If the counter value is lower than the load value "PV", the output operand "QU" has the logic value "0". If the load value is reached or exceeded, the output "QU" becomes "1". If the counter value is higher than "0", the output operand "QD" has the binary value "0". If the counter value reaches or falls below "0", the output "QD" becomes "1".

6.4.8 TP: Pulse

Significance of operands IN PT Q Start-up condition Preset timer value Binary state of timer

Programming

6-25

ET

Current timer value

Time diagram

Description the rising edge of the input operand "IN" starts the timer function of the timer "TP" for the duration of the timer value which is determined by the operand "PT". During this time, the output operand "Q" has the state "1". The transition at the input "IN" does not have any impact on the execution. If the value of "PT" changes after start-up, it will only become effective at the next rising edge of the operand "IN". The output operand "ET" shows the current timer value. If, after the started timer has elapsed, the operand "IN" has the state "1", the operand "ET" will retain the value. If the state of the operand "IN" changes to "0", the value of ET" will change to "0". Each edge that occurs while the timer is not active will initiate a pulse of a preset duration.

6.4.9 TON: Switch-on delay

Significance of operands IN PT Q ET Start-up condition Preset timer value Binary state of timer Current timer value

Time diagram

6-26

Programming

Description The rising edge of the input operand "IN" starts the timer function of the timer "TON" for the duration of the timer value which is determined by the operand "PT". During this time, the output operand "Q" has the state "0". When the started timer has elapsed, the state changes to "1" and is retained until the operand "IN" changes to "0". If the value of "PT" changes after start-up, it will only become effective at the next rising edge of the operand "IN". The output operand "ET" shows the current timer value. After the started timer has elapased, the operand "ET" will retain the value as long as the operand "IN" has the state "1". If the state of the operand "IN" changes to "0", the value of ET" will change to "0". If the state of the operand "IN" changes to 0 while the timer is active, the process is aborted and the operand "ET" will again assume the value "0". Switch-on at the input "IN" will switch on the output "Q", delayed by the preset timer duration.

6.4.10 TOF: Switch-off delay

Significance of operands IN PT Q ET Start-up condition Preset timer value Binary state of timer Elapsed timer value

Time diagram

Description

Programming

6-27

The state "1" of the input operand "IN" is passed to the output operand Q without delay. The falling edge of "IN" starts the timer function for the duration of the timer value that is determined by the operand "PT". The transition at the input "IN" to 0 does not have any impact on the execution. After the timer has elapsed, the operand "Q" will change to "0". If the value of "PT" changes after start-up, it will only become effective at the next rising edge of the operand "IN". The output operand "ET" shows the current timer value. After the started timer has elapased, the operand "ET" will retain the value as long as the operand "IN" has the state "1". If the state of the operand "IN" changes to "0", the value of ET" will change to "0". Switch-off at the input "IN" will switch off the output "Q", delayed by the preset timer duration.

6.4.11 RTC: Set real-time clock

Significance of operands EN PDT Q CDT Set condition (not operational) Set value for real-time clock (not operational) Display current value of "EN" Current date and time

Description The output operand "Q" shows the state of "EN". The current value of the clock is returned via the Operand "CTD". The real-time clock cannot be set via the function block "RTC". To set the real-time clock, please use the system command of the WinSPS: Control, Load date/time.

6-28

Programming

Introducing WinSPS

7-1

7 Programming languages
Program modules can be displayed and edited in different progarmming languages: 1) IL: The programming language Instruction List consists of a series of instructions (commands) in a low-level programming language.

2) LD: The programming language Ladder Diagram is a graphical combination of binary variables (digital logic operations). The ladder diagram resembles the circuit diagram of earlier relay control systems with contacts and coils.

3) FBD: The Function Block Diagram is a graphical combination of different function elements. In FBD, binary (digital) logic operations as well as timer, counter and comparator functions and program and module jumps can be displayed. All other function elements which cannot be represented are temporarily displayed in IL mode.

4) SFC: The programming language Sequential function chart (SFC) makes the graphic programming of a complex task in clear units possible. The control flow of these parts can be arranged gradually in sequential or parallel processes (also known as sequence cascade programming). To be able to activate this programming language, it is necessary to specify an SFC file.

5) ST: The Structured Text is a textual language. Contrary to the low-level IL language, ST is a programming language that uses comprehensive constructs to allow a very compact formulation of the programming task. ST offers the advantage that it allows a clear program structure. The disadvantage of this language is its lower efficiency. The programs are slower and longer. To be able to activate this programming language, it is necessary to specify an ST file in the Presets.

6) C: The iCL700 controller also supports high-level language programming in the C programming language. This language allows a very efficient coding of the control task. Programming in C is based on a small amount of instructions and minimum syntax conventions, which permits to implement low-level and highly upgradable programs. C is often difficult to learn for beginners. A C file is edited using the text editor in ASCII format and subsequently compiled.

The desired programming language can be activated via the menu function View... or via buttons.

7-2

Introducing WinSPS

When the module editor is called up again, the last activated programming language is preserved.

7.1 Instruction List (Bosch IL)


In order to avoid any confusion, the following terms are used: IEC-IL: Instruction list as per IEC 61131-3. Bosch-IL: Classic instruction list (based on DIN 19239).

In the IL, the program module consists of individual command lines (instruction lines). A comment can be appended to the instruction part. The notation is oriented at IEC standard 1131-3.

Command lines (<TAB> = separator

or

):

Operator <TAB> Attribute <TAB> Source operand{,destination operand} <TAB> {comment} The command line consists of the command operator, the operand attribute as well as one or two command operand(s). Bit operands are written with a dot. Example: A I4.0 Byte/word and double-word operands are always written without a dot. Example: L W M4,A

Definition lines: DEF <TAB> <TAB> Constant,Symbol <TAB> {Comment} or

Introducing WinSPS

7-3

DEF <TAB> <TAB> Absolute address,Symbol <TAB> {Comment}, respectively. Definition lines specify a local symbol or a local constant. The definition line in the program module has a higher priority than the specification in the symbol file. Example: DEF 16#FFEE,-Bitmask_sample_recognition Example: DEF I1.0,-Circuit_breaker_X11

Parameter lines: Pnr <TAB> Attribute <TAB> Operand <TAB> {Comment} For module calles with parameter passing, parameter lines are appended immediately after the command line for the module call. The parameter lines are entered in ascending order, starting with P0. Operands or constants can be passed. The data width for constants depends on the controller! Example: P0 W M1.2

Jump destination lines: Jump symbol: <TAB> {Comment} Jump destination lines consist of a jump symbol that must start in the first column and must be terminated with a colon. Example: Jump_mark_1:

Comment lines: ;{Comment} (*{Comment}*) Comment lines are introduced by a semicolon or enclosed in parentheses or asterisks (* and *). It is not possible to use nested comments. Example: ; Comment line Example: (* Comment line according to IEC 1131-3 *)

Input optimization features: Blanks used as a separator (<TAB>) are automatically converted into tab characters. Input for bit commands A, AN, O, ON, =, S, R can be made without using separators. The separators will be added automatically. Example: The input AI1.0 is converted into A I1.0.

7-4

Introducing WinSPS

For all other commands, it is sufficient to enter a single separator after the operator. The operand attribute may also be omitted. Example: The input L A,B is converted into L W A,B.

7.2 Ladder Diagram (LD)

The program module in the LD represents a graphic operation of binary variables (digital operations). The Ladder Diagram is similar to a circuit diagram with contacts and coils of previous relais controllers. The spelling is modelled on the IEC 1131-3 norm. All LD function elements which can not be illustrated, are displayed as IL command lines. Thus, a mixed representation with IL lines and LD elements develops.

Busbars The graphic edit area is limited to the left and the right side by so-called busbars. The LD elements can be added between the busbars.

Edit Mode The edit mode allows the editing of an LD graphic (LD branch). When the cursor is positioned in the area of an LD branch and when the edit mode is activated, you can edit in this area. An LD branch is limited by the two busbars (see yellow marking in illustration, this serves for demonstration purposes only). When the edit mode is not activated, you can move the cursor through the whole network. In this mode, it is possible to edit IL lines you switch into the IL programming mode.

Introducing WinSPS

7-5

Action fields The LD edit area contains sensitive fields in which specific actions can be performed. If the cursor is positioned on such a field, this field will be displayed surrounded by a red frame. Enabled or disabled functions in the toolbar or in the menu Toolbox show which actions can be performed in the current field. Click on the button in order to view examples for editing in LD mode.

Input elements Input elements can be inserted everywhere, except directly before the right busbar. This area is reserved for output elements (see below).

Output elements An output element is always on the right side of a ladder diagram as the last element directly before the right busbar.

Contacts A contact connects the binary state of the incoming connection (left) via an AND combination with the value of the associated variable. The value is passed on to the right. The following contacts are used: 'Make Contact (normally open, N/O) and the 'Break Contact (normally-closed, N/C) (similar to electromechanical contacts).

Connections (Links) Connections are illustrated with lines between both busbars. Connections can appear in a horizontal and vertical direction. However, the (current) flow is always from the left to the right.. A horizontal connection transfers the binary state of an element to the subsequent element (from the left to the right!). This corresponds to the AND combination. A vertical connection connects all horizontal elements with an OR combination and transfers this value to all elements to the right.

Coils (Assignment) The binary output status from the contacts and its connections are assigned to the coil. There are the coils Assignment', Set', and 'Reset'.

Controlled Execution The execution in the ladder diagram can be influenced (controlled) by jumps and module calls.

7-6

Introducing WinSPS

Timer and Counter Functions There are various timer and counter functions available. They can be inserted, deleted, or changed directly before the right busbar.

Operand fields If the cursor is positioned in an operand field, the desired operand can be edited in symbolic or absolute form. For clarification purposes, the symbol and the symbol comment will appear in the symbol view. Unused or incorrectly used operand fields will appear with a blue background.

Element field If the writing cursor is positioned within an element, this element can be renamed or deleted.

Editing mode The position of the cursor determines the editing mode for the different action fields as follows:

Direction keys The direction keys (cursor keys) can be used to navigate through the Ladder Diagram.

Return key The Return key serves to proceed from one action field to the next (from left to right, and from top to bottom).

Delete key The Delete key allows to delete an individual element or connection. A delete operation may result in open ends in the contact field. These must be terminated with an element or connection.

The descriptions of the various LD function elements are summarized in the help function of the respective element (Toolbox menu).

Introducing WinSPS

7-7

7.3 Function Block Diagram (FBD)

In the FBD representation, the program module is a graphical combination of different function elements. It allows to display binary (digital) logic operations, timer, counter and comparator functions as well as program and module jumps. All other function elements which cannot be represented are temporarily displayed in IL mode. The notation is oriented at IEC 1131-3.

Action fields The edit area contains sensitive fields in which specific actions can be performed. If the writing cursor is positioned on such a field, this field will be displayed inverted. Enabled or disabled functions in the toolbar or in the menu Toolbox show which actions can be performed in the current field. Click this button to see an examplary setup of a module in FBD.

Operand fields If the cursor is placed on an operand field, it is possible to edit the desired operand in symbolic or absolute form. Symbolic operands are changed into absolutes at the same time. For clarification purposes, the symbol and the symbol comment will appear in the symbol view. Unused or incorrectly used operand fields are displayed inverted.

Some function elements have so-called optional operands; i. e. it is not mandatory to use these pins. The following rules apply to these connections: When an element is created, all pins will initially be displayed. If optional operand fields are left empty, the corresponding pin is deleted. If a deleted optional operand field is used again, the pin will reappear. Optional operands without pin will not be selected if the key is used. If you use you can select all - including optional - operands. the key

7-8

Introducing WinSPS

Input pin If the writing cursor is positioned on a bit input of an input element, the input pin can be deleted (for AND/OR only), another input pin can be inserted (AND/OR only), the selected input can be negated or a new element can be inserted before this input.

Connecting line If the writing cursor is positioned on the connecting line between two network elements, the selected input can be negated, a new input can be inserted below the selected input (AND/OR only) or a new element can be inserted between the two elements.

Element field If the writing cursor is positioned within an element, this element can be renamed or deleted.

Coupling point If the writing cursor is positioned on a coupling point, an output element can be appended to the existing output. Coupling points are crossings which are used to connect outputs with each other.

Edit mode The editing mode can be different in the various action fields depending on the position of the writing cursor:

Introducing WinSPS

7-9

Return key

(Operand key) The Return key can be used to jump from one operand field to the next. If the writing cursor is not positioned on an operand field, the first operand of the first element in the upper left corner will be selected.

Tab key

(Operand error key) The Tab key can be used to position the writing cursor on operands which have not yet been edited or which have been incorrectly edited. If the writing cursor is not positioned on an operand, the first operand which is still missing or contains an editing error will be selected.

Insert key

(Insert input pin) The Insert key can be used to insert an additional input pin (function elements AND and OR only). The writing cursor must be positioned on the line of an input pin.

Delete key

(Delete function element or input pin) The Delete key can be used to delete an individual element. The writing cursor must be positioned inside the function element to be deleted. Only elements which are linked to other elements at one input (maximum) can be deleted. After the deletion, the output of the previous element is connected with the input of the following element. If the writing cursor is positioned on the pin of an AND/OR element, this pin can be deleted with the Delete key.

Shift-Delete key

(Delete several function elements) The key combination Shift + Delete can be used to delete several elements at once. The writing cursor must be positioned inside an element. The marked and all previous elements will be deleted. If the writing cursor is positioned inside the the last function element before the output elements or on an output element, the entire function diagram will be deleted.

The descriptions of the various FBD function elements are summarized in the help function of the respective element (Toolbox menu).

7.4 Sequential Function Chart (SFC)


The representation Sequential Function Chart (SFC) makes the graphic programming of a complex task in clear units possible. The control flow of these parts can be arranged gradually in sequential or parallel processes (also known as sequence cascade programming). All inputs in the SFC editor are not immediately written down into the program module, but rather into the SFC file. If there is no SFC file specified in the preset, the representation SFC can not be activated. Furthermore, attention must be paid to the fact that certain conventions related to module and symbol file(s) exist (see Create SFC project ).

7-10

Introducing WinSPS

7.4.1 MADAP or step marker technique


There are three ways to program and compile in the SFC editor: 1 MADAP: Especially for the BOSCH control and operate concept 2 MADAP with BEFA=1: Immediate instruction execution (without BEFA check) 3 Step marker technique according to IEC 1131-3 The selection of the programming type happens in the menu Toolbox, Options. Before you start the SFC programming, you have to select the programming type.

7.4.2 Screen layout


The SFC editor is organized hierarchically:

First of all after the call-up, the table of contents appears. Here, the structure (network) of the processes is represented and edited partially. You can reach the next level - the sequence level - with a click on the edit field of the desired sequence. To structure the sequence in detail, so-called swap-out levels, which sum up an extract of the sequence, can be produced (see SFC Swap-out ). You can get further information in the following help pages SFC table of contents and SFC sequence level. From any level, you can reach the table of contents via the button With , you can gradually switch one level backwards: .

Introducing WinSPS

7-11

If you like to know where to find sensitive fields in the sequence (i.e. those fields where you can insert, delete, or change elements), then activate the menu functions View, Show sensitive fields. All sensitive areas . If you move the mouse cursor over are then provided with a symbol these areas, you can see, by means of the mouse cursor symbol (for a list, see Operating philosophy, Mouse cursor symbols), which function can be carried out. Before loading a SFC file into the controller, the sequence has to be created. See also the help Create SFC project.

7.4.3 SFC Table of contents

The table of contents shows the overview of the sequence structure. Three different symbol elements are used: - Sequence: Succession of Steps - Swap-out: Extract from a sequence - Description: Serves for comment According to the programming type MADAP or Step marker technique, the sequence element is represented differently:

MADAP sequence

Step marker technique sequence

7-12

Introducing WinSPS

The first field indicates the consecutive index number. The numbering is assigned automatically with the insertion of sequences or descriptions (function Toolbox, Insert sequence or Insert description). With a mouse click on Edit ..., you can reach the sequence level. There you can edit the sequence. The number in the fourth field (Step marker technique: third field) is the sequence number. This number reoccurs in the step elements in the sequential function chart (e.g. 1N1). The placing of the sequence number can be done automatically or manually. The sequence title appears in the last field. This title can be edited in the sequence level.

Two functions of a sequence can be realized in the programming type MADAP: the automatic branch and the manual branch. While the automatic branch runs with the defined steps considering the automatic conditions, every step in the manual branch is made considering the manual conditions. In the MADAP programming type, all inserts should be made in the automatic branch first. The sequence structure is automatically transferred to the manual branch where it can then be changed. If you also need the BEFA and transition conditions in the manual branch (inching mode), you can update them with the menu function Toolbox, Copy auto conditions to manual branch. To insert a sequence or a description field, place the mouse cursor on the field with the index number. Depending on where you place the cursor (up or down), you can insert before or after the current element. You or , respectively. You can can do this with the mouse cursor symbol also delete or move the element. Also, a sequential function chart can be inserted here with the function 'File', 'Insert'. The structure of the swap-out is marked in the table of contents:

Swap-outs can only be made on the sequence- or swap-out level. For additional information, see the description of SFC swap-out.

Additional help to the table of contents can be reached via the context help and the different elements, as well as via the tutorial Introduction to the WinSPS, Step by step: The Sequential function chart.

Introducing WinSPS

7-13

Context help to the table of contents MADAP: Step marker technique:

7.4.4 SFC sequence level


You can reach the sequence level with a click on the edit field of a sequence in the table of contents.

In the SFC, several independent sequences can be programmed. On the sequence level, one sequence at a time is worked on. A sequence contains a start and an end position, and in between there is one or several step elements (step). A step element consists of a transition and a step. The start position in step marker technique represents a step element, too (start). Every step element in MADAP additionally includes the condition for the command output (BEFA). The step action is only made when these condition is fulfilled.

Step element The description of a step element varies according to the programming type:

Sequence MADAP

Sequence step marker technique

7-14

Introducing WinSPS

Context help to the step element

Step action (Qualifier)

As long as a step is active, the action(s) in the step action block are executed. The stored actions are still executed when the step is already inactive.The Qualifier (Q) marks the action which has an effect on the feedback variable (e.g. output bit which has to be set through an action): Q = R S SP SR SPE SRE SC RC CU CD CMC PLC Action Non-remanent/Set output Reset (FALSE) Remanent, Set (TRUE) With time limit: TRUE until the time runs out With delay: TRUE when the time is over Remanent with time limit: TRUE until the time runs out, even if the step is inactive Remanent with delay: TRUE when the time is over, even if the step is inactive Set counter Reset counter (RESET) Increment counter Decrement counter Module call PLC instructions: makes the input of PLC instructions possible

Context help to the step action

Command output BEFA (MADAP only)

There is another field for the condition of the command output in the programming type MADAP. A step action is only executed when the step is active and the corresponding BEFA condition is fulfilled. Here, the logic operations AND, OR, and the negation can be realized (like in the transition). Context help to BEFA

Introducing WinSPS

7-15

Transition

With the accomplished transition the preceding step is inactivated and its succeeding step is activated. Transitions can be linked logically. By that, complex transition conditions can be realized. The logic operations AND, OR, and the negation are available. Context help to the transition

Sequential control The sequence can be realized with a simple succession of step elements, or with branches and loops:

Simple transition/Step sequence With this simple sequence, one step after another is executed. One step (1) is inactivated, when the transition condition is realized (2). That way, the succeeding step (3) is activated (in MADAP, the BEFA condition must be realized for the execution of the step). Context help Simultaneous branch After the entry (1), all sequences in the branch are executed (2). As soon as all branches are passed through (3) and the transition condition is realized (4), it is switched to the succeeding step and all steps within the simultaneous branch are inactivated. Context help

Alternative branch The transitions are checked from the left to the right (1). The first applicable transition condition activates the corresponding succeeding step (2). Only the steps in this branch are executed (3). Context help

Loop First of all, the transition of the succeeding step is checked (1). Then follows the check of the transition condition of the line with an arrow (2). If the return condition is true, it will jump to the top end of the line with an arrow (3). Context help

7-16

Introducing WinSPS

Jump First of all, the transition of the succeeding step is checked (1). Then follows the check of the transition condition of the jump (2). If the return condition is true, it will jump to the step of the number which is displayed in the jump destination (3). Example: The jump destination includes the entry "4". The jump goes to the step xN4 in the current sequence. Context help

You can receive further help to the sequence level with the context help of the sequence level and the different elements, as well as with the tutorial The SFC in 30 minutes. Context help to the sequence level

7.4.5 SFC Swap-out


To structure the sequence more in detail, so called swap-outs can be produced. They represent an extract of the sequence. Swap-outs are especially useful for the printing. The swap-out is a graphic tool which does not influence the sequence. The swap-out can be cancelled anytime.

Additionally, branch swap-outs can be produced from a branch of an alternative or simultaneous branch. Branch swap-outs are not shown in the table of contents. You can get further help about the swap-out with the menu functions Toolbox, Swap out or Swap in.

7.4.6 Create SFC project


Before the loading of a SFC file into the controller, the sequence must be generated. It can be adjusted immediately before loading in the load dialog box. You can also generate intermediately, for example to check your inputs. You can use the menu function File, Create sequence. During the creating process, the sequences are changed into IL instructions and inserted into program modules. Different symbols of the sequence are inserted into the symbol file. There are used file names by definition. These reserved files are produced automatically and inserted into the symbol file: FC0 FC1...n KETTEN.PXL SCHRK01.PXL...SCHRKn.PXL

Introducing WinSPS

7-17

FC256 DM1...n DM0 DM120 FC200

K_BETRA.PXL (MADAP, see below) DM_K01.PXD... DM_Kn.PXD DMAS.PXD DM120 (CL200 only) KETTE.PXL (MADAP, see below)

For the MADAP programming, you have to use the cascade organization module KETTE.PXL (KETTE200.PXL for CL200, KETTE700.PXL for CL700, KETTEPCL.PXL for PCL). This file is available as a disk with the MADAP software package, which you can order through the Bosch software service. If simultaneous branches are programmed, Bit 12 (no step-on in same cycle) in parameter 1 of the mode selection, should not be set on 1. Besides, some reserved markers and special markers are necessary in the SFC. They are also registered automatically into the symbol file.

Changes which are made manually in the reserved program files will not be fed back into the sequential function chart (except K_BETRA). These registrations are lost the next time something is created.

7.5 Instruction List (IEC IL)


In order to avoid any confusion, the following terms are used: IEC-IL: Instruction list as per IEC 61131-3. Bosch-IL: Classic instruction list (based on DIN 19239).

The Instruction List according to IEC 61131-3 is a low-level programming language. Low-level means that the instructions can directly be converted into the binary machine code of the PLC. Contrary to the ST programming language, multiple program lines are required in IL to formulate an instruction. To be able to active this programming language, an ST file must be specified in the Presets.

All inputs in the Editor are not immediately written into the program module but rather into internal intermediate files and into the IEC file. It must also be observed that certain conventions exist in view of module and symbol file(s) (see Generate IEC project ).

7-18

Introducing WinSPS

Instructions are entered in the instructions part. Information about the POU, variable declarations and type definitions can be entered in the declaration tables:

7.5.1 Instructions
In IL, execution instructions for the PLC are specified in one line. A complete sequence of instructions (IL sequence) can extend over multiple instruction lines. An IL instruction line is defined by the following format:

The label is optional. It is specified if a jump is made from another instruction line into this line, see Label:

At the Operator position, either an IL operator or a function name is specified. It describes the operation to be carried out. All possible operations are listed in section Instruction set:

Introducing WinSPS

7-19

Operator and operand must be separated by at least one separator. The or the tab . delimiter may be the space character

Operands are variables or constants which are used to execute an operation (instruction) via the operator. At the time of a function call, the operand is an input parameter. Depending on the type of operation or function call, multiple operands - separated by commas - can be specified as an operand list. Some operators do not require any operands, e.g. RET.

In order to implement nesting, parentheses can be used, see section Parentheses:

The comment is optional. Within an instruction line, comments may only be used at the end of the line.

The semicolon ; that is used in classic programming to designate the comment is not allowed for comments as per IEC.

7.5.2 Current Result CR


Working registers as they are used in the classic Bosch IL do not exist in IL as per IEC 61131-3. However, there is a virtual working register named CR. Similarly, there are not status bits like they are used in the Bosch IL to indicate the states Interrupt, Carry, Overflow, Zero and Negation.

Similar to the register for the Result of Logic Operations (RLO) in the Bosch IL, the IEC IL uses an accumulator named Current Result (CR). It is used to accept and process operands and results of the PLC instructions.

Example of an evaluation of the CR: In the example below, the instruction EQ is used which accesses the current result (CR). The CR contains the result of the addition generated by the instruction Store ST. It can be used until it is reset by an operation such as LD.

7-20

Introducing WinSPS

M1:

LD ADD ST EQ JMPC

iOperand1 iOperand2 iResult 100 M2

(* calculation result *) (* comparison CR = 100 ? ... *) (* ...then jump to M2 *)

Behavior with different operators Depending on the operator, the CR is influenced differently:

Influence create

Description The operators LD and LDN create a CR, i.e. the CR is initialized with a new value. The instruction uses the CR of the preceding result and modifies it. Examples: &, OR, ADD, MUL, GT, EQ, LE.

process

leave unchanged

The instruction uses the CR of the preceding result but does not modify it. Examples: ST, S, R, RETC

set undefined

The following instructions of a CR which is set as undefined may not use it for linking. Examples: JMP, CAL

With certain operators, the IEC leaves open whether the CR is further processed or must remain unchanged or must be set as undefined. A description of the CR behavior of the WinSPS is given in the subsections of the section Instruction set.

Function calls The CR can not only be applied to a result of a sequence of instructions but can already be used earlier. With a function call, it is e.g. possible to pass the first input parameter from the CR of the previously executed instruction without specifying any other information, see section Function calls.

Size and data type In the proper sense, the accumulator is a working register in the processor of the PLC. However, in the IEC 61131-3, this accumulator is not assigned to a fixed PLC memory. The CR is rater a virtual working register. This allows a flexible use of the CR for different data types and data widths. The CR can accept the following data types:

Introducing WinSPS

7-21

- General data type, see - Instance of a function block

The compatibility of the data types in successive operations must be observed.

7.5.3 IL sequences
An IL sequence starts with a load instruction (LD or LDN) and is not terminated before a new load instruction is used. Exceptions are absolute function block calls as well as jump and return operations. These are terminated on their own.

With the load instruction, the data type of the specified operand establishes the admissible data type for the next operand in this sequence. Two successive operations must be type-compatible. By means of the standard functions for type conversion, incompatible data types can be converted.

Example: LD AND ST LD ST ST 2#10100110 2#11110000 %QB0 tod#8:00:00 todVar1 todVar2 (* Start 1st sequence *)

(* Start 2nd sequence *)

Using the parentheses, multiple nesting levels can be implemented, see section Parenthesis:

7.5.4 Label
The label is specified if a jump is to be made from another instruction line into the current line. The label may also be used on its own in a line, i. e. without an operator or operand. If no label is specified in an instruction line, the colon must also be omitted.

7-22

Introducing WinSPS

The applicable rules for identifiers also apply to the names of the labels, see:

Labels may be used only at the beginning of a sequence, i.e. before a load instruction.

Example for the use of labels: M1: M2: LD ADD ST LT JMPC JMP ... M3: M4: ... LD ST iResult iOperand1 (* M2 not admissible in this position! *) iResult (* calculation result *) 100 (* Comparison CR < 100 ?... *) M1 (* ...then jump to M1 *) M3 (* ...else jump to M3 *) iOperand2 iOperand3 (* Label not admissible here: generates compiler error *)

7.5.5 Parenthesis
IL sequences can be combined by means of parenthesis operators in order to link the result with the CR. Such parenthesis expressions can be nested at multiple levels.

To introduce a parentheses level, an opening parenthesis ( is placed directly after the operator. Every level is terminated in a separate instruction line with the closing parenthesis ).

The introduction of parenthesis levels is only possible with certain operators. A list of these operators is contained in the section Instruction set.

Contrary to the ST programming language, IL does not use priorities for arithmetic operators. This means, for example, that an addition has the same processing priority as a multiplication. The processing sequence can be specified through the sequence of the instruction lines and through parenthesis levels.

Introducing WinSPS

7-23

Example for multiple nesting levels: The example below calculates the following mathematical expression: 5+(2+4*(3-1)) The comment gives the current result CR after the respective instruction. Thus, the variable iResult contains the value 17.

LD ADD( ADD MUL( SUB ) ) ST

5 2 4 3 1

iResult

(* (* (* (* (* (* (* (*

5 *) 2 *) 6 *) 3 *) 2 *) 12 *) 17 *) 17 *)

Programming examples for more complex parenthesis levels can be found in the section Introducing WinSPS, Instruction List as per IEC 61131-3, Parenthesis", pp.:

7.5.6 Instruction set


The table below list all IL instructions. A detailed description of the instructions is contained in the following subsections.

Modify operators Some of the operators in the table can be modified to extend their meaning:

Negation of the operand: Reversal of the binary signal state (from TRUE to FALSE or from FALSE to TRUE), or ones complement for a bit pattern (every single bit is reversed). Examples: &N, LDN, ORN

Conditional execution of the instruction: Only if the CR contains the (Boolean) state TRUE will the instruction be executed. Examples: JMPC, CALC

7-24

Introducing WinSPS

The negation and the conditional execution can be combined for some operators. Example: JMPCN, CALCN

Introduction of nesting level: Nesting options are listed in the table in column (. Further information can be found here: Example: ADD(, XOR(, GT(

Operator LD LDN ST STN S R AND & ANDN &N OR ORN XOR XORN ADD SUB MUL DIV GT GE EQ NE LE LT JMP

Operand ANY ANY_BIT ANY ANY_BIT BOOL BOOL ANY_BIT ANY_BIT ANY_BIT ANY_BIT ANY_BIT ANY_BIT ANY_BIT ANY_BIT ANY_NUM ANY_NUM ANY_NUM ANY_NUM ANY ANY ANY ANY ANY ANY Marker

Meaning Copies the operand value into the working register CR Copies the negated operand value into the working register CR Sets the operand value equal to the current result (CR) Sets the operand value equal to the negated current result (CR Sets the Boolean operand value to 1 if CR = 1 Resets the Boolean operand value to 0 if CR = 1

( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (

Boolean AND Boolean AND Boolean AND, negated Boolean AND, negated Boolean OR Boolean OR, negated Boolean exclusive OR Boolean exclusive OR, negated Addition Subtraction Multiplication Division Greater than Greater than equal to Equal to Not equal to Less than equal to Less than Unconditional jump to label

Introducing WinSPS

7-25

Operator JMPC JMPCN CAL CALC CALCN RET RETC RETCN )

Operand Marker Marker Instance name Instance name Instance name -

Meaning Jump to label if CR = 1 Jump to label if CR = 0 Unconditional FB call FB call if CR = 1 FB call if CR = 0 Unconditional return Return if CR = 1 Return if CR= 0 Closing parenthesis in case of nesting

The following subsections contain a detailed description of the instructions.

7.5.7 Load instructions LD


Load: LD The value of the specified operand is loaded into the working register CR. The original contents of the working register are overwritten. The operand is not changed. The data type of the specified operand determines the admissible data type for the subsequent operands in this sequence.

Admissible data types: ANY Influencing the CR: Create

Examples: LD LD LD LD 5 (* Value 5 is loaded *) tod#8:27:00 (* Time of day *) VAR_1 (* Contents of a variable *) %I5.7 (* directly represented physical address *)

Negated loading: LDN

7-26

Introducing WinSPS

The negated value (see also Instruction set) ) of the specified operand is loaded into the specified working register CR. The original contents of the working register are overwritten. The operand is not changed. The data type of the specified operand determines the admissible data type for the subsequent operands in this sequence.

Admissible data type: ANY_BIT Influencing the CR: Create

Example: In the example, the negated value of the operand is loaded. Thus, the CR contains the value 2#10010101 after the execution of the instruction.

LDN

2#01101010

(* !!! Data type ANY_BIT !!! *)

7.5.8 Assignments ST, S, R


Assigning: ST The contents of the working register CR are assigned to the specified operand. The original value of the operand is overwritten. The data type of the specified operand must match the data type of the data element in the CR. The data type of the CR is determined by the data type of the variable which first has a value assigned to it. Further assignments can then be made only with variables of the same data type. An assignment can be followed by another.

Admissible data types: ANY Influencing the CR: Leave unchanged

Examples: ST ST VAR_1 (* Assign CR to a variable *) %Q5.7 (* directly represented physical address *) tod#12:27:00 (* Load time of day... *) todVar1 (* ...assign 2 variables *) todVar2

LD ST ST

Introducing WinSPS

7-27

Negated assigning: STN The negated contents (also refer to Instruction set ) of the working register CR is assigned to the specified operand. The original value of the operand is overwritten. The data type of the specified operand must match the data type of the data element in the CR. The data type of the CR is determined by the data type of the variable which first has a value assigned to it. Further assignments can then be made only with variables of the same data type. An "STN" assignment can be followed by another "ST" or "STN" assignment.

Admissible data types: ANY_BIT Influencing the CR: Leave unchanged

Example: In the example, the specified value is assigned to the CR via "LD". Using "STN", the negated value 2#11000011 is assigned to the variable "VAR_1". However, the CR contains the unchanged value 2#00111100.

LD STN

2#00111100 VAR_1

(* !!! Data type ANY_BIT !!! *)

Set: S The specified operand is set (TRUE) it the contents of the working register CR is equal to "1" (TRUE). The operand remains set until a reset instruction reverses this state. If this set condition is not met, the operand will remain unchanged.

Admissible data type: BOOL Influencing the CR: Leave unchanged

Examples: In the example, the output 7.2 is set depending on the state of the marker 15.3.

LD S

%M15.3 %Q7.2

(* Load marker bit *) (* Set output *)

7-28

Introducing WinSPS

Reset: R The specified operand is reset (FALSE) if the contents of the working register CR is equal to "1" (TRUE). If this reset condition is not met, the operand will remain unchanged.

Admissible data type: BOOL Influencing the CR: Influencing the CR: Leave unchanged

Examples: In the example, the output 7.2 is reset depending on the state of the marker 15.3.

LDN R

%M15.3 %Q7.2

(* Marker bit (negated) *) (* Reset output *)

7.5.9 Boolean operators AND, &, OR, XOR


Boolean AND: AND, & Boolean (logical) AND of the specified operand value with the contents of the working register CR. The result is stored in the CR. The operand value remains unchanged. In case of an AND operation on byte or word operators, the individual bits of the specified operand are combined with the corresponding bits of the CR. Either the keyword "AND" or the short form "&" (commercial AND) may be used.

Admissible data types: ANY_BIT Influencing the CR: Further processing

Example 1: Only if the state 1 (TRUE) is present at the inputs 8.2 and 8.5, the output 4.0 will also be set to "1".

LD & ST

%I8.2 (* phys. binary address *) %I8.5 %Q4.0

Introducing WinSPS

7-29

Example 2: After the AND combination of the two bit patterns, the output byte will contain the bit pattern 10100000.

LD AND ST

2#10100110 2#11110000 %QB0

(* Bit pattern *)

Negated AND: ANDN, &N In the case of binary operations, the contents of the specified operand will be negated (also refer to Instruction set ) and AND-combined with the contents of the working register CR. The result is stored in the CR. The operand value remains unchanged. In the case of bit patterns (byte or word operands), every bit of the operand is negated (ones complement). Either the keyword "ANDN" or the short form "&N" (commercial AND) may be used.

Admissible data types: ANY_BIT Influencing the CR: Further processing

Example 1: The state at input 8.5 is negated, then ANDed with input 8.2. The state "1" (TRUE) must be present at input 8.1, and input 8.5 must be "0" (FALSE) so that the output 4.2 is set to "1".

LD &N ST

%I8.2 (* phys. binary address *) %I8.5 (* negated state *) %Q4.2

Example 2: Negation of the second bit pattern yields 2#00001111. This bit pattern is combined with the first one in a binary form. The output byte contains the bit pattern 00000110.

LD ANDN ST

2#10100110 2#11110000 %QB4

(* Bit pattern *) (* Bit pattern is negated *)

7-30

Introducing WinSPS

Boolean OR: OR Boolean (logical) OR of the specified operand value with the contents of the working register CR. The result is stored in the CR. The operand value remains unchanged. In case of an OR operation on byte or word operators, the individual bits of the specified operand are combined with the corresponding bits of the CR.

Admissible data types: ANY_BIT Influencing the CR: Further processing

Example 1: It the state 1 (TRUE) is present at input 8.2 or 8.5 - also at both inputs at the same time -, the output 4.1 is set to "1".

LD OR ST

%I8.2 (* phys. binary address *) %I8.5 %Q4.1

Example 2: After the OR combination of the two bit patterns, the output byte will contain the bit pattern 11110110.

LD OR ST

2#10100110 2#11110000 %QB8

(* Bit pattern *)

Negated OR: ORN In the case of binary operations, the contents of the specified operand will be negated (also refer to Instruction set ) and OR-combined with the contents of the working register CR. The result is stored in the CR. The operand value remains unchanged. In the case of bit patterns (byte or word operands), every bit of the operand is negated (ones complement).

Admissible data types: ANY_BIT

Introducing WinSPS

7-31

Influencing the CR: Further processing

Example 1: With the LDN instruction, the state at input 8.2 is negated and set in the CR. The state at input 8.5 is also negated by the operator ORN, followed by the OR operation.

LDN ORN ST

%I8.2 (* phys. address negated *) %I8.5 (* also negated *) %Q4.3

Example 2: Negation of the second bit pattern yields 2#00001111. This bit pattern is combined with the first one in a binary form. The output byte contains the bit pattern 10101111.

LD ORN ST

2#10100110 2#11110000 %QB12

(* Bit pattern *) (* Bit pattern is negated *)

Exclusive OR: XOR Boolean (logical) exclusive OR of the contents of the specified operand with the contents of the working register CR. Exclusive OR means that both operands to be combined must be different so that the result assumes the state "1" (TRUE). The result is stored in the working register. The operand value remains unchanged. In the case of an exclusive OR combination of byte or word operations, the corresponding bits of the involved operands are combined.

Admissible data types: ANY_BIT Influencing the CR: Further processing

Example 1: The table below shows the result at output 4.4 dependent on the inputs.

LD XOR ST

%I8.2 (* phys. binary address *) %I8.5 %Q4.4

7-32

Introducing WinSPS

%I8.2 %I8.5 %Q4.4

FALSE FALSE FALSE

TRUE FALSE TRUE

FALSE TRUE TRUE

TRUE TRUE FALSE

Example 2: After the XOR combination of the two bit patterns, the output byte will contain the bit pattern 01010110.

LD XOR ST

2#10100110 2#11110000 %QB16

(* Bit pattern *)

Negated XOR: XORN In the case of binary operations, the contents of the specified operand is negated (also refer to Instruction set ) and XOR-combined with the contents of the working register CR. The result is stored in the CR. The operand value remains unchanged. In the case of bit patterns (byte or word operands), every bit of the operand is negated (ones complement).

Admissible data types: ANY_BIT Influencing the CR: Further processing

Example 1: The state at input 8.5 is negated, then XORed with input 8.2. The table below shows the result at output 4.4 depending on the inputs (before the negation).

LD XORN ST

%I8.2 (* phys. binary address *) %I8.5 %Q4.5

%I8.2 %I8.5 %Q4.5

FALSE FALSE TRUE

TRUE FALSE FALSE

FALSE TRUE FALSE

TRUE TRUE TRUE

Introducing WinSPS

7-33

Example 2: The negation of the second bit pattern yields 2#00001111. This bit pattern is combined with the first in a binary form. The output byte contains the bit pattern 10101001.

LD XORN ST

2#10100110 2#11110000 %QB16

(* Bit pattern *)

7.5.10 Arithmetic operators ADD, SUB, MUL, DIV


For arithmetic (mathematical) calculations, there are four types of basic calculations available in IL: addition, subtraction, multiplication and division. Further arithmetic functions for the processing of time values and addresses as well as the use of multiple operators are covered by the standard functions, refer to manual "Programming according to IEC 61131-3" (Order No. 1070 072 305).

Addition: ADD The specified operand value is added to the contents of the working register CR, and the result is stored in the CR. The operand value remains unchanged. The opening parenthesis for the introduction of a nesting level can be applied to the ADD operator, refer to section Parenthesis'.

Admissible data types: ANY_NUM Influencing the CR: Further processing

Example 1: "uiVar" and the CR contains the value 34 after the addition.

LD ADD ST

24 (* Unsigned *) 10 uiVar

Example 2: "rVar" and the CR contains the value "83.5" after the addition.

7-34

Introducing WinSPS

LD ADD ADD ST

78.25 (* Floating point number *) -1.5 (* Signed *) 6.75 rVar

Subtraction: SUB The specified operand value (subtrahend) is subtracted from the contents of the working register CR (minuend), and the result is stored in the CR. The operand value remains unchanged. The opening parenthesis for the introduction of a nesting level can be applied to the OR operator, refer to section Parenthesis'.

Admissible data types: ANY_NUM Influencing the CR: Further processing

Example: "uiVar" and the CR contains the value 14 after the subtraction.

LD SUB ST

24 10 uiVar

Multiplication: MUL The specified operand value is multiplied with the contents of the working register CR, and the result is stored in the CR. The operand value remains unchanged. The opening parenthesis for the introduction of a nesting level can be applied to the MUL operator, refer to section Parenthesis'.

Admissible data types: ANY_NUM Influencing the CR: Further processing

Example: "uiVar" and the CR contains the value "480" after the multiplication. The variable "uiVar" must not be of the data type "SINT" or "USINT" because these cannot accept the result. Instead, a data type with a larger data width must be selected.

Introducing WinSPS

7-35

LD MUL ST

24 (* Unsigned *) 20 uiVar

Division: DIV The contents of the working register CR (dividend) are divided by the value of the specified operand (divisor), and the result is stored in the CR. The operand value remains unchanged. The opening parenthesis for the introduction of a nesting level can be applied to the DIV operator, refer to section Parenthesis'.

Admissible data types: ANY_NUM Influencing the CR: Further processing

Example: If "iVar" is a floating-point variable (ANY_REAL), "iVar" and the CR will contain the value 2.4" after the division. In the case of an integer variable (ANY_INT), the value "2" will result, i.e. the decimal places are truncated.

LD DIV ST

24 10 iVar

(* Unsigned *)

7.5.11 Comparison operators GT, GE, EQ, LE, LT, NE


Boolean checks of operators, i.e. checks whether a condition is met (TRUE) or not (FALSE) can be used to control the program execution. The comparison operators are e.g. combined with jump or call operators, refer also to the sections below.

The following comparison operators are available:

GT- greater than GE EQ - greater than or equal - equal to

LE - less than or equal

7-36

Introducing WinSPS

LT - less than NE- not equal

The specified operand value is compared with the contents of the working register CR. The operand value is subtracted from the value of the working register. The satisfied comparison condition is indicated in the CR by the Boolean state TRUE; FALSE means that the comparison condition is nit met. The original contents of the CR are overwritten. The operand value remains unchanged. During the comparison, a type conversion of the working register CR takes place: After the comparison, the CR is of the type BOOL. The Boolean result of a comparison operation can be used as a condition for a function block call, for a jump to a label, for other logical operations or for a return from a POU to the higher-level structural level.

Admissible data types: ANY Influencing the CR: Further processing

Example: The result of the addition is saved in the variable "iResult" and in the CR. If the operands of the addition and of the result are e.g. of the data type "INT", the CR is also assigned the data type "INT". The subsequent comparison operation stores the Boolean comparison result "TRUE" or "FALSE" in the CR. The data type of the CR changes to "BOOL". This enables the subsequent jump instructions "JMPC" and "JMP" to use the Boolean value in the CR.

M1:

LD ADD ST LE JMPC JMP

iResult iOperand1 iResult (* Calculation result *) 100 (* Comparison CR <= 100 ?... *) M1 (* ...then jump to M1 *) M3 (* ...else jump to M3 *)

7.5.12 Jump operators JMP, JMPC, JMPCN


Jump instructions can be used to branch to a jump destination. The jump destination must always have a start of sequence that is identified by the label, refer to section 'Label'. After a jump, the state of the working register CR is undefined and must be redefined with a load instruction.

Introducing WinSPS

7-37

A jump is only possible within a POU.

Unconditional jump: JMP The program is continued at the point which is specified as the jump destination.

Admissible data types: Non-relevant Influencing the CR: Undefined

Example: The unconditional jump to the label "M3" has the effect that the instruction lines between the jump instruction "JMP" and the label "M3" are not executed immediately. With another jump instruction to the label "M2", the above-mentioned instruction lines are executed later.

M1:

LD ... JMP ... LD ... JMP

iAny M3 (* unconditional jump *)

M2: M3:

xAny M2 (* unconditional jump *)

Conditional jumps: JMPC, JMPCN Conditional jump depending on the Boolean contents of the working register CR.

JMPC Jump if TRUE: If the CR contains the value TRUE, the jump is executed and the program is continued at the points that is defined as the jump destination. If, however, the CR contains the value FALSE, no jump is executed. The program is continued with the instruction that follows the jump instruction.

JMPCN Jump if FALSE: If the CR contains the value FALSE, the jump is executed and the program is continued at the points that is defined as the jump destination.

7-38

Introducing WinSPS

If, however, the CR contains the value TRUE, no jump is executed. The program is continued with the instruction that follows the jump instruction.

Admissible data types: Non-relevant Influencing the CR: Undefined if the jump is executed. Unchanged of the program execution is continued with the next instruction.

Example: The following example evaluates the state of the output 3.5. If a signal is present at the output, a jump to "M1" takes place. Only when no signal is present at "Q3.5", the program execution is continued after the jump instruction. ATTENTION! The program execution is not continued by the loop. If the signal at "Q3.5" is present for a period that exceeds the maximum program cycle time, the controller will switch to the STOP state.

M1:

LD JMPC

%Q3.5 M1

7.5.13 Call of function blocks CAL, CALC, CALCN


As in the case of the jump instructions, this is used to branch to a jump destination. In this case, the jump destination is the name of the FB instance. After a FB call, the state of the working register CR is undefined and must be redefined with a load instruction.

Unconditional calls: CAL The program is continued further in the function block which is specified as operand. The unconditional call may be programmed only after completion of an IL sequence and is not allowed in parenthesis operations.

Admissible data types: Non-relevant Influencing the CR: Undefined

Introducing WinSPS

7-39

The input parameters of the function block can be passed with the call in parentheses, separated by commas. The actual parameters are assigned to the formal parameter by means of ":=". The second method of passing parameters is the initialization before the call through a combination of load (LD) and assignment (ST) instructions. With this method, the FB call occurs without parentheses.

Example, method 1: CAL CTU_1 (RESET:=%IX3.6, PV:=Grenze,CU:=_1S2)

Example, method 2: LD ST LDN ST LD ST CAL %IX3.6 CTU_1.RESET Limit CTU_1.PV _1S2 CTU_1.CU CTU_1

Conditional call: CALC, CALCN Conditional FB call depending on the Boolean contents of the working register CR.

CALC Call if TRUE: If the CR contains the value TRUE, the FB (instance) that is specified as operand is called, and the program execution is continued at this point. If, however, the CR contains the value FALSE, no call will be executed. The program execution will be continued at the instruction that follows the call instruction.

CALCN Call if FALSE: If the CR contains the value FALSE, the FB (instance) that is specified as operand is called, and the program execution is continued at this point. If, however, the CR contains the value TRUE, no call will be executed. The program execution will be continued at the instruction that follows the call instruction.

7-40

Introducing WinSPS

Admissible data types: Non-relevant Influencing the CR: Undefined if the call is executed. Unchanged of the program execution is continued with the next instruction.

Example: In the example, the FB instance "CTU_2" will only be called if the Boolean variable "bCounterReset" contains the value "FALSE".

LD bCounterReset CALCN CTU_2 (RESET:=%IX3.2, PV:=Limit,CU:=_5S1)

7.5.14 Call of functions


Admissible data type: Non-relevant Influencing the CR: Further processing. The function causes the CR to store the function value.

Unconditional call Functions are called up directly, i.e. without specifying an operator. The input parameters are directly passed in the call. This means that no conditional calls can be implemented. It is possible to passe the first input parameter from the CR of the last executed instruction without providing any further information.

Example for the use of the CR for the first parameter in a function call: In the example below, the function SHL is called up. The first parameter is passed without assignment with the load instruction (LD) by means of the CR. The second parameter is directly specified in the function call. The function value (return value of the function) is written by the function into the CR. In this manner, the function value can be used immediately after the instruction line of the function call.

LD SHL ST

2#10010110 (* 1st parameter is loaded (into CR) *) 2 (* 2nd parameter in call *) Links (* Function value in CR *)

Introducing WinSPS

7-41

Function value After the function call, the return value of the function (function value) is written into the CR for further processing. Within the called function, the return value is generated by writing the CR to the function name.

Example: ST FUN_Name

Formal parameter Contrary to the ST programming language, formal parameters must never be specified in the call. Here, the order of the input parameters must always be observed.

Example 1: In the example below, the standard function "MID" is called. This function requires three input parameters. The first parameter is written into the CR with the load instruction "LD". The other two parameters are specified after the function calls, separated by commas. Following the function call, the ST instruction is used to assign the function value from the CR to the variable "szNew".

LD MID ST

szString (* String variable *) 3, 2 (* Function call + parameters*) szNew (* CR = Function value *)

Example 2: The following variant shows the same function call but with the difference that all three parameters are directly passed in the call.

MID ST

szString, 3, 2 szNew

7-42

Introducing WinSPS

7.5.15 Return RET, RETC, RETCN


The return instructions cause a return to the calling POU. With the return to a POU, the calling POU is continued at the point of interruption. A return will leave the state of the working register CR unchanged.

Unconditional return: RET The "RET" instruction causes an unconditional return to the calling POU. In the case of functions, the current function value will be written into the CR.

Admissible data types: No operand available Influencing the CR: Return from function block: Leave unchanged. Return from function: The current function value will be written into the CR.

Example: The example below contains an extract from a function or a function block. If the variable "bError" contains the Boolean value FALSE", the program execution will continue from the label M4". If "bError" has the value "TRUE", the return to the calling POU is made. The same example can also be implemented differently by means of a conditional return, see example below.

LD bError JMPCN M4 RET (* unconditional return *) M4:

Conditional return: RETC, RETCN Conditional return depending on the Boolean contents of the working register CR.

RETC Return if TRUE: If the CR contains the value TRUE, the return to the higher-level POU is executed.

Introducing WinSPS

7-43

If, however, the CR contains the value FALSE, no return will occur. The program will be continued with the instruction that follows the return instruction.

RETCN Return if FALSE: If the CR contains the value FALSE, the return to the higher-level POU is executed. If, however, the CR contains the value TRUE, no return will occur. The program will be continued with the instruction that follows the return instruction.

Admissible data types: No operand available Influencing the CR: Leave unchanged. Contrary to the unconditional return "RET", a function will not overwrite the CR with the function value in the case of a conditional jump!

Example: In the following example, the Boolean variable "bError" is evaluated. If "bError" has the value "TRUE", the return to the calling POU is executed. If "bError" has the Boolean value "FALSE", the program execution is continued after the instruction "RETC".

LD RETC

bError

7-44

Introducing WinSPS

7.6 Structured Text (ST)


Structured Text is a textual language which is defined in the IEC 61131-3 standard. Contrary to the low-level IL language, ST is a programming language that uses comprehensive constructs to allow a very compact formulation of the programming task. ST offers the advantage that it allows a clear program structure. The disadvantage of this language is its lower efficiency. The programs are slower and longer. To be able to activate this programming language, it is necessary to specify an ST file in the Presets. All entries made in the ST editor are not written directly into the program module but rather into internal intermediate files and into the ST file. In addition, specific conventions with regard to module and symbol file(s) must be observed (please refer to Creating an ST project ).

7.6.1 Creating an ST project


Before one or multiple ST file(s) are loaded into the controller, the project needs to be created. This can be done with the menu option File, Create new project. If you want to call up ST modules from the classic programming language IL, you will need to create these calls before creating the project! For further information about these calls, please refer to the following help topic: The creation process converts the ASCII lines of the ST file(s) into executable control instructions and enters them into program modules. The ST modules are compiled at the same time. Various symbols of the program are entered into the symbol file. Data modules are created in which all variables are stored. The module names are based on an underlying convention. These reserved modules are automatically created and entered into the symbol file: FCx...n <Name of ST file>.PXO DMx...n DM_x.PXD...DM_n.PXD

Introducing WinSPS

7-45

The x wildcard character defines the lower limit, while n defines the upper limit for the numbering of the modules. Default is the range 512...1024. In the symbol file, the limits can be changed as required by changing the numbers after the keywords Start section and End section, see example below:

Example: ; *** BEGIN ST program module *** ; Start section = 130 ; End section = 600

Any manual changes in the reserved module files will not be fed back into the ST project. These entries will be lost during the next creation process!

7.6.2 Instructions
The following section describes the programming language Structured Text (ST) in detail and illustrates this description with examples. The instruction section of an ST program consists of a series of instructions. In the ST language, instructions are terminated by a semicolon ;. The end of a line is treated like a blank, i.e. it will not separate the instructions. ST uses the following instructions: Description Assignment Branch Keyword := IF Examples a:=5; IF a<b THEN c:=1; ELSIF a>b THEN c:=2; ELSE c:=3; END_IF; CASE n OF 2: p:=4; 3: p:=p+3; 5..10: p:=100-p(p-q) ELSE p:= MAX(a,b); END_CASE; WHILE x > 1 DO y:= y-2; END_WHILE; FOR a:=1 TO 100 BY 2 DO IF a>c THEN b:=a; END_IF; END_FOR;

Multiple choice

CASE

Repeat instruction

WHILE

Repeat instruction

FOR

7-46

Introducing WinSPS

Description Repeat instruction

Keyword REPEAT

Examples REPEAT a:=a+b; UNTIL a<100 END_REPEAT; EXIT; RETURN; RTC(IN:=1, DT#1996-12-31-00:00:00); A:=RTC.Q;

Loop abort Return Function block call

EXIT RETURN FBName( Parameter_1, Parameter_2, Parameter_out);

7.6.3 Expressions and operators


As an instrument of the ST language, expressions and operators offer the possibility to represent operations with various degrees of complexity, which makes them very versatile. Expressions are formed from operators and operands. The table below shows the permitted operators to be used to combine the operands within expressions. The listing is in descending order of processing priority, i. e. the first table entry has the highest priority. If an expression consists of more than one operator, the priority must be observed. Operator () Description Parentheses Function call ** NOT * / MOD + <, >, <=, >= = <> &, AND Exponentiate Negate Complement Multiply Divide Modulo (Residue of a division) Add Subtract Compare Equal Not equal Logic AND Example (2+3)*(4+4) Result: 40 CONCAT('TO','GETHER') Result: 'TOGETHER' 2**3 Result: 8 -12 Result: -12 NOT FALSE Result: TRUE 3*4 Result: 12 12/6 Result: 2 23 MOD 6 Result: 5 3+5 Result: 8 5-7 Result: -2 45>66 Result: FALSE T#34h=T#6d7h Result: FALSE 3<>3 Result: FALSE TRUE AND FALSE Result: FALSE

Introducing WinSPS

7-47

Operator XOR OR

Description Logic Exclusive OR Logic OR

Example TRUE XOR FALSE Result: TRUE TRUE OR FALSE Result: TRUE

7.6.4 Assignment
An assignment passes a variable the result of the evaluation of an expression. The assignment copies the value to the right of the equal sign into the variable on the left side.

Example: Instruction of the type Assignment := (extract from POU) VAR a: INT; b: ARRAY [0..5] OF INT; c: REAL; d: INT; END_VAR a := 5; b[1]:= a**2; d := a; (* Variable a is passed the value 5 *) (* Two assignments in one line *)

d:= REAL_TO_INT( c ); (* Assignment with functioncall *)

The variable on the left side must be of the same type as the currently assigned value. If this is not the case, type conversion functions are available to match the types.

7.6.5 IF instruction
An IF instruction has the following syntax: IF expression THEN Instruction block; ELSIF expression THEN Instruction block; Instruction block is only executed if the condition is met. Executed only if previous expressions are not met and the ELSIF expression is met. This partial instruction may be omitted or repeated as required.

ELSE Instruction block;

Executed only if all previous expressions are not met. The ELSE branch is optional. Terminates the IF instruction.

END_IF;

7-48

Introducing WinSPS

The instruction blocks (= any number of instructions) must be terminated with a semicolon. By nesting the IF-ELSE instructions, the number of choices can theoretically be increased to any value. The disadvantage of multiple nested IF-ELSE instructions is that they become less comprehensible with an increasing nesting depth. Therefore, in some cases it is recommended to use a CASE instruction instead.

Example: The following IF instruction determines the greater of two numbers: IF a>b THEN maximum := a; ELSE maximum := b; END_IF;

Example: The following program is used to check, after determining whether variable a is the greater of the two variables a and b, whether the value of the greater variable is higher than 10. In this example, the variable a is decreased by 1. VAR a: INT :=12; b: INT :=5; END_VAR IF a>b THEN maximum :=a; IF (a>10) THEN a:=a-1; ELSE a:=a+1; END_IF; ELSE maximum :=b; END_IF;

7.6.6 CASE instruction


The CASE instruction is a multiple choice. Depending on the value of the expression which must be of the type INT, the instructions assigned to this value are executed, followed by a return to the first instruction following END_CASE. The instruction(s) is/are executed only if the expression is equal to the specified value of CASE. If the expression does not assume any of the CASE value, the instruction or instruction block that follows ELSE is executed. The ELSE partial instruction is optional. A CASE instruction has the following syntax: CASE expression OF

Introducing WinSPS

7-49

case_value_1: { Instruction case_value_2: { Instruction ... case_value_n: { Instruction [ ELSE instruction block; ] (* END_CASE;

block; } block; } block; } ELSE instruction is optional *)

Example: The CASE instruction evaluates the variable Value and continues with the program execution either with the corresponding CASE branch or the ELSE branch, depending on the content. Since Value has the value 10, Number is incremented by 1. VAR Value : INT:= 10; Number : INT :=2; END_VAR CASE Value OF 10: Number := Number +1; 11: Number := Number -1; ELSE Number := Value; END_CASE;

7.6.7 WHILE loop


The WHILE loop permits to execute instructions repeatedly as long as a specific condition is met. A WHILE loop has the following syntax: WHILE expression DO Instruction block; END_WHILE;

The keyword WHILE is followed by an expression which marks the beginning of the loop. After that, the instructions are specified which are to be executed depending on this condition. The WHILE loop is run in two steps: 1. Verification of the loop condition 2. If loop condition is met, execution of the instruction block. This is repeated as long as the expression is true. If the condition is not met already during the first evaluation, the instructions will not be executed at all.

Example: Since i has been initialized with the value 2, the condition i>0 is true, i. e. the instruction i:=i-1 is executed. The variable i has now the value 1. A new evaluation of the condition i>0 is also true for the new value of i because 1>0. The variable i is again decreased by 1.

7-50

Introducing WinSPS

Now the value of i equals 0, which means that the condition i>0 is no longer true. The loop is terminated and the program continues with the next instruction after END_WHILE. VAR i : INT := 2; END_VAR WHILE i > 0 DO i:=i-1; END_WHILE; All loops (WHILE, FOR, and REPEAT) can be aborted via the keyword EXIT. With nested instructions, the innermost repeat instruction is terminated. EXIT returns to the first instruction that follows the loop.

7.6.8 REPEAT loop


The REPEAT loop verifies the abort condition after each execution of the instruction block. A REPEAT loop has the following syntax: REPEAT Instruction block; UNTIL expression END_REPEAT;

The keyword REPEAT is followed by one or several instruction(s), which is/are executed before the condition Expression after the keyword UNTIL is evaluated. The fact that the loop condition is only evaluated after the execution of the instruction block has the effect that the REPEAT loop is executed at least once.

Example: The variable i has been initialized with the value 0. The REPEAT loop is executed at least once. After the loop has been entered, i is decreased by 1, i. e. i now has the value -1. Only now it is verified whether i is greater than 0. Since i now has the value -1, the REPEAT loop is no longer executed. Although i < 0 is already valid before the entrey into the REPEAT loop, the REPEAT loop is executed once because the condition i > 0 is only verified at the end of the loop execution. VAR i : INT := 0; END_VAR REPEAT i:=i-1; UNTIL i > 0 END_REPEAT;

Introducing WinSPS

7-51

All loops (WHILE, FOR, and REPEAT) can be aborted via the keyword EXIT. With nested instructions, the innermost repeat instruction is terminated. EXIT returns to the first instruction that follows the loop.

7.6.9 FOR loop


The FOR loop is a loop that verifies a condition before the instructions depending on this condition are executed. With the FOR loop, a control variable (which must be integer) must be set to an initial value and then incremented or (in the case of a negative value) decremented by a specific step size after each execution of the loop. The loop will no longer be executed if the final value is reached or exceeded by this incrementation or decrementation. A FOR loop has the following syntax: FOR assignment TO final_value BY step_size DO Instruction block; END_FOR;

Assignment is the control variable that is initialized with a value, final_value is the value up to which the control variable is incremented or decremented by step_size. The instructions in the FOR loop are no longer executed if the value of the control variable is higher or lower, respectively, than the value of final_value.

Execution of the FOR loop: 1. Initialization of the control variable 2. Evaluation of the abort condition and abort, if true 3. Execution of the instruction block 4. Incrementation of the control variable by the step size 5. Go to step 2.

Example: In this example, the control variable Index is initialized with 1 and incremented by 1 (BY 1) with each execution of the loop. This incrementation is continued until the variable Index reaches the value 5. The step size BY 1 can also be omitted because the default step size is 1. VAR Field : ARRAY[1..5] OF INT :=[2,14,8,12,5]; Index : INT; MaxIndex : INT :=5; Maximum : INT :=0; END_VAR

7-52

Introducing WinSPS

FOR Index :=1 TO MaxIndex BY 1 DO IF Field[Index] > Maximum THEN Maximum := Field[Index]; END_IF; END_FOR; All loops (WHILE, FOR, and REPEAT) can be aborted via the keyword EXIT. With nested instructions, the innermost repeat instruction is terminated. EXIT returns to the first instruction that follows the loop.

7.6.10 EXIT instruction


All loops (WHILE, FOR, and REPEAT) can be aborted via the keyword EXIT. With nested instructions, the innermost repeat instruction is terminated. EXIT returns to the first instruction that follows the loop.

Example: As soon as the variable Total in the IF instruction reaches a value greater than 15, the inner FOR loop (which is controlled by the variable column) is aborted, and the program continues with the next instrution after END_FOR. FOR line := 1 TO 10 BY 1 DO FOR column := 1 TO 3 BY 1 DO Total := Total + 1; IF Total > 15 THEN EXIT; END_IF; END_FOR; (*Program execution continues here *) END_FOR;

7.6.11 Calling up function blocks


In ST, a function block (FB) is called up by its name and its formal parameters in parentheses. In this process, the order of these parameters is not significant. These parameters are assigned the value of the actual parameter. It is not necessary to assign a value to all input parameters. The input parameters can also be specified by expressions. If no assignment has been made, the initial value (default) will be assumed, otherwise the previously assigned value.

Example: FB definition with value assigment for output parameters: FUNCTION_BLOCK VAR_INPUT x: INT:=1; END_VAR VAR_OUTPUT y: INT:=4; FB_ABC

Introducing WinSPS

7-53

END_VAR IF (x >2) THEN y :=5; END_IF; END_FUNCTION_BLOCK Declaration of an instance of a function block of type FB_ABC: VAR FBName: FB_ABC; END_VAR Call of the function block FBName of type FB_ABC: FBName(); FBName(x := 3); FBName.x := 2; FBName(); (* FBName.y has the value 4 *) (* FBName.y has the value 5 *) (* FBName.y has the value 4 *)

7.6.12 Calling up functions


Functions are supplied with a list of parameters that are specified in parantheses after the function name, separated by commas. They return the result that is processed in an assignment. A variable can be assigned an expression, e. g. a:= 5+3, as well as the return value of a standard function, e. g.: a :=ADD(5,3). Please observe the following characteristics: In addition to the standard functions according to IEC 61131-3, it is also possible to call up user-defined functions. These differ with respect to their definition. With identical input parameters, a function will always return the same result, i. e. it has no memory as opposed to function blocks.

Example of a user-defined function call: The variable m is assigned the result of the function MAXIMUM(x,y). m:= MAXIMUM(x,y); Function definition: FUNCTION MAXIMUM : INT VAR x, y, z: INT; END_VAR IF x > y THEN z:= x; ELSE z:=y;

7-54

Introducing WinSPS

END_IF; MAXIMUM :=z; END_FUNCTION

7.6.13 RETURN instruction


The RETURN instruction allows an early exit from a function, a function block or a program before the end of the POU is reached. With functions it should be observed that the function value (variable with function name) must be assigned at the time of the RETURN instruction. If output parameters of function blocks are not parametrized with values within the function block, they have the preset values of their data types.

Example: IF a<b THEN RETURN; END_IF;

Introducing WinSPS

7-55

7.7 IEC 61131-3 Standard compliance


The compliance tables according to IEC 61131-3 can be used as checklists to evaluate standard compliance. They show the characteristics of the WinSPS programming system, initially with respect of Instruction List (IEC IL) and Structured Text (ST). The statements apply only to a limited degree or do not apply at all to the classic programming languages IL (Bosch IL), LD, FBD and SFC. The numbering in the tables corresponds to the numbering within the IEC 61131-3 standard. You can find the compliance tables in the manual Programming according to IEC 61131-3 (Order no. 1070 072 305).

7.7.1 Deviations an differences


VAR_IN_OUT Parameters VAR_IN_OUT parameters cannot be initialized for technical reasons. Moreover, it is not possible to call function blocks (FB) without specifying IN/OUt parameters. In both cases, an error message is generated during compilation.

Standard functions ANY_TO_STRING and STRING_TO_ANY The type conversion functions ANY_TO_STRING and STRING_TO_ANY are in preparation. However, no error message is generated if these functions are compiled.

A runtime error would occur in the controller, and the controller would be set to STOP!

Arithmetic standard functions The ST compiler only recognizes the symbolic notation of the arithmetic standard functions. Example: Var1 := Var2 + Var3 + Var4; Var1 := ADD (Var2, Var3, Var4); (* Error-free *) (* Reported as an error *),

Value range of variables The value range of variables is not monitored at runtime, i. e. overrun and underrun is not detected.

7-56

Introducing WinSPS

RETAIN variables All variables are defined as RETAIN (remanent), even if they are not explicitly specified as RETAIN. The initial values are loaded into the controller when the program is loaded. The runtime values are retained each time the controller is switched from STOP to RUN. Exception: The standard function blocks are never RETAIN. This means that they are re-initialized following each STOP - RUN switch-over.

Nested derived data types Nested derived data types, such as arrays of structures, arrays within structures, structures within structures, are in preparation. An error message is generated if such a data type is compiled.

RTC cannot use milliseconds The standard function block for the real-time clock RTC uses a resolution of seconds. Initial values with millisecond content are ignored.

Milliseconds with TOD and DATE_AND_TIME Values after the decimal point are interpreted as decimal digits. TOD#12:12:12.1 means 12 hours 12 minutes 12 seconds and 100 milliseconds.

Introducing WinSPS

7-57

Presets

8-1

8 Presets
In the Presets (main menu), all settings which are associated with specific projects and controllers are made and are retained even if you exit from the program. In addition, the Presets offer functions for software license as well as some additional information. After the WinSPS software has been called up, the system looks for the project path. If a project path has not yet been specified, a dialog box will notify you of this condition, and the current program directory is used as the project path. Click in the following illustration on the area which interests you more:

The preset is divided into various functions (Click on the appropriate button to get more information): License Directories Projects Settings File names and connection to the controller You can access the individual input fields either by mouse click, shortcuts +..., or via and . The input fields already contain names and directory structures proposed by the system. These proposals are suitable for many applications and need not be changed.

8.1 Project structure


After several settings have been made in the Presets, the WinSPS software creates the project structure automatically:

8-2

Presets

The illustration shows that the file directories of the WinSPS are subdivided into several projects. These projects in turn contain controllers which comprise integrated modules. The WORK directories are used to store optimized work files.

8.2 Directories

Project path: After the WinSPS software has been called up, the system looks for the project path. If a project path has not yet been specified, a dialog box will notify you of this condition, and the current program directory is used as the project path. All PLC projects are stored after the path name that you enter here. The project path is the higher-order directory in which all WinSPS projects are stored.

Library path: The Library path determines the directory for shared program modules. Files in this directory can be shared by several projects . If a module is not found in the current ZS directory, the system will try to load the module from the library directory.

Network: You can open a dialog box for the selection of a directory with the buttons . When the option Network is activated, all network drives are displayed in this dialog box. If you do not have to use networked projects, you should deactivate this option to speed up the access.

Presets

8-3

After the settings for the project Presets have been made, the project path can be created with the project directory as well as the library directory.

8.3 Projects

Project name: This name is used to create the project directory with the extension .PRJ. The project directory follows immediately after the project path. It may contain several controllers (even with different types). Use the button New Project to create a new project directory. A dialog box appears.

Controller name: The controller name is the symbolic name of the controller. When you call up the WinSPS software again, you will automatically be in this input field. A dialog box which allows the selection of a new controller, is opened with the button New Controller.

8-4

Presets

After the controller presets have been specified, the controller directory with the ZS directory and SK directory (CL500 only) as well as the WORK directory (for internal optimized work files) can be created.

Dialog box New Project You can create a new project with an affiliated controller in this dialog box. Put in any project- and controller name. Choose the desired controller type from the list. With the option Import modules from another project, you can copy files from any other project to the new project. You can designate the project and the files in another dialog box.

Dialog box New Controller You can create a new controller in this dialog box. Put in any controller name. Choose the desired controller type from the list. With the option Import modules from another project, you can copy files from any other project to the new project. You can designate the project and the files in another dialog box.

Dialog box Import Modules Put in the source directory (complete path name) or search the directory by using the button .

You can copy all files, only program modules, only file modules or only the symbol file and Sequential Function Charts (SFC) from the source directory to the new project. The operation is started with the button Finish.

8.4 Settings

Parameters:

Presets

8-5

The WinSPS software can be customized via function switches. These switches can be entered either in the command line or in the start-up file WINSPS.INI before you start the software. The current function switch settings are displayed in a dialog box.

Author: Here, you can put in the names of the author and the company. They will automatically be put in the head lines (Comments) of the project files.

Dialog box Parameter settings The WinSPS software can be customized via function switches. These switches can be entered either in the command line or in the start-up file WINSPS.INI before you start the software (see below). Most function switches control the active and passive state by capital case and lower case printing, respectively.

Example: /c ; Lower case = deactivated no copyright message while starting /C ; Capital case = activated copyright message appears during start

The following switches are case-sensitive: /A /B /C /D /E /I /L /M /P /T. By calling up the WinSPS software for the first time, the following default settings are made: /A /B /C /D /F4 /I /K59 /T /U1. All other parameters are deactivated. /A Safety requests. A safety request appears whenever you try to save a file. This offers the possibility to cancel any changes you have made while editing. /B Backup files. WinSPS creates backup files (extension: .BAK) in the project directory for safety reasons. /C Copyright message which appears when the WinSPS software is started. /D Duplicate call message. If WinSPS is started more than once, a dialog box will appear. Here you can decide whether you want to switch to an already started WinSPS process or whether you want to start another WinSPS process. /E Direct call of the Editor. The default is skipped. /Fn Determines the number of the opened files to date, that are displayed in the Editor and Monitor in the File menu. 4 files are usually listed (/F4). /G Internal Bosch reservation! /H Internal Bosch reservation! /I The buttons in the toolbar (Icon bar) can be displayed in two different ways: /I The toolbar is displayed continuously (flat style) /i The toolbar is displayed in classic 3D style /Jno System test functions for BOSCH Support for additional checks during reload.

8-6

Presets

These switches should only be used by the BOSCH Support or with its agreement! If you want to set several switches /Jno, you have to summarize the desired numbers and use them as an argument. Example: You want to set the function switches /J2 and /J4 --> 2+4=6 --> Please set /J6. You should not set the switches individually because the WinSPS software can only recognize one function switch /Jno: /J1 Automatic system test; i.e. check of the reference list and the module heads. /J2 Several modules are reloaded with activating as with the load function Load, Entire program without DMs without control stop. /J4 By activating this switch, the loading process is noted in the error log file _WINSPS_.ERR. /Kn Defines the permitted symbol comment length. The default value (/K59 = 59 characters) corresponds to the maximum length in the existing PROFI software. This definition is used to support the interaction with other Bosch software products and different system modules. In addition, it allows to define the error response during the automatic input check: /Kn If the comment length defined by n is exceeded, the automatic error check will detect an error so that no programs can be loaded. /kn If the comment length defined by n is exceeded, the automatic error check will not detect an error but will only issue a warning. It is still possible to load programs. /L Safety mechanism for Language conversion. In this mode, it is only possible to change comments in the module and data module editors. This prevents any inadvertent modification of program or data lines during the manual language conversion of comments. /M Direct call of the Monitor. The main menu is skipped. /N Internal Bosch reservation! /Ono Different options. If you want to set several switches /Ono, you have to summarize the desired numbers and use them as an argument. Example: You want to set the function switches /O1 and /O4 --> 1+4=5 --> Please set /O5. You should not set the switches individually several times because the WinSPS software can only recognize one function switch /Ono: /O1 Priority for the automatic assignment of absolute values. You can influence the automatic assignment prior to loading. Activate this function key if you want to change a symbol name in the symbol file. Usually /O1 is not set. . /O2 According to IEC 1131-3 more than one lower dashes _ are not permissable. By activating this key, a checking process is turned off, so that more than one lower dash in the symbol naming is permitted. /O4 For certain firmware versions of the CL200, CL350, CL400 and CL500: (ZS350-Version < 102, ZS351-Version < 102), (ZS400-Version < 204, ZS401-Version < 204) and (ZS500-Version < 204, ZS501-Version < 202, ZS510-Version < 303) the fixation of the markers in the WinSPS software was locked. The reason for this is that while fixing the markers, an area in the data buffer (DB) has been overwritten simultaneously. To unlock the fixation with the /O4 switch, please be sure that you do not use any data buffer (DB) in your program!

Presets

8-7

/P Stacker display. The stacker display shows the files in one line during execution. If the switch is enabled, file execution is displayed as a listing. /Q Internal Bosch reservation! /R Internal Bosch reservation! /Sno Language version. Due to its integrated multilingual capability, the WinSPS software presents the language which has been selected in Windows. All command lines in the module files are translated into this language. For special purposes such as the language conversion of PROFI projects it is necessary to specify the desired language version: /S0 = German language version (Deutsche Sprache) /S1 = International (english) language version The language setting differs in Windows 95 and Windows NT /T Edit enable function: By specifying the switch /t, the WinSPS software can be converted into a display-only program (e. g. for maintenance staff). In this mode, all editors operate in Read-only mode. /Un Multi-level (Undo/Reundo). In the WinSPS Editor (except for the programming languages LD and FBD), up to 99 text changes are saved. You can scroll through the stored states via the commands Undo/Reundo. The saving of changes can be disabled with the switch /U0 or /u. This results in a somewhat better editing performance and reduced storage requirements on the harddisk. The maximum number of text changes is 99 (/U1 = single-level Undo/Reundo). /V Internal Bosch reservation! /W Internal Bosch reservation! /X Internal Bosch reservation! /Y Internal Bosch reservation! /Z<Project path><Controller status file> Specifies the project path and the controller status file to be activated. This parameter can be used to pre-configure different WinSPS projects. For example, multiple calls using different status data can be arranged.

Switches in the command line The switches described above can be entered in the command line, separated by commas.

Switches in the start-up file Each switch can be written into the start-up file WINSPS.INI. This file must reside in the WinSPS directory (program directory). In case of duplicate entries, the parameters in the command line may overwrite switch settings in the start-up file. A parameter can be entered in each line of the start-up file. This parameter must be the very beginning of each line. Comments can be introduced with a semicolon. Example: ; File: WINSPS.INI /c ;no copyright message at start-up /b ;no backup messages when saving

8-8

Presets

In case of incorrect switches, a warning will be displayed when the WinSPS software is called, and all subsequent switches will be ignored.

8.5 File names and connections to the controller

These are the settings for the most important files of the current controller (with the multiprocessing controller CL500, four register cards exist where each central unit gets its own preset).

Program file: Program module file. This file contains the program instructions. It is edited in the module editor.

Data module: Data module file. Data modules are used to access data in the controller. This file contains the data of one data module and is edited in the data module editor (ASCII format).

Symbol file: The symbol file is used to define symbolic module names and symbolic operand descriptions. It is edited in the symbol editor (ASCII format).

Presets

8-9

Text file: The text editor can be used to create and edit any ASCII text files. You can edit a high-level language C file in the text editor if you put in a highlevel language file name here.

SFC file: If you want to edit your programs in the programming language Sequential function chart (SFC), the special SFC file is necessary. The graphic programming will be done in this file. The sequential chain will be created immediately before loading in the controller. With it, WinSPS creates module files (FC) automatically. You can get further information to the SFC in chapter Programming, section Sequential function chart.

ST file: If you want to create your programs in the programming language StructuredText (ST), the special ST file is necessary. This ASCII text file is used to enter the ST instructions. The user-friendly ST Editor offers you assistance for making the entries. Just before the program is loaded into the controller, the ST project is created. For further information, please refer to chapter Programming, section Structured Text.

All files of these file presets are stored in the current ZS directory. Work files are created in the WORK directories below.

Connection to the PLC: The interface setting determines the parameters for the communication between the programming unit and the controller. For communication over the connection cable K16, K19, the serial interface and the baud rate are selected. The selection window shows all possible combinations of interface channels (Port), Baud rate, Parity check, number of Data and Stop bits, as well as the associated DIP switch setting on the module.

8-10

Presets

If the WinSPS software is installed on a ZAT module, communication can be made over the system bus. If you own a license for the Central Programming (CP), you can make the corresponding preset here. You can get further information regarding the CP in the paragraph of this help with the same name. Communications is also possible via the TCP/UDP/IP Internet protocol. The desired Internet address is entered in a dialog box when calling up the Editor or the Monitor. For the WinPanel control, visualization and simulation software it is possible to establish an internal connection via MMF (Memory Mapped File).

The parameters of the interface can also be determined automatically by clickling on the Test button (see also ). The Editor also contains a corresponding menu item.

8.5.1 TCP/UDP/IP connection set-up and test


This dialog box can be used to enter the data for the connection to the PLC via Internet protocol or to determine them automatically. The controller can be identified with the 4-digit IP address in octet notation or via the computer name (DHCP). Clicking on the Fetch IP address button will retrieve the address for a given name. Clicking on the Fetch name button will retriebe the corresponding DHCP computer name for a given IP address. Confirmation with OK will launch an attempt to establish a connection to the controller via the IP address.

8.6 Buttons in the Presets dialog

8.6.1 Editor
By clicking on this button, you switch into the Editor. The Editor has the following functions: - Editing of program modules in Instruction List (IL), Ladder Diagram (LD), Functional Block Diagram (FBD), or Sequential Function Chart (SFC). - Editing of data modules - Editing of the symbol file - Editing of any text file - Editing of parameter lists with module description - Editing of batch files to process several files - Documentation of individual modules, the entire program, the symbol file or cross-references

Presets

8-11

- Printing of documentation - Comparison of modules or programs between controller and disk - Creation of library modules - Loading and unloading of programs into and from the controller - Loading of transfer protocols for computer modules - Editing of the system configuration for the CL400 and CL500 controllers - Display of information from the controller (info status, reference list)

8.6.2 Monitor
By clicking on this button, you switch into the Monitor. The Monitor offers the following options: Testing of programs Checking of controller and program states Viewing of the I/O state Tracing of module calls Forcing and manipulating of states

For working in the Monitor mode, a connection to the controller is required. This connection is established via a serial port of the computer using connection cable K16, K19 to the controller. The current baud rate is selected in the file presets. You can also make the system perform the settings automatically by selecting the menu function Controller, Interface test. If a connection to the controller cannot be established, please check the interface setting first and then the physical connection between the programming unit and the controller. If a switch-over into the Monitor is not possible due to different module contents, you can use the comparison functions (Editor menu File, Comparison) to determine which parts of the program are not consistent. Before the switch-over to the Monitor is made, the modules are subjected to a check. If a switch-over into the Monitor is not possible due to different module contents, you can use the comparison functions (Editor menu File, Comparison) to determine which parts of the program are not consistent.

8.6.3 Exit
By clicking on this button, you can terminate the WinSPS software and return to Windows. This function corresponds to the menu item File, Exit.

8-12

Presets

8.6.4 License
This dialog box includes all functions for the license management of the WinSPS software. Editor and Monitor can not be called up as long as there is no valid license. The current license status is displayed with the button Show.

Softlicense You can set up a license without additional hardware. Please use the button Apply Softlicense. Alternatively, you can set up a test license (= free, 14 days test license ) with the appropriate button. If you want to copy an already existent license from one computer to another, you can choose between the functions Create Transfer disk, Read Transfer disk, and Export.

Hardlock license Instead of the software license, you may also use a Hardlock which plugs into the parallel port or the USB port or is available as an internal ISA bus card (IntroCard) or PCMCIA card. You can order the Hardlock from Bosch Software Service. A Hardlock can accommodate licenses for WinSPS, WinCAN, WinDP, and WinPanel at the same time. To establish a license, click on the Apply Hardlock License button. Using the function Transfer Softlicense -> Hardlock you can transfer an existing Softlicense into the Hardlock. The license will then only exist in the Hardlock. Before being able to transfer the license, you need to connect the Hardlock to your PC.

Show All current information about controllers and languages for which a license has been made are displayed. If no license has been made yet, this can be performed with the menu function Apply Softlicense or Apply Hardlock license. You can combine different controller packages. See also the telefax order form FaxPLC.doc. As long as no valid license has been obtained, it is not possible to call up the Editor and Monitor. The Management button opens another dialog box which is used to manage the Hardlock licenses.

Hardlock Management This function allows to transfer existing licenses from one Hardlock to another. For this purpose, cascade the two Hardlocks or install the two Hardlocks in the PC or plug them into the appropriate port. Highlight the desired license on the left or right side and transfer the license to the right or to the left by clicking on the respective button.

Presets

8-13

Apply soft license For license purposes, a specific computer keycode is displayed for your computer, which you need to send to Robert Bosch GmbH, e. g. by fax. A prepared fax form is provided in the WinSPS directory in the text file FaxPLC.doc. Please print out this form, fill in your computer keycode and mail or fax it to Robert Bosch GmbH (see menu item Help, Software Service). We will calculate the associated keycode as soon as possible and send it back to you. After the keycode has been entered and the OK button has been pressed, the license check should have the result: Keycode correct. Product has been licensed. This makes the WinSPS software ready to run on your computer. The license can be obtained as a purchased full version or as a free demo version (14 days right to use). The full version can be ordered as a complete version for controllers or as a separate base package and individual controller packages. Moreover, network licences can be purchased for networked computers.

Test License A test license (= free, demo license for 14 days) is set up with this function. The 14 days test license" is valid only once for one PC. Please note also the information for the licensing in the ReadPLC.doc. file. As long as no valid license has been obtained, it is not possible to call up the Editor and Monitor.

Create transfer disk Read transfer disk Export license The functions Import license and Export license can be used to transfer an existing license from one computer to another. Transfer means that you use the license on the second computer while it is lost for the first one. In this process, the license is transferred using a transfer disk, i. e. the license is temporarily contained on a disk. This disk can be a commercial formatted 3 1/2 or 5 1/4 disk. After the license has been transferred, the disk can be reused for other purposes.

The transfer is performed in three steps: 1 The destination computer (which has no license yet) creates a disk using the function Import, Create transfer disk.

8-14

Presets

2 The source computer (which has a license) transfers its license information to the prepared transfer disk using the function: Export. This means that it gives away its license.

3 The destination computer reads the transfer disk using the function: Import, Read transfer disk. This means that it takes over the license information. The transfer disk cannot be used to transfer licenses to other computers. if you need more licenses for other computers, please apply for additional licenses from Robert Bosch GmbH.

This function is used to perform step 1. Select the disk drive and insert an empty disk. Click on the OK button to create the transfer disk.

Direct license transfer The direct license transfer is not supported anymore. A license can only be transferred via the functions Import license and Export license.

Apply Hardlock license Instead of the software license, you may also use a Hardlock which plugs into the parallel port or the USB port or is available as an internal ISA bus card (IntroCard) or PCMCIA card. You can order the Hardlock from Bosch Software Service. A Hardlock can accommodate licenses for WinSPS, WinCAN, WinDP, and WinPanel at the same time. The Editor and Monitor cannot be called up as long as no valid license is present. Before you can apply for the license, you need to connect the Hardlock to your PC. For license purposes, a personal computer keycode is displayed for your computer, which you need to send to Robert Bosch GmbH, e. g. by fax. A prepared fax form is provided in the WinSPS directory in the text file Fax.WRI. Please print out this form, fill in your computer keycode and mail or fax it to Robert Bosch GmbH (see menu item Help, Software Service). We will calculate the associated keycode as soon as possible and send it back to you. After the keycode has been entered and the OK button has been pressed, the license check should have the result: Keycode correct. Product has been licensed. This makes the WinSPS software ready to run on your computer. You may then connect the Hardlock to any PC to make the license available on this PC.

Presets

8-15

8.7 Additional functions by calling-up WinSPS

Dialog box Task List This dialog box is displayed because the WinSPS software has already been started. The WinSPS software can be started more than once. This allows you to edit several files - which can even belong to different projects - simultaneously or view them in the Monitor. Multiple calls of a software are often not intended by unexperienced users. You can select whether you want to bring the already active WinSPS into the foreground or whether you want to start the WinSPS-Software again (multiple calls). You may also choose to suppress this dialog box with the function switch /d.

Editor

9-1

9 Editor
The Editor provides the following functions: - Editing of program modules (and organizational modules) in Instruction List (IL), Ladder Diagram (LD) or Function Block Diagram (FBD) - Editing of SFC files and ST files - Editing of data modules - Editing of the symbol file - Editing of any text file - Editing of parameter lists with module description - Editing of batch files to process several files - Documentation of individual modules, the entire program, the symbol file or the cross-references - Printing of documentation - Comparison of modules or programs between controller and disk - Creation of library modules - Loading and unloading of programs into and from the controller - Loading of transfer protocols for computer modules - Editing of the system configuration for the CL400 and CL500 controllers - Display of information from the controller (Infostatus, reference list)

9.1 Calling up the Editor


The Editor can be called up via the menu function Change, Editor or the Editor button.

Suitable editors are provided for the different file types program module, data module, symbol and text file. The respective editor can be called up via the menu function File... or via the four editor buttons.

The file which has been selected in the Presets is loaded into the corresponding editor. If this file is a new file, it is provided with a comment header and several standard data. You can subsequently modify these data or enter new data.

Revising existing PROFI projects Existing files from the PROFI software are automatically converted into the new WinSPS file format when the editor is called up (except for library files!). The program module and symbol files to be edited must have been created with a PROFI software version 3.0 or later. For older versions, the files need to be converted first using the current version of the PROFI software. Additional information about file conversion is contained in chapter What you should know before you start, paragraph New project structure pp.

9-2

Editor

Language conversion: An Instruction List program which has e. g. been written in German (Anweisungsliste, AWL) will automatically be converted into an English Instruction List program (IL) when the English language set is called up (and vice versa). Simultaneous language conversion and PROFI conversion is not possible!

9.2 Screen layout


The Editor screen is subdivided into the areas of the menu and toolbar, network line, work area, symbol display and status line.

In the work area, you can make inputs for the current file. The menu and toolbar contain the program functions. The network line displays information for the current network. You can suppress the toolbar and the network line with the menu function View, Toolbar or Networks, respectively. The symbol display shows all currently used symbols. The separation line between symbol display and input area can be moved so that you can suppress the symbol display or display it at maximum size. To do this, you can either click directly on the separation line and move the line up or down while holding down the mouse button, or you can move the line with the key combination + or + , respectively. The status line displays current help information and error messages. The status line also contains the current Line and Column position of the writing cursor as well as the program instruction number (PI) and the program rung number (RG). The editor mode Insert or Replace is also displayed (can be toggled with the key ).

Editor

9-3

Operation and keyboard assignment of the Editor are described in chapter Operating Philosophy, paragraph Command selection, pp.

9.3 Program module 9.3.1 Programming languages


Program modules can be displayed and edited in different progarmming languages: 1) IL: The programming language Instruction List consists of a series of instructions (commands) in a low-level programming language. 2) LD: The programming language Ladder Diagram is a graphical combination of binary variables (digital logic operations). The ladder diagram resembles the circuit diagram of earlier relay control systems with contacts and coils. 3) FBD: The Function Block Diagram is a graphical combination of different function elements. In FBD, binary (digital) logic operations as well as timer, counter and comparator functions and program and module jumps can be displayed. All other function elements which cannot be represented are temporarily displayed in IL mode. 4) SFC: The programming language Sequential function chart (SFC) makes the graphic programming of a complex task in clear units possible. The control flow of these parts can be arranged gradually in sequential or parallel processes (also known as sequence cascade programming). To be able to activate this programming language, it is necessary to specify an SFC file in the Presets. 5) ST: The Structured Text is a textual language. Contrary to the lowlevel IL language, ST is a programming language that uses comprehensive constructs to allow a very compact formulation of the programming task. ST offers the advantage that it allows a clear program structure. The disadvantage of this language is its lower efficiency. The programs are slower and longer. To be able to activate this programming language, it is necessary to specify an ST file in the Presets. 6) C: The iCL700 controller also supports high-level language programming in the C programming language. This language allows a very efficient coding of the control task. Programming in C is based on a small amount of instructions and minimum syntax conventions, which permits to implement low-level and highly upgradable programs. C is often difficult to learn for beginners. A C file is edited using the text editor in ASCII format and subsequently compiled.

Detailed information about the programming languages are contained in the Programming section. These programming languages can be activated via the menu function View... or via buttons.

9-4

Editor

When the module editor is called up again, the last activated programming language is preserved.

9.3.2 Networks
Program modules can be subdivided into convenient sections - so-called networks (but not in SFC) - which can be assigned a network comment (=title) each. Networks are numbered in consecutive order. A network consists of one or several program rungs. The network boundaries can only be set at the end of a program rung.

The Function Block Diagram (FBD) requires the networks to be split up for every program rung. If a network contains more than one program rung, it cannot be displayed in FBD mode (example: message in the status line):

Each network is assigned a number and a title. The number is assigned in ascending order, beginning with the number one. The current network is displayed below the toolbar.

In the Module Editor, exactly one network is displayed and edited. The splitting-up of networks can be disabled via the menu item View, Networks. This will not only suppress the network line but will allow to edit more than one network. This makes it possible to add new networks directly or to delete existing networks or even move them. In particular, it is possible to copy or cut out several networks in one block. These special capabilities are detailed in the help for the menu item View, Networks. The menu Edit, Network commands contains all functions for creating and editing networks.

9.3.3 Symbolic operands


Every operand can also be replaced with a symbolic name. In the symbolic notation, the operand is identified by a preceding hyphen ( - ); e. g.:

Editor

9-5

-Input_1

The symbolic operand (symbolic address) is defined via so-called definition lines in the program module or in the symbol file. A symbolic operand can consist of up to 32 characters; the symbol must not contain blanks.

9.3.4 Input checks and symbol assignment


Error ID: The current line is checked following each input, and an error ID may appear in the left-hand margin of the incorrect line. An associated description for the error ID is displayed in the status line:

You can go to the next error line via the menu function Edit, Go to next error line.

Automatic symbol assignment: All symbols in the edited input line are checked immediately. An additional assignment run at the end of the programming session is not necessary. Therefore, all completed files can be directly loaded into the controller unless the files contain error IDs. Exception: The ID > (symbol for absolute operand unknown) does not indicate an error but is merely a warning; loading is still possible in this case. The length and error handling in case that the symbol comment length is exceeded can be preset individually with the function switch /K. The function key /O1 makes it possible to influence the priority of the or

9.4 Symbol file


The symbol file is used to define symbolic module names and symbolic operand names. The editor for the symbol file can be called up via the menu function File, Symbol file or via the Symbol Editor button or - in order to find symbols quickly via the menu function Edit, Go to symbol definition.

After the symbol editor has been called up, a predefined controllerspecific form is displayed which can be tailored to specific requirements. The symbol file is in ASCII format.

9-6

Editor

Layout of the symbol file Module definition: All module definitions must be made together at the beginning of the symbol file! The module definitions can be made in any order. The only exception is OM1 which must be set to the beginning of all module definitions. Symbol lines (<TAB> = separator or ):

Type{,Memory ID} <TAB> Module name <TAB> {Comment} In the symbol line, a (module) type is assigned the module name. This name must be the same as the actual module name. The memory ID R/E is optional (default: R). Example: OM3,I START (* Start-up module *)

Operand definition: Operand definitions can be made in any order! In this way, individual operands can be logically grouped (e. g. sections of a system). Operand <TAB> Symbolic name <TAB> {Comment} The symbolic name can comprise up to 32 characters. Example: I0.0 Switch_1 (* Switch 1 *)

Constant definition: In the symbol file, it is also possible to define globally applicable constants. Value <TAB> Symbolic name <TAB> {Comment} Example: 16#FFFF value *) START_UP_VALUE_MAX (* max. start-up

Editor

9-7

In addition to the symbol lines, the file may contain any number of comment and empty lines. The maximum line length of the file is 255 characters. Editing is made with fixed tab stops of 8. The length and error handling in case that the symbol comment length is exceeded can be preset individually with the function switch /K.

Error ID: The current line is checked after each character input, and an error ID may appear in the left-hand margin of the incorrect line. The description associated with the error ID is displayed in the status line.

9.5 Data module


You can use the data modules to access data in the controller. Data modules in the RAM area of the controller can be modified during program execution. The contents of data modules in the (E)EPROM area can only be read.

The data module editor can be called up via the menu function File, Data module or via the Data Module Editor button.

After the data module editor has been called up, a predefined controlspecific form is displayed which can be tailored to specific requirements. The data module editor can be used to edit one data module. The data module file is in ASCII format. To get more information click on the desired data type in the illustration below.

9-8

Editor

Layout of a data module In the first line of each data module, the data module length is specified via the keyword LENGTH (512 bytes max.). The line with the length specification is followed by the data lines (<TAB> = separator or ): Data address <TAB> Data type <TAB> {Data} <TAB> {Comment} The data address is in the range 0-511 (byte address). The addressing width of the data type can be used to calculate the next data address; e. g. - BOOL 1 byte - BYTE 1 byte

- WORD 2 bytes - INT 2 bytes variable

- STRING

The data addresses may contain blanks but must be specified in ascending order. Data types with a data width of 8 bits maximum (BOOL, BYTE, SINT, USINT) can also be set to odd data word addresses. The actual data are entered either as a numeric literal or as an ASCII string. The specification is optional (default). Blanks and non-initialized values in data modules are filled with zeros ($00 for string variables) during loading. The notation conforms to the IEC 1131-3 standard. In addition to the data lines, the file may contain any number of comment and empty lines. The maximum line length of the file is limited to 255 characters. Editing is made with fixed tab stops of 8.

Error ID: The current line is checked after each character input, and an error ID may appear in the left-hand margin of the incorrect line. The description associated with the error ID is displayed in the status line.

9.6 Text file


The editor for the text file can be called up via the menu function File, Text file or via the text editor button.

The text editor can be used to create and edit so-called ASCII text files. This can e. g. be used to view and revise print files. All ASCII characters which are not provided directly on the keyboard of the programming unit can be entered by using the keys of the numeric keypad together with the key . Eample:

Editor

9-9

You want to enter the character {. The decimal code of the ASCII character is 123. Hold down the key and use the numeric keypad to enter the decimal code 123. Release the key; the character { is inserted.

9.7 Batch file


A batch file can be used to group user-defined program and/or data modules. These groups can subsequently be used for the processing of several files, such as the creation of printer outputs, loading etc. Such groups are directly created in the editing function via the call Create batch file.

9.8 Documentation 9.8.1 Printing of files


To create WinSPS documents, three functions are available for the respective data types program module, symbol and data module file (print file SK.TXT is created automatically when the SK table is edited for the CL400 and CL500 controllers). Different print parameters can be set for these functions to match the documents to specific requirements. Moreover, the print layout and control sequences can be used to specify the format and layout of documents. Documentations are created by performing the steps below in the indicated sequence: 1 2 3 4 5 Control sequences in the program module file Layout and format parameters (header, if used) Set print parameters via the dialog box of the respective print function Select and set-up printer Output to printer or into print file

Detailed descriptions of the individual parameters are contained in the help for the respective dialog box.

9-10

Editor

9.8.2 Print layout


Specifications for the printing of files in WinSPS-Software are determined via the function 'Print Layout'. For example, any text file can be selected as a header file. This file will then be inserted into each print page when the print documents are created. So-called keywords can be inserted into a header file which can be replaced with the corresponding texts when the print file is created:

Keyword &V &D &T &P &S &F &C &N

Meaning/Text Version (e. g. Version 1.0) Date (09/04/96) Time (08:15:20) Page number Controller name /Module Filename Controller type (e. g. CL500) Project name

Length 20 10 15 6 18 9 9 9

The length in the table specifies how many characters are required for the entry. Please take care to insert a corresponding number of blanks so that relevant test in the line will not be overwritten. A control file can be used to specify start and end sequences for a printer. A footnote (bottom line), that contains general project data, can be affixed to every page to be printed. In addition, different layouts and character sets can be specified. Any change in the print layout will only be effective for all subsequently created print files or cross-reference lists. It does not affect existing files. To print illustrations (e.g. LD, FBD, SFC), some printer models (e.g. Hewlett Packard Laserjet) have to be activated with the option 'Print TrueType as graphic' at the 'Font style/type' setting. This setting is done in the dialog box of the printer (Windows 'Settings', 'Printer').

9.8.3 Control sequences in the module file


So-called control sequences can be used in the program module file in order to obtain a specific appearance of the printed text. They must be placed at the beginning of a line with a preceding semicolon (comment ID). Example: ;$P The following control sequences are available: Sequence ;$IL ;$LD Meaning/Function Instruction List programming language Ladder Diagram programming language

Editor

9-11

Sequence ;$FBD ;$PR+ ;$PR;$SK+ ;$SK;$SUZ+ ;$SUZ;$SBW+ ;$SBW;$SYM ;$ABS ;$80 ;$132 ;$P ;$NOLIST ;$LIST ;$NL+ ;$NL;$NZ+ ;$NZ;$XNW ;$1NW ;$PL+ ;$PL;$ZK+ ;$ZK-

Meaning/Function Function Block Diagram programming language Print program rung number Do not print program rung number List including symbol comment List without symbol comment Symbol and line comments Symbol comment in line Symbol comment Byte/Word address On Symbol comment Byte/Word address Off Symbolic operands Absolute operands 80 characters per line 132 characters per line Page feed Halt print for current module Resume print for current module Start with network overview Without network overview Show title of network Hide title of network More than one network per page One network per page Show parameters list Hide parameter list Show line comments Hide line comments

Any change in the printer set-up will only be effective for all subsequently created print files or cross-reference lists. It does not affect existing files.

9.8.4 Cross-reference list


A cross reference lists which operand has been programmed in which module and in which command line (instruction line). The following is displayed for each operand: absolute and symbolic operand name symbolic name of the module in which the access takes place line number and program instruction of the access differentiation between read and write accesses list of (un)used I/O/M-Bit operands list of the symbolic and absolute bit operands

To track missing symbols or symbol comments, the finished crossreference list includes special characters, too. The character @ is used when no symbol has been assigned to an operand. The symbol $ is used when no symbol comment has been assigned to an operand. So, for example, you can look out for the character @ with the function Search to calculate all operands with no existing symbol one by one.

9-12

Editor

9.9 Stacker - Processing log


The Stacker window is used as a processing log for WinSPS functions which process several files. The following functions use the Stacker window to log files: Comparison functions between file and controller Functions for the printing of files Functions for the creation of cross-reference lists Loading and unloading functions

The Stacker window shows the total number of files to be processed, how many of them have already been processed and which of them have errors. All files to be processed are displayed with a processing result. The Stacker window contains a Go to button which can be used to open and edit an incorrect file. The last displayed processing log (Stacker window) which has been used by a function to produce a listing of incorrect files can be displayed once more via the menu item Edit, Last Stacker result. The processed files of the Stacker display can be viewed in one line or as a listing. The selection can be made via the function switch /P.

9.10 Connection to the PLC


The loading process, several comparison functions, the Monitor etc. require a connection to the controller. This connection is established via a serial port of the computer using connection cable K16, K19 to the controller. The current baud rate is selected in the file presets. You can also make the system perform the settings automatically by selecting the menu function Controller, Interface test. If a connection to the controller cannot be established, please check the interface setting and the physical connection between the programming unit and the controller.

Editor

9-13

If the WinSPS software is installed on a ZAT module, communication can be made over the system bus. If you own a license for the Central Programming (CP), you can connect up to 124 controllers simultaneously with the programming unit. You can get further information regarding the CP in the paragraph of this help with the same name.

9.11 Comparison
It is possible to compare modules on the harddisk with other modules on disk or in the controller. Various comparison functions for program and data modules are available: - Comparison of the entire program - Comparison of all or a single program module(s) - Comparison of a data module In case of inconsistent modules or module contents, the incorrect files or file contents, respectively, are listed. You can then directly correct the files. For comparisons with modules in the controller, a connection to the controller must be established. Detailed descriptions of the various comparison functions are contained in the help for the respective function (menu File, Comparison).

9.12 Load program


The function Control, Load is used to load the programs or individual modules into the controller. All available loading settings can be made in a dialog box. For the CL400 or CL500, you will have to make entries in the SK table first by using the function Control, System coordinator.

9.13 Changing to the Monitor


The Monitor can be called up via the menu function Change, Monitor or the Monitor button.

The Monitor offers the following options: Testing of programs Checking of controller and program states Viewing of the I/O state Tracing of module calls Forcing and manipulation of states

9-14

Editor

The modules are checked before the Monitor is activated. If a switch-over into the Monitor is not possible due to inconsistent module contents, you can use the comparison functions (menu File, Comparison) to determine which parts of the program are not consistent. A variation of the Monitor call is a combination with the loading process. This function is activated via the menu function Change, Load + Monitor or via the corresponding button.

Here, the loading process for the program module or data module file is activated before the switch-over to the Monitor occurs. The controller is not stopped. This procedure is the best solution for making changes to a program with the system running and checking them afterwards.

Installation

10-1

10 Editor Menu functions

10.1 File Menu


This menu groups all functions which can be applied to files (e. g. opening, saving, insertion, printing and comparison). In addition, it allows to switch between the different editors for modules, data modules, symbol and text).

10.1.1 New/Open
This function can be used to create a new file or change the current file. Only files of the current filetype can be opened. For example, if you are in the symbol editor, you can only open symbol files. The drive and directory has been specified in the Presets and cannot be changed. This is also true for the current file type. By using the "Read-only" option, you can write protect the file, which means that changes in the file cannot be saved. A fast change of files can also be made by using the file selector box in the toolbar.

Dialog box File Open This dialog box allows you to switch the current file. The drive and directory are determined by the current Presets in the main menu and cannot be changed. This is also true for the current file type. This means, if you are e. g. in the symbol editor, you can only open symbol files. When entering the filename, you need not specify the file type. By using the Read-only option you can write protect the file so that changes in the file cannot be saved. The Network button is irrelevant because only the current ZS directory will be processed. A fast change of files can also be made by using the file selector box in the toolbar.

10.1.2 Save
This function saves the currently displayed file.

10.1.3 Save as
This function can be used to save the currently edited file under a different filename.

Dialog box Save As This dialog box allows you to save the currently edited file under a different filename. This also offers the possibility to save the file in a directory which is not the current ZS directory, or even under a different drive.

10-2

Installation

When entering the filename, you need not specify the file type.

10.1.4 Save all


This function saves all opened files in all editors (module, data module, symbol and text).

10.1.5 Insert file


This function allows to insert any other file into the currently displayed file at the writing cursor position.

Dialog box Insert File This dialog box allows to insert any other file into the currently displayed file at the writing cursor position. This allows to assemble a new module from existing modules. If an area has been marked before in the currently displayed file, this area will be overwritten with the contents of the clipboard. If the file to be inserted is a program module file, all special control characters will be removed from this file so that the file can easily be inserted into a text file or another program module file. If the file which has to be inserted is a Sequential function chart, you can insert it in the SFC directory, if the cursor is placed on an index field.

10.1.6 Import symbols


This function allows you to insert symbols from any file (e. g. files from CAE systems like E-Plan and Ruplan) into the current symbol file. In this process, it is checked if the symbols already exist. You can then decide for each individual case whether you want to overwrite the symbol or not. This command is only available in the symbol editor!

Dialog box Import Symbols This dialog box allows you to insert symbols from any file (e. g. files from CAE systems like E-Plan and Ruplan) into the current symbol file. In this process, it is checked if the symbols already exist. You can then decide for each individual case whether you want to overwrite the symbol or not.

10.1.7 Compile module (ST)


This function is used to compile the currently displayed ST file. Any detected errors are displayed in the error display. For more information, refer to the Help for the error display:

Please observe that all entries must be completed and the ST file must be stored before compilation.

Installation

10-3

Shortcuts: Toolbar: Keyboard: + +

10.1.8 Check
This function checks the currently displayed file. If the system detects an error, an error ID is set in the first column of the corresponding line. The writing cursor is positioned in the first line which contains an error. An error description is displayed in the status line. You can edit each error with the function Edit, Jump to next error line.

10.1.9 Create new project


This function serves a dual purpose. It can be used to: 1) revise existing files from the PROFI software. 2) check (i. e. symbol assignment, parameters, language conversion if required) of all program modules which are specified in the symbol file.

re 1) If you call up this function, the WinSPS software will automatically recognize whether the current project contains old files of the PROFI software so that these files can be revised. The files must have been created with version 3.0 (or later) of the PROFI software. Step 2) is then executed: re 2) If the current module files have been created with the WinSPS software, no revision will take place. During project generation, all module files which are specified in the preset symbol file will be checked. All symbols will be checked so that symbol changes in the symbol file which have been made after the generation of the module files will be matched (assignment). In addition, the number of parameters for all instructions containing module calls will be checked. Module calls without parameters will also be checked. If an error is detected, a Stacker window with an error description will be displayed. Project generation corresponds to the two check options with symbol assignment and with parameter check of the load function (menu Control, Load). This means that the Create new project function can be used to make a check even before the loading process takes place.

10.1.10 Generate file for download


This function can be used to generate a so-called download file for selected controllers. This creates a loadable file with the name of the current symbol file and the file extension *.FXF. This file can be loaded into the controller with the Dekos Development Kit.

10-4

Installation

10.1.11 Compare entire program on disk with the PLC


This comparison function works on the entries of the reference list in the controller. All modules which are listed there are compared with the contents of the controller. This includes data modules so that changes in the associated data fields can be detected. In case of inconsistent modules or module contents, the incorrect files are listed. You can then directly correct these files. The comparison requires a connection to the controller. If the connection cannot be established, please check the interface setting and the physical connection between the programming unit and the PLC.

10.1.12 Compare all program modules on disk with the PLC


This comparison works on the entries of the reference list in the controller. All program modules which are listed there are compared with the corresponding files on disk. Data modules are not compared, i. e. changes in the associated data fields are not detected. In case of inconsistent modules or module contents, the incorrect files are listed. You can then directly correct these files. The comparison requires a connection to the controller. If the connection cannot be established, please check the interface setting and the physical connection between the programming unit and the PLC.

10.1.13 Compare one program module on disk with the PLC


For this comparison, one program module file is selected in a dialog box. This file is then compared with the corresponding module in the controller. The comparison requires a connection to the controller. If the connection cannot be established, please check the interface setting and the physical connection between the programming unit and the PLC.

Dialog box Compare program module on disk with the PLC

This dialog box allows you to select a program module file. This file is then compared with the corresponding module in the controller. During the comparison process, you can view the processing directly in a listing of all program instructions in IL. You can then directly correct the file. Since the program module is directly displayed during the comparison process, it is not possible to compare protected library modules. The comparison requires a connection to the controller. If the connection cannot be established, please check the interface setting and the physical connection between the programming unit and the PLC.

Dialog box Result of comparison of program module on disk with the PLC

Installation

10-5

In this dialog box, the comparison process is logged. The left part displays the program instructions (IL) of the Module on disk while the right part contains Module in PLC. A highlighting bar over a program instruction indicates the current comparison position of the two modules. If a difference is detected, the comparison will stop. The comparison can be continued with the Continue button, and the Cancel button allows you to terminate the comparison before it is completed. If you want to edit the error in the module, use the Go to button to terminate the comparison and go directly into the module. If all program instructions are consistent between the compared modules, this result is displayed, and the comparison can be terminated with the Close button.

10.1.14 Compare two program modules on disk


For this comparison, you can select two program module files in a dialog box. The reference file can also be selected in a different directory than the current ZS directory, or even on a different drive. This comparison does not require a connection with the controller.

Dialog box Compare two program modules on disk

In this dialog box, two program module files to be compared can be selected. The reference file can also be selected in a different directory than the current ZS directory, or even on a different drive. To facilitate the module search, another dialog box can be opened via the Find file button. If the file contents are inconsistent, an error message will appear. This comparison does not require a connection with the controller.

Dialog box Result of comparison of two program modules on disk

In this dialog box, the comparison process is logged. The left part displays the program instructions (IL) of the module while the right part contains the reference module. A highlighting bar over a program instruction indicates the current comparison position of the two modules. If a difference is detected, the comparison will stop. The comparison can be continued with the Continue button, and the Cancel button allows you to terminate the comparison before it is completed. If you want to edit the error in the module, use the Go to button to terminate the comparison and go directly into the module. If all program instructions are consistent between the compared modules, this result is displayed, and the comparison can be terminated with the Close button.

10-6

Installation

10.1.15 Compare one data module on disk with the PLC


For this comparison, one data module file can be selected in a dialog box. This file will then be compared with the corresponding data module in the controller. The comparison requires a connection to the controller. If the connection cannot be established, please check the interface setting and the physical connection between the programming unit and the PLC.

Dialog box Compare data module on disk with the PLC

This dialog box allows you to select a data module file. This file will then be compared with the corresponding module in the controller.

During the comparison, you can view the processing directly in a listing of all data. You can then directly correct the file. The comparison requires a connection to the controller. If the connection cannot be established, please check the interface setting and the physical connection between the programming unit and the PLC.

Dialog box Result of comparison of a data module on disk with the PLC

In this dialog box, the comparison process is logged. The left part displays the data lines of the Module on disk while the right part contains those of the Module in PLC. A highlighting bar over a data line indicates the current comparison position of the two modules. If a difference is detected, the comparison will stop. The comparison can be continued with the Continue button, and the Cancel button allows you to terminate the comparison before it is completed. If you want to edit the error in the module, use the Go to button to terminate the comparison and go directly into the module. If all data lines are consistent between the compared modules, this result is displayed, and the comparison can be terminated with the Close button.

10.1.16 Compare two data modules on disk


For this comparison, you can select two data module files in a dialog box. The reference file can also be selected in a different directory than the current ZS directory, or even on a different drive. This comparison does not require a connection with the controller.

Dialog box Compare two data modules on disk In this dialog box, two data module files to be compared can be selected.

Installation

10-7

The reference file can also be selected in a different directory than the current ZS directory, or even on a different drive. To facilitate the module search, another dialog box can be opened via the Find file button. If the file contents are inconsistent, an error message will appear. This comparison does not require a connection with the controller.

Dialog box Result of comparison of two data modules on disk

In this dialog box, the comparison process is logged. The left part displays the data lines of the module while the right part contains those of the reference module. A highlighting bar over a data line indicates the current comparison position of the two modules. If a difference is detected, the comparison will stop. The comparison can be continued with the Continue button, and the Cancel button allows you to terminate the comparison before it is completed. If you want to edit the error in the module, use the Go to button to terminate the comparison and go directly into the module. If all data lines are consistent between the compared modules, this result is displayed, and the comparison can be terminated with the Close button.

10.1.17 Compile C module


This function allows to compile (translate) a module which is written in the C high-level language, resulting in an exectutable, loadable program module (*.PXH). The high-level language is supported ba the PLCs PCL and ICL700. The source for the C instructions is an ASCII text file with the extension *.C. High-level language programming is not a part of the WinSPS basic package, i.e. a separate license must be obtained to use this feature. The following development packages are required and need to be installed for high-level language programming: 1. WinSPS including a HLL license (Order No. 1070 077 925) 2. GNU-HLL tools for C (Order No. 1070 081 424) 3. High-level language library for PCL (Order No. 1070 081 428) or for ICL700 (Order No. 1070 081 428)

10.1.18 Create C library module


This function consolidates modules which are written and compiled in C (*.PXH) into a module library. A dialog box allows to make entries for the modules and their assignment to organization modules. The high-level language is supported by the PLCs PCL and ICL700.

10-8

Installation

High-level language programming is not a part of the WinSPS basic package, i.e. a separate license must be obtained to use this feature. The following development packages are required and need to be installed for high-level language programming: 1. WinSPS including a HLL license (Order No. 1070 077 925) 2. GNU-HLL tools for C (Order No. 1070 081 424) 3. High-level language library for PCL (Order No. 1070 081 428) or for ICL700 (Order No. 1070 081 428)

Dialog box Assign library module to OM

This dialog box is used to assign modules which are written and compiled in the C high-level language (*.PXH) to organization modules and consolidated in a module library. In the PLCs PCL or ILC700, high-level language library modules are referenced via organization modules (OMs). In the list, enter the name of the HLL module without extension for the desired OM. You may assign up to three files to each OB. This allows you to include several modules per OM in the generation, e.g. for testing your program. After all, the entry in the symbol file determines which module is accessed. The example in the illustration below explains this relationship: Assignment:

Entry in symbol file: OM51,R OM52,R OM53,R TEST2 MAIN SUB2

In this example, 6 modules are created as library modules, but the program only accesses the modules TEST2, MAIN, and SUB2. A different module can be accessed by modifying an entry in the symbol file and loading the symbol file, without having to recreate the module library.

The organization modules OM48, 49 and 50 should not be used because they are reserved for Bosch library modules.

Installation

10-9

10.1.19 Print program module file


This function can be used to print one or more program module file(s). A dialog box is displayed in which you can make additional settings.

Dialog box Print program module This dialog box allows you to make the settings for the printing of program module files:

Module If the option current program module is selected, only the current program module file will be printed. If the option from symbol file is selected, all program modules which are listed in the symbol file will be printed. With the option from batch file, all program modules which are listed in the batch file will be printed. This is a suitable option to print a selection of program modules. The batch file can be selected in the adjacent selector box. The Set up button calls up another dialog box which allows you to edit the selected batch file.

Print in file This is used to specify an ASCII text file to be used as a print file. You can subsequently edit the file in the text editor and then print it (e. g. via the Windows function Execute: PRINT LIST.TXT or COPY LIST.TXT LPT1). If you do not activate this function, the selected printer will be used. If you exit from the dialog box by pressing the OK button, the print file is created or the printing process is started, respectively.

Networks Each program module can be preceded by a Network overview as a table of contents. At the beginning of a network, the associated Network title can be printed. In order to reduce the size of the print file, you can disable the option One network per page so that several networks are printed on one page.

Parameter list For parametrized program modules it is possible to print a description of the pass parameters.

Representation This allows you to select the programming language for the print file: Instruction List, Ladder Diagram or Function Block Diagram. To print illustrations (e.g. LD, FBD, SFC), some printer models (e.g. Hewlett Packard Laserjet) have to be activated with the option 'Print TrueType as graphic' at the 'Font style/type' setting. This setting is done in the dialog box of the printer (Windows 'Settings', 'Printer').

10-10 Installation

Layout With the option Output RG number, you can add the current RG number before each new program rung. In the command lines, the Operands can be displayed either symbolic or absolute, and the Line comment can be suppressed if required.

Symbol comment The option with symbol comment means that the symbol comment is printed for bit operands. Additionally, the symbol comment can also printed with byte or word operands. If you activate the option 'Line comment' and print 'with symbol comment', the command line will be overwritten. If you choose the option end of page, symbol comments and line comments will be printed. When the SK Table (menu item Control, System Coordinator) is edited for CL400 or CL500 controllers, a text file SK.TXT will automatically be created. This file should be included in the printout for a full documentation of the project. Additional print options - such as page size, header and control file etc. can be set via the menu function File, Printer set-up.

10.1.20 Print data module file


This function can be used to print one or more data module file(s). A dialog box is displayed in which you can make additional settings.

Dialog box Print data module This dialog box allows you to make the settings for the printing of data modules:

Module If the option current data module is selected, only the current data module file will be printed If the option from symbol file is selected, all data modules which are listed in the symbol file will be printed. With the option from batch file, all data modules which are listed in the batch file will be printed. This is a suitable option to print a selection of data modules. The batch file can be selected in the adjacent selector box. The Set up button calls up another dialog box which allows you to edit the selected batch file.

Layout The Line comment in the data module can be suppressed if required.

Print in file This is used to specify an ASCII text file to be used as a print file. You can subsequently edit the file in the text editor and then print it (e. g. via the Windows function Execute: PRINT LIST.TXT or COPY LIST.TXT LPT1). If you do not activate this function, the selected printer will be used.

Installation 10-11

If you exit from the dialog box by pressing the OK button, the print file is created or the printing process is started, respectively. Additional print options - such as page size, header and control file etc. can be set via the menu function File, Printer set-up.

10.1.21 Print symbol file


This function is used to print the symbol file. A dialog box is displayed in which you can make additional settings.

Dialog box Print symbol file This dialog box allows you to make the settings for the print file for the output of the current symbol file.

Print in file This is used to specify an ASCII text file to be used as a print file. You can subsequently edit the file in the text editor and then print it (e. g. via the Windows function Execute: PRINT LIST.TXT or COPY LIST.TXT LPT1). If you do not activate this function, the selected printer will be used. If you exit from the dialog box by pressing the OK button, the print file is created or the printing process is started, respectively. Additional print options - such as page size, header and control file etc. can be set via the menu function File, Printer set-up.

10.1.22 Print Sequential function chart


With this function, you can print the Sequential function chart file. Here, the current position decides on the printing process:

Positions: - Table of contents - Sequence level - Automatic branch (MADAP) - Manual branch (MADAP)

Example: You are on the sequence level in the automatic branch. If you now activate the function Print, Sequential function chart, Print all, all sequences (and swap-outs) of the automatic branch are printed. With the function Print Content element, only the current sequence or the current sequence description is printed. With Print All, all sequences or the complete directory are printed depending on the position. You can insert manual page breaks at different positions of the sequence, so that a formatted version on the printer is possible (menu function Edit, Insert pagination).

10-12 Installation

Additional print options - such as page numbers, page size, header and control file etc. - can be set via the menu function File, Printer set-up. To print illustrations (e.g. LD, FBD, SFC), some printer models (e.g. Hewlett Packard Laserjet) have to be activated with the option 'Print TrueType as graphic' at the 'Font style/type' setting. This setting is done in the dialog box of the printer (Windows 'Settings', 'Printer').

10.1.23 Print layout


A dialog box allows you to make various settings for the printout of WinSPS files.

Installation 10-13

Dialog box Print layout In this dialog box, all global settings for the printing of files of the WinSPS software anf for the creation of cross-reference lists are made:

Document info The header file can be any ASCII file. The file will appear as a header on every printed page. If no header file is to be used, you can exit from the input field without making any entry. In this case, default header lines will be inserted. The header file must be in the current ZS directory. Format of header file: The control file in ASCII format contains the printer start and end sequences. The WinSPS software will insert these sequences into every created print file. If no printer sequences are to be used, you can leave this input field without making an entry. The control file must be in the same directory as the WinSPS software. The file must be of the .ESC file type and be structured as follows: The area of the start or end sequences is introduced by the keyword [START] or [END], respectively. The control sequence is written in one line and consists of two hexadecimal numbers each which are separated by a comma. It is not permitted to use embedded separators such as <TAB> or <blank>. Incorrect control files are rejected during printing, and an error message is displayed. Example of a control file [START] 1B,54,38,45 [END] 1B,55,45,1B,32

Line info This is used to specify the format of the print file (80 or 132 characters per line).

Character set The character set can be selected for the connected printer. You can choose between the 8-bit IBM compatible character set, the 8-bit ANSI character set used by Windows, and the 7-bit US-ASCII character set. Block graphic characters and "Umlaute" are converted into characters of the selected character set during printing.

Page info This is used to specify a number of lines per page.

Bottom lines of the print page A footnote (bottom line), that contains general project data, can be affixed to every page to be printed (see diagram). This footnote does not appear while printing in a file (go to: Printing Functions).

10-14 Installation

You can print out a copyright statement containing your own company details. In addition, you can predetermine general titles, an author and an instruction number. All other fields in the footnote are already predetermined and cannot be changed. Any change in the print layout will only be effective for all subsequently created print files or cross-reference lists. It does not affect existing files.

10.1.24 Cross-reference
A cross-reference lists which operand has been programmed in which module and in which command line (instruction line). The following is displayed for each operand: absolute and symbolic operand name symbolic name of the module in which the access takes place line number and program instruction of the access differentiation between read and write accesses

Settings for the creation of the cross-reference list are made in a dialog box.

Dialog box Create cross-reference This dialog box allows you to make settings for the creation of crossreference lists:

Module If the option current module is selected, only the current program or data module file will be included in the cross-reference. If the option from symbol file is selected, all program and data modules which are listed in the symbol file are included in the cross-reference. With the option from batch file, all program and data modules which are listed in the batch file will be included in the cross-reference. This is a suitable option to use a selection of modules. The batch file can be selected in the adjacent selector box. The Set-up button calls up another dialog box which allows you to edit the selected batch file.

Cross-reference file This is used to specify an ASCII text file which is to be used as a crossreference file. It is assigned the fixed file type .QV. The cross-reference file can then be printed out (e. g. via the Windows function Execute: PRINT CROSS.QV or COPY CROSS.QV LPT1) or edited in the text editor. The cross-reference file will be created when you exit from the dialog box with the OK button.

Installation 10-15

Operands This is used to select whether all operands or a single operand shall be included in the cross-reference. A single operand can be specified in the input field in absolute or symbolic form (with a leading hyphen!). Furthermore, you can add a comprehensive Configuration list into the cross-reference. This list shows in tabular form the operands which you have access to either/or by reading/writing or not at all.

Sort You can sort the cross-reference lost to absolute or symbolic operands. To track missing symbols or symbol comments, the finished crossreference list includes special characters, too. The character @ is used when no symbol has been assigned to an operand. The symbol $ is used when no symbol comment has been assigned to an operand. So, for example, you can look out for the character @ with the function Search to calculate all operands with no existing symbol one by one. When the SK Table (menu item Control, System Coordinator) is edited for CL400 or CL500 controllers, a text file SK.TXT will automatically be created. This file should be included in the printout for a full documentation of the project. Additional print options for the cross-reference file - such as page size, header and control file etc. - can be set via the menu function File, Printer set-up.

10.1.25 Create sequence


Before the loading of a SFC file into the controller, the sequence must be generated. It can be adjusted immediately before loading in the load dialog box. You can also create intermediately, for example to check your inputs. During the creating process, the sequences are changed into IL instructions and inserted into program modules. Different symbols of the sequence are inserted into the symbol file. In a dialog box, further inputs can be done and the creation can be started.

Dialog box Create sequence Before the loading of a SFC file into the controller, the sequence must be generated. It can be adjusted immediately before loading in the load dialog box. You can also create intermediately, for example to check your inputs. During the creating process, the sequences are changed into IL instructions and inserted into program modules. Different symbols of the sequence are inserted into the symbol file.

Options The option Command output in extra module is only possible in the programming type step marker technique. By selecting this option, the program module AUSGABE.PXO is produced additionally. It collects all step actions which influence the output. With the option Create cascade call in OM1 you can choose that all module calls which are necessary for the sequence, are automatically inserted into the organization module OM1. OM1 will be overwritten.

10-16 Installation

The project will be created before the creation of the sequence, if you activate the option with Rebuild all. You can get further information in the appropriate chapter. The controller CL200 additionally produces the binary conditions Logical 0 and Logical 1. They will be illustrated on the reserved markers M0.0 (LOG0) and M0.1 (-LOG1). These conditions are already realized in all other controllers via special markers.

Programming type The programming type MADAP or step marker technique is chosen via the menu function Toolbox, Inputs.

Memory ID R/E in the symbol file (CL200 only) Some program and data modules are registered automatically with the creation. Here, you can determine which Memory ID will be assigned to the files. With the combination RAM/EPROM, the program modules get the ID EPROM and the data modules get the ID RAM. Please remember that the Memory IDs can only be assigned for those files which have been added to the symbol file. Example: After the creation with the option EPROM, you have to change the ID E in the symbol file for OB1 manually.

10.1.26 Change to module editor


This function is used to change to the current program module file in the module editor. The WinSPS software retains the file of the previously activated editor in the memory so that any changes are preserved. When you exit from the editors, a safety prompt is displayed for all modified files. When you change from the symbol editor to the module editor, all symbols will be updated (assignment of new, deleted and modified symbols).

10.1.27 Change to data module editor


This button can be used to switch to the current data module file in the data module editor. The WinSPS software retains the file of the previously activated editor in the memory so that any changes are preserved. When you exit from the editors, a safety prompt is displayed for all modified files.

10.1.28 Change to symbol editor


This function is used to change to the current symbol file in the symbol editor. The WinSPS software retains the file of the previously activated editor in the memory so that any changes are preserved. When you exit from the editors, a safety prompt is displayed for all modified files. If you leave the symbol editor (change into the module, data module or text editor), the symbol file will be checked. If an error is detected, a warning will be displayed.

Installation 10-17

10.1.29 Change to text editor


This function is used to change to the current text file in the text editor. The WinSPS software retains the file of the previously activated editor in the memory so that any changes are preserved. When you exit from the editors, a safety prompt is displayed for all modified files.

10.1.30 Properties
This function can be used to display additional data about the current program module, data module or symbol file: - Name and comment - Date and time - Version number The comment and the version number can be entered via the Parameter head editor.

10.1.31 File selector


This is a list of the files which have been edited last. If you select a file, it will be opened for editing, and the corresponding editor will also be called up. You can customize the number of files, that are displayed in this menu, with the function switch /Fn. 4 files are usually listed (/F4).

10.1.32 Exit
This can be used to exit from the WinSPS software and return to Windows. All modified files can be saved after a request (depending on the setting of function switch /A).

10.1.33 Back to sequence


The level for the input of the PLC instructions is finished and you can get back to the sequence. All inputs are checked and integrated into the sequence. The instructions are only visible on the PLC level, whereas on the sequence level, the element PLC is indicated as a step action.

10-18 Installation

10.2 Edit Menu


This menu contains all functions which can be used to edit files. This includes the following functions: - Undo/Redo last edit - Cut, Copy and Paste - Find and Replace - Network commands - Editing of parameter lists and library modules.

10.2.1 Undo
This function can be used to undo the previous text editing step. Every editing which has been cancelled with the "Undo" function can be restored with the "Redo function. Example: You have inadvertently deleted a highlighted area (e. g. with the key ). You can then use the "Undo" function to reinsert the deleted area into the file. If you subsequently use the "Redo function, the highlighted area will be deleted again. In all editors (except LD and FBD), you can undo/redo - depending on the setting of function switch /U - up to 99 consecutive text editing steps.

10.2.2 Redo
A previous text edit can be cancelled with the "Undo" function. By using the "Redo" function, you can restore the original state. Example: You have inadvertently deleted a highlighted area (e. g. with the key ). The "Undo" function will reinsert the deleted area into the file. If you subsequently use the "Redo function, the highlighted area will be deleted again. In all editors (except LD and FBD), you can undo/redo - depending on the setting of function switch /U - up to 99 consecutive text editing steps.

10.2.3 Last Stacker result


This function can be used to edit several consecutive files which contain errors. The last displayed processing log (Stacker window) which has been used by a function to produce a listing of incorrect files can be displayed once more. Each Stacker window contains a Go to button which you can use to open an incorrect file and edit it. The following functions use the Stacker display to log incorrect files: - All comparison functions between file and controller - All functions for the creation of cross-reference lists

Installation 10-19

- Load and Unload functions (see illustration example)

The processed files of the Stacker display can be viewed in one line or as a listing. The selection can be made via the function switch /p.

10.2.4 Repeat last command


You can repeat the last input in the Sequential function chart (SFC). Example: You want to add three Set (S) actions to a step action. Please add the step action Set (S) once, and then call up the function Repeat last command twice. You can undo an accidentally made repetition with the function Undo.

10.2.5 Cut
This function copies the highlighted block area into the clipboard and deleted (cut out) from the current editor. You can then insert the contents of the clipboard at another position or even in a different file. This procedure is the same as the "moving" of texts. The contents remains stored in the clipboard - and can thus be inserted any number of times - until another highlighted area is saved in the clipboard (the contents will even be retained after you exit from the WinSPS software!). Move or copy operations can also be performed very easily by using the mouse operation Drag & Drop .

10.2.6 Copy
This function copies the highlighted block area into the clipboard You can then insert the contents of the clipboard at another position or even in a different file. The contents remains stored in the clipboard - and can thus be inserted any number of times - until another highlighted area is saved in the clipboard (the contents will even be retained after you exit from the WinSPS software!). Move or copy operations can also be performed very easily by using the mouse operation Drag & Drop .

10-20 Installation

10.2.7 Paste
The contents stored in the clipboard is inserted at the current writing cursor position. If an area has been marked before, this area will be overwritten with the contents of the clipboard. The contents remains stored in the clipboard - and can thus be inserted any number of times - until another highlighted area is saved in the clipboard. Move or copy operations can also be performed very easily by using the mouse operation Drag & Drop .

10.2.8 Change IL to comments


You can change a marked area in the IL programming language to comments. All marked lines are preceded by the comment sign ;. Remember to mark the changed lines from line start to line start. The best way to achieve this is to put the cursor to the left of the instruction line (it changes its form sor down vertically. ), then start to mark, and finally drag the cur-

You can change marked comment lines back to IL lines by using the function Change comments to IL.

10.2.9 Change comments to IL


You can change a marked area of comment lines in the IL programming language to IL lines. Remember to mark the changed lines from line start to line start. The best way to achieve this is to put the cursor to the left of the comment line (it changes its form down vertically. ), then start to mark, and finally drag the cursor

You can change marked IL lines back to comment lines by using the function Change comments to IL.

10.2.10 Go to PLC instructions for step


With this call, you get to the PLC level for the current step of a sequence. The inputs can only be made on this level. You can put in the PLC instructions in the IL, LD or FBD programming languages. You can exit the PLC level with the menu function 'File', 'Back to sequence' and go back to the sequence. The PLC instructions are saved in one UAWLSTEP.PXO file which is especially made for it. The PLC instructions are checked and inserted to the beginning of the current sequence (not visible in the SFC editor!). The instructions are only visible on the PLC level.

Installation 10-21

You can recognize existing PLC instructions for the step by means of a sign (see illustration). To reset a characterization, all PLC instructions of the current step have to be deleted.

Contrary to the 'Step action PLC instructions', the instructions are executed unconditionally.

10.2.11 Go to FC <K_BETRA>
With this function, the FC K_BETRA.PXO is called up. It will automatically be called up if the module does not exist. The call-up from the SFC directory can only be made, when the cursor is on the index field of a sequence. The illustration is in the IL. The positioning happens in the network, which includes the data of the current sequence. By using the menu function File, Back to sequence, you can leave the module and go back to the directory. The changes are saved after a check and a request in the file K_BETRA.PXO.

10.2.12 Insert pagination


You can insert manual pagination to any positions of the sequence, so that a formatted version on the printer is possible. Pay attention to the fact that page breaks can not be inserted within elements. If you click on the line of the pagination and move the mouse cursor upwards or downwards while holding the mouse button, you can move it. On this line, the pagination can be deleted with the button .

Shortcut: Keyboard: +

10.2.13 Create/Delete diagnosis marker


This function of the sequential function chart is especially made for the MADAP programming to assign a diagnosis text to a diagnosis marker. To edit or to delete a diagnosis text the cursor must be on an insertion position of the BEFA condition or transition. You can not insert a diagnosis marker to a position with a complex logical operation. WinSPS controls these positions independently and does not allow you to insert here. You can recognize already available diagnosis texts by a small dagger in the branch (see illustration).

10-22 Installation

Dialog box Text for Diagnosis Insert any text for the MADAP diagnosis text to the edit field and confirm the with OK. Use Delete to delete a diagnosis marker. The text is kept and can be reactivated by the next setting of a diagnosis marker. You can recognize already available diagnosis texts by a small dagger in the branch (see illustration).

10.2.14 Find
This function can be used to find specific pieces of text in the current file.

Dialog box Find This function can be used to find specific pieces of text in the current file. If the option Whole word only is enabled, a character string is only find if it is enclosed in blanks or tabs etc., e. g.: Find: Bus Found: Bus, bus, BUS Not found: Busmaster, busdriver, PROFIBUS If this option is disabled, the string is also found as part of a word.

You can choose to respect upper/lowercase during searching, e. g.: Find: Bus Found: Busmaster, Bus Not found: busdriver, PROFIBUS

Searching for the specified string is always made from the current position of the writing cursor and depending on the direction Search up or down.

This dialog box will remain open until you click on the Cancel button. This allows you to make any number of search runs. While searching takes place, you can make inputs in the editor.

10.2.15 Replace
This function can be used to find specific pieces of text in the current file and replace them with a different text.

Installation 10-23

Dialog box Replace This function can be used to find specific pieces of text in the current file and replace them with a different text. The specified string is always searched (and replaced) from the current position of the writing cursor towards the end of the file. The found string will be replaced if you click on the Replace button. If you do not want to replace the current found string, you can proceed to the next search run with the Search next button. With the Replace all button, you can replace all found strings without stopping. If the option Whole word only is enabled, a character string is only find if it is enclosed in blanks or tabs, e. g.: Find: Bus Found: Bus, bus, BUS Not found: Busmaster, busdriver, PROFIBUS If this option is disabled, the string is also found as part of a word.

You can choose to respect upper/lowercase during searching, e. g.: Find: Bus Found: Busmaster, Bus Not found: busdriver, PROFIBUS The specified string is always searched (and replaced) from the current position of the writing cursor towards the end of the file.

This dialog box will remain open until you click on the Cancel button. This allows you to make any number of replacements. While searching and replacing takes place, you can make inputs in the editor.

10.2.16 Find operand address (Single cross reference)


This function allows you to find a specific operand in the current program module or symbol file (e. g. I14.3). The operand address is specified in a dialog box.

Dialog box Show all found operands With this function, a certain operand can be searched in all program module files (e.g. I14.3). This address can be put in absolutely or symbolically (with leading hyphen!). You can also search absolute operands truncated. Example: By editing 'I14', the operand addresses from I14.0 to I14.7 and the accesses to I14 (Byte and Word) are searched for. The search begins immediately with the input. The list shows the module name, the PI number, the instruction and the operand (absolutely and symbolically), and the access read or write to the operand.

10-24 Installation

With the button Go to, you can call up a module and jump to the operand. With the button Refresh, the search will be repeated. This dialog box is open until the button Close is activated.Thus, any number of searching processes can be made consecutively.

Dialog box Find operand address (Symbol file)

This function allows you to find a specific operand in the current symbol file (e. g. I14.3). The address can be specified in absolute or symbolic form (with leading hyphen!). Searching for the operand address will always take place from the current position of the writing cursor towards the end of the file. This dialog box will remain open until you click on the Cancel button. This allows you to make any number of search runs.

10.2.17 Go to error line


The WinSPS software automatically checks the module, data module or symbol file for input errors as soon as the input is made. If errors are detected, an error ID will be set in the first column. This function allows you to go to the next line which contains an error. The status line displays a description of the error.

10.2.18 Go to PI no.
This function allows you to directly access one of the program instructions (PI) which are numbered consecutively. The number is entered in a dialog box. This function can only be applied to program modules.

Dialog box Go to PI no. This function allows you to directly access one of the program instructions (PI) which are numbered consecutively. The current PI number is displayed in the status line.

10.2.19 Go to symbol definition


A symbol definition can be found quickly using this function. The definition can either be found in the symbol file or - in the form of a definition line - in the program module. Therefore one goes to the symbol file i.e. to the position of the definition line. This function can only be used in program modules on symbolic operands. This function can also be found in the context menu, which can be reached via the right mouse button.

10.2.20 Delete line in declaration table (ST)


This function deletes the current table line in the variable declaration or the type definition in the ST Editor.

Installation 10-25

Shortcuts: Toolbar:

10.2.21 Global data types


This function opens a dialog box in which global user-defined (derivative) data can be entered in tables. This function is only available in the Symbol editor. However, local data types can be entered e. g. in the declaration tables of the ST Editor .

Shortcuts: Toolbar:

Dialog box Global data types This dialog box can be used to enter global user-defined (derivative) data. This function is only available in the Symbol editor. However, local data types can be entered e. g. in the declaration tables of the ST Editor . On the left side, all global type definitions are displayed. There are three classes of data types: 1. TYPE: Basic types 2. STRUCT: 3. ENUM: Data structures Enumerations .

To create new types, click on the corresponding button, e. g. To delete data types, click on the button .

A newly created data type is initially named New type. Please change this name into the desired type designation.

10.2.22 Edit network title


Program modules can be subdivided into convenient sections - so-called networks which can be assigned network comments (= titles). Networks are numbered in consecutive order. A network comprises one or more program rungs. The network boundaries can only be set at the end of a program rung. The name is entered or changed in a dialog box. The network title is displayed next to the network number below the toolbar. The network numbering is not stored in the file but is created in each case. The display can be suppressed via the menu function View, Networks.

10-26 Installation

10.2.23 Insert before network


Inserts a new, empty network before the current network. The numbering is changed so that all subsequent network numbers are increased by one. The writing cursor is placed inside the new network.

10.2.24 Insert after network


Inserts a new, empty network after the current network. The numbering is changed so that all subsequent network numbers are increased by one. The writing cursor is placed inside the new network.

10.2.25 Delete network


This deletes the current network and its contents. All subsequent networks are moved upward and their numbers are decreased by one.

10.2.26 Split network


This splits the current network at the position of the writing cursor so that one network becomes two. The program instructions which have been after the writing cursor before the network split are placed into a new network. This network has no title yet. All subsequent networks are moved forward and their numbers are increased by one.

10.2.27 Join with previous


This joins the current network with the previous network so that both networks become one. The title of the previously current network is inserted into the comment line at the joining position. All subsequent networks are moved upward and their numbers are decreased by one.

10.2.28 Join with next


This joins the current network with the next network so that both networks become one. The title of the next network is inserted into the comment line at the joining position. All subsequent networks are moved upward and their numbers are decreased by one.

Installation 10-27

10.2.29 Create networks automatically


This function can be used to perform a subsequent, automatic subdivision of a program module into networks. The network boundaries are set at the end of a program rung. The networks do not have titles yet.

10.2.30 Delete all network commands


This function removes all network IDs from a program module so that all program instructions are contained in a single network. This will not delete the contents.

10.2.31 Create library module


You can use this function to create a library module from the current program module. Library module files are protected program module files. Contrary to the usual program module, a library module only consists of a compact, executable machine code and may also contain a parameter list. This machine code offers the advantages that is can be processed faster during loading and that it offers a protection against viewing and manipulation by the user. The current module file must be error-free. The WinSPS software creates an additional file with the same filename and the file type .PXL. This file cannot be edited in the Editor. If you want to make changes to the library module, you will have to edit the original module file (file type .PXO) first and then call up the function Create library module again. Both files will receive the same date/time tag to facilitate revision control.

If the corresponding original program module file (.PXO) does not exist, it is not possible to edit the library module file (.PXL). This protects (locks) the file against changes. Keep the original file, e. g. on floppy disk! If you want to create a universal library module which can be used independent of the current controller, you will need to structure the module so that it is not dependent on other modules of the project. In particular, the module must not access symbols which are defined in the current symbol file. For this reason, you can only use symbolic operands which have been specified via definition lines in the (library) module file. Input and output parameters are defined via the parameter list. To allow the use of the library module for multiple projects, the WinSPS provides a special library directory (BOSCH.BIB) into which the library modules can be copied . If the same file exists both in the directory BOSCH.BIB and in the current project directory, the file in the project directory will take priority. If both a .PXL and a .PXO file of the same date exist in the same subdirectory, the .PXL file will always be used. If there are errors in the program sequence, three lines of the error position can be displayed with the function 'Info status' of a library module.

10-28 Installation

10.2.32 Call up parameter list


This function can be used to place an existing parameter list of another module as a module call to the current position of the writing cursor. The module description can be appended. In particular with the programming language ST, this allows the creation of instances of function blocks. You can make additional settings in a dialog box.

Dialog box Call up parameter list

Program module This specifies the program module whose parameter list is to be used.

Module call Different kinds of module calls (call conditions) are available, depending on the controller type.

Description A module description which may be contained in the program module can be appended. The module description is entered in the parameter header editor (menu item Edit, Edit parameter list).

Dialog box Select module In this dialog box, you can select a module which will then appear as a module call at the current position of the insertion mark. You can select a module from the list of all function blocks (FUNCTION_BLOCK).

Module call Only the unconditional module call CM is possible at this time. After selecting a module, click on the Continue button to proceed to the next dialog box Instantiation: Here you can obtain additional information about the ST module call:

Dialog box Select instance This dialog box is used to assign an instance to the module which has been selected in the previous step. This mechanism allows the creation of modules with a memory. All instances found can be used to obtain a listing of all instances that exist for this module. You can either select an instance from this list or enter a new instance name. This name must comply with the designator conventions of IEC 61131-3.

Installation 10-29

Click on the Continue button to call up the next dialog box for the assignment of input and output parameters: Here you can obtain additional information about the ST module call:

Dialog box Assign input and output parameters

This dialog box is used to assign actual parameters to the instance that has been selected in the previous step. The displayed listing includes all declared input and output variables with their Names and Data types. In the column Actual parameters, you need to enter either an absolute value or a variable. The variables must be declared in the symbol file! Clicking on the Proceed button will insert the module call into the current module file. In this process, WinSPS will create different entries in the Editor and not visible here in the symbol file. Do not change these lines, in particular the comment lines! Here you can obtain additional information about the ST module call:

10.2.33 Edit parameter list


The parameter list makes it possible to program parameter modules with symbolic operands. This means that symbolic operands can be used instead of the absolute operands P0 through. The parameters can be entered or changed in a dialog box.

Dialog box Parameter header editor The parameter header editor can be used to program parameter modules with symbolic operands. This means that symbolic operands can be used instead of the absolute operands P0 through Pn. In addition, the use of parameters is checked directly at the time of input so that incorrect parameters are immediately identified. Various input fields are available for data input. All inputs are accepted for the currently marked parameter in the parameter list.

Data type The data type comforms to IEC 61131-3. The following relationships apply: ANY BYTE BOOL COUNTER CVALUE DM DWORD FC OPT Format-less parameter Byte attribute Bit attribute Counter number Counter value Data module number Double-word attribute Program module number Format-less parameter;

10-30 Installation

PTR TIMER TVALUE WORD

only possible at end of parameter list Pointer to an operand Timer loop number Timer constant/Timer value Word attribute

The availability of these data depend on the controller. The parameter types are checked in the module. In the case that a function requires a higher or lower number of parameters, these can be declared with the data type OPT. This parameters will not be checked. They are only permitted at the end of the parameter list.

Variable name This specifies the symbolic name of the operand. The operand is valid only locally in the parameter module.

Input/Output (direction of data flow) You can choose between three directions of data flow: VAR_INPUTInput parameter. The operand is of the read-only type. This is checked when the parameter is used. VAR_OUTPUT Output parameter. The operand is of the write-only type. This is also checked when the parameter is used. VAR_IN_OUT Read or write is possible. Comment You can specify any comment for each parameter.

Parameter list This shows the parameters. Two lines are used for each parameter. The first line contains the parameter number, the data type, the variable name and the direction of data flow. The parameter number is created automatically. The second line contains the parameter comment. The currently marked (highlighted) parameter can be removed from the list with the Delete button. The Insert button is used to insert a new parameter before or after the current parameter, depending on whether the first or the second line of the parameter is highlighted. You may then edit the new parameter by using the input fields. To assign an arbitrary description to the module, you can use the Description button to open another dialog box in which you can enter a text. This description can be inserted into the calling module for a module call (see menu item Edit, Call up parameter list).

Version A function module can be provided with a version identification (1.0 to 8.7). Pre-released versions can be characterized as alpha, beta, and gamma versions. Thus, you can distinguish standard function modules which have similar names. Library modules can be characterized the same way.

Installation 10-31

Ann.: The version identification is also loaded into the controller. The entries in the field Version Comment are only saved with the module on the harddisk; i.e. they are not taken over into the controller. The version identification can be looked at with the function 'Controller', 'Reference list'. All previously edited function modules automatically carry the V1.0 version. The button Accept can be used to accept (load) a parameter list from any other program module. A file selector box is displayed for this purpose. If you click on the OK button, the inputs are checked and - if correct - inserted into the module file.

10.2.34 I/O configuration (OM3)


Here you can configure the input and output modules of the CL150 or RM65-DP. A dialog box is used to enter or modify the configuration data.

Dialog box I/O Configuration The dialog box for the configuration of the input and output modules of the CL150 or RM65-DP is subdivided into three areas: 1) On the left side, the modules and I/O addresses are configured. The WinSPS software automatically writes this configuration into the organization module OM3. Every time this configuratio is called up, the contents of OM3 are read and displayed in this area. The filename for OM3 must be specified in the symbol file. Example: OM3,R IO_CONF ; I/O configuration module

2) In the top right part, a list of available modules is displayed. From this list, you can select the modules to be included in the configuration. 3) The bottom right part contains the list of the available inputs and outputs.

The configuration can be edited quickly and conveniently. A hierarchical structure is displayed in each case (similar to Windows Explorer), which is especially useful for copying and moving modules and PLC addresses (Drag & Drop). Just open the desired folder (+), and drag the element (module, input or output) to the desired position in the configuration list. We have prepared a little video demo to show you this process (source: WinDP help; the same process is used for the configuration of slaves). Click on this button: After completing the configuration, you can transfer it to the organization module OM3 by clicking on OK. Using the load functions, the OM3 can be loaded into the PLC for subsequent activation. Cancel cancels all entries.

10-32 Installation

Reading the I/O configuration of the connected PLC The option PLC contents establishes a connection to the controller, reads the actual configuration and displays it together with the (nominal) configuration. You can then compare both lists and accept the actual state via Drag & Drop into the nominal configuration.

Label printing You can print labelsfor the I/O modules. The labels are available on prepunched adhesive film and can be printed with any laser printer. Before you can print labels, you need to create the labels for the desired modules. To do so, position the cursor (writing mark) in the configuration list into the designation field of the module and click on the Label button. All modules which are marked in this way will be included in the print list upon the next call of the Print label. The list will be deleted when the labels have been printed or when the label printing dialog is terminated.

Additional options The Enable Module check option allows to check the identity of the modules. For example, if you have entered an output module "8D / 2A" in the configuration but a module "8D / R" is connected to the controller, an error message will be generated. The controller will remain in "Stop" in this case. With the Modules only option, the display of I/O information is suppressed in the configuration list. This provides a clearer overview of the module configuration.

Dialog box Print Labels B-IO Here you can print labelsfor the I/O modules. The labels are available on pre-punched adhesive film and can be printed with any laser printer. Before you can print labels, you need to create the labels for the desired modules. To do so, position the cursor (writing mark) in the configuration list into the designation field of the module and click on the Label button. All modules which are marked in this way will be included in the print list upon the next call of the Print label function. The list will be deleted upon printing of the labels or upon termination of the print label dialog.

I/O representation Here you can choose whether you want to print the I/O addresses in absolute or/and symbolic form. The window on the right side gives an impression how the final label will look.

Label position on film If you want to print on a film on which some labels have already been printed, you can use this function to select a start position for the labels. The setting can be checked via the button Assignment ...: Positions on the film where labels will be printed will be shown as assigned. If a start position has been specified, only labels which will be printed will be marked as assigned. Labels will first be printed from left to right. At the end of a line, printing will continue with the next label in the first column of the next line.

Installation 10-33

You can use the arrow buttons to scroll if you need to print labels on several films.

Fine adjustment of print position Because the positioning of the print head may vary slightly due to different printer drivers, this function gives you the possibility to control the print position in 1/10 millimeter steps. Negative input values will displace the print head to the left or to the top.

Dialog box 16-Bit Label Assignment This function shows the positions where the film is printed as assigned. If a start position has been specified, only labels which will be printed will be marked as assigned. Labels will first be printed from left to right. At the end of a line, printing will continue with the next label in the first column of the next line. You can use the arrow buttons to scroll if you need to print labels on several films.

10-34 Installation

10.3 View Menu


This menu groups the options for the representation of the monitors. It allows to switch between the programming languages for program modules - Instruction List (IL) - Ladder Diagram (LD) - Function Block Diagram (FBD) - Sequential Function Chart (SFC) - Structured Text (ST) The function switch-over for the operand field and data field editors can be made here. A base can be specified for the representation of numerical values. Monitor triggering can be selected to be on the first screen line or the current writing cursor position. The - toolbar - display of the network title - symbolic display of the operands can be hidden. In addition, the layout of the Editor can be customized using different fonts and colour settings.

10.3.1 Instruction List (IL)


This activates the programming language Instruction List. The Instruction list consists of instructions (commands) in a low-level programming language. If you have previously selected a different programming language (LD or FBD), all elements of the previous programming language will be converted into the IL programming language. The program can be subdivided into sections - so-called networks.

10.3.2 Ladder Diagram (LD)


The Ladder Diagram programming language is activated. The ladder diagram is a graphical combination of binary variables (digital logic operations). The ladder diagram resembles the circuit diagram of earlier relay control systems with contacts and coils. The program can be subdivided into sections - so-called networks.

Installation 10-35

10.3.3 Function Block Diagram (FBD)


The Function Block Diagram is activated. FBD is a graphical combination of different function elements. In FBD, binary (digital) logic operations as well as timer, counter and comparator functions and program and module jumps can be displayed. If you have selected a different programming language (IL or LD), all elements of the previous programming language will be converted into FBD function elements. All other function elements which cannot be displayed will be temporarily displayed in the IL programming language. In addition, a corresponding message will appear in the status line. The program can be subdivided into sections - so-called networks.

10.3.4 Sequential Function Chart (SFC)


The programming language Sequential Function Chart is activated. The programming language Sequential function chart makes the graphic programming of a complex task in clear units possible. The control flow of these parts can be arranged gradually in sequential or parallel processes (also known as sequence cascade programming). To activate this programming language, a SFC file has to be specified in the Presets.

10.3.5 Structured Text (ST)


The programming language Structured Text is activated. ST is a textual language. Contrary to the low-level IL language, ST is a programming language that uses comprehensive constructs to allow a very compact formulation of the programming task. ST offers the advantage that it allows a clear program structure. The disadvantage of this language is its lower efficiency. The programs are slower and longer. To be able to activate this programming language, it is necessary to specify an ST file in the Presets.

10.3.6 Table of contents


With this function, you can move in the Sequential function chart (SFC) to the table of contents. The table of contents shows the overall view of the sequence structure. Context help to the table of contents

Shortcuts: Symbol bar: Keyboard:

10.3.7 One level higher


With this function, you can gradually switch in the Sequential function chart (SFC) one level (or swap-out) back.

10-36 Installation

Context help to the edit level

Shortcuts: Symbol bar: Keyboard:

10.3.8 Sequence title


With this function, the headline of a sequence can be faded out below the toolbar.

10.3.9 Overview
With this function, you can activate the overview of a sequence. In the overview, the step elements are shown smaller; the transitions are cut short to a line. Step actions are not indicated.

Shortcuts: Keyboard: +

10.3.10 Show sensitive fields


If you like to know where to find sensitive fields in the sequence (i.e. those fields where you can insert, delete, or alter elements), then activate . If this function. All sensitive areas are then provided with a symbol you move the mouse cursor over these areas, you can see, by means of the mouse cursor symbol (for a list, see Operating philosophy, Mouse cursor symbols), which function can be carried out.

10.3.11 Change view: Auto <-> Manual branch


You can change here from the manual to the automatic branch - and vice versa (Sequential function chart, programming type MADAP only).

10.3.12 Symbolic/Absolute
You can select the operand display in the module editor to be either symbolic or absolute. If you activate the menu item, the operands will be displayed in symbolic form. In the symbol display, the absolute and the symbolic operand as well as the symbol comment are always displayed.

10.3.13 Network line On/Off


This function enables/disables the network line of the module editor or monitor below the toolbar.

Installation 10-37

If you disable the menu item (Off), all networks will be displayed in contiguous form. The network numbers are suppressed, and the network titles are integrated into the program module: ****;Network title In this programming language, it is possible to directly insert new networks or to delete and even move existing networks. In particular, several networks can be copied or cut out in one block. To insert a new network, you need to enter a network title in the form shown above (at the beginning of the line, enter four times *, followed by a semicolon and then the text of the title). An incorrect input is indicated by an error ID. To delete a network, simply delete the corresponding network title line. Of course, you can also delete the contents of a network. A network boundary can easily be modified by repositioning the network title line or by inserting a new network title in the desired position. A new network must not start within one program rung! Please take care to place the network title directly after a completed program rung! The network line can be reactivated at any time. In this case, the WinSPS software will revise all networks, place all titles into the title field and number the networks.

10.3.14 Toolbar On/Off


This function allows you to suppress the toolbar of the Editor in order to obtain a larger work area.

You will be required to make a temporary exit from the Monitor and switch to the Presets or the Monitor, since the change will only become effective after a new call of the Editor. The toolbar is scaled automatically. This means that the toolbar always extends across the entire screen at different screen resolutions (e. g. 640 x 480, 800 x 600 etc). Automatic scaling can be disabled with the function switch /i. This has the effect that, particularly when using high-resolution monitors, the entire toolbar is visible even when you work in several smaller windows.

10-38 Installation

10.3.15 ST Declaration tables


This function allows to activate or deactivate the declaration tables in the ST Editor. These tables allow the convenient entry of different data in a POU.

Shortcuts: Toolbar:

10.3.16 Font
This function is used to change the character font. A dialog box will appear. Please consider that a subsequent font change can affect the layout since the text is shifted and some characters may not be displayable. These shifts can occur especially if proportional fonts are used. The default font for the WinSPS software is Courier, Regular, 9.

10.3.17 Colour selection


This is used to make the colour selections for Editor and Monitor. The parameters are specified in a dialog box.

Dialog box Colour selection Select the area for which you want to select the colour. In the window below, the selected area is marked with a box. The Change button calls up another dialog window where you can select the desired colour. The Default button resets the selected area to the default colour. The All default button resets all coloured areas to the default colours. You can exit from the colour selection dialog box without making a selection by clicking on the Cancel button.

Dialog box Colour You can choose from preset colours in a dialog box. If you want to define your own colours, click on the desired colour in the spectral matrix or enter the colour parameters directly in the input fields which are provided for this purpose. The Add colours button can be used to add the colour to the selection list of user colours.

Installation 10-39

10.4 Toolbox Menu LD


This menu contains all special language elements and editing aids for the programming languages Ladder Diagram (LD), Function Block Diagram (FBD) and Sequential Function Chart (SFC). The menu is only available in the module editor under these programming languages.

10.4.1 Edit mode


The edit mode allows the editing of an LD graphic (LD branch). If the writing mark is positioned in the area of an LD branch and the edit mode is activated, this area can be edited. An LD branch is limited by two busbars (see figure, yellow marking for illustration purposes only).

The current editing area will then be overlayed with a grid (see illustration). It is not possible to exit from this area as long as the editing mode is active.

Input elements can be inserted everywhere, but not directly before the right busbar. This area is reserved for output elements. An output element is always located on the right side of the Ladder Diagram as the last element directly before the right busbar. With the editing mode activated, the navigation keys (e.g. , , , , , etc.) are functional for the sensitive fields in the LD branch. These keys are therefore tailored to the editing requirements in the LD programming language. Moreover, all entries are checked. Illegal entries will be rejected. Complex LD branches will be simplified if possible. If the editing mode is not activated, the writing mark can be placed anywhere in the network. No checks and no optimization are made. In this mode, IL lines can be edited if you switch into the IL programming mode. The insertion of a new LD branch will automatically call up the input mode.

10-40 Installation

Shortcuts: Toolbar: Keyboard: +

10.4.2 Normally-open contact


This functions allows to insert a normally-open contact (N/O, make contact). The normally-open contact passes the binary state which exists on the left side of the connection with the variable set (AND combination). The complementary element of the normally-open contact ist the normallyclosed contact (N/C, break contact).

Shortcuts: Toolbar: Keyboard:

10.4.3 Normally-closed contact


This functions allows to insert a normally-closed contact. The normally-closed contact passes the binary state which exists on the left side of the connection in negated form with the variable set (ANDNOT combination). The complementary element of the normally-closed contact ist the normally-open contact (N/O, make contact).

Shortcuts: Toolbar: Keyboard: (zero)

10.4.4 Connection
This function inserts a connecting line. Connections can be in horizontal and vertical direction, but the (curent) flow is always from left to right. A horizontal connection passes the binary state of an element to the subsequent element (from left to right!). This corresponds to an AND connection. A vertical connection connects all horizontal elements on the left side with an OR combination and passes this value to all elements on the right side.

Installation 10-41

If the writing cursor is positioned on a sensitive field, the matching connecting line can be inserted with the button . .

This also makes it possible to delete contacts and assignments. The connecting line overwrites the current element. Existing connection structures can be conveniently extended or reduced with the menu functions under Editing aid.

Shortcuts: Toolbar: Keyboard:

10.4.5 Assignment (coil)


This function inserts an assignment. The (output) assignment assigns the value on the left to the variable. A coil is always located on the right side of the Ladder Diagram as the last element directly before the right busbar. Several output elements can be inserted one below the other and interconnected.

Shortcuts: Toolbar: Keyboard:

10.4.6 Set (S)


This function inserts a Set coil. If the state ON (TRUE) is present on the connection to the left of the Set coil (S), the variable will also be set to ON. This state is maintained until it is cancelled by a Reset coil (R) (OFF). A coil is always located on the right side of the Ladder Diagram as the last element directly before the right busbar. Several output elements can be inserted one below the other and interconnected.

Shortcuts: Toolbar:

10-42 Installation

Keyboard:

10.4.7 Reset (R)


This function inserts a Reset coil. If the state ON (TRUE) is present on the connection to the left of a Reset coil (R), the variable is set ti OFF. This makes it possible to cancel a state created by the Set coil (S). A coil is always located on the right side of the Ladder Diagram as the last element directly before the right busbar. Several output elements can be inserted one below the other and interconnected.

Shortcuts: Toolbar: Keyboard:

10.4.8 Timer Pulse (SI)

The timer is started by a pulse (SI) through a transition from 0 to 1. The timer loop name (e.g. 'T1' ) is entered in the input field above the timer another input field will element. Upon confirmation of the input with appear in which the duration or the timer value and timer value/loop, respectively, is entered.

The timer can be stopped via the element Stop (TH). The timer state can be reset with the element Reset (RT).

Shortcuts: Toolbar: Keyboard:

10.4.9 Timer Extended Pulse (SV)

Installation 10-43

The timer is started as an extended pulse (SV) through a transition from 0 to 1. The timer loop name (e.g. 'T1' ) is entered in the input field above another input the timer element. Upon confirmation of the input with field will appear in which the duration or the timer value and timer value/loop, respectively, is entered.

The timer can be stopped via the element Stop (TH). The timer state can be reset with the element Reset (RT).

Shortcuts: Toolbar: Keyboard:

10.4.10 Timer Switch-on delay (SE)

The timer is started as a switch-on delay (SE) through a transition from 0 to 1. The timer loop name (e.g. 'T1' ) is entered in the input field above another input the timer element. Upon confirmation of the input with field will appear in which the duration or the timer value and timer value/loop, respectively, is entered.

The timer can be stopped via the element Stop (TH). The timer state can be reset with the element Reset (RT).

Shortcuts: Toolbar: Keyboard:

10.4.11 Timer Remanent switch-on delay (SS)

10-44 Installation

The timer is started as a remanent switch-on delay (SS) through a transition from 0 to 1. The timer loop name (e.g. 'T1' ) is entered in the input field above the timer element. Upon confirmation of the input with another input field will appear in which the duration or the timer value and timer value/loop, respectively, is entered.

The timer can be stopped via the element Stop (TH). The timer state can be reset with the element Reset (RT).

Shortcuts: Toolbar: Keyboard:

10.4.12 Timer Switch-off delay (SA)

The timer is started as a switch-off delay (SA) through a transition from 0 to 1. The timer loop name (e.g. 'T1' ) is entered in the input field above another input the timer element. Upon confirmation of the input with field will appear in which the duration or the timer value and timer value/loop, respectively, is entered.

The timer can be stopped via the element Stop (TH). The timer state can be reset with the element Reset (RT).

Shortcuts: Toolbar: Keyboard:

Installation 10-45

10.4.13 Timer Stop (TH)


This element stops a timer loop. The timer loop name (e.g. 'T1' ) is entered in the input field above the timer element.

Please note that the Timer Stop function only makes sense if a timer has been started before. For examle, if you implemented timer loop T1 as a pulse (SI), you can stop this timer loop through another LD branch.

Shortcuts: Toolbar: Keyboard:

10.4.14 Timer Reset (RT)


This element resets the timer state of a timer loop. The timer loop name (e.g. 'T1' ) is entered in the input field above the timer element.

Shortcuts: Toolbar: Keyboard:

10.4.15 Set Counter (SZ)


A counter is loaded with the counter nominal value (word operand). The counter name (e.g. 'Z1' ) is entered in the field above the element. Upon another input field will appear in which confirmation of the input with the counter nominal value is entered.

Shortcuts: Toolbar: Keyboard:

10.4.16 Up Counter (CU)


The counter counts up when a transition from 0 to 1 occurs. The counter name (e.g. 'Z1' ) is entered in the field above the counter element. The counter state is set to 0 when the count value 0 is reached.

10-46 Installation

Shortcuts: Toolbar: Keybard:

10.4.17 Down Counter (CD)


The counter counts down when a transition from 0 to 1 occurs. The counter name (e.g. 'Z1' ) is entered in the field above the counter element. The counter state is set to 0 when the count value 0 is reached.

Shortcuts: Toolbar: Keyboard:

10.4.18 Reset Counter (RZ)


Resets a counter. The counter name (e.g. 'Z1' ) is entered in the field above the element. Upon confirmation of the input with another input field will appear in which the counter nominal value is entered.

Shortcuts: Toolbar: Keyboard:

10.4.19 Jump at RLO = 1 (JPC)


Jump (JPC) within the module if the input condition is met (RLO=1). The jump destination is specified in the field above the jump element. The jump flag itself can only be edited if the editing mode is not active (IL).

Shortcuts: Toolbar: Keyboard:

10.4.20 Jump at RLO = 0 (JPU)


Jump (JPU) within the module if the input condition is not met (RLO=0). The jump destination is specified in the field above the jump element. The jump flag itself can only be edited if the editing mode is not active (IL).

Installation 10-47

Shortcuts: Toolbar: Keyboard:

10.4.21 Module Call at RLO = 1 (CMC)


Module call (CMC) if the input condition is met (RLO=1). The module name is specified in the field above the element.

Shortcuts: Toolbar: Keyboard:

10.4.22 Module Call at RLO = 0 (CMU)


Module call (CMU) if the input condition is not met (RLO=0). The module name is specified in the field above the element.

Shortcuts: Toolbar: Keyboard:

10.4.23 Call of a second data module at RLO = 1 (MXC)


Calls a data module (MXM) if the input condition is met (RLO=1). The data module name is specified in the field above the element. The call of a second data module is provided if a first data module has already been called via the function CMC or CMU, respectively. The access to the data addresses can be specified in IL (editing mode disabled).

Shortcuts: Toolbar: Keyboard:

10-48 Installation

10.4.24 Call of a second data module at RLO = 0 (MXU)


Calls a data module (MXU) if the input condition is not met (RLO=0). The data module name is specified in the field above the element. The call of a second data module is provided if a first data module has already been called via the function CMC or CMU, respectively. The access to the data addresses can be specified in IL (editing mode disabled).

Shortcuts: Toolbar: Keyboard:

10.4.25 End of module at RLO = 1 (EMC)


End of module (EMC) if the input condition is met (RLO=1).

Shortcuts: Toolbar: Keyboard:

10.4.26 End of module at RLO = 0 (EMU)


End of module (EMU) if the input condition is not met (RLO=0).

Shortcuts: Toolbar: Keyboard:

10.4.27 Shift Right


The Shift function offers a convenient way to extend existing connection structures. With each Shift Right operation, the input elements of the LD branch are displayed one position to the right. The resulting space at the left busbar is filled with (empty) connections. Please note that the input elements are moved out (= deleted) at the right busbar. If this results inthe unwanted deletion of elements, you can undo the shift operation with the menu function Edit, 'Undo'. Additional editing options:

Installation 10-49

Shortcuts: Toolbar: Keyboard:

10.4.28 Shift Down


The Shift function offers a convenient way to extend existing connection structures. With each Shift Down operation, the input elements of the LD branch are displayed one position to the bottom. The resulting space at the top can be used to insert new elements and connections. Please note that the input elements are moved out (= deleted) at the bottom. If this results inthe unwanted deletion of elements, you can undo the shift operation with the menu function Edit, 'Undo'. Additional editing options:

Shortcuts: Toolbar: Keyboard:

10.4.29 Insert Branch Before


This function inserts a new LD branch above (before) the current ILline or the current LD barnch, respectively. To be able to insert a new branch, you need to exit from the editing mode. Upon insertion of a new LD branch, the editing mode is called up automatically. An LD branch corresponds to a (IL) program branch.

Shortcuts: Toolbar: Keyboard: +

10.4.30 Insert Branch After


This function inserts a new LD branch below (after) the current IL line or the current LD branch, respectively. To be able to insert a new branch, you need to exit from the editing mode.

10-50 Installation

Upon insertion of a new LD branch, the editing mode is called up automatically. An LD branch corresponds to a (IL) program branch.

Shortcuts: Toolbar: Keyboard: +

10.4.31 Delete Branch


This function deletes the current LD branch. You can delete the branch directly in the editing mode. If you are not in the editing mode, you need to position the writing mark to the LD branch to be deleted.

Shortcuts: Toolbar: Keyboard:

10.4.32 Check Branch


This function checks the current LD branch for errors. If no errors are found, the message LD branch error-free will appear. In addition, the LD branch will be optimized. In this process, all connections between elements are shortened to their optimum length (see illustration for example).

Before the optimization:

After the optimization:

Shortcuts: Toolbar: Keyboard:

Installation 10-51

10.5 Toolbox Menu FBD 10.5.1 And (&)


The desired bit operator is entered in the currently highlighted field of the inputs.

The inputs of the function element AND can be edited via the pin Insert input, Delete input or Negate input. The writing cursor must be positioned on the line of the input to be edited (see illustration). The function can be subsequently changed if required. The writing cursor must be positioned inside the function element. If you then select another function element (OR, EXCLUSIVE-OR), the AND element will be converted. The function element can be deleted with the key .

10.5.2 Or (>=1)
The desired bit operator is entered in the currently highlighted field of the inputs.

The inputs of the function element OR can be edited with the pin functions Insert input, Delete input or Negate input. The writing cursor must be positioned on the line of the input to be edited (see illustration). The function can be subsequently changed if required. The writing cursor must be positioned inside the function element. If you then select another function element (AND, EXCLUSIVE-OR), the OR element will be converted. The function element can be deleted with the key .

10.5.3 Insert FBD pin


This function can be used to insert another input pin (function elements AND and OR only). The writing cursor must be positioned on the line of an input (see illustration).

This function can also be activated with the key

10.5.4 Delete FBD pin


This function can be used to delete an input pin (function elements AND and OR only). The writing cursor must be positioned on the line of an input (see illustration).

10-52 Installation

This function can also be activated with the key

10.5.5 Negate FBD pin


This function can be used to negate a pin or cancel a negation (for function elements AND, OR, flip-flop, timer and counter only). The writing cursor must be positioned on the line of the input (see illustration).

10.5.6 Exclusive Or (=1)


The desired bit operator is entered into the highlighted field of inputs.

Since the function element Exclusive Or (XOR) has always two inputs, these cannot be edited with the pin functions. The function can be subsequently changed if required. The writing cursor must be positioned inside the function element. If you then select another function element (AND, OR), the Exclusive Or element will be converted. The function element can be deleted with the key .

10.5.7 SR flip-flop
The function element flip-flop with dominant Set input (SR) has a Set and a Reset input. The desired bit operator is entered into the currently highlighted field in symbolic or absolute form. The operator of the flip-flop memory is entered into the field above the function element.

The SR flip-flop is identified by the designation S1 at its dominant Set input. If the SR flip-flop is used as an output element, the Set input is always connected with the coupling point. The function can subsequently be converted into an RS flip-flop if required. The writing cursor must be positioned inside the function element. If you then select the RS flip-flop, the element will be converted. The function element can be deleted with the key .

10.5.8 RS-Flip-Flop
The function element flip-flop with dominant Reset input (RS) has a Set and a Reset input. The desired bit operator is entered into the currently highlighted field in symbolic or absolute form. The operator of the flip-flop memory is entered into the field above the function element.

Installation 10-53

The RS flip-flop is identified by the designation R1 at its dominant Reset input. If the RS flip-flop is used as an output element, the Reset input is always connected with the coupling point. The function can subsequently be converted into an SR flip-flop if required. The writing cursor must be positioned inside the function element. If you then select the SR flip-flop, the element will be converted. The function element can be deleted with the key .

10.5.9 Timer - Pulse (SP)

Various parameters are entered into the highlighted fields: A timer is always started by a transition from 0 to 1 at the input (IN: bit operator). The duration or timer value/loop (PT: word operator) is entered as an additional input parameter. (ST: Bit operator optional) stops the timer, and the Reset input (R: Bit operator optional) resets it. The actual timer value can be read via the output (ET: word operand optional). The result of the logic operation (Q: Bit operand) is a function of the behavior of the selected timer element. The timer loop name is entered into the field above the timer element. Not all connections are available with all controllers. If the timer element is used as an output element, the Timer Start input (IN) is connected with the coupling point.

A timer function can subsequently be converted into another timer function if required. The writing cursor must be positioned inside the function element when you select the desired timer function. The timer element can be deleted with the key .

10-54 Installation

10.5.10 Timer - Extended Pulse (SPE)

Various parameters are entered into the highlighted fields: The timer is started as an extended pulse (SV) by a transition from 0 to 1 at the input (IN: bit operator). The duration or timer value/loop (PT: word operator) is entered as an additional input parameter. (ST: Bit operator optional) stops the timer, and the Reset input (R: Bit operator optional) resets it. The actual timer value can be read via the output (ET: word operand optional). At the output, the extended pulse is available as the result of a logic operation (Q: bit operand). The timer loop name is entered into the field above the timer element. Not all connections are available with all controllers. If the timer element is used as an output element, the Timer Start input (IN) is connected with the coupling point.

A timer function can subsequently be converted into another timer function if required. The writing cursor must be positioned inside the function element when you select the desired timer function. The timer element can be deleted with the key .

10.5.11 Timer - Start-up delay (SR)

Various parameters are entered into the highlighted fields: The timer is started by a transition from 0 to 1 at the input (IN: bit operator). The duration or timer value/loop (PT: word operator) is entered as an additional input parameter. (ST: Bit operator optional) stops the timer, and the Reset input (R: Bit operator optional) resets it. The actual timer value can be read via the output (ET: word operand optional). ). At the output, the delayed start-up is available as the result of a logic operation (Q: bit operand). The timer loop name is entered into the field above the timer element.

Installation 10-55

Not all connections are available with all controllers. If the timer element is used as an output element, the Timer Start input (IN) is connected with the coupling point.

A timer function can subsequently be converted into another timer function if required. The writing cursor must be positioned inside the function element when you select the desired timer function. The timer element can be deleted with the key .

10.5.12 Timer - Remanent start-up delay (SRE)

Various parameters are entered into the highlighted fields: The timer is started by a transition from 0 to 1 at the input (IN: bit operator). The duration or timer value/loop (PT: word operator) is entered as an additional input parameter. (ST: Bit operator optional) stops the timer, and the Reset input (R: Bit operator optional) resets it. The actual timer value can be read via the output (ET: word operand optional). ). At the output, the remanent delayed start-up is available as the result of a logic operation (Q: bit operand). The timer loop name is entered into the field above the timer element. Not all connections are available with all controllers. If the timer element is used as an output element, the Timer Start input (IN) is connected with the coupling point.

A timer function can subsequently be converted into another timer function if required. The writing cursor must be positioned inside the function element when you select the desired timer function. The timer element can be deleted with the key .

10-56 Installation

10.5.13 Timer - Shut-down delay (SF)

Various parameters are entered into the Shut-down delay fields: The timer is started as a switch-off delay by a transition from 1 to 0 at the input (IN: bit operator). The duration or timer value/loop (PT: word operator) is entered as an additional input parameter. (ST: Bit operator optional) stops the timer, and the Reset input (R: Bit operator optional) resets it. The actual timer value can be read via the output (ET: word operand optional). ). At the output, the delayed shut-down is available as the result of a logic operation (Q: bit operand). The timer loop name is entered into the field above the timer element. Not all connections are available with all controllers. If the timer element is used as an output element, the Timer Start input (IN) is connected with the coupling point.

A timer function can subsequently be converted into another timer function if required. The writing cursor must be positioned inside the function element when you select the desired timer function. The timer element can be deleted with the key .

10.5.14 Up Counter (CU)

Various parameters are entered into the highlighted fields: A counter counts up if a transition from 0 to 1 occurs at the respective input (CU: bit operand). A counter is loaded with the nominal counter value (PV: word operand optional) via the Set input (LD: bit operand optional). A counter is reset if the Reset input (R: bit operand optional) is set. The actual counter value can be read via the output (CV: word operand optional). The result of the logic operation (Q: bit operand) is set to 0 when the counter reaches 0. The counter name is specified in the field above the counter element.

Installation 10-57

Not all connections are available with all controllers. If the counter element is used as an output element, the input of the counting edge is connected with the coupling point. You can subsequently convert the up counter into a down counter if required. Position the writing cursor inside the function element and select the down counter function. The counter element can be deleted with the key .

10.5.15 Down Counter (CD)

Various parameters are entered into the highlighted fields: A counter counts down if a transition from 0 to 1 occurs at the respective input (CD: bit operand). A counter is loaded with the nominal counter value (PV: word operand optional) via the Set input (LD: bit operand optional). A counter is reset if the Reset input (R: bit operand optional) is set. The actual counter value can be read via the output (CV: word operand optional). The result of the logic operation (Q: bit operand) is set to 0 when the counter reaches 0. The counter name is specified in the field above the counter element. Not all connections are available with all controllers. If the counter element is used as an output element, the input of the counting edge is connected with the coupling point. You can subsequently convert the down counter into an up counter if required. Position the writing cursor inside the function element and select the up counter function. The counter element can be deleted with the key .

10.5.16 Up/Down Counter (CU&CD)

Various parameters are entered into the highlighted fields:

10-58 Installation

A counter counts up or down if a transition from 0 to 1 occurs at the respective input (CU or CD: bit operands). A counter is loaded with the nominal counter value (PV: word operand optional) via the Set input (LD: bit operand optional). A counter is reset if the Reset input (R: bit operand optional) is set. The actual counter value can be read via the output (CV: word operand optional). The result of the logic operation (Q: bit operand) is set to 0 when the counter reaches 0. The counter name is specified in the field above the counter element. Not all connections are available with all controllers. If the counter element is used as an output element, the upper input of the counting edge is connected with the coupling point. It is not possible to subsequently convert the up/down counter into a different counter function. To delete the counter, position the writing cursor . inside the function element and press the key

10.5.17 Comparator - Equal

The word operands to be compared are entered into fields IN1 and IN2. If the two operands are identical (Equal =), the output bit Q is set. A comparator can subsequently be converted into a different comparison function if required. The writing cursor must be positioned inside the function elements when you select the desired comparison. You can delete the comparison element with the key . A comparator cannot be used as an output element.

10.5.18 Comparator - Not equal

The word operands to be compared are entered into fields IN1 and IN2. If the two operands are not equal (Not equal <>), the output bit Q is set. A comparator can subsequently be converted into a different comparison function if required. The writing cursor must be positioned inside the function elements when you select the desired comparison. You can delete the comparison element with the key . A comparator cannot be used as an output element.

10.5.19 Comparator - Greater than

Installation 10-59

The word operands to be compared are entered into fields IN1 and IN2. If the value of the first operand is greater than (>) that of the second, the output bit Q is set. This comparator is not available with some controllers. A comparator can subsequently be converted into a different comparison function if required. The writing cursor must be positioned inside the function elements when you select the desired comparison. You can delete the comparison element with the key . A comparator cannot be used as an output element.

10.5.20 Comparator - Greater than or equal

The word operands to be compared are entered into fields IN1 and IN2. If the value of the first operand is greater than or equal (>=) to that of the second, the output bit Q is set. This comparator is not available with some controllers. A comparator can subsequently be converted into a different comparison function if required. The writing cursor must be positioned inside the function elements when you select the desired comparison. You can delete the comparison element with the key . A comparator cannot be used as an output element.

10.5.21 Comparator - Less than

The word operands to be compared are entered into fields IN1 and IN2. If the value of the first operand is less than (<) that of the second, the output bit Q is set. This comparator is not available with some controllers. A comparator can subsequently be converted into a different comparison function if required. The writing cursor must be positioned inside the function elements when you select the desired comparison. You can delete the comparison element with the key . A comparator cannot be used as an output element.

10-60 Installation

10.5.22 Comparator - Less than or equal

The word operands to be compared are entered into fields IN1 and IN2. If the value of the first operand is less than or equal (<=) to that of the second, the output bit Q is set. This comparator is not available with some controllers. A comparator can subsequently be converted into a different comparison function if required. The writing cursor must be positioned inside the function elements when you select the desired comparison. You can delete the comparison element with the key . A comparator cannot be used as an output element.

10.5.23 Jump at RLO = 1 (JPC)

Jump (JPC) if the input condition is true (RLO=1). The jump destination is specified as the operand. The input condition can subsequently be changed if required. Position the writing cursor inside the function element and select Jump if RLO=0. The jump element can be deleted with the key .

10.5.24 Jump at RLO = 0 (JPU)

Jump (JPU) if the input condition is not true (RLO=0). The jump destination is specified as the operand. The input condition can subsequently be changed if required. Position the writing cursor inside the function element and select Jump if RLO=1. The jump element can be deleted with the key .

10.5.25 Module call at RLO = 1 (CMC)

Call module (CMC) if the input condition is true (RLO=1). The destination module is specified as the operand. The input condition can subsequently be changed if required. Position the writing cursor inside the function element and select Call module if RLO=0. The jump element can be deleted with the key .

Installation 10-61

10.5.26 Module call at RLO = 0 (CMCI)

Call module (CMCI) if the input condition is not true (RLO=0). The destination module is specified as the operand. The input condition can subsequently be changed if required. Position the writing cursor inside the function element and select Call module if RLO=1. The jump element can be deleted with the key .

10.5.27 End of module at RLO = 1 (EMC)

End of module (EMC) if the input condition is true (RLO=1).

10.5.28 Output assignment (=)


The assignment relates the result of the logic operations (RLO) with an operand. As long as the operations are true, the operand remains set.

The bit operand is entered into the input field.

10-62 Installation

10.6 Toolbox Menu SFC 10.6.1 Swap out


To structure the sequence more in detail, so-called swap-outs can be produced. They represent an extract of the sequence. Swap-outs are especially useful for the printing. The swap-out is a graphic tool which does not influence the sequence. The swap-out can be cancelled anytime, with the function Swap-in.

Additionally, branch swap-outs can be produced from a branch of an alternative or simultaneous branch. Branch swap-outs are not shown in the table of contents. Put the mouse cursor to the element which has to be swapped out, or mark the area which has to be swapped out. For the branch swap-out, you have to put the mouse cursor to the branch which is above the desired swap-out branch (see illustration). Next, activate this function, and the element/the area is relocated and positioned one level lower. A swapout symbol is produced. In this symbol, the start and finish of the swapout is indicated. You can reach the swap-out level with a click on the swap-out symbol. There, you can edit the sequence (extract) further. You change to a lower level. You can get back to the sequence via the button .

Shortcut: Symbol bar:

Installation 10-63

10.6.2 Swap in
With this function, you can cancel a swap-out , i.e. all swapped out step elements are inserted into the original sequence. To cancel a swap-out, you have to place the mouse cursor to the swap-out element. This operation does not change the sequence. Swap-out and swap-in are graphic tools for the structure of the sequence.

Shortcut: Symbol bar:

10.6.3 Insert sequence


In the SFC, you can program several independent sequences. To insert a sequence, put the mouse cursor in the table of contents on the field with the index number. Depending on where you put the cursor (up or down), you can insert before or after the current element. You can or , respectively. You can realize this with the mouse cursor symbol also delete or move the element.

MADAP sequence

Step marker technique sequence

With a mouse click on Edit ..., you can reach the correspondent sequence level.

Shortcuts: Symbol bar: Keyboard:

10.6.4 Insert description


In a description field, any text (commentary) can be inserted. The description field is inserted into the table of contents and edited.

10-64 Installation

To insert a sequence, put the mouse cursor in the table of contents on the field with the index number. Depending on where you put the cursor (up or down), you can insert before or after the current element. You can or , respectively. You can realize this with the mouse cursor symbol also delete or move the element. With a mouse click on Edit ..., you can reach the correspondent sequence level.

Shortcuts: Symbol bar: Keyboard:

Dialog box Description Headline in the table of contents Here you can register the text which appears in the description in the table of contents.

Description Here you can insert any text (commentary).

10.6.5 Transition/Step
With this function, you can insert a step element, consisting of a transition and a step. With this simple sequence, one step after another is executed. One step (1) is inactivated, when the transition condition is realized (2). That way, the succeeding step (3) is activated (in MADAP, the BEFA condition must be realized for the execution of the step).

Put the mouse cursor on a step to insert a new step element above this position. With the programming type step marker technique, you can also insert on the start step. If you put the mouse cursor on the connecting line of a transition step element is inserted below this position. You can also delete or move the element at the described positions ,a

Shortcuts: Symbol bar: Keyboard:

Installation 10-65

10.6.6 Simultaneous branch


After the entry (1), all sequences in the branch are executed (2). As soon as all branches are passed through (3) and the transition condition is realized (4), it is switched to the succeeding step and all steps within the simultaneous branch are inactivated.

Put the mouse cursor on a step to insert a simultaneous branch above this position. With the programming type step marker technique, you can also insert on the start step. If you put the mouse cursor on the connecting line of a transition simultaneous branch is inserted below this position. , the

Also, an input transition is inserted immediately before the branch. At this point of the transition, the branch can be deleted or moved .

Extend the branch: The inserted simultaneous branch consists in the first place of two branch parts. This branch can be extended with any number of branch parts. You have to put the mouse cursor on a branch insert position . See also in the help branch: Context help branch If simultaneous branches are programmed, Bit 12 (no step-on in same cycle) in parameter 1 of the mode selection, should not be set on 1.

Shortcuts: Symbol bar: Keyboard:

10.6.7 Alternative branch


The transitions are checked from the left to the right (1). The first applicable transition condition activates the corresponding succeeding step (2). Only the steps in this branch are executed (3).

10-66 Installation

Put the mouse cursor on a step to insert an alternative branch above this position. With the programming type step marker technique, you can also insert on the start step. If you put the mouse cursor on the connecting line of a transition alternative branch is inserted below this position. , the

Also, an input transition is inserted immediately before the branch. At this point of the transition, the branch can be deleted or moved .

Extend the branch: The inserted alternative branch consists in the first place of two branch parts. This branch can be extended with any number of branch parts. You have to put the mouse cursor on a branch insert position . See also in the help branch: Context help branch

Shortcuts: Symbol bar: Keyboard:

10.6.8 Loop
First of all, with the loop, the transition of the succeeding step is checked (1). Then follows the check of the transition condition of the line with an arrow (2). If the return condition is true, it is jumped to the top end of the line with an arrow (3).

Put the mouse cursor on a step to insert a loop above this position. With the programming type step marker technique, you can also insert on the start step. If you put the mouse cursor on the connecting line of a transition loop is inserted below this position. , the

Installation 10-67

A body of the loop is inserted with the loop. This body consists of a step and the return condition. Besides, a transition is inserted above the line with an arrow. At this position, the loop can be deleted or moved.

Complex loops Another possibility of inserting a loop is the marking: If you mark several steps (branches and swap-outs, too), the return line is drawn around the whole marked area .

Nested loops Of course, the loops can also be nested; i.e. a new loop can be inserted within a loop block.

Shortcuts: Symbol bar: Keyboard:

10.6.9 Jump
First of all, the transition of the succeeding step is checked (1). Then follows the check of the transition condition of the jump (2). If the return condition is true, it will jump to the step of the number which is displayed in the jump destination (3). Example: The jump destination includes the entry "4". The jump goes to the step xN4 in the current sequence.

Put the mouse cursor on a step to insert a jump above this position. With the programming type step marker technique, you can also insert on the start step. If you put the mouse cursor on the connecting line of a transition jump is inserted below this position. , the

Shortcuts: Symbol bar:

10.6.10 Step action - Non-remanent (=)


With this step action, the feedback variable is set with activating of the step (On, TRUE), and is set back with inactivating it (Off, FALSE). The variable is set as long as the affiliated step is active. Context help step action

10-68 Installation

With the step action Non remanent, the same feedback variable can be used only once in the whole SFC. If you want to access to the variable more than once, you have to use the step actions Remanent (S) and Reset with priority (R).

Shortcut: Symbol bar: or , respectively

10.6.11 Step action - Reset with priority (R)


With this step action, the feedback variable is set back (Off, FALSE). Even after the inactivation of the step, the variable remains set back. Context help step action

Shortcut: Symbol bar: or , respectively

10.6.12 Step action - Remanent (S)


With this step action, the feedback variable is set (On, TRUE). Even after the inactivation of the step, the variable remains set. Context help step action

Shortcut: Symbol bar: or , respectively

10.6.13 Step action - With time limit (SP)


With this step action, the feedback variable (time element) is set with activating the step (On, TRUE). The given time (in the field below the qualifier) is set. The variable is set back when the time is over or when the step is becoming inactive (Off, FALSE). Context help step action

Shortcut: Symbol bar: or , respectively

10.6.14 Step action - With delay (SR)


With this step action, the given time (in the field below the qualifier) is set. The feedback variable (time element) is set (On, TRUE), when the time is over. The variable is set back when the step is becoming inactive (Off, FALSE). Context help step action

Installation 10-69

Shortcut: Symbol bar: or , respectively

10.6.15 Step action - Remanent with time limit (SPE)


With this step action, the feedback variable (time element) is set with activating the step (On, TRUE). The given time (in the field below the qualifier) is set. The variable is set back (Off, FALSE) when the time is over, even when the step is not active anymore. Context help step action

Shortcut: Symbol bar: or , respectively

10.6.16 Step action - Remanent with delay (SRE)


With this step action, the given time (in the field below the qualifier) is set. The feedback variable (time element) is set (On, TRUE), when the time is over. The variable is not set back (Off, FALSE) when the step is becoming inactive. Context help step action

Shortcut: Symbol bar: or , respectively

10.6.17 Step action - Set counter (SC)


With this step action, a counter is set on the given value (in the field below the qualifier). The counter is edited in the field of the feedback variable.The counter value can be changed with the step actions RC, CU, and CD. Context help step action

Shortcut: Symbol bar: or , respectively

10-70 Installation

10.6.18 Step action - Reset counter (RC)


With this step action, a counter is set back (to the value zero). The counter is edited in the field of the feedback variable. The counter value can be changed with the step actions SC, CU, and CD. Context help step action

Shortcut: Symbol bar: or , respectively

10.6.19 Step action - Increment counter (CU)


With this step action, a counter is increased (+1). The counter is edited in the field of the feedback variable. Context help step action

Shortcut: Symbol bar: or , respectively

10.6.20 Step action - Decrement counter (CD)


With this step action, a counter is decreased (-1). The counter is edited in the field of the feedback variable. Context help step action

Shortcut: Symbol bar: or , respectively

10.6.21 Step action - Module call (CMC)


This step action results in a conditional module call (CMC). The module call happens with the activation of the step. In a dialog box, the module name can be edited. Context help step action

Installation 10-71

Shortcut: Symbol bar: or , respectively

Dialog box Step action module call (CMC)

Here, you can edit the module name for the conditional module call (CMC). You can only choose program modules which are already existent.

10.6.22 Step action - PLC instructions


With this step action you can integrate common PLC instructions.

If you click on the Edit field, you reach the PLC level. The inputs can only be made on this level. You can edit the PLC instructions in the IL, LD, or FBD programming languages. Edit only the first network on the PLC level. All other networks are not considered. With the menu function File, Back to sequence, the PLC level is left and you get back to the sequence. The PLC instructions are saved for every step in a UAWLxxx.PXO file which is especially made for it (xxx = consecutive number). All inputs are checked and integrated into the sequence (are not visible). The instructions are only visible on the PLC level. Instead of this, the step action element PLC is used to indicate the instructions. Contrary to the function 'Edit', 'Go to PLC instructions for step', the instructions are executed only when the transition (and BEFA) is realized. The produced UAWLxxx.PXO file is kept on the harddisk, even if you delete the corresponding step action 'PLC instructions' (this way, the Undo/Redo function is guaranteed). With the function 'File', 'Create sequence' you can 'delete all UAWLxxx.PXO (option) files which are unnecessary. Context help step action

Shortcut: Symbol bar: or , respectively

10-72 Installation

10.6.23 AND transition


The AND transition represents a logical link of bit variables. Put the to the entry of a transition to insert the boolean operamouse cursor tion.

In the MADAP programming type, the AND transition is applicable to the BEFA elements.

Shortcuts: Symbol bar: Keyboard:

10.6.24 OR transition
The OR transition represents a logical link of bit variables. Put the mouse cursor to the entry of a transition to insert the boolean operation.

In the MADAP programming type, the OR transition is applicable to the BEFA elements.

Shortcuts: Symbol bar: Keyboard:

10.6.25 Negation
With the negation, a transition condition can be inverted. Put the mouse cursor to the entry of the transition which has to be negated.

In the MADAP programming type, the negation is also applicable to BEFA elements.

Shortcuts: Symbol bar: Keyboard:

Installation 10-73

10.6.26 Comment
A comment field can be inserted in the area between a step and a transition (a transition and a step). To delete or move a comment field, you have to put the mouse cursor to the line which is to the left of the comment field.

Shortcuts: Symbol bar: Keyboard:

10.6.27 Sequence/Step parameters (MADAP only)


Here you can make the presets to the cascade organization module KETTE. The global waiting and watchdog time can be adjusted in a dialog box. Furthermore, PLC instructions can be inserted for a sequence (cascade); so that you can, for example, set the Waiting and the Watchdog time for a sequence individually. The chain/step parameters are only relevant for the MADAP programming type.

Dialog box Sequence/Step parameters Parameter for cascade organization module Here you can adjust the global Waiting and Watchdog timer. The input can be made as a timer (e.g. t#3s) or as a constant. The constant is multiplied with the factor 100ms (e.g. the input 30 is equivalent to the time 30 x 100ms = 3s).

PLC instructions for step module This function is now available via the menu 'Edit', 'Go to PLC instructions for step'.

Dialog box Sequence/Step parameters CL200

Here you can make the presets to the cascade organization module KETTE200 or BTSMADAP. The sequence/step parameters are only relevant for the MADAP programming type. The various registry cards contain different functions:

General: Here you can adjust the global Waiting and Watchdog timer. Choose the Number of sequence to which the time setting should correspond to. If you want to set times globally for all chains, activate the option Take over times of 1st sequence for all sequences. The input can be made as a timer (e.g. t#3s) or as a constant. The constant is multiplied with the factor 100ms (e.g. the input 30 is equivalent to the time 30 x 100ms = 3s).

10-74 Installation

Module Select here the desired function module KETTE200 or BTSMADAP. You probably have to add the call-up parameters in the registry card 'KETTE' or 'BTSMADAP', respectively.

KETTE: If you choose KETTE200 as the function module (must be selected in the registry card 'General'), then you have to fill-up the call-up parameters: P0: By activating the Manual diagnosis (1= On, 0= Off) an active step is diagnosed, independent from an interference message. P1: Diagnosis branch selection determines, which branch of the sequence (0= diagnosis in the manual branch, 1= automatic branch) should be diagnosed. A diagnosis, which is activated by a cascade error, will always use the automatic branch. P2: Edit the Number of sequence, for which the function module is supposed to be. P3: The Sequence number is predetermined. P4: With Answering of FC you can choose the word operand. Possible error or status messages are handed over to the word operand by the cascade organization module.

BTSMADAP If you choose BTSMADAP200 as the function module (must be selected in the registry card 'General'), then you have to fill-up the call-up parameters. The fields are already set with default values, which you can change if necessary.

10.6.28 Copy automatic conditions to the manual branch


Two functions of a sequence can be realized in the MADAP programming type: the automatic condition and the manual branch. Whereas the automatic branch runs with the defined steps considering the automatic conditions, every step in the manual branch is made considering the manual conditions. During the editing in the automatic branch, the WinSPS copies the structure of the sequence automatically to the manual branch. Only the inputs in the edit fields of the transition and BEFA conditions are not included in this copying process. Activate this function to transmit all entries from the automatic branch to the manual branch. This is especially useful if you want to realize the inching mode (automatic operation at the touch of a button).

Installation 10-75

In the MADAP programming type, all inserts should be made in the automatic branch at first. The sequence structure is automatically transferred to the manual branch where it can then be changed. If you also need the BEFA- and transition conditions in the manual branch (inching mode), you can update them with this menu function. If you principally do not need the manual branch, do not make any changes there, and also do not execute the copy process of the automatic conditions. Hence, you save memory in the controller.

10.6.29 Options
Here, global presets for the sequential function chart can be made. A dialog box appears.

Dialog box Options for sequential function chart

Here, global presets for the sequential function chart can be made.

Relation Symbol/Comment This preset causes an effect to the representations of the transition, step action, and BEFA. Depending on the preset, the width of the representations of symbols (yellow edit field) and symbol comments (white field) changes. As an example, the symbol comment can be totally faded out to use the whole width for the symbols (Symbol 100%, Comment 0%).

Programming type There are three ways to program and compile in the SFC editor: 1 MADAP: Especially for the BOSCH control and operate concept 2 MADAP with BEFA=1: Immediate instruction execution (without BEFA check) 3 Step marker technique according to IEC 1131-3 Before you start the SFC programming, you have to select the programming type.

Options The comment fields can include multi-line texts. However, you can also activate the option Single-line comment to get the opposite. The colored elements are printed in different gray levels when the option Print-colored SFC graphic is switched off. If you activate the option New steps with default value, all edit fields of the new steps are set as follows: BEFA with "-LOG0", Step action with "M 0.0" and the transition with "-LOG1".

10-76 Installation

Activate the option Step modules with xNx labels to use the same symbolic in the step modules (SCHRKxx.PXO, created with the function 'Generate Sequential function chart') as in the sequence itself. This improves the readability if you want to check the step modules.

Sequence No. distribution If you set up a new SFC file or a new sequence in the manual preset, a dialog box appears which enables you to distribute chain numbers. The chain numbers are distributed in ascending order with the preset automatic.

Installation 10-77

10.7 Control Menu


This menu contains all functions to handle communications with the controller (except for comparison functions; these are contained in the File menu): - Load programs and modules into the controller - Unload programs and modules from the controller (in preparation) - Display controller states (Infostatus, reference list) Additional functions are tailored to the particular features of some specific controllers and modules. The interface test allows the automatic setting of the communication parameters.

10.7.1 Load
This function can be used to load programs or individual modules into the controller. All load settings can be made in a dialog box.

Dialog box Load In this dialog box, you can specify all relevant parameters for the loading process:

Module If the option current module is selected, only the current module or data module file will be loaded into the controller. You should use this option only if a complete program has already been loaded into the controller and you want to exchange the respective module. If you select the option from symbol file (OM, FC, DM), all modules which are listed in the symbol file will be loaded into the controller. This process loads the entire program. In case you would like to load the program, but the contents of the data modules in the controller should not be deleted, then you should choose the option according to the symbol file from symbol file (OM, FC, without DM).

Make sure that all access to data modules is secured. The option from batch file is used to load all modules which are listed in the batch file into the controller. This option is particularly suited to load several modules into the controller. The batch file can be selected in the adjacent selector box. The Set-up button can be used to call up another dialog box which allows you to edit the selected batch file.

10-78 Installation

Controller option Loading can optionally be either in the Run or Stop mode (with controller stop) of the controller. When loading in the Run mode (without controller stop) is selected, the modules will be loaded and activated according to their listing sequence in the symbol or batch file, respectively.

When loading without controller stop, the module is loaded and immediately activated. Therefore, please ensure the proper sequence when loading from the symbol or batch file! This option can be selected for the CL500 multi-processing for the current control processor or for the entire system.

Check option With the option with symbol assignment, all module files will be revised before the loading takes place. This means that symbol changes in the symbol file will be respected which have been made after the creation of the module. We recommend to always activate this option. The assignment and linking process known from the PROFI software is not required in the WinSPS software. The option with parameter check checks the number of parameters for all instructions which contain module calls before the module files are loaded. Module calls without parameters are also checked. This option should always be activated.

Loading option The loading options can only be selected if the controller option with controller stop has been selected. In addition to Reset remanent operand, it is also possible to delete the data field and the forcing list during loading. It is also possible to load the current data field file DFELD.DXD or forcing file FIXIER.FXD into the controller. If you only want to load the data field or forcing file without module files, select loading from batch file and specify an empty batch file.

Loading is initiated with the OK button.

10.7.2 Unload
This function can be used to unload programs or individual modules from the controller. All load settings can be made in a dialog box.

Dialog box Unload This function can be used to unload programs or individual modules from the controller. Again, they can be set up as a program module file on your PC. They can be edited and can be loaded anew.

Installation 10-79

Please note that the unloaded modules do not contain symbolic address operands and comments because they do not exist in the controller. You should only unload modules if there are no current modules on your PC. Requests guarantee that you do not overwrite existing modules unintentionally. You have the following options: Reference list (OM,FC, DM): The whole program is unloaded from the controller. Reference list (only DM): Only the data modules data modules are unloaded. Current module: The module whose name is stated in the presets, is unloaded. Depending on the editor (program or data module), the current program module or data module file will be unloaded from the controller. From symbol file: All modules which are marked in the symbol file are unloaded. From batch file: An extract from the symbol file (=batch file) is unloaded. The Set-up button can be used to call up another dialog box which allows you to edit the selected batch file.

Additionally, the data field and the forcing list can be unloaded from the controller.

10.7.3 Load date and time


This loads the current date and time into the controller.

10.7.4 Load firmware


This function can be used to load a system firmware into the controller. All firmware files in the current ZS directory and in the library directory are listed in a dialog box.

Dialog box Load system firmware The name, the version number and the date of the firmware file are shown. If the file is contained in the library directory, LIB is appended to the filename. In case you use firmware files from the PROFI Software, the file extensions must be changed from .FBP to .F2P resp. from .FAP to .F7P. WinSPS can only read firmware files entitled .F2P resp. F7P.

10-80 Installation

If you use the module ZS201 (or greater), you have to use the Windows qualified firmware files.

To load the firmware to the iCL700 you have to switch the control to the boot mode (knob-setting = C). Loading is initiated with the OK button. The controller is halted, and the user program may be deleted.

10.7.5 Compare firmware


This function can be used to compare the system firmware in the controller with a firmware file on disk. This allows you to check which firmware version resides in the controller. . All firmware files in the current ZS directory and in the library directory are listed in a dialog box.

Dialog box Compare firmware file The name, the version number and the date of the firmware file are shown. If the file is contained in the library directory, LIB is appended to the filename. In case you use firmware files from the PROFI Software, the file extensions must be changed from .FBP to .F2P resp. from .FAP to .F7P. WinSPS can only read firmware files entitled .F2P resp. F7P. The comparison is initiated with the OK button. Another dialog box will then appear which contains the comparison result: The name, the version number, the date, the byte length and the checksum will be displayed for both firmware files. Only when all files are identical, the system firmware will also be consistent. You can get more information about the system firmware via the menu function Control, Infostatus.

10.7.6 Save program to EPROM


This function can be used to transfer (save) the current user program in the PLC memory to the Flash EPROM memory. The controller is halted during this process. For the CL200 this function is not possible in mixed mode (user program runs in RAM and in Flash EPROM memory).

After the user program has been saved and programs have subsequently been reloaded, the contents of both memory areas are different!

Installation 10-81

10.7.7 Save program to Memory Card


This function can be used to transfer (save) the current user program in the PLC memory to the Memory Card (MC). The controller is halted during this process. Only the program parts which reside in the RAM memory will be saved; the EPROM memory contents are not saved.

Data modules in the 2nd segment (DM256 to DM511) can not be saved on Memory Card.

10.7.8 Load program from Memory Card


This function can be used to transfer (load) the user program in the Memory Card (MC) to the RAM of the PLC. The controller is halted during this process.

10.7.9 Save program to System


This function can be used to transfer (save) the current user program in the PLC memory to the EPROM of the SMNC-module. The controller is halted during this process. Please take note of the knob-setting on the SMNC-module.

10.7.10 Load program from System


This function can be used to transfer (load) the user program in the EPROM of the SMNC-module to the RAM of the PLC. The controller is halted during this process.

10.7.11 Memory dump


This function is only suitable for special debugging purposes using the controller.

Dialog box Memory dump A direct memory dump of the controller can be saved in an ASCII dump file. For this purpose, a hexadecimal start address and the length of the desired dump are specified. Subsequently, you can call up the text editor with the current dump file.

10.7.12 Delete memory


This function deletes the user program in the PLC memory (RAM).

10-82 Installation

10.7.13 Start-up mode


This function is used for the start-up phase of the PLC and determines whether the program is to be loaded from the RAM memory or from the Memory Card (MC).

10.7.14 Run
This switches the controller into the Run state. For the CL500, you can specify in another dialog box whether you want to switch the current control processor or the entire system into Run.

10.7.15 Stop
This switches the controller into the Stop state. For the CL500, you can specify in another dialog box whether you want to switch the current control processor or the entire system into Stop.

10.7.16 Infostatus
The Infostatus function collects all available information about the connected controller. In addition, a system test about header information and module lengths can be made. In case of an error, a detailed error description can be obtained. A dialog box displays the controller information.

Dialog box Infostatus Infostatus collects all available information about the connected controller (Configuration). In addition, a System Test can check header information and module lengths. In the case of an error, a detailed error description can be obtained (Status Info, Module Stack). If there are errors in the program sequence, you can use the button Go to which enables you to open and edit the faulty file. Errors can also be found in library modules. However, only three lines of the error position are displayed of the library module.

Configuration This can provide different information, depending on the controller type. The output is cyclically updated.

System Test For the system test, the reference list is unloaded from the controller and its entries are checked. The result is then displayed.

Diagnostic Stack This collects and displays error and diagnostic states of the controller in chronological order. Date and time of the states are displayed.

Status Info, Module Stack This provides detailed error information in case of an error.

Installation 10-83

Program Flags This lists the program flags.

User Stack This displays the user stack.

10.7.17 Reference list


The reference list is a summary of all currently loaded program and data modules of the controller. The modules are listed in a dialog box.

Dialog box Reference list The reference list is a summary of all currently loaded modules, or of the organizational modules (OM), program modules (FC) or data modules (DM) only. The module type with module number, the symbolic module name, the hexadecimal start address of the module in the controller, the module length in bytes, and the version number listed in the parameter list, are displayed. The Attr. column indicates a protected library module .

10.7.18 Interface test


This function checks all available communication interfaces in order to find the suitable setting on the module. This can be used to determine the interface parameters COMx, baud rate, parity, data and stop bits or ZAT automatically. The controller must be switched on and the proper cable (connecting cable K16, K19) must be plugged. If a connection to the controller cannot be established, check the physical connection between the programming unit and the PLC. The interface test can take several minutes. If the matching module is found at an interface, the parameters will be displayed and the presets accepted. Please ensure that the communication with the controller takes place with the highest possible baud rate so that the data transmission is not slower than necessary.

10.7.19 System Coordinator (SK Table)


This is used to declare all intelligent modules which operate on the system bus of the CL500 or CL400. The SK Table must be edited and loaded into the System Coordinator SK500 or into the Central Processing Unit ZS400, respectively, before a PLC program is loaded. If intelligent modules are not used in the CL400 controller, the SK table need not be edited and loaded.

10-84 Installation

The settings are loaded automatically from the file SK.SXK from the subdirectory SK into the dialog box of the SK table. There you can view and edit the settings; in addition, this is the place where the loading of the SK table into the controller and also the unloading from the controller can be made.

Dialog box System Coordinator (SK Table)

The table lists all intelligent modules in the order of their module numbers. In order to add a module to the table or to make changes for a listed module, highlight the desired line in the table.

Editing of the SK table: Module Here you can select the desired module. The modules ZS400 or SK500, respectively, cannot be specified because these modules are always module no. 0 and need not be specified explicitly. It is recommended to use module numbers 1 through 4 for the ZS modules of the CL500. To delete a module from the SK table, specify None.

Block address After having selected the module, specify the block address which must be consistent with the switch setting on the module. The DIL button can be used to display an illustration with the DIL switch configuration of the module. Please observe the relationships between the permitted block address of the module and the number of blocks used in order to avoid addressing conflicts.

Module is in rack If you want to specify modules in the SK table which will be inserted into the rack at a later time, disable this option. If the option is enabled, Yes will be displayed in the column Mod. in rack in the SK table, otherwise No is displayed.

Number of interrupt modules This entry refers to the ZS modules of the CL500 and the ZAT module. An entry of 1 means that an interrupt input module has been provided. This is not possible for the ZS500. The entry is displayed in the column IR mod. of the SK table.

Synchronization method (not CL400) This entry refers to the ZS modules of the CL500 and the ZAT module.

Installation 10-85

It allows to synchronize the execution of the PLC programs in the abovementioned modules at run-time. There are eight synchronization methods which can be enabled via the eight selection options. Synchronization is not possible for the ZS500. In the column Synchron. method of the SK table, 1 indicates that a synchronization is used; otherwise, 0 is displayed.

Remanency error (not CL400) This entry refers to the ZS modules of the CL500 and the ZAT module. Here you can specify if a Stop is initiated in the case of a data loss (e. g. after removing a module or the memory module) either for the current module only or for the entire system. The ZS500 module cannot initiate a system Stop (only ZS501, etc.). The indication Module or System appears in the column Rem. Stop of the SK table.

Address This entry is used for the TCP/IP Address of COM-E Modules.

Peripheral address (not CL400) This entry refers to the ZS modules of the CL500 and the ZAT module. A relationship exists between the block address and the peripheral start address. If the abovementioned modules are selected, the WinSPS software respects this relationship and displays the matching peripheral addresses. These should only be changed of required.

I/O length, EI/EO length This entry refers to the ZS modules of the CL500 and the ZAT module. The two entries I/O length and EI/EO length must be identical. The default setting for the useable I/O and EI/EO area is 64 bytes. While considering various criteria, one of the abovementioned modules (except ZS500) may also be assigned larger or smaller ranges. If the range is enlarged, it should be considered that this reduces the peripheral range of the next ZS or ZAT module.

Load SK Table: If all module data has been entered, the SK table can be loaded into the controller by clicking on the Load button. After the loading of the SK table, a check is done whether the time in the SK differs to the PC time. If the difference is greater than 10 minutes, a dialog box appears with a request whether the date an time should be loaded into the controller. The Unload button can be used to unload an SK table from the controller.

10-86 Installation

Clicking on the OK button will terminate the editing process and save the SK table automatically as file SK.SXK in the subdirectory SK. When this function is called up again, and the last edited state is displayed. In addition, a text file SK.TXT is created in the subdirectory SK and in the current ZS directory. This file can be printed directly and can thus be used for the project documentation.

10.7.20 Load date and time


Loads the current date and time into the controller.

10.7.21 Protocol loader


This function can be used to load protocol files for computer modules into the controller or deleted in the controller. The files and modules are displayed in a dialog box.

Dialog box Protocol loader Protocol files This table lists all protocol file which have been found on disk. The protocol file must be contained in the library directory (also SK directory for CL500). The respective release date, the protocol name and the version number of the protocol are displayed. Moreover, it is indicated for which computer module, with which hardware and firmware version and for which channel the file can be loaded.

Modules This is a listing of the computer modules which have currently been found in the controller (entry in the reference list). The block address, the number of blocks used, the hardware and firmware version, the current channel as well as the protocol with version number (if already loaded) are displayed. To load a protocol file into the controller, select the desired protocol file and the module as well as the desired channel and click on the Load button. It is possible to load a separate protocol for each channel or the same protocol for both channels. To delete all protocols in a computer module, select the desired module and click on the Delete button. The Central Processing Unit (the System Coordinator with CL500) must be in the Stop state during loading or deleting. The computer module is newly initialized after the transfer or the deletion has been completed. This will delete all data which are buffered on the module.

10.7.22 Profibus Projecting


This function can be used to load projecting data into the Profibus module, read them, compare them and save them. Moreover, it allows you to switch on/off the Profibus job logging function. The different functions are selected in a dialog box.

Installation 10-87

Dialog box Profibus Projecting Projecting path Here you can specify the directory in which the projecting files are stored. The default is the current ZS directory.

Projecting files This is a list of all projecting files which are available for the currently selected Profibus module. Project name, Date and Time of the files are displayed.

Modules This is a list of the Profibus modules which are used in the controller. The display includes the module type, the module number which has been entered in the SK Table, the station number on the Profibus (can be edited via the Bosch software Profibus Configurator and the DIP switches), the currently loaded projecting files and the Profibus transmission protocol including the version number.

Load/Unload For loading or unloading, select the desired modules and the desired projecting files and click on the respective button. The loading process is performed with or without a controller Stop, depending on the back-action on the program execution. If a Stop is required, a corresponding prompt will inform you.

Compare This compares the loaded projecting files with the currently selected files of the corresponding module. A result is displayed when the check has been completed. If the job logging function is enabled, channel 0 of the module is blocked for other serial protocols. The module will then output status messages over this interface. This allows you to monitor the communication process on a connected terminal or printer. The job logging function is intended for commissioning purposes only. You get a command overview by using "H" (Help) at the control unit of the Profibus module.

10.7.23 Load Ethernet projects


This function allows to load projecting files into an Ethernet module (COM-E or CMO2-E module) or to unload them from the module into the programming device (PG).

10-88 Installation

Projecting path Here you can specify the directory in which the projecting files (*.ETH) are stored. This directory must already exist and must already contain projecting files. The default is the current controller directory is used which can be modified as required.

Projecting files This is a list of all projecting files (*.ETH) which are currently available in the projecting path. You can select one of these files and transfer it into the connected Ethernet module by clicking on the Load button. The list shows the Project name (=filename) as well as the Date and Time when the files have been created. Projecting files are in ASCIIfile format and can therefore be created and edited with the text editor.

Modules This is a list of the currently connected Ethernet modules. It depends on which connection is established between the PG and the controller. For example, if you use several Ethernet modules on a CL200 and plug the connecting cable directly into one of these modules, only this single module will be displayed. However, if you connect the connecting cable to the V24 port of the ZE200, all Ethernet modules will bedetected. The list contains the module type (Bgr type) (e.g. "COM-E" for CL400/500, "COM2-E" for CL200). The module number corresponds to the consecutive numbering in der SK table for the controllers CL400/500 or the module block address for the CL200, respectively. The TCP/IP address of the module is assigned via the SK table. In addition, the filename of the currently loaded projecting file and the firmware version number of the module are displayed. You can load the highlighted projecting file into the selected Ethernet module by clicking on the Load button. Any previously loaded projecting file will be overwritten without prompting. During the Unloading process, the projecting file is transfered from the highlighted module into the projecting directory of the PG. If a file with the same name already exists there, it can be overwritten after a safety prompt. The job logging function allows it to record all data which are received and sent by the module. This activities can be monitored by connecting a terminal via channel 0 (V24 port) to the Ethernet module. During this monitoring, no other communication is possible in channel 0.

10.7.24 Load IP address


This function allows to load an IP address into an Ethernet module (COM-E or COM2-E module).

Installation 10-89

The current state is read from the connected module and displayed in a list. The list contains the module type (Mod type) (e. g. "COM-E" for CL400/500, "COM2-E" for CL200). The Mod number corresponds to the sequential numbering in the SK table for the CL400/500 controllers or the module block address for the CL200, respectively. The TCP/IP address of the module is assigned via the SK table. The filename of the currently loaded projecting file and the firmware version number of the module are also displayed. The address can be entered in the edit field New IP address; clicking on the OK button will write this address into the module.

The change should also be mirrored by a corresponding entry in the SK table (CL400/500 only). This eliminates the risk that incorrect IP addresses are activated during the next loading of the SK configuration.

10.7.25 Load MAP projecting data


This function loads a projecting file into a communications module. The projecting file is created using the MAP Configurator.

CL400 and CL500: This file must then be copied into the special subdirectory _MAP_MMSE of the current controller directory under the name of R500MAP.CFG. The directory _MAP_MMSE is automatically created by the WinSPS software (from version 2.3) when a new controller CL400 or CL500 is configured. If the directory does not exist, create it (e.g. using the Explorer), and copy the file into this directory. Example for MAP projecting directory: C:\Bosch\Project.PRJ\SPS.500\_MAP_MMSE\R500MAP.CFG

CL550: For the CL550 controller, the directory _MAP_MMSE is stored in parallel to the project directory. Example: C:\Bosch\Project.PRJ\_MAP_MMSE\COMMAP_11_6.CFG The directory _MAP_MMSE is automatically created by the WinSPS software when a new controller CL550 is configured. Provided that specific conventions are observed for the assignment of the filename of the projecting file, it is then possible to use the project configurator of the WinSPS to create an automatic configuration for a group of linked controllers.

If all files and directories exist, it must also be ensured that the communications module is switched "off-line" and that the display shows .

10-90 Installation

Upon activation of the load function, a window will appear which logs the loading process. If this window remains empty (black background), this is an indication that no proper transfer has been ensured, e.g. because the controller has not been switched on the connecting cable has not been plugged into the COM4/PG interface of the module or into the PG the connecting cable is defective the module has not been switched "off-line" the interface on the PG does not match the interface set in the KERMIT.INI file (see below).

In these cases, an error message will appear after 2-3 minutes. You may also cancel the operation by pressing the key even before the error Quit or message appears. You can close the window by entering . Exit and The MAP load function uses entries in the configuration file KERMIT.INI. This file is located in the program directory. In this file, the WinSPS software stores data about the interface, among other information. If problems with these settings occur, call up the menu function Interface test.

10.7.26 Central Programming


With this function, data for the Central Programming (CP) are displayed. The different functions are selected in a dialog box. You should look out for the compatibility of the firmware when using the module COM-E. In the following table, you can see which modules can be suited to the COM-E: Module SK500 SK510 ZS400 ZS401 Minimum request Firmware Version 205 Firmware Version 205 Software Version 2.5 Software Version 2.5

Dialog box Central Programming (Profibus Info)

With this function, PROFIBUS data for the Central Programming (CP) are displayed. The various registry cards contain different functions:

General The position of the Topology (.TOP) and Bus parameter file (.BUS) are displayed on the drive. You can change this entry. Both files are set up by the Bosch PROFIBUS configurator software (see paragraph 'Central Programming', Preparation - Bus configuration'). The current bus address on the PROFIboard is displayed in the Address PG field.This address is set by WinSPS automatically (lowest free address).

Installation 10-91

The Address dest. PLC field displays the bus address which has to be set up on the PROFIBUS module of the current controller. With the Connecting Test, you can try to set up a connection between the programming unit and the Destination PLC (similar to the interface test with a conventional connection).

Life List Here you can find a list of the available devices which are configurated at the PROFIBUS: All bus addresses are listed in the Add. column in ascending order. The device name and/or the controller name follows in the Name column. This name is read from the topology file (.TOP).

The listed controllers do not necessarily have to correspond with the devices which are actually connected to the bus. You have to take care of the correct addressing for the controllers (DIP switch on the PROFIBUS module). The Status column either displays - - - if the station is not connected to the PROFIBUS or switched off, or it displays PASSIVE if the station is a PROFIBUS-FMS slave, or it displays the ACTIVE_IN_BUS condition if the station has been recognized at the PROFIBUS (ready for CP). The Pos. column displays the position of the programming unit (PG) and the (Destination-)PLC. Further data from the topology file for this device is read when you place the cursor on an entry in the list. This data is displayed in the Producer, Type, Hardware Release and Software Release fields.

Bus parameter The data of the current bus parameter file (.BUS) is displayed here.

PROFIboard The data of the installed PROFIboard is displayed here.

Dialog box Central Programming (TCP/UDP/IP)

With this function, data for the Central Programming (CP) via TCP/UDP/IP can be changed and displayed. The various registry cards contain different functions:

IP address You have chosen the Internet Protocol TCP/UDP/IP as the interface setting in the file presets. A so-called IP-(Target)-Address must be given. Please insert the IP address, e.g. if you want to call up the software PLC PCL via TCP/UDP/IP.

10-92 Installation

The settings of the UDP channel options have to be adapted according to the capacity of the network. If many devices participate an your local ethernet (see also 'Overview'), there might be a high load and it can cause transmitting problems of the net. You can stop this by heighten the Repeat counter and/or the maximum time for request. With the Connecting Test, you can try to set up a connection between the programming unit and the destination PLC (similar to the interface test with a conventional connection). You have the possibility to protect the PLC against unauthorized write accesses by using a password. Please use the button Change password.

You do not have access to the controller any longer when you lose the password!

The password functionality of the module COM-E is available starting with version 1.1! You are asked to put in a password when using the button Login. After that, you get contacted with the TCP/UDP/IP module. This function has the advantage of not asking for a password again in the ensuing writeaccesses.

Overview A list of the devices which are connected on the ethernet, occurs here: The list shows the IP address, the type of device (e.g.. COM-E or PCL) and probably the module name of all found devices. The list can be Actualize via the corresponding button.

Dialog box Change password Here, you can put in an individual password to protect the PLC against unauthorized write accesses. If you already use a password, you can change it anytime.

You do not have access to the controller any longer when you lose the password!

The password functionality of the module COM-E is available starting with version 1.1! If you did not assign a password, enter the default password "BoschPlcSystems" as the Old Password. You can use any alphanumerical characters for the New Password. Please note the case shift. The characters are not shown during the input. Instead, every character is shown as *. You have to repeat the input in the field for the Password confirmation.

Installation 10-93

The password is transferred to the controller with the OK button and it is probably replaced by the old one.

10-94 Installation

10.8 Change Menu


This menu allows you to switch from the Editor to the Presets (main menu) or to the Monitor.

Another function allows the direct loading of the current program or data module with subsequent change into the Monitor.

10.8.1 Monitor
This function can be used to change into the Monitor. The offers the following options: Testing of programs Checking of controller and program states Viewing of the I/O state Tracing of module calls Forcing and manipulation of states

The Monitor requires a connection to the controller. This connection is established via a serial port of the computer using connection cable K16, K19 to the controller. The current baud rate is selected in the file presets. You can also make the system perform the settings automatically by selecting the menu function Controller, Interface test. If a connection to the controller cannot be established, please check the interface setting and the physical connection between the programming unit and the controller.

10.8.2 Load + Monitor


This function activates the loading process for the current program module or data module file. Only the actual file, but not the whole program will be loaded into the controller. The controller is not stopped. Subsequently, the Monitor is called up. This procedure is the best solution for making program changes with the system running and checking these changes afterwards. Please consider that this loading procedure will append the changes in the controller; this means that each loading process will reduce the available memory area of the controller. We recommend that you perform the regular loading procedure (menu Control, Load) from time to time in order to clean up the program memory of the PLC. The currently used memory area can be viewed in the Monitor via the function Control, Configuration diagram. The fastest way to activate this function is by pressing the key .

Installation 10-95

10.8.3 Presets
This function allows you to exit from the Editor and return to the Presets.

10-96 Installation

10.9 Help Menu


The WinSPS help provides information about the structure and use of the WinSPS software. Please push the this button WinSPS help. to get more information about using the

10.9.1 Contents
Calls up the WinSPS help and shows the list of subjects. Use the index cards of the WinSPS help to find information via the Contents, the Index or Search keywords.

Contents: Double-click on a book to display additional subjects. Another doubleclick will make the subjects disappear. Double-click on a subject to display the associated help information.

Index: The index works similar to the table of contents while offering the additional option to enter the word you are looking for (or its first letters). The index contains a list of major subjects in alphabetical order.

Search: This lists all words which are contained in the WinSPS help. You can enter the work you are looking for (or its first letters) and get a list of all subjects found which contain this word. You can call up the corresponding help subject with a double-click. The Options button allows you to specify search options. Please push the this button WinSPS help. to get more information about using the

10.9.2 Software Service


This is how you reach us ... the Bosch Erbach Hotline (+49) 6062 / 78 - 426

For suggestions how we can improve or software, as well as for questions and problems, you can always contact our telephone hotline. It can be called at normal office hours and is of course available free of charge for registered users of the WinSPS software:

Installation 10-97

Robert Bosch GmbH Geschftsbereich Automationstechnik Herr Michael Tondorf Abteilung: VTS Postfach 1162 D-64701 Erbach (Odenwald) Phone: (+49) 6062 / 78 - 426

Fax: (+49) 6062 / 78 - 662 e-mail: Michael.Tondorf@pcm.bosch.de

You are also invited to visit our mailbox (+49) 6062 / 7217 via modem.

10.9.3 Info
This function provides information about this version of the WinSPS software as well as about your existing license.

Monitor

11-1

11 Monitor
The Monitor offers the following options: Testing of programs Checking of controller and program states Viewing of the I/O state Tracing of module calls Forcing and manipulation of states

11.1 Calling up the Monitor


The Monitor can be called up via the menu function Change, Monitor or the Monitor button.

In the Editor, the function call Change, Load + Monitor can be used to initiate the loading of the current program module or data module file with a subsequent call of the Monitor:

Suitable tools are available for each of the monitors Program and Data Module as well as for the combined editors/monitors Operand Field, Data Field and Forcing. In addition, the Monitor provides the text editor. The desired editor/monitor can be called up via the menu function File... or via the six monitor buttons.

The file which has been selected in the Presets is loaded into the corresponding editor/monitor. Fixed filenames (DFELD.DXD and FIXIER.FXD) are used for the data field and the forcing list.

Revising existing PROFI projects Existing files from the PROFI software are automatically converted into the new WinSPS file format when the monitor is called up (except for library modules!). The program module and symbol files to be edited must have been created with PROFI software version 3.0 or later. For older versions, the files need to be converted first using the current version of the PROFI software. Additional information about file conversion is contained in chapter What you should know before you start, paragraph New project structure.

11-2

Monitor

Language conversion: An instruction list program which has e. g. been written in German (Anweisungsliste, AWL) will automatically be converted into an English Instruction List program (IL) when the English language set is called up (and vice versa). Simultaneous language conversion and PROFI conversion is not possible!

11.2 Module check


All modules need to be error-free. The modules are checked before the Monitor is activated. If a switch-over into the Monitor is not possible due to different module contents, you can use the comparison functions (Editor menu File, Comparison) to determine which parts of the program are not consistent.

11.3 Connection to the PLC


For working in the Monitor mode, a connection to the controller is required. This connection is selected in the file presets. You can also make the system perform the settings automatically by selecting the menu function Controller, Interface test. If you connected your components via Central Programming, please use the function Control, Central Programming which includes a special Connecting test. If a connection to the controller cannot be established, please check the interface setting and the physical connection between the programming unit and the controller. The cyclic controller access can be seen from the rotating Bosch logo in the right margin of the toolbar. An active trigger function is displayed by the continuous change of contrast of the rotating logo. {bmr mo_bosch.bmp} The cyclic controller access is interrupted if you switch to the command level (activate the menu bar). If you switch to another task, the cyclic controller access will continue. This means that data will still be read from the controller and displayed while you call up the WinSPS help (as you have done now).

11.4 Multiple calls


The WinSPS software can be started more than once. This allows you to edit several files - which can even belong to different projects - simultaneously or view them in the Monitor. For example, the first WinSPS process can control the Monitor display of a program module while the second WinSPS process can control the Monitor display of a data module. In this case, the controller can be accessed over a single control connection.

Monitor

11-3

There is the restriction with the Central Programming (CP) that only one WinSPS may communicate via the CP. All other processes must be connected with the controller via the conventional way (serial interface, ZAT). Multiple calls of a software are often not intended by unexperienced users. If you start the WinSPS software and an active copy already exists in the memory, a dialog box will appear to notify you of this condition. You can then choose whether you want to switch to the already active copy or whether you want to start the software once more. If desired, this dialog box can be suppressed with the function switch /d.

11.5 Screen layout


The Monitor screen is subdivided into the areas of the menu and toolbar, network line, work area, Monitor display, symbol display and status line.

In the Monitor, the work area contains the program display on the lefthand side and the Monitor display on the right-hand side; the latter contains a cyclic display of data and states of the controller. The work area of the text, operand field, data field and forcing editors allows you to make inputs for the current file. The separation line between the program and monitor displays can be moved. To do this, you can either click directly on the separation line and move the line up or down while holding down the mouse button, or you can move the line with the key combination + or + , respectively. The menu and toolbar contain the program functions. The network line displays information for the current network. You can suppress the toolbar and the network line with the menu function View, Toolbar or Networks.

11-4

Monitor

The symbol display shows all currently used symbols. The separation line between symbol display and input area can be moved so that you can suppress the symbol display or display it at maximum size. To do this, you can either click directly on the separation line and move the line up or down while holding down the mouse button, or you can move the line with the key combination + or + , respectively. The status line displays current help information. The status line also contains the current Line and Column positions of the writing cursor as well as the program instruction number (PI), the program rung number (RG) and the absolute program address (PAA). The editor mode Insert or Replace is also displayed (can be toggled with the key ). Moreover, there is an indication whether the current file has been opened in Read-only mode (RO). Operation and keyboard assignment of the Monitors are described in chapter Operating Philosophy, paragraph Command selection pp.

11.6 Program module 11.6.1 Programming language


Program modules can be displayed in one of the programming languages IL, LD, FBD, SFC and ST. These programming languages can be activated via the menu function View... or via buttons.

11.6.2 Instruction List (IL)


In the IL representation of the module editor, the left-hand side shows similar to the module editor - the program instructions and comment lines of the program module file. On the right side of the separation line is the Monitor display, consisting of - the logic bit operations in the case of bit instructions - the set flags in the case of word instructions - the register contents, or the active data modules (see below)

Monitor

11-5

The table below shows how the states are displayed: not set i q 0 set I Q 1 I C O N Z

Input bit Output bit RLO bit Interrupt Carry Overflow Negative Zero

The register contents are displayed depending on the selected numerical format (see below). For commands that affect timers/counters, the timer or counter state is displayed. If the interrupt mask is changed, the new mask is output in binary form.

Active data modules All active modules are displayed at the position of the cursor.

Display The current conditions are displayed dynamically in this mode (Standard).

Edit / Load You do not have to leave the monitor to make slight changes in the program. You can edit individual program lines in the 'Edit' mode and put them into the controller via the 'Load' function. It is not possible to load in the 'Display' mode.

Your changes are immediately becoming effective without any request in the controller. Yet, the controller is not stopped. Please make the adequate precautions!

Numerical format The menu function View, Format can be used to select different numerical formats for the display of data and registers. Moreover, this function allows to choose between Duration and Timer value/Timer loop for the display of the timer elements. To enhance visibility, all line comments can be suppressed. Moreover, a trace line can be displayed. The trace line contains a display of the registers of the controller. The contents of the registers is updated after each I/O state depending on the position of the writing cursor:

11-6

Monitor

Scroll Lock / Trace from cursor line The Scroll key is used to enable or disable Scroll Lock. With the Scroll Lock function enabled, the part of the file is scrolled without changing the position of the writing cursor. In this way, a specific program rung can be positioned into the first screen line in order to synchronize this part with the controller. If the menu function View, Trace from cursor line is also enabled, Monitor information is only displayed for the lines below the current writing cursor position. Combined with the Scroll Lock function, this allows you to limit the Monitor display to specific areas.

11.6.3 Ladder Diagram (LD)


The ladder diagram shows the flow in the circuit diagram. Elements and connections which have no signal (0) are shown as dotted lines (blue colour); elements and connections which carry a signal (1) are highlighted (red colour). If the program branch is not executed it will be displayed grey dotted.

Fixed operands are displayed with the respective conditions 0 or 1 (see illustration).

11.6.4 Function Block Diagram (FBD)


The function block diagram shows the current state of the network. Connections which have no signal (0) are shown as dotted lines; elements and connections which carry a signal (1) are highlighted (default: red).

Monitor

11-7

11.6.5 Sequential Function Chart (SFC)


On the sequence level , the current condition of the sequence is indicated.

Active steps and fulfilled conditions are represented in red. If all conditions (transition or command output) are fulfilled in a complex transition or BEFA, the red line is drawn continuously up to the branch of the transition or BEFA condition (see illustration). A negated condition is represented in red when the negated condition is present. Example: A transition contains the negated condition of I0.0. This entry does not carry a signal. The line for the transition condition is represented in red.

11-8

Monitor

With the menu function View, Show timer and counter values, a Waiting (KWA) and Watchdog timer (KUE) is appended to every step in the programming mode MADAP. Furthermore, the current values are output for the timer and counter step actions. Another component, especially for the SFC, is the function Controller, Synchronize to cascade No. If you activate this function, the monitor display is always positioned (scrolled) to the active step.

The displayed operands are read from the controller in consecutive order, i. e. they do not necessarily come from the same PLC cycle! If there is no SFC file displayed in the presets, the SFC programming language can not be activated. Detailed general information about SFC can be found in the ReadSFC.doc file which is located in the WinSPS program directory.

11.7 Data module


In the data module monitor, the left-hand side shows - similar to the data module editor - the contents of the data module file. On the right side of the separation line, the current data are displayed.

Editing This mode allows you to edit the data module. The current line is checked after each character input, and an error ID may appear in the left margin of the line that contains the error. The corresponding description for the error ID is displayed in the status line.

Display This mode provides a dynamic display of the current states of the data lines. Non-displayable data (e. g. within Visible strings) are replaced with the character .

Flag The initialization values of the data lines can be loaded into the controller (see Control). For this purpose, they need to be flagged.

Monitor

11-9

If the function Flag is activated, all operand lines within the block area are flagged. If no block area exists, only the current line will be flagged. The flag is displayed by a flag ID in the left margin of the screen. Each flag can be reset by applying the function Flag again to the current line or the block area. Flagging is not possible in Display mode.

Control All flagged (see Flag) data lines are loaded into the controller with the initialization value. Subsequently, all flags are reset (flag ID is deleted). Controlling is not possible in Display mode.

11.8 Text file


The text editor is also available in the Monitor program. It can be called up via the menu function File, Text file or via the text editor button.

The text editor can be used to create and edit so-called ASCII text files. This can e. g. be used to view and revise print files. All ASCII characters which are not provided directly on the keyboard of the programming unit can be entered by using the keys of the numeric keypad together with the key ; example: You want to enter the character { . The decimal code of the ASCII character is 123. Hold down the key and use the numeric keypad to enter the decimal code 123. Release the key; the character { is inserted.

11.9 Operand field


In the operand field, you can use the operand field file to - display, - edit, - flag and - control any operands on the screen. Several operands can be displayed at the same time on one screen page which e. g. cannot be displayed simultaneously in the IL Monitor. You can find a list of the operands in the chapter Data module editor.

11-10 Monitor

Layout of the operand field file Operand lines (<TAB> = separator or ):

Operand <TAB> Data type <TAB> {Initialization value} <TAB> {comment} The operand line consists of one symbolic or absolute operand and its data type (see paragraph Data types in the Editor chapter Language Set). In addition, the operand can be preset via an initialization value (see Flag and Control). Examples: I4.0 I4 -Symbol BOOL UINT BOOL 1 ; Comment in the operand field

2#1111_0000_1010_0110 0

Data words are addressed by using the absolute or symbolic data module name and the data address in brackets. Examples: DM0[4] -Data[-Sym] WORD STRING(14) 4711 String$r$l

Timers and counters are defined via the data type TVALUE or CVALUE, respectively. Examples: T1 C3 TVALUE CVALUE

Comment lines: ;{Comment} (*{Comment}*)

Monitor 11-11

Comment lines are introduced by a semicolon or enclosed in parentheses and asterisks (* and *). It is not possible to use nested comments. Example: ; Comment line Example: (* Comment line according to IEC1131-3 *)

Editing This mode allows you to edit the operand field file. The current line is checked after each character input, and an error ID may appear in the left margin of the line that contains the error. The corresponding description for the error ID is displayed in the status line.

Display This mode provides a dynamic display of the current states of the operands. Non-displayable data (e. g. within Visible strings) are replaced with the character . If a forcing exists, this will be indicated.

The displayed operands are read from the controller in consecutive order, i. e. they do not necessarily come from the same PLC cycle!

Flag The initialization values of the operands can be loaded into the controller (see Control). For this purpose, they need to be flagged. If the function Flag is activated, all operand lines within the block area are flagged. If no block area exists, only the current line will be flagged. The flag is displayed by a flag ID in the left margin of the screen. Each flag can be reset by applying the function Flag again to the current line or the block area. Flagging is not possible in Display mode.

Control All flagged (see Flag) operands are loaded into the controller with the initialization value. Subsequently, all flags are reset (flag ID is deleted). Controlling is not possible in Display mode.

During program execution, the state which has been modified in the operand field is processed instead of the actual state of the connected sensors and actuators!

The operands are loaded into the controller in consecutive order, i. e. not necessarily in one PLC cycle! If the loading process extends over several PLC cycles, a warning will be displayed on the screen!

11-12 Monitor

11.10 Data field


In the data field editor, you can use the data field file DFELD.DXD to - display, - edit, - flag and - control. the remanent data field on the screen. Loading, unloading and deleting the data field can also be made in the editor via the menu function Control, Load and Unload, respectively.

Layout of the data field file In the first line, the data length is specified via the keyword LENGTH. The maximum length depends on the controller: - CL200 - CL350 - CL400 - CL500 - iCL700 8192 bytes 24576 Byte 24576 bytes 24576 bytes 32768 bytes

The line with the length specification is followed by the data lines (<TAB> = separator or ): Data field address <TAB> Data type <TAB> {Initialization value} <TAB> {Comment} The addressing width of the data type (see paragraph Data types in the Editor chapter Language Set) is used to calculate the next data field address; e. g.

Monitor 11-13

- BOOL 1 byte - BYTE 1 byte

- WORD 2 bytes - INT 2 bytes variable

- STRING

The data field addresses may contain blanks but must be specified in ascending order. Data types with a data width of 8 bits maximum (BOOL, BYTE, SINT, USINT) can also be set to odd data word addresses. The data line can be preset via an initialization value (see Flag and Control). Blanks and non-initialized values are filled with binary zeroes during loading and controlling. Example: LENGTH=12 0 1 10 BOOL BYTE UINT TRUE ; comment in data field 255 2#1111_0000_1010_0110

Comment lines: ;{Comment} (*{Comment}*) Comment lines are introduced by a semicolon or enclosed in parentheses and asterisks (* and *). It is not possible to use nested comments. Example: ; Comment line Example: (* Comment line according to IEC1131-3 *)

Edit This mode allows you to edit the data field file. The current line is checked after each character input, and an error ID may appear in the left margin of the line that contains the error. The corresponding description for the error ID is displayed in the status line.

Display This mode provides a dynamic display of the current data field. Nondisplayable characters (e. g. within Visible strings) are replaced with the character .

The displayed data are read from the controller in consecutive order, i. e. they do not necessarily come from the same PLC cycle!

11-14 Monitor

Flag The initialization values of the data fields can be loaded into the controller (see Control). For this purpose, they need to be flagged. If the function Flag is activated, all data lines within the block area are flagged. If no block area exists, only the current line will be flagged. The flag is displayed by a flag ID in the left margin of the screen. Each flag can be reset by applying the function Flag again to the current line or the block area. Flagging is not possible in Display mode.

Control All flagged (see Flag) data lines are loaded into the controller with the initialization value. Subsequently, all flags are reset (flag IDs are deleted). Controlling is not possible in Display mode.

The data are loaded into the controller in consecutive order, i. e. not necessarily in one PLC cycle! If the loading process extends over several PLC cycles, a warning will be displayed on the screen!

11.11 Forcing
In the forcing editor, you can edit the forcing file FIXIER.FXD, load it into the controller (fixed) or unload it from the controller. It is possible to set individual bits or entire data ranges. This allows you to test the functions of the PLC program or the modules of the controller in a selective manner. On the controller, a forced state is displayed by the indicators.

In order to completely delete a fixation, an empty fixing file can be loaded into the controls. Loading, unloading and deleting the forcing file can also be made in the editor via the menu function Control, Load or Unload.

Monitor 11-15

Layout of the forcing file The layout is similar to that of the operand lines in the operand field or ): (<TAB> = separator Operand <TAB> Data type <TAB> Forcing value <TAB> {Comment} A line consists of a symbolic or absolute operand and its data type (see paragraph Data types in the Editor chapter Language Set). The operand is preset via a forcing value. The following operands can be used: - Inputs - Outputs - Markers The selected data type must be suitable for the selected operand. For example, bit operands or word operands can be used to force one or several operand(s). Examples: I4.0 I2 -Symbol BOOL UINT UDINT 1 ; Input 4.0 is set

2#1111_0000_1010_0110 16#BADEFADE

In addition, it is possible to hide certain bits from the fixation, so as to exclude them. In order to hide bits from fixation, type x instead of the status 0 or 1. Example: I2 UNIT 2#1x1_xxxx_10xx_0110

In this example, the following entry of the sign 2 is fixed: I2.0 I2.1 I2.2 I2.3 I2.6 I2.7 I3.5 I3.7 false true true false false true true true

All other entries are not fixed.

11-16 Monitor

Comment lines: ;{Comment} (*{Comment}*) Comment lines are introduced by a semicolon or enclosed in parentheses and asterisks (* and *). It is not possible to use nested comments. Example: ; Comment line Example: (* Comment line according to IEC1131-3 *)

Load forcing list The current entries of the forcing file are directly loaded into the controller. The forcing becomes active immediately. The forcing in the controller can be cancelled by loading an empty forcing file.

During program execution, the forced instead of the actual state of the connected sensors and actuators is processed!

Unload forcing list The current forcing in the controller is loaded into the forcing editor. In the LD programming language, fixed operands are displayed with the respective conditions 0 or 1 in LD (see illustration).

11.12 Trigger - Tracing program and data access


Trigger program module You can follow-up the command of a program module via the trigger function. Triggering makes it easier to use program modules which only differ in their parameters (see diagram).

A certain module call (CM... command, no data modules) can be made into a trigger-point, if the function is activated while the cursor is positioned on the desired command. The active trigger function is displayed by the continuous change of contrast of the rotating Bosch anchor. Indirect module commands cannot be triggered.

Monitor 11-17

Triggering is ended via the menu function Controls, Trigger module call Disable or by exiting the monitor program. You can view all the trigger data via the menu function Controls, Trigger module call Display.

Trigger operands The triggering of operands is similar to the program tracing. You can get further information how to set trigger points and additional options in the help to the menu Control, Trigger Operand address.

11-18 Monitor

Programming languages

12-1

12 Monitor Menu functions

12.1 File Menu


This menu groups all functions which can be applied to files (e. g. opening, saving and insertion of files). In addition, it allows to switch between module and data module editor and the text, operand field, data field and forcing editors.

12.1.1 Open
This function allows to switch the current file. Only files of the current filetype can be opened. For example, if you are in the data module monitor, you can only open data module files. The drive and directory has been specified in the Presets and cannot be changed. This is also true for the current file type. You can also enter a new filename in the operand field and text editors. By using the "Read-only" option, you can write protect the file, which means that changes in the file cannot be saved. A fast change of files can also be made by using the file selector box in the toolbar.

Dialog box File Open This dialog box allows you to switch the current file. The drive and directory are determined by the current Presets in the main menu and cannot be changed. This is also true for the current file type. This means, if you are e. g. in the data module monitor, you can only open data module files. When entering the filename, you need not specify the file type. You can also specify a new filename in the operand field and text editors. By using the Read-only option you can write protect the file so that changes in the file cannot be saved. The Network button is irrelevant because only the current ZS directory will be processed. A fast change of files can also be made by using the file selector box in the toolbar.

12.1.2 Save
This function saves the currently displayed file.

12.1.3 Save as
This function can be used to save the currently edited file under a different filename.

12-2

Programming languages

Dialog box Save as This dialog box allows you to save the currently edited file under a different filename. This also offers the possibility to save the file in a directory which is not the current ZS directory, or even under a different drive. When entering the filename, you need not specify the file type.

12.1.4 Save all


This function saves all opened files in all editors (text, operand field, data field, and forcing file).

12.1.5 Insert file


This function allows to insert any other file into the currently displayed file at the writing cursor position.

12.1.6 Change to module monitor


This function is used to change to the current program module file in the module monitor.

12.1.7 Change to data module monitor


This function is used to change to the current data module file in the data module monitor.

12.1.8 Change to text editor


This function is used to change to the current text file in the text editor.

12.1.9 Change to operand field editor


This function is used to change to the current operand field file in the operand field editor/monitor.

12.1.10 Change to data field editor


This function is used to change to the current data field file DFELD.DXD in the data field editor/monitor.

12.1.11 Change to forcing editor


This function is used to change to the current forcing file FIXIER.FXD in the forcing editor/monitor.

12.1.12 File selector


This is a list of the files which have been edited last. If you select a file, it will be opened for editing, and the corresponding monitor/editor will also be called up.

12.1.13 Exit
This can be used to exit from the WinSPS software and return to Windows. All modified files can be saved after a request (depending on the setting of function switch /A).

Programming languages

12-3

12.2 Edit Menu


This menu groups all functions which can be used to edit files. This includes functions such as: - Undo/Redo last edit - Cut, Copy and Paste - Find.

12.2.1 Undo
This function can be used to undo the previous text editing step. Every editing which has been cancelled with the "Undo" function can be restored with the "Redo function. Example: You have inadvertently deleted a highlighted area (e. g. with the key ). You can then use the "Undo" function to reinsert the deleted area into the file. If you subsequently use the "Redo function, the highlighted area will be deleted again. In all editors (text, operand field, data field and forcing editor), you can undo/redo - depending on the setting of function switch /U - up to 99 consecutive text editing steps.

12.2.2 Redo
A previous text edit can be cancelled with the "Undo" function. By using the "Redo" function, you can restore the original state. Example: You have inadvertently deleted a highlighted area (e. g. with the key ). The "Undo" function will reinsert the deleted area into the file. If you subsequently use the "Redo function, the highlighted area will be deleted again. In all editors (text, operand field, data field and forcing editor), you can undo/redo - depending on the setting of function switch /U - up to 99 consecutive text editing steps..

12.2.3 Cut
This function copies the highlighted block area into the clipboard and deleted (cut out) from the current editor. You can then insert the contents of the clipboard at another position or even in a different file. This procedure is the same as the "moving" of texts. The contents remains stored in the clipboard - and can thus be inserted any number of times - until another highlighted area is saved in the clipboard (the contents will even be retained after you exit from the WinSPS software!). Move or copy operations can also be performed very easily by using the mouse operation Drag & Drop .

12-4

Programming languages

12.2.4 Copy
This function copies the highlighted block area into the clipboard You can then insert the contents of the clipboard at another position or even in a different file. The contents remains stored in the clipboard - and can thus be inserted any number of times - until another highlighted area is saved in the clipboard (the contents will even be retained after you exit from the WinSPS software!). Move or copy operations can also be performed very easily by using the mouse operation Drag & Drop .

12.2.5 Paste
The contents stored in the clipboard is inserted at the current writing cursor position. If an area has been marked before, this area will be overwritten with the contents of the clipboard. The contents remains stored in the clipboard - and can thus be inserted any number of times - until another highlighted area is saved in the clipboard. Move or copy operations can also be performed very easily by using the mouse operation Drag & Drop .

12.2.6 Find
This function can be used to find specific pieces of text in the current file.

12.2.7 Find operand address (Single cross reference)


This function allows you to find a specific operand in the current program module, operand field or forcing file (e. g. I14.3). The operand address is specified in a dialog box.

12.2.8 Go to error line


The WinSPS software automatically checks for input errors as soon as the input is made (edit mode). If errors are detected, an error ID is set in the first column. This function allows you to go to the next line which contains an error. The status line displays a description of the error.

12.2.9 Go to PI no.
This function allows you to directly access one of the program instructions (PI) which are numbered consecutively. The number is entered in a dialog box. This function can only be applied to program modules.

Programming languages

12-5

12.2.10 Go to absolute program address


This function allows you to directly access an absolute program address in the controller (PAA). The address is entered in hexadecimal form in a dialog box. The current PAA address is displayed in the status line. This function can only be applied to program modules.

12-6

Programming languages

12.3 View Menu


This menu groups the options for the representation of the monitors. It allows to switch between the programming languages for program modules - Instruction List (IL) - Ladder Diagram (LD) - Function Block Diagram (FBD) - Sequential Function Chart (SFC - Structured Text (ST). The function switch-over for the editors can be made here. A base can be specified for the representation of numerical values. Monitor triggering can be selected to be on the first screen line or the current writing cursor position. The - toolbar - display of the network title - symbolic display of the operands can be hidden. In addition, the layout of the monitor can be customized using different fonts and color settings.

12.3.1 Instruction List (IL)


This activates the Instruction List programming language. The Instruction list consists of instructions (commands) in a low-level programming language. If you have previously selected a different programming language (LD or FBD), all elements of the previous programming language will be converted into the IL programming language.

12.3.2 Ladder Diagram (LD)


The Ladder Diagram programming language is activated. The ladder diagram is a graphical combination of binary variables (digital logic operations). The ladder diagram resembles the circuit diagram of earlier relay control systems with contacts and reels.

12.3.3 Function Block Diagram (FBD)


The Function Block Diagram programming language is activated. FBD is a graphical combination of different function elements. In FBD, binary (digital) logic operations as well as timer, counter and comparator functions and program and module jumps can be displayed.

Programming languages

12-7

If you have selected a different programming language (IL or LD), all elements of the previous programming language will be converted into FBD function elements. All other function elements which cannot be displayed will be temporarily displayed in the IL programming language. In addition, a corresponding message will appear in the status line.

12.3.4 Sequential Function Chart (SFC)


The Sequential Function Chart programming language chart is activated. SFC makes the graphic programming of a complex task in clear units possible. The control flow of these parts can be arranged gradually in sequential or parallel processes (also known as sequence cascade programming).

12.3.5 Structured Text (ST)


The programming language Structured Text is activated. ST is a textual language. Contrary to the low-level IL language, ST is a programming language that uses comprehensive constructs to allow a very compact formulation of the programming task. ST offers the advantage that it allows a clear program structure. The disadvantage of this language is its lower efficiency. The programs are slower and longer. To be able to activate this programming language, it is necessary to specify an ST file in the Presets.

12.3.6 Table of contents


With this function, you can move in the sequential function chart (SFC) to the table of contents. The table of contents shows the overall view of the sequence structure.

Shortcuts: Symbol bar: Keyboard:

12.3.7 One level higher


With this function, you can gradually switch in the sequential function chart (SFC) one level (or swap-out) back.

12-8

Programming languages

Shortcuts: Symbol bar: Keyboard:

12.3.8 Sequence title


With this function, the headline of a sequence can be faded out below the toolbar.

12.3.9 Edit
This is used to switch from Display to Edit mode. Only if this mode has been selected, you can make inputs in the file and set flags for control using initialization values. Please refer also to paragraphs Instruction list (IL), Data module, Operand field and Data field.

12.3.10 Display
This is used to switch from Edit to Display mode. In this mode, the current states of the operands or the data field, respectively, in the controller are displayed. Please refer also to paragraphs Instruction list (IL), Data module, Operand field and Data field.

12.3.11 Control
This is used to control previously flagged lines with the predefined initialization values; this means that the controller will use the initialization values of the flagged operands or data fields, respectively. Please refer also to paragraphs Data module, Operand field and Data field.

12.3.12 Flag
Here you can assign a line or a block with a flag. The initialization values of the flagged area can then be loaded into the controller by using the command Control. Please refer also to paragraphs Data module, Operand field and Data field.

12.3.13 Load
Here you can load IL lines which have been altered into the controller. You do not have to leave the monitor to make slight changes in the program. You can edit individual program lines in the 'Edit' mode and put them into the controller via the 'Load' function. It is not possible to load in the 'Display' mode.

Programming languages

12-9

Your changes are immediately becoming effective without any request in the controller. Yet, the controller is not stopped. Please make the adequate precautions!

12.3.14 Format
This is used to specify the display format of numbers and of the trace line in the program module monitor. In addition, all line comments can be suppressed to enhance visibility. The settings are made in a dialog box.

Dialog box Format settings Numerical format The following formats can be selected for the display of data and registers in the program module monitor: - decimal signed/unsigned - binary - octal - hexadecimal (sedecimal) - String = ASCII string - Visible string - Octet string

Option To enhance visibility, all line comments can be suppressed.

Trace line The trace line displays the registers of the controller. The contents of the registers is updated after every I/O state as a function of the writing cursor position. The registers can be grouped as desired. The trace line is set to the bottom of the program module display (see illustration).

Timer format This is used to select the display of timer elements either as a duration or a timer value/timer loop.

12-10 Programming languages

12.3.15 Symbolic/Absolute
You can select the operand display to be either symbolic or absolute. If you activate the menu item, the operands will be displayed in symbolic form. In the symbol display, the absolute and the symbolic operand as well as the symbol comment are always displayed.

12.3.16 Network line On/Off


This function enables/disables the network line in the module monitor below the toolbar.

If you disable the menu item (Off), all networks will be displayed in contiguous form. The network numbers are suppressed, and the network titles are integrated into the program module: ****;Network title

12.3.17 Toolbar On/Off


This function allows you to suppress the toolbar of the Monitor in order to obtain a larger work area.

You will be required to make a temporary exit from the Monitor and switch to the Presets or the Editor, since the change will only become effective after a new call of the Monitor. The toolbar is scaled automatically. This means that the toolbar always extends across the entire screen at different screen resolutions (e. g. 640 x 480, 800 x 600 etc). Automatic scaling can be disabled with the function switch /i. This has the effect that, particularly when using high-resolution monitors, the entire toolbar is visible even when you work in several smaller windows.

12.3.18 Trace from cursor line


If this function is activated, monitor information will only be provided for the lines below the current current writing cursor position. Combined with the Scroll Lock function, this allows you to limit the Monitor display to specific areas. This function can only be applied to program modules in the IL programming language.

Programming languages 12-11

12.3.19 Overview
With this function, you can activate the overview of a sequence. In the overview, the step elements are marked smaller; the transitions are cut short to a line. Step actions are not indicated.

12.3.20 Show timer and counter values


With this function, in the programming type MADAP, a Waiting (KWA) and Watchdog time (KUE) is appended to every step. Furthermore, the current values are indicated at the timer and counter step actions.

12.3.21 Font
This function is used to change the character font. A dialog box will appear. Please consider that a subsequent font change can affect the layout since the text is shifted and some characters may not be displayable. These shifts can occur especially if proportional fonts are used. The default font for the WinSPS software is Courier, Regular, 9.

12.3.22 Color
This is used to make the color selections for Editor and Monitor. The parameters are specified in a dialog box.

12-12 Programming languages

12.4 Control Menu


This menu contains functions to handle communications with the controller: - Run/Stop switch-over - Disable/enable outputs - Display controller states (Infostatus, configuration diagram, reference list) - Loading/unloading of the forcing file - Module change (call level)

12.4.1 Run
This command switches the controller into the Run state. For the CL500, you can select in another dialog box whether you want to switch the current control processor or the entire system into Run.

12.4.2 Stop
This command switches the controller into the Stop state. For the CL500, you can select in another dialog box whether you want to switch the current control processor or the entire system into Stop.

12.4.3 Enable outputs


This function is used to enable any previously disabled outputs so that they can be addressed again by the PLC program. Please note that a slide switch on the central processing unit (ZS) does also affect the disabling of the outputs. The current state can be viewed via the Infostatus function.

12.4.4 Disable outputs


This function can be used to reset all controller outputs to 0 and hold them in this state. The outputs cannot be addressed by the PLC program. Please note that a slide switch on the central processing unit (ZS) does also affect the disabling of the outputs. The current state can be viewed via the Infostatus function.

12.4.5 Change module one level Down (Plus)


If the writing cursor is in a line which contains a module call, this function can be used to switch to the associated module. This function can also be activated via the key .

Programming languages 12-13

12.4.6 Change module one level Up (Minus)


This function allows you to return to the calling module if a module change has been made via the Plus function. This function can also be activated via the key .

12.4.7 Infostatus
A dialog box displays controller information.

Dialog box Infostatus Infostatus collects all available information about the connected controller (Configuration). In addition, a System Test can check header information and module lengths. In the case of an error, a detailed error description can be obtained (Status Info, Module Stack).

Configuration This can provide different information, depending on the controller type. The output is cyclically updated.

System Test For the system test, the reference list is unloaded from the controller and its entries are checked. The result is then displayed.

Diagnostic Stack This collects and displays error and diagnostic states of the controller in chronological order. Date and time of the states are displayed.

Status Info, Module Stack This provides detailed error information in case of an error.

Program Flags This lists the program flags.

User Stack This displays the user stack.

12.4.8 Configuration diagram


A dialog box contains a graphic display of the current memory configuration of the controller.

Dialog box Memory configuration (Configuration diagram)

This is a graphic representation of the PLC memory area. The memory area which is used by the reference list and the PLC program is displayed. It also informs you about the inserted I/O modules. They are illustrated bytewise with colours.

12-14 Programming languages

To check the I/O configuration, the corresponding entries must be available in the organization module OM2.PXO. Conflicts show a multiple placement of I/O modules (e.g. overlapping with decentral I/O) or a minor placement (e.g. wrong DIP switch selection on the module).

12.4.9 Reference list


The reference list is a summary of all currently loaded program and data modules of the controller. The modules are listed in a dialog box.

Dialog box Reference list The reference list is a summary of all currently loaded modules, or of the organizational modules (OM), program modules (FC) or data modules (DM) only. The module type with module number, the symbolic module name, the hexadecimal start address of the module in the controller, the module length in bytes, and the version number listed in the parameter list, are displayed. The Attr. column indicates a protected module.

12.4.10 Load forcing file


This loads the current entries in the Forcing file directly into the controller. The Forcing becomes effective immediately. The forcing in the controller can be cancelled by loading an empty forcing file.

During program execution, the forced instead of the actual state of the connected sensors and actuators is processed!

12.4.11 Unload forcing file


This loads the current forcing from the controller into the forcing editor.

12.4.12 Trigger activate program module


This function allows you to carry out (trigger) the command of a program module. Triggering makes it easier to activate otherwise identical program modules with differing parameters (see diagram).

A certain module call (CM... command, no data modules) can be made into a trigger-point, if the function is activated while the cursor is positioned on the desired command. The active trigger function is displayed by the continuous change of contrast of the rotating Bosch anchor. Afterwards, you can change to this module using the function Control, Change module one level down +. The module is processed, if the following information Trigger module in progress appears in the status bar.

Programming languages 12-15

Indirect module commands cannot be triggered. Triggering is ended via the menu function Controls, Trigger module call Disable or by exiting the monitor program. You can view all the trigger data via the menu function Controls, Trigger module call Display.

12.4.13 Trigger deactivate program module


This function deactivates triggering. Triggering is also ended upon leaving the monitor program.

12.4.14 Trigger display program module


This function displays trigger data. The display shows the calling Source module, the precise position of the trigger point, the program instruction number (PI), and the Destination module, shows which module can be traced.

12.4.15 Trigger Operand Address


With this function, you can watch and display the access to an absolute word address. Trigger Operands is only possible with innovative controllers such as CL350, CL400, CL500, CL550 or PCL. According to the controller, the operands E, A, M, SM, T, Z, S, DP, DF, and DBx[y] are valid. For the triggering of data words, the file module name is put in as an operand and the data word address in square brackets. For an additional limit you can edit if a reading and/or writing access should be observed. Besides, you can trigger the number of accesses, i.e. the operand will supply the result 'Trigger address found' in the status not until the corresponding number of accesses have been made on this operand. As a result, the program module with the affiliated absolute program address (PAA) where the access was made, is indicated. You can finish the triggering with the "Go to" button and switch directly to the appropriate position in the program module.

12.4.16 Synchronize to cascade no.


If you activate this function, the monitor display is always positioned (scrolled) to the active step of the sequence. In a dialog box you can choose which sequence cascade shall be followed.

Shortcut: Symbol bar:

12-16 Programming languages

12.4.17 Central Programming


With this function, PROFIBUS data for the Central Programming (CP) are displayed. The different functions are selected in a dialog box.

Programming languages 12-17

12.5 Change Menu


This menu allows you to switch from the Monitor - to the Presets (main menu) or - to the Editor.

12.5.1 Editor
This function allows you to switch into the Editor. The Editor has the following functions:

12.5.2 Presets
This function can be used to exit from the Monitor and to return to the Presets.

12-18 Programming languages

Communications and networked systems

13-1

13 Communications and networked systems


The controllers offer various options to implement networked systems: - The central programming comprises the centralized monitoring, operation and control of a system and its individual components (controllers) via Ethernet TCP/IP or PROFIBUS FMS. - The CL550 allows communications between controllers, control terminals and PCs via Ethernet TCP/IP. - Remote access via communications modules in the controllers or direct PC communications with the PCL controller.

The following section contains a detailed description of these possibilities and of the configuration of networked systems.

13.1 Project configurator 13.1.1 System-wide communications


The CL550 allows communications between external controllers, control terminals and PCs via Ethernet TCP/IP. This allows the exchange of process and application data. For communications at the control level, the Ethernet TCP/IP port is already provided on-board. Optional plug-in modules with LAN protocols (e. g. COMMAP) are available for integration into higher-level production host systems.

Example of a networked subsystem

The WinSPS project configurator is used to define and edit networked systems in order to create a network of controllers that can communicate with each other.

13-2

Communications and networked systems

A system is a network of several production systems, the so-called subsystems. These subsystems comprise a number of racks that consist of the ZS550 controllers and the system modules with TCP/IP communications capabilities (e. g. COMMAP). For the purpose of processing in the project configurator, this hierarchical organization results in a tree structure.

A key function of the project configuration is the assignment and control of the IP addresses and the setting of the individual Ethernet parameters. This creates a unique assignment of the individual controllers and communications modules within the system. Password-based security features allow to securely access the system and its components.

13.1.2 Program call


The project configurator is an editing program that is called up through the project presets of the WinSPS. A prerequisite for the call of the project configurator is the use of a type CL550 controller. The project configurator can only be started for these controllers.

You will need a special license for the project configurator. The project configurator cannot be called up unless a valid license is available. License management is called up via the WinSPS project presets. A license for Project configurator and fr the CL550 controller must be available. You can obtain further information about the license through the Help feature of the WinSPS project presets. When the project configurator is started, the WinSPS software will automatically create a directory for all project files. You can obtain further information about this topic in the section What you should know before you start, Files of the WinSPS software:

Communications and networked systems

13-3

13.1.3 Creating and editing a project


The configuration file contains all CL550 racks with the associated system modules of a system or subsystem. The input mode is initiated with . You can either accept the function Create new configuration file the configuration data on-line if you have already built a networked system and connected it to the PC, or you can initiate the automatic creation of the project structure from the directory structure. You can find detailed informationen about these options in the paragraph Creating a configuration file. During the subsequent editing process, you can e. g. create a subsystem. This can be merged with other subsystems to form a complete system later on. This procedure allows the step-by-step commissioning of individual segments of a system.

The editing area lists the system as a hierarchical tree structure. This allows to classify the system into subsystems, racks and system modules. You can open or close the next lower structure by using the (+) or (-) buttons. Subsystems can only be edited if the option With subsystem structure has been enabled during the creation of a new configuration file. For reasons of compatibility, the level and the symbol of the subsystem is also displayed for files for which the Subsystem structure option is not specified.

The Insert element function inserts a new component below the current position. The current position will determine the type of element to be inserted (see table). Current position System Subsystem Rack Inserted element Subsystem Rack System module

13-4

Communications and networked systems

Most editing fields can be edited directly. For example, it is possible to enter the desired IP address for a system module into the editing field. The Delete element function deletes the selected component.

13.1.4 Control tree - Configuring the system


The editing area contains essential data in tabular form that are important for system projecting.

Control tree This column contains the elements of the system in a hierarchical tree structure, consisting of: - (Entire) System - Subsystems - Racks (card cages) - System modules (ZS550 and COMMAP) The name of the system is derived from the configuration file name and cannot be changed. Subsystems can be assigned any name if the With subsystem structure option has been enabled during the creation of the file. The rack number (Rack ID) can be in the range 1 through 99. It must be unique within the entire network and identical with the rack number switch setting on the controller. You have two possibilities: 1) If the CL550 is run without CON550 module, the Rack ID is set with the DIP switch in the GG4/9 rack next to the power supply slot. 2) If the CON550 is used, the rack address is set on the CON550. The rack slot number (Rack Slot ID) designates the positioning of a system module within a rack. it is defined by the slot and can be selected from 1 through 6 for the GG4/9 rack. Numbering is from left to right, starting with slot 1 next to the power supply. It is possible to select individual elements (see illustration above). This allows it e. g. to load only the selected elements.

Communications and networked systems

13-5

Type This column designates the element type: GG4/9 ZS550 COMMAP Name The name entry is optional. Usually, this will be the controller name of the associated WinSPS project. If the configuration file is automatically created based on the directory structure, the controller name will appear in these fields. You can find further information about this process in the paragraph File menu, Create configuration file. The name is stored in the associated system module during the loading process. Rack, card cage Central Processing Unit of the CL550 Communications-enabled system module

IP Address Front Side This is used to edit the IP addresses of the so-called Front Side of the ZS550 system module. Only addresses within the defined IP address range are accepted, see function Presets. You can obtain further information about the Front Side in the paragraph Front Side and Back Side.

IP Address Back Side Editing of the Back Side address occurs in the same manner as in the Front Side column. The Back Side can also be used to address the COMMAP module. You can obtain further information about the Back Side in the paragraph Front Side and Back Side. The subnets must be different for Front and Back Side.

Status This column is provided to display short status messages and cannot be edited. The detailed descriptions of these message are displayed when you place the cursor on the field in the status line.

Comment Any comment text can be entered here. it will be stored in the configuration file and also loaded into the hardware.

13.1.5 Front Side and Back Side


The ZS550 has two Ethernet ports; one of them is wired on the front panel (Front Side), the other on the backplane (Back Side). The Back Side port is used for communications with other system modules within the same rack. Backplane communications requires the CON550 modules. The CON550 module with switch functionality is used to interconnect the Back Side Ethernet ports of the system modules. They form a local network within the same rack. The CON550 extends the Back Side to the outside so that several controllers can be networked.

13-6

Communications and networked systems

The Front Side port is used to handle communications e.g. with the projecting PC or with control terminals. The communications capabilities of the Front Side communications channel is limited to the resources of the associated ZS550, i. e. there is no connection to the Back Side communications channel. Because communications at the application end is handled via the Front Side port of the COMMAP system module, loading of the configuration file into the COMMAP can only occur via the Back Side port. You can obtain information about the loading of MAP projecting data in the corresponding section of the WinSPS help. The subnets must be different for Front and Back Side! However, the same subnet mask must be specified for both ports!

TIP The capability of the CL550 to run two independent Ethernet communications systems on the same controller offers specific advantages for system design. For example, by dividing the Front Side into one subnet and the Back Side into another subnet, application data (Front Side) that are exchanged between a ZS550 and a control terminal will not affect the secure data exchange within the rack or the controller network (Back Side).

TIP If you want to implement applications across several controllers, such as central programming, OPC client/server applications, etc. in your system, it is recommended to use the Back Side port.

13.1.6 IP addressing
A key function of the project configuration is the assignment and control of the IP addresses and the setting of the individual Ethernet parameters. This creates a unique assignment of the individual controllers and communications modules within the system. Each network card in the computer and in the controllers has its own IP address. This address is also associated with a subnet mask. An IP address is 32 bits long and is specified in the form of four numerical groups that are separated by dots. Each numerical group is in the range 0 through 255. This representation is the so-called octet notation. Example: 121.2.64.229

Communications and networked systems

13-7

An IP address is also subdivided into a net (Net ID) and node address (Host ID). The net address designates the corresponding subnet. The node address is used to address a station within the subnet. This subnet is specified by the subnet mask. There are 5 so-called address classes, depending on the size of the net: Class Class A Class B Class C Class D Class E Description 1 bytes net and 3 bytes node address 2 bytes net and 2 bytes node address 3 bytes net and 1 byte node address Multicast addresses (special addresses) Reserved Address range 1.x.x.x - 126.x.x.x 128.0.x.x - 191.255.x.x 192.0.0.x - 223.255.255.x

IP addresses within the address range of classes A, B, and C can be used to address the communications modules. There are also several reserved special addresses that should not designed to address the communications modules: Loopback addresses Multicast addresses Broadcast address 127.x.x.x 224.0.x.x 255.255.255.255

In addition to the IP address, individual Ethernet parameters can be specified to tailor the system or parts of it for special communications needs. The address range can also be limited individually. The local network card must also have an IP address in the same subnet if the PC is to be directly integrated into the subnet. This is an example for the setting of the network card:

13.1.7 Subnet mask


The subnet mask defines the size of a net. The subnet mask must be identical for all stations within a net; otherwise these stations cannot recognize that they belong to the same net. The subnets must be different for Front and Back Side! However, the same subnet mask must be specified for both ports The address which is used to reach each communications-enabled component within a net is comprised of an IP target address and the subnet mask that are ANDed and form the locally valid subnet address. A packet is switched within the local net only if this AND operation supplies the local subnet address. If the result is different, the packet is sent to the subnet router (if used, see below ). The subnet mask is defined with the menu function Ethernet, Edit parameters.

13-8

Communications and networked systems

Example: The following configuration shows different address ranges for Front and Back-Side.

The subnet mask must be matched to the address ranges (or vice versa). The following examples use two settings of the subnet mask. In these examples, the ZS550 module with Rack Slot ID 1 is used as the target address.

Example 1:
Subnet mask Target address Front Side Result of AND operation Target address Back Side Result of AND operation

Octet notation
255.255.0.0 121.1.1.1 121.1.0.0 121.1.100.1 121.1.0.0

Binary
11111111.11111111.00000000.00000000 01111001.00000001.00000001.00000001 01111001.00000001.00000000.00000000 01111001.00000001.01100100.00000001 01111001.00000001.00000000.00000000

The subnet mask 255.255.0.0 is not suitable for this example because the result of the AND operation does not allow the distinction between Front and Back Side. Front and Back Side of the module would be in the same subnet and could not be uniquely addressed.

Example 2:
Subnet mask Target address Front Side Result of AND operation Target address Back Side Result of AND operation

Octet notation
255.255.192.0 121.1.1.1 121.1.0.0 121.1.100.1 121.1.64.0

Binary
11111111.11111111.11000000.00000000 01111001.00000001.00000001.00000001 01111001.00000001.00000000.00000000 01111001.00000001.01100100.00000001 01111001.00000001.01000000.00000000

Using the subnet mask 255.255.192.0, the AND operation of Front and Back Side delivers different results. Front and Back Side are not in the same subnet. This allows a unique addressing. The selected subnet mask yields the following addressable ranges: Front Side port: 121.1.[0..63].x Back Side port: 121.1.[64..255].y

Subnet router: Gateways or routers are used for communications across net boundaries. This allows e.g. remote maintenance and remote diagnostics. If you use such a component, its address that may be used to reroute datagrams must be in the same subnet as the automation components that use this gateway/router. The following example shows a system that is connected to a gateway or router via the Back Side port. All IP addresses must be in the same subnet. The component contains the address 121.1.100.100.

Communications and networked systems

13-9

You can find further information about the integration of gateways/routers in the paragraph Ethernet, Edit parameters. The local network card must also have an IP address in the same subnet if the PC is to be directly integrated into the subnet. This is an example for setting the network card:

13.1.8 Ethernet settings


To tailor the system or parts of it to specific communications needs, it is possible to specify individual Ethernet parameters. With a new system, the following default parameters are assigned that can subsequently be changed: Parameter Subnet mask (system-wide) IP address of the default gateway Retransmisssion Timer Retransmisssion Counter IP Lifetime Transfer rate and transfer type Default 255.255.0.0 0.0.0.0 200 ms 8 60 s Auto negotiation

It is also possible to read and display these parameters directly from the connected system modules. The help function for the menu function Ethernet, Edit parameters contains a detailed explanation of the different options for setting the Ethernet parameters.

13.1.9 Checking and enabling a system configuration


After creating the system configuration, the entries should be checked for errors using the function Check configuration table and then saved

. The check verifies the system module number within a rack as well as all Front and Back Side IP addresses and the rack numbers of the entire system. The function Presets allows the selection of additional check options. The function Load configuration table can be used to load the entries into the system .

13-10 Communications and networked systems

13.1.10 File menu Create configuration file


This function can be used to create a new configuration file. The configuration file contains all CL550 racks with the associated system modules of a system or subsystem. The Name input field is used to enter the filename. This name will also be used as the name of the system in the control tree. The option With subsystem structure alllows to subdivide your system into several subsystems. For example, you can create a subsystem when you edit the file. You can then merge this subsystem with other subsystems to form a complete system. This process allows the step-typ-step commissioning of individual segments of a system. If you chose the option With subsystem structure, you must also edit the fields in the Subsystem area (see below ).

Once you have decided to use the option with or without subsystem structure, you cannot change this setting for the current file later on! Please also observe that, when merging several subsystems, all files must have the same option! It is not possible to mix files with different options.

TIP Always create structured systems with subsystems! This gives you the necessary flexibility in terms of future expansions of your system topology.

You can accept the configuration data on-line if you already established a networked system and connected it to the PC. The configuration is read from the system and loaded into the control tree. In this process, the network is scanned, and only the modules that can be found in the network are included. Comments and individual Ethernet parameters are also read from the system and displayed. This procedure has the same effect as the Scan configuration function. You may also choose to create the project structure automatically from the directory structure. In this process, the names of the subsystems provided the option With subsystem structure has been enabled and the racks and system modules are derived from the names of the subdirectories. The search is made in the current project path as defined in the WinSPS presets and from there in all subdirectories. Rules for the assignment of directory and file names ensure that the project configurator knows which files to load. The following project example contains a detailed description of these rules

TIP Please select appropriate names for directories and files already when creating PLC projects in WinSPS.

Communications and networked systems 13-11

The Rack range is used to delimit the rack numbers (Rack IDs). The default range is 1 to 99. The values can be subsequently changed with the menu function Presets. It is possible to specify a Password in order to protect the entire system from unauthorized access. This system protection can be specified when a new configuration file is created or at any later time with the menu function Project protection, Change system password. The system protection can be disabled by leaving the input field New password empty. If you want to subdivide your configuration into Subsystems (see above ), you must specify at least one subsystem in this field. This is done with the following steps: 1) Enter the Name of the subsystem in the input field. 2) Using the corresponding input options, specify how many Racks, controllers (ZS = Central Processing Unit) and COMMAP system modules shall be created for this subsystem. 3) If you want to specify a start address for the first Rack ID, this can be done in the input field Start number. 4) Load the subsystem into the configuration. This will insert the inputs made in steps 1) through 3) into the subsystem. You can repeat these steps for additional subsystems. This allows to structure a large system with subsystems already during the creation of the configuration file. The configuration can then be further edited in the control tree. Click on the OK button to create the configuration file.

Shortkeys: Toolbar:

13.1.11 File menu Open configuration file


This function is used to open an existing configuration file for editing. The files are contained in the subdirectory named _Config_CL550 which follows immediately after the project path that is specified by the WinSPS software. When entering the file name, the predefined file type extension .cfg can be omitted.

Shortcuts: Toolbar:

13.1.12 File menu Save configuration file


This function is used to save the currently displayed configuration file.

Shortcuts: Toolbar:

13-12 Communications and networked systems

13.1.13 File menu Save configuration file as


This dialog box allows to save the currently edited configuration file under a different filename. You can also save the file in another directory than the predefined _Config_CL550 directory or even in a different drive. When entering the file name, the file type extension .cfg can be omitted.

13.1.14 File menu Merge configuration files


When editing configuration files, you can create several subsystems. This function allows to merge them with other subsystems to form a complete system. This process allows the step-typ-step commissioning of individual segments of a system..

Please observe that only files with the same option with subsystem structure or without subsystem structure may be merged! You invariably determine one of these two options already when you create a new configuration file! This is a project examplefor systems with and without subsystem structure: The left side of the dialog box shows all existing configuration files that are contained in the _Config_CL550 directory. Only those files are listed that have the same option with or without subsystem structure, respectively. It is not possible to merge files with subsystem structure and files without subsystem structure! Please highlight the files that you want to merge into a system using the current configuration file. The files are moved to the right side when you click on the Add -> button. The <- Remove button can be used to undo the selection. When you confirm the selection with OK, the selected files are added to the current configuration file. Any existing subsystem structure will be retained.

Shortcuts: Toolbar:

13.1.15 File menu Print


This dialog box is used to specify the print settings and print the current configuration file. The printing process also uses the presets of the Print options function and Presets, Print set-up.

Shortcuts: Toolbar: Keyboard: +

Communications and networked systems 13-13

13.1.16 File menu Print preview


This function provides a screen display of the configuration file to be key. printed. The preview can be terminated with the

13.1.17 File menu Print options


This dialog box is used to specify the settings for the printout of the current configuration file. The printing process also uses the presets of the Presets, Print set-up function.

13.1.18 File menu End


This function terminates the project configurator and returns to WinSPS. The current configuration file can be saved after a prompt.

13.1.19 View menu Toolbar


This function is used to show/hide the toolbar. The toolbar contains frequently used functions in the form of buttons. When you place the mouse cursor on a button without clicking, a short discription of this function is displayed. You can move the toolbar. To do so, use the left mouse button to click on an empty area in the toolbar and drag the toolbar to the desired position while holding down the mouse button. A double-click on the title bar will return the toolbar to its original position.

13.1.20 View menu Status bar


This function is used to show/hide the status bar. The status bar displays current help information and error messages.

13.1.21 Tools menu Insert


This function can be used to insert a new component below the current position. The current position will determine the type of the element to be inserted (see table). Current position System Subsystem Rack Inserted element Subsystem Rack System module

When an element is inserted, some input fields are assigned default values. The Rack Slot ID will be automatically assigned the next available number.

Shortcuts: Toolbar:

13-14 Communications and networked systems

13.1.22 Tools menu Delete


This function is used to delete the selected component.

Shortcuts: Toolbar:

13.1.23 Tools menu Show one level


In the editing area, the system is listed as a hierarchical tree structure. You can open or close the next lower level by clicking on (+) and (-), respectively. The function Show one level also allows to open a level of the control tree. This opens the next level down from the current position.

13.1.24 Tools menu Show all


In the editing area, the system is listed as a hierarchical tree structure. You can open or close the next lower level by clicking on (+) and (-), respectively. The function Show all opens all levels below the current position in the control tree that is displayed in the input area.

13.1.25 Tools menu Hide (one level)


In the editing area, the system is listed as a hierarchical tree structure. You can open or close the next lower level by clicking on (+) and (-), respectively. The function Hide (one level) closes all levels below the current position in the control tree that is displayed in the input area

13.1.26 Tools menu Find


This function can be used to search for specific texts in the current file. The search function is case sensitive (i. e. it distinguishes between uppercase and lowercase letters).

13.1.27 Tools menu Go to next error


The project configurator automatically checks for input errors. Faulty entries are highlighted in yellow. This function places the cursor into the field that contains the next error. The error description is displayed in the status line. The error check can be parametrized with the function Presets, Check function. This allows e.g. to detect errors during the entry process. In addition, the menu function Configuration, Check allows to check the current configuration for errors at any time.

Shortcuts: Toolbar:

Communications and networked systems 13-15

Keyboard:

13.1.28 Configuration menu Load


This function can be used to load the current configuration into the system or into selected components and to enable it. You can select the components to be loaded prior to the loading process. Prior to that, the communications channel must be specified. In addition, the communications parameters of the local network card in your PC must be adapted. Because the Front Side port of the COMMAP system module is used to handle communications at the application end, the loading of the configuration file into the COMMAP can only occur via the Back Side. Information about the loading of the MAP projecting data are contained in the corresponding section of the WinSPS help. You can choose to load configuration file for the entire system, for a subsystem, for a rack, for selected elements or only for a single module.

Each module maintains a table that lists all currently involved components of the networked system. These tables are required for a smooth communications between the modules. The tables are updated when the configuration is loaded. For this reason, the selective loading or the loading into individual components may result in inconsistencies within the entire system, especially if IP addresses or the system protection are changed! For some loading options, a component needs to be selected via the input fields. The illustrations below show the relationships:

Entire system: No additional input required.

Subsystem: Select the desired subsystem.

Rack: Select the desired subsystem and the rack number (Rack ID).

13-16 Communications and networked systems

Module: Select the desired subsystem, the rack number (Rack ID) and the moduke (Rack Slot ID).

Any selected components will be displayed. The selection can be checked in the control tree in the background as well as in the field Selected is:.

Selected elements: It is possible to select individual elements, see illustration below. This allows it to load only the selected elements. This loading option can only be enabled if elements have been selected.

In the example shown, the configuration would be loaded into all modules of the rack with Rack ID 3 although the element with Rack Slot ID 2 has not been selected. In this case, the selection of the rack has a higher priority than individual modules within this rack.

It is possible to switch a module to STOP prior to the loading process. This option can be enabled for the loading process for individual modules or a rack.

Communications and networked systems 13-17

If an IP address changes (Front or Back Side), modules of type ZS550 must always switched into the STOP mode. The project configurator verifies this condition and will abort the loading process with an error message, if required. In this case, repeat the loading process with the switch to STOP option enabled. Loading with a change of IP addresses or Ethernet parameters will result in a Reboot-Stop with the status display 1E on the corresponding module. The reboot (request immediately after loading or manual switch-on/off of the rack) will activate the configured IP addresses or Ethernet parameters in the module. The comments column will indicate whether a reboot is necessary for the module. The request to reboot the module can be disabled for the entire project with the function Presets: General:

Loading is initiated by clicking on the OK button.

Shortcuts: Toolbar:

13.1.29 Configuration menu Scan


This function can be used to load a configuration from a connected networked system into the PC. This process scans through the network and will only display the modules that are contained in this network. This process has the same effect as the function Create configuration with the option Load data on-line. Therefore, the dialog box for the scanning process is the same as the dialog box of the function Create configuration, except for the fact that the unloading process requires fewer entries. These include: - Filename (system name) - Option with or without subsystem structure - Password if system protection is enabled Scanning is only possible from modules that already been configured. Reading from modules e. g. with factory settings is not possible. An attempt to do so would result in the following:

All modules must exist in the same subnet! In the case of different subnets, the first (arbitrarily selected!) subnet detected will be used. All modules that exist in other subnets will be ignored. Therefore, different (arbitrary) subnets can be recognized with every new scan and different modules can be displayed.

13-18 Communications and networked systems

During the scan, COMMAP modules will be detected and displayed when the Front Side within a rack but are not entered into the configuration file. COMMAP modules can only be fully read and entered into the configuration file with the scan of the Back Side. Please refer to the help information for the function Create configuration.

Shortcuts: Toolbar:

13.1.30 Configuration menu Simple comparison with PLC


The simple comparison provides a quick overview of the difference between the currently displayed and the actually loaded configuration. Prior to initiating the comparison, you need to select (highlight) the elements to be compared with the elements in the networked system.

Shortcuts: Toolbar:

13.1.31 Configuration menu Detailed comparison with PLC


The detailed comparison provides an accurate overview of the differences between the currently displayed and the actually loaded configuration. Prior to initiating the comparison, you need to select (highlight) the elements to be compared with the elements in the networked system.

The results display lists matches or errors: The examined component is specified in the columns Rack ID and Mod ID (Rack Slot ID). The Element column indicates in which parameter a difference exists. For example, if differences in IP addressing have been detected, it displays IP address. The column Value (Reference) displays the contents of the currently displayed configuration file, and the column Value (Target) displays the contents obtained from the network. The Status column indicates whether the contents are identical or not. The comparison is started by clicking on the Start button.

Communications and networked systems 13-19

13.1.32 Configuration menu Detailed comparison with file


The detailed comparison provides an accurate overview of the differences between the currently displayed and another file. A file selector dialog box opens for this purpose. Prior to initiating the comparison, you need to select (highlight) the elements to be compared with the elements in the networked system.

The results display lists matches or errors: The examined component is specified in the columns Rack ID and Mod ID (Rack Slot ID). The Element column indicates in which parameter a difference exists. For example, if differences in IP addressing have been detected, it displays IP address. The column Value (Reference) displays the contents of the currently displayed configuration file, and the column Value (Target) displays the contents of the second file. The Status column indicates whether the contents are identical or not. The comparison is started by clicking on the Start button.

13.1.33 Configuration menu Check


The currently editied configuration file is checked for errors. The check covers the unique assignment of the IP addresses of the Ethernet interfaces, the Rack ID and the Rack Slot ID. Faulty entries are highlighted in yellow. The error description is displayed in the status line. The next faulty line is accessed with the menu function Tools, Go to next error. The error check can be parametrized with the function Presets, Check function. This allows e.g. to detect errors already during the entry process.

Shortcuts: Toolbar:

13.1.34 Configuration menu Load copy


This function enables the fast replacement of a module in the rack. Before this, all necessary data of the old module are temporarily saved with the function Unload copy so that they can be transfered into a new module with this function. Both modules must be communication-capable. This means that the rack and module numbers or the communications channel, respectively, must be identical. Once the information has been saved with Unload copy, it can be reused several times for the same module. The temporary data will only be replaced locally when the Unload copy function is executed again.

13-20 Communications and networked systems

Loading with a change of IP addresses or Ethernet parameters will result in a Reboot-Stop with the status display 1E on the corresponding module. The reboot (request immediately after loading or manual switch-on/off of the rack) will activate the configured IP addresses or Ethernet parameters in the module. The comments column will indicate whether a reboot is necessary for the module. The request to reboot the module can be disabled for the entire project with the function Presets: General:

13.1.35 Configuration menu Unload copy


This function enables the fast replacement of a module in the rack. Before this, all necessary data of the old module are temporarily saved with the function Unload copy so that they can be subsequently transfered into a new module with the function Load copy. Prior to unloading, the rack number (rack ID) and the module number (rack slot ID) are set in a dialog box. Both modules must be communication-capable. This means that the rack and module numbers or the communications channel, respectively, must be identical. Once the information has been saved with Unload copy, it can be reused several times for the same module. The temporary data will only be replaced locally when the Unload copy function is executed again. Loading with a change of IP addresses or Ethernet parameters will result in a Reboot-Stop with the status display 1E on the corresponding module. The reboot (request immediately after loading or manual switch-on/off of the rack) will activate the configured IP addresses or Ethernet parameters in the module. The comments column will indicate whether a reboot is necessary for the module. The request to reboot the module can be disabled for the entire project with the function Presets: General:

13.1.36 Ethernet menu Edit parameters


Individual Ethernet parameters can be entered to tailor the system or subsystems to specific communications requirements. A new system comes with default parameters that can subsequently be changed. The changes can be made for the entire system, for a rack or a module. Changing the Ethernet parameters is done in several steps (see below).

The subnet mask can only be set for the entire system. To change the subnet mask, you need to set the input field Applies to to System. Detailed information about the subnet mask is contained in the paragraph Subnet mask.

Communications and networked systems 13-21

Default Gateway: Gateways or routers are used for communications across net boundaries. This allows e.g. remote maintenance and remote diagnostics. If you use such a component, its address that may be used to reroute datagrams must be in the same subnet as the automation components that use this gateway/router. If no gateway/router is to be used, the address 0.0.0.0 must be entered in this field. The following example shows a system that is connected to a gateway or router via the Back Side port. All IP addresses must be in the same subnet. The component contains the default gateway address 121.1.100.100.

You can find further information about communications across net boundaries in the paragraph Subnet mask.

Retransmission Timer: Time in ms until a datagram is repeated (retransmitted) at the IP level in case of a missing response. Retransmission Counter: Number of permitted repeats IP Lifetime: Befor datagrams can be exchanged with a station, the MAC address of this station must be known. For this purpose, an ARP telegram is used to determine the relationship between the IP address and the physical Ethernet address and store it in a list. The IP Lifetime specifies how long this relationship may live in the list after the last data exchange. The data exchange between two stations can occur in full duplex or half duplex mode with different data rates. In full duplex mode, simultaneous transmits of both stations does not result in a collision. In the Autonegotiation mode, the best mode for all stations is automatically determined. The COMMAP module can only be operated with Autonegotiation. All modules of the Bosch CL550 support 100 Mbps full duplex.

All parameters can be read directly from a connected system module and displayed with the option Display current hardware. For this purpose, the input field Applies to must be set to Module. The desired module is selected with the Forward and Backward buttons. The display of the Defaults is replaced with the current Hardware values. Changed Ethernet parameters can be enabled by following these steps:

13-22 Communications and networked systems

1) By selecting the interface, you determine whether the parameters are to be used for the Front Side or Back Side. You can find further information about the Front and Back Side in the paragraph with the same title. 2) In the field Applies to, you determine whether the parameters are to be used for the entire System, for a Rack or for a Module. 3) The component can now be selected with the Forward and Backward buttons. You can monitor this selection in the control tree in the background. 4) Finally, the input is terminated with the Accept button.

Changed parameters are initially only accepted for the current configuration file. In the component itself, the changes are only accepted and enabled with the loading process.

Loading with a change of IP addresses or Ethernet parameters will result in a Reboot Stop with the status display 1E on the corresponding module. The reboot (request immediately after loading or manual switch-on/off of the rack) will activate the configured IP addresses or Ethernet parameters in the module. The comments column will indicate whether a reboot is necessary for the module. The request to reboot the module can be disabled for the entire project with the function Presets: General:

Shortcuts: Toolbar:

13.1.37 IP Addresses menu Define


This function provides a convenient method of assigning IP addresses to several modules. Prior to calling up this function, you need to select (highlight) all elements to which IP addresses are to be assigned.

Enter a start address in the field IP Address, e. g. 121.1.1.0. Select whether the addresses are to be assigned automatically for the Front Side or Back Side. If you enable consecutive numbering, the addresses will be assigned in a consecutive manner in the last of the four numerical blocks of the IP address, starting with the start address.

Communications and networked systems 13-23

Clicking on the OK button starts the process.

Example:

Shortcuts: Toolbar:

13.1.38 Project protection menu Change system protection


A system password is used to protect a configuration file. By specifying a password, it is possible to protect all actions in the current file and in the entire system from external access. All actions are any processes that can either affect the current configuration file or contents in system modules of the system. First, you need to create a password using the function Project protection, Edit system password. Then you can enter the password. Confirm the entry with OK or the key. Now you have the possibility to enable or disable the protection options Edit entire system.

After a password has been entered, changed or deleted, this action is initially only accepted for the current configuration file. To update the system protection also for the system, it is necessary to initiate the loading process. The loading option Entire system must be selected in order to update the password in all system modules of the system. This is necessary to ensure a system-wide protection from unauthorized access.

13-24 Communications and networked systems

Shortcuts: Toolbar:

13.1.39 Project protection menu Edit system password


A system password is used to protect a configuration file. By specifying a password, it is possible to protect all actions in the current file and in the entire system from external access. All actions are any processes that can either affect the current configuration file or contents in system modules of the system.

Initial creation of a password In the field Enter password, enter the desired password. The entry needs to be confirmed in the field Confirm password.

Changing or deleting a password Enter the existing password in the field Enter old password. You can then enter a new password in the field Enter new password. If you leave this field empty, the system protection is disabled.

After a password has been entered, changed or deleted, this action is initially only accepted for the current configuration file. To update the system protection also for the system, it is necessary to initiate the loading process. The loading option Entire system must be selected in order to update the password in all system modules of the system. This is necessary to ensure a system-wide protection from unauthorized access. The enabling and disabling of the system protection is done with the function Project protecton, Edit system protection.

Shortcuts: Toolbar:

13.1.40 Presets menu


This summarizes several basic presets: General IP address range Check function Print set-up

Communications and networked systems 13-25

13.1.41 Presets menu General


Rack range is used to limit the rack numbers (Rack IDs). The standard range is 1 through 99. Communications channel is used to specify whether the PC will communicate via Front Side or Back Side port of the system. You can find further information about the Front and Back Side in the paragraph with the same title. Because communications at the application end is handled via the Front Side port of the COMMAP system module, loading of the configuration file into the COMMAP can only occur via the Back Side port.

UDP options This is used to set the parametes of the internal UDP driver of the PC. Maximum response time per protocol: Time in ms until a datagram is repeated (retransmitted) at the IP level in case of a missing response. Default: 400 ms Retransmission Counter: Number of permitted repeats. Default: 2 A transmission protocol can be activated to record the UDP activities between the programming unit and the modules. Send protocol CfgSendUdp.txt Receive protocol CfgRecvUdp.txt Requests: Request if reboot is necessary Loading with a change of IP addresses or Ethernet parameters will result in a Reboot Stop with the status display 1E on the corresponding module. A request for the automatic reboot is displayed immediately after loading. This request to reboot the module can be enabled or disabled for the entire project.

13.1.42 Presets menu IP address range


When you specify limits for the Front Side or Back Side port, only IP addresses within these limits will be accepted. The specification of a Host IP address refers to the Ethernet card in your PC. If this field contains several entries, your PC contains other IP communications-enabled components, such as dynamic Internet connections or the Bosch SoftSPS PCL. You can adapt the communications parameters as well as the Host IP address of the Ethernet interface in your PC through the Windows Control Panel. You can use a Host address for the calculation of the limits. The field Host Network ID displays the Host IP address in an AND combination with the associated subnet mask. If the address contains asterisk signs *, the AND operation yields no match in these positions. This is also the possible address range of the subnet. The limits are set for this subnet as soon as you select the option Front Side or Back Side and click on the Accept button.

13-26 Communications and networked systems

Example: Host IP address Subnet mask AND operation = Host Network ID Lower limit Upper limit 121.1.100.0 255.255.0.0 121.1.*.* 121.1.0.0 121.1.254.254

You can find further information about IP addresses in the paragraph with the same title. You can find further information about Front and Back Side in the paragraph with the same title.

13.1.43 Presets menu Check function


All entries can be checked for errors with the function Check configuration table . The check verifies the system module number within a rack as well as all Front and Back Side IP addresses and the rack numbers of the entire system. The check options allow further settings for the check functions. To enable communictions with all components of a system via a Front Side or Back Side communications channel, the IP addresses must be in the same (sub)net (see paragraph Subnet mask ). If an attempt is made to specify an IP address outside the subnet, the check functions will indicate an error. You can specify here which range is to be considered a subnet: the entire system, a subsystem or a rack.For the Back Side, the check function is only applicable to the entire system. If you enable the option Call up defined check after editing, you need not call up the function Check configuration table. This option displays all errors immediately after the entry.

13.1.44 Presets menu Print set-up


The print settings determine the print form and the layout of the printout. Several editing fields allow to customize the bottom line with company and project data. The printout will contain more details if the options include comments and include Ethernet parameters are enabled.

13.1.45 Help menu Contents


The WinSPS help is enabled and the list of help topics is displayed. This help also contains all topics about the project configuration. You can find the topics in the table of contents under Communcations, Project configuration. You can use the index cards of the WinSPS help to look for information in a table of Contents, an Index or via Search strings.

Communications and networked systems 13-27

Contents: When you double-click on a book, additional topics are displayed. Another double-click on the book will hide the topics again. When you double-click on a topic, the corresponding help information is displayed.

Index: The Index works similar to the table of contents. Here, you also have the possibility to enter the word that you are looking for (or its initial letters). The Index contains a list of key help topics in alphabetical order.

Search: This lists all words that are used in the WinSPS help. Here, you also have the possibility to enter the word that you are looking for (or its initial letters). All found topics that contain this word are then listed. A doubleclick takes you to the corresponding help topic. Search options can be specified with the Options button. For more information about the use of the WinSPS help, please click on this button.

13.1.46 Help menu Info


This function provides information about this version of the project configurator software.

Shortcuts: Toolbar:

13-28 Communications and networked systems

13.2 Central programming


Central programming comprises the centralized monitoring, operation and control of an installation and its individual components (controllers). In this context, the term central means that a programming unit is connected with the controllers via the PROFIBUS FMS bus system at any given point of a system. Contrary to the conventional method of data transmission via serial interfaces, up to 124 controllers can be connected simultaneously with the programming unit.

Conventional connection

Central programming

In remote monitoring, operation and control of a controller for machines, the regulations for accident prevention (especially VBG5) must always be observed. Please observe that the controllers may be positioned over a large physical area so that parts of the system may not be within immediate sight and reach.

All necessary safety precautions must also be observed if several programming units are involved in central programming.

Communications and networked systems 13-29

13.2.1 Prerequisites
The central programming unit must be equipped with the PROFIBUS interface card PROFIboard (see next paragraph Preparations Installing the PROFIboard). You also need the Bosch PROFIBUS configurator software. This Windows program allows you to configure the networked system (see paragraph Preparations Bus configuration). The central programming cannot run under Windows 95 at this time because the PROFIboard interface card can only be installed under Windows NT (version 4.0 or higher). Besides, there is the restriction that, with a multiple call, the central programming can run in only one WinSPS process. Every controller to be integrated in the central programming must be provided with a computer interface module (see table). The bus address of the module is set via a DIP switch. Click on the desired module name to display the DIP-switch configuration:

Controller CL200 * CL350 CL400 CL500

Module R200P ZE350P COM-P COM-P

Version >= 1.3 >= 100 >= 102 >= 102

Order Number 1070 077285 1070 078596 1070 078596

* For the CL200, firmware version 1.8 (or higher) is required for the modules ZE200, ZE200A, ZE200M, and ZE200AM.

The PROFIboard interface in the programming unit and the modules of the controllers are connected via shielded twisted-pair cables (PROFIBUS-Kabel). Please observe the conditions that are specified by the PROFIBUS FMS protocol DIN EN 50170 (DIN 19245-1/2)!

13.2.2 Functionality and limitations


All WinSPS communication functions can be performed with the central programming - with the following exceptions: - It is not possible to load the SK table into a newly plugged-in system coordinator SK500 of the CL500. This means that it is necessary to load the SK table through the conventional path (serial interface) after the installation or a failure of a SK 500 module (IPL). The COM-P module must be registered in this SK table. - The function 'Control', 'System command: Load firmware' (only CL200) can not be used with the central programming.

13-30 Communications and networked systems

- The interface test in the menu 'Control' is not able to discover if the controller is connected with the programming unit via the CP. The interface test only delivers usable results with conventional connections. Please use the function Control, Central Programming which includes a special Connection test. You should be aware that the data refresh cycle is slowed down e. g. in the Monitor due to the possibly lower data rate of the bus system.

13.2.3 Preparations - Installing the PROFIboard


The central programming cannot run under Windows 95 at this time because the PROFIboard interface card can only be installed under Windows NT (version 4.0 or higher). Besides, there is the restriction that, with a multiple call, the central programming can run in only one WinSPS process.

System requirements - You have installed Windows NT 4.0 on your PC and have administrator rights. - WinSPS has been successfully installed on your PC. - The PROFIboard has been installed in your PC.

Prior to installation, the PROFIboard must already be installed in your PC. If the PROFIboard is missing, non-defined program conditions can occur!

Installation The individual installation steps are described based on the dialog boxes that are sequentially displayed: 1 Start the PROFIBRD.EXE program in the WinSPS program directory. 2 Dialog box Select Language. Choose the desired installation language. 3 Dialog box Welcome. The installation can start. Confirm with OK'. 4 Dialog box Choose a destination directory. Please overwrite the default entry and enter the WinSPS program directory (e.g. C:\Bosch\WinSPS). 5 Dialog box Install. Confirm the question if the already existent directory should be overwritten.

Communications and networked systems 13-31

6 Dialog box Choose components. Only choose the options PROFIboard Driver and Firmware. The Libraries and Header Files are not used. Confirm with 'OK'. 7 Dialog box Windows NT Log-On. You need administrator rights for the driver installation (see also Windows NT description by Microsoft). Confirm with 'OK' if you have administrator rights. 8 Dialog box Create backup. Negate the question concerning the backup of the installed files 9 Dialog box Presets. You can install up to four PROFIboard cards in your system. Make sure that the 'AutoConfig' option is switched on and confirm with 'OK'. The necessary files will now be installed. 10 Dialog box Add to the Start menu. The PROFIboard should not appear in the start menu. Choose 'No'. 11 Dialog box Install. The installation is complete. 12 Dialog box Install. The PC must be restarted. With the restart, all firmware files on the PROFIboard will be updated and a driver will be started. Confirm with 'OK' to restart your PC.

Checking the PROFIboard card You can check at any time if the PROFIboard-Karte is installed and enabled. Call up the Windows NT program 'Control panel' and choose the dialog box for 'Devices'. The PROFIboard driver with the Status 'Started' and the 'Automatic' startup must be listed in the devices dialog box (see illustration).

Deinstalling the PROFIboard The deinstallation is done with the 'Software' program in the Windows NT control panel.

13.2.4 Preparations - Bus configuration


As the first step, the basic structure of the networked system is defined with the Bosch PROFIBUS-configurator software (example see illustration).

13-32 Communications and networked systems

The configuration must include all connected controllers. In the topology editor of the PROFIBUS configurator, a symbolic name needs to be assigned for every controller (max. 8 characters without data type). This name must match the controller name of the WinSPS (Controller presets). The PROFIBUS configurator and the Central Programming (CP) can be done on the same unit. You can also include stations from other manufacturers. However, the central programming is not possible with those devices. The configuration process yields the topology file (.TOP) and the bus parameter file (.BUS). These files are evaluated by the WinSPS software for the central programming. The WinSPS software reads these files from the project directory. After an existing configuration has been changed, it is necessary to terminate the WinSPS software (if active) and called up again. Place both files, (.TOP) and (.BUS), into the project directory before calling up the WinSPS software.

13.2.5 Presets
An additional license is necessary for the Central Programming (CP). You can get further information via the menu function 'License', 'Apply' in the presets or via the Bosch software service. When the topology file (.TOP) and the bus parameter file (.BUS) are available in the project directory, you only have to choose 'Profibus FMS' in the edit field 'Port' in the file presets (see illustration).

This allows the handling of the communications functions in the Editor and the Monitor on the PROFIBUS (via the PROFIboard).

Definition of bus addresses The communications with the controller is based on the relationship between the bus address (station address) in the topology file (.TOP) and the actually set bus address of the computer interface module. The following illustration shows this relationship:

Communications and networked systems 13-33

The bus address of the PROFIboard is automatically set by WinSPS (lowest unused address).

13.2.6 Current information


The menu function 'Control', 'Central Programming' (CP) is available in the Editor and Monitor. You can obtain useful information about the current CP condition with this function. Here you can see the data from the configuration files .TOP and .BUS. You get a current overview of the controllers that are connected to the PROFIBUS and available for the central programming. Additionally, the version and status of the PROFIboard interface is indicated. You can obtain further information in the context help of the menu function.

13.2.7 Troubleshooting
The Central Programming (CP) cannot be selected in the file presets.

Do you have a license for Central Programming? An additional license for Central Programming is necessary. You can get further information via the menu function 'License', 'Apply' in the presets or via the Bosch software service. Is your operating system Windows NT? At the moment, Central Programming cannot be executed under Windows 95 because the installation of the PROFIboard interface card is only possible under Windows NT (version 4.0 or higher). If the additional license for the CP is only available under Windows 95, you can "move" it to your Windows NT system via the functions 'Export/Import license' (see paragraph 'Presets', 'License').

13-34 Communications and networked systems

The Editor or Monitor cannot be called up.

Did you choose the correct controller type? Not all Bosch controllers are qualified for Central Programming. You can find a list of the qualified controllers in the paragraph Prerequisites.

The connection with the controller is not established.

Is Central Programming selected in the file presets? Check the entry in the field 'Port' in the presets. The entry must be set to Central programming. Is the configuration data still up to date? After a configuration in the PROFIBUS configurator has been changed, it is necessary to terminate the WinSPS software (if active) and call it up again. Before calling up the WinSPS software, place the configuration files (.TOP) and (.BUS) into the project directory. Are the bus addresses of the computer interface module correctly set? The bus address of a module is set via a DIP switch. Do the adjusted addresses match the data of the topology file (.TOP)? Click on the desired module name to display the DIP switch configuration: COM-P, ZE350P, R200P The bus addresses must not be assigned more than once. Check the bus addresses with the WinSPS function 'Control', 'Central Programming' (see paragraph 'Current Information'). Compare the display with your configuration data. Are all connections correct? Are any cables defective? Are the bus terminators set correctly? Check the PROFIBUS lines between the controller(s) and the PROFIboard in the programming unit. Is the PROFIboard card properly installed and enabled? Call up the Windows NT program 'Administrative Tools, 'Windows NT Diagnostics', choose the index card 'Resources', and click on the 'I/O Port' button. Check all addresses. There must not be a conflict with another device. If a conflict occurs, you need to change the address of the PROFIboard or of the other device. Then you need to call up the installation program for the PROFIboard card again (see paragraph 'Preparations - Installing the PROFIboard'). Call the Windows NT program 'Control panel' and choose the dialog box for 'Devices'. The PROFIboard driver with the Status 'Started' and the 'Automatic' startup must be listed in the devices dialog box. CL500 only: Does the system coordinator SK500 contain the SK-table including the entry of the COM-P module?

Communications and networked systems 13-35

You need to load the SK table through the conventional path (serial interface) into the module after the installation or a failure of a SK500 module. The COM-P module must be contained in this SK table.

PCL The Control in the PC

14-1

14 PCL The Control in the PC


The Bosch Software-PLC PCL represents a special control. It is operated as a card in an industry-PC (IPC). The projecting of a PCL is divided into three steps: 1 The program data of the PCL are edited - as usual - in the WinSPS and then loaded into the controller. 2 The periphery connection of the PCL works with COMNET-DP. The editing of the I/O configuration is made with the help of WinDP. 3 The program WinPanel is used for the handling and supervision of the PCL, both are installed together on your PC. WinPanel can also be used to simulate the PCL or CL550 controllers. Please see also the Help of the WinPanel software.

The generation and loading of a PCL program with the help of the WinSPS is not essentially different from the project engineering of a usual PLC. You can get information about how to configurate the periphery connection via WinDP in the WinDP help (same heading of the chapter).

14.1 Installation
The loading of the PLC program with WinSPS and the loading of the I/O configuration with WinDP can of course only be done after the PCL has been installed and started in the PC. You should therefore start with the installation of the PCL. PCL with WinPanel, WinSPS and WinDP can all be installed on the same PC. But this is not absolutely necessary. You can also work with various PCs and connect them for the project engineering via a PC network. The PCL must be installed on your PC before the installation of the drivers and the WinPanel software. The installation and starting of the PCL is very simple because of the integrated Plug&Play function. You can get detailed installation notes in the LiesMich.NT or LiesMich.95 files, respectively (or call up LiesMich.exe file for a Word document) on the PCL installation diskette No.1. Here is a short summary: 1 Please check at first, if the network protocol TCP/IP exists on your PC (see ReadMe file for details). 2 Installation of the PCL into a free PCI slot of the PC (pull main plug at PC). 3 Start PC and operating system Windows NT or 95. 4 The Windows Plug&Play function recognizes the new card and displays this in a dialog box. Here, the installation of the drivers is started.

14-2

PCL The Control in the PC

5 The PCL is configurated like a network card for Windows. Additional presets in the control panel for networks are necessary: Adding the new card (if it has not already be done by Plug&Play) , limit the bindings of the card to the TCP/IP protocol, and assign to the required TCP/IP address. 6 Should the occasion arise, install WinSPS and WinDP on your PC. 7 Execute installation of WinPanel (Setup.exe on installation diskette No.1).

Control of the PCL You can control anytime if the PCL is installed or activated. Please call up the program Control Panel, and choose the dialog box for Devices under Windows NT. The driver Bosch Win/VxWorks virtuell network with the status Started and the start type Automatic must be listed in the device list. For Windows 95: Please choose System in the control panel and there, the register card Device Manager. The PCL is displayed as the special system component.

Deinstallation of the PCL The deinstallation is made with the program Software in the Windows control panel.

14.2 Starting
The following steps are necessary for the starting of the PCL: 1 The PCL and WinPanel must be installed. Also, WinSPS and WinDP must be available. These programs can also be installed on another PC. Then, the connection is made with a network card via the TCP/IP protocol. You can get more information in the following chapter Project Engineering with WinSPS. 2 Activate the control- and display program of the PCL: WinPanel. 3 The PLC program is edited and loaded into the PCL with the help of WinSPS. 4 The periphery connection via the integrated DP busmaster is made with the help of WinDP. 6 At last, connect the periphery with the PCL and switch the control to 'Run' (with the WinPanel program). WinPanel can also be used to simulate the PCL or CL550 controllers. Please see also the Help of the WinPanel software.

14.3 Projecting with WinSPS


Preset You need an additional license for the PCL. You can get further information via the menu function License, Apply in the preset or via the Bosch Softwareservice.

PCL The Control in the PC

14-3

PCL must be chosen in the input field Control type of the control preset.

In the input field Interface of the file preset, you can choose, if the communication with the PCL is developed internally (WinPanel via MMF) or externally (TCP/UDP/IP). There is no cable connection to the PCL necessary with the internal communication. Only condition: PCL, WinPanel and WinSPS (and probably WinDP) must be installed on the same PC. The external communication allows you to install the programs WinSPS and WinDP, which are necessary for the project engineering, on another PC. Both PCs must communicate through the network protocols TCP/IP (e.g. through standard network card).

Editing You can edit the PLC program in the graphic views IL, LD, FBD, or SFC as with the classic PLC - and load it afterwards into the PCL.

14-4

PCL The Control in the PC

Loading Before loading via the external way, you probably have to make the TCP/IP address of the PCL known. You can reach the setup via the menu function Control, Central Programming. There are no additional setups necessary for the internal data transmission. Please note that the PCL only starts after the I/O configuration has successfully been done.

Starting You can test your program in the monitor. You can observe the conditions of the COMNET-DP bus and the PCL with WinPanel.

14.4 Troubleshooting
The PCL can not be selected in the preset.

Do you own a license for the PCL? An additional license is necessary for the PCL. You can get further information via the menu function License, Apply in the preset or via the Bosch Softwareservice.

The loading of a PLC program into the PCL is interrupted with the message Control does not exist.

Did you choose the right communication path in the interface setting? The PCL can be operated via an internal or external communication canal. Please check the interface in the file preset. More in the chapter Project Engineering with WinSPS. You chose the external communication. Are the right protocols and IP addresses set on the network cards? With the external communication, it must be possible that all participants (in this case the PC with WinSPS and the PC with WinPanel/PCL) can communicate through the TCP/IP protocol. The protocol is set in the Windows control panel. Please check the settings. Also, the IP addresses of both participants must be coordinated. This setting, too is in the Windows control panel and at Control, Central Programming at WinSPS.

The PCL is kept in the Stop mode although the loading of the PLC program has been done successfully.

Does the configuration of the periphery in the PCL exist?

PCL The Control in the PC

14-5

Die Peripherieanbindung der PCL luft ber COMNET-DP. Die Bearbeitung der E/A-Konfiguration wird mit Hilfe von WinDP gettigt.

14-6

PCL The Control in the PC

1070 0xx 0xx-101 (01.xx) D HB SP AT/PLS Printed in Germany

You might also like