Show/Hide Bookmarks L Manual Global Drive PLC Developer Studio Global Drive Drive PLC Developer Studio
Show/Hide Bookmarks This Manual is valid for the Drive PLC Developer Studio V02.00. Important note: The software is supplied to the user as described in this document. Any risks resulting from its quality or use remain the responsibility of the user. The user must provide all safety measures protecting against possible maloperation. We do not take any liability for direct or indirect damage, e.g. profit loss, order loss or any loss regarding business.
Show/Hide Bookmarks Drive PLC Developer Studio Contents 1 Preface and general information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 1.1 About this manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.1 Terminology used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 1-1 1.2 Applied conventions . . .
Show/Hide Bookmarks Drive PLC Developer Studio Contents 4 Programming languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 4.1 The standard IEC 61131-3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 4.2 Instruction list (IL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.
Show/Hide Bookmarks Drive PLC Developer Studio Contents 5.2 Arrange windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1 Commands in the “Window” menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5 5-5 5.3 Basic settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.
Show/Hide Bookmarks Drive PLC Developer Studio Contents 7.4 Network editors (general) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4.1 Jump labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4.2 Network comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4.
Show/Hide Bookmarks Drive PLC Developer Studio Contents 8.4 Parameter Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.4.2 Terminology used by the Parameter Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.4.3 Instance Parameter Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.4.4 Type Parameter Manager . . . . . . . . . . . .
Show/Hide Bookmarks Drive PLC Developer Studio Contents 10 IEC 61131-3 data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1 10.1 Standard data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.1.1 BOOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.1.
Show/Hide Bookmarks Drive PLC Developer Studio Contents 12.5.3 12.5.4 12.5.5 12.5.6 LE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . EQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . NE . .
Show/Hide Bookmarks Drive PLC Developer Studio Contents 14.2.6 14.2.7 14.2.8 14.2.9 14.2.10 14.2.11 14.2.12 SIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . COS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Show/Hide Bookmarks Drive PLC Developer Studio Preface and general information 1 Preface and general information 1.1 About this manual This Manual offers detailed information on the Drive PLC Developer Studio (DDS). The Drive PLC Developer Studio is a powerful development environment for your PLC programs on Lenze IEC 61131 systems.
Show/Hide Bookmarks Drive PLC Developer Studio Preface and general information 1-2 DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio Introduction 2 Introduction 2.1 Function overview Project structure The project is saved in a file that is named after the project. The first organization unit created in the new project is automatically called PLC_PRG. Other organization units (programs, function blocks and functions) can be called from here.
Show/Hide Bookmarks Drive PLC Developer Studio Introduction 2.2 Project components 2.2.1 Project A project includes all objects of a control program. Links with the libraries are saved in a file bearing the project name. A project includes the following objects that can be accessed via the Object Organizer: • Organization units • Data types • Visualizations • Resources – Libraries – Codes 2.2.
Show/Hide Bookmarks Drive PLC Developer Studio Introduction Function CheckBounds Tip! Definition of a function with the name CheckBounds in your project will automatically check whether the boundaries have been exceeded on access to an array in your project! (refer example below). Also refer the Checkbound library (Checkbound.lib). The function name is defined and must not be changed. The following program example to test the CheckBounds function corrects access outside defined array boundaries.
Show/Hide Bookmarks Drive PLC Developer Studio Introduction 2.2.4 Function block A function block is a software organization unit whose execution returns one or several values. • Unlike a function, a function block does not supply a return value. • A function block declaration starts with the keyword FUNCTION_BLOCK. • The creation of instances (data records) of a function block is a prerequisite. 2.2.4.
Show/Hide Bookmarks Drive PLC Developer Studio Introduction Example of access to an input variable: (* The function block fb has an input variable in1 of type int. *) PROGRAM prog VAR inst1:fb; END_VAR LD 17 ST inst1.in1 CAL inst1 END_PROGRAM • The declaration parts of function blocks and programs may contain instance declarations. Instance declarations are not allowed in functions. A function cannot call a function block.
Show/Hide Bookmarks Drive PLC Developer Studio Introduction Declaration part: Instruction part: PROGRAM test VAR quad: BOOL; instanz: fub; value: INT:=0; END_VAR IL CAL instanz(par1:=5,par2:=5) LD instanz.varout2 ST quad LD instanz.varout1 ST value ST instanz(par1:=5,par2:=5); quad:=instanz.varout2; value:=instanz.varout1; FBD 2.2.5 Program A program is an organization unit that returns one or several values on execution. • A program declaration starts with the keyword PROGRAM.
Show/Hide Bookmarks Drive PLC Developer Studio Introduction Restrictions occur through limited lengths in the string routines. Only 20 characters can be processed before the string is cut. The example below illustrates the restriction in online mode. 2.2.6 PLC_PRG PLC_PRG is a special predefined organization unit for a cyclical task. This organization unit is called exactly once per control cycle.
Show/Hide Bookmarks Drive PLC Developer Studio Introduction 2.2.8 Resources Resources are required to configure and organize your project and to trace variable values: • Global variables to be used throughout the entire project. • PLC configuration to configure your hardware. • Task configuration to control your program through tasks. • Task monitoring to monitor the task runtimes.
Show/Hide Bookmarks Drive PLC Developer Studio Introduction 2.3 Debugging, online functionality 2.3.1 Debugging The DDS debugging functions assist troubleshooting. • To allow debugging, go to dialog box Options, category Build options and tick check box Debugging. Note! The check box Debugging should be ticked for debugging only. Breakpoint on, Single step or Single cycle are possible only if Debugging is active. 2.3.2 Breakpoint A breakpoint is a point in the program where processing stops.
Show/Hide Bookmarks Drive PLC Developer Studio Introduction 2.3.5 Changing values online Variables can be set once-only to a specific value during operation after the command Write values was transmitted to the control. The value of a variable can also be changed online by simply double-clicking it. Boolean variables thus change from TRUE to FALSE and viceversa. For the other variables, the system will display a dialog box Write variable xy to edit the variable value. 2.3.
Show/Hide Bookmarks Drive PLC Developer Studio Program example 3 Program example “Traffic light” 3.1 Introduction This chapter includes a program tutorial for an easier start with the DDS. The setup calls for the programming of a mini traffic control system for two traffic lights at an intersection. • Both traffic lights will alternate their red/green phases.
Show/Hide Bookmarks Drive PLC Developer Studio Program example 3.2 Programming 3.2.1 Starting the DDS 1. In the Windows Start menu, select submenu Programs➞ ➞LenzeWDrive PLC Developer Studio and click Drive PLC Developer Studio to start the DDS. Tip! If under Project➞ ➞Options, category Load & Save, the check box Automatic loading is selected, the project last edited is opened automatically on DDS start. 3.2.2 Creating a new project 2. Select File➞ ➞New to create a new project. 3.2.
Show/Hide Bookmarks Drive PLC Developer Studio Program example Tip! Only the organization unit named PLC_PRG of type “Program” will be processed by the cyclical task. The cyclical task does not need to be explicitly created. 5. Select Sequential function chart (SFC) as the language for this organization unit and confirm with OK. 6.
Show/Hide Bookmarks Drive PLC Developer Studio Program example The status of the variable STATE is used to switch the output variables for the associated light colour: Traffic light phase Input variable Output variables STATE RED AMBER GREEN OFF Green 1 FALSE FALSE TRUE FALSE Amber 2 FALSE TRUE FALSE FALSE Red 3 TRUE FALSE FALSE FALSE Amber/red Off 4 5 TRUE FALSE TRUE FALSE FALSE FALSE FALSE TRUE The declaration part of the function block TRAFFICLIGHT now looks as follows:
Show/Hide Bookmarks Drive PLC Developer Studio Program example 14.Click behind the EQ box to select the output. 15.Select Insert➞ ➞Assignment. 16.Change the text “???” at the output to “GREEN”. • STATE is compared to 1. If the result is TRUE, GREEN will be assigned. This network will switch the traffic light to green if the status value input is 1. The other traffic light colours RED, AMBER and OFF require three more networks. 17.Select Insert➞ ➞Network (after) to create a new network. 18.
Show/Hide Bookmarks Drive PLC Developer Studio Program example 24.Use the above procedures and commands to complete the organization unit as follows: The first organization unit is complete. TRAFFICLIGHT controls the traffic light colours depending on the input of value STATE. 3.2.6 The organization unit WAIT The organization unit WAIT is to be a timer to control the duration of the different traffic light phases. 25.
Show/Hide Bookmarks Drive PLC Developer Studio Program example Pulse encoder TP The pulse encoder TP has two inputs ( IN, PT) and two outputs ( Q, ET). • If at the input IN TRUE is applied, the output Q , for the time PT (in milliseconds) will return the value TRUE. • ET outputs the time already expired in milliseconds.
Show/Hide Bookmarks Drive PLC Developer Studio Program example Process The first interrogation establishes whether Q is already set to TRUE ( TRUE: timer running). [ Line 1] • If Q is TRUE, we will not change the assignment of DELAY but instead call function block DELAY without input (to check whether the time has already expired). [ Line 10] • If Q is FALSE, we will set the variable IN in DELAY to FALSE and thus at the same time ET to 0 and Q to FALSE.
Show/Hide Bookmarks Drive PLC Developer Studio Program example The traffic light example requires a step for every traffic light phase. 31.Select the transition Trans0 (click the horizontal line to the left of Trans0 ) to frame it with a dotted line. 32.Select Insert➞ ➞Step transition (after) to insert a step transition after Trans0. 33.
Show/Hide Bookmarks Drive PLC Developer Studio Program example 37.Change the return jump address (underneath the arrow) from “Init” to “CHANGE1” to create the following sequential function chart: Now the individual steps must be programmed. • Double-clicking a step field will open a dialog box to create a new action. • We will use IL throughout our example. 38.Double-click the step “Init” to open the dialog box New action. 39.Select IL as the language for the action and confirm with OK.
Show/Hide Bookmarks Drive PLC Developer Studio Program example 40.Enter the following actions for the step “Init” into the editor window and define the actions for the other steps in the same way.
Show/Hide Bookmarks Drive PLC Developer Studio Program example 44.Select the transition after “CHANGE1“ and then Insert➞ ➞Step transition (after) to insert a step transition. 45.Select the newly new created transition and then Insert➞ ➞Alternative branch left to insert an alternative branch to the left of it. 46.Select the left transition and then Insert➞ ➞Step transition (after) to insert a step transition. 47.Select the newly new created transition and then Insert➞ ➞Jump to insert a jump.
Show/Hide Bookmarks Drive PLC Developer Studio Program example 48.Name the newly inserted steps/transitions as shown below: 49.Define the following actions for the two new actions and the new transition condition: Step Actions Information COUNT Counter increased by 1. OFF Both traffic lights will be switched off for 10 seconds, and the counter will be reset to 0. Transition LIGHTOFF Actions Information Transition checks whether COUNTER is greater than a certain number (in this example: 7).
Show/Hide Bookmarks Drive PLC Developer Studio Program example 3.3 Simulation Now test the program. 1. Select Project➞ ➞Compile all to compile the program. 2. Select Online➞ ➞Simulation to test the program in simulation mode. 3. Select Online➞ ➞Log in to log into the control. 4. Select Online➞ ➞Start to execute the program. Since the simulation mode is activated, the program will be executed in the DDS instead of the control.
Show/Hide Bookmarks Drive PLC Developer Studio Program example 3.4 Visualization Now that the traffic light system has been programmed in the DDS and tested in simulation mode, we can use the DDS to visualize traffic light operation on screen. 3.4.1 Creating a new visualization The DDS visualization feature is located on tab Visualization in the Object Organizer. 1. Select Object Organizer and then tab Visualization. 2. Select Project➞ ➞Object➞ ➞Insert to create a new visualization. 3.
Show/Hide Bookmarks Drive PLC Developer Studio Program example 9. Select InsertWRectangle to draw a rectangle over the three circles. 10.Double-click the rectangle to open the dialog box Configure element . 11.Use the category Colours to select a dark grey shade for Colour inside (fill colour). 12.Select ExtrasWTo the background to put the rectangle behind the circles. 13.Use the mouse pointer to draw a frame around the elements to select all elements within the frame. 14.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages 4 Programming languages 4.1 The standard IEC 61131-3 The standard IEC 61131-3 is an international standard for PLC programming languages. The programming languages implemented in the DDS are in conformity with the requirements of this standard. According to this standard, a program consists of the following elements: • Structures • Organization units • Global variables • Local variables • Configuration • etc. l DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages 4.2 Instruction list (IL) An instruction list (IL) consists of a sequence of instructions. • Each instruction starts with a new line, contains an operator and - depending on the type of operation - one or several comma-separated operands. • An instruction may be preceded by a jump label followed by a colon (;). • Additional comments can be entered. • Blank lines may be inserted between instructions.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages The table lists some IL operators along with possible modifiers and their respective meaning: Operator Modifiers Meaning LD N (=”NOT”) Load Load instruction ST N Store Save the current result in the operand location S Set Set Boolean operand to TRUE exactly if the current result is TRUE. R Reset Set Boolean operand to FALSE exactly if the current result is TRUE.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages 4.3 Structured text (ST) Structured text consists of a series of instructions that can be executed as conditioned in very high-level languages (IF..THEN..ELSE)or in loops (WHILE..DO). An instruction is completed with a semicolon;. Example: IF value < 7 THEN WHILE value < 8 DO value := value + 1; END_WHILE; END_IF; 4.3.1 Expressions An expression returns a value on evaluation and consists of operators and operands.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages 4.3.3 Instructions (overview) The following instructions are available in ST: 4.3.4 Instruction type Example Assignment by assignment operator A:=B; CV:=CV + 1; C:=SIN(X); Function block call use of the FB output CMD_TMR(IN:=%IX1.0.1, PT:=T#300ms); A:=CMD_TMR.Q RETURN RETURN; IF condition D:=B*B; IF D<0.0 THEN C:=A; ELSIF D=0.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages 4.3.5 Calling a function block in ST A function block in ST is called by using the name of the function block instance followed by parentheses in which the parameters are assigned the required values. Example • A timer is called with assignments for parameters IN and PT: CMD_TMR(IN := %IX1.0.1, PT := T#300); • The result variable Q is then assigned to variable A: A:=CMD_TMR.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages Example: IF temp < 17 THEN heating_on:=TRUE; ELSE heating_on:=FALSE; END_IF; In this example the heating is switched on only if the temperature falls below 17 degrees Centigrade, otherwise the heating will remain off. 4.3.8 CASE instruction Use the CASE instruction to aggregate several conditional instructions with the same conditional variable. Syntax: CASE OF : : ...
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages 4.3.9 FOR loop Use the FOR loop to program repetitive procedures. Syntax: INT_Var :INT; FOR := TO {BY } DO END_FOR; • The part in curly brackets {} is optional. • The are executed as long as the counter is not greater than the.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages 4.3.10 WHILE loop The WHILE loop can be used like a FOR loop, the only difference being that the cancel condition can be any Boolean expression. Syntax: WHILE DO END_WHILE; • The will be executed again and again until the returns TRUE. • If is FALSE on first evaluation already, the will never be executed.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages 4.3.11 REPEAT loop The REPEAT loop differs from the WHILE loop in that the cancel condition will only be checked after the loop has been carried out. This means that the loop must be executed at least once no matter what the cancel condition is. Syntax: REPEAT UNTIL END_REPEAT; • The are executed until returns TRUE.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages 4.4 Sequential Function Chart (SFC) Sequential Function Chart is a graphically oriented language that enables the user to describe the chronological sequence of different actions within a program. Example of a network in SFC 4.4.1 Step An organization unit written in SFC consists of a sequence of steps that are interconnected through transitions.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages 4.4.3 Entry and exit action In addition to the step action, a step may be added an entry action and an exit action. • An entry action is executed once-only immediately after the step has been activated. • An exit action is executed once-only before the step is deactivated. • Entry and exit actions can be implemented in any language.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages In a control cycle, all actions belonging to active steps are being executed. The subsequent transition condition is checked once an active step has been executed. If the transition condition is met (TRUE), the subsequent step will be executed during the next control cycle. Step flag Each step has a flag to save the step status. Note! A step flag bears the step’s name.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages Example of a two-action IEC step: • For easier monitoring of the processes, all active actions, like active steps, are displayed in blue in online mode. Which actions are active, is checked after every cycle. • Whether a newly inserted step is an IEC step is dependent on whether menu command Extras➞ ➞Use IEC steps has been selected.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages Note! When an action is deactivated, it will be executed once again. This means that every action is executed at least twice (even actions with qualifier P). If the same action is applied in two directly successive steps with time-affecting qualifiers, the time qualifier will not be effective on second use.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages Example of a declaration PROGRAM flags VAR SFCEnableLinit:BOOL; SFCError:BOOL; SFCErrorStep:STRING; SFCReset AT %IX1.0.2: BOOL; SFCInit AT %IX1.0.3:BOOL; END_VAR SFCQuitError Processing of the SFC diagram will be suspended for as long as this Boolean variable remains TRUE. Timeouts in variables SFCError will be reset. All previous times in the active steps will be reset when the variable is reset to FALSE.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages 4.4.10 Alternative branch Two or more branches in SFC may be defined as alternative branches. • Every alternative branch must start and end with a transition. • Alternative branches may include parallel branches and further alternative branches. • An alternative branch starts with a horizontal line (alternative start) and ends with a horizontal line (alternative end) or a jump.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages 4.5 Function block diagram (FBD) The function block diagram is a graphically oriented programming language. It uses a list of networks, each of which contains a structure that represents a logical or arithmetic expression, a function block call, a jump, or a Return instruction each. Example of a network in FBD: 4-18 DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages 4.6 The Continuous Function Chart editor (CFC) The Continuous Function Chart editor (CFC) operates with freely placeable elements that allow feedbacks, for example. Example of a network in the Continuous Function Chart editor. l DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages 4.7 Ladder diagram (LD) The Ladder Diagram is a graphically oriented programming language which is similar to the principle of an electrical circuit. LD is used for the design of logic circuits and also allows the creation of networks as in FBD. LD is therefore perfectly suited to control calls for other organization units. LD consist of several networks. • A network is limited on the left and on the right by a vertical power cable.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages 4.7.3 Set/ Reset coil A coil can also be defined as set or reset coil. • A variable of a set coil becomes TRUE if the network result is TRUE. • A variable of a reset coil becomes FALSE if the network result is FALSE. • If the conditions are not fulfilled, the variable does not change. A set coil (”S” in the coil symbol) can assume ”ON” status, but can then no longer be reset to ”OFF”.
Show/Hide Bookmarks Drive PLC Developer Studio Programming languages 4-22 DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio Working area 5 Desktop 5.1 User interface The DDS user interface consists of the following elements: Menu bar Tool bar (optional) Object Organizer Vertical screen divider between the Object Organizer and the DDS desktop. Desktop with the editor windows. Message window (optional) Status bar (optional) 5.1.1 Menu bar The menu bar is located at the top end of the main window and contains all DDS menu commands. l DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio Working area 5.1.2 Tool bar The tool bar provides for quick access to frequently used menu commands. • Click on an icon to execute the underlying command. Tip! Positioning the mouse pointer briefly over a tool bar icon will display a tooltip with the icon name. Use the FIND function in the Online Help to display more detailed information on the associated icon and its functionality. • The selection of available functions is dependent on the active window.
Show/Hide Bookmarks Drive PLC Developer Studio Working area 5.1.4 Vertical screen divider The screen divider is the boundary between two non-overlapping windows. The DDS offers screen dividers between • the Object Organizer and the desktop of the main window • the interface (declaration part) and the implementation (instruction part) of organization units • the desktop and the message window. Position the mouse pointer over the screen divider to move it.
Show/Hide Bookmarks Drive PLC Developer Studio Working area 5.1.7 Status bar The status bar at the bottom of the DDS main window displays information about the current project and menu commands. • If a status applies, the associated expression appears in black at the right-hand end of the status bar, otherwise it is greyed out. • Status bar display is optional. ProjectWOptions category Desktop Online mode In online mode, the word Online is displayed in black; in offline mode, it is greyed out.
Show/Hide Bookmarks Drive PLC Developer Studio Working area 5.2 Arrange windows The menu Window lists all window management commands. These are commands for automatic window arrangement, opening the Library Manager and the log and to change between active windows. The menu Window also lists all open windows at the bottom in the sequence they were activated. • Click an entry to change to the associated window. The active window is identified with a tick (ü) in front of the menu entry. 5.2.
Show/Hide Bookmarks Drive PLC Developer Studio Working area 5.3 Basic settings 5.3.1 DDS options Use the menu command Project➞ ➞Options in the main menu to configure the display of your main window. There are other setting options for DDS customization. Unless otherwise defined, the settings made here will be stored in the DDS ini file and restored on next start. 5.3.1.1 Options Icon: - Menu: ProjectWOptions... Keyboard: - Use this command to open the dialog box Options.
Show/Hide Bookmarks Drive PLC Developer Studio Working area Ask for project information If check box Ask for project information is activated, the project information will be called automatically when a new project is saved or an existing project is stored under a new name. Project information can be viewed and edited using the menu command Project➞ ➞Project information. Autoload If the option Autoload is activated, the project opened last will be loaded automatically next time the DDS is started.
Show/Hide Bookmarks Drive PLC Developer Studio Working area Auto declaration If the option Auto declaration is activated, a dialog box will appear in all editors when entering a variable that has not been declared yet. This dialog box is called Variable declaration. Autoformat If the option Autoformat is activated, the DDS carries out automatic formatting in the instruction list editor and the declaration editor.
Show/Hide Bookmarks Drive PLC Developer Studio Working area Bit values Use the group box Bit values to choose between three different representation formats for binary data (types BYTE, WORD, DWORD) for monitoring: • Decimal • Hexadecimal • Binary A dot identifies the active selection. Monitoring of complex types Show POU symbols If chec box Show POU symbols is selected, Lenze organization unit signal propagation charts are shown as bitmaps.
Show/Hide Bookmarks Drive PLC Developer Studio Working area Printer borders In every editor window, the printer borders are outlined by red dashed lines. The printer borders are dependent on printer properties and the size of the content area of the set template File➞ ➞Documentation setup. F4 ignores warnings Pressing F4 after the compile will return the focus only to those lines with error messages in the message window, ignoring the warning outputs.
Show/Hide Bookmarks Drive PLC Developer Studio Working area OptionsWDirectories Project The DDS is looking for libraries and configuration files in directories entered in a project. It is also possible to enter directories that are to be used to store compile files. Click (...) behind an input field to open a dialog box for the selection of directories within your directory structure (Browse).
Show/Hide Bookmarks Drive PLC Developer Studio Working area OptionsWlog This dialog box allows configuration of a file that chronologically logs all user actions and internal processes in online mode as project log. The system will open a suitable dialog box if an existing project is opened for which no log has as yet been created. This dialog advises that a log is being created. First input will be made during the next log-in process.
Show/Hide Bookmarks Drive PLC Developer Studio Working area OptionsWBuild Debugging If the option Debugging is activated, the code may become noticeably longer since additional debugging code is generated. This is necessary to use the DDS debugging functions. The option is saved together with the project. • Only if check box Debugging is active can breakpoints be set and single stepping is possible. • If the option Debugging is deactivated, the code will be shorter and execution faster.
Show/Hide Bookmarks Drive PLC Developer Studio Working area The following macro commands cannot be executed. file new, file open, file close, file save as, file quit, online, project compile, project check, project build, debug, watchlist For a more detailed description as to how to create macros refer OptionsWMacros All settings defined in the dialog box Build options are saved together with the project.
Show/Hide Bookmarks Drive PLC Developer Studio Working area Note! Make sure to remember the passwords. Contact Lenze if you do forget one of the passwords. • The passwords are saved together with the project. • Create user groups to assign more specific access rights. OptionsWSymbol configuration Select the category Symbol configuration to open the following dialog box. The dialog box assists symbol file configuration (text file*.sym or binary file*.
Show/Hide Bookmarks Drive PLC Developer Studio Working area Export variable of object The variables of the selected object are output to the symbol file. The other options take effect only if this check box is ticked. Export data entries For structures and arrays of the object, entries are generated for access to the overall variables. Export structure components For object structures, a separate entry is generated for each variable component.
Show/Hide Bookmarks Drive PLC Developer Studio Working area Commands This dialog box defines or edits commands for the macro. A new command line is inserted by pressing +.The right mouse key displays the shortcut menu with standard editor functions. Components of a command that belong together can be concatenated with the help of quotes. Macro commands - commands The appendix includes a list of all macros.
Show/Hide Bookmarks Drive PLC Developer Studio Working area Directory Use the input field Path to determine the directory path for the device description files (PDBs) to be created by the DDS for Global Drive Control. • Click ... behind the input field to open a dialog box for the selection of directories within your directory structure (Browse). Language selection Select the languages for which to create a PDB. • Up to three country-specific PDBs can be created per project.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6 Working with projects and objects 6.1 Managing projects Those DDS commands that refer to the entire project are available in the main menu under File and Project. The menu Project also contains commands that refer to objects. A detailed description of these commands is included in the chapter ”Working with objects”.(^ 6-24) Note! Write protection on *.bin file For each changed or translate project, the corresponding *.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.1.1.3 Open Icon: Menu: FileWOpen Keyboard: + Use this command to open an existing project. • If a project has been opened and changed before, the user will be prompted as to whether this project is to be saved or not. Open the dialog box Open and select a project file with the extension ”*.pro” or a library file with the extension ”*.lib”. This file must exist already.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Saving project as library If the project is to be saved as library for use in other projects, select the file type • ”Internal library (*.lib)” if you programmed your POUs in the DDS. Then click OK. • The current project will be saved to the selected file. If the new file name already exists, the user will be prompted as to whether this file is to be overwritten or not.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 3. Compile the project. Note! After compiling the project must be saved once. While the project is saved, DDS creates files which are part of the ZIP archive. 4. Open the following dialog with the menu command FileWSave/mail archive. Only tick (project file, referenced libraries, compile information and bitmap files). This menu item can only be ticked if a bitmap is contained in the project.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Details Use the button Details to request a dialog box for the direct selection of information on the respective category. The dialog box Details is explained on the basis of Details: Local gateway. The dialog box shows the local gateway details that can be selected directly with (ü). Use the button Select all to select everything. Select none removes the ticks. Confirm with OK.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.1.1.8 Print Icon: - Menu: FileWPrint Keyboard: + Use this command to print the contents of the active window. Selection of the command opens the dialog box Print . • Select the required option and click OK. The active window will be printed. Every editor can be colour-printed. • Use the button Properties to open the dialog box Printer setup .
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Use the command Insert➞ ➞Placeholder to select one of the five placeholders to be inserted into the layout by simply drawing a rectangle and move it to the desired position, if necessary. Placeholders will be substituted as follows in the printout: Command Placeholder Effect Page {Page} The current number of pages is printed. POU name {POUName} The name of the current organization unit.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.1.1.10 Exit Icon: - Menu: FileWExit Keyboard: + Use this command to exit the DDS. • If a project has been opened and changed, the user will be prompted as to whether this project is to be saved or not. 6.1.2 Commands in the “Project” menu 6.1.2.1 Compile Icon: - Menu: ProjectWCompile Keyboard: Use this command to compile the project to check your program’s syntactic correctness.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.1.2.3 Clean all Note! A log-in without another project download is possible only if the file *.ri containing the project information of the last download was explicitly stored outside the project directory before and can be reloaded prior to log-in. Execute the menu command ProjectWLoad download information.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Creating a translation file • Enter a path in the field Translation file to store the file at the desired location. The standard file extension is *.tlt (text file). • To edit an existing translation file, select and open it with the Windows dialog Search.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Tip! A maximum of 64 position information items will be generated for each element (linguistic symbol), even if the dialog box Create translation file, combination box Position information, specifies All. Overwrite existing All existing position information in the translation file being edited is overwritten, independent of the project in which it was generated.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Find below a sample section in the translation file for the name of the organization unit ST_Visu. Target languages are English(USA) and French. The position information for the project element to be translated was also included in this example. Prior to the translation ##NAME_ITEM [D:\DDS\projects\Bspdt_22.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Translation file Specify the translation file path in this text field. Search This button takes you to the Windows file selection dialog. Target language This combination box offers the language identifiers to select the target language. OK The button starts the translate of the current project with the help of the specified translation file into the selected target language.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Command selection opens a dialog box to select the objects to be printed: • Make your selection and click OK. • The dialog box Print is opened. • The layout of the pages to be printed can be defined under File➞ ➞Documentation setup. 6.1.2.8 Export Icon: - Menu: ProjectWExport...
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.1.2.9 Import Icon: - Menu: ProjectWImport... Keyboard: - Select the required export file from the dialog box. The data are imported into the current project. If an identically-named object already exists in the project, the dialog box ”Do you want to replace?” appears. • Confirm with Yes to replace the object in the project with the object from the import file.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Comparing projects Project to compare By default, this text field contains the path of the project to compare. Ignore white space No differences in the white spaces will be displayed if the check box is active. Ignore comments No differences in the comments will be displayed if the check box is active. Oppose differences Units that were changed, but not deleted, will be displayed if the check box is active.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Colours Any differences are marked by coloured text. Red Unit was modified and is displayed in red in both window panes. Blue Unit exists only in the project to compare. The current project contains a space. Green Unit exists only in the current project. A space is inserted in the project to compare. Black No differences in unit.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.1.2.12 Project information Icon: - Menu: ProjectWProject information Keyboard: - Use this command to save information about the project. Statistics Click the button Statistics for statistical information about your project. The statistics contain project information, number of POUs, data types, local and global variables as saved on the last compile.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Find what Enter the required character sequence. If a text is found in an object, the object will be loaded into the associated editor or Library Manager and its occurrence displayed. Message window Pressing this button lists all occurrences of the character sequence in question within the selected objects line-by-line in the message window and displays an occurrence total. The following information is displayed.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Cancel • Closes the ”Find and replace” function. Note! Not implemented for Parameter Manager and code initialization. 6.1.2.15 Project check Icon: - Menu: ProjectWCheck Keyboard: - This menu command offers four separate subitems: • Unused variables • Overlapping memory areas • Concurrent access • Multiple save on output The results are output in the message window.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Multiple save on output This function looks for memory areas that are accessed at several locations within a project. Output is then as follows: % QB24 is described at the following locations: PLC_PRG (3): %QB24 PLC_PRG.POU1 (8): %QB24 6.1.3 User groups The DDS allows up to eight groups to be set up with different access rights to organization units, data types, visualizations and resources.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 1. Use the combination box User group to select the group to assign a password to. 2. Use the text field Password to enter the password. Every letter is represented by an asterisk (*). 3. Repeat the entry in text field Confirm password. 4. Click OK to accept the input. If the message “Password and its acknowledgement do not match.” appears, one of the two inputs contains a typing error.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects QSP Event during program processing Trip/CINH Warning Response of the automation system PLC stop, breakpoint • Fail QSP is activated • Code C168, subcode 1 • CINH is activated • Code C168, subcode 1 • Motor continues running • Code C168, subcode 1 Task overflow • Fail QSP is activated • Code C168, subcode 1 • CINH is activated • Code C168, subcode 1 • Motor continues running • Code C168, subcode 1 Error entry: non
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.2 Working with objects This chapter describes how to work with objects and the help functions available to keep an overview of a project (folders, call tree, cross reference list, etc.). 6.2.1 Object ”Objects” are organization units, data types, visualizations and resources, global variables, PLC configuration, task configuration and Watch and Receipt manager etc.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.2.2 Folders To keep an overview in the case of larger projects, organization units, data types, visualizations and global variables in the Object Organizer should be saved in folders. • Folders can be nested to any depth. • Insert new folders with the command New folder. A plus sign in front of the closed folder icon indicates that this folder contains objects and/or other folders.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.2.3.3 Minimize node Icon: - Menu: Shortcut menuWMinimize node Keyboard: - Use this command in the shortcut menu of the Object Organizer to hide the objects listed underneath the selected object. • Folders can also be opened and closed with a double-click or pressing . • To open the shortcut menu, select an object or the object type and press the right mouse key or +. 6.2.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.2.4.3 Rename object Icon: - Menu: ProjectWRename object Keyboard: Use this command to rename the currently selected object or folder. • Make sure that the object name has not been used before. • If the object edit window is open, the rename will automatically change its title. 6.2.4.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Entering the first letter of the object name in the Object Organizer will open a dialog box displaying all objects of the set object type and starting with this letter. • Select the required object and click Open to load the object to its editing window. • The object type Resources supports this option for global variables only. • This function is especially helpful for projects comprising a multitude of objects. 6.2.4.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.2.4.9 Open instance Icon: - Menu: ProjectWOpen instance Keyboard: - Use this command to open and display instances of function blocks in online mode. Double-clicking the function block in the Object Organizer opens a selection dialog listing the instances of the function block and the implementation. Select the required instance or implementation and click OK to display the list.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.2.4.11 Output cross reference list Icon: - Menu: ProjectWOutput cross reference list Keyboard: - Use this command to open a dialog box to output all occurrences of variables, addresses or organization units. The command requires the project to be compiled. See Project➞ ➞Compile all 1. First select the category Variable, Address or POU. 2. Then enter the name of the required element.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.2.4.12 Output unused variables Icon: - Menu: ProjectWOutput unused variables Keyboard: - Use this command to output a list of all variables declared, but not used, in the project. The command requires the project to be compiled. See Project➞ ➞Compile all • Select a variable and click Go to, or double-click the variable, to go to the object in which the variable was declared.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.3 Working in online mode The commands described in this chapter are available in the menu Online after log-in. Execution of some commands is dependent on the active editor and the selected automation system. 6.3.1 Commands in the “Online” menu 6.3.1.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.3.1.4 Start Icon: Menu: OnlineWStart Keyboard: Use this command to start processing of the user program in the PLC or simulation. The status line displays RUNNING after correct log-in and start. The command can be executed under the following circumstances: • After the user program was stopped in the control with the command Online➞ ➞Stop. • If the user program has hit a breakpoint.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.3.1.9 Breakpoint on/off Icon: Menu: OnlineWBreakpoint on/off Keyboard: Use this command to set a breakpoint at the current position in the active window. • Breakpoints can also be set by clicking the line number field. • If the current position is already occupied by a breakpoint, this breakpoint will be removed.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.3.1.10 Breakpoint dialog Icon: - Menu: OnlineWBreakpoint dialog Keyboard: - Use this command to open a dialog box to edit breakpoints in the entire project. • The dialog box also shows all currently set breakpoints. Setting a breakpoint 1. In the combination box POU, select the organization unit in which the breakpoint is to be set. 2.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.3.1.13 Single cycle Icon: - Menu: OnlineWSingle cycle Keyboard: + Use this command to execute a single control cycle and stop after this cycle. • Online➞ ➞Single cycle works for cyclical tasks only and will not consider the EVENT/INTERVAL tasks. • Online➞ ➞Single cycle can be repeated continuously to proceed in single cycles. • Single cycle ends if the menu command Online➞ ➞Start is executed. 6.3.1.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Monitoring displays the overall value of the expression, not the values of the individual variables. Example: a AND b will only then be displayed as TRUE if both variables are TRUE. In FBD, only the first variable of an expression, that may be used as input of a function block, for example, becomes visible (monitor). Write values is possible for this variable only.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects The following channels to the automation system are currently available for practical use: • Local gateway • Remote gateway Via a TCP/IP network to a remote gateway PC with parallel port and dongle. PC_PLC1 PC_lokal TCP/IP / ‘local (shared memory)' PC_Gateway PC_x TPC/IP, Pipe, etc. PC_PLC2 PC_PLC3 PC_PLC4 The dialog box Communication parameters is divided into four panes: 1.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Note! The Lenze default setting for DDS and automation system is a baud rate of 500 KBaud. Creating a channel with default parameters àLenze standard and then OK. Select Communication parameters and click localhostà Creating a communication channel with the Lenze CAN driver 1. Click New to configure a new localhost channel. 2. Select Communication parameters: New channel and click CAN 8220: 3. Click OK. 4.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 5. Use the entry Can bus node address to select a device address. The device address is stored in code C0530 of the automation system and must match the device address of the communication channel. 6. Accept the settings with OK. This parameterizes and starts the communication driver GATEWAY.EXE.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.3.1.18 Controller enable Icon: - Menu: OnlineWController enable Keyboard: - Use this command to enable the controller. The menu item will be deactivated for automation systems without controller inhibit. • In GDC, this function corresponds to the key Start. Warning! Do not use the commands Controller enable/Controller inhibit for an emergency stop via the PC as these commands reach the controller with a delay.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6.4 Log The log records the actions during an online session in chronological sequence. For this purpose, a binary log (*.log)is created for each project. The user can save extracts from the respective project log in an external log. 6.4.1 Log characteristics 6.4.1.1 Log window The log window can be opened in both offline and online modes. In online mode, it can be used as direct monitor.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects Information This field describes errors that occur during an action. The field remains blank if no errors occur. System time The current system time on action start. Relative time The relative time at online session start. Duration The duration of the action in milliseconds. 6.4.1.2 Log menu If the input focus is on the log window, the menu command Log is shown in the menu bar instead of Insert.
Show/Hide Bookmarks Drive PLC Developer Studio Working with projects and objects 6-44 DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7 Editors 7.1 General edit functions The commands described in this chapter are available in all editors under menu Edit and in some cases also via the shortcut menu in the Object Organizer. Printer borders Menu command ProjectWOptions, category Desktop includes the check box Printer borders.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.1.1.3 Cut Icon: Menu: Edit WCut Keyboard: + + Use this command to remove the current selection from the editor and save it to the clipboard. • In the case of the Object Organizer , this applies analogously to selected objects, although some objects cannot be cut (such as the PLC configuration, for example).
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.1.1.5 Insert Icon: Menu: Edit WInsert Keyboard: + + Use this command to insert the contents of the clipboard at the current position in the editor window. • With graphically oriented editors, this command can be used only if insertion produces a correct structure. • In the case of the Object Organizer, the object is inserted from the clipboard.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.1.1.7 Find Icon: Menu: EditWFind Keyboard: + Use this command to find a character sequence in the current editor window. Selection of the command opens the dialog box Find . • The dialog box Find remains open until Cancel is clicked. Find what Use the input field Find what to enter the character sequence to be found. Match whole word only Select whether the text to be found is a whole word or also part of a word.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.1.1.9 Replace Icon: - Menu: Edit WReplace Keyboard: + Use this command to find a character sequence in the current editor window and replace it with another sequence. Selection of the command opens the dialog box Replace. • The dialog box Replace remains open until Cancel is clicked. Find what Use the input field Find what to enter the character sequence to be found.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.1.1.10 Help Manager Icon: - Menu: EditWHelp Manager Keyboard: Use this command to open the dialog box Help Manager for a display of possible inputs at the current cursor position in the editor window. 1. Select the input category from the column on the left. 2. Select the required entry in the column on the right. 3. Click OK to confirm the selection. The selection will be inserted at the current cursor position.
Show/Hide Bookmarks Drive PLC Developer Studio Editors Unstructured diagram The organization units, variables or data types in each category are sorted in linear and alphabetical sequence. Some positions (e. g. Watch list) require multi-level variable names. The dialog box Help Manager then displays a list of all organization units and a single item for global variables. Organization unit names are completed with a period.
Show/Hide Bookmarks Drive PLC Developer Studio Editors Visual and hierarchical representation is in unison with that of the Object Organizer. Any elements within libraries are inserted alphabetically at the top, and the respective hierarchy is displayed as in the Library Manager. The input and output variables of function blocks that are declared as local or global variables, are located in the form of a list underneath the instance name in the Local variable or Global variable category. • Inst_TP.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.1.1.13 Macros Icon: - Menu: EditWMacros Keyboard: - This menu item lists all macros agreed for the current project. New macros can be created under ProjectWOptions category Macros. Selection of an executable macro opens dialog box Process macro. Macro name and current command line are displayed. Use Cancel to stop the macro. The current command line will still be processed.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.2 Declaration editor The declaration editor is used to declare variables of organization units and global variables, for data type declaration and in the Watch and Receipt Manager. It offers Windows and IntelliMouse functionalities, but requires the associated driver to do so. The overtype mode is displayed in the status bar with OVR. Press to toggle between overwrite and insert modes.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.2.1 Declaration part The declaration part of an organization unit declares all variables locally. These may be • input variables, • output variables, • input / output variables, • local variables, • retentive variables, • constants • and retentive constants. The declaration syntax is based on the IEC 61131-3 standard. 7.2.1.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.2.4 Input / output variables Between the keywords VAR_IN_OUT and END_VAR, all variables are declared that are used as input and output variables for an organization unit. Note! In the case of these variables, the value of the transferred variables is changed directly (”Transfer as pointer”, call-by-reference). Therefore, the input value for these variables must not be a constant.
Show/Hide Bookmarks Drive PLC Developer Studio Editors Application example An operating hour meter that is to continue counting after a mains failure. • All other variables will be re-initialized either with the standard initial values (0 or FALSE) or with the defined initial values. Example: VAR RETAIN rem1:INT; (* 1. retentive variable *) END_VAR 7.2.7 Constants, typed literals Between the keywords VAR CONSTANT and END_VAR, all constants are declared.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.2.10 Identifiers Note! Only the first 32 characters are of any significance! Identifiers are a sequence of letters, digits and underscores starting with a letter or an underscore. Variable identifiers must not: • contain white spaces and umlauts, • be declared twice • be identical to keywords. Furthermore: • Case sensitivity is not an option for variables.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.2.11.1 Types for variable declaration Icon: - Menu: InsertWTypes Keyboard: - Use this command to display a selection of types available for variable declaration. • Use of the Help Manager will also display this list. The types are divided into the following categories: • • • • Standard types ( BOOL, BYTE, etc.) Defined types (structures, enumeration types, etc.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.2.14 Short mode The declaration editor provides the possibility to use the short form mode. • The short form mode is activated by completing a line with +. The following short forms are supported: • All identifiers except the last one in a line become variable identifiers in the declaration.
Show/Hide Bookmarks Drive PLC Developer Studio Editors If dialog box Type is used to select variable ARRAY, a dialog is displayed for array boundary definition. The illustration below shows a two-dimensional UDINT-type (unsigned double integer) array. This organization unit can be used to generate a three-dimensional array. Use Start andEnd to define the boundaries of each dimension. Use the button ... to define the array data type.
Show/Hide Bookmarks Drive PLC Developer Studio Editors Tip! The variable declaration dialog can also be opened via EditWDeclare variable. If the cursor is over a variable, the dialog box Declare variable can be opened in offline mode with the current variable-specific settings via +. 7.2.16 Line numbers in the declaration editor • In offline mode, a whole text line can be selected by clicking the line number.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.2.18 Declaration editor in online mode In online mode, the declaration editor is a monitor window. Every line contains a variable followed by an equal sign (=) and the variable value. • Three question marks (???) will appear if the variable has not been defined yet. Multi-element variables Multi-element variables are identified with a plus sign. • Press or double-click the variable to open it and to list all components.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.2.19.1 Pragma instruction • The pragma instruction controls the compile process and is always written with additional text in a program line or in a separate declaration editor line. • This instruction is given in curly brackets and is case-insensitive. {} • Should the compiler be unable to interpret the instruction text, the complete pragma is treated as a comment and ignored, while a warning is given for this process.
Show/Hide Bookmarks Drive PLC Developer Studio Editors If the organization unit is given read and write access, the following pragma allows variable a to be exported with write access only and variable b not at all. VAR VAR a:INT {flag noread}; b:INT {flag noread,nowrite}; END_VAR {flag noread on} a:INT; {flag noread,nowrite on} b:INT; {flag off} END_VAR Variables a and b are not exported into the icon file.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.3 Text editors The DDS text editors used for the implementation component (Instruction list editor and Structured text editor offer the standard functionality of Windows text editors and support syntax colouring. 7.3.1 Commands in the “Insert” menu 7.3.1.1 Operator Icon: - Menu: InsertWOperator Keyboard: - Use this command to display all operators available in the current language in a dialog box.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.3.1.4 Function block Icon: - Menu: InsertWFunction block Keyboard: - Use this command to display all function blocks in a dialog box. Select between a list of user-defined or standard function blocks. • Select one of the function blocks and click OK to insert the highlighted function block at the current cursor position.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.3.2.1 Configuring the monitoring window Icon: - Menu: ExtrasWMonitoring options Keyboard: - Use this command to configure the monitoring window. In online mode, the text editor window is vertically split in two. • Normal program text is shown on the left. • Variables and their respective values are shown on the right. Open the dialog box Monitoring options to effect the following settings: • Width of monitor window (in percent).
Show/Hide Bookmarks Drive PLC Developer Studio Editors Structured text editor The following breakpoint positions are possible in the Structured text editor: • At every assignment • At every RETURN and EXIT instruction • In lines where conditions are evaluated (WHILE, IF, REPEAT) • At the end of the organization unit 7.3.4 What happens at a breakpoint? If a breakpoint is reached in the control, the section containing the associated line will be displayed on screen.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.4 Network editors (general) The DDS network editors can be used for programming in the graphically oriented languages FBD, LD and CFC. Both network editors allow jump labels, network commands and the commands Insert➞ ➞Network (after)/Insert➞ ➞Network (before). 7.4.1 Jump labels Each network has a jump label that may also be blank. This label can be edited by clicking next to the network number in the first line of the network.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.4.4 Inputs/ Outputs on the fly This function serves to create inputs and outputs whether via keyboard entry or by means of a selection field. Tip! This function saves you from drawing and connecting inputs, outputs, and function blocks in the CFC editor. Select, for example, an input or output in the CFC editor. Enter the variable name directly via the keyboard. If the variables are already available the name must be written correctly.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.4.5 Network editors in online mode Breakpoints FBD and LD editors allow breakpoints to be set to networks only. • The network number field of a network with a breakpoint is displayed in blue. • Processing stops before the network with the breakpoint. In this case the network number field is displayed in red. • In single-stepping, the process jumps from network to network.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.5 Function block diagram editor The function block diagram editor is a graphic editor that uses a list of networks. Each network contains a structure that each represents a logical or arithmetic expression, a function block call, a function, a program, a jump or a Return instruction. Tip! The most essential FBD editor commands are also available in the shortcut menu (right mouse key or +) 7.5.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.5.2 Placing the cursor The cursor can be set to a certain position with a mouse click or the keyboard. • Use the arrow keys to jump to the next cursor position in the selected direction. This will reach all cursor positions including the text fields. • If the last cursor position is selected, use the arrow keys or to select the last cursor position of the preceding or subsequent network.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.5.3.3 Return Icon: Menu: InsertWReturn Keyboard: + Keyboard: + Use this command to insert a RETURN instruction. Insertion is made, dependent on the selected position • directly before the selected input, • directly behind the selected output, • directly before the selected intersection or • at the end of the network. 7.5.3.
Show/Hide Bookmarks Drive PLC Developer Studio Editors Output selected If selecting an output, the operator will be inserted behind this output. • The first input of the operator will be connected to the selected output. • The output of the new operator will be connected to the branch the selected output was connected to. Organization unit, function or function block selected If selecting an organization unit, function or a function block, the new operator will replace the old element.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.5.3.6 Output Icon: Menu: InsertWOutput Keyboard: - Use this command to add an additional assignment to an already existing assignment. This function assists the generation of so-called assignment combs, i.e. the assignment of the value currently assigned to the line to several variables. • If the selected intersection is over an assignment or the directly preceding output, another assignment will be added behind those already in existence.
Show/Hide Bookmarks Drive PLC Developer Studio Editors • A Reset output is set to FALSE if the associated gate returnsTRUE. The output now retains this value even if the gate jumps back to FALSE. If the command is executed more than once, the output toggles between Set, Reset and normal output. 7.5.4.3 Zoom Icon: - Menu: ExtrasWZoom Keyboard: + Use this command to load a selected organization unit into its editor.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.5.6 The FBD editor in online mode In the FBD, breakpoints can only be set to networks. Where a breakpoint was set to a network, the network number field is shown in blue. Processing stops in front of the network with the breakpoint, and the network number field turns red. In single-stepping, the process jumps to every single network. Each variable is displayed with its current value.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.6 Ladder diagram editor The ladder diagram editor is a graphic editor that uses a sequence of networks. Tip! The most essential LD editor commands are also available in the shortcut menu (right mouse key). 7.6.1 Cursor positions in LD Organization units with EN inputs and other organization units linked thereto are used as in the function block diagram editor.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.6.2 Commands in the “Insert” menu 7.6.2.1 Contact Icon: Menu: InsertWContact Keyboard: + Use this command to insert a contact in front of the position selected in the network. • If the selected position is a coil or a connection link between contacts and coil, the new contact is connected in series to the previous contacts. The inserted contact is pre-assigned ”???”.
Show/Hide Bookmarks Drive PLC Developer Studio Editors An organization unit with EN may be given the name of a function block so that InsertWInsert at organization unit can be executed. In this example, AND was overwritten with the name of timer TP . • The commands in this submenu can be executed at the same cursor positions as the associated commands in the FBD. 7.6.2.5 Input Use Input to add a new input to the organization unit.
Show/Hide Bookmarks Drive PLC Developer Studio Editors In other words, programming of a network in the LD editor as in FBD merely requires prior insertion of an EN operator into a new network before further-developing it as in the FBD editor. A network developed like this acts like the associated network in FBD. 7.6.3.1 Operator with EN Icon: - Menu: InsertWOperator with EN Keyboard: - Use this command to insert an operator with EN input.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.6.4.5 Set/ Reset Icon: - Menu: Extras WSet/Reset Keyboard: - Use this command to define coils as Set or Reset coils. A Set coil is identified with an ”S” in the coil symbol. If the network result is TRUE , the Boolean variable, as a consequence of the Set coil, will be set to TRUE . Otherwise, the variable will remain as it is. If the network result is TRUE , the Boolean variable, as a consequence of the Set coil, will be set to TRUE .
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.6.5 The LD in online mode • In online mode, all contacts and coils in ON status (TRUE) are marked blue in the LD. • In online mode, all lines in TRUE status are marked blue in the LD. • The values of the associated variables are displayed at function block inputs and outputs. • Breakpoints can only be set to networks. In single-stepping mode, the process jumps to every single network one after the other.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.7 CFC editor Note! If the error message Internal error...: A CFC in this project is corrupted, and got restored. Please check its logics should occur when the project is stored please proceed as follows: • Do not delete the error message. • Save an existing backup copy (automatic saving, last version) under another name. The automatically saved backup copy has the suffix *.asd and is saved in the same folder as the *.pro file.
Show/Hide Bookmarks Drive PLC Developer Studio Editors The following elements can be used in the CFC editor: • Box • • • • • • Input Output Jump Label Return Comment The inputs and outputs of these elements can be linked with the mouse. The connection link will be drawn automatically. The shortest connection link will be drawn, taking into account the existing links. • The connection links will be auto-adapted when elements are moved.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.7.4 Moving elements To move one or more selected elements, keep the key depressed and use the arrow keys. Elements may also be moved while keeping the left mouse key depressed. • Releasing the left mouse key drops these elements at the current location. • If the moved elements hide other elements at this location or exceed the editor size, they will not be moved. This is accompanied by an audible warning. 7.7.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.7.5.4 Jump Icon: Menu: InsertWJump Keyboard: + Use this command to insert a jump in the CFC editor. The inserted jump is pre-assigned with the text ”???”. • Click this text to change it into the required jump label to be jumped to. • Insert a jump label with InsertWLabel. 7.7.5.5 Label Icon: Menu: InsertWLabel Keyboard: + Use this command to insert a jump label in the CFC editor.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.7.6 Commands in the “Extras” menu 7.7.6.1 Negation Icon: Menu: ExtrasWNegation Keyboard: + Use this command to negate inputs, outputs, jumps or RETURN instructions in the CFC editor. The symbol for the negation is a small circle on a connection. • Selected inputs will be negated. • Selected outputs will be negated. • If a jump or a RETURN is selected, the input of this jump or RETURN will be negated.
Show/Hide Bookmarks Drive PLC Developer Studio Editors EN inputs / ENO outputs can also be negated with ExtrasWNegation. Example of an enable concatenation: The numbers in the top right-hand corner of the boxes specify the processing sequence. 1. In this example, x is to be initialized with 1 and y with 0. 2. SUB (3) and ADD (5) are not enabled. 3. As long as x < 10, ADD (1) is enabled and increases x by 1 every time (x=x+1). 4. If x = 10, the output of box LT(0) will return FALSE and enable SUB (3). 5.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.7.6.6 Connector Icon: - Menu: Extras WConnector Keyboard: - Use this command to connect elements via connectors in the CFC editor instead of connection links. • Output and associated input are identified with a uniquely named connector. • The name of the connector is automatically assigned by the program, but can be changed.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 3. Move either E1 or E2 until the output of element E1 touches the input of element E2. 4. If element E2 is a box with an unassigned input, the mouse pointer can also create a connection between an output of E1 and the body of E2. – Releasing the left mouse key automatically creates a connection with the topmost unassigned input of E2.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.7.10 Feedbacks Contrary to the standard function block diagram editor, the CFC editor can display feedbacks directly. Note that an internal intermediate variable will be generally created for the output of a box. • With operators the data type of the intermediate variable depends on the highest-order data type of the inputs. • With constants the data type depends on the lowest possible data type, i.e. data type SINT is assumed for constant ’1’.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.7.12 Commands in the “Extras” menu, submenu “Order” 7.7.12.1 Display Icon: - Menu: ExtrasWOrderWDisplay Keyboard: - Use this command to switch the processing sequence display on and off in the CFC editor. • The default is ON. • A tick in front of the menu command indicates that the display is on. 7.7.12.
Show/Hide Bookmarks Drive PLC Developer Studio Editors Element E1 will be inserted with the sequence number of the topological descendant (E2), increasing the sequence numbers of all topological descendants (E2, E6) by 1. After command execution, the sample sequential function chart will look like this. 7.7.12.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.7.12.6 To the beginning Icon: - Menu: ExtrasWOrderWTo the beginning Keyboard: - Use this command to bring all selected elements to the beginning of the sequential function chart in the CFC editor. • The sequence among the selected elements remains unchanged. • The sequence among the other elements also remains unchanged. 7.7.12.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.7.12.9 Step into macro Icon: - Menu: ExtrasWStep into macro Keyboard: - Use this menu command or double-click the macro body to open the macro for processing in the editor window. • The created pin boxes can be edited like normal boxes, differing in the representation and containing no position index. • Pin boxes have rounded edges. The pin box text matches the name of the pin in the macro representation.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.7.12.12 All Macro Levels Back Icon: Menu: ExtrasWAll Makro Levels Back Keyboard: - This command is active when jumping to a macro or the macro is open for processing. With interleaved macros it is possible to jump back all macrolevels. 7.7.12.13 Open instance Icon: - Menu: ExtrasWOpen instance Keyboard: - This command is identical to menu item ProjectWOpen instance. 7.7.12.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.8 SFC editor The graphic Sequential Function Chart editor describes the chronological sequence of various actions within a program. Tip! The most essential commands for the SFC editor are also available in the shortcut menu (right mouse key) Tool tips display the full names of transitions, actions, etc. 7.8.1 Selecting blocks A selected block is a set of SFC elements surrounded by a dotted rectangle.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.8.2 Commands in the “Insert” menu 7.8.2.1 Step transition (before) Icon: Menu: InsertWStep transition (before) Keyboard: + Use this command to insert a step followed by a transition before the block selected in the SFC editor. Tip! A step followed by a transition can be deleted by selecting step and transition and pressing the key. (Keep the key depressed to select several objects.) 7.8.2.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.8.2.5 Parallel branch (right) Icon: Menu: InsertWParallel branch (right) Keyboard: + Use this command to insert a parallel branch as right-oriented branch to the block selected in the SFC editor. • For this purpose, the selected block must start and end with a step. The new branch then consists of a step. • To enable jumps to the created parallel branch it must have a jump label. 7.8.2.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.8.2.10 Add exit action Icon: - Menu: InsertWAdd exit action Keyboard: - Use this command to add an exit action to a step. • An exit action is executed once-only before the step is deactivated. • The exit action can be implemented in any language. • A step with exit action is identified with an ”X” in the bottom right-hand corner. 7.8.3 Commands in the “Extras” menu 7.8.3.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.8.3.4 Zoom action/ transition Icon: - Menu: ExtrasWZoom action/transition Keyboard: + Shortcut: + The action of the first step of the selected block or the transition body of the first transition of the selected block will be loaded into the editor in the language it was written in. • If the action or the transition body is empty, select the language it is to be written in. 7.8.3.
Show/Hide Bookmarks Drive PLC Developer Studio Editors The following example shows a step whose processing is to take a minimum of two and a maximum of ten seconds. 7.8.3.7 Time limit overview Icon: - Menu: ExtrasWTime limit overview Keyboard: - Use this command to open the dialog box Time limit overview to edit the time settings for your SFC steps. The dialog box Time limit overview displays all steps of your SFC organization unit.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.8.3.8 Options Icon: - Menu: Extras WOptions Keyboard: - Use this command to open a dialog box for the setting of different options for your SFC organization unit. Height of steps Use text field Height of steps to enter the number of lines for the height of an SFC step in your SFC editor (standard setting: 4).
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7.8.4 Commands in the “Project” menu 7.8.4.1 Add action Icon: - Menu: Project WAdd action Keyboard: - Use this command to generate an action for the selected SFC organization unit in theObject Organizer, that can be used for the IEC steps of this organization unit. • Select the action name and the language to be used to implement the action from the dialog box displayed after command selection.
Show/Hide Bookmarks Drive PLC Developer Studio Editors Example of a declaration PROGRAM flags VAR SFCEnableLinit:BOOL; SFCError:BOOL; SFCErrorStep:STRING; SFCReset AT %IX1.0.2: BOOL; SFCInit AT %IX1.0.3:BOOL; END_VAR SFCQuitError Variable of type BOOL. Processing of the SFC diagram will be suspended as long as this variable is TRUE , resetting a potential timeout in variable SFCError . Resetting the variable to FALSE will reset all previous times in the active steps. SFCPause • Variable of type BOOL.
Show/Hide Bookmarks Drive PLC Developer Studio Editors Tip! If a timeout has occurred and the variable SFCError has not been reset, no subsequent timeouts will be registered. 7.8.6 Sequential function chart in online mode Monitoring • The SFC editor displays the currently active steps in blue in online mode. • If several steps are active in a parallel branch, the active step with the action to be processed next is displayed in red.
Show/Hide Bookmarks Drive PLC Developer Studio Editors Use Online➞ ➞Single step in to step into actions. Any entry, exit or IEC action to which a jump is to be effected, must include a breakpoint. All debugging functions of the associated editor are available inside transitions or actions. Processing sequence of elements in a sequencer. Tip! The steps in a sequencer are processed from top to bottom and from left to right. 1.
Show/Hide Bookmarks Drive PLC Developer Studio Editors Implementing actions • If an action is associated in several sequencers, it can be executed several times in a cycle. • Undesirable effects may occur through the above-described processing sequence if the same IEC action is used simultaneously at different SFC levels. • In such case an error message is output. • This may occur when processing projects generated with older versions.
Show/Hide Bookmarks Drive PLC Developer Studio Editors 7-68 DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8 Resources The tab Resources of the Object Organizer provides objects for the configuration and organization of your project and for the monitoring of variable values: Included libraries linked to the project by means of the Library Manager. (^ 8-41) Global variables of the project and linked libraries. (^ 8-2) Code initialization values for the initialization of codes with an initial value.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.1 Global variables The tab card Resources in the Object Organizer contains the global variable list (Global_Variables) in the folder Global variables. • All variables defined in this object are known throughout the entire project. • Double-click the object Global_Variables to open and edit the variable list.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.1.1.1 All instance paths Icon: - Menu: insertWAll instance paths Keyboard: - If the dialog box Variable configuration is open, the following instruction block is created when executing this command: VAR_CONFIG END_VAR This instruction block includes all instance paths that exist in the project. In order to obtain existing addresses , declarations available will not be reinserted.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.2 Code initialization values The code initialization values are an object on tab Resources in the Object Organizer. Initialization value priority Reset modes Reset Descending priority Code initialization value Parameter Manager Reset (cold) Code initialization value Parameter Manager Reset (bootstrap) Deletes the complete program in the automation system, leaving no value valid.
Show/Hide Bookmarks Drive PLC Developer Studio Resources Adding code with initial value: 1. In the dialog box Code initialization value, click New to add a code with initial value. 2. Use the dialog box Initialize value, input field Code to enter the number of the code (without preceding ”C”) for which an initial value is to be defined. 3. Use input field Initialize value to enter a value for code initialization. 4. If the code has subcodes, use input field Subcode to enter the associated subcode. 5.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.3 Parameter monitor The parameter monitor is an object on tab Resources in the Object Organizer. Use the parameter monitor to parameterize codes online on the PLC. Parameterizable codes include codes created via the Parameter Manager and those of the selected PC (e. g. 9300 Servo PLC, Drive PLC). Tip! No modified code values will be saved in the project after log-out! To save changes to code values, choose one of the following options.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.3.1 System codes/User codes There are system codes and user codes. System codes System codes are default codes ”hard-wired” into the PLC and can thus be used to parameterize the PLC with the help of parameterization tools such as GDC or keypad. • These codes help set the monitor type, the constant of the speed controller, the feedback system, the field bus, the terminal polarity, etc. for the 9300 Servo PLC, for example.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.4 Parameter Manager IEC 61131-3 uses variables to initialize, process and buffer user data. These variables are declared in the declaration part of every POU, i.e. the assignment to a specific data type (byte or integer) is advised. This declaration can be used to define variable properties such as resistance to mains failure, defined initial values or assignments to fixed physical addresses. Usually, variables are not used in controllers.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.4.1 Add new object Icon: - Menu: InsertWAdd new object Keyboard: - When a new object is created, the name of the organization unit, the variable, the variable type and the variable class are displayed. l DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.4.2 Terminology used by the Parameter Manager Term Description User codes User-specific codes (user codes) can be assigned for variables applied in the user’s IEC 61131-3 program. The user codes depend on the automation system and range between C3000 and C7999. Code properties Code properties (read only, read/write, direct acceptance or direct acceptance when confirmed, for example) can be defined for each assigned code.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.4.3 Instance Parameter Manager The Instance Parameter Manager is an object on the tab Resources in the Object Organizer. It allows the user to assign codes to the variables declared in the project. • The variables can be declared globally or locally in Program-type POUs. • Once the Instance Parameter Manager has been started, codes can be assigned for the entire project.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.4.3.3 Adding codes Select InsertWAdd new object to add a new code. Note! It is not permissible to create codes on system variables. No codes can be created for REAL variables. • Open the dialog box Enter the new object to select the variable to be linked to the code. • Selection of the variable and confirmation with OK will open the dialog box Instance Parameter Manager where the settings for a code can be made.
Show/Hide Bookmarks Drive PLC Developer Studio Resources Code max./ Int. max. and Code min./ Int. min. These four input fields are used to define input limits and to scale the code value. Use the input fields Code max./Code min. to enter the limits the code value will be checked for when written. If the limits are not adhered to during writing, the code value will be rejected by the runtime system. Together with the values entered in Int. max./Int. min.
Show/Hide Bookmarks Drive PLC Developer Studio Resources Ext. data type Use the field Ext.
Show/Hide Bookmarks Drive PLC Developer Studio Resources Button “First instance” Clicking the button First instance inserts the known parameter code in the input field Code. The input fields Code max./Code min. and Int. max./Int. min. are greyed out. Button ”Standard” Use the button Standard to accept the standard settings of the variables. This means: • The settings will be accepted for variables set in the Type Parameter Manager, leaving only the code to be assigned.
Show/Hide Bookmarks Drive PLC Developer Studio Resources Example: Instances of the function block L_DIGDEL of the 9300 Servo PLC Variable name byFunction y L_DIGDEL1 L_DIGDEL2 C0720 Setting range Lenze 0 ... 2 2 C0725 wDelayTime C0721 C0726 0 0.001 ... 60.000 s 1.000 Tip! Parameter variables can only be read in the PLC program, not written. Example: LD L_DIGDEL1.byFunction ST variable_x The VAR CONSTANT RETAIN variable can only be accessed via the assigned code.
Show/Hide Bookmarks Drive PLC Developer Studio Resources Generating subcodes The Parameter Manager can only assign subcodes to variables of the type ARRAY OF Observe the following: • Only the master code need be defined. The subcodes are generated automatically according to the array length. • Subcode 1 is always the first element of the array. • Subcodes are set globally through the master code, i. e. each subcode has the same configuration as the master code.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.4.4 Type Parameter Manager The Type Parameter Manager is an object on the tab Resources in the Object Organizer. For the use of libraries or POUs of type Function block in a project, the limits/scaling operations of the variables, among other things, can be predefined using the Type Parameter Manager.
Show/Hide Bookmarks Drive PLC Developer Studio Resources Generating a scale function 1. Open the Object Organizer, tab Organization units and select the function block you want to assign a scale function to. 2. Select ProjectWAdd scale function to open the dialog box Add scale function. 3. Open the dialog box Add scale function to select the programming language and the associated variable. The name of the scale function will be assigned automatically (”SCAL_” + variable name). 4.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.5 Process image The process image is an object on tab Resources in the Object Organizer. • Process images are maps of the statuses of the inputs/outputs of all system organization units used in the automation system at a particular time. Tip! • The process image of the Lenze automation systems consists of the I/O statuses of the system organization units entered into the PLC configuration by the user. (Also refer chapter 8.
Show/Hide Bookmarks Drive PLC Developer Studio Resources I/O Display whether inputs (IN) or outputs (OUT) of the system block are concerned. Module no. Module number of the associated system organization unit (for module numbers refer associated manual for the automation system or online help, chapter “Lenze automation systems”) Module name Name of the system organization unit Task name Name of the task where the associated process image of a system organization unit is generated or written.
Show/Hide Bookmarks Drive PLC Developer Studio Resources Tip! Note that data inconsistencies may occur if analog input 1 is used several times within the cyclical task. • As the process image is updated every 3 ms within the 40 ms of cyclical task processing, there may be different input values for analog input 1. Event-controlled task (EVENT) • If system organization units are used in one event-controlled task only, their process image will be generated in the event-controlled task.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.6 PLC configuration The PLC configuration is an object on tab Resources in the Object Organizer and combines the resources of the automation system. The dialog box PLC Configuration describes the selected automation system for the project. The resources of the automation system are described by the applied system organization units. The available system organization units are dependent on the selected automation system.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.6.1 Working in the PLC configuration The configuration editor consists of two window panes. The left-hand window pane provides a structured representation of the module inputs and outputs. If an organization unit is selected, the data are shown in the right-hand window pane under basic parameters. The top level of the dialog box PLC configuration includes the name of the selected automation system.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.6.1.4 Replace element Icon: - Menu: ExtrasWReplace element Keyboard: - A correctly defined configuration file allows an element selected in the configuration tree to be replaced with another. This also includes the switching of channels so that they can be used with the configuration as input or output. 8.6.1.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.6.2 Touch probe interface Some automation systems allow the use of digital inputs optionally as touch probe input or simple digital input. Inputs are configured via the PLC configuration in the DDS. Note! The source for the last scan value can be configured via the field Registerparameter. Observe the following when using digital inputs as touch probe. • If a digital input is used as a touch probe it can not be used to start a task.
Show/Hide Bookmarks Drive PLC Developer Studio Resources Class Information on channel application I Input Q I&Q Output Input and output I|Q Input or output (can be toggled) Size Channel range size Default identifier Symbolic channel name assigned in the configuration file. The channel name is assigned into the configuration file and can be edited in the configuration tree.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.7 Task monitor The task monitor is an object on the tab Resources in the Object Organizer. If the PC is connected online with an automation system, the runtime of the individual tasks can be diagnosed via the task monitor. In offline mode, the task monitor displays the last online task status.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.8 Task configuration The task configuration is an object on the tab Resources in the Object Organizer. 8.8.1 Task definition IEC 61131-3 refers to a group of PROGRAM-type POUs as a ”task”. POUs are software units used to organize the project (POU = Program Organization Unit). The task is executed by the runtime system and the program/s included in it ensure the required functionality of the runtime system.
Show/Hide Bookmarks Drive PLC Developer Studio Resources Saving a start event If an EVENT-type task is called again during processing, the new call is saved and restarted immediately after the task cycle of the event-controlled task is complete. Only one call can be buffered. PRIORITY Every user task (not the Cyclical task) has a defined priority between 0 and n (0 = task never starts; 1 = highest priority ...n-1 = second-lowest priority ...n = lowest priority). • A priority cannot be assigned twice.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.8.4 If a task overflow leads to a system error If, for instance, a continuous loop or too much program content has been programmed for a task and the task cannot process the program within the specified interval time, a system error will occur in the automation system. System errors can also occur when a running task is interrupted so frequently by other tasks that the program cannot be processed within the specified task runtime.
Show/Hide Bookmarks Drive PLC Developer Studio Resources Which task is processed? Processing is subject to the following rules: • The task with the satisfied start condition is executed, when the specified interval time has expired or the addressed variable, in event-control, changes from FALSE to TRUE, for example. • If several tasks have a valid start condition, the task with the highest priority will be executed.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.8.6.1 Insert task / Add task Icon: - Menu: InsertWInsert task InsertWAdd task Keyboard: - Use this command to insert a new task to the task configuration. • If a task has been selected, the command Insert task is available and inserts the new task in front of the cursor. • If ”Task configuration” is selected, the command Add task is available and adds a new task to the end of the existing list.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.8.6.2 Insert program call / Add program call Icon: - Menu: InsertWInsert program call InsertWAdd program call Keyboard: - Use this command to open the dialog box and enter a program call for a task in the task configuration. Select Insert program call to insert the new program call in front of the cursor and Add program call to add the program call to the end of the existing list.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.9 Watch and Receipt Manager The Watch and Receipt Manager is an object on the tab Resources in the Object Organizer. Use the Watch and Receipt Manager to • display values of certain variables. • pre-assign variables with certain values and transfer them to the control in one go. • read and save current control values as pre-assignment in the Watch and Receipt Manager.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.9.2 Watch and Receipt Manager in online mode In online mode, the Watch and Receipt Manager displays the values of the entered variables. • Structured values (arrays, structures and instances of function blocks) are identified with a plus sign in front of the identifier. Click on the plus sign to open the variable. A minus sign appears instead of the plus sign. Click on the minus sign to close the variable again.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.9.3.4 Load watch list Icon: - Menu: ExtrasWLoad watch list Keyboard: - Use this command to load a saved watch list. Selection of the command opens the dialog box Open. • Select the required file with the extension ”*.wtc” and click OK. Enter the new watch list name in the dialog box. • The input field already displays the file name without extension. Click Extras➞ ➞Save watch list to save a watch list. 8.9.3.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.10 Target Settings The Target Settings are located as an object in the Resources index and • define the target system on which the project is to run, • define the project settings, • require a target system to be selected after the menu command ProjectWNew has been executed. The dialog box Target Settings opens automatically when a new project is generated and can also be requested from ResourcesWTarget Settings.
Show/Hide Bookmarks Drive PLC Developer Studio Resources Target Platform On this index card, only the Output field is active. The Output field is used to configure the files to be created with the DDS. Note! The file types *.HEX, *.LST, *.MAP may only be activated after request by the Lenze support. They are exclusively used for diagnostic purposes. If the HEX control box is activated, a *.HEX file will be created containing the HEX dump.
Show/Hide Bookmarks Drive PLC Developer Studio Resources Use of older versions Note! The following restrictions or behaviour can occur when older program versions or projects are used. • If DDS 2.2 is used for the compilation of projects that were created with DDS 2.1 or 2.0 the runtime may change and a task overflow may occur when the Data consistency for multi-tasking checkbox is activated. • If projects that were created with DDS 2.2 are opened with DDS 2.1 or 2.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.11 Library Manager In the DDS, libraries are managed with the Library Manager that can be activated with the command Window➞ ➞Library Manager. • Information about the linked libraries is stored with the project. • The Library Manager shows all libraries available for the current project.
Show/Hide Bookmarks Drive PLC Developer Studio Resources Declaration of data types/ global variables The declaration of data types and global variables is displayed in the right-hand pane of the Library Manager. Declaration of visualizations For visualizations, the right-hand pane shows the used placeholders and the visualization. 8.11.1.1 Insert library Icon: - Menu: InsertWAdditional Libraries Keyboard: Use this command to link another library to your project.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8.11.2 Included libraries The DDS comes with the following libraries, among others: Tip! For a detailed description of the function blocks refer to the manual for the associated function library and the Online Help. IEC 61131-3 standard library ”Standard.lib” The library Standard.lib contains all functions and function blocks required by IEC 61131-3 as standard organization blocks for an IEC programming system.
Show/Hide Bookmarks Drive PLC Developer Studio Resources 8-44 DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization 9 Visualization Visualization is located on the tab Visualization in the Object Organizer . Use visualization to draw geometrical elements in offline mode to change their shape or colour in online mode depending on certain variable values. Tip! Use the menu command Project ➞Insert object to create a new visualization object. Placeholders allow a visualization object to be used more than once.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization 9.1 Inserting visualization elements Insertion mode If the visualization level is active, the menu command Insert lists the various different visualization objects. • The mouse pointer in the editor window turns to the icon of the element to be inserted. • The status bar displays the name of the element to be inserted in black. • After an element has been inserted, the process automatically changes to selection mode.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization 9.1.1.3 Ellipse Icon: Menu: Insert WEllipse Keyboard: - Use this command to insert an ellipse as element into your current visualization. Command selection turns the mouse pointer into the associated icon in the editor window. • Use the depressed left mouse key to size the element as required in the editor window. 9.1.1.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization 9.1.1.6 Polygon Icon: Menu: Insert WPolygon Keyboard: - Use this command to insert a polygon as an element into your current visualization. Command selection turns the mouse pointer into the associated icon in the editor window. 1. Click the required starting point of the polygon in the editor window. 2. Click to add further reference points. 3. Double-click to complete the polygon. 9.1.1.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization 9.2 Editing visualization elements 9.2.1 Information in the status bar The status bar contains the following information for visualization: X / Y position The current X and Y position of the mouse pointer is displayed in pixels relative to the top left-hand corner of the image. Element number If the mouse pointer is positioned over an element or if an element is edited, the number of the element will be displayed.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization Examples of impermissible expressions fun(88) a:=9 RETURN Global variables can be written in two ways. .globvar (not possible within a composite expression globvar 9.2.3 Selecting visualization elements Tip! The commands for editing elements always refer to the element(s) currently selected. Selecting one element • Click the element to be selected. • Pressing the key also causes a jump to the first element in the element list.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization 9.2.4 Changing size and shape of visualization elements Once an element has been selected, its centre of rotation and reference points are marked in black. • The size of the selected element can be changed by moving the respective reference point while keeping the left mouse key depressed. • The centre of rotation of the visualization element can be moved by keeping the left mouse key depressed.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization 9.2.8 Commands in the “Extras” menu 9.2.8.1 Element list Icon: - Menu: Extras WElement list Keyboard: - Use this command to open the dialog box Element list that lists all visualization elements with their number, type and position. • The position refers to the X and Y position of the top left- and bottom right-hand corner of the element.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization 9.2.8.6 Placeholder list Icon: - Menu: Extras WPlaceholder list Keyboard: - Every point of the configuration dialog ExtrasWConfigurethat allows variables or text to be input, also offers the possibility of entering a placeholder instead of the variables or the text. This is appropriate if the visualization object is to be integrated into other visualization objects as a reference.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization 9.3 Configuring visualization elements 9.3.1 Commands in the “Extras” menu 9.3.1.1 Settings - Icon: Menu: Extras WSettings Keyboard: - Use this command to open the dialog box Visualization settings for the following settings: Category View • Text field Zoom permits a zoom factor from 10 to 500 % . • If check box Element numbers is activated, the element number will be displayed for every element in offline mode.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization Creating a language file • Tick check box Language file. The group box Language is active. • In the combination box Language enter ”en”, for example (English). • Enter a path or use ... to look for the directory in which the language file is to be saved. The file name, English.vis, for example, must be specified at the end. • Press Save once the dialog box fields have all been completed. In the example, the file English.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization Caution! If a translation file is to allow a switch into another national language in online mode, the specific text must be framed by #Text#. #Pump 1# or #Pump# 1 If the text Pump (Pump1, Pump2 etc.) occurs several times, the second case will save several occurrences in the translation. Horizontal/ vertical Selecting the respective check box defines the layout of the configured text within the element.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization Scaling Use the input field Scaling to enter a variable to define the size of the element. Input and effect Magnification 1000 1:1 no change 100 x 0.1 10000 x 10 Angle Use the input field Angle to enter a variable whose value causes element rotation (positive value = mathematically positive = CW rotation). • The value is evaluated in degrees. • The centre of rotation of a selected element can be moved, keeping the left mouse key depressed.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization 9.3.2 Formatted text display The following tables provide a general formatted text display. Char format Element Meaning % Formatted text display starts with %. If the character is to be included in the display for specific reasons, the first characters must be %%. b Display is left-aligned. Display field minimum width c For Char variables String format Element Meaning % Formatted text display starts with %.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization Format for floating-point numbers Element Meaning % Formatted text display starts with %. If the character is to be included in the display for specific reasons, the first characters must be %%. - Display is left-aligned. + Positive polarity # b Leading zero for hexadecimal and octal representation Display field minimum width .
Show/Hide Bookmarks Drive PLC Developer Studio Visualization • The display then is as follows in online mode. The previously made inputs return the representation below. To test the effect of the Formatted number display, enter other formats as well with %. • ”% s” will be substituted in online mode with the value of the variable entered in the input field Text display.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization Zoom to Vis If check box Zoom to Vis is activated, a mouse click on the visualization element will take you to the window of the visualization selected in the input field. • Activating check box Toggle variable as well will toggle the variable specified in text field Toggle variable. • If a STRING-type program variable (e. g. PLC_PRG.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization ConfigureWBitmap available for: Bitmap Use Extras➞ ➞Configure, category Bitmap to effect settings for the selected bitmap. Bitmap Use the input field Bitmap to enter the bitmap file and its path. • Click ... to open the standard dialog for browsing through the file structure to select the required file. • Use check box Transparent background to define a colour contained in the bitmap as transparent.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization • Button Replace placeholder opens dialog box Replace placeholder. All placeholders used in the inserted visualization organization unit will be listed. Column Replacements offers the option of replacing these with a specific value. The available substitutes are dependent on whether dialog box Placeholder list predefines a value set. The selection is displayed in a combination box.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization • A semicolon ”;” must be entered into the instruction part. • Create a new visualisation with the name Screen1 and insert a rectangle with InsertWRectangle. • Mark the rectangle and open the configuration dialog with ExtrasWConfigure. In the category Text , input field content, enter the ”variable value”. The other options remain unchanged. • In the category Variables, input field Textdisplay, enter ”$Ref$”.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization 9.4 Visualization in libraries Visualizations can also be saved in libraries and thus be made available as library organization units in projects. • Like the visualizations available in the project directly, they can be inserted as references. • Use the command Zoom to Vis to open another visualization. Tip! The visualizations within a project must be uniquely named. Referenced and existing visualizations must bear uniquely different names.
Show/Hide Bookmarks Drive PLC Developer Studio Visualization 9-22 DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Data types 10 IEC 61131-3 data types 10.1 Standard data types Standard or user-defined data types may be used for programming. Each identifier is assigned to a data type to define how much memory is to be reserved and which values correspond to the memory contents.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Data types 10.1.4 String A variable of type STRING can hold variable-length sequences of characters. The size specified for memory reservation in the declaration is character-based and may be given in round or square brackets. Where no value has been specified (1 to 255), the default is assumed as 20 characters. Example of a 20-character string declaration: str:STRING(20):=’This is a string’; 10.1.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Data types Initializing arrays: Either all elements of an array are initialized, or none. Examples of array initializations: arr1 : ARRAY [1..5] OF INT := 1,2,3,4,5; arr2 : ARRAY [1..2,3..4] OF INT := 1,3(7); (* short for 1,7,7,7 *) arr3 : ARRAY [1..2,2..3,3..4] OF INT := 2(0),4(4),2,3; (* short for 0,0,4,4,4,4,2,3 *) Example for the initialization of an array within a structure: TYPE STRUCT1 STRUCT p1:INT; p2:INT; p3:DWORD; END_STRUCT ARRAY[1..
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Data types If an integral project component, the function CheckBounds is called up automatically. A separate call for the function in the implementation is not required. If the function CheckBounds is not an integral project component, an array is not prevented from exceeding its limits. Where indirect accesses made to an array outside its limits, CheckBounds forces access to the first or last array element.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Data types Pointer declarations have the following syntax: : POINTER TO ; A pointer can point to any data type or function block, including user-defined function blocks. Use address operator ADR to assign a variable or function block address to the pointer. Pointers are de-referenced via the contents operator ^ behind the pointer identifier.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Data types No enumeration value must be used twice. Example: TRAFFICLIHTS: (red, yellow, green); COLOUR: (blue, white, red); Error: red must not be used for TRAFFICLIGHTS and COLOUR. 10.2.4 Structures Structures are saved as objects in the Object Organizer on the index card Data types, start with the keywords TYPE and STRUCT and end with END_STRUCT and END_TYPE.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Data types 10.2.5 References The user-defined data type “Reference” generates an alternative name for a variable, constant or function block. Organize your references as objects in the Object Organizer on the index card Data types. They start with the keyword TYPE and end with END_TYPE. Syntax: TYPE : ; END_TYPE Example: TYPE message:STRING[20]; END_TYPE; 10.2.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Data types Library CheckRange.lib The library CheckBounds contains the global variable g_bErrorCheckRange. • Open the library management with WindowWLibrary Manager. • Insert the library from the library folder. Via the menu command InsertWAdditional Library, you can select the library and insert it into the actual project. • Select the library in the library management.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Data types Parameterizing the function value Is given the value to be assigned to the range type. lower The lower range limit. upper The upper range limit. return value The actually assigned value for the range type. In this example, the following assignment is implicitly generated from an assignment i := 10*y;: i := CheckRangeSigned(10*y, -4095, 4095); If y has e.g.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Data types 10-10 DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators 11 Operator list The table below lists the operators in ST and IL with the modifiers available in IL. Column Operator IL displays only the line, using the operator. Prerequisite: The first required operator must have been loaded in the preceding line (e. g. LD in) Column Mod.IL lists the modifiers available in IL. 11.1 C The instruction will be carried out only if the result of the preceding expression is TRUE.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators 11-2 Operator ST Operator IL < LT Mod.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators 11.2 Standard.lib-integrated IEC operators Operator ST Operator IL Mod.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators 11-4 DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators 12 IEC 61131-3 operators The DDS supports all IEC operators. Contrary to standard functions, they are known implicitly throughout the entire project. Organization unit implementations use operators like functions. 12.1 Arithmetic operators Types: The operands of the following arithmetic operators can be of type BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT and REAL. 12.1.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators Library CheckDiv.lib The library CheckDiv contains the global variable g_bErrorCheckDiv • Open the library management with WindowWLibrary Manager. • Insert the library from the library folder. Via the menu command InsertWAdditional Library, you can select the library and insert it into the actual project. • Select the library in the library management.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators Implementing CheckDivReal Declaration part FUNCTION CheckDivReal:REAL VAR_INPUT divisor:REAL; END_VAR Instruction part IF divisor = 0 THEN CheckDivReal:=1; ELSE CheckDivReal:=divisor; END_IF; The operator DIV uses the result of function CheckDivReal as divisor. In the program example illustrated below, this prevents a division by 0 by setting the divisor (d) from 0 to 1. The result erg of the division is therefore 799. 12.1.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators 12.1.7 SIZEOF The result of this function is the number of bytes required by the specified data type. Examples 12.2 IL Declaration ST Declaration arr1:ARRAY[0..4] OF INT; Var1:=INT; Implementation LD arr1 SIZEOF ST Var1 (* Var1 = 10 *) arr:ARRAY[0...4]OF INT; Var1:INT; Implementation Var1=SIZE OF (arr1); FBD Bit-string operators Types: The operands of the following bit-string operators should be of type BOOL, BYTE, WORD or DWORD.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators 12.2.2 OR Bit-by-bit OR of bit operands Examples IL Var1 : BYTE; LD 2#1001_0011 OR 2#1000_1010 ST Var1 FBD ST Var1 := 2#1001_0011 OR 2#1000_1010 (* Var1 = 2#1001_1011 *) Note! Make sure to observe the following when using 68xxx or C-code generators in the FBD for the illustrated program sequence.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators 12.3 Bit-shift operators Types: The operands of the following bit shift operators should be of type BYTE, WORD or DWORD. 12.3.1 SHL Shifting the bits of an operand to the left Example IL: LD 1 SHL 1 ST Var1 (* Var1 = 2 *) A:= SHL (IN, N) IN 12.3.2 is shifted to the left by N bits, and padded with zeros from the right.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators 12.3.4 ROR Rotating the bits of an operand to the right Example IL: LD 2#1001_0011 ROR 3 ST Var1 (* Var1 = #0111_0010 *) A:= ROR (IN, N) IN is rotated by one bit position to the right N times, with the bit being on the extreme right being reinserted from the left. Tip! The number of bits for the arithmetic operation is specified by the data type of input variable IN. A constant is considered as the lowest-order data type.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators 12.4 Selection operators All selection operations can also be carried out on variables. For better understanding, the examples below use constants as operands. 12.4.1 SEL Binary selection OUT := SEL(G, IN0, IN1) means: IF G THEN OUT:=IN1; ELSE OUT:=IN0; END_IF IN0, IN1 and OUT can be of any type, G must be of type BOOL. The result of the selection is • IN0 if G is FALSE, • IN1 if G is TRUE.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators 12.4.3 MIN Minimum function Returns the lesser of two values. OUT := MIN(IN0, IN1) IN0, IN1 and OUT can be of any type. Examples IL LD MIN MIN MIN ST 12.4.4 ST 90 30 40 77 Var1 FBD (* Var1 = 30 *) LIMIT Limitation OUT := LIMIT(Min, IN, Max) means: OUT := MIN (MAX (IN, Min), Max) Max is the upper, Min the lower limit for the result.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators 12.4.5 MUX Multiplexer OUT := MUX(K, IN0,...,INn) means: OUT := INk. • IN0, ... , INn and OUT can be of any type. • K must be of type BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT or UDINT. • MUX selects the Kth value from a number of values. If K is greater than the number of other inputs (n), the last value will be passed on (INn).
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators 12.5.2 LT Less than A Boolean operator with the result TRUE if the first operand is less than the second operand. Examples IL LD LT ST 12.5.3 ST 20 30 Var1 FBD Var1 := 20 < 30; (* Var1 = TRUE *) LE Less than or equal to A Boolean operator with the result TRUE if the first operand is less than or equal to the second operand. Examples IL LD LE ST 12.5.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators 12.6 Addressing operators 12.6.1 ADR Addressing function ADR returns the data memory address of its argument in a DWORD. The determined address can be assigned to a pointer within the project. Examples IL ST FBD LD var1 ADR ST pt 12.6.2 Contents operator A pointer is de-referenced by means of the contents operator ^ behind the pointer identifier.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators 12.8 Assignment operator 12.8.1 MOVE Assignment operator The MOVE command is useful only in the LD editor. If EN is TRUE, the content of variable a is transferred to variable b. Examples IL l ST DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operators 12-14 DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operands 13 IEC 61131-3 operands In the DDS, operands can be constants, variables, addresses and function calls. 13.1 Constants Note! Not all automation systems support the various different data types. 13.1.1 Number constants Numerical values can be binary numbers, octal numbers, decimal numbers and hexadecimal numbers. • If an integer is not a decimal number, its base followed by a hash # must be written in front of the integer constant.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operands Examples of incorrect TIME constants: TIME1 := t#5m68s; (*Overflow in lower-order component*) TIME1 := 15ms; (*T# is missing*) TIME1 := t#4ms13d; (*Wrong sequence of time units*) Maximum size: DWORD 232-1ms ≈ 49days 13.1.4 DATE constants Use this type to specify a date. A DATE constant is declared by a leading d, D, DATE or date followed by a #. Any year-month-day dates can then be entered. Examples: DATE#1996-05-06 d#1972-03-29 13.1.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operands 13.1.7 REAL and LREAL constants REAL constants may be decimal fractions and exponents using the American way of decimal points. Examples: 7.4 (* instead of 7,4 *) 1.64e+009 (* instead of 1,64e+009 *) 13.1.8 STRING constants A string can be any character sequence. STRING constants start and end with single quotes. Umlauts and white spaces are also allowed and processed like any other character.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operands 13.2 Variables Variables are declared either locally in the declaration part of an organization unit or in the global variable lists. • Variables can be used wherever where the declared type allows it. • The available variables can be called via the Help Manager. 13.2.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operands Furthermore: • Case sensitivity is not an option for variables. (Example: VAR1, Var1 and var1 are not different variables) • Underscores in an identifier are significant. (Example: A_BCD and AB_CD are interpreted as different identifiers.) • Multiple successive underscores at the beginning of or within an identifier are not allowed. • The first 32 characters are significant. 13.3 Addresses 13.3.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operands Memory/ Address Manager The memory is divided into words, with a word being made up of 16 bits (bit0 to bit15). The table below illustrates the memory data structure: Note! Boolean values are assigned byte-by-byte unless a single bit address is explicitly specified. A value change of varbool1 AT% MW0 affects the range from % MX0.0 to % MX0.7 13.3.2 Flags Tip! The flag range size is dependent on the selected automation system.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operands 13.4 Function calls In ST, a function call can also be an operand. Example: Result := Fct(7) + 3; l DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Operands 13-8 DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14 IEC 61131-3 standard functions Type conversion functions Conversions between integer number types.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.1 Type conversion functions Implicit conversions from a ”higher-” type to a ”lower-order” type are not permitted (such as from INT to BYTE or from DINT to WORD). Special type conversion functions must be applied to do so. Conversions from any elementary type to any other elementary type are possible on principle. Syntax: _TO_ 14.1.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.1.3 TO_BOOL Converting from any type to BOOL • The result is TRUE if the operand is not 0 and FALSE if the operand is 0. • With type STRING the result is TRUE if the operand is TRUE, otherwise the result is FALSE.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.1.5 DATE_TO / DT_TO Converting from type DATE or DATE_AND_TIME to another type Internally, the date is saved in a DWORD in seconds since the 1st of January 1970. This value is converted. • With type STRING, the result is a date constant. • Conversion from higher- to lower-order types may result in information loss.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.2 Numerical functions 14.2.1 ABS Returns the absolute value of a number Examples 14.2.2 IL ST LD -2 ABS ST i (* i=2 *) i:=ABS(-2); FBD SQRT Returns the square root of a number Examples 14.2.3 IL ST LD 16 SQRT ST q (* q=4 *) q:=SQRT(16); FBD LN Returns the natural logarithm of a number Examples 14.2.4 IL ST LD 45 LN ST q (* q=3.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.2.6 SIN Returns the sine of a number in radians Examples 14.2.7 IL ST LD 0.5 SIN ST q (* q=0.4794255 *) q:=SIN(0.5); FBD COS Returns the cosine of a number in radians Examples IL LD 0.5 COS ST q (* q=0.8775826 *) 14.2.8 ST q:=COS(0.5); FBD TAN Returns the tangent of a number in radians Examples 14.2.9 IL ST LD 0.5 TAN ST q (* q=0.5463024 *) q:=TAN(0.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.2.11 ATAN Returns the arc tangent (inversion of tangent) of a number in radians Examples 14.2.12 IL ST LD 0.5 ATAN ST q (* q=0.4636476 *) q:=ATAN(0.5); FBD EXPT Exponentiation of one variable with another: OUT = IN1IN2 • • is of type REAL. IN1 and IN2 can be of type BYTE, WORD, DWORD, INT, DINT, REAL. OUT Examples 14.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.3.3 RIGHT Returns a right start string of a string • STR is of type STRING, SIZE of type INT, the return value of the function type STRING. • RIGHT (STR, SIZE) means: Take the first SIZE characters from the right in the string STR. Examples 14.3.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.3.7 DELETE Deletes a segment from a string from a specific position • STR1 is of type STRING, LEN and POS of type INT, the return value of the function type STRING. • DELETE(STR, L, P) means: Delete L characters from STR, starting with the P th. Examples 14.3.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.4 Bistable function blocks 14.4.1 SR Bistable function block (dominant set) • Q1, SET1 and RESET are of type BOOL. • Q1 = SR (SET1, RESET) means: Q1 = (NOT RESET AND Q1) OR SET1 Examples Declaration: SRInst : SR; IL FBD CAL SRInst(SET1:=VarBOOL1, RESET:=VarBOOL2) LD SRInst.Q1 ST VarBOOL3 ST SRInst(SET1:=VarBOOL1, RESET:=VarBOOL2); VarBOOL3:=SRInst.Q1; 14.4.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.4.3 SEMA Software semaphore (interruptible) X is an internal BOOL variable initialized with FALSE . BUSY, CLAIM and RELEASE are of type BOOL. • If SEMA is called and BUSY is TRUE, SEMA has already been assigned (SEMA was called using CLAIM = TRUE). • If BUSY is FALSE, SEMA has either not been called yet or been enabled (call with RELEASE = TRUE).
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.5 Edge detection 14.5.1 R_TRIG Rising edge detector FUNCTION_BLOCK R_TRIG VAR_INPUT CLK : BOOL; END_VAR VAR_OUTPUT Q : BOOL; END_VAR VAR M : BOOL := FALSE; END_VAR Q := CLK AND NOT M; M := CLK1; END_FUNCTION_BLOCK As long as the input variable CLK is FALSE, the output Q and the auxiliary variable M will be FALSE . As soon as CLK returns TRUE, Q will first return TRUE and then M will be switched to TRUE . I.e.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.5.2 F_TRIG Falling edge detector FUNCTION_BLOCK F_TRIG VAR_INPUT CLK : BOOL; END_VAR VAR_OUTPUT Q : BOOL; END_VAR VAR M : BOOL := TRUE; END_VAR Q := NOT CLK AND NOT M; M := NOT CLK; END_FUNCTION_BLOCK As long as the input variable CLK returns TRUE, the output Q and the auxiliary variable M will be FALSE. As soon as S1 is FALSE, Q will first return TRUE and then M will be switched to TRUE. I.e.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.6 Counters 14.6.1 CTU Up counter CU, RESET and Q are of type BOOL, PV and CV are of type INT. • If RESET is TRUE, the counter variable CV is set to 0. • Every positive edge at input CU increases CV by 1. As long as CV is less than PV max (i.e. no overflow). • Q returns TRUE if CV is greater than or equal to the upper limit PV .
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.6.3 CTUD Up and down counter CU, CD, RESET, LOAD, QU and QD are of type BOOL, PV and CV are of type INT. • If RESET is valid, the counter variable CV will be initialized with 0. • If LOAD is valid, CV will be initialized with PV . • If positive edge CU is valid, CV will be increased by 1 as long as CV does not cause an overflow.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.7 Timers 14.7.1 TP Pulse encoder TP(IN, PT, Q, ET) means: • IN and PT are input variables of type BOOL or TIME. • Q and ET are output variables of type BOOL or TIME. • After a positive edge at input IN, output Q becomes TRUE for the time specified at PT Then Q will be FALSE again. • As soon as IN returns TRUE, ET will count the time in milliseconds until the value equals that in PT and then remain the same.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.7.2 TON Timer on-delay TON(IN, PT, Q, ET) means: • IN and PT are input variables of type BOOL or TIME. • Q and ET are output variables of type BOOL or TIME. • If IN is FALSE, the returns are FALSE or 0. • As soon as IN returns TRUE, ET will count the time in milliseconds until the value equals that in PT and then remain the same. • Q is TRUE if IN returns TRUE and ET equals PT. Otherwise Q will be FALSE.
Show/Hide Bookmarks Drive PLC Developer Studio IEC 61131-3 Standard functions 14.7.3 TOF Timer off-delay TOF(IN, PT, Q, ET) means: • IN and PT are input variables of type BOOL or TIME. • Q and ET are output variables of type BOOL or TIME. • As soon as IN is FALSE, ET will count the time in milliseconds until the value equals that in PT and then remain the same. • Q is FALSE if IN is FALSE and ET equals PT. Otherwise Q returns TRUE.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix 15 Appendix 15.1 Command line commands The DDS can be assigned certain commands on startup that will become effective on program execution. These command line commands start with ”/” and are case-insensitive. Processing is sequential from left to right. /online DDS attempts to go online with the current project after startup. /run DDS starts the user program after log-in. Valid in combination with /online only.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix 15.2 Command file (Cmdfile) commands The commands that may be used within a command file are listed as follows. The file can then be called via the command line (see above). Input is case-insensitive.The command line is output as a message in the message window in the message file (see below), preceded, in addition to the command, by an ”@”. All characters behind a semicolon (;) are ignored (comment).
Show/Hide Bookmarks Drive PLC Developer Studio Appendix Manage the default behaviour of DDS dialogs query on Display dialogs expecting user input query of ok All dialogs behave in accordance with a click on OK query off no query off cancel All dialogs behave in accordance with a click on No All dialogs behave in accordance with a click on Cancel Command to call command files as subroutines call Call command files as subroutines. Up to 10 parameters may be transferred.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix Set the communication parameters (gateway, device) device instance device parameter | Set the instance name for the current device to the specified name. Assign the parameter with the specified ID, or optionally the specified parameter name, the specified value that will then be interpreted by the device. System call system Execute the specified operating system command.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix 15.3 IEC keywords Keywords are unique character combinations used as individual syntax elements. • Keywords must not be used as identifiers. • Keywords under the Drive PLC Developer Studio also include the names of Lenze function blocks, that always start with ”L_” ( L_ABS , L_ADD , ...).
Show/Hide Bookmarks Drive PLC Developer Studio Appendix 15-6 R RELEASE RETC RS R1 REPEAT RETCN RTC R_TRIG REPLACE RETURN R_EDGE READ_ONLY RESOURCE RIGHT READ_WRITE RET ROL REAL RETAIN ROR S SHR SR SUB S1 SIN ST SD SINGLE STEP SEL SINT STN SEMA SL STRING SHL SQRT STRUCT TAN TOD TYPE TASK TOF THEN TON TIME TP TIME_OF_DAY TRANS TO TRUE UDINT UINT ULINT UNTIL VAR VAR_OUTPUT VAR_ACCESS VAR_EXTERNAL WHILE WITH WORD XOR XORN DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix 15.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix FBD editor commands Menu command Keyboard command Insert à Network (after) + Insert à Assignment + Insert à Jump + Insert à Return + Insert à Operator + Insert à Function + Insert à Function block + Insert à Input + Extras à Negation + Extras à Zoom + LD editor commands Menu command Keyboard command Insert à Network (after) +
Show/Hide Bookmarks Drive PLC Developer Studio Appendix Operation of PLC configuration Function Keyboard command Open and close organization elements Draw edit frame around the name Operation of task configuration l Function Keyboard command Draw edit frame around task or program name DDS EN 2.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix 15.5 Error messages The DDS will display the following error messages in alphabetical sequence in the message window after a log-in or compile. Note! Contact your Lenze representative for any error message not described in this chapter. 15.5.1 Warnings No. 1100 Cause Unknown function in library. 1101 Unresolved icon . 1102 Incorrect interface for icon .
Show/Hide Bookmarks Drive PLC Developer Studio Appendix No. 1901 1902 1903 2900 2901 2902 2903 2904 2905 Cause Access variables and configuration variables are not saved in a library! : Library not suitable for the current machine type! : Incorrect library A system organization unit was used in a scale function. It is possible that no process image will be generated for this system organization unit. Chapter on Scale functions (^ 8-18). A system organization unit was used in a system POU.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix No. 3163 3200 3201 Cause Unknown reference type in library (Icon , Class , Type ) (%d): Logical expression too complex. 3208 3209 (): A network may return a maximum of 512 byte code. Stack overflow on nested string/array/structure function calls. Assignment too complex (too many address registers required) A jump is in excess of 32k bytes.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix No.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix No.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix No. 4001 4010 4011 4012 4013 4014 4015 4016 4017 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4040 4041 4042 4043 4050 4051 4052 4053 4054 4060 Cause Possible remedy Variable not declared Declare the variable locally or globally. Incompatible types: Cannot convert into .
Show/Hide Bookmarks Drive PLC Developer Studio Appendix No. 4061 4062 4063 4064 4070 4071 4100 4110 4111 Cause VAR_IN_OUT parameter of must be assigned. No external access to VAR_IN_OUT parameter of . VAR_IN_OUT parameter of cannot be assigned bit addresses. VAR_IN_OUT must not be overwritten in local action call ! Too deeply nested expression in organization unit.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix No. 4264 4265 4266 4267 Cause The selector of the CASE instruction must be INT-type. Number expected after, At least 1 instruction required. A function block call must start with an instance name. 4268 4269 4270 4271 Expression expected END_CASE expected after ELSE branch CASE constant %ld already in use The lower limit of the specified range is greater than the upper limit.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix No.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix No. 4432 4434 4435 4436 4437 4438 4500 4501 4520 4521 4522 4550 4551 4552 4553 4554 4555 4556 4800 4801 4802 4803 4804 4805 4810 4811 4812 4813 4820 4850 Cause Possible remedy Jump labels in the middle of an expression are not allowed IEC 61131-3 specifies exact jump label positions. Too many labels An organization unit must not contain in excess of 100 labels.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix 15.5.3 No. 1 (0001) 2 (0002) 4 (0004) 8 (0008) 16 (0010) 32 (0020) 64 (0040) 128 (0080) 256 (0100) 512 (0200) 1024 (0400) 2048 (0800) 5120 (1400) 6144 (1800) 7168 (1C00) 8192 (2000) 40960 (A000) 40961 (A001) 40962 (A002) 41217 (A101) 41218 (A102) 41219 (A103) 41220 (A104) 41221 (A105) 41222 (A106) 41223 (A107) 41224 (A108) 41225 (A109) 41226 (A10A) 41227 (A10B) Communication errors Cause Transmit buffer in the controller is full.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix No.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix No. 41729 (A301) 41730 (A302) 41731 (A303) 41732 (A304) 41733 (A305) 41734 (A306) 45569 (B201) 45570 (B202) 45571 (B203) 45572 (B204) 45573 (B205) 45574 (B206) 45575 (B207) 45576 (B208) 45577 (B209) 45578 (B20A) 45579 (B20B) 45580 (B20C) 45581 (B20D) 45582 (B20E) Cause Error when writing an OPC item. Possible remedy Contact Lenze Internal program error OPC item could not be read. Internal program error OPC connections failed.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix 15.6 l Glossary Sequential Function Chart Sequential Function Chart SFC (Sequential Function Chart - SFC) is a programming language to describe sequential and parallel control processes with time and event control. Action Boolean variable or instructions which can be controlled through an action block (in SFC). Action block Activation description of actions in SFC. Current event Intermediate result in IL of any data type.
Show/Hide Bookmarks Drive PLC Developer Studio Appendix 15-24 ST Abbreviation for Structured Text. Standard functions All functions predefined by IEC 61131-3 to implement PLC typical functionality. Standard organization units See Standard function blocks Standard function blocks All function blocks (Function Blocks) predefined by IEC 61131-3 to implement PLC typical functionality.
Show/Hide Bookmarks Drive PLC Developer Studio Index 16 Index A Absolute value, 14-5 Access rights, 5-15, 6-21, 6-28 Add action, 7-63 Add entry action, 7-58 Add exit action, 7-59 Add label to parallel branch, 7-59 Add program call, 8-34 Add subelement, 8-24 Add task, 8-33 Addition, 12-1 Addressing function, 12-12 Administrator rights, 6-21 Align, 9-8 Alternative branch (left), 7-57 Alternative branch (right), 7-57 Angle, 9-13 Anisotropic, 9-18 Binary selection, 12-8 Bistable function blocks, 14-10 Bit
Show/Hide Bookmarks Drive PLC Developer Studio Index Compile all, 6-8 Directories, 5-11 Compiler error messages, 15-11 Display, 7-51 Concatenation, 14-8 Display at step, 7-62 Configure, 9-11 Display project log , 6-43 Configuring the monitoring window, 7-24 Division, 12-1 Connector, 7-48 Document project, 6-13 Constants, 5-13, 7-11 Documentation setup, 6-6 Contact, 7-37 Down counter, 14-14 Continuous function chart editor, 4-19 Download information, 6-9 Controller enable, 6-41 Drag & Dr
Show/Hide Bookmarks Drive PLC Developer Studio Index Function block, 2-4, 7-23 Insertion mode, 9-2, 9-5 Function block diagram (FBD), 4-18 Instance, 6-29, 7-55 Function block instances, 2-4 Instance Parameter Manager, 8-11 Function CheckBounds, 2-3 Instance paths, 8-3 G Instruction list (IL), 4-2 Instructions, 4-5 GDC Device Description, 5-16, 5-17 Interrupt task, 8-29 Global constants, 8-2 INTERVAL, 8-29 Global replace, 6-19 Invisible, 9-13 Global search, 6-18 IP address, 6-40 Global va
Show/Hide Bookmarks Drive PLC Developer Studio Index M Operand, 7-22 Operator, 7-22, 7-31, 7-39, 7-44 Macro, 7-9 Operators, 4-2, 11-1 Macro, 7-53 Options, 7-62 Mark, 5-8 Options for network comments, 7-26 Mark all, 7-46 Organization unit, 2-2 Maximum comment size, 7-26 Output, 7-33, 7-44 Maximum function, 12-8 Output call tree, 6-29 Memory/Address Manager, 13-6 Output cross reference list, 6-30 Messages, 5-5 Output unused variables, 6-31 Minimize node, 6-25 Output variables, 7-11 Minim
Show/Hide Bookmarks Drive PLC Developer Studio Index Project check, 6-20 Select background bitmap, 9-11 Project comparison, 6-16 Select document template, 8-3 Project generation, 2-1 Select PLC , 3-2 Project information, 6-18 Selecting objects, 6-24 Project structure, 2-1 Selection mode, 9-2 Project translate, 6-12 Send back by one, 7-52 Properties, 6-28, 7-47, 8-24, 8-34 Sequential Function Chart (SFC), 4-11 Pulse encoder, 14-16 Set/Reset, 7-33, 7-40, 7-46 Setting a breakpoint, 6-35 R Se
Show/Hide Bookmarks Drive PLC Developer Studio Index Step transition (before), 7-57 Toggle variable, 9-16 Stop, 6-33 Tool bar, 5-9 String length, 14-7 Tool tip, 5-2, 7-19 Structured text (ST), 4-4 Transition jump, 7-58 Subcodes, 8-16 Translate, 6-9 Subtraction, 12-1 Translate project into another language, 6-12 System codes, 8-7 Translation file, 6-11, 6-12 System error, 8-31 Types for variable declaration, 7-15 System organization units, 8-23 U System POU, 2-7 Undo, 7-1 T Up and down