User Manual for PLC Programming With
Total Page:16
File Type:pdf, Size:1020Kb
User Manual for PLC Programming with CoDeSys 2.3 Copyright ã 1994, 1997, 1999, 2001,2002, 2003 by 3S - Smart Software Solutions GmbH All rights reserved. We have gone to great lengths to ensure this documentation is correct and complete. However, since it is not possible to produce an absolutely error-free text, please feel free to send us your hints and suggestions for improving it. Trademark Intel is a registered trademark and 80286, 80386, 80486, Pentium are trademarks of Intel Corporation. Microsoft, MS and MS-DOS are registered trademarks, Windows is a trademark of Microsoft Corporation. Publisher 3S - Smart Software Solutions GmbH Fischerstraße 19 D-87435 Kempten Tel. +49 831 5 40 31 - 0 Fax +49 831 5 40 31 – 50 Last update 20.08.2003 Version 2.0 Content 1 A Brief Introduction to CoDeSys 1-1 1.1 What is CoDeSys .................................................................................................1-1 1.2 Overview of CoDeSys Functions... ......................................................................1-1 1.3 Overview on the user documentation for CoDeSys.............................................1-3 2 What is What in CoDeSys 2-1 2.1 Project Components.............................................................................................2-1 2.2 Languages... .........................................................................................................2-8 2.2.1 Instruction List (IL)... .............................................................................................2-8 2.2.2 Structured Text (ST).............................................................................................2-10 2.2.3 Sequential Function Chart (SFC).........................................................................2-16 2.2.4 Function Block Diagram (FBD)... .........................................................................2-20 2.2.5 The Continuous Function Chart Editor (CFC)... ..................................................2-21 2.2.6 Ladder Diagram (LD)............................................................................................2-21 2.3 Debugging, Online Functions...............................................................................2-23 2.4 The Standard... .....................................................................................................2-25 3 We Write a Little Program 3-1 3.1 Controlling a Traffic Signal Unit............................................................................3-1 3.2 Visualizing a Traffic Signal Unit............................................................................3-12 4 The Individual Components 4-1 4.1 The Main Window.................................................................................................4-1 4.2 Project Options.....................................................................................................4-3 4.3 Managing Projects................................................................................................4-15 4.3.1 'Project 'Data Base Link'.......................................................................................4-34 4.4 Managing Objects in a Project... ..........................................................................4-41 4.5 General Editing Functions....................................................................................4-48 4.6 General Online Functions... .................................................................................4-52 4.7 Window set up......................................................................................................4-62 4.8 Help when you need it... .......................................................................................4-62 5 Editors in CoDeSys 5-1 5.1 This is for all Editors... ..........................................................................................5-1 5.2 Declaration Editor... ..............................................................................................5-2 5.3 The Text Editors... ................................................................................................5-12 5.3.1 The Instruction List Editor... .................................................................................5-16 5.3.2 The Editor for Structured Text..............................................................................5-17 5.4 The Graphic Editors... ..........................................................................................5-17 5.4.1 The Function Block Diagram Editor... ..................................................................5-19 5.4.2 The Ladder Editor.................................................................................................5-24 5.4.3 The Sequential Function Chart Editor..................................................................5-29 5.4.4 The Continuous Function Chart Editor (CFC)... ..................................................5-36 Table Of Contents 6 The Resources 6-1 6.1 Overview of the Resources.................................................................................. 6-1 6.2 Global Variables, Variable Configuration, Document Frame.............................. 6-2 6.2.1 Global Variables................................................................................................... 6-2 6.2.2 Variable Configuration... ...................................................................................... 6-6 6.2.3 Document Frame... .............................................................................................. 6-7 6.3 Library Manager... ................................................................................................ 6-8 6.4 Log... .................................................................................................................... 6-10 6.5 PLC Configuration................................................................................................ 6-12 6.5.1 Working in the PLC Configuration... .................................................................... 6-13 6.5.2 General Settings in the PLC Configuration ......................................................... 6-14 6.5.3 Custom specific parameter dialog ....................................................................... 6-14 6.5.4 Configuration of an I/O Module............................................................................ 6-15 6.5.5 Configuration of a Channel.................................................................................. 6-18 6.5.6 Configuration of Profibus Modules ...................................................................... 6-18 6.5.7 Configuration of CAN modules ............................................................................ 6-26 6.5.8 Configuration of a CanDevice (CANopen Slave) ................................................ 6-30 6.5.9 PLC Configuration in Online Mode ...................................................................... 6-33 6.6 Target Settings ..................................................................................................... 6-33 6.6.1 Dialog Target Settings ......................................................................................... 6-34 6.7 Task Configuration... ............................................................................................ 6-35 6.8 Watch and Receipt Manager... ............................................................................ 6-40 6.9 Sampling Trace.................................................................................................... 6-43 6.9.1 Create a Sampling Trace..................................................................................... 6-43 6.9.2 'Extras' 'Save trace values' .................................................................................. 6-47 6.9.3 'Extras' 'External Trace Configurations'............................................................... 6-48 6.10 Target Settings ..................................................................................................... 6-49 6.10.1 Dialog Target Settings ......................................................................................... 6-50 6.11 Parameter Manager ............................................................................................. 6-50 6.11.1 Activating the Parameter Manager ...................................................................... 6-51 6.11.2 Der Parameter Manager Editor... ........................................................................ 6-52 6.11.3 Parameter List Types and Attributes ................................................................... 6-52 6.11.4 Editing parameter lists ......................................................................................... 6-54 6.11.5 Export / Import of parameter lists ........................................................................ 6-56 6.11.6 Parameter Manager in Online Mode ................................................................... 6-56 6.12 PLC Browser........................................................................................................ 6-57 6.12.1 General remarks concerning PLC Browser operation ........................................ 6-57 6.12.2 Command entry in the PLC Browser................................................................... 6-58 6.12.3 Use of macros during the command entry in PLC-Browser................................ 6-59 6.12.4 Further PLC Browser options .............................................................................