Home
Global Drive PLC Developer Studio
Contents
1. CHECKBOUNDS The register card Global Variables contains the variable g_ErrorCheckBounds or Library Manager Standard LlB 25 3 02 09 07 46 iLenzeDrive lib 27 6 02 11 55 24 g_bErrorCheckBounds BOOL error access outside array limits END_VAR Di 9 Global Variables Globale _Yariablen lt A gt Depending on the selected PLC some libraries are automatically linked when a new project is created the library standard lib for example 2 2 10 Data types In addition to the standard data types users can define some data types of their own Structures enumeration types and references can be created 2 2 11 Visualization The DDS provides visualization to monitor and modify project variables The visualization allows offline drawing of geometrical elements that can then change their shape colour text output online depending on certain variable values 2 8 DDS EN 2 3 Lenze Show Hide Bookmarks 2 3 2 3 1 2 3 2 2 3 3 2 3 4 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Introduction Debugging online functionality Debugging The DDS debugging functions assist troubleshooting e 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
2. Systembus Server Systembus Server Driver CAN 8220 Lenze Systembus Dongle driver 3 Click OK 4 Select the new channel and enter the defined required parameters in Communication parameters by clicking the relevant entry and select the parameters using the arrow keys 5 Accept the settings with OK This parameterizes and starts the communication driver GATEWAY EXE Creating a communication channel with the OPC system bus driver 1 Click New to configure a new channel 2 Select Communication parameters New channel list field Device and click Systembus Server Driver 3 Click OK Channels DK E localhost via Tcp Ip can 8220 OsziTest pro Lokal__ gt DrivePLC_ Name Value Comment cma Lenze OPC Parameter chan 2 CAN bus node 1 1 63 N bus baudr 500 KBaud __New Interrupt 7 0 15 rt addr 160 Remove Gateway Update 4 Use the entry Hardware Number to select a specific port If 0 is entered the standard port will be used Use the communication tool System bus configurator to determine how many active ports are available the individual port numbers the standard port DDS EN 2 3 6 39 Show Hide Bookmarks efesotomasyon com Lenze n O 6 40 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 automatio
3. 15 8 Drive PLC Developer Studio Appendix FBD editor commands LD editor commands Insert gt Network after Insert Parallel contact Insert Function block SFC editor commands Insert gt Step transition before Insert gt Step transition after Insert gt Alternative branch right Insert gt Parallel branch right Extras gt Zoom action transition hange from SFC overview back to editor CFC editor commands DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Appendix Operation of PLC configuration Open and close organization elements lt Enter gt Draw edit frame around the name lt Space bar gt Operation of task configuration Draw edit frame around task or program name Lenze DDS EN 2 3 15 9 Show Hide Bookmarks efesotomasyon com Lenze 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 Possible remedy You are using an external library Check that all functions in the hex file are also defined in 1100 Unknown function lt Name gt in library the lib file the project Define a function program with the relevant name named lt Icon gt without input or output 1103
4. 5 3 1 1 Options Menu Project Options Keyboard Use this command to open the dialog box Options The options are divided into several categories Select the required category from the left hand side of the field Category with a mouse click or use the arrow keys to do so and set the required options on the right hand side Options Load amp save Category Load OK User Information MV Create Backup ok Editor Desktop Iv Auto Save ance Colors l oe Auto Save Interval Min 5 og Build Passwords IV Ask for project info Macros GDC Device Description IV Auto load Save before compile If an option is active a tick appears in front of the option Y Creating a backup If check box Create backup is activated the DDS saves the old file to a backup file with the extension bak on each save to allow for the version before the last save to be restored Autosave If check box Autosave is activated your project while being edited will be constantly saved to a temporary file with an asd extension in accordance with the specified time interval Save interval This file will be deleted when the program completes normally Should the DDS terminate abnormally for some reason mains failure for example the file will not be deleted and the system will display a message on project re launch to advise that a backup file has been created It is now up to the user to dec
5. 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 e Open the Object Organizer and double click the object Task monitor to open the task monitor _ Pa 2 Taskmonitor Work load Condition uf 0 System task 1 00 ms 72 50 ms Running No error DI Cyclic task lt 0 25 ms lt 0 25 ms Blocked No error Cyclic 1000 ms vA 2 task1ms lt 26 ps lt 26 ps Running No error 1 Interval 1 ms 1 ms ld of the task 0 9 as well as the status of the task v Task is ready or running ST Task is blocked or inhibited fame stan Runtime of the last task processing run Maximum runtime Maximum runtime during program operation Bar graphs with the currently detected task time of an interval task e Green bars The current task time is less than 80 of the interval time e Red bars The current task time is greater than 80 of the interval time e The column width represents 100 of the interval time e The black line indicates the maximum task runtime peak hold during program operation e In offline mode this time is displayed as a figure in percent of the interval time Status Task status running inhibited or interrupted Overflow The task needs more time than the set watchdog time No error The task is processed within the specified watchdog time Pr
6. Inserting and configuring elements in the visualization The elements circle ellipse and rectangle are rquired to represent the traffic lights The approach below is one of several f Example_Trafficlight Select Insert Ellipse to draw a circle Double click the circle to open the dialog box Configure element Use the category Variables input field Change colour to enter the variable PLC PRG LIGHT1 RED Use the category Colours to select a dark shade for Colour inside fill colour Use the category Colours to select a red shade for Signal colour inside fill colour Copy the selected circle to the clipboard using lt Ctril gt lt C gt f Example_Trafficlight Insert the copied circle twice into the drawing using lt Ctrl gt lt V gt and position the inserted circles as shown on the left keeping the left mouse key depressed Configure the inserted circles as follows with a double click Middle circle Category Variables input field Change colour PLC_PRG LIGHT1 YELLOW Category Colours Colour inside fill colour select a dark shade Category Colours Signal colour inside fill colour select yellow shade Bottom circle Category Variables input field Change colour PLC_PRG LIGHT1 GREEN Category Colours Colour inside fill colour select a dark shade Category Colours Signal colour inside fill colour select green shade DDS EN 2 3 3 15 Show Hide Bookmarks efesotomasyon com Lenze Drive P
7. Result Fct 7 3 Lenze DDS EN 2 3 13 7 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Operands 13 8 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 14 Lenze Drive PLC Developer Studio IEC 61131 3 Standard functions IEC 61131 3 standard functions Type conversion functions Conversions between integer number types BOOL_TO BOOL gt type X Type X gt BOOL TIME TIME_OF_DAY gt type X DATE DATE_AND_TIME gt type X STRING gt type X REAL gt INT DATE_TO DT_TO STRING_TO TRUNC Numerical functions a gt _ gt a4 mi ta S lt gJ wm Absolute value SQRT Square root Natural logarithm O p 2 Logarithm to the base of 10 mi gt lt n Exponential function Sine calculation in radians O O J Cosine calculation in radians D Z Tangent calculation in radians ASIN ACOS ATAN EXPT Arc sine calculation in radians Arc cosine calculation in radians Arc tangent calculation in radians Exponentiation of one variable to another aN ey Mm O r N m lt p oO S Returns the length of a string LEFT RIGHT Returns a left start string of a string Returns a right start string of a string Returns a segment of a string Concatenates two strings INSERT DELETE REPLACE FIND Inser
8. Use this command to add an entry action to a step e An entry action is executed once only immediately after the step has been activated e The entry action can be implemented in any language e A step with entry action is identified with an E in the bottom left hand corner DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Editors 7 8 2 10 Add exit action jon Menu __ lt Insert rAdd exit action Keyboard Use this command to add an exit action to a step e Anexit action is executed once only before the step is deactivated e The exit action can be implemented in any language e 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 1 Insert parallel branch right con Use this command to insert the contents of the clipboard as right oriented parallel branch of the selected block e For this purpose the selected block must start and end with a step e The contents of the clipboard must also be an SFC block starting and ending with a step 7 8 3 2 Add label to parallel branch on Where an inserted parallel branch is to be given a jump label the transition directly before the inserted parallel branch must be selected e Execute menu command Extras gt Add label to parallel branch e The name Parallel 1 2 etc is assigned and can be edited In the example the nam
9. e The instances described above are always used to call function blocks e Only input and output parameters can be accessed from outside an instance of a function block not its internal variables Example with the help of a data model L_ABS1 L_ABS2 LABS L_ABS nin_a SE nOut_a inina gt lt nOut_a L_ABS3 L_ABSn L_ABS L_ABS Instances L ABS1 L_ ABSn are instances of the function block type L_ ABS Instance as many instances as required DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Introduction Example of access to an input variable The function block fb has an input variable inl of type int PROGRAM prog VAR instelseD END VAR LD 17 ST instl inl CAL instl END PROGRAM e 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 e Access to the instance of a function block is restricted to the organization unit in which it was instanced unless it was globally declared Function blocks should never be globally declared as this would lead to logical errors e The instance name of a function block may be used as input for a function or a function block Counter L_lOParCounterModule bExecute cm nState PROGRAM Counter VAR Tree Counter DINT byAnalogModuleNr END VAR byFunction_CH1 byFunction_CH2 Coun
10. 4063 VAR_IN_OUT parameter lt Name gt of lt Name gt cannot be A bit address is no valid physical address assigned bit addresses Transfer a variable or a direct non bit address 4064 VAR_IN_OUT must not be overwritten in local action call Delete the assignment of the VAR_IN_OUT variables for the local action call 4070 Too deeply nested expression in organization unit Reduce the nesting depth by distributing the expression across several expressions with the help of assignments to intermediate variables 4071 1 Network too large Divide the network into several networks si the network into several networks KANN 100 requires a pointer type You are attempting to r eee TE Tot bean TE PONTET a variable that has not been declared as POINTER TO 4110 lt index gt only allowed for array variables You are using lt index gt for a variable that has not been declared as ARRAY OF 4111 The expression in the index of an array must have an Use an expression of the respective type or a type conversion INT type result 4112 Too many array indices Check the number of indices 1 2 or 3 for which the array has been declared and remove the superfluous indices 4113 Insufficient array indices Check the number of indices 1 2 or 3 for which the array has been declared and add the missing indices 4114 Constant index outside array boundaries Ensure that the applied indices range within the array boundaries 4120 A m
11. DDS EN 2 3 8 7 Show Hide Bookmarks efesotomasyon com Lenze 8 4 8 8 Drive PLC Developer Studio Resources 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 Controller operation is based on codes Field bus profiles parameterization programs operation and display tools use these codes to process the data stored in the controller The Parameter Manager of the Drive PLC Developer Studio is a tool for linking codes and variables and accessing variables via codes User codes and codes of the Lenze function blocks can be managed by means of the Parameter Manager Parameter Manager The user writes his IEC 61131 3 program using the Drive PLC Developer Studio and assigns a code to specific variables to parameterize the program for diagnostics or to exchange data via fieldbus system bus in online operation e Variables of type VAR_IN OUT and variables within a type VAR function block cannot be assigned codes Example Lenze function block L_PT1_ nDelayTime L_PT1_ I I I v nin_a nOut_a I I rosi T_T Tac e Tip
12. 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 Q thus has a rising edge when the time set in milliseconds in PT has expired Graphic representation of TON s time sequence t0 PT tl t4 PT th PT t A 0 t0 tl t2 ti td th TONInsSt TON CAL TONInst IN VarBOOLil PT T 5s TONInst LD TONInst 0Q TOR ST VarBOOL2 VarBOOL1 TIN a VarB00L2 THHS4PT ET TONInst IN VarBOOL1 PT T 5s VarBOOL2 TONInst Q Lenze DDS EN 2 3 14 17 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Standard functions 14 7 3 TOF Timer off delay TOF IN PT Q ET means e IN and PT are input variables of type BOOL or TIME e Qand ET are output variables of type BOOL or TIME e Assoonas INis FALSE ET will count the time in milliseconds until the value equals that in PT and then remain the same e QIS FALSEif IN is FALSE and ET equals PT Otherwise Q returns TRUE Q thus has a falling edge when the time set in milliseconds in PT has expired Grap
13. Lenze efesotomasyon com Lenze 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 an assignment ismade between code value and scaled variable value used in the program Scaling uses a line equation whose gradient and zero point are determined by the specified four factors The line equation is Codest Max Codest Min Variable value m Code value Code Max Int Max Example e The code limits are to be between 100 e The variable limits are to be between 16384 integer e Calculate the variable value at a set code value of 50 _ 16384 16384 100 100 Variable value m 50 100 16384 8192 At acode value of 50 the variable value is 8192 This calculation shows that it is possible to enter an external code value of 50 while calculating internally with the variable value 8192 Thus the value was scaled by 50 to 8192 Scale function Scale functions can be inserted for POUs as optional subprograms IEC 61131 3 program Such a program can be used to program a complex scaling of a variable with an ass
14. The information is saved together with the project Common This is where those directories can be entered that the DDS will search for libraries and configuration files 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 For library and configuration files the system allows the input of several paths each separated by a semicolon The information will be written to the program system ini file and apply for all projects Automation system This is where the directories for libraries and configuration files are shown that are set in the automation system through specification in the target file for example These windows cannot be edited An entry can be selected and copied DDS searches follow a sequence of project automation system and common Where identically named files exist that in the previously searched directory will be applied DDS EN 2 3 5 11 Show Hide Bookmarks Options log efesotomasyon com Lenze Drive PLC Developer Studio Working area Category ca T Directory for project logs Sar C Programme Lenze DDS_P_2_00 Log ni Colors Directories Maximum Bie oe log oe 50 Online sessions Build Passwords Macros MW Activate logging GDC Device Description Filter M User actions tatus changes ae M Exceptions
15. Working with projects and objects Breakpoint on off Icon Menu Online Breakpoint on off Keyboard lt F9 gt Use this command to set a breakpoint at the current position in the active window e Breakpoints can also be set by clicking the line number field e lf the current position is already occupied by a breakpoint this breakpoint will be removed e Aset breakpoint is identified with a line number network number field or step with a light blue background colour e fa breakpoint is reached during program processing the program stops and the associated field is displayed with a red background colour e Use the following commands to continue the program Online Start Online Single step in or Online Single step over e Breakpoints can also be set and removed with the menu command Online Breakpoint dialog Warning If program processing is stopped as a consequence of a breakpoint the behaviour defined under Project gt Exception handling will take effect for the control The positions where a breakpoint can be set depend on the editor IL ST In the text editors IL ST breakpoints will be set to the line with the cursor if this line is a breakpoint position indicated by the dark grey line number field e Anotheroption to set or remove a breakpoint is to click the line number field FBD LD In the FBD and LD editors breakpoints will be set to the currently selected network e Anotheroption to set or remove a
16. roup 9 2 roupino adder diagram LD 4 2 anguage 5 9 9 1 L elp Manager 7 6 Dv Ve DI ta oO CO csfc lib 8 4 enze9300Servo lib 8 43 enzeDrive lib 8 4 enzeElectricalShaft lib 8 4 ess than 12 1 mM 3 T ep D Dm el ol S 1 on oO PTE Q D C2 7 O D Q QQ tor O 3 N 2 I L C 61131 4 1 E i Din out pin 5 ess than or equal to 12 11 nitialization values 8 4 out 7 32 7 44 9 16 ext for tool tip 9 1 ibraries 2 8 imitation 12 9 5 D 2 ek 5 o_o N oad 6 32 oad amp Save 5 6 oad log 6 4 oad watch list 8 3 ocal gateway 6 38 nput and output variables 7 1 nput variables 7 1 nputs outputs 13 5 sert 7 3 7 34 nsert after 7 59 nsert at organization unit 7 3 ocal variables 7 1 nsert element 8 24 nsert library 8 42 nsert object 6 26 O on Ni ee _ A oO P A A lt og J og in 6 32 nsert parallel branch right 7 59 og menu 6 4 mm sert program call 8 34 nsert task 8 33 nserting new variable into the declaration table 7 18 ogarithm 14 og out 6 32 og window 6 42 Lenze DDS EN 2 3 16 3 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Index Derand 7 22 perator 7 22 7 31 7 39 7 44 Derators 4 2 11 acro 7 9 acro 7 5 ark 5 8 ark all 7 46 tions 7 62 ption
17. 13 46 33 gt lt 27 05 02 13 46 33 gt Einloggen gt Projekt nicht korrekt B_ lt 27 05 02 13 46 41 gt lt 27 05 02 14 11 34 gt amp lt 27 05 02 14 16 06 gt lt 27 05 02 14 16 06 gt A lt 27 05 02 14 17 08 gt lt 27 05 02 14 17 15 gt E lt 27 05 02 14 17 19 gt lt 27 05 02 14 17 19 gt E 4 lt 27 05 02 14 17 52 gt lt 27 05 02 14 17 52 gt A lt 27 05 02 14 18 22 gt lt 27 05 02 17 11 56 gt 4 lt 29 05 02 10 34 01 gt lt 28 05 02 10 34 01 gt FB 4 lt 26 05 02 10 34 43 gt lt 28 05 02 10 49 26 gt Category Description Info System time Relative time Duration Information on the log window e Inthe title bar appears the file name of the currently displayed log Should this be the log of the current project the upper section of the dialog box displays Internal e The entries are shown in the window The latest entry is attached at the bottom e The display includes only the actions of those categories that are activated in menu Project gt Options category Log group field Filter with a Y e Below the log window appears the information available for the selected entry e Under Project gt Options category Log the log can be activated or deactivated with the check box Activate logging Category The log entry consists of four categories Fi User action a The user performed an online action Internal action An action was
18. 4 The dialog box New POU already displays the name of the first organization unit as PLC PRG do not change name and type of the organization unit Program Name of the new POU PLC_PRG Type of the POU Language of the POU Cancel Program C IL C Function Block Function C FBD Return Type fe SFC Ro CT Jee 3 2 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Program example Tip Only the organization unit named PLC_PRG of type Program willbe processed by the cyclicaltask 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 Now create two further objects in the Object Organizer on tab Organization units with the help of Project gt Object Insert TRAFFICLIGHT type Function block in the language Function block diagram FBD WAIT type Function block in the language Instruction list IL Name of the new POU TRAFFICLIGHT Type of the POU m Language of the POU Cancel C Program C IL Function Block CLD Function FBD Name of the new POU WAT Return Type C SFC EL fi SI Type of the POU i r Language of the POU Cancel C CFC C Program IL di Function Block LD C Function C FBD Return Type SFC Boo l est C CFC TRAFFICLIGHT In the organization unit TRAFFICLIGHT the indi
19. M Internal actions 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 The log is automatically stored as a binary file when the project is saved Option Directory for project logs offers the option of saving the log in a different directory The log is automatically given the name of the project and an extension log Use Maximum project log size to define the maximum number of online sessions to be logged If this number is exceeded during logging the latest input will delete the earliest one The log function can be switched on and off in the check box Activate logging Use the group field Filter to select the actions to be logged e User action e Internal action e Status change e Exception Only the actions of the selected categories will be displayed in the log window or written to the log DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Options Build Lenze Drive PLC Developer Studio Working area Options EI Category Load amp Save OK n Information Wi Debuagina Number of data E REC itor E o da Desktop Replace constants Cancel Colors V Nest
20. NE Not equal to A Boolean operator with the result TRUE if the operands are not equal to each other i de dee IL LD 40 Varl 40 lt gt 40 NE 40 40 Yarl 40 ST Varli Varl FALSE DDS EN 2 3 12 11 Show Hide Bookmarks efesotomasyon com Lenze 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 12 6 2 Contents operator A pointer is de referenced by means of the contents operator behind the pointer identifier pt POINTER TO INT pe POINTER TO INT var int1 INT var_int1 INT vat 1nt2 INT var 1ht2 INT Implementation Implementation var intl pt ADR var_int1 7 var_int2 pt 12 7 Call operator 12 7 1 CAL Calling up a function block CAL is used to call up the instance of a function block in IL The name of the instance of a function block is followed by the assignment of the input variables of the function block in parentheses Example Calling up the instance Inst of a function block with the input variables pari par2 set to 0 or TRUE CAL INST PAR1 0 PAR2 TRUE 12 12 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Operators 12 8 Assignment operator 12 8 1 MOVE Assignment operator The MOVE comman
21. SE Parameter d of function lt Name gt Use an intermediate variable The result of an IEC function cannot be transferred to a C Transfer the result of an IEC function to the variable function as string parameter 3160 Cannot open library file lt Name gt The file lt Name gt required for a library cannot be found 3161 Library lt Name gt contains no code segment An obj file of a library must contain at least one C function Insert a dummy function into the obj file that is not defined in the lib file 3162 Cannot resolve reference in library lt Name gt Icon The obj file contains an irresolvable reference to another icon lt Name gt Class lt Name gt Type lt Name gt Check the C compiler settings Go Go Q Q Lenze DDS EN 2 3 15 11 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Appendix Possible remedy Unknown reference type in library lt Name gt The obj file contains a reference type the code generator cannot resolve Icon lt Name gt Class lt Name gt Type lt Name gt Check the C compiler settings lt Name gt d Logical expression too complex The temporary memory of the automation system is insufficient to cope with the size of the expression Divide the expression into several part expressions with assignments to intermediate variables lt Name gt lt Network gt A network may return a maximum Internal jumps cannot be resolve
22. SSS in Minimum ruber of dae SSCS SS CC i frorong ni vere SSS Format for polarity free integers Formatted text display starts with If the character is to be included in the display for specific reasons the first characters must be Displayisleft aligned Leading zero for hexadecimal and octal representation b Display field minimum width sn Minimum number of display digits a puumber decimo TTT o aowe SSCS DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Visualization Format for floating point numbers 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 Leading zero for hexadecimal and octal representation Display field minimum width Digits after the point preset 6 Only one of the characters listed below appears at the end of the formatted text Program example The following program example illustrates how a Formatted number output is represented in the DDS e Variables are declared and instructions written in the first step Wi count PRG ST BEE 0001 PROGRAM count counter DINT amount REAL 1 e Then visualization is established with the help of two rectangles Element 0 is to be configured as follows For element 1 the only input needs to be made in category Variables in Text display text
23. e Datatypes e Call trees of organization units and data types e Visualizations e Resources global variables variable configuration PLC configuration task configuration Watch and Receipt Manager e Cross reference list e Table listing the codes assigned via the Parameter Manager Documentation of Call up trees and Cross reference list requires an error free project compile DDS EN 2 3 6 13 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Working with projects and objects Command selection opens a dialog box to select the objects to be printed Document Project Ed H test pro i Project information i l Cancel Contents of Documentation EI cm POL eeu LC_PAG PRG D Resources E Global Variables amp Global_ ariables amp Variable_Configuration VAR_CONFIG H E library LenzeDrive lib 27 6 02 12 55 22 global variables H E library Standard lib 25 3 02 11 07 46 global variables Code initialisation values Instance parameter manager Type parameter manager FEE PLC Configuration ra Process Mirror ma 4 Task configuration R Watch and Receipt Manager e Make your selection and click OK e The dialog box Print is opened e The layout of the pages to be printed can be defined under File Documentation setup 6 1 2 8 Export Menu Project Export Keyboard The DDS offers the option of exporting and importing
24. ral actual Invalid actual operand Tak ester eek Se asso the function block interface incorrect or has no parameters ignore the message in the latter case No jump label No jump label defined 33 amp amp lt The target of a jump has not been The target of a jump has not been specified 3 4426 a rmmpimtip unit has no valid STEP5 name such as PB10 WEI NSD I the organization unit name for example 4427 No timer type specified Insert a timer declaration into the global variable list 4428 Maximum STEP5 7 parenthesis nesting depth exceeded No more than seven left parentheses may be used 4429 Error in formal parameter name The parameter name must not be longer than four characters 4430 Formal parameter type cannot be converted to IEC Timers counters and organization units cannot be converted as formal parameters to IEC 61131 3 4431 Too many VAR_OUTPUT parameters for a call in STEP5 7 IL An organization unit must not contain in excess of sixteen formal parameters as outputs 15 18 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Appendix Possible remedy 4432 Jump labels in the middle of an expression are not allowed IEC 61131 3 specifies exact jump label positions 4434 Too many labels An organization unit must not contain in excess of 100 labels 4435 No further connection after jump call A jump or call must be followed by a loa
25. 40 ms and in an INTERVAL task runtime 3 ms e The process image for analog input 1 is now updated every 3 ms The cyclical task receives an updated value every 3 ms during processing 40 ms Lenze DDS EN 2 3 8 21 Show Hide Bookmarks efesotomasyon com Lenze 8 22 Drive PLC Developer Studio Resources Tip Note that data inconsistencies may occur if analog input 1 is used several times within the cyclical task e Asthe 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 e f system organization units are used in one event controlled task only their process image will be generated in the event controlled task e lfthe same system organization units that are not also used in a time controlled task are used in two event controlled tasks their process image will be generated in the cyclical task Tip For further information about tasks refer chapter 8 8 Task configuration Interrupt controlled task e f system organization units are used in one event controlled task only their process image will be generated in the event controlled task e lfthe same system organization units that are not also used in a time controlled task are used in an event controlled and an interrupt controlled task their process image will be created in the cyclical task DDS EN 2 3 Lenze Show Hide Book
26. 7 8 4 1 7 8 5 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors Commands in the Project menu Add action Menu Project Add 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 e Select the action name and the language to be used to implement the action from the dialog box displayed after command selection The new action will be added under its SFC organization unit in the Object Organizer and a plus sign will appear in front of the SFC organization unit e Click the plus sign to display all action objects A minus sign will appear in front of the organization unit e Click the minus sign to hide the actions again and to return the plus sign Tip The shortcut menu commandsExpand node and Minimize node can also be used to display or hide the objects Double clicking the action or pressing lt Enter gt loads the action into the editor SFC flags So called SFC flags will be set if a step in SFC is active longer than specified in its attributes The user can define more variables to control the sequential function chart Before SFC flags can be used they must be declared The declaration may be global or local as output or input variable SFCEnableLimit e Variable is of type BOOL e lf this variable is TRUE step timeouts will be registered inSFC
27. Arrange topologically Use this command to arrange the selected elements in topological sequence in the CFC editor Elements are arranged in topological sequence if they are processed from left to right and from top to bottom i e with topologically arranged elements the number increases from left to right and from top to bottom Only the element position is relevant in this case not the connections Procedure 1 All selected elements are taken out of the sequential function chart 2 The residual sequential function chart is updated to reflect consistent numbering 3 The selected elements are then reinserted individually into the residual sequential function chart from bottom right to top left Every selected element is inserted into the sequential function chart with the sequence number of the topological descendant increasing the sequence numbers of all topological descendants by one gt Program example Elements E1 E2 and E3 are to be arranged topologically All selected elements are removed from the sequential function chart The residual sequential function chart is then updated to reflect consistent numbering The selected elements are then reinserted into the residual sequential function chart individually from bottom right to top left Element E3 will be inserted first with the sequence number of the topological descendant E5 increasing the sequence numbers of all topological descendants E5 E6 by 1 Element E
28. 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 If a function block variable is selected in the watch list the associated shortcut menu is extended by the two menu items Open function block and Open instance To enter new variables switch the display off using the command Extras Monitoring active After the variables have been entered the display can be activated again with the same command If constant values were assigned to variables in offline mode these values can be written to the variables using the command Extras gt Write receipt Extras Read receipt replaces the pre assignment of a variable with the current variable value Command overview New watch list Icon Menu Insert gt New watch list Keyboard Use this command to insert a new watch list in the Watch and Receipt Manager e Enter the required name of the watch list into the dialog box Rename watch list Icon Menu Extras Rename watch list Keyboard Use this command to change the name of a watch list in the Watch and Receipt Manager e Enterthe new name of the watch list into the dialog box Save watch list Icon Menu Extras Save watch list Keyboard Use this command to save a watch list Selection of the command opens the dialog box Save as e Use the input field File name to enter a new file name e The extension wtc is already spec
29. Confirm Password Cancel XXXXXX Lenze DDS EN 2 3 6 21 Show Hide Bookmarks efesotomasyon com Lenze 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 e Retype both entries to ensure that the dialog box closes without any error messages If necessary assign a password for the next group only then by requesting the command again Tip Use the command Object Access rights to assign rights for individual or all objects 6 1 3 2 Exception handling Use this command to open the dialog box Exception handling where the watchdog time for the cyclical task and the general response of the selected automation system during a task overflow can be defined The layout of the dialog box Exception handling depends on the settings of the automation system 08 38 Servo PLC Automation system with drive function Action if breakpoint or task overrun Action of target device C QSP ci Trip Cink C Waming Digital Outputs Cancel C aesettoLOW are not changed Watchdog time cyclic task Watchdog time T 1ms T 10
30. DDS EN 2 3 14 5 Show Hide Bookmarks efesotomasyon com Lenze 14 2 6 14 2 7 14 2 8 14 2 9 14 2 10 14 6 Drive PLC Developer Studio IEC 61131 3 Standard functions SIN Returns the sine of a number in radians COS Returns the cosine of a number in radians TAN Returns the tangent of a number in radians LD 0 5 q TAN 0 5 TAN ST q q 0 5463024 ASIN Returns the arc sine inversion of sine of a number in radians ACOS Returns the arc cosine inversion of cosine of a number in radians DDS EN 2 3 Lenze Show Hide Bookmarks 14 2 11 14 2 12 14 3 14 3 1 14 3 2 Lenze efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Standard functions ATAN Returns the arc tangent inversion of tangent of a number in radians EXPT Exponentiation of one variable with another OUT IN11N2 e out is of type REAL e ini and 1n2 can be of type BYTE WORD DWORD INT DINT REAL STRING functions Note The permissible string length is dependent on the applied automation system If the length is exceeded an error message will be displayed in online mode LEN Returns the length of a string e STR is of type STRING the return value of the function type INT IL LD SUSI Varl LEN SUSI LEN LEN SUSI Var ST Varl Varl 4 LEFT Returns a left start string of a string e STRisoftype STRING SIZE of type INT the
31. Either all elements of an array are initialized or none Examples of array initializations arrl 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 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 STRUCT STRUCT p1 INT p2 INT p3 DWORD END STRUCT ARRAY 1 3 OF STRUCT1 p1 1 p2 10 p3 4723 pl 2 p2 0 p3 299 plr 14 p2 5 p3 112 Elements without pre assigned values are initialized with the basic type s default initial value In the above example the elements anarray 6 to anarray 10 are therefore initialized with 0 Tip The function CheckBoundsinlibrary CheckBounds lib may be used to automatically check whether an array exceeds its limits Also note CheckBounds lib Library CheckBounds lib The library CheckBounds contains the global variable g_bErrorCheckBounds e Open the library management with Window Library Manager e Insert the library from the library folder Via the menu command Insert gt Additional Library you can select the library and insert it into the actual project e Select the library in the library management On the index card Global Variables the variable and additional information are listed Note The global variable g_ bErrorCheckBounds monitors accesses to an array that is not within the defined limits The functi
32. Log Save Keyboard This command can be selected only if the project log is displayed and can be used to save a project log extract into an external file The sessions must be selected to be saved Pressing OK returns the standard Windows file save dialog Display project log con This command can be selected only if an external log is currently displayed and switches the display back to the project log Saving the project log The project log is automatically saved in a binary file projectname log independently of a log save to an external file Use menu command Project gt Options category Log to specify a save path If no path is specified the log will be saved in the same directory that already stores the project Use menu command Project gt Options category Log to specify the number of online sessions via text field Maximum project log size If the number is exceeded the earlier ones will be removed in favour of the later ones in accordance with the first in first out principle DDS EN 2 3 6 43 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Working with projects and objects 6 44 DDS EN 2 3 Lenze Show Hide Bookmarks 7 1 7 1 1 1 7 1 1 2 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors Editors 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
33. Organization units variables or data types are put into a hierarchical sequence This is possible for e Standard programs e Standard functions e Standard function blocks e Standard types e Defined programs e Defined functions e Defined function blocks e Global variables e Local variables e Defined types e Watch variables Lenze DDS EN 2 3 7 7 Show Hide Bookmarks efesotomasyon com Lenze 7 1 1 11 7 1 1 12 7 8 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 e Inst_TRET e Inst_IPIN Inst_TP can be expanded like an Explorer directory With arguments If the check box is selected the instance name and the input parameters of the function block will be inserted for the ST and IL text languages and in task configuration Selection of Inst DeclarationInst TON inserts Inst IN PT Q gt ET gt Assign function block inputs gt Assign function block outputs lf the check box is not selected only the instance name will be inserted In general only the instance name will
34. Single step over A Menu Online Single step over Keyboard lt F10 gt ee Use this command to execute a single step In the case of organization unit calls the program will only be stopped after the step has been processed e SFC processes complete actions If the current instruction is a function or function block call the function or function block will be executed completely Use the command Online Single step into go to the first instruction of a called function or function block On reaching the last instruction the program continues with the next instruction of the calling organization unit Single step in Menu Online Single step in Keyboard lt F8 gt Use this command to process a single step In the case of organization unit calls the program stops before the first instruction of the organization unit is executed e lf appropriate the process will switch to a called organization unit If the current position is a function or function block call the command is passed on to the first instruction of the called organization unit In all other situations the command behaves exactly like the command Online Single step over DDS EN 2 3 6 35 Show Hide Bookmarks efesotomasyon com Lenze n O 6 3 1 13 6 3 1 14 6 36 Drive PLC Developer Studio Working with projects and objects Single cycle Menu Online Single cycle Keyboard lt Ctrl gt lt F5 gt Use this command to execute a
35. Tip The dialog box can also be opened by double clicking an element available for rectangle rounded rectangle ellipse Use Extras Configure category Form to assign the shape Rectangle Rounded rectangle or Ellipse to the selected element e Thedefined size remains unaffected available for all Use Extras Configure category Text to assign a text to the selected element This text will be entered directly or substituted by a placeholder Contents Use the input field Contents for text entry lt Ctrl gt lt Return gt generates a line break lt Ctrl gt lt Tab gt generates tab stops e Anentryof S means that this text is substituted in online mode by the value of the variable from text field Text output in the category Variables DDS EN 2 3 9 11 Show Hide Bookmarks efesotomasyon com Lenze 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 Font Click Font to open the dialog box Font and select the font for the text Standard font Click Standard font to use the font selected under Project Options
36. Tox D001 FUNCTION BLOCK TRAFFICLIGHT 000A VAR_IMPLUT 0003 STATE INT f e 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 Select Insert gt Operator 19 Click AND and change the text to OR 20 Click behind the OR box to select the output 21 Select Insert gt Assignment 22 Change the text at the output to AMBER 23 Select the upper input of the OR box and then Insert gt Operator to insert another operator before the selected input TRAFFICLIGHT FB FBD ToT x 0001 FUNCTION_BLOCK TRAFFICLIGHT CS 0002 VAR_INPUT 0003 STATE INT 4 CE Lenze DDS EN 2 3 3 5 efesotomasyon com Lenze Drive PLC Developer Studio Program example 24 Use the above procedures and commands to complete the organization unit as follows si TRAFFICLIGHT FB FBD 0001 FUNCTION_BLOCK TRAFFICLIGHT 0002 VAR_INPUT 0003 STATE INT 4 0001 v 4 gt 0002 EQ STATE YELLOW 2 Sessesseseseod 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
37. a INT flag noread flag noread on b INT flag noread nowrite a INT END VAR flag noread nowrite on Variables a and b are not exported into the icon file flag noread nowrite on VAR flag noread nowrite on a INT a INT b INT b INT END VAR flag off flag off END VAR The pragma is inherited by the subordinate variable declarations a afb FUNKTION BLOCK afB VAR b bfb flag nowrite Gs INT END VAR FUNKTION BLOCK bfB VAR d INT flag noread e INT flag nowrite END VAR a b d is not exported a b e is exported with read access only a c is exported with read and write access Lenze DDS EN 2 3 7 21 Show Hide Bookmarks 7 3 7 3 1 7 3 1 1 7 3 1 2 7 3 1 3 7 22 efesotomasyon com Lenze Drive PLC Developer Studio Editors 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 WAIT FB IL 0001 FUNCTION_BLOCK WAIT 000A VAR_INPUT 0003 SETTIME TIME 0004 END_VAR 0005 VAR_OUTPUT _ LD DELAY Q JMPC post CAL DELAY IN FALSE LD SETTIME ST DELAY PT CAL DELAY IN TRUE JMP end Commands in the Insert menu Operator Icon Menu Insert Operator Keyboard Use this command to display all operators available in the current language in a dialog box e Select one of the o
38. be processed in parallel The step after the parallel end line will become active if all preceding steps are active and the transition condition before this step is TRUE Jump A jump is aconnection to the step whose name appears underneath the jump icon Jumps are necessary because upward or intersecting connections are not allowed DDS EN 2 3 4 17 Show Hide Bookmarks efesotomasyon com Lenze 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 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 fh1 fh2 O TOF TON RN 0 Not fe ia is Lenze DDS EN 2 3 4 19 Show Hide Bookmarks efesotomasyon com Lenze 4 7 4 7 1 4 7 2 4 20 Drive PLC Developer Studio Programming languages Ladder diagram LD The Ladder Diagram is a graphically oriented programming language which is s
39. e lf the font is changed under Project Options this change will affect all elements that were not explicitly assigned another font via button Font Configure Line width available for all Use Extras Configure category Line width to modify the line widths of the selected objects Configure Colours available for rectangle rounded rectangle ellipse Use Extras Configure category Colours to assign original colours and signal colours for fill and frame to the selected element e fa Boolean variable is entered under category Variables field Change colour the element will be displayed in the set colour as long as the variable is FALSE If the variable is TRUE the element will be displayed in signal colour Tip The Change colour function is active only if the control is in online mode or simulation e Click Inside or Frame to open the dialog box Colours and select the associated colour Configure Motion absolute available for all Use Extras Configure category Motion absoluteto define amotion dependenton variable values for the selected element Tip To enter variables use the Help Manager lt F2 gt X offset Y offset Use the input fields X offset Y offset to enter variables whose values effect motion of the element in X or Y direction DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Visualization Scaling Use the input field Scaling to enter a variable to
40. fajump ora RETURN is selected the input of this jump or RETURN will be negated A negation can be deleted by another negation Set Reset Icon 5 Menu Extras Set Reset Keyboard lt Ctrl gt lt T gt R Use this command to define outputs as Set or Reset outputs in the CFC editor The input of a Set output is identified with an S the input of a Reset output with an R e A Set output is set to TRUE if its input returns TRUE The output now retains this value even if its input status changes to FALSE e A Reset output is set to FALSE if its input returns TRUE The output now retains this value even if its input status changes to FALSE If the command is executed more than once the output changes between Set Reset and normal output Mark all Icon En Menu Extras Mark all Keyboard lt Ctrl gt lt I gt This command marks all objects blocks instructions in the active CFC editor The marked objects can be edited simultaneously Cut Undo Shift For this purpose an object must be clicked with the left mouse key All objects can be shifted simultaneously Negations For objects with inputs negations are created etc EN ENO Icon ER Menu Extras EN ENO Keyboard lt Ctrl gt lt l gt Use thiscommand to extend a box selected in the CFC editor by an additional enable input EN and an enable output ENO for BOOL type variables e A box with EN input ENO output will only be executed if the EN input returns
41. lt instructions gt will be repeated endlessly forcing a runtime error Example REPEAT Varl Varl 2 Counter Counter 1 UNTIL Counter 0 END REPEAT 4 3 12 EXIT instruction lf the EXIT instruction is part of a FOR WHILE Or REPEAT loop the loop will be terminated irrespective of the cancel condition In nested loops EXIT terminates the innermost loop 4 10 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 nent 4 4 1 Step An organization unit written in SFC consists of a sequence of steps that are interconnected through transitions There are two different step types e The simplified step consist of an action and a flag to indicate whether the step is active or not A small triangle appears in the top right hand corner of the step to indicate that the action for a step has been implemented e An IEC step consists of a flag and one or more assigned actions or Boolean variables The associated actions appear to the right of the step 4 4 2 Action An action may contain a sequence of instructions in IL CFC or ST a number of networks in FBD or LD or another sequence structure SFC e Simplified steps always have an
42. 3 Not every STEP 5 7 command can be converted to IEC 61131 3 such as CPU commands like MAS for example 4404 STEP5 7 operand invalid or inconvertible to IEC 61131 3 Not every STEP5 7 operand can be converted to IEC 61131 3 or one operand missing 4405 Reset of a STEP5 7 timer cannot be converted to The associated IEC timers have no Reset input IEC 61131 3 4406 STEP5 7 counter constant too high max 999 No valid No valid BCD coded counter constant in accumulator coded counter constant in accumulator 4407 STEP5 7 instruction cannot be converted to IEC 61131 3 Not every EC TTT instruction can be converted to IEC 61131 3 such as DUF for example 4408 Bit access to timer counter words cannot be converted to Specific timer counter commands cannot be converted to IEC 61131 3 IEC 61131 3 4409 Accu or Accu2 contents undefined cannot be A command linking the two accumulators cannot be converted as the accumulator contents converted to IEC 61131 3 are not known 4410 Called organization unit not in project Import the called organization unit 4411 Errorin global variable list Check the Check the SEQ file file 4472 Internal error no 11 Contact the control manufacturer TTT The symbolic name of an extended function block is missing from the original S5D file Complete the comment with The symbolic name of an extended function block is too long Check the function blocks Check the Tuncion boks S
43. 4 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Index Select background bitmap 9 1 Select document template 8 Select PLC 3 2 Selecting objects 6 24 Selection mode 9 2 Send back by one 7 52 Sequential Function Chart SFC 4 1 Set Reset 7 33 7 40 7 46 Setting a breakpoint 6 3 Pulse encoder 14 16 Settings 9 1 SFCCurrentStep 7 64 SFCEnableLimit 7 63 SFCError 7 64 SFCErrorPOU 7 64 SFCErrorStep 7 64 SFCInit 7 63 SFCPause 7 64 SFCQuitError 7 64 SFCTrans 7 64 Shifting bits to the left 12 6 Shifting bits to the right 12 6 Signal colour 9 18 Simulation 2 1 2 10 6 3 Sine 14 6 Read receipt 8 3 Rectangle 9 2 Redo 7 Remote gateway 6 38 Rename object 6 2 Rename watch list 8 36 Replace 7 Replace element 8 2 Resources 2 8 Retentive constants 7 1 Retentive global constants 8 2 Retentive global variables 8 2 Retentive variables 7 1 Return 7 31 7 38 7 45 Rising edge detector 14 12 Rotating bits to the left 12 6 Rotating bits to the right 12 Rounded rectangle 9 2 Single cycle 2 9 6 36 Single step in 6 3 Single step over 6 3 Single step processing 7 65 Single element variables 7 19 s Software semaphore 14 1 Square root 14 5 Standard font 9 12 Standard lib 8 4 Start 6 3 Start string 14 Starting the DDS 3 2 Save 6 2 Save as 6 2 Save log 6 Save watch list
44. 5 0 2 OF DINT enon 0 1 DINT 0 __ Cancel gt 0 2 DINT 0 1 0 DINT 0 1 1 DINT 0 gt 1 2 DINT 0 i 2 0 DINT 0 gt 21 DINT 0 2 2 DINT 0 3 0 DINT 0 gt 3 1 DINT 0 3 2 DINT 0 4 0 DINT 0 4 1 DINT 0 4 2 DINT 0 5 0 DINT 0 51 DINT 0 ca 5 2 DINT 0 Fill Array The initialization dialog for an array lists the array elements A mouse click behind the opens an edit box to enter the initial value The initialization dialog for a structure displays the individual components in a tree diagram where the variable name is followed by component type and default initial value in brackets and an Clicking behind here opens an edit box where the desired initial value may be entered If the component is an ARRAY the initialization dialog can be opened by clicking on the plus sign to enter initial values If the initialization dialog is exited with OK the box nitial value displays the initialization of array or structure in IEC format Example x 5 f1eld 2 3 struct2 s a 2 b 3 Use field Address to bind the variable to be declared to an IEC address AT declaration Use input field Comment to enter information such as changes for example Use lt Ctrl gt lt Enter gt for line breaks Use OK to close the declaration dialog and to accept the en
45. 6 32 Drive PLC Developer Studio Working with projects and objects 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 Commands in the Online menu Log in Icon F Menu Online Log in Keyboard lt Alt gt lt F8 gt Use this command to combine the programming system with the control or start the simulation program and change into online mode e lf the current project has not been compiled since it was opened or since the last change it will be compiled now in accordance with Project gt Compile all Compile errors will prevent the DDS from going into online mode Log in error messages If the error message No connection with the control is displayed check that the automation system set in the automation system settings Resources matches the parameter set in Online Communication parameters check the connection between PC and automation system After a correct log in the status line display will be Online If the error message The program has been changed Do you want to load the new program appears the current project in the editor does not match the program currently loaded into the control or the launched simulation program e Monitoring and debugging are not possible in this case e Select No to log into the control This will no
46. 8 36 Ww D ek I Oo DI x A Saving an event 8 3 d O O C oh Statistics 6 18 Status bar 5 9 Step attributes 7 60 Lenze DDS EN 2 3 16 5 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio L me limit overview 7 6 me controlled task 8 20 14 18 X Y position 9 5 X offset Y offset 9 12 ip variable 9 16 o the background 9 8 o the beginning 7 53 Zoom 7 34 7 55 o the end 7 53 Zoom action transition 7 6 o the foreground 9 8 Zoom to Vis 9 1 Index U Tasks System task 8 28 W ile vertically 5 ime flag 4 13 X Z Zoom action transition 7 60 3 3 CD CD 5 QI DI D S S aa DA Li 16 6 DDS EN 2 3 Lenze
47. A m L Op J J opy object opying with the Ctrl key 9 osine 14 6 ditor 5 lement list 9 8 lement number 9 a n x n ik 3 a NS N an h lipse 9 3 N ENO 7 46 reate backup 5 6 reate document template 8 reate new project 3 2 7 valuating expressions 4 4 VENT 8 29 vent controlled task 8 29 reate organization units 3 2 reate translation file 6 12 reating a channel to the gateway PC 6 4 xception handling 6 22 urve 9 ut 7 2 7 34 clical task 8 29 xclude 6 1 xecute program 9 1 xit 6 8 xpand macro 7 54 xpand node 6 2 US xponential function 14 ata types 2 8 ebugging 2 1 2 9 5 13 eclaration keywords 7 1 xponentiation 14 L xpressions 4 4 eclarations as tables 5 8 7 10 7 18 efault configuration 8 2 EFAULT DFR 6 6 alling edge detector 14 1 efinitions 1 1 elete 7 3 7 34 ind 7 4 elete action transition 7 60 ind next 7 4 elete background bitmap 9 11 elete object 6 26 eleting a breakpoint 6 35 Desktop 5 9 16 2 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Index unction block 2 4 7 23 unction block diagram FBD 4 18 unction block instances 2 4 unction CheckBounds 2 3 DC Device Description 5 16 5 1 lobal constants 8 2 lobal replace 6 19 lobal search 6 18 lobal variables 8 2 reater than 12 1 reater than or equal to 12 11 J rid 9 1
48. Adapt Lenze initaly codes Command execution creates all codes of the function block instance in the Instance Parameter Manager in this example L DIGDEL1 wDelayTime E Instanz Parametermanager Fifa Fa Code Program unit Variable Parametre text Var Type Initialize value Unit Code max Code min i C0720 PL PRG L_DIGDELI byFunction L_DIGDELI Funktion ees e C0721 PLC_PRG L_DIGDEL1 wDelayTime L_DIGDEL1 Verzog UINT 1 000 s 60 000 0 001 I i ___ gt Accessing arrays via subcodes Access to individual array fields by means of codes e g using the Keypad for example is via so called subcodes Subcodes are a code subset of a master code Example C6000 Master code C6000 1 Subcode 1 C6000 2 Subcode 2 C6000 n Subcode n DDS EN 2 3 Lenze Show Hide Bookmarks 8 4 3 7 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Resources Generating subcodes The Parameter Manager can only assign subcodes to variables of the type ARRAY oF Observe the following e Only the master code need be defined The subcodes are generated automatically according to the array length e Subcode 1 is always the first element of the array e Subcodes are set globally through the master code i e each subcode has the same configuration as the master code As this also applies to display texts select a general text to rule out misunderstandings e Use the parameter monitor for ind
49. Bookmarks 7 7 12 6 7 7 12 7 7 7 12 8 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors To the beginning Menu Extras gt Order To the beginning esboar amp _ Use this command to bring all selected elements to the beginning of the sequential function chart in the CFC editor e The sequence among the selected elements remains unchanged e The sequence among the other elements also remains unchanged To the end Icon Menu Extras Order To the end Keyboard Use this command to send all selected elements to the end of the sequential function chart in the CFC editor e The sequence among the selected elements remains unchanged e The sequence among the other elements also remains unchanged Create macro Icon Menu Extras Create Macro Keyboard lt Ctrl gt lt l gt Use this command to group several boxes into one block that can then be named as a macro Macros are duplicated with Copy and Insert Each copy represents a separate macro that can be freely named Macros are no references Connections separated by macros create in or out pins at the macro Connections to inputs create an in pin for example The default name appears in the format In lt n gt next to the created in pin and as Out lt n gt for outputs Any connections affected that featured connectors prior to macro creation are assigned the connector the macro PIN Initially any macro is given the default
50. Developer Studio traffic_lights pro Fite Ecit Project Insert Extras Online Window Help 266 aoaea sale 3 sj PLC_PRG PRG SFC PO x DOOWPROGRAM PLC_PR Pa n WAIT FB IL DOOZVAR DOD FUNCTIOR_BLOCK WAIT Lent TRA mma NT SETTIME Tite SOA WAITTIAWAIT Ssegaleno vae DIG MTer em gee WAIT BOOL DoE VAR_OUTPUT G004 F UNCTION_BLOCK TRAFFICLIGHT tBOOL OK BOOL OO0Z VAR_INPUT e ce a OFF BC COD4 END_VAR LIGHT BOOL O005 VAR_OUTPUT OK BOOL NAF VAR 001 pos To F Crossroads jothek C ProgrammeiLlenzeiDDs _ e E P_2_0 Bibliothek CAProgrammellenze DOS P_ O0 WS008SPLCy20000 LibrariesiECSFC LIB be 147 4 86 Element Rectangle ONLINE OV READ 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 900809080 5 1 1 Menu bar The menu bar is located at the top end of the main window and contains all DDS menu commands Lenze DDS EN 2 3 5 1 Show Hide Bookmarks efesotomasyon com Lenze 5 1 2 5 1 2 1 5 1 3 5 2 Drive PLC Developer Studio Working area Tool bar The tool bar provides for quick access to frequently used menu commands e Click on an icon to execute the underlying command Tip
51. INT 8000 Rs nSetvalue INT 7000 bW eight BOOL bYeight BOOL RI OOOSJEND_VAR END_VAR Copy Icon Menu Project gt Copy Keyboard Use this command to copy objects organization units data types visualizations and resources and links to libraries from other projects into the current project Selection of the command opens the dialog box Copy project 1 Find the project from which you want to copy objects to the current project 2 Click Open to open the project This will open a dialog box for object selection e lf there already exists an object with the same name within the project the name of the new object will be entered with an underscore and a number _1 _2 as the last characters DDS EN 2 3 6 17 Show Hide Bookmarks efesotomasyon com Lenze Working with projects and objects Drive PLC Developer Studio g 6 1 2 12 Project information Menu Project Project information Keyboard Use this command to save information about the project File ampel3 pro Directory CixProgramme Drive PLC Developer Cancel Change date 31 5 02 11 58 57 V2 2 Statistics Title Author Lenze Version Description Statistics Click the button Statistics for statistical information about your project Project Statistics Ei File ampel3 pro Directory C Programme Drive PLC Developer Change date 31 5 02 11 58 57 V2 2 Title Author Lenze Version Stati
52. Icon Menu Insert Parallel branch right Keyboard lt Ctrl gt lt L gt Use this command to insert a parallel branch as right oriented branch to the block selected in the SFC editor e For this purpose the selected block must start and end with a step The new branch then consists of a step e To enable jumps to the created parallel branch it must have a jump label Parallel branch left Icon Menu Insert Parallel branch left Keyboard Use this command to insert a parallel branch as left 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 e To enable jumps to the created parallel branch it must have a jump label Icon L Menu Insert gt Jump Keyboard lt Ctrl gt lt U gt Use this command to insert a jump at the end of the branch of the block selected in the SFC editor For this purpose the branch must be an alternative branch e The jump label Step must be substituted with the name of the destination step Transition jump Icon t Menu Insert gt Transition jump Keyboard Use this command to insert a transition followed by a jump at the end of the branch selected in the SFC editor For this purpose the branch must be a parallel branch e The jump label Step must be substituted with the name of the destination step Add entry action jon Mew msert gt Adid entry action Keyboerd
53. 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 Placeholders are enclosed by the signs The signs must be represented Confirm the dialog with OK e Re mark the rectangle Open the dialog box Placeholder set possible replacements with Extras List of Placeholders complete the dialog box and confirm with OK Placeholder Elementnumber Replacements Ref O PLC_PRG nVari0 PLC_PRG nVar20 Create another visualisation with the name Screen2 The visualisation Screen2 must be active Insert a visualisation reference Execute the menu command Insert Visualisation and draw a rectangle in the visualisation Screen2 The dialog box Select Visualization is displayed Select Screen1 and confirm with OK Mark the entire reference and open the configuration dialog In the category Visualization Screen press the button Placeholder Select PLC_PRG nVar20 from the replacements and confirm with OK In the category Visualization Screen1 only mark the control boxes Isotropic and Clip and confirm with OK Store the program with a suitable name and log in Group Icon Menu Extras Group Keyboard Tip Group allows several elements to be moved simultaneously without affecting the distances in between How to group Select the elements to be grouped Select Extras Group Edit group move delete Once
54. Input EN of the box requires a Boolean input Link the EN input of the organization unit with a valid Boolean expression 4340 4341 2 4343 Constant assignment Impermissible type for parameter You declared input lt name gt of organization unit lt name gt as VAR_INPUT CONSTANT while 4344 4345 lt name gt of lt name gt Cannot convert lt type gt into lt type gt assigning it an expression in the dialog Parameters that is not type compatible 14344 S and R require Boolean operands Insert a valid Boolean expression behind the Set or Reset instruction Impermissible type for parameter lt name gt of lt name gt You assigned an expression to input lt name gt of organization unit lt name gt that is not Cannot convert lt type gt into lt type gt type compatible 4346 An output must not be a constant The target of an assignment must be a variable or direct address with write access 4347 VAR_IN_OUT parameter requires write accessible variable Write accessible variables must be transferred to VAR_IN_OUT parameters as these can be modified within the organization unit 4350 An SFC action cannot be called from outside SFC actions can be called only within the SFC organization unit within which they have been defined 4351 Step name is no permissible identifier lt name gt Rename the step and select a valid identifier for the name 4352 Permissible step name lt name gt followed by in
55. Lenze Drive PLC Developer Studio Contents Lenze DDS EN 2 3 i efesotomasyon com Lenze Drive PLC Developer Studio Contents Il DDS EN 2 3 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Contents Lenze DDS EN 2 3 jii Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Contents DDS EN 2 3 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Contents Lenze DDS EN 2 3 V efesotomasyon com Lenze Drive PLC Developer Studio Contents VI DDS EN 2 3 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Contents Lenze DDS EN 2 3 vii Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Contents viii DDS EN 2 3 Show Hide Bookmarks 1 1 1 1 1 1 2 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Preface and general information Preface and general information 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 The Drive PLC Developer Studio utilizes the powerful IEC language tools offering individual editors for the six IEC 61131 3 languages as well as commissioning support through monitoring and debugging funct
56. 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 e The selection of available functions is dependent on the active window e Tool bar display is optional Project gt Options category Desktop Zoom 200 This zoom function in the tool bar allows zooming within all graphic editors and the visualization Zoom is effective in the active window only The organization units of editors and visualization can be edited more efficiently Object Organizer 3 fx Visualizations Ell ac ES Lights J Global Variables Globale_Variablen A library STANDARD LIB 2 10 99 l p Code initialisation values a E Parameter monitor A Instance parameter manager Type parameter manager ig PLC Configuration a W Process Mirror i ns 4 Task Configuration R Watch and Receipt Manager The Object Organizeris located atthe left hand side of the DDS main window and allows fast access to the four object types e Organization units e Datatypes e Visualizations e Resources Click the associated tab in the Object Organizer to change between the object types or use the left or right arrow key DDS EN 2 3 Lenze Show Hide Bookmarks Lenze efesotomasyon com Lenze Drive PLC Developer Studio Working area Vertical screen
57. Positioning the mouse pointer briefly over a variable in online mode will display a tool tip with the variable s type and any comments Only the variable type is displayed in offline mode DDS EN 2 3 7 19 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Editors 7 2 19 1 Pragma instruction e 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 e This instruction is given in curly brackets and is case insensitive lt Instruction gt e 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 Ignore compiler directive lt instruction text gt e The pragma instruction affects the line in which it occurs or the subsequent ones until it is revoked by another pragma instruction or the same pragma instruction is executed with different parameters The pragma instruction also ends at the end of an implementation a global variable list or a type declaration e The opening bracket may directly follow a variable name Brackets that belong together must be in the same line Pragma instructions must be written in the following syntax flag lt flags gt off on This pragma may influence the properties of a variable declaration lt flags gt may be a combination of the following flags The
58. Rename Once an existing macro has been selected in the macro list it can be renamed via dialog box Name Press the button Rename to rename the macro DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 lt Ctrl gt lt Enter gt 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 Command line commands 2 15 1 Command file commands 15 2 Menu This dialog box defines the menu entry to insert the macro under Edit Macros Place an amp in front of a letter to turn it into a shortcut The name Ma amp cro 1 generates menu entry Macro 1 OK Exits the dialog box and saves the input in the project A macro check will be performed only at the time the menu command is executed Options GDC Device Description Lenze Category Load amp Save i OK User Information Path O Se C Programme Lenze DDS_P_2_00 Projects vi ETOR Colors l Directories Language selection Log Standard language Language One C Language Two Basic language German v GDC Deyice Description MV Build GDC Device Description Use this dialog box to selec
59. Resources Ay Global variables a Global ariables i di ae Globale_ariablen Si fg Globale_ aniablen be variablen Konfiguration VAR_CONFIG i e Variablen_Konfiguration YAR_CONFIG dii Code initialisation values Ma Lode initialisation values Instance parameter manager ae Instance parameter manager si Type parameter manager Type parameter manager E Parameter monitor eo Parameter monitor ae FEE PLC Configuration A PLC Configuration EI Process Mirror laid Process Mirror i in a Target Settings 5 am Target Settings 6 16 DDS EN 2 3 Lenze Show Hide Bookmarks 6 1 2 11 Lenze efesotomasyon com Lenze 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 The following text can appear after the organization units of the current project e Properties modified This text appears after a name of an organization unit if the properties of the organizations unit differ e Access authorizations modified This text appears after an organization unit if the access authorizations differ 0001 PROGRAM PLC_PRG n PROGRAM PLC_PRG a 0003 VAR VAR nSetvalue
60. ST b b FALSE ST b b TRUE LD TRUE STRING TO BOOL ST b b TRUE b BYTE TO BOOL 2 11010101 b TRUE b INT_ TO BOOL 0 b FALSE 2 TIME TO BOOL T 5ms b TRUE STRING TO BOOL TRUE b TRUE BYTE_TO_BOOL 213 b 14 1 4 TIME_TO TIME_OF_DAY Converting from TIME or TIME_OF_DAY to another type Internally the time is saved as a DWORD in milliseconds with TIME OF DAY from 00 00 o clock This value is converted e With type STRING the result is the time constant e Conversion from higher to lower order types may result in information loss LD T 12ms LD T 300000ms LD TOD 00 00 00 012 T IME TO S TRING T IME TO DWORD TOD TO S INT ST str ST dw ST si str TIME TO STRING T 12ms str T 12ms dw TIME TO DWORD T 5m dw 300000 si TOD TO SINT TOD 00 00 00 012 si 12 TIME_TO_D WORD T 5Sm dia Lenze DDS EN 2 3 14 3 Show Hide Bookmarks efesotomasyon com Lenze 14 1 5 14 1 6 14 1 7 14 4 Drive PLC Developer Studio IEC 61131 3 Standard functions DATE_TO DT_TO Converting from tyoe DATE or DATE_AND_TIME to another type Internally the date is saved in a DWORD in seconds since the ist of January 1970 This value is converted e With type STRING the result is a date constant e Conversion from higher to lower order types may result in information loss LD D 1970 01 01 LD D 1970 01 15 LD DT 1970 01 15 05 05 05 DATE TO BO
61. STR2 POS means Insert STR2 into STR1 after the POS th position LD SUSI Vari x INSERT INSERT INSERT XXY 2 IO I SUSI HSTRI Ward Varl SUXYSI 2P08 14 8 DDS EN 2 3 Lenze Show Hide Bookmarks 14 3 7 14 3 8 14 3 9 Lenze efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Standard functions DELETE Deletes a segment from a string from a specific position e STR1 is of type STRING LEN and POS of type INT the return value of the function type STRING e DELETE STR L P means Delete L characters from STR starting with the P th LD SUXYSI Varl DELETE DELETE 2 2 SUXYSI 2 2 ST Var Varl SUSI REPLACE Replaces a segment within a string with another string e STR1 and STR2 are of type STRING LEN and POS of type INT the return value of the function type STRING e REPLACE STR1 STR2 L P means Replace L characters from STR1 with STR2 starting with the P th character LD SUXYSL Varl REPLACE REPLACE K 2 2 SUXYSI K 2 ST Vari Varl SKYSI FIND Looks for a segment within a string e STR1 and STR2 are of type STRING the return value of the function type INT e FIND STR1 STR2 means Find the position of the first character of the first occurrence of STR2 in STR1 e f STR2 does not occur in STR1 the return value will be 0 ST LD SUXYSI Varl FIND SUXYSI XY n FIND XY
62. SUKYSI STR1 Wart ST Varl Varl 3 KY STR2 DDS EN 2 3 14 9 Show Hide Bookmarks efesotomasyon com Lenze 14 4 14 4 1 14 4 2 14 10 Drive PLC Developer Studio IEC 61131 3 Standard functions Bistable function blocks SR Bistable function block dominant set e Q1 SET1 and RESET are of type BOOL e Q1 SR SET1 RESET means Q1 NOT RESET AND Q1 OR SET1 CAL SRInst SET1 VarBOOL1 RESET VarBOOL2 SRinst LD SRInst Q1 SR ST VarBOOL3 VarBOOL1 SETI a VarB00L3 VarBOOL 4RESET SRInst SET1 VarBOOL1 RESET VarBOOL2 VarBOOL3 SRInst Q1 RS Bistable function block dominant reset e Q1 SET and RESET1 are of type BOOL e Q1 RS SET RESET1 means Q1 NOT RESET1 AND Q1 OR SET Declaration RSInst RS IL CAL RSInst SET VarBOOL1 RESET1 VarBOOL2 RSinst LD RSInstc 01 RS ST VarBOOL3 VarBOOL1 SET a VarB00L3 VarBOOL 4RESET1 ST RSInst SET VarBOOL1 RESET1 VarBOOL2 VarBOOL3 s kS Inst O17 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 e f SEMA is called and BUSY is TRUE SEMA has already been assigned SEMA was Called using CLAIM TRUE e lf BUSY is FALSE SEMA has either not been called yet or been enabled call with R
63. The constant s at code address lt 04X 04X gt is above A string constant is above the 16K page limit The system cannot handle this Depending on a 16K page limit the runtime system there may be an option to avoid this from happening by making an input in the target file Contact the control manufacturer 1200 Task s Call of s access variables in the parameter list Variables that are used only for a function block call in the task configuration are not not updated included in the cross reference list 1300 File lt Name gt not found The file referenced by the global variable object does not exist Check the path 1301 Analysis library not found You are using the Analyze function although the library analyzation lib is missing Analysis code not generated Insert the library into the Library Manager 1302 New externally referenced functions inserted Since the last download you have integrated a library with functions that have not been onime orange ts no longer possi treat vet tne une system so athe we project usb cova 1400 Unknown compiler directive lt Name gt is ignored The compiler does not support this pragma S Refer index word Pragma for supported directives 1401 The structure lt Name gt contains no elements The structure contains no elements although variables of this type take up 1 Byte memory 1500 This expression contains no assignment The result of this expression is not used so that no code is generated
64. a programming language to describe sequential and parallel control processes with time and event control Boolean variable or instructions which can be controlled through an action block in SFC Activation description of actions in SFC Intermediate result in IL of any data type Instruction List nstruction List IL is a common programming language for PLC systems similar to Assembler Abbreviation for Sequential Function Chart Abbreviation for Instruction List Sub program unit which is part of a PLC program Often organization units can be loaded into the PLC independently of each other Compare POU Central processing unit Central Processing Unit of e g a PLC Indication of variables and FB instances in a declaration block by also indicating the identifier data type and FB type as well as initial values ranges and field features Summary of declarations for a variable type at the beginning of a POU A standard data type predefined by IEC 61131 3 A function can have a variable number of inputs Abbreviation for Function Block Function Block often function blocks are also called Function organization units See Instance Name of a function block with request interface Function Block Diagram see Function Block Diagram A POU of type Function See Function block A POU of type Function Block The Function Block Diagram Function Block Diagram consists of a list of networks which enable the user to create gra
65. action linked to the step e Actions can be edited by double clicking the step linked to the action or selecting the step before executing menu command Extras Zoom action transition Furthermore the configuration allows one entry and or one exit action per step e Inthe Object Organizer actions of IEC steps are grouped directly underneath their SFC Organization unit and can be loaded into the editor with a double click or pressing the lt Enter gt key New actions can be generated with Project Add action Lenze DDS EN 2 3 4 11 efesotomasyon com Lenze 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 e Anentry action is executed once only immediately after the step has been activated e Anexit action is executed once only before the step is deactivated e Entry and exit actions can be implemented in any language A step with entry action is identified with an E in the bottom left hand corner the exit action with an X in the bottom right hand corner e Double click the respective corner in the step to edit an entry or exit action Example of a step with entry and exit actions Parameter_Data Action Parameter_Data Entry ST parameter_setting PRG SFC Fife Action Parameter_Data Exit ST parameter_setting PRG SFC Piel EG DOD1 jOParPD015 bExecute TRUE 0001 OParPDO15 bExecute FA
66. al JMPC posi B CAL DELAY IN FALSE LD SETTIME SETTIME ST DELAY PT DELAY PT CAL DELAY IN TRUE JMP end 44 LL dd Instruction list editor The following breakpoint positions are possible in the instruction list editor e At the beginning of an organization unit e On every LD LDN or if an LD is set directly behind a label on this label e At every JMP JMPC JMPCN e At every label e At every CAL CALC CALCN e At every RET RETC RETCN e At the end of the organization unit 7 24 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Editors Structured text editor The following breakpoint positions are possible in the Structured text editor e At every assignment e At every RETURN and EXIT instruction e In lines where conditions are evaluated WHILE IF REPEAT e 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 e The line number field of the line where processing has stopped is shown in red e User program processing is stopped in the control Click Online Start to continue the program after a stop caused by a breakpoint Click Online Single step over or Online Single step in to continue the program to the next breakpoint position e lf the instruction where the program stopped is a CAL command or if the lin
67. as a consequence of the optimized processing procedure within the FBD 12 2 3 XOR Bit by bit XOR of bit operands IL Varl BYTE FBD 2 1001_0011 Yarl LD 2 1001 0011 S 0001010 XOR 2 1000 1010 ST Vari Varl 2 0001 1001 ST Varl 2 1001_0011 XOR 2 1000 1010 12 2 4 NOT Bit by bit inversion of a bit operand The operand should be of type BOOL BYTE WORD or DWORD IL Vari BYTE FBD LD 2 1001_0011 2 1001_0011 Var NOT ST Varl Result 2 0110 1100 ST Vari NOT 2 1001 0011 Lenze DDS EN 2 3 12 5 Show Hide Bookmarks efesotomasyon com Lenze 12 3 12 3 1 12 3 2 12 3 3 12 6 Drive PLC Developer Studio IEC 61131 3 Operators Bit shift operators Types The operands of the following bit shift operators should be of type BYTE WORD or DWORD SHL Shifting the bits of an operand to the left IN is shifted to the left by n bits and padded with zeros from the right SHR Shifting the bits of an operand to the right IN is shifted to the right by x bits and padded with zeros from the left ROL Rotating the bits of an operand to the left Example IL LD 2 1001 0011 ROL 3 ST Vari Varl 2 1001 1100 IN is rotated by one bit position to the left x times with the bit on the extreme left being reinserted from the right Tip The number of bits for the arithmetic operation is specified by the data type of input variable IN A constant is considered a
68. be inserted in the case of graphic languages or in the Watch window Components of structures are represented analogously to the function block instances Enumerations list the individual values underneath the respective type adhering to the following sequence Enumerations from libraries from data types local enumerations from organization units Note Some entries e g global variables will only be updated in the Help Manager after a compile Next fault Icon Menu Edit gt Next fault Keyboard lt F4 gt Use this command to display the next error after a project compiled with errors e The associated editor window is activated and the error location highlighted The associated error message will be displayed in the message window at the same time Warnings may be ignored on single stepping with F4 Project gt Options category Desktop check box F4 ignores warnings Previous fault Icon Menu Edit gt Previous fault Keyboard lt Umschalt gt lt F4 gt Use this command to display the previous error after a project compiled with errors The associated editor window is activated and the error location highlighted The associated error message will be displayed in the message window at the same time Warnings may be ignored on single stepping with lt Umschalt gt lt F4 gt Project gt Options category Desktop check box F4 ignores warnings DDS EN 2 3 Lenze Show Hide Bookmarks 7 1 1 13 Lenze efesotomas
69. can be deleted by selecting step and transition and pressing the lt Del gt key Keep the lt Ctrl gt key depressed to select several objects Step transition after Icon H Menu Insert gt Step transition after Keyboard lt Ctrl gt lt E gt Use this command to insert a step followed by a transition after the first transition in 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 lt Del gt key Keep the lt Ctrl gt key depressed to select several objects Alternative branch right Icon TI Menu Insert gt Alternative branch right Keyboard lt Ctrl gt lt A gt Use this command to insert an alternative branch as right oriented branch to the block selected in the SFC editor e For this purpose the selected block must start and end with a transition The new branch then consists of a transition Alternative branch left Icon T Menu Insert gt Alternative branch left Keyboard Use this command to insert an alternative branch as left oriented branch to the block selected in the SFC editor e For this purpose the selected block must start and end with a transition The new branch then consists of a transition DDS EN 2 3 1 57 Show Hide Bookmarks efesotomasyon com Lenze 7 8 2 5 7 8 2 6 7 8 2 7 7 8 2 8 7 8 2 9 7 58 Drive PLC Developer Studio Editors Parallel branch right
70. code can be edited 8 12 DDS EN 2 3 8 11 Show Hide Bookmarks efesotomasyon com Lenze 8 4 3 3 8 4 3 4 Drive PLC Developer Studio Resources Adding codes Select Insert Add 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 e Open the dialog box Enter the new object to select the variable to be linked to the code e 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 The Instance Parameter Manager supports the following data types e BOOL e BYTE e SINT e USINT e INT e UINT e DINT e UDINT e VORD e DWORD Note Copy and insert actions on objects will completely replace the contents Dialog box Instance Parameter Manager Open the dialog box Instance Parameter Manager to edit the settings for an existing or specify the settings for a new code Note System variables must not be linked with write read codes Code index e The code range from C3000 to C7999 is available Code numbers are entered without the leading C e 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 e Selecting an existing code will return an error message on clicking OK DDS EN 2 3 Lenze Show Hide Bookmarks
71. com Lenze Drive PLC Developer Studio Editors 7 68 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 ZIO a LE EIA Note Which of the shown objects are displayed is dependent on the automation system Lenze Resources 29 Global Variables Globale_Variablen _ b Variablen_Konfiguration AR_CONFIG a 2 library IECSFC LIB 25 3 02 11 07 40 global variables 2b Globale_Variablen lt P gt Br 2 library STANDARD LIB 25 3 02 11 07 46 global variables be Global Variables 0 lt P gt ax Code initialisation values re Instance parameter manager i e Type parameter manager pu E Parameter monitor i FEE PLC Configuration Fe Process Mirror ae Target Settings 49 Task configuration rs iB Task monitor A Watch and Receipt Manager Included libraries linked to the project by means of the Library Manager Global variables of the project and linked libraries Code initialization values for the initialization of codes with an initial value Parameter monitor for the parameterization and monitoring of code values Instance Parameter Manager and Type Parameter Manager 1 8 18 for access to variables via codes Process image for the display of process im
72. 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 The numerical value in line 4 was changed 7000 is the change 8000 the original value 0001 PROGRAM PLC_PRG 2 PROGRAM PLO_PRG 0003 AF VAR nSetv alue INT 70007 nSetv alue INT 8000 bWeight BOOL bWeight BOOL TETTE TP1 TP OOOFJEND VAR END VAR zi The values will not be directly aligned if the check box is not active 0001 PROGRAM PLC_PRG E PROGRAM PLC_PRG l 0003 VAR VAR nSetvalue INT 8000 nSetvalue INT 7000 bYeight BOOL byVeight BOOL _TP1 TP P41 TP E Result display The results are first displayed in a directory tree A double click will open the individual organization unit to show the highlighted changes si Project comparison C 4Programme Drive PLC Developer Studio ProjectsWO_SystemeVl_ OSystem_Beis BIG _OSystem_Beispie _ Modular pro AS Programme Driwe PLC Developer Studio ProjectaMO_Systen l a Fal Parameter PRG l si kal parameter PRG i E PLC_ColdStart PRG i i E PLC_ColdStat PRG E PLC_PRG PRG IE PLC_PAG PRG dese l ie E process FRG ie E Prozess PRG i ie 2 es Resources ae
73. define the size of the element Input and effect Magnification 1000 1 1 no change 100 x 0 1 10000 x10 Angle Use the input field Angle to enter a variable whose value causes element rotation positive value mathematically positive CW rotation e The value is evaluated in degrees e The centre of rotation of a selected element can be moved keeping the left mouse key depressed A variable in field Angle causes the current element to rotate The rotation is brought about by positive values and follows a CW direction Configure Motion relative available for all except polygon Use Extras Configure category Motion relative to assign variables to the edges of the selected element The respective element edges move according to the variable values Tip To enter variables use the Help Manager lt F2 gt Every side of the element has its own input field e The normal edge position is zero a new variable value in the associated column moves the border by this value in pixels The entered variables should be variables of type INT e Positive values move the horizontal edges downward or the vertical edges to the right Configure Variables available for all Lenze Use Extras Configure category Variables to define variables to describe the status of the selected element Tip To enter variables use the Help Manager lt F2 gt Invisible If the variable in the input field Invisible is set to FALSE the visual
74. e g QB0 1 1 0 1 internal format The maximum representable value is t 49d17h2m47s295ms 3908 Incorrect string constant The string constant includes an incorrect character 4000 dentifier expected Enter a correct identifier here E Ql Q Go E Go Q S N Q Q 15 14 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Appendix Possible remedy No Cause Declare the variable locally or globally 4010 Incompatible types Cannot convert lt Name gt into lt Name gt Check the required operator types and change the type of the variable that caused the error ei ya ose a een arabe Cannot convert lt Name gt into lt Name gt conversion or a suitable variable type 4012 Impermissible type for input lt Name gt of lt Name gt The variable lt Name gt is assigned a value of an impermissible type lt Type2 gt Change the Cannot convert lt Name gt into lt Name gt variable or the constant into a variable or constant of type lt Type1 gt or use a type conversion i or a constant with a type prefix 4013 Impermissible type for output lt Name gt of lt Name gt The variable lt Name gt is assigned to a value of an impermissible type lt Type2 gt Change the Cannot convert lt Name gt into lt Name gt variable or the constant into a variable or constant with type lt Type1 gt or use a type ni conversion or a constant with a type prefix l
75. field Replace with to enter the character sequence which is to replace the text to be found Match whole word only Select whether the text to be found is a whole word or also part of a word Match case Select whether the search is to be case sensitive or not Start search Click Find next to start the search The search starts at the current position e Any found text occurrence will be highlighted e Unsuccessful searches will be notified Replace Click Replace to replace the currently selected text with the text in Replace with Replace all Click Replace all to replace all text occurrences found behind the current location with the text in Replace with Lenze DDS EN 2 3 7 5 Show Hide Bookmarks efesotomasyon com Lenze 7 1 1 10 7 6 Drive PLC Developer Studio Editors Help Manager Icon Menu Edit gt Help Manager Keyboard lt F2 gt 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 Help Manager x IL Operat i Standard Functions User defined Functions Cancel Conversion Operators 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 e The Help Manager is context sensitive i e the categories available depend on the current edit
76. following pragma is currently available Variable is not initialized Vaiable not displayed no monitor Vaiable exported into the icon file without write access Vaiable exported into the icon file without read access Vaiable not exported into the icon file Modifier on makes the pragma effective for all subsequent variable declarations until revoked by pragma flag off The pragma may also be overwritten by another flag lt flags gt on pragma Without modifier on or off the pragma will affect only the current variable declaration Examples Variable a is not initialized and not displayed Monitor Variable b is not initialized VAR a INT flag noinit nowatch flag noinit nowatch on b INT flag noinit a INT END VAR flag noinit on Neither variable is initialized Flag noinit on VAR flag noinit on a INT a INT be INT ba INT END VAR flag off flag off END VAR The noread and nowrite flags may be used to assign restricted access rights to individual variables By default the variable has the same setting as the organization unit Should it have no read and write access it will not be exported into the icon file 7 20 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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
77. for expansion e The elements can be returned to efficient positions following expansion Note All macros are expanded if the project is converted into another language One Macro Level Back a Menu Extras One Makro Level 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 one macrolevel DDS EN 2 3 Lenze Show Hide Bookmarks 7 7 12 12 7 7 12 13 7 7 12 14 7 7 13 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors All Macro Levels Back Icon J Menu Extras gt All 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 Open instance Icon Menu Extras Open instance Keyboard This command is identical to menu item Project gt Open instance Zoom Icon Menu Extras gt Zoom Keyboard lt Alt gt lt Enter gt Use this command to open the implementation of a selected box CFC in online mode Monitoring The values for inputs and outputs are displayed within the input or output boxes Constants are not monitored visible For non Boolean variables the boxes will be enlarged in accordance with the displayed values If the value is TRUE variable names and connection in Boolean connections are highlighted in blue Internal Boolean conne
78. function chart in online mode Monitoring e The SFC editor displays the currently active steps in blue in online mode e f several steps are active in a parallel branch the active step with the action to be processed next is displayed in red e With IEC steps all active actions will be displayed in blue in online mode e Select Extras Options and option box Time limit overview to display time limits next to the steps e Athird time is displayed below the minimum and maximum time limits to indicate how long the step has so far been active n T 8s410ms In the above illustration the step has already been active for 8 seconds and 410 milliseconds It must be active for at least 7 minutes before the step is exited however Tip Monitoring of expressions e g A AND B in transitions will display the overall transition value only Breakpoints Use Online Breakpoint on off to set a breakpoint to a step In an action the breakpoint can be set to the positions permitted for the applied language e Processing will then stop before this step or position is executed e Steps or positions to which a breakpoint is set are displayed in light blue Single step processing SFC supports single step processing Online Single step over The program always advances to the next step with an action to be processed If the current position is e astepinalinear sequence of an organization unit or a step in the parallel branch at the ex
79. generated DDS EN 2 3 Lenze Show Hide Bookmarks Lenze efesotomasyon com Lenze 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 This list contains identifiers for all languages in the translation file and that are to be included on exiting the dialog Create translation file Exclude The button Exclude opens the dialog box Exclude libraries Exclude libraries Ei Identifiers from excluded libraries will not be included into the translation file Included libraries Excluded libraries LENZEDRIVE LIB LENZEIOSYSTEMUC LIB Add gt gt STANDARD LIB _ Remove _ Remove ok Cancel Here those project libraries can be selected whose user information is not to be accepted into the translation file Use the buttons Add and Remove to determine which libraries to exclude and which to include Confirm with OK The dialog box closes Target languages The button Add in the group box Target languages opens the dialog box Add target languages This is where you can add other languages Enter English USA for example and co
80. input This input is connected to the connection line between coils and contacts If this connection transfers the information ON the organization unit will be evaluated LD as FBD Once an organization unit with EN input has been created it will be possible to build up a network as in FBD An EN organization unit can receive data from operators functions and function blocks and also transfer data to such organization units DDS EN 2 3 Lenze Show Hide Bookmarks 7 6 3 1 7 6 4 7 6 4 1 7 6 4 2 7 6 4 3 7 6 4 4 Lenze efesotomasyon com Lenze 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 Operator with EN jon Men nsertOperator with EN keo Use this command to insert an operator with EN input e The selected position must be the connection between contacts and coils or a coll The new operator is inserted in parallel to the coils below the selected one and is always an AND e This can be changed to any other operator by selecting and overwriting the text e Use the Help Manager lt F2 gt to select the required operator from the list of supported operators Commands in the Extras menu Paste after Icon Menu Extras Paste after Ke
81. is active Breakpoint A breakpoint is a point in the program where processing stops e Breakpoints enable the user to look at variable values at a certain program location e Breakpoints can be set in all editors In the text editors breakpoints are set to line numbers in FBD and LD to network numbers in CFC to organization units and in SFC to steps e Breakpoints may be set in the implementation of an initialized function block No breakpoints may be set in function block instances Single step Single step means in e IL Execute program to next CAL LD or TMP command e ST Execute next instruction e FBD LD Execute next network e SFC Execute action to next step e CFC Execute next organization unit box in the CFC program The logical correctness of a program can be checked by step by step processing Single cycle Selection of Single cycle will stop processing after every cycle Caution Ifa breakpoint is set the use of tasks will lose the real time response A 1ms cycle task will no longer be started every millisecond If breakpoints are set all tasks will be started one after the other after the main program PLC_PRG has been processed Event controlled tasks will be started upon a valid start event only This among other aspects influences the functionality of the generated overall project DDS EN 2 3 2 9 Show Hide Bookmarks efesotomasyon com Lenze 2 3 5 2 3 6 2 3 7 2 3 8 Driv
82. last one in a line become variable identifiers in the declaration The declaration type is determined by the last identifier in the line where B or BOOL is BOOL I or INT is INT R or REAL is REAL S or STRING is STRING e lf these rules did not help to define a type the type will be BOOL and the last identifier is not used as a type e Each constant becomes an initialization or a string length depending on the declaration type e An address as in MD12 is extended by the AT attribute e Atext behind a semicolon becomes a comment e All other characters in the line are ignored Such as the exclamation mark in in for example Examples am p o C ESE STS 2 String ST STRING 2 String X MDI2 R5 Number X AT MD12 REAL 5 0 Number fs B BOOL Auto declaration If the option Auto declaration in the dialog box Option category Editor is activated the following dialog box will appear in all editors on entry of a not yet declared variable Declare Variable Ei Class Name ok VAR TEST m fai Cancel Symbol list Initial Value Address __ Cancel Globale Variablen CONSTANT Comment RETAIN I PERSISTEN e Use combination box Class to select the variable class e Enterthe variable name in text field Name the input field is pre assigned with the variable name entered in the editor e Enter the variable type in text field Type the input fie
83. lib 27 6 02 12 55 2 Generating prolog mplementation of POU PLC_PRG Error 3728 PLC_PRG 1 Invalid address K2 7 Error 3728 PLC_PRG 1 Invalid address K2 8 Error 3728 PLC_PRG 1 Invalid address K2 0 Error 3728 PLC_PRG 1 Invalid address X3 0 Hardware Contiguration 4 Error s 0 Warnina s Use the command Project gt Options category Load amp Save check box Save before compile to save the project prior to the compile Tip Cross references are created during the compile and will not be saved among the compile information To apply the commands Output call up tree Output cross reference list and the commands Output unused variables Concurrent access and Multiple write access on output of the menu Project Check the project must be recompiled after a change 6 1 2 2 Compile all Project Compile all contrary to Project Compile recompiles the complete project not deleting the download information in the process The menu command ProjectClean all deletes the download information 6 8 DDS EN 2 3 Lenze Show Hide Bookmarks 6 1 2 3 6 1 2 4 6 1 2 5 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Working with projects and objects 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
84. lt down gt to select the last cursor position of the preceding or subsequent network An empty network contains nothing but three question marks Click behind these to select the last cursor position Commands in the Insert menu Assignment Icon Menu Insert gt Assignment Keyboard lt Ctrl gt lt A gt IN F Use this command to insert an assignment 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 Then the text can be selected and substituted with the variable Alternatively use the Help Manager to do so To add another assignment to an existing one use the command Insert gt Output Note This command is also available in the ladder diagram editor Jump Icon Menu Insert gt Jump Keyboard lt Ctrl gt lt L gt cal Use this command to insert a Jump 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 Then the text can be selected and substituted with the jump label to be jumped to DDS EN 2 3 Lenze Show Hide Bookmarks 7 5 3 3 7 5 3 4 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors Return Icon Menu Insert gt Return
85. menu in the Object Organizer Printer borders Menu command Project gt Options category Desktop includes the check box Printer borders This feature allows the printable area of the individual editors to be outlined in red subject to the specifications of the set printer and the template size selected in the menu command File gt Documentation setup Default settings will apply where no printer or documentation size is set default DFR and standard printer The horizontal printer borders are drawn as if in the dialog box Documentation Setup the check box New page for each object or New page for each subobject were selected The bottom margin is not displayed Tip Set the zoom factor to 100 to ensure exact printer border display Commands in the Edit menu Undo Icon Menu Edit Undo Keyboard lt Ctrl gt lt Z gt Use this command to undo the last action in the currently open editor window or inthe Object Organizer All actions executed since the window was opened can be undone by repeating execution of this command e This applies to all actions in the editors for organization units data types visualizations and global variables and in the Object Organizer Use Edit Redo to redo an undone action Tip The commands Undo and Redo always act on the currently open window Each window has its own action list Activate the associated window to undo actions in several windows Undo s or redo s in the Ob
86. more specific access rights Options Symbol configuration Lenze Select the category Symbol configuration to open the following dialog box Category Load amp Save MV Dump symbol entries Cancel Configure symbol file GDC Device Description The dialog box assists symbol file configuration text file sym or binary file sdb These are required for data exchange with the control via the symbol interface and are used by Global Drive Oscilloscope for this purpose for example Dump symbol entries If the check box is activated every project compile automatically creates symbol entries for the project variables in the file Configure symbol file Use this button to open the dialog box Set object attribute Set object attributes Fa dI cam_support pro G9 POUS i if PLC_PRG PRG Cancel i ie E prim PRG 2 Resources E A Global Variables oo Global variables bane amp Variable_Configuration VAR_CONFIG AS library LenzeDrive lib 27 6 02 12 55 22 global variables be Globale_Variablen CONSTANT lt R gt library Standard lib 25 3 02 11 07 46 global variables uo amp Global Variables 0 lt A gt MW Export variables of object MW Export data entries MW Export structure components MW Export array entries IV Write access Select the required project organization units from the tree structure and tick the required check box DDS EN 2 3 5 15 Show Hid
87. must be linked with the desired steps with the help of command Extras Associate action Not only actions but also Boolean variables can be assigned to steps e So called qualifiers control activation and deactivation of actions and Boolean variables also permitting time delays e Concurrences may occur since an action may still be active even if the next step may already be processed via qualifier S Set for example Associated Boolean variables are set or reset on each SFC organization unit call i e it is reassigned either the value TRUE or FALSE each time The actions associated with an IEC step are displayed in a split box to the right of the step The left hand field contains the qualifier if necessary with time constants the right hand field the name of the action or the Boolean variable DDS EN 2 3 4 13 Show Hide Bookmarks efesotomasyon com Lenze 4 4 7 Drive PLC Developer Studio Programming languages Example of a two action IEC step se Hr que e 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 e Whether a newly inserted step is an IEC step is dependent on whether menu command Extras Use IEC steps has been selected Note Note restriction on the use of time qualifiers for actions used more than once within the same cycle Following a call the deactivated actions are pro
88. name of a connector Note that the name of the connector is a feature of the output of a connection and will be saved together with it Editing a connector at an input e Ifthe text in the connector is changed the new name will be accepted for all associated connectors at inputs e The text cannot be changed into a name that already belongs to another connector The name must be unique Editing a connector at an output e Achangeto the text in the connector will also be reflected in the associated connector at the other box Creating connections Inputs and outputs of elements can be connected by drawing a connection established through keeping the left mouse key depressed e Anelementinput can be connected to exactly one element output e An element output can be connected to several element inputs 1 Left click the output of element E1 keep the left mouse key depressed drag the mouse pointer to the input of element E2 and then release the left mouse key Dragging the mouse creates a connection between the output of element E1 and the mouse pointer DDS EN 2 3 Lenze Show Hide Bookmarks 7 7 8 7 7 9 Lenze efesotomasyon com Lenze 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 bod
89. performed in the online shift e g Delete Buffers or Init Debugging ri Status change The runtime system status has changed for example from Running to Break if a breakpoint was reached Exception An exception has occurred a communication error for example Description User actions are named after their associated menu commands All other actions are in English and named based on the associated OnlineXXX function DDS EN 2 3 Lenze Show Hide Bookmarks 6 4 1 2 6 4 1 3 6 4 1 4 6 4 1 5 6 4 1 6 Lenze efesotomasyon com Lenze 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 Log menu If the input focus is on the log window the menu command Log is shown in the menu bar instead of Insert Extras remains preserved but blank Load Icon Menu Log Load Keyboard An external log log can be loaded and displayed via the standard Windows file opening dialog The log within the project will not be overwritten by the command The loaded version will be replaced with the project log if the log window is closed and re opened a new online session is started Save Icon Menu
90. pro Then click OK e 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 DDS EN 2 3 Lenze Show Hide Bookmarks 6 1 1 7 Lenze efesotomasyon com Lenze 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 e Internal library lib if you programmed your POUs in the DDS Then click OK e 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 e lf the project is saved as library the entire project will be compiled Should an error occur the user will be informed that a correct project is required to generate a library In such case the project will not be saved as library Save mail archive Menu File Save mail archive Keyboard DDS has an archive function using which all files of a project libraries bitmaps etc can be saved in an archive file Note To archive a project without the necessity of acompile and download during a later log in carry out a download before archiving the project and activate the check box Compile Informationin the dialog box Save Archive Use this command to generate a ZIP archive file containing all signifi
91. program for calling the two function blocks WAIT and TRAFFICLIGHT 29 To edit the organization unit PLC_PRG activate its editor window by selecting Object Organizer tab Organization units and double clicking PLC PRG 3 2 7 1 Declaration To ensure that the function blocks created before can be used in PLC_PRG itis necessary to declare instances of these function blocks The traffic light example requires two instances of the function block TRAFFICLIGHT LIGHT1 LIGHT2 and one instance of the function block WAIT WAIT1 30 Use the declaration editor to declare as local variable between the keywords VAR and END VAR the variables for the required instances WI PLC_PRG PRG SFC olx DOMI PROGRAM PLC_PRG d0d2 AR 0003 LIGHTI TRAFFICLIGHT 0004 LIGHT2 TRAFFICLIGHT 0005 WAITTAWAIT DOOG END_VAR 3 2 7 2 Sequential function chart The start up diagram of an organization unit in SFC always consists of an action Init a subsequent transition Trans0 and a jump back to Init a m x W PLC_PRG PRG SFC 0001 PROGRAM PLC_PRG _ Init 3 8 DDS EN 2 3 Lenze efesotomasyon com Lenze 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 af
92. programs must have an input and output with Boolean values and can be used at the same locations as contacts i e on the left hand side of the LD network LD as FBD Use global variables or direct calls if the result of a circuit in LD is to be used to control other Organization units Global variable The result of a circuit can be saved with the help of the coils in a global variable that is then further used otherwise Direct call The call can be directly installed into your LD network For this purpose insert an EN organization unit EN stands for Enable e EN organization units are normal operators functions programs or function blocks that have an additional input labelled EN This input is a BOOL type input e An EN organization unit will only be evaluated if its EN input is TRUE e An EN organization unit is switched in parallel to the coils with the EN input being linked to the connection line between the contacts and the coils If the status ON is transmitted via this line the organization unit will be evaluated normally e Based on such an EN organization unit networks can be generated as in FBD INI INZ QUTI DDS EN 2 3 4 21 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Programming languages 4 22 DDS EN 2 3 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Working area 5 Desktop 5 1 User interface Wj Drive PLC
93. project to specify the comments for all variables used within the project open a global variable list and use the command Extras Create document template Documentation setup Menu File Documentation setup Keyboard Use this command to specify the layout of the pages to be printed Documentation Setup Ed Frame File DEFAULT DFR Browse Edit Placeholders Page FileName Date POUName Content New page foreach object TT New page forea Printer Setup Cancel File Use text field File to enter the name of the file with the extension dfr to save the page layout to e By default the template is saved in the file DEFAULT DFR e To change an existing layout click Browse to find the required file in your directory structure Edit Select Edit to display the page layout template Arrange the placeholders for page numbers date names for files and organization units as well as on page graphics and define the text zone to print the documentation in Tip Use the button Printer setup to open the dialog box Printer setup to effect documentation settings DDS EN 2 3 Lenze Show Hide Bookmarks Lenze efesotomasyon com Lenze Drive PLC Developer Studio A Working with projects and objects File Edit Project Insert Extras Online Window Help alc 1 90 240 amp 8 8 a tee for hb soa EZRA SLISSISASISSLISLLIRSLISASIISASASLASSTIA LL LLLLLIILII EES LL A a e
94. referenced value are output in the declaration part In the program part only the pointer is output pointervariable lt pointer value gt Pt lt value gt The value of the pointer is indicated in the implementations whereas in the case of de referencing only the de referenced value is indicated Monitoring ARRAY components The following components are displayed e Array components indexed via a constant anarray 1 5 The following components are not displayed e Array components with extended index anarray i j 50fanarray i 1 5 Simulation During asimulation onthe processor the generated control program will be processed together with the DDS offering complete online functionality The logical correctness of the program can be tested to a limited extent only without control hardware Log The log records user actions internal processes status changes and exceptions chronologically in online mode and serves monitoring and error tracing DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 e To avoid accidents the traffic lights will also in
95. single control cycle and stop after this cycle e Online Single cycle works for cyclical tasks only and will not consider the EVENT INTERVAL tasks e Online Single cycle can be repeated continuously to proceed in single cycles e Single cycle ends if the menu command Online Start is executed Write values Icon Menu Online Write values Keyboard lt Ctrl gt lt F7 gt Use this command to change the value of single element variables Double click the line in which the variable is declared or select the line and press lt Enter gt e This will display a dialog box to specify a new value for the variable In the case of Boolean variables the value will be toggled without dialog box display The new value now light blue will not be written to the control immediately e Change as many variables as necessary and transfer them to the PLC in one go cycle consistent 1 Defining the values In the case of non Boolean variables double click the line in which the variable is declared to open a dialog box Write variable Counter counter as example to enter the value to be written to the variable In the case of Boolean variables double click the line in which the variable is declared to toggle the value between TRUE FALSE and no new value without a dialog display The new value to be written will be displayed in angular brackets and light blue colour behind the old declaration value Tip The following exc
96. specific variable is a BOOL type variable If TRUE the process registers step timeouts in SFCError and otherwise ignores them This application may be useful for commissioning or manual operation for example SFClnit If this variable is TRUE the SFC and the other flags are reset to the init step initialization As long as the variable is TRUE the init step remains set without being executed If SFCInit is reset to FALSE the organization unit will be processed further SFCReset This BOOL type variable behaves similarly to SFCInit Although the init step is processed further following initialization This behaviour may be used to set the SFCReset flag in the init step immediately back to FALSE Note SFCInit and SFCReset cannot be used simultaneously in one organization unit SFCInit will always have priority DDS EN 2 3 4 15 Show Hide Bookmarks efesotomasyon com Lenze 4 16 Drive PLC Developer Studio Programming languages Example of a declaration PROGRAM flags VAR SFCEnableLinit BOOL SFCError BOOL SFCErrorstep STRING SFCReset AT 3IX1 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 willbe reset All previous times inthe active steps willbe reset when the variable is reset to FALSE SFCPause Processing of the SFC diagram willbe suspended for as long as this B
97. subject to the following procedure The expired time is copied into the associated step variable A timeout is checked and SFC error flags are set accordingly Only the associated action will be executed if the current step is not an IEC step 4 The IEC actions of the sequencer are executed in alphabetical order The list of actions is processed twice the first run executing all IEC actions deactivated in the current cycle and the second one executing all IEC actions active in the current cycle 5 The transitions are evaluated and the next step is activated if the following conditions are fulfilled The step in the current cycle was active The subsequent transaction is TRUE The minimum active time has expired DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 Tool tip Positioning the mouse pointer briefly over a variable in online mode will display a tool tip with the variables s type and any comments Lenze DDS EN 2 3 7 67 Show Hide Bookmarks efesotomasyon
98. supported he exp file contains an incorrect access variable section he exp file contains an incorrect configuration variable section 0 he exp file contains an incorrect global variable section he section in the exp file for the specified object is incorrect he section in the exp file for the Configuration Task is incorrect 3405 Error on PLC configuration import he section in the exp file for the PLC configuration is incorrect Two steps named lt Name gt he SFC organization unit section contained in the exp file includes two steps with identical The second step was not imported names Rename one of the steps in the export file 3407 he named step is missing in the exp file 408 he named step is missing in the exp file 9 transition requiring the named step as the entry step is missing in the exp file step requiring the named transition is missing in the exp file he link between the named step and the Init Step is missing in the exp file PDO lt Name gt lt Module name gt lt Configuration dialog Click the button Properties in the configuration dialog lt Configuration dialog name gt of module lt Module name gt and enter a COB ID for PDO lt PDO Name gt Loading error EDS file lt Name gt could not be found but is The device file required for CAN configuration may possibly not be available in the correct used in the configuration directory Check the directory entry for configuration files in Project Option
99. task e no entry was made in text fields Interrupt Interval and Event e the specified interval time or priority is wrong e the specified priority already exists the OK button will remain greyed out Lenze DDS EN 2 3 8 33 Show Hide Bookmarks efesotomasyon com Lenze 8 8 6 2 8 8 6 3 8 34 Drive PLC Developer Studio Resources Insert program call Add program call Icon Menu Insert gt Insert program call Keyboard Insert gt Add program call 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 Use the input field Program call to entera valid program name or press to open the Help Manager for a selection of valid program names Program Call x Program Call FLC_PRGInMasT orque gt iE 3 Cancel If the selected program requires input variables enter these as shown in the example Example of input variable prg invar 17 Properties Icon Menu Extras Properties Keyboard lt Enter gt Depending on the selected element use this command to open the dialog box Task properties or the dialog box Program call in the task configuration e fthe cursor is positioned over a task entry to which no list of program calls has been added yet open the dialog box Task properties by dou
100. template and click OK When documenting the entire project or printing parts of it the comment entered in the template will be inserted in the program text for all variables This comment is print only DDS EN 2 3 8 3 Show Hide Bookmarks efesotomasyon com Lenze 8 2 8 4 Drive PLC Developer Studio Resources Code initialization values La The code initialization values are an object on tab Resources in the Object Organizer Initialization value priority Reset Parameter Manager Reset cold Parameter Manager Reset bootstrap leaving no value valid povem cowmoas iiiifi E EANNN Program download Parameter Manager Use this object to initialize codes with an initial value Not only the codes generated in the Parameter Manager can be initialized but also all system codes These codes are permanently saved in the automation system s parameter set at the end of the download e All selected codes are overwritten in the parameter set e Any code can be written e Overwritten initial values set in the Parameter Manager are only stored in the default setting See codes C0002 and C0003 e The entered codes are saved one after the other in the parameter set Exception Codes C0086 and C0025 are modified on initialization start as they affect other codes e Unknown codes and initialization values beyond the code value limits are ignored by the automation system Double click the object Code initialization val
101. the commands Extras lInsert parallel branch right or Extras gt Insert after Copy Icon a Menu Edit gt Copy Keyboard lt Ctrl gt lt C gt Use this command to copy the current selection from the editor to the clipboard The contents of the editor window will not be changed e Inthe case of the Object Organizer this applies analogously for selected objects although some objects cannot be copied such as the PLC configuration for example Tip Note that not all editors support the copy function and that the functionality may be limited insome editors The selection format depends on the editor e Intext editors IL ST declaration the selection is a sequence of characters e Inthe FBD LD and CFC editors the selection is a number of networks identified by a dotted rectangle in the network number field or a box with all lines boxes and operands e Inthe SFC editor the selection is part of a step sequence surrounded by a dotted rectangle The contents of the clipboard can be inserted by using the command Edit Insert e The SFC editor also allows use of the commands Extras lInsert parallel branch right or Extras Insert after DDS EN 2 3 Lenze Show Hide Bookmarks 7 1 1 5 7 1 1 6 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors Insert Icon Menu Edit gt Insert Keyboard lt Ctrl gt lt V gt Cel lt Umschalt gt lt Insert gt Use this command to insert the cont
102. the elements have been edited completely the conglomerate can be ungrouped with Extras gt Break up group DDS EN 2 3 Lenze Show Hide Bookmarks 9 4 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Visualization Visualization in libraries Visualizations can also be saved in libraries and thus be made available as library organization units in projects e Like the visualizations available in the project directly they can be inserted as references e 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 Program execution first processes the visualizations within the project and then those of the loaded libraries DDS EN 2 3 9 21 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Visualization 9 22 DDS EN 2 3 Lenze Show Hide Bookmarks 10 10 1 10 1 1 10 1 2 10 1 3 Lenze efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Data types IEC 61131 3 data types 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 Standard data types are e BOOL e Integer data types BYTE WORD DWORD SINT USINT INT UINT
103. the variable AT declaration Variable type enter the function block name on instancing a function block Variable initialization value according to assignment operator comme e You can toggle between declaration editor and Declarations as tables at any time e New variables can be inserted using the command Insert New declaration Inserting new variable into the declaration table Icon Menu Insert gt New declaration Keyboard Use this command to insert a new variable into the declaration table in the declaration editor e lf the cursor is currently in a table cell the new variable will be inserted in front of this line otherwise at the beginning of the table It is also possible to insert a new declaration at the end of the table by pressing the lt right arrow gt key or the lt Tab gt key in the last table cell Execution of the command results in a variable with a pre assigned Name in field Name and BOOL in field Type These values can be changed as necessary Name and type are sufficient for a complete variable declaration DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 7 2 18 7 2 19 Lenze Drive PLC Developer Studio Editors Declaration editor in online mode In online mode the declaration editor is a monitor window PLC_PRG PRG SFC serene Yellow ALS ALSE OUNTER 4 v Every line contains a variable followed by an equal sign and t
104. to delete the selected range from the editor window The contents of the clipboard will not be changed e Inthe case of the Object Organizer this applies analogously to selected objects although some objects can not be deleted such as the PLC configuration for example The selection format depends on the editor e Intext editors IL ST declaration the selection is a sequence of characters e Inthe FBD LD and CFC editors the selection is a number of networks identified by a dotted rectangle in the network number field e Inthe SFC editor the selection is part of a step sequence surrounded by a dotted rectangle e Inthe Library Manager the selection is the currently selected library name DDS EN 2 3 7 3 Show Hide Bookmarks efesotomasyon com Lenze 7 1 1 7 7 1 1 8 J Drive PLC Developer Studio Editors Find Icon en Menu Edit gt Find Keyboard lt Ctrl gt lt F gt Use this command to find a character sequence in the current editor window Selection of the command opens the dialog box Find Suchen ied x Suchen nach TRAFFICLIGHT Suchrichtung Abbrechen v Nur ganzes Wort suchen g eben TT GroB Kleinschreibung Nach unten e 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 Ma
105. type TP WAIT FB IL 0001 F UNCTION_BLOCK WAIT 0002 AR_INPUT SETTIME TIME 0005 VAR_OUTPUT OK BOOL FALSE OOO7 END_VAR 3 2 6 2 Instruction list To implement the timer the instruction list for the organization unit WAIT must be as follows WAIT FB IL _ o x D001 FUNCTION_BLOCK WAIT 4 CAL DELAY IN FALSE LD SETTIME ST DELAY PT CAL DELAY IN TRUE JMP end Lenze DDS EN 2 3 3 7 efesotomasyon com Lenze Drive PLC Developer Studio Program example Process The first interrogation establishes whether Q is already set to TRUE TRUE timer running Line 7 e lfQ 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 e O 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 Line 4 All variables are now set to the desired initial status Now save the time required from variable SETTIME in variable PT Line 5 6 and call DELAY with IN TRUE Line 7 In the function block DELAY the variable ET will now be counted up until it reaches the value SETTIME then Q will be switched to FALSE e The negated value of Q will be saved after every WAIT cycle in OK Line 14 15 e AssoonasQ becomes FALSE OK becomes TRUE The timer is complete 3 2 7 The main program PLC_PRG The organization unit PLC_PRG is the main
106. 0 Varl INT Varl INT implementation Implementation LD arri Var1 SIZE OF arri SIZEOF ST Vari Var1 10 Bit string operators Types The operands of the following bit string operators should be of type BOOL BYTE WORD or DWORD AND Bit by bit AND of bit operands IL Varl BYTE FBD LD 2 1001 0011 281001 oon van AND 2 1000_1010 2 1000_1010 ST Varl Varl 2 1000_0010 2 1001 0011 AND 2 1000 1010 Note Make sure to observe the following when using 68xxx or C code generators in the FBD for the illustrated program sequence As soonas the input variable a assumes the value FALSE the assignment of the value of the second input variable at the AND operator organization unit to the variable z will no longer be performed as a consequence of the optimized processing procedure within the FBD DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Operators 12 2 2 OR Bit by bit OR of bit operands IL Vari BYTE LD 2 1001 0011 OR 2 1000 1010 ST Vari Varl 2 1001 1011 ST Varl 2 1001 0011 OR 2 1000 1010 Note Make sure to observe the following when using 68xxx or C code generators in the FBD for the illustrated program sequence As soon as the input variable a assumes the value TRUE the assignment of the value of the second input variable at the OR operator organization unit to the variable z will no longer be performed
107. 000ms Tai sOms Note The configuration of the digital outputs gets lost with the extension modules remains unchanged with the Servo PLC 6 22 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Working with projects and objects Te J Event during program processing PLC stop breakpoint Response of the automation system CINH is activated Code C168 subcode 1 Error entry none CINH is activated Code C168 subcode 1 e Fail QSP is activated e Code C168 subcode 1 Error entry none Fail QSP is activated Code C168 subcode 1 Motor continues running Code C168 subcode 1 Error entry none Motor continues running Code C168 subcode 1 Task overflow o J Error entry Task overflow Error entry Task overflow Error entry none Drive PLC Automation system without drive function Execption handling x Action if breakpoint or task overrun Action of target device ci IT rip Cinhi C Warming Digital Dutputs Cancel C aresettoLOW are not changed Watchdog time cyclic task Watchdog time T 1ms T 10000ms Tan sOms Note The configuration of the digital outputs remains unchanged with the extension modules remains unchanged with the Drive PLC Tip Response of the automation system CINH is activated Event during program processing PLC stop breakpoint O a Motor continues running Code C168 subcode 1 Error entry non
108. 1 3 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors The following elements can be used in the CFC editor e Box e Input e Output e Jump e Label e Return e 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 e The connection links will be auto adapted when elements are moved e fa connection link cannot be drawn for space related reasons a red line will represent the connection between input and associated output and turn into a connection link as soon as there is enough space One of the advantages of the CFC editor over the standard FBD editor is that it allows direct insertion of feedbacks Tip The most essential CFC editor commands are also available in the shortcut menu right mouse key Cursor positions in CFC S pn Every text field selected text is highlighted and can be edited o ni Body of boxes inputs outputs jumps labels returns and comments ry 0 z le Inputs of boxes outputs jumps and returns 15 T x ARIE Input Outputs of boxes and inputs Selecting elements Click its body to select an element e Fora multi select keep the lt Shift gt key depressed and click the respective elements one after the other or keep the left mouse key depressed and draw a window across the elements to
109. 12 1 Build 5 13 Addressing function 12 1 crv Administrator rights 6 21 AHO O C Alternative branch left 7 5 alculate addresses 8 2 Alternative branch right 7 5 all hierarchy 6 3 Angle 9 13 alling a function block 2 Anisotropic 9 18 alling up a function block 12 12 Arc cosine 14 6 Arc sine 14 6 FC 4 19 Arc tangent 14 hange colour 9 13 hanging values online 2 10 Arrange icons 5 5 hannel parameters 8 2 Arrange in accordance with the data flow 7 52 heckBounds 2 Arrange topologically 7 51 heckDiv 12 2 Ask for project information 5 heckRange 10 8 Assignment 7 30 lean all 6 9 Assignment operator 4 5 12 13 Associate action 7 62 lose all 5 Auto declaration 5 8 ode list 8 Autoformat 5 8 Autoload 5 olours 5 10 9 12 Autosave interval 5 6 omment 7 45 B ommunication driver 6 38 ommunication parameters 6 37 6 38 ompare 6 1 Binary file 5 13 Lenze DDS EN 2 3 16 1 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Index ompile all 6 8 Directories 5 11 ompiler error messages 15 11 oncatenation 14 8 onfigure 9 1 onfiguring the monitoring window 7 24 onnector 7 48 onstants 5 13 7 1 ontact 7 3 ontinuous function chart editor 4 19 ontroller enable 6 4 ontroller inhibit 6 41 E onvert object 6 2 onvert PLC configurations 8 2 diting time limits 7 61 9 9 2 2 9 a a a a a a a a as o Ilo DIL Ol IN DI I KI I L No no ni do
110. 2 3 4 3 Visualization in online mode f Example_Trafficlight Restart the program and the traffic lights will be on in the visualization for the specified times and correct functioning of the traffic control system can be very simply tested LIGHT1 LIGHT2 Tip For a detailed description of the visualization process refer chapter 3 16 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 e Structures e Organization units e Global variables e Local variables e Configuration e etc Lenze DDS EN 2 3 4 1 Show Hide Bookmarks efesotomasyon com Lenze 4 2 4 2 1 4 2 Drive PLC Developer Studio Programming languages 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 instructio
111. 2 Error when loading the resources Install the CAN driver update A110 If the error still occurs contact Lenze Reinstall the system bus default configuration A111 41234 Automation system read error Reset the automation system mains switching and try again A112 Reset the target system mains disconnection and try again A113 41236 The maximum number of supported communication Remove one communication module A114 modules e g CAN USB adapters was exceeded A115 bus adapter A116 selected A117 41240 Error when writing the configuration file Reinstall the CAN driver A118 41241 The format of the configuration file is invalid Reinstall the CAN driver A119 41242 Several PC system bus adapters 2177 connected to the PC Connect only the PC system bus adapter 2177 to be configured to the PC A11A at the same time 41243 Error during USB device number write to PC system bus Check that the system bus adapter is the only PC system bus adapter 2177 and properly A11B adapter 2177 connected to the PC 41244 Error during USB device number read from PC system bus Check that the system bus adapter is the only PC system bus adapter 2177 and properly A11C adapter 2177 connected to the PC 41245 The file LSystembusL1 DLL could not be loaded Reinstall the CAN driver A11D 41246 he file LSystembusL1 DLL could not be loaded Install the CAN driver update A11E If the error still oc
112. 2 3 Lenze Show Hide Bookmarks 7 6 2 7 6 2 1 7 6 2 2 7 6 2 3 7 6 2 4 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors Commands in the Insert menu Contact Icon 4p Menu Insert Contact Keyboard lt Ctrl gt lt K gt Use this command to insert a contact in front of the position selected in the network e lf 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 e Click this text to change it to the required constant or variable Alternatively use the Help Manager lt F2 gt to do so Parallel contact Icon F H Menu Insert gt Parallel contact Keyboard lt Ctrl gt lt R gt Use this command to insert a contact in parallel to the position selected in the network e lf the selected position is a coil or a connection link between contact and coil the new contact is connected parallel to the previous contacts The inserted contact is pre assigned e Click this text to change it to the required constant or variable Alternatively use the Help Manager lt F2 gt to do so Coil Icon Menu Insert gt Coil Keyboard lt Ctrl gt lt L gt Use this command to insert a coil parallel to the already existing coils e lf the selected position is a connection between contacts and coils the new coil will be the
113. 2 4 Identifiers An identifier is a sequence of letters numbers and underscores starting with a letter or an underscore Variable identifiers must not e contain white spaces and umlauts e be declared twice e be identical to keywords 13 4 DDS EN 2 3 Lenze Show Hide Bookmarks 13 3 13 3 1 Lenze efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Operands Furthermore e Case sensitivity is not an option for variables Example VAR1 Var and vari are not different variables e Underscores in an identifier are significant Example A_BCD and AB_CD are interpreted as different identifiers e Multiple successive underscores at the beginning of or within an identifier are not allowed e The first 32 characters are significant Addresses Address For a declaration variables can be assigned to a physical memory location PLC address by means of the keyword AT The address specification structure is established with the help of special character lines The character sequence starts with a followed by a range prefix and a prefix data type for the size It ends with a sequence of numbers that specify the direct memory location The following range prefixes are supported I Input Q Output M Flag internal memory The following size prefixes are supported X Single bit None Optional B Byte 8 bits W Word 16 bits D Double word 32 bits Inputs outputs sIX0 0 0
114. 2 will be inserted with the sequence number of the topological descendant E6 increasing the sequence numbers of all topological descendants E6 by 1 DDS EN 2 3 7 51 Show Hide Bookmarks efesotomasyon com Lenze 7 7 12 3 7 7 12 4 7 7 12 5 7 52 Drive PLC Developer Studio Editors Element E1 will be inserted with the sequence number of the topological descendant E2 Arrange in accordance with the data flow Icon Menu Extras gt Order Keyboard Arrange in accordance with the data flow Use this command to arrange all elements in accordance with their data flow in the CFC editor e This command is applied to all elements e The processing sequence is determined by the data flow of the elements not by their position Before command execution After command execution Bring forward by one Icon Menu Extras gt Order Bring forward by one Keyboard Use this command to bring all selected elements forward by one position within the sequential function chart in the CFC editor e This does not apply for the elements at the beginning of the sequential function chart Send back by one Icon Menu Extras 0Order Send back by one Keyboard Use thiscommand to send all selected elements back by one position within the sequential function chart in the CFC editor e This does not apply for the elements at the end of the sequential function chart DDS EN 2 3 Lenze Show Hide
115. 41728 nternal program error Restart the application 6500 opc tom coud nette oroarea O Lenze DDS EN 2 3 15 21 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Appendix Possible remedy A302 OPC item could not be read Use the system bus configurator to check if the target system responds A303 OPC connections failed If the problem still exists contact Lenze Internal program error Install the CAN driver update OPC connection point for asynchronous communication If the problem still exists contact Lenze could not be created 41733 Internal program error Restart the application 41734 Internal program error Restart the application 0PC nem it vou rot oe ee O BA 3 S Sa S Q S SS 45569 The target system has an HO5 trip Contact Lenze 45570 The target system has a PRO trip Reset the trip paramers oror o O 45571 The target system has a PER trip Reset the trip Mains disconnection ponam aiie O OO R OD D D e OD UJ Sas SNS 45573 The target system has an unknown error Contact Lenze 45574 The software version of the target system does not Use the corresponding target system B206 correspond to the program to be loaded 45575 The target system is write protected Remove the write protection for downloading s UJ Ss S S S OD S DL 45578 The program to be loaded is too large for the target B20A system Split the program B20
116. 805 Incorrect watchdog time Check the task watchdog times The watchdog time for a task is 0 810 The codes stored in the Instance Parameter Manager Delete some codes require too much memory N Go Q A N AW 4811 Several initialization values were assigned to one code Check all initialization values Code initialization must be unique 4812 rror in the Parameter Manager Refer message text for the cause N on 813 A scale function was used in a global function block Instance function blocks with scale functions locally only instance E 820 rror during code initialization value processing The device description of the applied automation system was not found 850 The applied version of the Drive PLC Developer Studio does Contact Lenze not allow the generation of an external library N Lenze DDS EN 2 3 15 19 efesotomasyon com Lenze Drive PLC Developer Studio Appendix 15 5 3 Communication errors Possible remedy 1 Transmit buffer in the controller is full System oriented communication error LQ 15 22 0001 CAN_ERR_XMTFULL 2 CAN controller was read too late 0002 CAN _ERR _OVERRUN 4 Bus error An error counter has reached the limit Limit 0004 CAN _ERR_BUSLIGHT 8 Bus error An error counter has reached the limit 0008 CAN ERR_BUSHEAVY 16 Bus error CAN controller assumed CANopen status bus off 0010 CAN _ERR_BUSOFF 32 Rev queue has been read out 0020 CAN_ERR_QRCVE
117. AL VAR_GLOBAL VAR_INPUT VAR_IN_OUT VAR_OUTPUT WHILE WITH WORD XOR XORN 15 6 DDS EN 2 3 Lenze Show Hide Bookmarks 15 4 Lenze Key combinations and function keys efesotomasyon com Lenze Drive PLC Developer Studio Appendix The available key combinations and function keys are listed as follows General operation Toggle between declaration and instruction parts of an organization unit Toggle between Object Organizer object and message window lt Alt gt lt F6 gt Shortcut menu Short form mode for declarations Open and close multi level variables Open and close folders Move among tab cards in the Object Organizer and Library Manager Jump in dialogs Context sensitive help General commands Menu command File gt Save File gt Print File gt Exit Project gt Delete object Project gt Insert object Project gt Rename object Project gt Edit object Project gt Check all Project gt Compile all Edit gt Undo Edit gt Redo Edit gt Cut Edit gt Copy Edit gt Insert Edit gt Delete Edit gt Find next Edit gt Help Manager Edit gt Next fault Edit gt Previous fault Online gt Log in Online gt Log out Online gt Start Online gt Stop Online gt Breakpoint on off Online gt Single step over Online gt Single step in Online gt Single cycle Online gt Write values Window gt Messages DDS EN 2 3 15 7 Show Hide Bookmarks efesotomasyon com Lenze
118. AR Several variable lists lf a large number of global variables has been declared and the global variable list is to be structured better the setup supports the generation of additional variable lists 1 Open the Object Organizer and select the folder Global variables or one of the existing objects with global variables 2 Execute menu command Project gt Insert object 3 Name the object in the dialog box This will create a new object with the keyword VAR_GLOBAL DDS EN 2 3 Lenze Show Hide Bookmarks 8 1 1 1 8 1 2 8 1 2 1 8 1 2 2 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Resources All instance paths Menu insert gt All 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 If the project is compiled the menu item is available again in the window of the variable configuration Document template If a project needs to be documented more than once with comments in German and English for example or to document several similar projects using the same variable names generate a document template with the help of the menu command Extras Create document template Edit document template The template
119. B technology units e g EVS93xx xT 45580 The preparations for the program transfer have failed If the problem still exists contact Lenze 45581 Error when reading from the target system Then try again Then try again OO S VS Mains di ion 45572 The target system has a CCR trip Reset the trip Mains disconnection System failure D D Sas Suo x S m 15 5 4 System oriented communication error Note System oriented communication error at the CAN bus A system oriented error occurred at the CAN bus Please check e the network hardware connections cables terminating resistors e the system bus adapters used e the configuration settings no double assignment of node addresses identical baud rates e Restart the PC 15 22 DDS EN 2 3 Lenze Show Hide Bookmarks 15 6 Lenze Glossary Sequential Function Chart Action Action block Current event Instruction List SFC IL Organization unit CPU Declaration Declaration block Elementary data type Function extensions FB FB instance FB type FBD Function Function organization unit Function block Function Block Diagram FBD IL Indirect FB call Instance LD Configuration Ladder Diagram LD POU POU Program Organization Unit Resource Step SFC PLC efesotomasyon com Lenze Drive PLC Developer Studio Appendix Sequential Function Chart SFC Sequential Function Chart SFC is
120. Character for physical address Range prefix Data type Module number Word address Bit address Module number The module number specifies the automation system module system organization unit to be approached Examples 60X0 0 2 Output bit 2 sIW0 0 1 Input bit 1 sMB7 Flag byte 7 SMWI1 Flag word 1 6MD3 Flag double word 3 S MX1 2 Third flag bit in flag word 1 DDS EN 2 3 13 5 Show Hide Bookmarks efesotomasyon com Lenze 13 3 2 13 6 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 bitO 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 Avalue change of varbool1 AT MWO affects the range from MX0 0 to MX0 7 Flags Tip The flag range size is dependent on the selected automation system Example1 sMD4 8 MD48 MW97 MW96 MB195 MB194 MB193 MB192 addresses bytes nos 192 193 194 and 195 48 4 192 in the flag range The first byte is byte no 0 Example2 SMX5 0 addresses the first bit in the fifth word in the flag range Bits are generally saved word by word DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Operands 13 4 Function calls In ST a function call can also be an operand Example
121. DINT UDINT e REAL e STRING e Time data types TIME TIME_OF_DAY DATE DATE_AND_TIME BOOL Variables of type BOOL can be TRUE or FALSE and are subject to an 8 bit memory reservation Integer data types Integer data types include BYTE WORD DWORD SINT USINT INT UINT DINT UDINT Different data types cover different numerical ranges The following range limits apply to integer data types fee fiowertimii SS Quepertimii uemon o es fase wra do fesss hw Oooo mow p oos sete om p see ooo ow p fes o wom o p os fees As a result information may be lost when converting higher order types to lower order types REAL and LREAL REAL and LREAL are so called floating point types required for the use of rational numbers The reserved memory capacity amounts to 32 bits or 64 bits Note LREAL is not supported by the Lenze target systems Process REAL data types only in the PLC_PRG context System errors may occur DDS EN 2 3 10 1 Show Hide Bookmarks efesotomasyon com Lenze 10 1 4 10 1 5 10 2 10 2 1 10 2 Drive PLC Developer Studio IEC 61131 3 Data types 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 characte
122. DR variable nicht mOglich Shift F2 or Edit Variable configuration Grundsatzlich sollten Pointer vermieden werden Beachten Sie auch im Kapitel Datentypen den Abschnitt Pointer 761 VAR_IN OUT variables must have no initial value Remove the initialization in the variable declaration 780 VAR VAR_INPUT VAR_OUTPUT or VAR_IN_OUT expected The first line after an organization unit name must contain one of these keywords 781 END VARor identifier expected Insert a valid identifier or END_VAR at the beginning of the declaration line 3782 Unexpected end Declaration part Insert the key word END_VAR at the end of the declaration part Text editor Insert instructions that end the last instruction sequence END_IF for example 3783 END_STRUCT or identifier expected Ensure that the type declaration is completed properly 800 The global variables require too much memory Increase Increase the number of segments set in the build options in the project options the available memory in the project options 3801 Variable lt Name gt is too big lt Size gt byte The variable is using a type larger than 1 data segment Dependent on the automation system the segment size can be defined in dialog box Automation system settings tab Memory layout Contact the control manufacturer if you find no entry option there 3802 Memory for Retain variables used up The available memory area for Retain variables is exhausted Dependent on the automation Var
123. ELEASE TRUE BUSY SEMA CLAIM RELEASE means BUSY X IF CLAIM THEN X TRUE ELSIF RELEASE THEN BUSY FALSE X FALSE END IF Declaration SEMAInst SEMA IL CAL SEMAInst CLAIM VarBOOL1 RELEASE VarB00L2 SEMAInst LD SEMAInst BUSY SEMA ST VarBOOL3 VarB 00 1 CLAIM BUSY VarBOOL3 VarB00L24K RELEASE ST SEMAInst CLAIM VarBOOL1 RELEASE VarBOOL2 VarBOOL3 SEMAInst BUSY Lenze DDS EN 2 3 14 11 Show Hide Bookmarks efesotomasyon com Lenze 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 O BOOL END VAR VAR M BOOL FALSE END VAR Q CLK AND NOT M M CLKL END FUNCTION BLOCK As long as the input variable CLK is FALSE the output Q and the auxiliary variable Mwill be FALSE As soon as CLK returns TRUE Q will first return TRUE and then M will be switched to TRUE l e with every subsequent function call Q will return FALSE until CLK has a falling and another rising edge Declaration RTRIGInst R TRIG IL FBD CAL RTRIGInst CLK VarBOOL1 RTRIGInst LD RTRIGInst Q R_TRIG ST VarBOOL2 VarB 0001 AELK n VarBOOL ST RTRIGInst CLK VarBOOL1 VarBOOL2 RTRIGInst Q 14 12 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Standard functions 14 5 2 F
124. Each variable is displayed with its current value Tip Only the first variable of the expression will be monitored visible if the input of a function block is an expression e Double click the variable to open the write variable dialog e The current value of the variable can then be changed e No dialog appears for Boolean variables these are toggled e The new value is cyan and remains as is e Execution of menu command Online gt Write values sets all variables to the selected values and displays them in black Lenze DDS EN 2 3 7 35 Show Hide Bookmarks efesotomasyon com Lenze 7 6 7 6 1 7 36 Drive PLC Developer Studio Editors Ladder diagram editor The ladder diagram editor is a graphic editor that uses a sequence of networks LD_EXAMPLE PRG LD ill ES 0001 PROGRAM LD_EXAMPLE 4 gt purssesesessog NH N a T 5s4PT ET Ready Tip The most essential LD editor commands are also available in the shortcut menu right mouse key Cursor positions in LD Organization units with EN inputs and other organization units linked thereto are used as in the function block diagram editor The cursor can have the following positions function block and program calls can be used like contacts 1X0 0 __ _ _ ___ Every text field possible cursor positions identified with a frame Every contact or function block The connection link between contact and coil DDS EN
125. Enter gt e To open the shortcut menu select an object or the object type and press the right mouse key or lt Umschalt gt lt F10 gt Lenze DDS EN 2 3 6 25 Show Hide Bookmarks efesotomasyon com Lenze 6 2 3 3 6 2 4 6 2 4 1 6 2 4 2 6 26 Drive PLC Developer Studio Working with projects and objects Minimize node Icon Menu Shortcut menu Minimize node Keyboard Use this command in the shortcut menu of the Object Organizer to hide the objects listed underneath the selected object e Folders can also be opened and closed with a double click or pressing lt Enter gt e To open the shortcut menu select an object or the object type and press the right mouse key or lt Umschalt gt lt F10 gt Commands in the Project menu Delete object Icon Menu Project Delete object Keyboard lt Del gt Use this command to delete the currently selected object or folder with its objects from the Object Organizer and thus the project e The user will be asked to confirm the delete e lf the editor window of the object was open it will be closed automatically e lf the menu command Edit Cut is used to delete an object the object will be saved to the clipboard Insert object Icon Menu Project Insert object Keyboard lt Insert gt Use this command to create a new object The object type will depend on the tab selected in the Object Organizer Enter the name of the new object in the d
126. Error Otherwise timeouts will be ignored SFClnit e Variable of type BOOL e lf this variable is TRUE the SFC will be reset to the init step and the other SFC flags will be reset too The init step remains active but will not be executed as long as the variable is TRUE Only if SFCInit is reset to FALSE will the organization unit be processed normally again SFCReset This BOOL type variable behaves similarly to SFCInit Here however init step processing is continued after initialization This aspect can be used to reset the SFCReset flag in the init step immediately to FALSE Tip SFCInit and SFCReset cannot be used simultaneously in one organization unit SFCInit will always have priority DDS EN 2 3 7 63 Show Hide Bookmarks efesotomasyon com Lenze 7 64 Drive PLC Developer Studio Editors Example of a declaration PROGRAM flags VAR SFCEnableLinit BOOL SFCError BOOL SFCErrorstep STRING SFCReset AT 3IX1 0 2 BOOL SFCInit AT IX1 0 3 BOOL END VAR SFC QuitError 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 e Variable of type BOOL e Processing of the SFC diagram will be suspended as long as this variable is TRUE SFCTrans e Variable of type BOOL e This variable is set to TRUE if a t
127. FOR loop is equal to or greater than that of the subrange VAR ui UINT 0 10000 END VAR FOR ui 0 TO 10000 DO END FOR The FOR loop is not exited as ui cannot exceed 10000 Observe the content of the CheckRange functions when using incrementation values in the FOR loop Lenze DDS EN 2 3 10 9 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Data types 10 10 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 The instruction will be carried out only if the result of the preceding expression is TRUE For JMPC CALC RETC The instruction will be carried out only if the result of the preceding expression is FALSE IN Otherwise Negation of the operand not of the accumulator Parentheses frame operator the operation in front will be executed only after the right parenthesis has been reached 11 1 DDS integrated IEC operators SG String frame e g string1 Array Representation of the array range e g ARRAY 0 3 OF INT Separator between operand and type in the declaration e g
128. Input Keyboard lt Ctrl gt lt E gt Use this command to insert an input in the CFC editor The inserted input is pre assigned with e Click this text to change it into the required constant or variable Alternatively use the Help Manager lt F2 gt to do so The element Input can be used to read and transfer the value of a variable to another CFC element ol Menu Insert Output Keyboard lt Ctrl gt lt A gt Use this command to insert an output in the CFC editor The inserted output is pre assigned with e Click this text to change it into the required variable Alternatively use the Help Manager lt F2 gt to do so The element Output can be used to read and transfer the value of a variable to another CFC element DDS EN 2 3 Lenze Show Hide Bookmarks 7 7 5 4 7 7 5 9 7 7 5 6 7 7 9 0 7 7 5 8 7 7 5 9 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors Jump Icon Menu Insert gt Jump Keyboard lt Ctrl gt lt J gt Use this command to insert a jump in the CFC editor The inserted jump is pre assigned with the text e Click this text to change it into the required jump label to be jumped to e Insert a jump label with Insert gt Label Label E Menu Insert gt Label Keyboard lt Ctrl gt lt L gt Use this command to insert a jump label in the CFC editor e Click this text to change it into the required jump label e Insert a jump
129. Keyboard lt Ctrl gt lt R gt cx Use this command to insert a RETURN instruction Insertion is made dependent on the selected position e directly before the selected input e directly behind the selected output e directly before the selected intersection or at the end of the network Operator Icon it Menu Insert Operator Keyboard lt Ctrl gt lt B gt Use this command to insert operators functions function blocks and programs e lt first adds an AND operator e t can be converted by overwriting the organization unit type e g AND by OR e Use the Help Manager lt F2 gt to select the required organization unit The formal names of inputs and outputs are displayed for functions and function blocks e There is a variable instance field above the box for function blocks If the organization unit type is changed and thus an unknown function block called the system displays an operator box with two inputs and the specified type If the instance field is selected lt F2 gt can be used to call the Help Manager with the categories for variable selection e Anew organization unit is inserted depending on the selected position Example The current cursor position is identified by a small rectangular box in the example behind the assignment YELLOW EQ avesosese STATE YELLOW 2 EQ STATE 4 e If the new organization unit has a different minimum number of inputs they will be attached e lf the new organizat
130. LC Developer Studio Program example f Example_Trafficlight 9 Select Insert Rectangle 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 Extras To the background to put the rectangle behind the circles f Example_Trafficlight o a 13 Use the mouse pointer to draw a frame around the elements to select all elements within the frame 14 Copy the selected elements to the clipboard using lt Ctrl gt lt C gt f Example_Trafficlight 15 Insert the copied elements into the drawing using lt Ctrl gt lt V gt and position the inserted elements as shown on the left keeping the left mouse key depressed 16 Configure the three circles of the traffic light on the right as follows with a double click Upper circle Category Variables input field Change colour PLC_PRG LIGHT2 RED Middle circle Category Variables input field Change colour PLC_PRG LIGHT2 YELLOW Bottom circle Category Variables input field Change colour PLC_PRG LIGHT2 GREEN f Example_Trafficlight 17 Select Insert Rectangle to draw a rectangle underneath each traffic light 18 Configure the rectangles as follows with a double click Use the category Colours to select No frame colour Use the category Text to enter a text for each traffic light example LIGHT1 and LIGHT
131. LC_PRG PRG SFC Pile Es 0001 PROGRAM PLC_PRG 4 CHANGE1 Now the individual steps must be programmed e Double clicking a step field will open a dialog box to create a new action e We will use IL throughout our example 38 Double click the step Init to open the dialog box New action Name of the Action Action Init Language of the Action da Cancel C FBD C SFC C Sii CFC 39 Select IL as the language for the action and confirm with OK 3 10 DDS EN 2 3 Lenze Show Hide Bookmarks 3 2 8 Lenze efesotomasyon com Lenze 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 Step action Status Light ight LIGHT1 STATE 3 LIGHT2 STATE 3 CHANGE1 LIGHTI STATE 4 LIGHT2 STATE 3 WAIT1 SETTIME t 2s GREEN1 LIGHT STATE 1 LIGHT2 STATE 3 WAIT1 SETTIME t 5s CHANGE2 LIGHT 1L STATE 2 LIGHT2 STATE 3 WAIT1 SETTIME t 2s RED1 LIGHT1 STATE 3 LIGHT2 STATE 3 WAIT1 SETTIME t 1s CHANGE3 LIGHT 1 STATE 3 LIGHT2 STATE 4 WAIT1 SETTIME t 2s GREEN2 LIGHT1 STATE 3 LIGHT2 STATE 1 WAIT1 SETTIME t 5s CHANGE4 LIGHT STATE 3 LIGHT2 STATE 2 WAIT1 SETTIME t 2s RED2 LIGHT1 STATE 3 LIGHT2 STATE 3 WAIT1 SETTIME t 1s This completes the first phase of our program You can no
132. LSE A 4 _0002 b_starting_conditions TRUE v a iP Note Any exit action contained in the active step will be executed during the next cycle only provided the subsequent transition is TRUE 4 4 4 Transition transition condition There are so called transitions between the steps A transition condition must have a value TRUE or FALSE and can therefore consist of e a Boolean variable e ade referenced address to Boolean variable 00 To_b Test e aBoolean constant TRUE e asequence of instructions with a Boolean result in ST syntax e g i lt 100 AND b e asequence of instructions programmed in any language A transition must not contain any programs function blocks or assignments Tip The next step can be reached both via transitions and the single step mode SFCtip and SFCtipmode 4 4 5 Active step The initial SFC editor call always executes the action pertaining to the initial step Wf Action Init IL PLC_PRG PRG SFC PIES CAL LIGHT1 STATE 3 CAL LIGHT2 STATE 3 LD 0 ST COUNTER e Astep whose action is being executed is referred to as the active step e In online mode active steps are displayed in blue 4 12 DDS EN 2 3 Lenze Show Hide Bookmarks 4 4 6 Lenze efesotomasyon com Lenze 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 on
133. Library LenzeElectricalShaft lib The library LenzeElectricalShaft lib contains special function blocks for the electrical shaft Library Lenze9300Servo lib The library Lenze9300Servo lib contains special function blocks for the 9300 Servo PLC and Servo Axis Module ECSXA Library lecsfc lib for IEC steps in SFC The library lecsfc lib contains IEC steps to be used in the Sequential Function Chart User defined libraries A complete and correctly compiled project can be saved under File Save as as internal library lib external library lib or as project pro e The project itself will not be changed e Afterthesave itwill be available as the standard library under the specified name Saving the library removes the organization unit PLC PRG from the project Note Saving the library removes the organization unit PLC PRG from the project DDS EN 2 3 8 43 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Resources 8 44 DDS EN 2 3 Lenze efesotomasyon com Lenze 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 f Example_Trafficlight OF x LIGHT1 LIGHT2 Tip Use the menu command Project Insert obje
134. MPTY 64 Rcv queue was read out too late 0040 CAN_ERR_QOVERRUN 128 Transmit queue is full 0080 CAN ERR QXMTFULL 256 Register test of 82C200 failed 0100 CAN ERR_REGTEST 512 Problem with VxD localization 0200 CAN_ERR_NOVXD 1024 Hardware occupied by the network 0400 CAN ERR _HWINUSE 2048 Network occupied by client 0800 CAN ERR _NETINUSE 5120 Hardware handle was invalid 1400 CAN_ERR_ILLHW 6144 Network handle was invalid 1800 CAN_ERR_ILLNET 7168 Client handle was invalid 1C00 CAN ERR_ILLCLIENT 8192 Resource FIFO client timeout cannot be generated 2000 CAN ERR RESOURCE 40960 General error Contact Lenze A000 40961 This system bus adapter does not allow the selected Use a suitable system bus adapter A001 function Contact Lenze 40962 No system bus adapter active Activate a system bus adapter A002 41217 nternal program error NULL pointer Restart the application 41218 Bus device read timed out Increase the value of parameter Communication timeout for the selected system bus adapter E i n 41219 Internal program error invalid network Install the CAN driver update A103 If the error still occurs contact Lenze 41220 Internal program error invalid data Install the CAN driver update A104 If the error still occurs contact Lenze 41221 Internal program error invalid operation Install the CAN driver update A105 If the error still occu
135. OL DATE TO INT DT_TO BYTE ST b ST i ST byt LD DT 1998 02 13 14 20 DT_TO STRING ST str b DATE TO BOOL D 1970 01 01 i DATE TO INT D 1970 01 15 byt DT_TO BYTE DT 1970 01 15 05 05 05 str DT_TO STRING DT 1998 02 13 14 20 b FALSE 1 29952 byt 129 str DT 1998 02 13 14 20 DATE_TO_INT D 1970 01 15 STRING_TO Converting STRING into another type The operand of type STRING must have a valid target type value as otherwise the result will be O SE LD t 127ms STRING TO BOOL erie Ge STRING TO TIME ST b ST w ST STRING TO BOOL TRUE b TRUE w ee ten 234 w 123 t STRING TO TIME T 127ms t T 127ms TRUNC Converting from REAL to type INT e Conversion uses the integer component of the floating point number e Conversion from higher to lower order types may result in information loss DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 14 2 14 2 1 14 2 2 14 2 3 14 2 4 14 2 5 Lenze Drive PLC Developer Studio IEC 61131 3 Standard functions Numerical functions ABS Returns the absolute value of a number SQRT Returns the square root of a number g SORT 16 LN Returns the natural logarithm of a number LD 45 q LN 45 LN ST q q 3 806663 LOG Returns the logarithm to the base of 10 of anumber EXP Returns the exponential function
136. Online Start to execute the program Since the simulation mode is activated the program will be executed in the DDS instead of the control Monitoring You can follow the sequence of the individual steps of your main program PLC_PRG in the editor window e The active step is displayed blue e Double click the plus sign in the declaration editor to open the variable declaration and monitor the current individual variable values PLC_PRG PRG SFC i RED HEE H Yellow MISS Of EE ni WAIT1 LIGHTOFF fakss LIGHT 3 14 DDS EN 2 3 Lenze Show Hide Bookmarks 3 4 3 4 1 3 4 2 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Program example 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 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 gt Object Insert to create a new visualization 3 Use the dialog box New visualization to enter a new name for the visualization and confirm with OK The system will open a window to help create the new visualization Example_Trafficlight Tip Use the command Extras Settings to open a dialog box to set the representation frame and grid for the visualization
137. Only codes assigned through the Parameter Manager can be displayed and parameterized via GDC Keypad or parameter monitor in the Drive PLC Developer Studio The remaining program structure variables without code connection cannot be accessed via the known field bus profiles parameterization programs operating and display tools If for example the user assigns code C6000 to the variable nDelayTime the parameterization and diagnostics for the variable nDelayTime can be performed via this code Only the codes assigned by the user can be diagnosed parameterized using the parameterization environment DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Resources 8 4 1 Add new object jon Mew msert gt Add 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 Enter the new object Ed Please chose a variable Module Variable name Variable class PLC_PRG COUNTER VAR Global Variables LIGHT LIGHT 1 Green LIGHT 1 O0ff LIGHT1 RED LIGHT1 STATE LIGHT 1 ellow LIGHT 2 Green LIGHT 2 Off LIGHT2 RED WAIT zi Cancel Lenze DDS EN 2 3 8 9 efesotomasyon com Lenze Drive PLC Developer Studio Resources 8 4 2 Terminology used by the Parameter Manager User codes User specific codes user codes can be assigned for variables applied in t
138. RESET VarBOOL2 PV VarINT1 CTUlnst LD CTUInst Q CTU ST VarBOOL3 VarB0 011 AEU LD CTUInst CV VarB00L2H RESET Carita ST VarINT2 VarlNT1 JPY ST CTUInst CU VarBOOL1 RESET VarBOOL2 PV VarINT1 VarBOOL3 CTUInst Q VarINT2 CTUInst CV CTD Down counter CD LOAD and Q are of type BOOL PV and CV are of type INT e lf LOAD is TRUE the counter variable Cv will be set equal to the upper limit PV e f LOAD is FALSE every function block call will decrease CV by 1 e Q returns TRUE if CV is less than or equal to 0 CTD CD LOAD PV Q CV Declaration CTDInst CTD IL CAL CTDInst CD VarBOOL1 LOAD VarBOOL2 PV VarINT1 CTDInst LD CTDInst Q CTD ST VarBOOL3 VYarBOOL14Co LD CTDInst CV VarB00L 2HL0AD CVEVarlNT2 ST VarINT2 VarlNT1 4PY ST CTUInst CD VarBOOL1 LOAD VarBOOL2 PV VarINT1 Var BOOMS CTDInst Q VarINT2 CTDInst CV DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 e f RESET is valid the counter variable Cv will be initialized with O e f LOAD is valid Cv will be initialized with PV e f positive edge CU is valid cv will be increased by 1 as long as CV does not cause an overflow e f positive edge CD is valid cv will be decreased by 1 as long as Cv does not cause an unde
139. RangeSigned lower ELSIF value gt upper THEN CheckRangeSigned upper ELSE CheckRangeSigned value END IF Caution If the two functions CheckRangeSigned and CheckRangeUnsigned do not exist the subrange types will not be type checked at runtime Variables i1 or i2 could then assume any value between 32768 and 32767 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 the value 1000 i will only have the value 4095 in accordance with this assignment Function CheckrangeUnsigned requires function name and interface to be correct FUNCTION CheckRangeUnsigned UDINT VAR INPUT value lower upper UDINT END VAR Functions CheckRangeSigned and CheckRangeUnsigned are available in library CheckRange lib Use the Library Manager Insert gt Additional Library to insert the library into the project Tip If a function CheckRangeSigned or CheckRangeUnsigned is implemented as shown above use of the subrange type in a FOR loop may result in an endless loop This occurs if the range specified for the
140. SE Example varl INT 12 integer variable with initial value 12 e lf the variable is to be directly linked to a certain address the variable must be declared with the keyword AT e Usethe short form mode for quick entry of declarations e In function blocks variables may also be specified with incomplete address details Use of such variables in local instances requires respective entries in the variable configuration Note the automatic declaration option Tip Observe the information given in chapter IEC 61131 3 Operands for variable identifiers DDS EN 2 3 Lenze Show Hide Bookmarks 7 2 11 1 7 2 12 7 2 13 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors Types for variable declaration Icon Menu Insert gt Types Keyboard Use this command to display a selection of types available for variable declaration e Use ofthe Help Manager will also display this list The types are divided into the following categories e Standard types BOOL BYTE etc e Defined types structures enumeration types etc e Standard function blocks for the declaration of instances e Defined function blocks for the declaration of instances The DDS supports all IEC 61131 3 standard types AT declaration If the variable is to be directly linked to a certain address the variable must be declared with the keyword AT The advantage of such an approach is that an address may b
141. Show Hide Bookmarks efesotomasyon com Lenze 9 2 3 9 6 Drive PLC Developer Studio Visualization Examples of impermissible expressions fun 88 a2 9 RETURN Global variables can be written in two ways globvar not possible within a composite expression globvar Selecting visualization elements Tip The commands for editing elements always refer to the element s currently selected Selecting one element e Click the element to be selected e Pressing the lt Tab gt key also causes a jump to the first element in the element list Press the key again to jump to the next element Using the lt Tab gt key while keeping the lt Umschalt gt key depressed causes the system to jump in the opposite direction in the element list Selecting several elements e Keep the lt Umschalt gt key depressed and click the associated elements one after the other or e keep the left mouse key depressed to draw a window across the elements to be selected Selecting all elements e Use the command Extras Select all to select all elements of the visualization Processing from element list e Use the command Extras gt Element list to open the element list e This list includes the type and location of all generated elements Use the button Edit to edit any selected element DDS EN 2 3 Lenze Show Hide Bookmarks 9 2 4 9 2 5 9 2 6 9 2 7 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Visualiza
142. Show Hide Bookmarks efesotomasyon com Lenze Lenze Manual Global Drive Drive PLC Developer Studio Show Hide Bookmarks efesotomasyon com Lenze 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 2005 Lenze Drive Systems GmbH No part of this documentation may be copied or made available to third parties without the explicit written approval of Lenze Drive Systems GmbH All information given in this online documentation has been carefully selected and tested for compliance with the hardware and software described Nevertheless discrepancies cannot be ruled out We do not accept any responsibility or liability for any damage that may occur Any corrections required will be implemented in subsequent editions Windows Windows NT and MS DOS are either registered trademarks or trademarks of Microsoft Corporation in the U S A and or other coun tries IBM and VGA are registered trademarks of International Business Machines Inc All other product names are trademarks of the corresponding owners Version 2 3 01 2005 efesotomasyon com
143. System POUs System POUs are hardware dependent POUs program organization units with special functions which are provided by the associated PLC e g 9300 Servo PLC Drive PLC Also refer associated PLC manual DDS EN 2 3 2 7 efesotomasyon com Lenze Drive PLC Developer Studio Introduction 2 2 8 Resources Resources are required to configure and organize your project and to trace variable values e Global variables to be used throughout the entire project e PLC configuration to configure your hardware e Task configuration to control your program through tasks e Task monitoring to monitor the task runtimes e Watch and Receipt Manager to display and pre assign variable values e Automation system settings for selection and if appropriate for final configuration of the automation system 2 2 9 Libraries The Library Manager can link your project to several libraries whose organization units data types and global variables can be used in addition to the user defined ones ill ES Library Manager CheckBounds lib 10 1 03 12 10 58 Standard LIB 25 3 02 09 07 46 LenzeDrive lib 27 6 02 11 55 24 FUNCTION CheckBounds INT The function CheckBounds prohibits the indirect access outside array limits The global variable g_bErrorCheckBounds becomes TRUE ifthe array limits has been exceed To reset the global variable assign FALSE to it within the user program VAR_INPUT index lower upper INT
144. TRUE e Afterabox with EN input ENO output has been executed the ENO output returns TRUE otherwise FALSE DDS EN 2 3 Lenze Show Hide Bookmarks 7 7 6 5 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors EN inputs ENO outputs can also be negated with Extras gt Negation Example of an enable concatenation The numbers in the top right hand corner of the boxes specify the processing sequence In this example x is to be initialized with 1 and y with O SUB 3 and ADD 5 are not enabled Aslongas x lt 10 ADD 1 is enabled and increases x by 1 every time x x 1 If x 10 the output of box LT 0 will return FALSE and enable SUB 3 ADD 1 will be inhibited and enable ADD 5 via its ENO output O O A O N SUB 3 and ADD 5 will be executed x will be reset to 1 x x 9 and y will be increased by 1 y y 1 7 SUB 3 and ADD 5 will be inhibited again via LT 0 and the process will be repeated from 3 In this example y counts how often x runs through the value range from 1 to 10 Properties Icon Menu Extras Properties Keyboard Use this command to open the dialog box Edit parameters in the CFC editor in which the constant input parameters VAR _ INPUT CONSTANT of functions and function blocks of the selected box can be displayed and modified e These input parameters are not displayed directly in the CFC editor e Instead of selecting the box bo
145. TRUE FALSE E Rei RE free frase fase fase The declaration part of the function block TRAFFICLIGHT now looks as follows si TRAFFICLIGHT FB FBD 0001 FUNCTION_BLOCK TRAFFICLIGHT 0002 VAR_INPUT STATE INT 0004 END_VAR 0005 YAR_OUTPUT RED BOOL Yellow BOOL Green BOOL OffBOOL Function block diagram Now use the input variable STATE of the organization unit to determine the values of the output variables 9 In the lower half of the editor window for the organization unit TRAFFICLIGHT click the field to the left of the first network grey field with number 1 to select the network 10 Select Insert Operator A box with the operator AND and two inputs is inserted in the first network si TRAFFICLIGHT FB FBD 0001 FUNCTION_BLOCK TRAFFICLIGHT A 0002 VAR_INPUT 0003 STATE INT bi 4 gt 11 Click AND and change the text to EQ 12 Select the text of the upper input and enter the variable STATE 13 Select the three bottom question marks and name the input 1 DDS EN 2 3 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Program example 14 Click behind the EQ box to select the output W TRAFFICLIGHT FB FBD l Ea 0004 FUINCTION_BLOCK TRAFFICLIGHT 0009 vAR_INPUT 0003 STATE INT 4 2 pia PORTA nidi 15 Select Insert gt Assignment 16 Change the text at the output to GREEN WI TRAFFICLIGHT FB FBD
146. The loop must terminate because lt INT Var gt will only become greater e f lt INIT VALUE gt is greater than lt END VALUE gt and lt step size gt is negative the FOR loop is counted in opposite direction e f lt INIT VALUE gt is less than lt END VALUE gt and lt step size gt is negative the FOR loop will not be executed Example FOR Counter 1 TO 5 BY 1 DO Varl Varl 2 END FOR Res Varl Assuming that the variable vari has been pre assigned value 1 it will be 32 after the FOR loop Caution lt END VALUE gt must not be the limit value of the counter lt INT_VAR gt If for instance the variable Counter is of type SINT lt END VALUE gt must not be 127 since otherwise the loop would be endless After completion of the FOR loop Counter has a value 6 DDS EN 2 3 Lenze Show Hide Bookmarks 4 3 10 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Programming languages 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 lt Boolean expression gt DO lt instructions gt END WHILE e The lt instructions gt will be executed again and again until the lt Boolean expression gt returns TRUE e f lt Boolean expression gt is FALSE on first evaluation already the lt instructions gt will never be executed e lf lt Boolean expression gt is never FALSE the lt instructi
147. Time limit overview Keyboard Use this command to open the dialog box Time limit overview to edit the time settings for your SFC steps SFC Time Limit Overview List of Steps H2s Cancel E Step Name Minimal Time Maximal Time CHANGE4 t 2s 21 Os The dialog box Time limit overview displays all steps of your SFC organization unit If a time limit has been entered for a step it will be shown to the right of the step minimum limit first then maximum limit Edit time limits Time limits can be edited 1 Click the required step in the overview The step name is displayed at the bottom of the window 2 Use input fields Minimal time Maximal time to specify the required time limit Constant or variable of type TIME e g T 3s 3 Click OK to close the dialog box and save the changes DDS EN 2 3 7 61 Show Hide Bookmarks efesotomasyon com Lenze 7 8 3 8 7 8 3 9 7 8 3 10 7 62 Drive PLC Developer Studio Editors Options Menu Extras gt Options Keyboard Use this command to open a dialog box for the setting of different options for your SFC organization unit Height of Steps 4 Lines Width of Steps __Cancel Width of Comment e m Display at Step Nothing Comment Time Limits 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 Width of st
148. Translate project into another language Z Translation file amplestPractice_TrafficLight testtl Search Target language English Cancel The current project can be translated into a different language using a valid translation file DDS EN 2 3 Lenze Show Hide Bookmarks 6 1 2 7 Lenze efesotomasyon com Lenze 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 Progress and any error messages willbe displayed during the translate After the translate the dialog box and all other open dialog windows will be closed Cancel The button closes the dialog box without saving changes Should there be incorrect entries in the translation file pressing OK will output an error message with file path and incorrect line C Program files DDS projects visu tlt 78 expect translated text Document project Menu Project gt Document project Keyboard Use this command to print the documentation for an entire project Complete documentation comprises e Contents of the documentation e Organization units
149. _TRIG Falling edge detector FUNCTION BLOCK F TRIG VAR_INPUT CLK BOOL END VAR VAR OUTPUT O 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 l e with every subsequent function call Q will return FALSE until CLK has a rising and another falling edge Declaration FTRIGInst F_TRIG IL FBD CAL FTRIGInst CLK VarBOOL1 FTRIGInst LD FTRIGInst Q F_TRIG ST VarBOOL2 VarB 0001 AELK n VarBOOL ST FTRIGInst CLK VarBOOL1 VarBOOL2 FTRIGInst Q Lenze DDS EN 2 3 14 13 Show Hide Bookmarks efesotomasyon com Lenze 14 6 14 6 1 14 6 2 14 14 Drive PLC Developer Studio IEC 61131 3 Standard functions Counters CTU Up counter CU RESET and Q are of type BOOL PV and CV are of type INT e RESET is TRUE the counter variable Cv is set to 0 e Every positive edge at input CU increases CV by 1 As long as CVis less than PVmax i e no overflow e Q returns TRUE if CV is greater than or equal to the upper limit PV CTU CU RESET PV Q CV means e lf RESET is TRUE the counter variable Cv will be initialized with O e f CU has a rising edge Cv will be increased by 1 Declaration CTUInst CTU IL CAL CTUInst CU VarBOOL1
150. a 40 50 60 70 80 ST Varl Varl 30 Tip For runtime optimization the system now computes the expression attached to the input side of INk Contrary to this simulation computes all branches 12 5 Comparison operators Types The operands of the following comparison operators can be of type BOOL BYTE WORD DWORD SINT USINT INT UINT DINT UDINT REAL TIME DATE TIME OF DAY DATE AND TIME and STRING 12 5 1 GT Greater than A Boolean operator with the result TRUE if the first operand is greater than the second operand 20 gt 30 Varl FALSE 12 10 DDS EN 2 3 Lenze Show Hide Bookmarks 12 5 2 12 5 3 12 5 4 12 5 5 12 5 6 Lenze efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Operators LT Less than A Boolean operator with the result TRUE if the first operand is less than the second operand Mi sa _ _ ke_______________________ LD 20 Vari 20 lt 90 DT LT 30 20 Si Yarl ST Vari Varl TRUE 30 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 Vari GE Greater than or equal to A Boolean operator with the result TRUE if the first operand is greater than or equal to the second operand Vari EQ Equal to A Boolean operator with the result TRUE if the operands are equal to each other Varl TRUE
151. able In such cases use the type conversion functions of the standard library BOOL constants BOOL constants are TRUE and FALSE They take up 1 Byte memory TIME constants The DDS allows the declaration of TIME constants These are specifically used for the timers of the standard library A TIME constant always consists of a leading t or T or time or TIME in full text and a hash This is followed by the actual time declaration that may consist of days d hours h minutes m seconds s and milliseconds ms Note that time specifications must be sorted by size d before h before m before s before ms while not all specifications must occur Examples of correct TIME constants in an ST assignment TIME1 T 14ms TIME1 T 100s12ms Overflow in the highest order component allowed TIME1 t 12h34m15s DDS EN 2 3 13 1 Show Hide Bookmarks efesotomasyon com Lenze 13 1 4 13 1 5 13 1 6 13 2 Drive PLC Developer Studio IEC 61131 3 Operands Examples of incorrect TIME constants TIME1L t 5m68s Overflow in lower order component TIMEIl 15ms T 18 missing TIMEl1 t 4ms13d Wrong sequence of time units Maximum size DWORD 23 1ms 49days 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 TIME_OF DAY
152. ables of these FBs can be assigned all known parameter codes e g 9300 servo inverter V2 0 using the Parameter Manager These assignments can of course be revoked again Use the correct instance name in the declaration editor of the Program type POU for this assignment e The instance name is the name of the function block followed by a number 1 2 3 e This syntax is valid for all Lenze function blocks e lf the syntax is changed only user codes C3000 C7999 can be assigned to the instances Example of the exact declaration based on function block L_DIGDEL for the 9300 Servo PLC If the function block L DIGDEL from the Lenze library LenzeDrive lib is used in a Program type POU for example the FB instance name must be exactly L_DIGDEL1 L_DIGDEL1 of function block type L_DIGDEL L_DIGDEL1 L_DIGDEL byFunction L DIGDEL w DelayTime e Only with the correct selection of the FB instance name can the known parameter codes see table below of the 9300 Servo PLC be assigned to the function block by clicking First instance e Further instances are then named L_DIGDEL2 L DIGDEL3 etc Note that only L DIGDEL1 andL_DIGDEL2 can be assigned the parameter codes of the 9300 Servo PLC because this PLC has only two instances of this function block Further instances e g L_DIGDEL3 can only be assigned user codes Tip The available instances of a function block are described in the online help chapter Lenze funct
153. acro is run prior to the compile Macro after compile This option influences the compile process the macro is run after the compile Macro commands The appendix includes a list of all macros Command line commands Command file commands 15 2 DDS EN 2 3 5 13 efesotomasyon com Lenze 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 Options Macros All settings defined in the dialog box Build options are saved together with the project Options Passwords Category Load amp Save E OK User Information LESENE _ ok Editor i Desktop SII 5 _ Cancel Colors aaa Directories e i Log Build Write Protection Password Macros GDC Device Description l The DDS offers password protection for your files against unauthorized access opening or editing Defining a password for opening a file 1 Enter the required password in text field Password Every letter is represented by an asterisk 2 Repeat the password entry in the text field Confirm password 3 Click OK to close the dialog box If the message Password and its acknowledgement do not match appears one of the two inputs contains a typing error Retype both entries to ensu
154. ages of system organization units PLC configuration for the configuration of your hardware Task monitor for monitoring the task runtimes Task configuration for the control of your program via tasks Watch and Receipt manager for the display and pre assignment of variable values Automation system settings for automation system selection and parameterization 1 8 38 DDS EN 2 3 8 1 Show Hide Bookmarks efesotomasyon com Lenze 8 1 8 1 1 8 2 Drive PLC Developer Studio Resources Global variables The tab card Resources in the Object Organizer contains the global variable list Global_Variables in the folder Global variables e All variables defined in this object are known throughout the entire project e Double click the object Global_Variables to open and edit the variable list Global variables Normal global variables are defined in an object betweenthe keywords VAR_GLOBALand END VAR VAR GLOBAL Variable declarations END VAR Retentive global variables Retentive global variables are assigned the additional keyword RETAIN VAR GLOBAL RETAIN Variable declarations END VAR Global constants Global constants are assigned the additional Keyword CONSTANT VAR GLOBAL CONSTANT Variable declarations END VAR Retentive global constants Retentive global constants are assigned the additional keyword CONSTANT RETAIN VAR GLOBAL CONSTANT RETAIN Variable declarations END V
155. al e If lt Boolean expressionl gt returns TRUE only lt IF instructions gt will be executed e Otherwise the Boolean expressions starting with lt Boolean_expression2 gt will be evaluated one after the other until one of the expressions returns TRUE Then only the instructions after this Boolean expression and before the next ELSE or ELSIF will be evaluated e f none of the Boolean expressions is TRUE only the lt ELSE instructions gt will be evaluated DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Programming languages Example IF temp lt 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 lt Varl gt OF lt Value 1 gt lt instruction 1 gt lt Value 2 gt lt instruction 2 gt lt Value n gt lt instruction n gt ELSE lt ELSE instructions END CASE A CASE instruction is processed as described below e lf the variable in lt Var1 gt is set to lt Value is the instruction lt instruction i gt willbe executed e If lt Var 1 gt does not equal one of the specified values the lt ELSE instruction gt will be executed e lf the same instruction is to b
156. al modifiers LD TRUE Load TRUE to the accumulator ANDN BOOL1 Execute AND with the negated value of the variable BOOL1 JMPC label If the result was TRUE gump to the label label LDN BOOL2 save the negated value of ST ERG BOOL2 in ERG Label LD BOOL2 save the value of ST ERG BOOL2 in ERG IL also allows the setting of parentheses after an operation The value in parentheses is taken as operand Example 1 Example 2 LD 2 LD 2 MUL 2 MUL 2 ADD 3 ADD 3 ST Result ST e In example 1 the value of Result is 7 e In example 2 with parentheses the value for Result is 10 because the operation MUL will only be evaluated on reaching the operand for MUL is 5 DDS EN 2 3 4 3 Show Hide Bookmarks efesotomasyon com Lenze 4 3 4 3 1 4 3 2 Drive PLC Developer Studio Programming languages Structured text ST Structured text consists of a series of instructions that can be executed as conditioned in very high levellanguages IF THEN ELSE orinloops WHILE DO An instruction is completed with a semicolon Example IF value lt 7 THEN WHILE value lt 8 DO value value 1 END WHILE END IF Expressions An expression returns a value on evaluation and consists of operators and operands An operand can be e aconstant e avariable e afunction call e or another expression Evaluating expressions Expressions are evaluated by pr
157. alue instanz varoutl instanz fub 54Hparl yaroutt value 5par2 varout2 gquad Program A program is an organization unit that returns one or several values on execution e A program declaration starts with the keyword PROGRAM e Programs are known globally throughout the entire project e Programs can be called by programs and function blocks Program calls in a function are not allowed Programs do not have instances e fan organization unit calls a program thus changing program values these changes remain active for the next program call even if the program is called by another organization unit Tip Only the values in the associated instance of a function block are changed on function block call These changes are significant only if the same instance is called Program example Example of a program in IL Examples of calling the program shown on the left 1 PRGexample PRG IL IL CAL PRGexample O001 PROGRAM PRGexample LD PRGexample par 0002 4 amp R_IN_OUT ST result O04 END VAR ST PRGexample result PRGexample par FBD PRGexample par par result Example of a possible call sequence from a main program LD 0 ST PRGexample par par is preset with 0 CAL AWLexample result in AWLexample 1 CAL STexample result in STexample CAL FUPexample result in FUPexample 3 E9 e f the variable par of the program PRGexample is initialized with 0 from the main program and programs are then call
158. and click OK The library is now listed in the Library Manager and the objects of the library can be used like user defined objects Tip This command is also available via the shortcut menu right mouse key in the top left hand pane of the Library Manager Properties Icon Menu Extras Properties Keyboard lt Alt gt lt Enter gt Use this command to obtain information on the selected library DDS EN 2 3 Lenze Show Hide Bookmarks 8 11 2 8 11 3 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Resources 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 The difference between a standard function and an operator is that the operator is implicitly known to the programming system whereas the standard organization units must be linked to the project as library standard lib Library LenzeDrive lib The library LenzeDrive lib includes function blocks to implement standard drive tasks for 9300 Servo PLC Drive PLC and Servo Axis Module ECSxA e Multiple instancing of these function blocks as per IEC 61131 3 is possible
159. and eliminate any reported errors Simulation with the DDS Once all errors have been eliminated activate the simulation log into the simulated control and start the project The DDS is now in online mode The window with the PLC configuration can now be opened and the project can be checked for correct operation For this purpose assign the inputs manually and check that the outputs are set as required The organization units also allow a monitoring of local variable current values Use the Watch and Receipt Manager to configure the data records to be monitored Note Lenze function blocks are not simulated Simulation is generally restricted Debugging with the DDS In the event of a programming error breakpoints can be set If program execution stops at a breakpoint the values of all project variables as at that time can be inspected Logical correctness of the program can be checked by step by step processing single stepping Program variables and inputs outputs can be set to specific values Project documentation using the DDS The entire project can be documented or exported to a text file at any time DDS EN 2 3 2 1 Show Hide Bookmarks efesotomasyon com Lenze 2 2 2 2 1 2 2 2 2 2 3 2 2 Drive PLC Developer Studio Introduction Project components 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
160. and file cmdfile command cmd is processed DDS EN 2 3 15 1 Show Hide Bookmarks efesotomasyon com Lenze 15 2 15 2 Drive PLC Developer Studio Appendix Command file Cmdfile commands The commands that may be used within a command file lt cmdfile gt 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 Any white spaces in parameters require the respective parameters to be put in quotes ine sin reinate simulation 7 Onine Sti SSSOSCS Menu Project commands project compile or project build Incrementally compile the loaded project Project Compile project rebuild Completely compile the loaded project Project Compile all project clean Deletes compile and download information in the current project Project Clean all project import lt file 1 gt Import the specified files lt file1 gt lt file n gt into the loaded project Project Import lt file n gt project export lt expfile gt Export the loaded project into the specified file lt expfile gt Project Export project expmul lt dir gt Export every object of the loaded project into the directory lt dir gt into a separate file each bearing the object s name Open the specified file fo
161. anges and close the dialog box To the foreground Icon Menu Extras gt To the foreground Keyboard Use this command to bring the selected visualization elements to the front To the background jon Menu Extras gt To the background Keyboard Use this command to send the selected visualization elements to the back Align Icon Menu Extras gt Align Keyboard Use this command to align several selected visualization elements The following alignment options are available All elements are aligned with their left hand edge with the element on the extreme left Right top bottom Alignment analogous to Left Horizontal middle All elements are aligned by their horizontal centre within the centre of all elements Vertical middle All elements are aligned by their vertical centre within the centre of all elements Select all Icon Menu Extras gt Select all Keyboard Use this command to select all visualization elements of the current visualization object DDS EN 2 3 Lenze Show Hide Bookmarks 9 2 8 6 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Visualization Placeholder list Menu Extras Placeholder list Keyboard Every point of the configuration dialog Extras Configurethat 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 integr
162. as 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 A system error trips the automation system e The response of motor control and digital outputs can be set under Project Exception handling also refer associated system organization unit description in the manual for the respective Lenze automation system e The program can only be restarted after a TRIP reset or mains switching A TRIP reset Keypad STOP gt RUN key GDC Code C0043 resets the Lenze automation system after a task overflow and the error message Task overflow is acknowledged The automation system must be corrected to prevent further task overflows The watchdog time is set as follows e Use the task dialog box Properties input field Watchdog time to enter the maximum runtime for the task e Interval The watchdog time is between 0 100 of the interval time default 90 and can be set between 1 ms and 300 ms With a 1 ms task the watchdog time is 1 ms 100 fixed e Event Interrupt The watchdog time can only be set less than 300 ms default 100 ms e Use the dialog box Exception handling Project gt Exception handling input field Watchdog time to enter the maximum runtime for the
163. ask Interrupt EVENT With an event controlled task the Boolean status of the associated variable or the hardware interrupt must change from FALSE to TRUE to start this task e The initial status TRUE of the variable does not start the task DDS EN 2 3 8 29 Show Hide Bookmarks efesotomasyon com Lenze 8 8 2 8 8 3 8 30 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 e A priority cannot be assigned twice It is thus not possible to have two tasks with the same priority e The priority of a task can not be changed while the automation system runs in online mode e The priority of a task decides whether another currently processed task will be interrupted or not If a lower priority task is started while a task is running the lower priority task will wait and not interrupt the running task Data consistency Multitasking operating systems or in general all software structures featuring concurrent processes running at different cycle times have a problem with data inconsistency which we will briefly look into
164. at this point When do data inconsistencies occur e Variable A is used in different places within routine 1 At routine 1 runtime variable A is changed by a routine 2 e Adata record consists of 4 variables that must be checked out from the memory for reading An Interrupt Service Routine 2 changes this data record during the read access Normal data processing IPO principle Normal data processing for simple PLC systems for example always follows the IPO principle input processing output where the data inconsistency problem does not occur The IPO principle deals with only one data processing branch e All data required are read at the beginning of the loop e Inthe middle of the loop the data are processed and the output values calculated e The data are output at the end of the loop just before the loopback INPUT PROCESS OUTPUT With this method the input data are the same and constant during the entire processing time until the new read at the beginning of the loop Since there are no further processes that interrupt the IPO process during the runtime of the loop and may access data of the running process there is no reason for data to become inconsistent DDS EN 2 3 Lenze Show Hide Bookmarks 8 8 4 8 8 5 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Resources If a task overflow leads to a system error If for instance a continuous loop or too much program content h
165. ate an identically named subfolder within a folder Selecting objects Selected objects are highlighted in blue Selecting the entire project To select the entire project select the project name in the first line Selecting individual objects To select individual objects click the associated object or move the dotted rectangle over the object with the help of the arrow keys Objects with a plus sign in front of their icon are organization objects that contain further objects Click a plus sign to open the organization object and click the minus sign to close it again Selection of an organization object also selects all associated objects Selecting an object range Keep the lt Umschalt gt key depressed to select a range of objects Selecting several individual objects Keep the lt Ctrl gt key depressed to select several individual objects DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 e Folders can be nested to any depth e 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 H Functions A click on the plus sign opens the folder and dis
166. ated into other visualization objects as a reference On calling the respective reference the placeholder can then be substituted accordingly with the variable or text The dialog shows the placeholders used in the current visualization object and allows a preliminary definition The input focus must be on the visualization object On reference configuration each placeholder can be substituted with the associated values Placeholders This column lists the placeholders available for visualization Element numbers Displays the number of the element for which the placeholder was generated Also compare the element list numbers Replacements This option allows the input of a selection of strings which the placeholder substitutes The placeholder is the reference to the string The strings must be comma separated Where no entry exists the placeholder can be substituted with any text during reference configuration Possible replacements Placeholder Element number Replacements fet cat We lt lt pic_prg var a pic_prg var_changecolour2 cnr TS DDS EN 2 3 9 9 Show Hide Bookmarks efesotomasyon com Lenze 9 3 9 3 1 9 3 1 1 9 10 Drive PLC Developer Studio Visualization Configuring visualization elements Commands in the Extras menu Settings Icon Menu Extras gt Settings Keyboard Use this command to open the dialog box Visualization settings for the following settings Cat
167. ator will be connected to the branch to the left of the selected element e The operator output will be connected to the branch to the right of the selected element Last cursor position in network selected e f selecting the last cursor position of a network the organization unit will be inserted behind the last element e The first input of the organization unit will be connected to the branch to the left of the selected position Input Icon al Menu Insert gt Input Keyboard lt Ctrl gt lt U gt Use this command to insert an operator input The number of inputs is variable for many operators e g ADD may have two or more inputs Such an operator can be extended by an input as long as the input in front of which the new input is to be inserted or the operator itself if a bottom most input is to be added is selected The inserted input is pre assigned with e Click this text to change it to the required constant or variable Alternatively use the Help Manager lt F2 gt to do so Note This command is also available in the ladder diagram editor DDS EN 2 3 Lenze Show Hide Bookmarks 7 5 3 6 7 5 4 7 5 4 1 7 5 4 2 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors Output Icon TE Menu Insert gt Output Keyboard Use this command to add an additional assignment to an already existing assignment This function assists the generation of
168. bal_Variables U Conversion not implemented You are using a conversion function that is not implemented for the current code generator 0 F Go Go Q3 4 Go N Q O N Go O Go Go Q A Q Q Q A Q k 4 Q A Q A Q Q Q A Q A 4 Q 3 40 3410 3411 3450 EA mel 3454 The address lt Name gt references an assigned memory location Q 15 12 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Appendix Possible remedy 3501 No address in VAR_CONFIG for lt Name gt Insert an address for the named variable in the global variable list with Variable_Configuration Ressourcen Global_Variables 3502 Wrong data type of lt Name gt in VAR_CONFIG The named variable was declared in the global variable list with Variable configuration with a different data type than in the function block 3503 Wrong address type of lt Name gt in VAR_CONFIG The named variable was declared in the global variable list with Variable configuration with a different address type than in the function block 3504 Initial values for VAR_CONFIG variables are not supported A Variable Configuration variable has been declared with address and initial value However I an initial value can be defined only for input variables without address assignment 3505 A non existent variable was specified in the variable configuration 3506 Access pat
169. be selected e Use the command Extras Select all to select all elements Copying and deleting elements Use the standard Windows clipboard commands in the Edit menu to copy or delete one or more selected elements DDS EN 2 3 7 43 Show Hide Bookmarks efesotomasyon com Lenze 7 7 4 7 7 9 7 7 5 1 7 7 5 2 7 7 5 3 7 44 Drive PLC Developer Studio Editors Moving elements To move one or more selected elements keep the lt Shift gt key depressed and use the arrow keys Elements may also be moved while keeping the left mouse key depressed e Releasing the left mouse key drops these elements at the current location e lf 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 Commands in the Insert menu Operator Icon E Menu Insert Operator Keyboard lt Ctrl gt lt B gt Use this command to insert an operator in the CFC editor The inserted operator is always an AND It can be converted into any other operator function function block and program by selecting and overwriting the text Use the Help Manager lt F2 gt to select the required box from the list of supported boxes If the new box has a different minimum number of inputs they will be attached If the new box has a lower maximum number of inputs the last inputs including the preceding branches will be deleted Bl Menu Insert
170. be selected according to the data type g ScaleFunctionReal REAL g fScaleFunctionByte BYTE g fScaleFunctionSint SINT g ScaleFunctionInt INT g fScaleFunctionWord WORD g fScaleFunctionDint DINT g fScaleFunctionDword DWORD g fScaleFunctionBool BOOL Example e Ifthe display code is assigned to a variable of type BYTE a write must be performed to g fScaleFunctionByte in the associated scale function 8 18 DDS EN 2 3 Lenze Show Hide Bookmarks Lenze efesotomasyon com Lenze 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 Project Add 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 Add scale function Fa Chose the programming language and scale function Name of scale function L f th le functi Peg capt Taper N en SCAL_wVacantParkingLot G AWL C KOP FUP C AS ST 5 bPhotosensar bPhotosensor2 bResetLots bT rafficLightGreen bT rafficLightRed iw acantParkingLat 4 Use the button Add to add the scale function or Close to cancel the process and close the dialog box The scale function is inserted underneat
171. binary format target files for all installed targets if available Local gateway Gateway files Gateway exe GatewayDDE exe GClient dll GDrvBase dll GDrvStd dll Ghandle dll GSymbol dil GUtil dll and other DLLs in the gateway directory 6 4 DDS EN 2 3 Lenze efesotomasyon com Lenze 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 Details Local Gateway Ei Include the following entries into the archive C Programme Lenze DDS_P_2_00 GClient dil C Programme Lenze DDS_P_2_00 GUti dil C A AWINNT System32 CommDrvPeak dll C WINNTSSystem32 CommLDS dll C WINNT System32 GDrvStd dll Select All Select None cova The dialog box shows the local gateway details that can be selected directly with Y Use the button Select all to select everything Select none removes the ticks Confirm with OK Other files Use the button Other files to open a dialog box to transfer user defined files into the archive Comment The button opens a text editor to generate a README TXT file that contains the specified text which is automatically extended by the generation date and the version number of the currently used DDS version Generating the ZIP archive The ZIP archive can be generated once all settings hav
172. bject Organizer on the index card Data types They start with the keyword TYPE and end with END TYPE Syntax TYPE lt Identifier gt lt Enum 0 gt lt Enum 15 lt Enum n gt END TYPE The values are compatible with integers i e operations can be carried out as with INT A number x may be assigned to the lt Identifier gt This applies to variables only If the enumeration values are not initialized counting starts at 0 Each enumeration takes up 1 byte of memory Ensure when initializing that the initial values are in ascending order The validity of the number is checked at runtime Example TYPE TRAFFICLIGHT red yellow green 10 red has the initial value 0 yellow 1 green 10 END TYPE Declaration TRAFFICLIGHT1 TRAFFICLIGHT 0 TRAFFICLIGHT1 has the value red Implementation IF TRAFFICLIGHT red THEN TRAFFICLIGHT GREEN END IF Lenze DDS EN 2 3 10 5 Show Hide Bookmarks efesotomasyon com Lenze 10 2 4 10 6 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 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 Structure declarations have the following syntax TYPE lt Struct
173. bject on tab Resources in the Object Organizer e 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 e 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 6 PLC configuration 8 23 e Some system organization units are always processed by the runtime system These system organization units are assigned to a specific system task with a fixed time interval refer associated system organization unit description in the manual for the relevant Lenze automation system e Double click the object Process image in the Object Organizer to open the dialog box Process image Process mirror Ei YO Module Module name __________________ Taskname Interval IN 1 DIGITAL_IO Cycle task Cycle IN 11 ANALOGI_IO Cycle task Cycle IN 21 DFIN_IO DigitalFrequency Enc Leitfreq Cycle task Cycle IN 131 MCTRL_MotorControl Systemtask Tms OUT 131 MCTRL_MotorControl Systemtask Tms IN 121 DCTAL_DriveControl Systemtask 2ms The dialog box Process image shows in which task the process image of a system organization unit is generated or written Note As aconsequence of a system organization unit not listed in this dialog box no process image will be created and the system organization unit will not be
174. ble clicking the entry or pressing lt Enter gt If the cursor is positioned over an entry for a program call double click the entry to open the dialog box Program entry Click a task or program name or press the lt Space bar gt to draw an editing frame around the name The name can then be changed directly in the task editor DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 Watch and Receipt Manager Standard 0004 PLC_PRG LIGHT1 STATE PLC_PRG LIGHT1 RED PLC_PRG LIGHTA YELLOW PLC_PRG LIGHT1 GREEN Use the Watch and Receipt Manager to e display values of certain variables e pre assign variables with certain values and transfer them to the control in one go e read and save current control values as pre assignment in the Watch and Receipt Manager These functions assist in the generation and logging of control parameters for example e The left hand panel of the Watch and Receipt Manager displays all generated watch lists that can be selected with a click or using the arrow keys e The right hand pane of the Watch and Receipt Manager displays the associated variables 8 9 1 Watch and Receipt Manager in offline mode In offline mode it is possible to create several watch lists in the Watch and Receipt Manager using Inse
175. breakpoint is to click the network number field SFC In the SFC editor the breakpoint will be set to the currently selected step e To set or remove a breakpoint double click while keeping the lt Shift gt key depressed Note The setting of breakpoints will affect the operating system s processing schedule DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 6 3 1 10 6 3 1 11 6 3 1 12 Lenze Drive PLC Developer Studio Working with projects and objects Breakpoint dialog Use this command to open a dialog box to edit breakpoints in the entire project POU JPLCPRG O Cose Location een x Breakpoints PLC_PRG CHANGE1 PLC_PRG GREEN1 PLC_PRG RED1 Delete All Goto e 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 Inthe combination box Location select the line or the network in which the breakpoint is to be set 3 Click Add to set the breakpoint at the required position The breakpoint will be added to the list Deleting a breakpoint Select the breakpoint to be deleted in the list of set breakpoints and click Delete e Click Delete all to delete all breakpoints Going to breakpoint position To reach the location within the editor where a specific breakpoint was set select the breakpoint in the list of set breakpoints and click Go to
176. by a member of a specific user group e The member must authenticate himself with a password The user groups are numbered from 0 to 7 with group 0 having administrator rights i e only group O members must define passwords and access rights for all groups or objects e New projects are initially not password protected e As long as no password has been set up for user group 0 everybody who opens the project is a member of user group 0 e fa password has been set up within a project for user group 0 all groups are prompted for a password when opening the project 1 Use the combination box User group to select the group you belong to 2 Use the text field Password to enter the password 3 Click OK to accept the input If the password does not match the saved password the message The password is not correct will be displayed e Only correct password entry will open the project Caution A project may be opened via a user group that was not assigned a password e Use the menu item Project gt User group passwords to assign passwords e Use the menu item Project Objects Access rights to assign rights for individual or all objects 6 1 3 1 User group passwords con Use this command to open the dialog box User group passwords Note This command can only be executed by members of group 0 administrators Dialog box User group passwords User Group Passwords Fa User Group Password Level O XXXXXX
177. call in accordance with the selected element Click a task or program name or press the lt Space bar gt to draw an editing frame around the name The name can then be changed directly in the task editor DDS EN 2 3 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Resources 8 8 6 1 Insert task Add task Insert gt Insert task Keyboard Insert gt Add task Use this command to insert a new task to the task configuration e lfatask has been selected the command Insert task is available and inserts the new task in front of the cursor e lf Task configuration is selected the command Add task is available and adds a new task to the end of the existing list Selection of one of the two commands opens the dialog box Task properties where the required attributes can be entered Name Priority 0 8 Interval T 1ms T 16000ms ams Select Event PO nterupts Interrupt PO Watchdog time T 1ms T 300ms THim ss S e Name of the task max 40 characters e Priority of the task number between 0 and n 0 task inhibited 1 highest priority n lowest priority e Interval after which the task is to be restarted e Event variable which is to effect task execution after a rising edge To select the event from the declared variables click Select to open the Help Manager e Interrupt To select a real interrupt click the button Interrupts e Watchdog time of the
178. called or processed either Dialog box Process image provides a shortcut to establishing why the data of asystem organization unit are not processed A process diagram for the outputs of a system block will only be generated if the outputs are accessed in writing mode If the outputs are accessed in reading mode the action will not appear in the process diagram DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Resources 1 0 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 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 e Either the task name selected in the task configuration or the cyclical task or system task certain system organization units are assigned to the system task e The system automatically determines the optimized time cycle for the system organization unit Interval This column specifies the time cycle for process image updates Tip Check before the download whether all applied system organization blocks are listed in the dialog box Process image to detect errors quickly 8 5 1 Generating the process image The process image
179. cant DDS project files The ZIP file can be saved in the file system or e mailed After the ZIP file has been decompressed you can log in a controller without prior download Note Proceed as follows to use the ZIP archive in this way 1 The corresponding files libraries bitmaps etc of a project must be created relative to the project E amani C Info C Libraries 2 Open the following dialog using the menu command Project gt Options category Directories and enter just in the field Libraries The input fields Compile files and Configuration files remain empty Project Libraries lt nai Compile files p Configuation fies FT Note Paths which have been assigned a disk drive SUBST Disk drive1 Disk drive2 Path are not Supported Do not use the SUBST Windows function DDS EN 2 3 6 3 Show Hide Bookmarks efesotomasyon com Lenze Working with projects and objects Drive PLC Developer Studio 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 File Save 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 If no bitmaps are contained you can ignore this item Save Archive Fa Include the follo
180. ce 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 A step and a Boolean variable must not bear the same name as logical errors may otherwise occur e The flag does not need to be explicitly declared e Thestep flag active or inactive step status is represented by the logical value of a Boolean variable lt StepName gt e This Boolean variable has a value TRUE if the associated step is active and FALSE if it is not This variable is implicitly declared and can be used in any action and transition of the SFC organization unit Time flag The active time of a step can be interrogated via flag time lt StepName gt e The flag does not need to be explicitly declared e Interrogation works only if a minimum time was set in the step attributes for the step to be interrogated for example t 0ms IEC step SFC also offers standard compliant IEC steps in addition to the simplified steps Include the SFC library iecsfc lib into your project to use IEC steps An IEC step can be assigned any number of actions e Unlike simplified steps IEC actions are not firmly assigned to a step as an entry or exit action but are available separately from the steps and can be applied more than once within their organization unit For this purpose IEC actions
181. cessed first before all active actions both in alphabetical sequence In the Object Organizer the actions are attached directly under the associated SFC organization unit J POUS SREE Clima i E E Ground PRG i sas E Day G3 Lighting d Sleeping_Room PRG E Bed_Light Tosi E Top_Light Z POUs Z Data types Visualizations Resources e New actions can be generated with Project Add action Qualifiers The following qualifiers are available to associate actions to IEC steps IN onsa Trearlonvatheaslongastiesepiadie SSCS TR overidng Resi Thea is ennio OOO S Settore The action is arated andreas acte ni SSCS P oa time Delayed The action will become active after a certain period of time as long as the step is still active and then as long as the step remains active Pulse The action is executed exactly once only when the step becomes active Stored and time Delayed The action is activated after a certain period of time and remains active until reset Delayed and Stored The action is activated after a certain period of time as long as the step is still active and remains active until reset Stored and time Limited The action is active for a certain period of time e The qualifiers L D SD DS and SL require a time specification in TIME constant format e g L T 5s DDS EN 2 3 Lenze Show Hide Bookmarks 4 4 8 4 4 9 Lenze efesotomasyon com Lenze Drive PLC De
182. ch a Boolean negation can be performed An tora eee nee eee A 4208 The expression in front of a conditional command must Ensure that the expression returns a Boolean result or use a type conversion en OO Li Le 14209 Function names are not allowed here names are not allowed here Replace the function call with a variable or constant the function call with a variable or constant a VI I CALC and CALN require a function block instance as Declare an instance ee TT the function block to be called an operand 4211 Comments in IL at the end of the line only Move the comment to the end of the line or into a separate line 4212 Accumulator invalid before conditional instruction The accumulator content is not defined This is the case after instructions that do not return any result CAL for example The line does not start with a correct ST instruction 4256 NOT requires a Boolean operand Ensure that the condition following a NOT is a Boolean expression 4257 The counter of the FOR instruction must be INT type Ensure that the counter variable is an integer or bitstring data type DINT DWORD for example 4258 The counter in the FOR instruction is no write accessible Replace the counter variable with a write accessible variable variable 4259 The start value of the FOR instruction must be INT type The start value of the FOR instruction must be compatible with the counter variable type 4260 The end value of the FOR instr
183. click OK Channels displays the IP address of the gateway PC and Communication parameters the parameters set on the PC e f Not connected is displayed behind the IP address the communication driver GATEWAY EXE is not running on the gateway PC Start the driver from the DDS on the gateway PC Removing a communication channel via a TCP IP network to a remote gateway PC Proceed as follows to remove a connection to a remote gateway PC and return to the local gateway 1 Select the IP address in Communication parameters under Communication parameters 2 Click Gateway to open the dialog box Communication parameters Gateway 3 Use the input field Address to enter localhost and click OK Unsuccessful communication setup An unsuccessful attempt to set up communication with the gateway server on a different PC The following aspects must be met for correct communication setup e The tri colour icon in the lower menu bar shows the active gateway server e Was the correct IP address entered in the dialog box Communication parameters Gateway e The local TCP IP connection must work DDS EN 2 3 Lenze Show Hide Bookmarks 6 3 1 18 6 3 1 19 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Working with projects and objects Controller enable Menu Online Controller enable Keyboard Use this command to enable the controller The menu item will be deactivated for automation systems without c
184. clude amber and amber red between the red and green phases with the amber red phase being shorter than the amber phase This example illustrates Lenze how to implement time controlled programs using IEC 61131 3 language tools how to edit the various standard languages using the DDS how to link the different languages how to simulate a program in the DDS and visualize it on screen DDS EN 2 3 3 1 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Program example 3 2 Programming 3 2 1 Starting the DDS 1 In the Windows Start menu select submenu Programs Lenze Drive PLC Developer Studio and click Drive PLC Developer Studio to start the DDS Tip lf under Project Options category Load amp 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 3 Selecting PLC 3 Open dialog box Automation system settings and select a PLC from the combination box Configuration e g the 9300 Servo PLC and confirm with OK Target Settings EG Configuration 9300 Servo PLC V1 x Target Platform Memory Layout General Networkfunctionality Libraries pod Tables f GUE ad f 6 5000 i G 0 lata Wate length 12 Heferences Default Cancel 3 2 4 Creating organization units
185. consists of e Process input image Status of all system organization unit inputs e Process output image Status of all system organization unit outputs Cyclical task PLC_PRG If only one cyclical task is used the process input image of the system organization units used for this task will be read at the beginning of the cyclical task and the process output image will be restored at the end of the cyclical task e During processing of the automation system program the status information of the process input image will remain constant and data consistency is ensured e Process image updates depend on the processing time of the cyclical task in other words program length and complexity Time controlled task INTERVAL If INTERVAL tasks are used the process input image of the system organization blocks used for this task will be read at the beginning of the INTERVAL task and the process output image be restored at the end of the INTERVALtask e fa certain system organization unit is used in several INTERVAL tasks the associated process image will be generated in the faster INTERVAL task independent of whether this system organization unit is also used in the cyclical task Tip Note that the INTERVAL task may be slower than the cyclical task It may be necessary to install a fast task for the process image to ensure that only the process image is updated in time Example Analog input 1 is used in the cyclical task runtime
186. constants Use this type to save a time of day A TIME OF DAY declaration starts with tod TOD TIME OF DAY Of time of day followed by any hour minute second time Seconds may be specified as real numbers fractions of a second are also allowed Examples TIME OF DAY 15 36 30 123 tod 00 00 00 DATE_AND_TIME Konstanten Date constants and time of day may also be combined into so called DATE AND TIME constants DATE AND TIME constants start with dt DT DATE AND TIME ordate and time Dates are followed by a hyphen and the time of day Examples DATE AND TIME 1996 05 06 15 36 30 dt 1972 03 29 00 00 00 DDS EN 2 3 Lenze Show Hide Bookmarks 13 1 7 13 1 8 13 1 9 Lenze efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Operands 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 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 In character sequences the combination of the dollar sign followed by two hexadecimal numbers will be interpreted as hexadecimal representation of the 8 bit character code Occurrences in a character sequence of combinations of two characters starting with the dollar si
187. contain subfolders Click on the plus sign to open the folder and to show the subordinate folders A minus sign now replaces the plus sign Click on the minus sign to hide the subfolders e Folders without a plus or minus sign do not contain subfolders but codes Selecting such a folder will display the codes assigned to the folder on the right hand side Read only codes are shown in grey Codes whose values have not been read from the PLC yet are shown in green 8 6 DDS EN 2 3 Lenze Show Hide Bookmarks 8 3 1 8 3 2 8 3 3 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Resources 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 e 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 e The parameters for these codes can be set online on the PLC with the parameter monitor and saved with C0003 1 in the parameter set of the PLC User codes User codes are created in the Instance Parameter Manager and have a fixed link with a program variable e These codes can be used to access variables in the PLC program via field bus profiles parameterization programs and di
188. ct to create a new visualization object Placeholders allow a visualization object to be used more than once A visualization object can be inserted into other visualization objects Replacing the placeholders assigns different configurations to the visualization object Visualization objects inserted into other visualizations are called references There are two options to configure a visualization object Depending on the configuration a reference responds differently to actions in online mode e The individual elements of the reference respond like the original visualization e The individual elements of the reference remain unconsidered The reference responds to inputs as an overall object Application examples e Have the behaviour of a variable displayed during growth in a bar graph e Program entries via mouse and keyboard lf an appropriate translation file is available texts can be displayed in a different language during online visualization Project Translate into other languages 6 12 Lenze DDS EN 2 3 9 1 Show Hide Bookmarks efesotomasyon com Lenze 9 1 9 1 1 9 1 1 1 9 1 1 2 9 2 Drive PLC Developer Studio Visualization Inserting visualization elements Insertion mode If the visualization level is active the menu command Insert lists the various different visualization objects e The mouse pointer in the editor window turns to the icon of the element to be inserted e Thestatus bar disp
189. ctions are also highlighted in blue in online mode Breakpoints Breakpoints may be set to all elements with a sequential function chart index Program processing will be halted prior to execution of the respective element The element s sequential function chart index will be used as the breakpoint position during the breakpoint dialog Set breakpoints to a selected element via F9 Online gt Breakpoint on off the CFC editor shortcut menu Following repeated execution of menu command Online Breakpoint on off the breakpoint willbe deleted again The breakpoint can be toggled by double clicking the element Breakpoints are represented under Project Options Category Colours Return label In online mode ajump label with the identifier RETURN is automatically generated inthe first column and after the last element in the CFC editor This label marks the box end and is jumped to during single stepping prior to exiting the box No RETURN labels are inserted in macros Single stepping If the menu command Online Single step over is active the process will always jump to the element with the higher sequential function chart index lf the menu command Online gt Single step in is active the process will branch into the implementation in the case of a macro or an organization unit DDS EN 2 3 7 59 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Editors 7 8 SFC editor The graphic Sequentia
190. curs contact Lenze 41247 The system bus adapter could not be initialized Install the CAN driver update A11F No free handles available If the error still occurs contact Lenze 41248 The baud rate set for the selected system bus adapter does Set the baud rate set for the bus devices for the selected system bus adapter on the A120 not match the baud rate of the devices connected to the Settings tab bus 41249 The baud rate set for the selected system bus adapter does Set the baud rate set for the bus devices for the selected system bus adapter on the bus 41250 Internal program error Install the CAN driver update A122 Invalid filter setting If the error still occurs contact Lenze 41251 The parameter channel to be used is already used by Set another parameter channel for the selected system bus adapter in the Settings index of A123 another bus station or by another PC program the system bus configurator or ensure that the selected parameter channel is not occupied by another bus station or another PC program 41252 The LSystembusL2 DLL file could not be loaded Reinstall the CAN driver update A124 41253 Error when starting the download mode Restart the application A125 41254 Error during program download Restart the application A126 41255 A127 41256 Too many invalid telegrams have been detected on the Check the installation of the system bus terminating resistor shielding for the baud rates
191. cyclical task PLC_PRG Tripping the watchdog time e Tripping the watchdog time activates an error message in the PLC e This error message is displayed on the Keypad in GDC in code C0168 e After TRIP reset error message and PLC program will be reset Use the DDS start command or C2108 1 to restart the program Task declaration A task declaration consists of the task name the entry for task priority and the condition for its execution The condition can be a time interval 1 ms to 16 s after which the task is to be executed an event rising edge at the digital input or FALSE TRUE change of a global variable or a hardware interrupt Every task can now be assigned a list of programs Program type POUs to be called by the task These programs are processed in the listed order Tip The task settings properties cannot be changed in online mode DDS EN 2 3 8 31 Show Hide Bookmarks efesotomasyon com Lenze 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 Tasks cannot share the same priority limited multi tasking Exception Priority 0 Task inhibited If the star
192. d Go Go Yo N N Q Q OQ Q gt of 512 byte code Activate the option Use 16 bit jump offsets in the 68k target settings 3202 You are using a nested form CONCAT x f i function call This may lead to data loss Split the Calls Call into two expressions 3203 Assignment too complex too many address registers Split the assignment required 3204 Jump distances must not exceed 32767 bytes 205 Internal error Too many constant strings A maximum of 3000 string constants may be used within one organization unit 206 Function block too large A function block may return a maximum of 32767 bytes code 207 Array optimization A function was called within the index computation nsuccessful array access optimization Goa So Go Q Loe Go 209 perator not implemented You are using an operator that is not implemented for this data type in the current code generator MIN string1 string2 10 unction lt Name gt not found You are calling a function that does not exist within the project 211 Stringvariable used too often A string type variable must only be used ten times in an expression with the 68K code generator 250 he automation system is currently not supported 5 Date of day types not supported on 8 bit controller he automation system is currently not supported he automation system is currently not supported he automation system is currently not supported 254 he automation system is currently not
193. d an object selected in the Object Organizer into the associated editor If a window with this object is already open it will be brought to the front for editing Also open an object for editing by e double clicking the associated object or e by clicking the Object Organizer and inserting the first letter of the object name into the Object Organizer DDS EN 2 3 6 27 Show Hide Bookmarks efesotomasyon com Lenze 6 2 4 7 6 2 4 8 6 28 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 Object to Open EI Type beginning of Object name Name Ip Select out of List of Objects PLC_PRG e Select the required object and click Open to load the object to its editing window e The object type Resources supports this option for global variables only e This function is especially helpful for projects comprising a multitude of objects Access rights Menu Project Object access rights Keyboard Use this command to open the dialog box to assign access rights to the different user groups i Cancel eo o M i Sa mn n User Group No Access b Read ccess C cy o e ie e O e O e O e o e e Full Access I Apply to all Members of user group 0 adm
194. d command 4436 VKE contents undefined cannot be converted to A command using VKE cannot be converted as the VKE value is not known IEC 61131 3 4437 The types of command and operand do not match A bit command was applied to a Word operand or viceversa 4438 No data organization unit open insert an A DB Insert an A DB 4500 Unknown variable or address This Watch variable is not declared in the project Use the Help Manager lt F2 gt for declared variables 4501 A valid Watch expression is followed by invalid characters Remove the invalid characters 4520 Error in compiler directive Flag expected before lt name gt Pragma entered incorrectly Check whether lt name gt is a valid flag 4521 Error in compiler directive Check the pragma for correct composition Unexpected element lt name gt 4522 Flag off directive expected There is no flag off instruction Add a flag off instruction 4550 Index outside permitted range Variable OD lt number gt line Ensure that the index is within the range defined in dialog box Automation system settings lt line number gt tab Network functions 4551 Subindex outside permitted range Variable OD lt number gt Ensure that the subindex is within the range defined in dialog box Automation system line lt line number gt settings tab Network functions 4552 Index outside permitted range Parameter OD lt number gt Ensure that the index is within the range defined in dial
195. d is useful only in the LD editor If EN is TRUE the content of variable a is transferred to variable b Lenze DDS EN 2 3 12 13 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Operators 12 14 DDS EN 2 3 Lenze Show Hide Bookmarks 13 13 1 13 1 1 13 1 2 13 1 3 Lenze efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Operands IEC 61131 3 operands In the DDS operands can be constants variables addresses and function calls Constants Note Not all automation systems support the various different data types Number constants Numerical values can be binary numbers octal numbers decimal numbers and hexadecimal numbers e fan integer is not a decimal number its base followed by a hash must be written in front of the integer constant e Inthe case of hexadecimal numbers the numerical values for numbers 10 to 15 are specified with the letters A F as is common practice e Underscores are not allowed in numerical values with the exception of binary numbers Examples 14 Decimal number 2 1001 0011 Binary number 8 67 Octal number 16 A Hexadecimal number e The type of these numerical values can be BYTE WORD DWORD SINT USINT INT UINT DINT UDINT REAL Or LREAL e Implicit conversions from higher to lower order types are not allowed A DINT variable cannot that easily be used as INT vari
196. d other program POUs can be called from PLC _ PRG The use of PLC PRG is not absolutely necessary for a control program The runtime of PLC_PRG is not equidistant i e it depends on the program size and the Current processor load e Time controlled task INTERVAL Set up time controlled tasks that can be started periodically The period duration can be set in 1 ms steps between 1 ms and 16s e Event controlled task EVENT Set up event controlled tasks to be started through a Boolean change of a definable variable or a hardware input of the PLC The variable can be a global variable or a system variable Response time 1 ms e Interrupt task This task can be started through a real hardware interrupt digital input This interrupt is not triggered via the IEC 61131 3 program but via the processor The advantage is that the task can be started very quickly Typical response time 100 us Worst case response time 250 us The number of tasks time controlled event controlled or interrupt is dependent on the selected automation system Note The runtime system monitors the processing time of all tasks If processing takes too long or is interrupted frequently by higher priority tasks thus extending the processing time beyond the cycle time of a task for example a system error will occur and crash the runtime system Task properties are set through the DDS in adherence to the following conditions Event controlled t
197. da GoTo Name grivar0i Cancel To message window List of PLC_PRG 1 gnVar01 Global Read PLC_PRG 1 gnvar0 Global Write POE_01 1 gnvardi Global Read POE_01 1 gnVar01 Global Write POE_02 1 gnvar0 Global Read POE_02 1 gnvar0 Global Write POE_03 1 gnvar0 Global Read POE_03 1 gnvar0 Global Write 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 At Name enter to display all elements of the set category or select the name of a variable and then execute menu command Project Output cross reference list The selected text then appears in the text field Name Make sure to select the full variable name 3 Click Get references for a list of all occurrences In addition to organization unit and line or network number the specification will include the variable name and any linked addresses The column Scope specifies the global or local variable The column Access shows how to access the respective variable e Selecting a line in the cross reference list and clicking Go to or double clicking the line will display the organization unit at the associated location in its editor allowing comfortable jumps to all occurrences e For smooth execution click To message window to transfer the current cross reference list to the message window and change from there to the organiza
198. declaration syntax is based on the IEC 61131 3 standard Declaration keywords Menu Insert Declaration keywords Keyboard Use this command to open a list of all Keywords available for use in the declaration part of an organization unit e The keyword will be inserted at the current cursor position once it has been selected and confirmed e The list will also be displayed when calling the Help Manager and selecting the category Declarations Input variables Between the keywords VAR_INPUT and END VAR all variables are declared that are used as input variables for an organization unit e The values of these variables can be transferred from the calling unit Example VAR INPUT inl INT 1 input variable END VAR Input variables can be used to transfer data from the calling to the called organization unit Output variables Between the keywords VAR OUTPUT and END VAR all variables are declared that are used as output variables for an organization unit e The values of these variables are returned to the calling organization unit for further use Example VAR OUTPUT outl INT 1 output variable END VAR DDS EN 2 3 7 11 Show Hide Bookmarks efesotomasyon com Lenze 7 2 4 7 2 9 7 2 6 7 12 Drive PLC Developer Studio Editors 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 organi
199. divider The screen divider is the boundary between two non overlapping windows The DDS offers screen dividers between e the Object Organizer and the desktop of the main window e the interface declaration part and the implementation instruction part of organization units e the desktop and the message window Position the mouse pointer over the screen divider to move it For this purpose keep the left mouse key depressed and move the mouse Tip Note that the screen divider will always remain at its absolute position even if the window size is changed Enlarge the window if the screen divider seems to have disappeared Desktop The desktop is on the right hand side of the DDS main window All object editors and the Library Manager are opened in this pane The window title bar displays the associated object name Organization units are identified with an abbreviated organization unit type and the applied programming language Tip Menu command Window in the main menu lists all window management commands Message window The message window appears below the desktop in the main window separated by a horizontal screen divider It contains all messages from the last compile check or compare Search results and cross references can also be output here e Double click a message in the message window or press lt Enter gt to open the editor with the associated object The relevant line of the object will be highlighted Use the c
200. ds insufficient for lt Name gt At least Check how many operands are required by the operator lt Name gt and insert the missing 4033 lt Number gt operands too high for lt Name gt Exactly Check how many operands are required by the operator lt Name gt and remove the ili 4034 Division by 0 You are using a division by 0 in a constant expression If necessary use a value 0 variable to A N 4035 ADR must not be applied on VAR CONSTANT if Replace No address access is possible to constants for which the direct values are used If required constants is active deactivate the option Substitute constants in the project options category Compilation options 4040 Jump label lt LabelName gt is not defined Define a label named lt LabelName gt or change lt LabelName gt into a defined label 4041 Jump label lt Name gt defined more than once The label lt Name gt is defined more than once within the organization unit Rename it or remove one definition 4042 The number of successive jump labels must be max The number of jump labels per instruction is limited to lt Number gt lt Number gt Insert a dummy instruction 4043 Incorrect label format The name used for the label is either no valid identifier or the colon is missing in the A label must be an identifier that may be followed by a definition colon 4050 Organization unit lt Name gt does not exist in the project Define an organization unit named lt Name gt
201. dy and then Extras Properties the dialog box Edit parameters may also be opened by double clicking the body of the associated box To modify the value of a constant input parameter VAR_INPUT CONSTANT in dialog box Edit parameters select the associated entry in the column Value e This value can then be edited with another mouse click or by pressing the lt Space bar gt e Press lt Enter gt to confirm a change otherwise press lt Esc gt to dismiss it Click OK for a save exit from the dialog box Cancel will not save any changes on exiting the dialog DOX DDS EN 2 3 7 47 Show Hide Bookmarks efesotomasyon com Lenze 7 7 6 6 1 1 1 7 48 Drive PLC Developer Studio Editors Connector Icon Menu Extras Connector Keyboard Use this command to connect elements via connectors in the CFC editor instead of connection links e Output and associated input are identified with a uniquely named connector e The name of the connector is automatically assigned by the program but can be changed Where two elements are already linked by a connection that is now to be changed into a link with connectors first select the output where the connection starts and then Extras gt Connector Before command execution After command execution Tip Connections via connectors can be changed back into normal links by selecting the output of the connection and executing the command Extras Connector again Changing the
202. e A POUs pe E PLC_PRG PRG gt a TRAFFICLIGHT FB WAIT FB Content Nt A PP PP Pi PP Pe Pi Pt Pt Pi ei Pt Pe i PP Pt Pt A Pit SL SF ge OOO LC tette ttt ka ttt pl bel File Page xx Der ON ONO KO Oe On oO OG Ot oO Oe OKO Ose OO Ome OKO Ome OOOO OOO OOO Oper 5 x tee eee eee SL estate tatet eters v OOOO Li X 378 Y 375 Element ONLINE OY READ e b ka e D i gt gt gt te gt gt gt 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 Page The current number of pages is printed POUName The name of the current organization unit FileName The name of the project Date Current date Content The contents of the organization unit Use Insert Bitmap to insert a bitmap e g a company logo into the page Select a bitmap and draw a rectangle in the layout with the mouse Further visualization elements may be inserted as well New page for each object New page for each subobject Select whether a new page is to be started for each object and subobject Printer setup Use the button Printer setup to open the dialog box Printer setup t
203. e Motor continues running Code C168 subcode 1 Error entry none Code C168 subcode 1 Error entry none CINH is activated Code C168 subcode 1 Error entry Task overflow Lenze DDS EN 2 3 6 23 Show Hide Bookmarks efesotomasyon com Lenze 6 2 6 2 1 6 2 1 1 6 24 Drive PLC Developer Studio Working with projects and objects 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 Object Objects are organization units data types visualizations and resources global variables PLC configuration task configuration and Watch and Receipt manager etc e Some of the folders inserted for project structuring are included in the project An example of these is the organization unit folder with the action PLC_PRG e All objects of a project are saved in the Object Organizer Tip Positioning the mouse pointer briefly over an organization unit in the Object Organizer will display a tool tip with the type of the organization unit program function or function block Objects and folders can be moved within their object type with Drag amp Drop Use this Windows function to select objects and to move them while keeping the left mouse key depressed Should the move result in a name collision an error message is displayed and the process ignored However it is possible to gener
204. e lt Number gt K Reduce your applications data requirement E 110 rror in library file lt Name gt The hex file does not correspond to the INTEL hex format 112 lrrelocatable instruction in library The hex file contains an irrelocatable instruction The library code can not be linked Goa So Go Go Go 111 Library lt Name gt is too big Maximum size 64K The hex file exceeds the maximum possible size 113 Library code overwriting function tables The code and information table sections overlap Library uses more than one segment The tables and code in the hex file use more than one segment Constant cannot be assigned to VAR_IN_OUT Incompatible The internal pointer format for string constants cannot be converted into the internal pointer data types format of VAR_IN_OUT as the data are defined as near and the string constants as huge or far Change these automation system settings if possible The system possibly requires too much initialization code 721 22 Application stack too small The organization unit calls are nested too deeply Enlarge the stack size in the automation lt Number gt DWORD required system settings or compile the program without the project compile option Debug lt Number gt DWORD available 3131 User stack too small Contact the control manufacturer Sumter WORD ries umber woro awata E 132 System stack too small Contact the control manufacturer hinder WORD reir umber WORD Be
205. e Bookmarks efesotomasyon com Lenze Options Macros 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 Export array entries For object arrays a separate entry is generated for each variable component Write access The object variables may be modified via the OPC server Once the setting is effected for the current organization unit selection another organization unit can be selected and given different options OK Using this button to close the dialog box means that all changes will be saved Select the category Macros to open the following dialog box Category Load amp Save Name OK User Information fee E ditor macro NEW Rename Desktop Cancel Colors Macro Menu Directories Write Info Help Log macro Build macro3 Commands Passwords echo lt Text gt GDC Device Description Name Enter the name for the macro in this text box New Press the button New to record the created macro Macro This field lists all created macros Highlighted macros can be deleted with the lt Del gt key
206. e PLC Developer Studio Introduction 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 Monitoring In online mode the current values for all variables displayed on screen will be continuously read from the control and displayed Refer declaration and program editor for this display Current variable values may be output in the Watch and Receipt Manager and in a visualization The display and monitoring of variables from function block instances requires the associated instance to be opened The implementations show the pointer value The dereferenced value is shown for dereferenced variables Monitoring VAR_IN_OUT variables When monitoring VAR_IN_OUT variables the de referenced value is output in the declaration part and the program part Monitoring Pointers Warning Monitoring of de referenced pointer values is not supported by all Lenze target systems In online mode it depends on the target system which de referenced pointer values pointer variable are indicated Some Lenze target systems indicate the pointer value itself During monitoring the pointer and the de
207. e assigned a more explicit name and that any changes to an input or output signal need be made at one location only in the declaration Tip Note that no write access is possible to variables assigned to an input Furthermore AT declarations can be made for local and global variables only not for the input and output variables of organization units Examples bTrip b AT QX1 0 0 BOOL bRight b AT sIX1 0 1 BOOL bReverse b AT MX2 2 BOOL Tip Boolean variables assigned to a byte word or DWORD address subject a whole byte to TRUE or FALSE not just the first bit after the offset Syntax colouring All editors provide visual assistance for implementation and variable declaration e Coloured text helps to avoid errors or detect errors faster Unfinished comments will be detected immediately keywords will be written correctly etc The following colour code is applied Giu ps TT Red O Incorrect input e g invalid time constant keyword written in lower case Black Variables constants assignment operators DDS EN 2 3 7 15 Show Hide Bookmarks efesotomasyon com Lenze 7 2 14 7 2 15 7 16 Drive PLC Developer Studio Editors Short mode The declaration editor provides the possibility to use the short form mode e The short form mode is activated by completing a line with lt Ctrl gt lt Enter gt The following short forms are supported All identifiers except the
208. e been made and checked Save A ZIP file is generated and saved and can be stored at the desired location with the help of the Windows dialog The file default name is projectname zip Pressing the button Save starts archive generation where the process is logged in the message window along with a progress bar display Mail A blank e mail is generated with the project attached as a ZIP file This function requires correct MAPI Messaging Application Programming Interface installation Cancel The process is cancelled No settings are saved Lenze DDS EN 2 3 6 5 Show Hide Bookmarks efesotomasyon com Lenze n O 6 1 1 8 6 1 1 9 6 6 Drive PLC Developer Studio Working with projects and objects Print Menu FilePrint Keyboard lt Ctri gt lt P gt Use this command to print the contents of the active window Selection of the command opens the dialog box Print e Select the required option and click OK The active window will be printed Every editor can be colour printed e Use the button Properties to open the dialog box Printer setup e The layout of your printout can be defined under File Documentation setup e During the printout the number of pages already printed will be displayed in a dialog box The printout will be stopped after the next page if this dialog box is closed e To document your entire project use the command Project Document project e To generate a document template for your
209. e changes to code values choose one of the following options Open the Object Organizer and double click the object Parameter monitor to open the parameter monitor e Save the changes in the parameter set of the PLC CO003 1 e Save the changes in the project by entering the new values into the object Code initialization values in the Object Organizer e Save the changes using the software tool Global Drive Control GDC R Parameter Monitor 3 Codeliste LI Programminformation C0025 R ckf hrung RSx Resolver oe ee C0026 1 FCODE Offset lN 000 Di C0026 2 FCODE OffsetAlN 0 00 ji clio C0027 1 FCODE Verst AIN 100 00 H Haupt Funktionsblocke C0027 2 FCODE Verst AIN 0 00 4 Klemmen E A C0030 DFOUT Konstante 2048 Inkr U mdr Reglereinstellung C0032 FCODE Getriebefaktor Z hler 1 Motor Riickfuhrsystem C0034 _Leitspannug Leitstrom 10 10 G Uberwachungen C0037 Sollwertvorgabe rpm O rpm LECOM AIF Schnittstelle C0040 Reglerfreigabe RFR Regler frei H Systembus 20042 DIS Quickstop ISP nicht aktiv J Freie Codestellen C0043 Fehler rucksetzen TRIP Reset C Multitasking l H Identifikation C SPS Merker J Eigene 1EC1131 Codestellen On its left the parameter monitor shows a menu tree with folders assigned with codes or further subfolders e Folders identified with a plus sign
210. e executed for several variable values these values can be comma separated to indicate that they are linked to the same instruction e Ifthe same instruction is to be executed for a value aggregate of the variable the start and end values can be separated by two successive periods to indicate that they are linked to the same instruction Example CASE INT1 OF L 5 BOOL1 TRUE BOOL3 FALSE 2 BOOL2 FALSE BOOL3 TRUE 10 20 BOOL1 TRUE BOOL3 TRUE ELSE BOOL1 NOT BOOL1 BOOL2 BOOL1 OR BOOL2 END CASE Lenze DDS EN 2 3 4 7 Show Hide Bookmarks efesotomasyon com Lenze 4 3 9 4 8 Drive PLC Developer Studio Programming languages FOR loop Use the FOR loop to program repetitive procedures Syntax INT Var s INI FOR lt INT Var gt lt INIT VALUE gt TO lt END VALUE gt BY lt step size gt DO lt instructions gt END FOR e The part in curly brackets is optional e The lt instructions gt are executed as long as the counter lt INT Var gt is not greater than the lt END VALUE gt e Acheck is performed before the lt instructions gt are executed so that the lt instructions gt will never be executed if lt INIT _VALUE gt Is greater than lt END VALUE gt e Whenever the section lt instructions gt has been executed lt INT Var gt will be increased by lt step size e The step size can have any integer value If no other step size is specified step size 1 will be used
211. e highlighted element Add subelement Icon Menu Insert gt Add subelement Keyboard Use this command to insert the selected element into the PLC configuration as the last subelement to the highlighted element DDS EN 2 3 Lenze Show Hide Bookmarks 8 6 1 4 8 6 1 5 8 6 1 6 8 6 1 7 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Resources Replace element Icon Menu Extras gt Replace 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 E9300 Serva PLC V2 x Calculate addresses Icon Menu Extras Calculate addresses Keyboard Note Not all automation systems support this function Execution of this menu item requires the check box Calculate addresses to be selected in the general PLC configuration settings Calculate addresses applies from the selected module and includes all of the elements below Default configuration Icon Menu Extras Default configuration Keyboard Use this command to delete the set configuration and to return to the original configuration Convert old PLC configurations Icon Menu Extras Convert Keyboard Use thiscommand to convert any project opened that includes a PLC configuration generated with an older DDS version into the forma
212. e is GR_1_2 Init e Delete a jump label by deleting the jump label text 7 8 3 3 Insert after on Use this command to insert the SFC block in the clipboard after the first step or the first transition of the selected block a normal Copy inserts it in front of the selected block e The command will be executed only if the resulting SFC structure complies with the language conventions Lenze DDS EN 2 3 7 59 Show Hide Bookmarks efesotomasyon com Lenze 7 8 3 4 7 8 3 5 7 8 3 6 7 60 Drive PLC Developer Studio Editors Zoom action transition Icon Menu Extras Zoom action transition Keyboard lt Alt gt lt Enter gt Shortcut lt Alt gt lt Enter gt 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 e Ifthe action or the transition body is empty select the language it is to be written in Delete action transition Menu Extras Delete action transition Keyboard Use this command to delete the actions of the first step of the selected block or the transition body of the first transition of the selected block If either the action entry action or exit action of a step is implemented it will be deleted with this command Otherwise a dialog box will appear to select the action or actions to be deleted If the cursor is in an IEC step action only t
213. e menu commands Project gt Rename object or change the name of the organization unit in its declaration part The name must appear directly after the keywords Program Function or Function block Too many identifiers A maximum of 100 identifiers may be specified per variable declaration not match the name in the object list S S No E S GO Several declarations with the same identifier lt name gt Several identically named identifiers exist in the object s declaration part 3705 Data recursion lt Organization unit 0 gt gt An FB instance was used that requires itself to function lt Organization unit 1 gt gt gt lt Organization unit 0 gt Go 720 AT must be followed by an address Insert a valid address after the keyword AT or change the keyword AT 721 Only VAR and VAR_GLOBAL can be assigned to addresses Copy the declaration to a VAR or VAR_GLOBAL section Go 722 Only simple Boolean variables may be located at the Change the address or the variable type stated in the declaration Cie 722 Only simple Boolean variables may be located at the Change the address or the variable type stated in the declaration 728 PLC_PRG Impermissible address IX141 58 0 Specify a correct address Go Go Lenze DDS EN 2 3 15 13 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Appendix Possible remedy 3740 Unknown type lt Name gt You are using an incorrect type for var
214. eclaration part PROGRAM PLC PRG VAR A ARRAY 0 7 OF BOOL B INT 10 Instruction part A B TRUE Pointers Pointers are used to save addresses of variables or function blocks at program runtime Warning Applied wrongly pointers may crash the target system For this reason do not use pointers If you use pointers do so with great care Writing of WORD data types on odd addresses or accessing system memory areas can cause errors DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Data types Pointer declarations have the following syntax lt Identifier gt POINTER TO lt Data type Function block gt 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 Example Declaration pt POINTER TO INT var Inti INT lt 5 var int2 INT Implementation pt ADR var intl var int2 pt var int2 is now 5 10 2 3 Enumeration type An enumeration type is a user defined data type that consists of several string constants These constants are referred to as enumeration values Enumeration values are known throughout the entire project even if they were locally declared in an organization unit They are best created as objects in the O
215. ed comments Directories A CERERE EE an Lo Macro before compile Macro after compile Passwords Macros GDC Device Description 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 e Only if check box Debugging is active can breakpoints be set and single stepping is possible e fthe option Debugging is deactivated the code will be shorter and execution faster Replace constants This option loads the value directly for each constant In online mode constants are displayed in green A constant can then no longer be forced written or monitored While the option is deactivated the value is loaded via variable access to a memory location Although this allows writing of the variable value it also means a longer processing time Nested comments This option allows the input of nested comments a inst out to be checked b b 1 T The comment beginning with the first parenthesis is the outer one and completed with the last parenthesis Create binary file of the application Selection of this option means that a binary image of the generated code boot project will be created in the project directory during a compile File name projectname bin Macro before compile This option influences the compile process the m
216. ed in the Instance Parameter Manager by pressing the button Standard Tip The Type Parameter Manager handles analogously to the Instance Parameter Manager the only difference being the selection of a function block type instead of a function block instance For more information on how to use the Type Parameter Manager refer to the chapters on the Instance Parameter Manager 8 4 5 Scale functions Codes can be linked with a scale function e A scale function is an IEC 61131 program written by the user for the scaling of these parameters variables Scale function for codes with write access lf a code value changes the value of the linked variable will change too Every code write can launch a user generated scale function e f processing of the associated scale function is to be rejected on write access to a code asa consequence of a condition the value of variable g bScaleFunctionError in the scale function must be set to TRUE The global variable g bScaleFunctionError of type BOOL is included in Standard lib Scale function for codes with read access Read access to a code with a parameterization tool e g GDC Keypad or HMI may launch a user generated scale function e For this purpose a write must be performed to the associated scaling variable in the scale function e The value of the scaling variable is output via the code after linear scaling e The scaling variable is a global variable of Standard lib and must
217. ed successively by means of the above program calls the result will have the values 1 2 and 3 in the programs e Changing the call sequence will also change the values of the associated result parameters Note The string length is limited by the applied automation system DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 2 2 6 2 2 1 Lenze 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 WI PLC_PRG PRG SFC Jol x 0001 FROGRAM PLC_PRG a in2 BOOL in1 BOOL TRUE in3 INT SFCEnableLimit BOOL TRUE SFCErrorLimit STRING SFCError BOOL PLC PRG PLC PRG s a special predefined organization unit for a cyclical task This organization unit is called exactly once per control cycle e If Project Insert object is run for the first time after a new project has been created the dialog box Organization unit is pre assigned with an organization unit called PLC_PRG of type Program This pre assignment should not be changed Caution Do not delete or rename the organization unit PLC_PRG if you do not use a task configuration Do not attach PLC_PRG to an already created task as PLC_PRG will then be called several times leading to logical errors PLC_PRG Is generally the main program in a single task program
218. efesotomasyon com Lenze 7 4 5 7 28 Drive PLC Developer Studio Editors Network editors in online mode Breakpoints FBD and LD editors allow breakpoints to be set to networks only e The network number field of a network with a breakpoint is displayed in blue e Processing stops before the network with the breakpoint In this case the network number field is displayed in red e In single stepping the process jumps from network to network Monitoring All values are monitored at the inputs and outputs of network organization units Writing values in FBD Double click a variable to open a dialog box where the current variable value can be changed Boolean variables are toggled and no dialog box will be displayed e The new value is displayed in red e Online Write values sets all changed variables to the new value and displays them in black Tip Positioning the mouse pointer briefly over a variable in online mode will display a tool tip with the variable s type and any comments Only the variable type is displayed in offline mode DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 7 9 7 9 1 Lenze Drive PLC Developer Studio Editors 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 afunction block call a function a pro
219. egory View e Text field Zoom permits a zoom factor from 10 to 500 e If check box Element numbers is activated the element number will be displayed for every element in offline mode Category Frame e If check box Auto scrolling is activated the visible area of the visualization window will be moved automatically when drawing or moving a visualization element when the window frame is reached e lf check box Automatic adaptation online is activated the visualization is adapted to the window size all elements visible in online mode e If check box Include background bitmap is activated a ticked check box Automatic adaptation online means that the size of the bitmap is also considered when adapting the visualization to the window otherwise only the elements will be considered Category Grid e If check box Visible is activated the pixels will be displayed in offline mode e lf check box Active is activated elements can only be positioned onto pixels during drawing and moving processes e Text field Size defines the spacing between pixels Tip The spacing between visible pixels is at least 10 pixels even if the text field Size specifies less At a lower than 10 spacing the pixels will still appear at a 10 pixel spacing Category Language e If check box Language file is active a special language file vis can be generated e Use the button to open a dialog to save the language file e The combination box Language a
220. en selected in the configuration tree the system displays the dialog box Basic parameters fff Steuerungskonfiguration OF E3 Basisparameter Kommentar Analog Output 2 Terminal 63 Kanal Id 1005 Klasse O Grohe 16 Default Identifier AOUT2_nOut_ a Comment Additional channel specific information The text field allows a comment to be edited or a new one to be entered Channel ID Globally unique channel ID DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Resources Class Information on channel application Input Q Output 1 amp 0 Input and output 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 Channel parameters This dialog box analogous to the dialog box Module parameters allows the channel parameter values to be displayed and modified As for the modules it may be substituted with an application specific dialog box Custom parameters Bit channels The basic parameters of bit channels only feature the input field Comment DDS EN 2 3 8 27 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Resources 8 7 Task monitor The task monitor is an object on the tab Resources in the Object Organizer
221. ents of the clipboard at the current position in the editor window e With graphically oriented editors this command can be used only if insertion produces a correct structure e Inthe case of the Object Organizer the object is inserted from the clipboard Tip Note that not all editors support the insert function and that the functionality may be limited insome editors Clipboard contents may be inserted at different locations insertion being dependent on the associated editor e Inthe case of text editors IL ST declaration the current location is the position of the flashing cursor a small vertical line that can be positioned with the mouse e Inthe case of FBD LD and CFC editors the current position is the first network with a dotted rectangle in the network number range The contents of the clipboard are inserted in front of this network Any part of a structure that was copied will be inserted in front of the selected element e With the SFC editor the current position is determined by the selection surrounded by a dotted rectangle Dependent on the selection and the clipboard contents the clipboard contents will be inserted in front of this selection or in a new branch parallel or alternative to the left of the selection e The SFC editor also allows use of the commands Extras lInsert parallel branch right or Extras gt Insert after Delete Icon Menu Edit Delete Keyboard lt Del gt Use this command
222. eps Use text field Width of steps to enter the number of columns for the width of a step standard setting 6 Display at step Use the option boxes to specify what to display with the step e Nothing No display e Comment Displays the step comment e Time limit overview Displays time limits Comments and time limits are displayed as defined under Extras Step attributes Associate action Icon Menu Extras Associate action Keyboard Use this command to associate actions and Boolean variables with IEC steps e Another split box is added to the right of the IEC step for the association of an action e The left hand field is pre assigned with the qualifier N and the name Action Both pre assignments can be changed with the Help Manager lt F2 gt New actions for IEC steps for organization units are created in the Object Organizer with the commandProject Add action Use IEC steps a Menu Extras Use IEC steps Keyboard Use this command to insert IEC steps instead of simplified steps when inserting step transitions and parallel branches e lf the command is active a tick appears in front of the menu item and the symbol in the tool bar looks as if it was pressed The init step is generated as an IEC step during the creation of an SFC organization unit Re execute the command to deactivate tt This setting is saved in the ini file and restored on DDS restart DDS EN 2 3 Lenze Show Hide Bookmarks 7 8 4
223. eption applies for the display of values to be written FBD and LD editors display a value without angular brackets and in turquoise colour next to the variable name e Value definition may be performed for any number of variables e The values may be entered for writing modified and deleted e The values to be written will be stored in a write list watch list until written or deleted 2 Writing values Menu command Online gt Write values Dialog box Edit write list and force list button Write values Execution of Write values will write all values in the write list once only to the associated variables in the control at the beginning of the cycle thus deleting the variables from the write list Tip In SFC the individual values that make up a transition expression cannot be modified with Write values DDS EN 2 3 Lenze Show Hide Bookmarks 6 3 1 15 6 3 1 16 6 3 1 17 Lenze efesotomasyon com Lenze 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 Write values writes changed values to the control once only where they can be over
224. es before the next breakpoint position contain a function call click Online Single step over to skip this function call and Online Single step in to branch into the called organization unit e Aprogram stop at a breakpoint will freeze all tasks Once a breakpoint has been attended to the program will continue from the location where it stopped Note Breakpoints should be set very carefully to avoid unexpected problems during the running process Setting a breakpoint changes the automation system s processing schedule If the program is stopped at a breakpoint the drive will respond as defined in Project gt Exception handling QLEERER MERKER 7 3 5 Line numbers of the text editor The line numbers of the text editor specify the number of each text line for an implementation of an organization unit Offline mode A whole text line can be highlighted in offline mode by clicking the line number Online mode In online mode the background colour of the line number signals the breakpoint status of every line e Dark grey This line is a possible position for a breakpoint e Light blue This line contains a breakpoint e Red Current program processing location In online mode the breakpoint status of this line can be changed with a mouse click Lenze DDS EN 2 3 7 25 Show Hide Bookmarks efesotomasyon com Lenze 7 4 7 4 1 7 4 2 7 4 2 1 7 4 3 7 4 3 1 7 26 Drive PLC Developer Studio Editors Net
225. expression attached to the input side of INO will be computed only if G An expression attached to the input side of IN1 will be computed only if G Simulation will compute all branches MAX Maximum function Returns the greater of two values OUT MAX INO IN1 INO IN1 and out can be of any type Varl FALSE TRUE DDS EN 2 3 Lenze Show Hide Bookmarks 12 4 3 12 4 4 Lenze efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Operators MIN Minimum function Returns the lesser of two values OUT MIN INO IN1 INO IN1 and out can be of any type Varl 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 e lf the value in exceeds the upper limit max then LIMIT returns max e f rn falls below min the result is min IN and out can be of any type LD 90 LIMIT 30 80 ST Var Varl 80 DDS EN 2 3 12 9 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Operators 12 4 5 MUX Multiplexer OUT MUX K INO INn means OUT INK e INO INn and out can be of any type e x must be of type BYTE WORD DWORD SINT USINT INT UINT DINT Of UDINT e MUX selects the xth 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 pa s
226. fied with a plus sign are organization elements and contain subelements e Click the plus sign to show the subelements Click the minus sign to hide the subelements again e Double click an element to change the input output variable names The variables direct addresses of the system organization unit inputs outputs can now be called as system variables in the POUs for programming Tip The most essential commands for the dialog box PLC configuration are also available in the shortcut menu right mouse key or via lt Umschalt gt lt F10 gt PLC configuration in online mode Note Only if the automation system is operating does the PLC configuration display the statuses of the control inputs and outputs in online mode e lf aBoolean input or output has a value TRUE the small box in front of the input or output will be shown in blue e Variable values will be displayed with their current value Boolean inputs can be toggled by mouse click other inputs are displayed a dialog box where anew value can be entered The new value will be set in the control immediately after its confirmation with OK Properties on Use this command to open a dialog box to save more information such as a comment for example with the input output module selected in the PLC configuration Insert element Icon Menu Insert gt Insert element Keyboard Use this command to insert the selected element into the PLC configuration in front of th
227. for the complete No code generated expression 1501 String constant transferred as VAR_IN_OUT The constant must not be written in the body of the organization unit as no size check is lt Name gt must not be overwritten possible there 1 04 a INT END VAR a The process does not call organization unit a but loads variable a 503 The organization unit has no outputs connection continued You are connecting the output pin of an organization unit without outputs further in FBD or with TRUE LD The connection is automatically assigned the value TRUE 1502 Variable lt Name gt bears the same name as an organization You are using a variable that bears the same name as an organization unit unit PROGRAM a The organization unit is not called VAR_GLOBAL 15 Instruction not executed possibly dependent on logical It is possible that not all branches of the logical expression are executed expression IF a AND funct TRUE THEN If a FALSE funct will no longer be called 1505 Side effect in lt Name gt Branch will possibly not be The first input of the organization unit is FALSE so that the side branch entering at the i computed second input is possibly no longer computed 1506 Variable s bears the same name as a local action Rename the variable or the action to avoid identical names The action is not called The original Siemens program does not reveal which data block is open 1700 nput no
228. from the library folder Via the menu command Insert gt Additional Library you can select the library and insert it into the actual project e Select the library in the library management On the index card Global Variables the variable and additional information are listed Note The global variable g_bErrorCheckRange monitors critical and not to be processed value ranges The library function CheckRange recognizes that the target system has reached a critical value range e The global variable g_bErrorCheckBounds is set to TRUE e The status TRUE is not set back during runtime If the status TRUE at least once a critical value range has been reached CheckRangeSigned and CheckRangeUnsigned In order to use these function the library CheckRange lib must be linked The function CheckRangeSigned and CheckRangeUnsigned must be added to enable runtime range limit checks and to prevent range infringements by clipping the value or error flag CheckRangeSigned and CheckRangeUnsigned are called up implicitly if a variable is written to This variable is of a subrange type generated from a signed or unsigned type In the case of a variable of a signed subrange type var i1 or i2 listing above the process calls up the function CheckRangeSigned Programming might look as follows to clip the value to the permitted range FUNCTION CheckRangeSigned DINT VAR_ INPUT value lower upper DINT END VAR IF value lt lower THEN Check
229. from the original e Usethe left mouse key to move the copy to the required location Deleting visualization elements Use the commands Edit Delete lt Del gt key or Edit Cut to delete one or several selected elements e Selecting Edit Cut will save the elements to the clipboard DDS EN 2 3 9 7 Show Hide Bookmarks efesotomasyon com Lenze 9 2 8 9 2 8 1 9 2 8 2 9 2 8 3 9 2 8 4 9 2 8 5 9 8 Drive PLC Developer Studio Visualization Commands in the Extras menu Element list Menu Extras Element 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 Once one or several elements has have been selected the respective elements will be highlighted in the visualization for a visual check and the display may scroll to the section with the selected elements as required Buttons Use To the foreground to display the selected visualization elements in the foreground Use To the background to move the selected visualization elements to the background Use Delete to delete the selected visualization elements Use Undo and Redo to undo and redo actions carried out before These commands are analogous to Edit Undo and Edit Redo The editor window will display any changes Click OK to confirm the ch
230. ftext2 e The input in category Text input field Content consists of the Formatted number display The preset inputs should be accepted first Regular Element Configuration 1 EI Category Line width Content 5 2f Color Cancel Motion absolute Horizontal Motion relative C Left iCentei Right Regular Element Configuration 1 Fi Variables FiPsscecessson _ Input Vertical Text for Tooltip 4 DE FSE Pe Category di Le 5 Shape Variables a Text l Font Standard Font a width Invisible Cancel olor Motion absolute Motion relative Change color Po Textdisplay count amount Input Text for Tooltip Lenze DDS EN 2 3 9 15 Show Hide Bookmarks efesotomasyon com Lenze Configure Input 9 16 Drive PLC Developer Studio Visualization e Thedisplay then is as follows in online mode The previously made inputs return the representation below 4096 00 To test the effect of the Formatted number display enter other formats as well with e sS will be substituted in online mode with the value of the variable entered in the input field Text display available for all Use Extras Configure category nputto define whether the online mode should allow mouse and keyboard inputs or not Toggle variable If check box Toggle variable is activated every mouse click will toggle the value of the Boolean variable en
231. gain of type TIME Note that negative TIME values are not defined 12 1 4 DIV Division Lenze DDS EN 2 3 12 1 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Operators Library CheckDiv lib The library CheckDiv contains the global variable g_bErrorCheckDiv e Open the library management with Window Library Manager e Insert the library from the library folder Via the menu command Insert gt Additional Library you can select the library and insert it into the actual project e Select the library in the library management On the index card Global Variables the variable and additional information are listed Note The global variable g_bErrorCheckDiv checks for divisions by zero The library function CheckDiv recognizes that the target system has executed a division by zero e The global variable g_bErrorCheckDiv is set to TRUE e The status TRUE is not set back during runtime If the status TRUE at least once a division by zero has been executed Note Use of CheckDiv functions CheckDiv functions do not allow divisions by zero The divisor zero is replaced by one The following functions are available in CheckDiv lib CheckDivByte CheckDivDint CheckDivDWord CheckDivint CheckDivReal CheckDivSiInt CheckDivUDint CheckDivUInt CheckDivUSint CheckDivWord If a DIV operator is used the value of the divisorcanbe checked The respective function must have exactly the sh
232. gn will be interpreted as follows Dollar sign S7 Single quote L Or 1 Line feed SNor n New line P Or p Page feed SR OF r Line break ST Or t Tabulator Examples Hello Susi and Claus at aad Type constants Typed Literals As arule IEC constants use the lowest possible data type If a different data type is to be applied use Typed Literals without the need of having to explicitly declare the constant The constant is given a type defining prefix Notation lt Type gt lt Literal gt e lt Type gt specifies the required data type The type must be written in uppercase BOOL SINT USINT BYTE INT UINT WORD DINT UDINT DWORD REAL LREAL e lt Literal gt specifies the constant The input must be compatible with the data type specified under lt type gt varl DINT 34 An error message appears if the constant cannot be transferred into the target type without data loss Typed literals can be used where normal constants are applied DDS EN 2 3 13 3 Show Hide Bookmarks efesotomasyon com Lenze 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 e Variables can be used wherever where the declared type allows tt e The available variables can be called via the Help Manager 13 2 1 System variable System variables are implicitly declared variable
233. gram a jump or a Return instruction TRAFFICLIGHT FB FBD Bil x 0001 FUNCTION_BLOCK TRAFFICLIGHT Tip The most essential FBD editor commands are also available in the shortcut menu right mouse key or lt Ctrl gt lt F10 gt Cursor positions in FBD Every piece of text represents a possible cursor position The selected text is highlighted in blue and can now be changed Otherwise the current cursor position is identified with a dotted rectangle All the possible cursor positions are listed below together with an example AND ul Resu Every text box possible cursor positions identified with a frame Yarl Result van Every input Yarl Result nti vat Every organization unit sien 5 Result Outputs if followed by an assignment or jump The intersection upon an assignment jump or Return instruction The intersection directly before an assignment Behind the last right hand object of a network last cursor position DDS EN 2 3 7 29 Show Hide Bookmarks efesotomasyon com Lenze 7 9 2 7 9 3 7 9 3 1 7 9 3 2 7 30 Drive PLC Developer Studio Editors 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 lt up gt or
234. gram Options Minimum Comment Size E Lines Maximum Comment Size E Lines Cancel Alternative Look amp Feel for Ladder Diagram M Comments per Contact Lines for variable comment e Lines Lines for variable text B Lines Completing the input fields as illustrated will update the associated contact with the following comment field text text text text commentary commentary vari Use the input fields Minimum comment size and Maximum comment size to enter a comment on the current contact or the current coll lf check box Comments per contact is active the input fields Lines for variable comment can be used to input a variable specific comment and Lines for variable text to specify a variable name If check box Networks with line breaks is active the network will break depending on the window size DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Editors 7 6 5 The LD in online mode e n online mode all contacts and coils in ON status TRUE are marked blue in the LD e In online mode all lines in TRUE status are marked blue in the LD e Thevalues of the associated variables are displayed at function block inputs and outputs e Breakpoints can only be set to networks In single stepping mode the process jumps to every single network one after the other e On active flow control the number fields of the processed networks will be marked green Ti
235. h expected A correct access path is missing for one variable in the global variable list for access variables lt Identifier gt lt Access path gt lt Type gt lt Access type gt No address specification permitted for VAR_ACCESS An address assignment exists for one variable in the global variable list for access variables Correct definition lt Identifier gt lt Access path gt lt Type gt lt Access type gt 3550 The task name lt Name gt was used twice You have defined two tasks with the same name Rename one of them 551 The task lt Name gt must contain at least one program call Insert a program call or delete the task Event variable lt Name gt in task lt Name gt not defined You have used an event variable in the configuration of the named task that is not globally declared in the project Use a different variable or define the entered variable globally BOOL type function block instance declaration of the organization block reappears A gS z Q QI Q SO N N Q SS SS Q 601 lt Name gt isa reserved variable name You have declared a variable in the project that is already reserved for the code generator Rename this variable 611 The compile directory lt Name gt is incorrect You have entered an incorrect directory for the compile files in the Project Options Category Directories 3612 Maximum number of organization units lt Number gt You are using too many organization un
236. h the associated FB in the Object Organizer Double click the scale function in the editor to open and program it E POUS E A Counter PRG BES CAL_wV acantParkingLot Es E PLC_PRG PRG Using system organization units in scale functions If a system organization unit is used in a scale function it must be used in at least one other POU Otherwise no process image is crea ted for the system organization unit PLC_PRG or another POU called by a task can be used as a POU for example If system organization units are only used in scale functions or system POUs no process image is created for them as these organization units are not assigned to any task Problems may occur if a system organization unit is used in other tasks thus leading to the creation of a process image on PLC_Coldstart for example Awarning is given from DDS version 2 0 if system organization units are used in scale functions and system POUs Use of scale functions in global function block instances results in a PI trip inthe automation system A compiler error is output from DDS version 2 0 if a scale function is used in a global function block instance Note Check in the process image monitor that a process image is created for the system organization unit used in the scale function DDS EN 2 3 8 19 Show Hide Bookmarks efesotomasyon com Lenze 8 5 8 20 Drive PLC Developer Studio Resources Process image The process image is an o
237. h the help of the process image monitor that a process image is generated for the possible that no process image will be generated for this applied system organization unit system organization unit Caution Chapter System POUs in the automation system Even if a process image is generated some system POUs may cause problems if the data do documentation not exist yet at the time of processing Invalid target path for the GDC device description 100 An error occurred during generation of the GDC device Use Project Options category Device description to specify a different path description For the error cause refer to the transmitted error code 100 No valid name for the device description 200 300 200 Basic device description could not be opened Deinstall the DDS and correctly reinstall it 300 Error in basic device description If the error still occurs please contact your Lenze representative 3 A user code is using an unknown unit Define the applied unit in the Instance Parameter Manager A 8 11 904 The code reference to an organization unit could not be The organization unit was deleted resolved 2905 The binary file project name bin bin could not be The bin file may be write protected Remove the write protection created a S S LN N N N S S S N N 15 5 2 Compile errors cause possible remely o Maximum size lt Number gt byte lt Number gt K Reduce program size Maximum size lt Number gt byt
238. he gate jumps back to FALSE DDS EN 2 3 7 33 Show Hide Bookmarks efesotomasyon com Lenze 7 9 4 3 7 9 4 4 7 9 9 7 9 9 1 7 34 Drive PLC Developer Studio Editors e 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 Zoom Icon Menu Extras gt Zoom Keyboard lt Alt gt lt Enter gt Use this command to load a selected organization unit into its editor e lf the organization unit is from a library the Library Manager will be called on command execution Open instance Icon Menu Extras Open instance Keyboard This command corresponds to the command Project Open instance Commands in the Edit menu Cut Insert Copy andDelete Edit gt Cut lt Ctrl gt lt X gt Edit gt Insert lt Ctrl gt lt V gt Edit gt Copy lt Ctrl gt lt C gt Edit Delete lt Del gt Cut Copy Delete e Selecting an intersection cuts copies or deletes the underlying assignments jumps or RETURN instructions e Once selected an organization unit will be cut copied or deleted along with all branches connected to the inputs with the exception of the first branch e Otherwise the whole branch before the cursor position will be cut copied or deleted Insert After a Copy or Cut the copied or cut section is saved
239. he selected objects line by line in the message window and displays an occurrence total The following information is displayed e Object name e Occurrence in the declaration part or implementation part of an organization unit e Line or network number e Complete line for text editors e Complete text unit for graphic editors The message window can display the following information for a requested character sequence bottom Global search ST EXAMPLE PRG ST declaration 5 bottom INT 250 ST EXAMPLE PRG ST implementation 14 bottom yVal offset ST EXAMPLE PRG ST implementation 19 IF bottom gt 250 THEN ST EXAMPLE PRG ST implementation 20 bottom Bottom offset The character sequence bottom was found 4 times A double click on one of the lines opens the associated editor and highlights the line with the character sequence Function keys lt F4 gt and lt Shift gt lt F4 gt allow toggling between the output lines Note Not implemented for Parameter Manager and code initialization Global replace Icon Menu Project gt Global replace Keyboard Use this command to find text in organization units data types or objects of global variables and replace it with another text The libraries are not available for selection and no output is possible into the message window Command selection opens a dialog box to select the required objects Confirm the selection with OK to open the dialog box Gl
240. he 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 Code value The code value is the value displayed or entered via the code using GDC Keypad or the parameter monitor This variable corresponds to the physical value known as variable value in the user program scaling Display text User specified texts are displayed for parameterization diagnostics using the Keypad The text can have up to 13 characters and is displayed for the code Input window with yellow If the user changes a standard setting the background colour of the field changes to yellow background colour In such cases no changes in the Type Parameter Manager for this field will be considered Units Numerical values can also be assigned physical or defined units such as rom Nm bottles min etc First instances When using Lenze function blocks the instances of these FBs e g of 9300 Servo V2 0 can be assigned all Lenze parameter codes standard for FBs using the function First instance Post editing of the parameter codes is then not possible The parameter code assignment can be revoked completely Lenze function blocks can be linked with any codes Lenze supplies code parameterized function blocks for standard tasks For PLC devices the function block
241. he variable value e 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 e Press lt Enter gt or double click the variable to open it and to list all components The variable will then be identified with a minus sign e Double click or press lt Enter gt again to hide the components and to return the plus sign Single element variables Press lt Enter gt or double click a single element variable to open the dialog box for writing a variable The current variable value can be changed by entering a new value Inthe case of Boolean variables the value will be toggled without dialog box display The new value now represented in a different colour will not be written to the control immediately e Thus any number of variables can be modified and then written to the control in one go cycle consistent Comment User comments must start and end with the special character sequences and Comments are allowed in all text editors and there at any location such as declarations IL and ST and user defined data types Use Project gt Options Category Build options to activate or deactivate nested comments FBD LD and CFC allow comments to be entered for every network e Find the network to be commented and select the command Insert gt Comment In SFC comments for the step can be entered under Edit step attributes Tip
242. he visualization this variable may be used to preset the name of the visualization e g xxx visul e Ifthe text field Zoom to Vis is used to enter command ZOOMTOCALLER the online mode provides for a return to the calling visualization by clicking the element if such a constellation has been configured If a jump is to be executed to a visualization reference with placeholders these may be substituted directly on call with variable names or texts Observe the following syntax lt Visuname gt lt Placeholder1 gt lt Text1 gt lt Placeholder2 gt lt Text2 gt lt Place holdern gt lt Textn gt Call for visualization visu1 where the placeholders used in visu1 var_ref1 and var_ref2 are substituted with variables PLC_PRG var1 or PROG var1 visul var_ref1 PLC_PRG varl var rel2 PROG Varl Execute program If check box Execute program is activated the executable program specified in the input field will be launched on clicking the visualization element Example notepad C help txt the program Notepad will be started and the file help txt opened Text input of variable Text display If check box Text input of variable Text display is activated a value can be assigned to a variable by clicking the visualization element e The value is assigned to the variable selected in category Variables in the text field Text display e Clicking the visualization element will display an input field for the
243. heck box Draw is activated the frame will be displayed in the colour selected under Colour and Signal colour The signal colour will only be displayed if the variable entered in the category Variables field Change colour is TRUE Configure Visualization available for visualization Use Extras Configure category Visualization to effect the settings for a visualization inserted into the current visualization as an element After insertion this one is referred to as the Reference of the original one Visualization Use the input field Visualization to enter the object name of the visualization e All visualizations except the current visualization and a reference to the current one can be specified e Click to open the dialog box Select visualization to see a list of all visualizations available for this project Frame e lf check box Draw is activated the frame will be displayed in the colour selected under Colour and Signal colour The signal colour will only be displayed if the variable entered in the category Variables field Change colour is TRUE e If check box Isotropic is activated the proportions of the visualization always remain the same even if the size changes i e the ratio between length and width remains the same e lf check box Cut off is activated only the original section of the visualization will be displayed in online mode If an object reaches beyond the original display for example this object will be cu
244. her 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 The command Open does not allow the creation of a new project The menu File lists the last opened projects at the very bottom Selecting one of those projects will open it If passwords or user groups have been defined for the project the system will prompt for a password Close Icon Menu File gt Close Keyboard Use this command to close the currently open project e lf the project was changed the user will be prompted as to whether these changes are to be saved or not If the name of the project to be saved is Untitled enter a new name Save Icon i Menu File Save Keyboard lt Ctrl gt lt S gt Use this command to save the project if it was changed lf the name of the project to be saved is Untitled enter a new name Save as Icon Menu File Save as Keyboard Use this command to save the current project under a new name or as library The original project file remains unchanged Selection of the command opens the dialog box Save as Select either an existing file name to overwrite an existing project or enter a new file name e Select the required file type Saving the project under a new name If the project is to be saved under a new name only select file type DDS Project
245. hic representation of TOF s time sequence CAL TOFInst IN VarBOOL1 PT T 5s TOF Inst LD TOFInst Q TOF ST VarBOOL2 VarBOoL1 iN a VarBOOL T 5sHPT ET TOFInst IN VarBOOLl PT T 58 VarBOOL2 TOFInst Q 44 18 DDS EN 2 3 Lenze Show Hide Bookmarks 15 15 1 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Appendix Appendix 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 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 The DDS frame window display can be set show hide The window is not displayed and does not show in the task bar show icon The window is minimized show max The window is maximized show normal The window is shown in the status applicable on last exit out lt outfile gt All messages are output into the message window and the file lt outfile gt cmd lt cmdfile gt After startup the commands in command file lt cmdfile gt will be executed A command line input is structured as follows lt DDS EXE file path gt lt Project path gt lt Command 1 gt lt Command 2 gt DDS file pro is opened the window is not displayed The content of comm
246. his association will be deleted If an IEC step with an associated action has been selected the association will be deleted IF the IEC step has several actions select an action from the dialog box Step attributes on Use this command to open a dialog box for the editing of attributes for the selected step Minimum time ft 2s Maximum time t 10s 0o Cancel Comment Traffictligts Time of red Three different entries are possible e Usethe input field Minimum time to specify the minimum time for processing this step Type TIME Note Even if the subsequent transition is TRUE the step will remain active for this time e Use the input field Maximum time to enter the maximum time for processing this step Type TIME e Use the input field Comment to enter a comment for the step Use Extras Options to set the SFC editor to display comments or time settings for your steps The comment or time setting will then be displayed to the right of the step Tip SFC flags will be set to signal that the maximum time has been exceeded These flags can be interrogated by the user The time the step has already been active is displayed in online mode DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 7 8 3 7 Lenze Drive PLC Developer Studio Editors The following example shows a step whose processing is to take a minimum of two and amaximum of ten seconds tH1 0s Time limit overview Extras
247. iable lt Name gt u byte system the memory area can be defined in dialog box Automation system settings tab Memory layout Contact the contro manufacturer if you find no entry option there Note Also that in the case of instances of function blocks in which a Retain variable is used the Retain memory manages the complete instance Memory area for global variables exhausted Variable The memory area available for global variables is exhausted lt Name gt lt Number gt byte e The available memory area depends on the target system e Information about the memory area available for the target system is given in the dialog box Target settings tab Memory layout O VAR OUTPUT and VAR_IN_OUT not allowed in functions You must not define any output reference parameters in a function 3821 Atleast one input required for a function Insert at least one input parameter for the function 3840 Unknown global variable lt Name gt You are using a VAR_EXTERNAL variable in the organization unit for which no associated OOO AA A ttn tas tendo 3841 Declaration of lt Name gt does not match global declaration The type specified in the declaration of the VAR_EXTERNAL variable does not match that in e AT go fel ee OROA e 3900 Multiple underscores in the identifier Remove multiple underscores in the identifier name 3901 Max 4 address fields allowed You are using a direct address assignment to an address that contains in excess of four levels
248. iable declaration 3741 Type identifier expected You are using a keyword or an operator instead of a correct type identifier 3742 Enumeration value expected An identifier is missing behind the left parenthesis or behind a comma within the area in parentheses in the definition of the enumeration type 3 43 Integer expected Enumeration values can only be initialized with INT type integers Enumeration constant lt Name gt already defined Check that you have observed the following rules while assigning enumeration values e AIl values must be unique within one enumeration definition e All values must be unique within all global enumeration definitions e All values must be unique within all local enumeration definitions of an organization unit 3745 Range delimiters are permitted for integer data types only Subrange types may be defined based on integer data types only 3746 Range delimiter lt Name gt incompatible with data type A limit for the range specified for the subrange type is outside the limits permitted for the lt Name gt basic type J o A A 3747 nknown string length lt Name gt You are using an unknown constant to define the string length 748 1 Use an ARRAY OF ARRAY as required 3779 3760 Incorrect initial value Use an initial value that corresponds to the type definition bzw Initialisierung von Pointern Use the variable declaration dialog for assistance pt POINTER TO lt typ gt A
249. ialog box Note the following restrictions The organization unit names must not contain white spaces Organization units and data types must not bear identical names Global variable lists must not bear identical names Actions within the same organization unit must not bear identical names e Visualizations must not bear identical names In all other cases identical names are permitted The actions of various different organization units can have identical names Visualizations can have the same name as organization units Dialog for the creation of a new organization unit The dialog must be fully completed If the input is not in breach of the specified naming convention press OK to create the new object in the Object Organizer and to display the associated input window The menu command Edit Insert inserts the object from the clipboard No dialog is displayed in this case Ifthe name is in breach of the naming convention it willbe extended with a continuous number lade_1 lade_2 e Make sure that the object name is not already in use e lf the object is an organization unit the organization unit type program function or function block and the language to be used for programming must also be selected Confirming the input will display the associated input window DDS EN 2 3 Lenze Show Hide Bookmarks 6 2 4 3 6 2 4 4 6 2 4 5 6 2 4 6 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Wo
250. ide which file to open original or backup file Autosave interval min Enter a time interval in minutes for temporary backup 5 6 DDS EN 2 3 Lenze efesotomasyon com Lenze 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 A project can also be loaded on DDS start by specifying the project name in the command line Save before compile The project is saved prior to each compile Options User information Category User Name Me Initials i Cancel Company Lenze GDC Device Description Every entry can be changed and will be saved together with the project Options Editor Category Load amp Save mo User Information W_ utodeclaration Tab Width MW Autoformat a Cancel ont MV List Components I Declarations as tables co Mark Bitvalues GDC Device Description Dotted line Decima C Line C Binary C Filled Hexadecimal T Suppress monitoring of complex types array pointer YAR_IN_OUT M Show POU symb
251. ified in the input field Save as type The saved watch list can be reloaded with Extras Load watch list DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Resources 8 9 3 4 Load watch list jon Menu Etras oLoad watch list Keyboard __ Use this command to load a saved watch list Selection of the command opens the dialog box Open e Select the required file with the extension wtc and click OK Enter the new watch list name in the dialog box e The input field already displays the file name without extension Click Extras Save watch list to save a watch list 8 9 3 5 Monitoring active Use this command to switch the display of the Watch and Receipt Manager on and off in online mode e lf the display is activated a tick appears in front of the menu item The display must be switched off with this command to enter anew variable or to pre assign a value The display can be switched on again after the variable has been entered executing the command again 8 9 3 6 Write receipt eon Use this command to write the pre assigned values to the variables in the Watch and Receipt Manager s online mode 8 9 3 7 Read Receipt on Use this command to replace the pre assignment of the variables with the current values in the Watch and Receipt Manager s online mode Example PLC PRG counter lt current value gt lt current values Tip O
252. igned code Refer Type Parameter Manager Scale functions Access Use the group field Access to define whether the code can be read and written or read only Initialization Use the input field Initialization to enter the code value to be used to initialize the variable by loading C0002 Default setting The initialization value code value is the scaled value i e the initial value is scaled by means of the scale factors before it can be used as variable value in the IEC 61131 3 program e The initial value of the Parameter Manager has priority if a variable was initialized with a value in both the declaration editor and the Parameter Manager Tip Initialization is also possible when no code is assigned A variable can be initialized with a scaled value that is transferred on launching the PLC program The advantage of this is that physical values are used as initial values for example Unit Use the list field Unit to assign a physical or fictitious unit to the code Use the button New to define new application specific units e g bottles minute DDS EN 2 3 8 13 Show Hide Bookmarks efesotomasyon com Lenze 8 14 Drive PLC Developer Studio Resources Ext data type Use the field Ext data type to assign one of the following special data types to a code Fed pont fourfveg decimal poor 8 3 bit wih polar noe Re fe zi wtoutpoariy fron e te Display Use the group field Display to defi
253. igned to position A 10 but to the upper permissible range limit A 7 Use the function CheckBounds to correct accesses outside array boundaries Example of a function Example of a function in IL Example of the function call of the function shown on the left LD 7 0001 FUNCTION Fet INT Fet 4 2 o00a vAR_INPLUT ST result OO03 END VAR PAR INT result Fct 7 4 2 PAR2 INT PAR3 INT OO08 END_VAR SMe DDS EN 2 3 2 3 Show Hide Bookmarks efesotomasyon com Lenze 2 2 4 2 2 4 1 Drive PLC Developer Studio Introduction Function block A function block is a software organization unit whose execution returns one or several values e Unlike a function a function block does not supply a return value e A function block declaration starts with the keyword FUNCTION BLOCK e The creation of instances data records of a function block is a prerequisite Wi fub FB IL olx 0001 FUNCTION_BLOCK fub OO02ZVAR_INPUT part INT par2 INT OOOS IEND_VAR 0006 vAR_OUTPUT varout1 INT yarout2 BOOL parl par2 yaroutt parl par2 varout Function block instances e Every instance has its own identifier instance name and a data structure which includes its inputs outputs and internal variables e Instances are locally or globally declared like variables by giving the function block name as identifier type Example of an instance named INSTANZ of function block FUB INSTANZ FUB
254. ill be updated automatically if the original files libraries function block POUs were changed e Changestoa predefined list will change its background colour from grey to yellow Automatic updates will no longer be carried out e Only code values defined in the selection list can be addressed via the parameterization environment DDS EN 2 3 Lenze Show Hide Bookmarks 8 4 3 5 Lenze efesotomasyon com Lenze 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 e The settings will be accepted for variables set in the Type Parameter Manager leaving only the code to be assigned e The limits of the data type set in the declaration editor will be accepted for variables that are not yet known at this point If the user makes any retrospect changes the background colour of the associated input field changes to yellow to show it is different from the type definition Retrospect changes made in the Type Parameter Manager or data type changes in the declaration editor are automatically updated for the associated code Handling Lenze function blocks If you use Lenze function blocks in POUs of type Program VAR CONSTANT RETAIN vari
255. imilar 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 e A network is limited on the left and on the right by a vertical power cable In between is a circuit diagram consisting of contacts coils and connection lines that transmit the status ON or OFF TRUE or FALSE from left to right Example of a network in LD Int In2 Switch Motori OX3 0 Switch Switch3 Switch4 H WIX2 T 1x2 8 1x2 0 mH Contact Every network in LD consists of a network of contacts on the left hand side which transmit the status ON or OFF from left to right variable value TRUE or FALSE lf a Boolean variable of a contact has the value TRUE the status ON is transmitted via the connection line from left to right Otherwise the right hand connection is set to OFP Parallel or series connection e Contacts can be connected in parallel In that case one of the parallel branches must transmit the value ON to ensure that the entire parallel branch transfers the value ON e Contacts can be connected in series In that case all contacts must transmit the status ON to ensure that the last contact transmits ON Negation A contact can also be negated It is then identified with a slash
256. in an operand ROR K in ROR K La Rotate bits right by K within an operand SEL G in0 in1 SEL in 0 in 1 Binary selection between two operands in0 G is FALSE and in1 G is TRUE MAX in0 in1 MAX in 1 Return the greater of 2 values MIN in0 in1 MIN int n Return the lesser of 2 values LIMIT MIN in Max LIMIT MIN MAX ui Limit the value range will be reset to Min or Max if exceeded MUX K in0 in_n MUX ind in_1 Select the Kth value from a number of values in0 to In_n ADR in ADR Address of the operand in DWORD BOOL_TO_ lt type gt in BOOL_TO_ lt type gt Type conversion of the Boolean operand into a different elementary type BYTE_TO_ lt type gt in INT_TO_ lt type gt Type conversion of the BYTE operand into a different elementary o JI A lt lt 2 D V in INT_TO_ lt type gt Type conversion of the WORD operand into a different elementary type et lt O D A lt lt 2 cD n 2 gJ Q rm Mm Cy T S 8 J N et Cul et lt lt lt O O O D D D in lt type gt _TO_BOOL INT_TO_ lt type gt in INT_TO_ lt type gt Type conversion of the operand to BOOL Type conversion of the INT operand into a different elementary et lt oO D DINT_TO_ lt type gt in DINT_TO_ lt type gt Type conversion of the DINT operand into a different elementary et lt O D REAL_TO_ lt type gt in REAL_TO_ lt type gt Type conversion of the REAL operand in
257. in the contact symbol The contact then transmits the input status if its status is OFF FALSE Coil Any number of so called coils represented by brackets are listed on the right hand side of a network in LD e Acoil transmits the connection value from left to right and copies it into an associated Boolean variable e The input line can be set to ON or OFF depending on the Boolean values TRUE or FALSE e Coils can only be connected in parallel Negation Coils can also be negated Shown by a slash in the coil symbol In that case the coil copies the negated value to the associated Boolean variable DDS EN 2 3 Lenze Show Hide Bookmarks 4 7 3 4 7 4 4 7 5 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Programming languages Set Reset coil A coil can also be defined as set or reset coil e A variable of a set coil becomes TRUE if the network result is TRUE e A variable of a reset coil becomes FALSE if the network result is FALSE e fthe conditions are not fulfilled the variable does not change A set coil S inthe coil symbol can assume ON status but can then no longer be reset to OFP A Reset coil f R in the coil symbol can assume OFF status but can then no longer be reset to ON Function blocks in LD In addition to contacts and coils LD allows the input of function blocks and programs In the network function blocks and
258. includes the following objects that can be accessed via the Object Organizer e Organization units e Datatypes e Visualizations e Resources Libraries Codes Organization unit POU Functions function blocks and programs are organization units of a project and referred to as program organization units POU in the IEC 61131 programming language Every organization unit consists of a declaration part and a body The body is written in one of the IEC programming languages IL ST SFC FBD LD or CFC The DDS supports all IEC standard organization units as well as Lenze specific organization units Use of these organization units in your project requires the associated function library to be linked to your project with the help of the Library Manager Organization units can call other organization units Recursions cause a compiler error and must be avoided Function A function is a software organization unit that returns exactly one data element that may also consist of several elements such as fields or structures for example on execution and whose call may occur in textual languages as an operator in expressions Note when declaring a function that a type must be assigned to the function i e the function name must be followed by a colon plus type The names of function and function output are identical Example of a correct function declaration FUNCTION Fct INT e A function declaration starts with the keyw
259. ing dependent on the selected font Font Click Font to open the dialog box Font and select the font for the editors e The font size is a basic unit for all drawing operations A larger font size therefore does not only result in a larger image but also a larger printout for each DDS editor Mark Use the group box Mark to choose from three different marking formats for the graphic editors e Dotted line The mark is a dotted rectangle e Line The mark is a rectangle consisting of a continuous line e Filled The mark is a filled rectangle inverse A dot identifies the active selection DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Options Desktop Lenze 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 e Decimal e Hexadecimal e 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 Category Load amp Save een MW Tool bar T Printer borders E MV Status bar I F4 ignores warnings a TT Online in Security mode Language English GDC Device Description If an option is active a tick appears in front of the option Y Tool bar lf the option Tool bar is activa
260. inistrators can now assign access rights individually to each user group The following settings are possible e No access No member of the user group can open this object e Read access A member of the user group can open this object in read only mode e Full access A member of the user group can open and modify this object The settings refer either to the object currently selected inthe Object Organizer or if the check box Apply to all is activated to all organization units data types visualizations and resources of the project As long as a password was set for user group 0 assignment to a user group happens through a password prompt when opening a project Properties Menu Project Object properties Keyboard This command is available only if a global variable list has been selected in the Object Organizer On generating a new global variable list this dialog is opened with the menu command Object Insert The folder Global variables must be selected in the Object Organizer DDS EN 2 3 Lenze Show Hide Bookmarks 6 2 4 9 6 2 4 10 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Working with projects and objects Open instance Menu Project gt Open 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 i
261. ion Translate into other languages Menu Project Translate into other languages Keyboard This menu item translates the current project file into a different national language by reading a translation file generated from the project The translation file will then be updated with translated texts in the desired national language with the help of a text editor For this purpose the menu offers two subitems e Project Translate into other languages Create translation file e Project Translate into other languages Translate project into another language DDS EN 2 3 6 9 Show Hide Bookmarks efesotomasyon com Lenze n O 6 10 Drive PLC Developer Studio Working with projects and objects Creating a translation file Create translation file Translation file cts SimplePLCS amples Practice_TrafficLight test tl Search Information to include Target languages IY Names M Identifiers IY Strings France I Comments WM Visualisation t Exclude Position Information None Overwrite existing Remove e Enter a path in the field Translation file to store the file at the desired location The standard file extension is tIt text file e To edit an existing translation file select and open it with the Windows dialog Search e Optionally the following information can be included with the generated or modified translation file Name titles in the Object Organizer Identifier
262. ion libraries If variables from Lenze function blocks are linked with codes setting ranges and scaling operations must be set in accordance with the documentation DDS EN 2 3 8 15 Show Hide Bookmarks efesotomasyon com Lenze 8 4 3 6 8 16 Drive PLC Developer Studio Resources Example Instances of the function block L_DIGDEL of the 9300 Servo PLC wDelayTime C0721 C0726 a 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 e UsetheFBL ParWrite from the function library LenzeDrive lib to write codes in PLC programs Accepting all Lenze codes of a function block Open the dialog box Instance Parameter Manager and click the button First instance to assign the associated code only to the selected variable To accept all Lenze codes of the function block instance select a variable of the associated function block in the Instance Parameter Manager and click Insert gt Adapt Lenze initial codes e This command is also available in the shortcut menu Ei Instanz Parametermanager Tol Code Program unit Variable Parametre text Var Type Initialize value Unit Code max Code min C0 20 PL PRG L_DIGDEL1 byFunction Add new object Process the object Delete the object ir _ Zoo o Copy the object
263. ion unit has a lower maximum number of inputs the last inputs including the preceding branches will be deleted e Click this text to change it to the required constant or variable Insertion is made dependent on the selected position Input selected If selecting an input the operator will be inserted in front of this input e The first input of this operator will be connected to the branch to the left of the selected input e The output of the new operator will be connected to the selected input DDS EN 2 3 7 31 Show Hide Bookmarks efesotomasyon com Lenze 7 9 3 5 7 32 Drive PLC Developer Studio Editors Output selected If selecting an output the operator will be inserted behind this output e The first input of the operator will be connected to the selected output e 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 e As far as possible the branches will be connected as before the replacement e Ifthe old element had more inputs than the new element the branches that cannot be connected will be deleted The same applies to the outputs Jump or Return selected If selecting a jump or a Return the organization unit will be inserted in front of this jump or Return e The first input of the oper
264. ions The Drive PLC Developer Studio provides all the comfort and ease of fully matured development environments offered by higher level programming languages under Windows Terminology used In the following text used for Drive PLC Developer Studio Global Drive Control parameter setting program for Lenze PLCs Lenze automation systems Global Drive Oscilloscope for servo PLC devices System block Function block Parameter codes Codes for setting the functionality of function blocks Applied conventions This Manual applies the following conventions to distinguish between different types of information Names of dialog boxes input italics The dialog box Options fields and selection lists Buttons bol oickoKto Menu commands Use the command Messages to If the execution of a function requires several commands the individual commands are separated by an arrow Select File Open to Keyboard commands lt fett gt Use lt F2 gt to open the Help Manager If a command requires a combination of keys a is placed between the key symbols Use lt Shift gt lt ESC gt to Program listings IF varl lt var2 THEN Keywords Courier bold starts with FUNCTION and ends with END FUNCTION Important note Caution Do not use the command Online Controller inhibit for an emergency stop through the PC since this command reaches the controller with a time delay TIP Positioning the mouse pointer briefly over a
265. is an ASCII file that can be loaded into and edited in any text editor The template starts with the line DOKUFILE followed by a list of project variables Every project variable has three lines e The first line contains the keyword VAR to indicate that a variable starts e The second line contains the name of the variable e The third line is blank for comments Simply delete variables not to be documented from the text You can create any number of templates for your project Use document template To use a document template execute menu command Extras Select document template e When documenting the entire project or printing parts of it the comment entered in the template will be inserted in the program text for all variables This comment is print only Create document template Icon Menu Extras Create document template Keyboard Use this command to create a document template e The command is available if an object Global variables has been selected in the Object Organizer on the Resources tab Selection of the command opens the dialog box Save as e Enter anew file name in text field File name e Text field Save as type already includes the extension txt The now generated text file lists all variables used within your project Select document template Icon Menu Extras Select document template Keyboard Use this command to open the dialog box for template selection e Select the required document
266. is identified with a tick Basic language The pdb file will be generated in the selected language Build GDC Device Description If check box Build GDC Device Description is activated a PDB for GDC will be built updated for every language selected under Language selection in the directory specified under Path during every project compile e This project specific PDB contains the basic codes for the associated PLC based on its basic PDB and the project specific codes defined in the Parameter Manager e lt is generated only if PDB relevant data have changed e The device description is also saved into the project directory for easier handling of the Global Drive Loader software e lf the Lenze OPC server is installed the device description will also be copied into its PDB directory DDS EN 2 3 Lenze Show Hide Bookmarks 6 1 6 1 1 1 6 1 1 2 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Working with projects and objects Working with projects and objects 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 bin will be overwritten This file is saved i
267. itoring of BOOL Cancel Line numbers light grey Breakpoint position dark grey Set breakpoint light blue Current position red Reached position green Monitoring of BOOL blue Click one of the buttons to open the dialog box Colours and select the required colour for the element DDS default DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Working area Options Directories Lenze Options x Category Load amp Save Project 7 Libraries Ej Cancel Compile files al Configuration files T Target i Libraries c ProgrammeLenze DDS_P_2_00 9300SPLCv20000 Libraries GDC Device Description Configuration files Ic Programme Lenze DDS_P_2_009300SPLCv20000 0 Modules Common Libraries C Programme Lenze DDS_P_2_O0 Projects Ss Compile files CATEMPA E Configuration files C Programme Lenze DDS_P_2_O0 Projects PLCCONF La 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 For library and configuration files the system allows the input of several paths each separated by a semicolon
268. its and data types in the project exceeded Compile will be aborted Change the maximum number of organization units in dialog box Automation system settings tab Memory layout Q 610 lt Name gt not supported The named feature is not supported by this version Q Note The tab memory layout cannot be edited at the moment 3 Compile terminated The user terminated the compile 614 The project contains no organization unit lt Name gt entry A project requires a Program type entry function e g PLC_PRG or a task configuration function or task configuration lt Name gt entry function must be Program type You are using an entry function e g PLC_PRG other than Program type SD Q Q O Qr Q O 1 Programs in external libraries are not supported The library to be saved contains a program that will not be available during library use 617 Insufficient memory Increase the virtual memory capacity of your processor 618 The current code generator does not support bit access The code generator for the currently set automation system does not support bit access to variables 700 An organization unit named lt Name gt already exists in You are using an organization unit name that has already been assigned for a library library lt Name gt organization unit Rename the organization unit Go Yo Go Go 701 The organization unit name in the declaration name does Rename your organization unit using th
269. ividual subcode settings Example Relationship between field variables and subcodes Variable in PLC program Assigned code Array fields Automatically generated subcodes 3 mM Pa O SS 2007 C6000 5 PI 4 Data export Icon Menu Extras CSV export Keyboard If the instance parameter manager is active this menu command can be used to export the contents of the instance parameter manager The export file with the name csv is saved in the same file folder as the DDS project file with the name pro CSV comma sequented values saves the data of the instance parameter manager using the same column pattern For future processing the file can e g be opened with Excel Tip Do not open the file directly in the Explorer via a double click but via the menu command file gt open in Excel in order to improve configuring of the export file DDS EN 2 3 8 17 Show Hide Bookmarks efesotomasyon com Lenze 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 If a function block created in the Type Parameter Manager is called in a Program type POU the settings defined in the Type Parameter Manager will be accept
270. ization element will be visible If the variable is TRUE the element will be invisible Change colour If the variable in the input field Change colour is set to FALSE the visualization element will be displayed in its original colour Ifthe variable is TRUE the element will be displayed in its signal colour Text display Use the input field Text display to enter a variable whose value will be output if the field Content in the category Text contains s in addition to the text DDS EN 2 3 9 13 Show Hide Bookmarks efesotomasyon com Lenze 9 3 2 9 14 Drive PLC Developer Studio Visualization Formatted text display The following tables provide a general formatted text display Char format 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 Display field minimum width For Char variables String format Formatted text display starts with If the character is to be included in the display for specific reasons the first characters must be Displayisleft aligned b Display field minimum width Width of the field section written by the string For Char arrays Integer format Formatted text display starts with If the character is to be included in the display for specific reasons the first characters must be Element E pesta TTT E Dsnay tld mmm i
271. ization gt END VAR Example VAR CONSTANT RETAIN Acceleration DINT 10000 acceleration time END VAR 7 2 9 Keywords e All editors require keywords to be written in capitals e Keywords must not be used as variable names Lenze DDS EN 2 3 7 13 Show Hide Bookmarks efesotomasyon com Lenze 7 2 10 7 2 11 7 14 Drive PLC Developer Studio Editors 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 e contain white spaces and umlauts e be declared twice e be identical to keywords Furthermore e Case sensitivity is not an option for variables Example VAR1 Var and vari are not different variables e Underscores in an identifier are significant Example A BCD and AB CD are interpreted as different identifiers e Multiple successive underscores at the beginning of or within an identifier are not allowed Variable declaration Syntax lt Identifier gt AT lt Address gt lt Type gt lt Initialization gt The parts in curly brackets are optional All variable declarations and data type elements may contain initializations e Initializations are effected with assignment operator e Initializations are constants for variables of elementary types e The default initialization for all declarations is 0 or FAL
272. ject Organizer require the Object Organizer to be the active window Redo Icon Menu Edit Redo Keyboard lt Ctrl gt lt Y gt Use this command to redo an action undone with Edit Undo in the currently open editor window orinthe Object Organizer e The command Redo can be executed as often as the command Undo before DDS EN 2 3 7 1 Show Hide Bookmarks efesotomasyon com Lenze 7 1 1 3 7 1 1 4 1 2 Drive PLC Developer Studio Editors Cut Icon Menu Edit gt Cut Keyboard lt Ctrl gt lt X gt dh lt Umschalt gt lt Del gt Use this command to remove the current selection from the editor and save it to the clipboard e Inthe case of the Object Organizer this applies analogously to selected objects although some objects cannot be cut Such as the PLC configuration for example Note Note that not all editors support the cut function and that the functionality may be limited in some editors The selection format depends on the editor e Intext editors IL ST declaration the selection is a sequence of characters e Inthe FBD LD and CFC editors the selection is a number of networks identified by a dotted rectangle in the network number field or a box with all lines boxes and operands e Inthe SFC editor the selection is part of a step sequence surrounded by a dotted rectangle The contents of the clipboard can be inserted by using the command Edit Insert e The SFC editor also allows use of
273. l Function Chart editor describes the chronological sequence of various actions within a program si PLC_PRG PRG SFC Of x O001 PROGRAM PLC_PRG CAL LIGHT1 STATE 5 CAL LIGHT2 STATE 5 LD 0 ST COUNTER CAL WAIT1 SETTIME t 105 all CHANGE1 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 e Elements steps transitions jumps can be selected with a click or the arrow keys e To select a set of several elements select one and press the lt Shift gt key before selecting the element in the left or right hand bottom corner of the set The resulting set is the smallest contiguous set of elements containing these two elements Tip Note that all commands must comply with the language conventions to be executed 7 56 DDS EN 2 3 Lenze Show Hide Bookmarks 7 8 2 7 8 2 1 7 8 2 2 7 8 2 3 7 8 2 4 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors Commands in the Insert menu Step transition before Icon t Menu Insert gt Step transition before Keyboard lt Ctrl gt lt T gt 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
274. last coil e lf the selected position is a coil the new coil will be inserted directly above it The coil is pre assigned e Click the text to change it to the required variable Alternatively use the Help Manager lt F2 gt to do so Insert at organization unit Insert Insert at organization unit Keyboard Input lt Ctrl gt lt U gt Output Box Assignment lt Ctrl gt lt A gt This submenu to the Insert menu contains commands to add further elements to an already inserted organization unit with EN input DDS EN 2 3 7 37 Show Hide Bookmarks efesotomasyon com Lenze 7 6 2 5 7 6 2 6 7 6 3 7 38 Drive PLC Developer Studio Editors An organization unit with EN may be given the name of a function block so that Insert gt Insert at organization unit can be executed TP EN 22924IN Q 22 999 PT ET In this example AND was overwritten with the name of timer TP e The commands in this submenu can be executed at the same cursor positions as the associated commands in the FBD Input Use Input to add a new input to the organization unit Output Use Output to add another assignment to an organization unit output Use Box to add a new organization unit to the selected one The output of the new organization unit is connected to the selected input The organization unit is pre assigned AND Assignment Use Assignment to add an assignment to a variable Jump Ico
275. layed e g rectangle e f amenu command has been selected but not confirmed a short description will be given in the status bar e The status bar displays the word READ if a project is opened with read access only Shortcut menu Keyboard lt Umschalt gt lt F10 gt Use the right mouse key to display a shortcut menu e The shortcut menu contains the commands most frequently used for a selected object or the active editor e The selection of available commands is dependent on the active window DDS EN 2 3 Lenze Show Hide Bookmarks 5 2 5 2 1 5 2 1 1 5 2 1 2 5 2 1 3 5 2 1 4 5 2 1 5 5 2 1 6 5 2 1 7 5 2 1 8 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Working area 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 Y in front of the menu entry Commands in the Window menu s a O gt O N O 5 rmh D lt con Menu Window Tile horizontally Keyboard Use this command to tile all windows on the desktop horizontally so that they will not overlap but fill the whole desktop O mi O lt c
276. lays the name of the element to be inserted in black e After an element has been inserted the process automatically changes to selection mode Selection mode In selection mode one or several elements can be selected for editing e To insert another element change back to insertion mode with the right mouse button while keeping the lt Ctrl gt key depressed or reselecting the associated insert command Tip Toggle between insertion and selection modes with the right mouse key while keeping the lt Ctrl gt key depressed Commands in the Insert menu Rectangle Icon ts Menu Insert gt Rectangle Keyboard Use this command to insert a rectangle as an element into your current visualization Command selection turns the mouse pointer into the associated icon in the editor window e Use the depressed left mouse key to size the element as required in the editor window Rounded rectangle Icon 5 Menu Insert Rounded rectangle Keyboard Use this command to insert a rounded corner rectangle as an element into your current visualization Command selection turns the mouse pointer into the associated icon in the editor window e Use the depressed left mouse key to size the element as required in the editor window DDS EN 2 3 Lenze Show Hide Bookmarks 9 1 1 3 9 1 1 4 9 1 1 5 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Visualization Ellipse Icon 3 Menu Insert gt Elli
277. ld is pre assigned with type BOOL e Use the button to call the Help Manager for a selection of all available types e Use text field Initial value to assign a value to the variable otherwise the standard initial value will be used e Use check boxes CONSTANT constant and RETAIN battery support to define whether the quantity is a constant or a retentive Retain variable DDS EN 2 3 Lenze efesotomasyon com Lenze 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 Array Boundaries Fa Dim Start End 1 0 2 2 0 5 Cancel 3 Type UDINT This organization unit can be used to generate a three dimensional array Use Start and End to define the boundaries of each dimension Use the button to define the array data type If the dialog is exited with OK the system generates an IEC format variable declaration Example ARRAY 0 5 0 2 OF INT The variable declaration dialog offers dialog box Initial value to enter an initial value for the variable to be declared If this is an array or a structure button or lt F2 gt cursor must be in dialog box Initial value can be used to open a special initialization dialog Other types INT BYTE respond to opening the Help Manager dialog Initialize WAIT E P WAIT ARRAY 0
278. line help chapter Lenze function libraries Opening the Instance Parameter Manager Inthe Object Organizer double click the object Instance Parameter Managerto open the Instance Parameter Manager CR Instance parameter manager Program unit Variable Parameter text Var Type Initialize value Unit Code max Code min C0672 MotorControl L_RFG1 dnTif L_RFG1 Tif Ablaufz DINT 5 000 s 999 999 0 000 999999 C0671 MotorControl L_RFG1 dnTir L_RFGI Tir Hochla DINT 5 000 s 999 999 0 000 999999 C UE E e The Instance Parameter Manager displays information on already assigned codes e Frequently required commands are also available via the shortcut menu right mouse key Add new object Process the object Delete the object Copy the object Insert the object Adapt Lenze initaly codes Tip Use the buttons Code number and Program organization unit in the top line of the list to define the sorting order for entry display e Click Code number to sort the entries by ascending code numbers e Click Program organization unit to sort the entries alphabetically and in ascending order by program organization unit and variable names Editing codes Settings for already assigned codes can be edited by e double clicking the associated line or e selecting the associated line and clicking Insert gt Process the object This will open the dialog box Instance Parameter Manager where the settings for a
279. llows language selection e The button Save stores the language file at the selected location e Use the button OK to save the dialog box settings DDS EN 2 3 Lenze Show Hide Bookmarks 9 3 1 2 9 3 1 3 9 3 1 4 Configure Form Configure Text Lenze efesotomasyon com Lenze 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 vis will be generated in the specified target path The created language file can be opened with a text editor Select background bitmap con Use this command to load a bitmap as background for the visualization Selection of the command opens the dialog box Open file e Select the required file with the extension bmp and click OK The selected bitmap appears in the background of the visualization Delete background bitmap eon Use this command to delete the background bitmap of the current visualization Configure Icon Menu Extras Configure Keyboard Use thiscommand to open the dialog box Configure elementto configure the selected visualization element
280. lours Keywords are written in blue letters e Inall editors for organization units a horizontal screen divider separates declaration part from body on screen This divider can be moved as required by keeping the left mouse key depressed Tip The most essential declaration editor commands are also available in the shortcut menu right mouse key or lt Umschalt gt lt F10 gt Declarations as tables Instead of the declaration editor use menu item Project gt Options category Editorto edit variables as a table with the help of selecting check box Declarations as tables VAR K_VARLINPUT YYVAR_OUTPUTYY VAR_IN_OUT gt CONSTANT Y RETAN gt INFO N Name Address Type Initial Comment 0001 ri 0003 r N o gooa onottogg f foe e This table is arranged as a card index box with tab cards for input variables VAR_INPUT output variables VAR_OUTPUT local variables VAR and input output variables VAR_INPUT e Fields for name address type initial value and comment are available for each variable DDS EN 2 3 Lenze Show Hide Bookmarks 7 2 1 7 2 1 1 7 2 2 7 2 3 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors Declaration part The declaration part of an organization unit declares all variables locally These may be e input variables e output variables e input output variables e local variables e retentive variables e constants e and retentive constants The
281. lt in information loss e Where the number to be converted exceeds the range limit the first bytes of the number will not be considered LD 4223 si INT_TO_SINT 4223 INT TO SINT INT_TO_SINI si 127 i aor ST Si If the integer 4223 16 107f in hexadecimal writing is saved as SINT variable that variable will be assigned the number 127 16 7f in hexadecimal writing BOOL_TO Converting BOOL into another type e With number types the result is 1 if the operand is TRUE and 0 if the operand is FALSE e With type STRING the result is TRUE or FALSE LD TRUE LD TRUE BOOL TO INT BOOL TO STRING BOOL TO TIME ST i ST str ST t LD TRUE LD FALSE LD TRUE BOOL TO TOD BOOL TO DATE BOOL TO DT ST tof1 ST dandt i BOOL_TO_INT TRUE i 1 str BOOL TO STRING TRUE str TRUE t BOOL TO TIME TRUE t T 1ms tof1 BOOL TO TOD TRUE tof TOD 00 00 00 001 dat BOOL TO DATE FALSE dat D 1970 01 01 dandt BOOL_TO DT TRUE dandt DT 1970 01 01 00 00 01 BOOL_TO_INT TRUE i DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Standard functions 14 1 3 TO_BOOL Converting from any type to BOOL e The result is TRUE if the operand is not 0 and FALSE if the operand is 0 e With type STRING the result is TRUE if the operand is TRUE otherwise the result is FALSE LD 213 LD 0 LD T 5ms BYTE TO BOOL INT TO BOOL TIME TO BOOL ST b b TRUE
282. marks efesotomasyon com Lenze 8 6 Lenze Drive PLC Developer Studio Resources PLC configuration FEE 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 fff PLC Configuration DA x Calculate addresses Iv Check for overlapping addresses IV i DCTRL_bRdy_b A i DOTRL_bOWCcw DCOTRL_bNACIEg DOTRL_bCInh_b DOTRL_bStat1_b Re b mei e The editor displays the configuration as a tree structure that can be edited via menu commands and dialogs e Inthe PLC configuration the system organization units are attached to the automation system as subordinate elements e The editor displays inputs and outputs with an IEC address for input and output access In standard cases a symbolic name may be assigned for each input and output for identification that will then be placed in front of the IEC address e Any projects opened that were generated with an older DDS version and containing a PLC configuration can be transferred into the new Uniform Control Configuration format H 8 25 e lt is important for program generation to insert the req
283. masyon com Lenze 7 7 10 7 7 11 7 50 Drive PLC Developer Studio Editors 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 e With operators the data type of the intermediate variable depends on the highest order data type of the inputs e With constants the data type depends on the lowest possible data type i e data type SINT is assumed for constant 1 If an addition is carried out with feedback and constant 1 the first input returns data type SINT whereas the second input remains undefined as a consequence of the feedback Thus also the intermediate variable is SINT type Only then will the value of the intermediate variable be assigned to the output variable The illustration below shows an addition with feedback and an addition directly with a variable Variables x and y are to be INT type in this case Addition with feedback Addition directly with a variable The two additions differ as follows e Variable y can be initialized with a nonzero value whereas the intermediate variable of an addition with feedback needs a zero e The intermediate variable of the addition with feedback is SINT type that of the addition with variable y of INT type e Variables x and y have different values from call 128 Although INT type variable x is as
284. memory and retain their values The persistent memory can only be cleared in online mode via the menu command Online Reset bootstrap The persistent memory can be accessed via the system organization unit Var_Persistent In the Object Organizer tab Resources you can open the PLC configuration Use the menu command Insert Add subelement Var_Persistent to add the system organization unit as a subelement DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Editors Application example An operating hour meter that is to continue counting after a mains failure e 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 reml INT 1 retentive variable END VAR 7 2 7 Constants typed literals Between the keywords VAR CONSTANT and END VAR all constants are declared e Constants can be declared locally or globally Syntax VAR CONSTANT lt Identifier gt lt Type gt lt Initialization gt END VAR Example VAR CONSTANT con1 INT 12 1 Constant END VAR For a list of permitted constants refer chapter on Operands 7 2 8 Retentive constants Between the keywords VAR CONSTANT RETAIN and END VAR all retentive constants are declared e Retentive constants can be declared locally or globally Syntax VAR CONSTANT RETAIN lt Identifier gt lt Type gt lt Initial
285. mment line Inserting a new network Network after Network before Icon Menu Insert Network after Keyboard lt Ctrl gt lt T gt Insert Network before Use this command to insert a new network in front of or behind the current network in the FBD or LD editor e Change the current network dotted rectangle and network number by clicking the network number e Click keeping the lt Umschalt gt key depressed to select all networks between the current and the clicked network DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 7 4 4 Lenze Drive PLC Developer Studio Editors 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 AND O selected Output Enter the variable name directly via the keyboard If the variables are already available the name must be written correctly If the variable is not available it must be set in the variable declaration AND 0 g_ParData15 If the name or the instance name of a function block or structure is entered with a point a list of all variables is displayed AND o aH Es e gt x gb C_100_P C_N_100_P C_PLC C_SYSTEMBUS_CAN DDS EN 2 3 7 27 Show Hide Bookmarks
286. mplementation Select the required instance or implementation and click OK to display the list Note Before this command can be executed first select the function block whose instance is to be opened in the Object Organizer Then use the Help Manager to select the required instance of this function block Help Manager x Declarations BOOL User defined Types BYTE Cancel Standard Function Blocks DATE Carcel User defined Function Bloc DINT Tip Instances can be opened after log in only Project has been compiled correctly and transferred to the control with Online gt Log in Output call tree Menu Project Output call up tree Keyboard Icon Use this command to open a window to display the call tree of the object selected in the Object Organizer Example Call tree for object PLC_PRG of the traffic light system PLG_PRG TRAFFICLIGHT The command requires the project to be compiled See Project Compile all 6 8 e The call tree contains calls of organization units and references to applied data types DDS EN 2 3 6 29 Show Hide Bookmarks efesotomasyon com Lenze 6 2 4 11 6 30 Drive PLC Developer Studio Working with projects and objects Output cross reference list Menu Project Output cross reference list Keyboard Use this command to open a dialog box to output all occurrences of variables addresses or organization units Cross Reference EI Category Variable
287. mprises a basic type subset Declaration may be on the Data types index card A variable can also be declared directly with a subrange type Syntax for declaration on the Data types index card TYPE lt Name gt lt Inttype gt lt ll gt lt ul gt Initial value END TYPE lt NAME gt Must be a valid IEC identifier lt Inttype gt One of the data types SINT USINT INT UINT DINT UDINT BYTE WORD DWORD lt ll gt Is a constant that must be compatible with the basic type and defines the range type lower limit The lower limit pertains to this range lt ul gt Is a constant that must be compatible with the basic type and defines the range type upper limit The upper limit pertains to this basic type TYPE SubInt INT 4095 4095 END TYPE e Direct declaration of a variable with a subrange type e Correct specification of an initial value if the subrange does not include 0 VAR il INT 4095 4095 12 INT 5 10 5 ui UINT 0 10000 END VAR Error message The assigned constant of a subrange type declaration or implementation must be within the value range as otherwise an error message will be output Lenze DDS EN 2 3 10 7 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Data types Library CheckRange lib The library CheckBounds contains the global variable g_bErrorCheckRange e Open the library management with Window Library Manager e Insert the library
288. n Menu Insert gt Jump Keyboard Use this command to insert a jump in parallel to the end of the existing coils e lf the incoming line has a value ON the jump to the selected label will be carried out e The selected position must be the connection between contacts and coils or a coll The jump is pre assigned e Click the text to change it to the required jump label Return Icon Menu Insert Return Keyboard Use this command to insert a RETURN instruction in parallel to the end of the existing coils e Ifthe incoming line has a value ON processing of the organization unit in this network will be terminated e The selected position must be the connection between contacts and coils or a coll Organization units with EN inputs Should the LD network need to be used to control other organization unit calls it is necessary to insert an organization unit with an EN input or an organization unit with a Boolean input e An organization unit with EN inputs is connected in parallel to the coils e Based on one EN organization unit the network can be further developed as in FBD e The commands for inserting elements at already inserted EN organization units are available in menu Insert submenu Insert at organization unit Operators function blocks programs or a function with EN input respond like the associated organization unit in the FBD with the exception that its execution is controlled via the EN
289. n Gi Menu Online Reset Keyboard Use this command to reset variables initialized with a certain value to this value e All other variables are reset to a standard value e g integers to 0 e The user will be asked to confirm the variable reset Differences between the command Online gt Reset and mains disconnection control power off on Code variables will only be reset to their initialization value in case of a Reset In case of a mains disconnection they will keep the value saved with C0003 From Servo PLC and Drive PLC operating system 6 0 RETAIN variables will not be re initialized in case of a Reset or mains disconnection In the previous version they were re initialized in case of a Reset Caution RETAIN variables will not be initialized from Servo PLC and Drive PLC operating system 6 0 Use the command Online Start to restart program processing Reset cold Use this command to reset all variables including the RETAIN variables to the initialization value Only the persistent variables retain the value they had prior to the Reset cold Reset bootstrap Use this command to reset all variables including RETAIN and PERSISTENT to the initialization value The user program in the PLC is cleared and the PLC is returned to its original status From Servo PLC and Drive PLC operating system 6 0 DD DDS EN 2 3 6 3 Show Hide Bookmarks efesotomasyon com Lenze n O 6 3 1 9 6 34 Drive PLC Developer Studio
290. n Insert Jump to insert a jump 3 12 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Lenze Drive PLC Developer Studio Program example 48 Name the newly inserted steps transitions as shown below WI PLC_PRG PRG SFC PA ES 0001 PROGRAM PLC_PRG Wl Action COUNT IL 0004 LD COUNTER Counter increased by 1 0002 ADD 1 0003 ST COUNTER Wi Action OFF IL CAL LIGHT1 STATE 5 Both traffic lights will be switched CAL LIGHT2 STATE 5 off for 10 seconds and the counter LD 0 will be reset to 0 ST COUNTER CAL WAITI SETTIME t 105 Transition Actions informo O O LIGHTOFF Peers nyse 0001 LD COUNTER Transition checks whether COUNTER 0002 GT 7 is greater than a certain number in sibi AJ this example 7 Our example switches the traffic light to night mode after seven cycles then off for 10 seconds before the system switches to day mode and the process starts again Tip Select File Save as to save the project under a new name e Use the dialog box Save as input field File name to enter a name and then close the dialog box with Save DDS EN 2 3 3 13 Show Hide Bookmarks efesotomasyon com Lenze 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 gt Log in to log into the control 4 Select
291. n icon in the tool bar will display a tool tip with the associated command DDS EN 2 3 1 1 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Preface and general information 1 2 DDS EN 2 3 Lenze Show Hide Bookmarks 2 1 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Introduction Introduction 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 The DDS uses the Object Organizer to differentiate between the different object types within a project e Organization units e Datatypes e Visualization elements visualization e Resources The Object Organizer allows fast access to all objects of your project Resource structuring uses the following objects among others e Libraries e Codes e Task configurations e etc Project generation Addresses not included in the PLC configuration cannot be used First configure the control to facilitate access to the system organization units during programming Then generate the organization units required for your application or copy them from existing projects Program the required organization units in the desired language On completion of the programming process compile the project
292. n system and must match the device address of the communication channel 6 Acceptthe settings with OK This parameterizes and starts the communication driver GATEWAY EXE Creating a communication channel via a TCP IP network to a remote gateway PC Access to a remote PC remote gateway PC with system bus dongle is possible from the DDS via a TCP IP network Thus all functions under a direct CAN bus access such as program download monitoring etc can be executed via the network For this purpose the communication channel from the gateway PC to the automation system must be set up properly at the gateway PC and the communication driver GATEWAY EXE must run on the remote gateway PC see Creating a communication channel via the system bus dongle e Aremote change of the communication parameters on the gateway PC via the TCP IP network is currently not possible e The IP address of the remote PC in the network must be known to create a connection to a gateway PC Finding out the IP address of the gateway PC Contact your network administrator for the IP address or open the program IPCONFIG in a DOS window on the gateway PC Creating a channel to the gateway PC via a TCP IP network 1 Select Communication parameters and click local 2 Click Gateway to open the dialog box Communication parameters Gateway Connection Topp Address Cancel Password Patt hao o 3 Enter the IP address of the gateway PC and
293. n the same directory as the project If this file is write protected the project cannot be translated You have to remove the write protection Commands in the File menu New Icon 5 Menu File gt New Keyboard Use this command to a create a blank project called Untitled Change the name when saving the project New with template Menu File gt New with template Keyboard Use this command to create a blank project named Untitled including an optional template The template has the extension lpc and contains a fixed Lenze configuration The Lenze configuration includes e Program POU Organization units with technology function e Required libraries e Global variables e Entries in the PLC configuration e Entries in the task configuration e Predefined user codes e Visualization and Receipt Manager as required Open the dialog box Open and select a template file with the extension Ipc If the template is protected by Passwords or defined with User groups the system will prompt for a password DDS EN 2 3 6 1 Show Hide Bookmarks efesotomasyon com Lenze n O 6 1 1 3 6 1 1 4 6 1 1 5 6 1 1 6 6 2 Drive PLC Developer Studio Working with projects and objects Open Icon ma Menu File Open Keyboard lt Ctrl gt lt 0 gt Use this command to open an existing project e fa project has been opened and changed before the user will be prompted as to whet
294. name MACRO That can be changed Three boxes and one input have been selected for the example The following macro is created with menu command Extras Create macro The unit canbe shown more efficiently by moving the boxes DDS EN 2 3 7 53 Show Hide Bookmarks efesotomasyon com Lenze 7 7 12 9 7 7 12 10 7 7 12 11 7 54 Drive PLC Developer Studio Editors Step into macro Icon Menu Extras Step into macro Keyboard Use this menu command or double click the macro body to open the macro for processing in the editor window e The created pin boxes can be edited like normal boxes differing in the representation and containing no position index e Pin boxes have rounded edges The pin box text matches the name of the pin in the macro representation e The sequence of pins at the macro box is dependent on the macro element processing sequence Low before high sequence index Top before bottom pin e The processing sequence in the macro is a self contained procedure In its higher level box the macro is treated as a block Commands are effective in the macro only Expand macro Icon Menu Extras Expand macro Keyboard Use thismenu command to re expand the selected macro into its individual elements e Connections to in out pins are represented by element inputs outputs e The unit is moved automatically in cases where the editor does not offer sufficient space
295. nd organization unit line Example PLC_PRG 4 vari Variables in libraries will not be considered Overlapping memory areas This function checks overlapping of specific memory areas during variable assignment with the help of the AT declaration Example Assignment of variables varl AT QB21 INT var2 AT QD5 DWORD Causes an overlap as they occupy byte 21 at the same time Output is then as follows QB21 is referenced by the following variables PLC PRG 3 varl AT QB21 PLC PRG 7 var2 AT QD5 Concurring access This function looks for memory areas that are referenced in more than one task No difference between read and write access Output is then as follows MB28 is referenced in the following tasks Taskl PLC PRG 6 MB28 read only access Task2 POU1L ACTION 1 MB28 write access DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 Access rights can be defined for individual or all objects e All projects are opened
296. ndividual syntax elements e Keywords must not be used as identifiers e Keywords under the Drive PLC Developer Studio also include the names of Lenze function blocks that always start with L_ L ABS L ADD Keywords reserved for IEC 61131 3 programming languages ABS ACOS ACTION ADD AND ANDN ANY ANY_BIT ANY_DATE ANY_INT ANY_NUM ANY_REAL ARRAY ASIN AT ATAN BOOL BY BYTE CAL CALC CALCN CASE CD CDT CLK CONCAT CONFIGURATION CONSTANT COS CTD CTU CTUD CU CV DATE DATE_AND_TIME DELETE DINT DIV DO DS DT DWORD ELSE ESIF END_ACTION END_CASE END_CONFIGURATION END_FOR END_FUNCTION END_FUNCTION_BLOCK END_IF END_PROGRAM END_REPEAT END_RESOURCE END_STEP END_STRUCT END_TRANSITION END_TYPE END_VAR END_WHILE EN ENO EQ ET EXIT EXP EXPT FALSE F_EDGE F_TRIG FIND FOR FROM FUNCTION FUNCTION_BLOCK GE GT IF IN INITIAL_STEP INSERT INT INTERVAL JMP JMPC JMPCN L LD LDN LE LEFT LEN LIMIT LINT LN LOG LREAL LT LWORD MAX MID MIN MOD MOVE MUL MUX N NE NEG NOT OF ON OR ORN P PRIORITY PROGRAM PT PV Q Q1 QU QD Lenze DDS EN 2 3 15 5 efesotomasyon com Lenze Show Hide Bookmarks Drive PLC Developer Studio Appendix R RI R_TRIG READ_ONLY READ_WRITE REAL RELEASE REPEAT REPLACE RESOURCE RET RETAIN RETC RETCN RETURN RIGHT ROL ROR RS RTC R_EDGE S SI SD SEL SEMA SHL SHR SIN SINGLE SINT SL SQRT SR ST STEP STN STRING STRUCT SUB TAN TASK THEN TIME TIME_OF_DAY TO TOD TOF TON TP TRANS TRUE TYPE UDINT UINT ULINT UNTIL USINT VAR VAR_ACCESS VAR_EXTERN
297. ne parameterization settings via Keypad e Usethe input field Text to enter display text for the code that will be displayed on the Keypad The text is limited to 13 characters e If the box Confirmation is activated the SHIFT and the PRG key on the Keypad must be pressed at the same time to accept the code value of the respective code This setting will not be considered for read only codes RSP Code can only be changed when the controller is inhibited PLC Stop Code can only be changed when the PLC is stopped Parameterization program Use the group field Parameterization program to enter code texts for display in GDC and the parameter monitor e One of three text options can be selected when generating the device description for GDC e These entries are important for the generation of GDC description files in different national languages Selection list Select option Selection list to assign freely definable text to code values in the associated text input field IY Selection list 0 Inactive 1 Continuous 2 Continuous E Format 100 Text e These settings will not be considered for read only codes e Complete selection lists are available for the first instances of Lenze function blocks from libraries These lists can be accepted extended or modified e Selection lists to be accepted by the Instance Parameter Manager can be predefined via the Type Parameter Manager e Any predefined lists used w
298. new variable value Press lt Enter gt to accept the value Configure Text for tool tip available for all Lenze Use Extras Configure category Text for tool tip to enter a text for the selected element This text is displayed when the mouse pointer is positioned briefly over the element e Line breaks in the text can be entered by pressing lt Ctrl gt lt Enter gt DDS EN 2 3 9 17 Show Hide Bookmarks efesotomasyon com Lenze Configure Bitmap Drive PLC Developer Studio Visualization 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 e Click to open the standard dialog for browsing through the file structure to select the required file e Use check box Transparent background to define a colour contained in the bitmap as transparent Use the button Transparent colour to define the colour Frame e lf check box Anisotropic is activated the bitmap fills its frame and its size can be changed e If check box Isotropic is activated the proportions of the bitmap always remain the same even if the size changes i e the ratio between length and width remains the same e lf check box Fixed is activated the bitmap will be displayed in its original size independent of its frame e lf check box Cut off is activated the setting Fixed only displays the framed part of the bitmap e If c
299. nfirm with OK The entered language must not have any white spaces or umlauts at the beginning and the end The button OK will be greyed out if the input is not acceptable or incomplete The button Remove in the group box Target languages deletes a language from the list removing only the selected language Creating a translation file Press OK in the dialog box Create translation file to generate a translation file The system will first check whether there already exists another translation file with the same name Select No to return to the dialog box Create translation file Select Yes to generate a copy of the existing translation file with the file name Backup_of_ translation file tlt A translation file is generated as follows e A placeholder TODO is generated for each new target language for each linguistic symbol to be output e lf an already existing translation file is being processed any data entries of languages listed in the translation file but not in the target language list will be removed independent of the project in which they were generated Editing a translation file Open and save the translation file as a text file Characters identify keywords The TODO placeholders in the file may be substituted with the applicable translated texts A section delimited by NAME_ITEM and END_NAME_ITEM is created for each linguistic symbol comments COMMENT_ITEM etc DDS EN 2 3 6 11 Show Hide Bookmarks efeso
300. nly the values in the watch list selected in the Watch and Receipt Manager will be loaded Lenze DDS EN 2 3 8 37 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Resources 8 10 Target Settings Lui The Target Settings are located as an object in the Resources index and e define the target system on which the project is to run e define the project settings e require a target system to be selected after the menu command Project gt New has been executed The dialog box Target Settings opens automatically when a new project is generated and can also be requested from Resources Target Settings Select a target system from the Configuration pull down menu Target Settings EI Configuration n i Servo PLC 2 Target Platform EE 9300 Servo PLC VI y Platform 3300 Senio PLC var hi 7 Drive PLC V1 x Drive PLC V2 ees Drive PLC V6 x ompiler SACRSIZE TI Tables ag a E Data Functions BEE Pata lenat Near v Huge v ag 16 30000 16 8000 DRPZ IY nit functions IY optimize PIs References u Page 514 oT a Output Imninstances TI HEX I LST I MAP None M LST with Addresses MW Data consistency for multitasking Default Cancel Tip The Default button resets all entries in this dialog box to the initial state 8 38 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer S
301. ns All commands are saved in an accumulator where intermediate results and the result of the last command are stored Example LD 17 ST lint comment GE 5 JMPC next LD idword EQ istruct sdword STN test next Operators and modifiers The following operators and modifiers can be used in IL Modifiers C conditional for JMP CAL RET The instruction will only be carried out if the result of the preceding expression is TRUE N for JMPC CALC RETC The instruction will only be carried out if the result of the preceding expression is FALSE N otherwise Negation of the operand not of the accumulator DDS EN 2 3 Lenze Show Hide Bookmarks Lenze efesotomasyon com Lenze Drive PLC Developer Studio Programming languages The table lists some IL operators along with possible modifiers and their respective meaning Operator modifiers Load instruction No Store Save the current result in the operand location a set Set Boolean operand to TRUE exactly if the current result is TRUE Reset Set Boolean operand to FALSE exactly if the current result is TRUE NC Bit by bit AND Bit by bit OR M prio O pr Me e De pe e eo N N vate operation trat tas veen dei OUy For a more comprehensive IEC operator list refer chapter 12 LD ST SUB UL DIV GT GE LE LT N N JMP JMPC gt ump all Example IL program using sever
302. o resp TTT interval tonal ime ofanifenal ask o Event eentotaneveno memi O Tip The displayed task runtimes are not the net times but the real runtimes including all task interruptions at a 25 6 us resolution Cyclical task system task e The system task processes any necessary internal system tasks in the background e The cyclical task does not only contain the task PLC_PRG but also the task of communicating with the PC e System and cyclical tasks apply the time slicing principle to share the low priority cyclically processing task 8 28 DDS EN 2 3 Lenze Show Hide Bookmarks 8 8 8 8 1 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Resources Task configuration Ee The task configuration is an object on the tab Resources in the Object Organizer 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 Task types Lenze automation systems for example 9300 Servo PLC Drive PLC support four different task types e Cyclical task PLC_ PRG PLC PRG is the main loop of the user program number 1 It is always active has the lowest priority and cannot be switched off PLC PRG can be created in the required programming language an
303. o specify printer paper format etc OK Cancel Click OK to accept the changes or Cancel if you do not want to save them If the template has been changed the user will be prompted on closing the window as to whether the changes are to be saved or not DDS EN 2 3 6 7 Show Hide Bookmarks efesotomasyon com Lenze Working with projects and objects Drive PLC Developer Studio 6 1 n 1 1 0 Exit Menu File gt Exit Keyboard lt Alt gt lt F4 gt Use this command to exit the DDS e fa 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 Menu Project gt Compile Keyboard lt F11 gt Use this command to compile the project to check your program s syntactic correctness The compile is incremental only those organization units that have been modified will be recompiled A non incremental compile requires prior execution of the command Project Clean all Automation systems that support online change identify all organization units with a blue arrow inthe Object Manager after the compile These will be loaded to the control during the next download The compile performed with Project gt Compile will be executed automatically on Online Log in Errors and warnings are identified with numbers Data allocation Check ofthe task configuration ibrary Standard lib 25 3 02 11 07 44 ibrary LenzeDrive
304. obal replace Find next e The occurrence is displayed if the text in the combination box Find what is found in one of the objects to be searched Replace e The current occurrence of the text in the combination box Find what found in the objects to be searched is replaced with the text in the combination box Replace with e The highlight will jump to the next occurrence after the replace Replace all e All occurrences of the text in the combination box Find what found in the objects to be searched are replaced with the text in the combination box Replace with DDS EN 2 3 6 19 Show Hide Bookmarks efesotomasyon com Lenze n O 6 1 2 15 6 20 Drive PLC Developer Studio Working with projects and objects Cancel e Closes the Find and replace function Note Not implemented for Parameter Manager and code initialization Project check Icon Menu Project gt Check Keyboard This menu command offers four separate subitems e Unused variables e Overlapping memory areas e Concurrent access e Multiple save on output The results are output in the message window Each of these four functions checks the status of the last compile In other words a project must have been compiled correctly at least once The menu items will not be active if that is not the case Unused variables This function looks for declared variables that are not used in the program They are output with organization unit name a
305. ocessing operators following certain priorities Operators with the highest priority are processed first followed by operators with the second highest priority and so on until all operators are processed Same priority operators are processed from left to right The following table lists ST operators in the order of their priority opero T T Negation Complementation Multiplication Division Addition Subtraction Compare Equal to Not equal to Lowest priority DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Programming languages 4 3 3 Instructions overview The following instructions are available in ST Instruction type Example Assignment by assignment operator Function block call CMD_TMR IN IX1 0 1 PT T 300ms use of the FB output A CMD_TMR 0Q RETURN IF condition IF D lt 0 0 THEN Cre ELSIF D 0 0 THEN C B ELSE Casb END IF CASE S election CASE INT1 OF 1 BOOL1 TRUE 2 BOOL2 TRUE ELSE BOOL1 FALSE BOOL2 FALSE gt END CASE J 101 FOR I 1 TO 100 BY IF ARR I 70 THEN veal EXIT END IF END FOR WHILE loop J 1 WHILE J lt 100 AND ARR J lt gt 70 DO J J 2 END WHILE REPEAT loop J 1 REPEAT J J 2 UNTIL J 101 OR ARR J 70 END REPEAT EXIT Dummy instruction 4 3 4 Assignment operator The value of the expression on the right hand side of an assignment is assigned to an operand variable addre
306. of the different traffic light phases 25 To edit the organization unit WAIT activate its editor window by selecting Object Organizer tab Organization units and double clicking WAIT 3 2 6 1 Declaration 26 In the declaration editor declare as input variable between the keywords VAR_INPUT and END VAR a variable named SETTIME of type TIME as output variable between the keywords VAR_OUTPUT and END VAR a variable named OK of type BOOL 27 Pre assign the output variable OK with FALSE by inserting FALSE at the end of the declaration but before the The output variable OK is to output the value TRUE as soon as the time specified with SETTIME has expired For this function use the organization unit TP a pulse encoder 3 6 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Program example Pulse encoder TP The pulse encoder TP has two inputs IN PT and two outputs Q ET e lf at the input IN TRUE is applied the output Q for the time PT in milliseconds will return the value TRUE e ET outputs the time already expired in milliseconds Status Output variables Status value FALSE The output ET counts the time in milliseconds To use the pulse encoder TP in the organization unit WAIT we must create a local instance of TP 28 Use the declaration editor to declare as local variable between the keywords VAR and END VAR a variable named DELAY of
307. og box Automation system settings line lt line number gt tab Network functions 4553 Subindex outside permitted range Parameter OD Ensure that the subindex is within the range defined in dialog box Automation system lt number gt line lt line number gt settings tab Network functions 4554 Invalid variable name Variable OD lt number gt line lt line Enter a valid project variable in the field Variable Use the notation lt organization unit number gt name gt lt variable name gt or for global variables lt variable name gt 4555 Table cell empty input mandatory This field requires an input Parameter OD d line d 4556 Table cell empty input mandatory Variable OD d line d This field requires an input 4800 The maximum number of tasks was exceeded Any touch Delete a task or remove a touch probe input probe inputs also count as task A hardware interrupt to start a task is used more than Check all applied hardware interrupts once 802 A task identifier is used more than once Check all task identifiers A task priority has been assigned more than once Check all assigned priorities Priority 0 Task not active may be assigned more than once AY A N Q Q WC A digital input is used to start a task hardware interrupt Either delete the TP input or use a different input to start a task and as touch probe input An input can be used either to start a task or as TP not both
308. ols If an option is active a tick appears in front of the option Y Lenze DDS EN 2 3 5 7 Show Hide Bookmarks efesotomasyon com Lenze 5 8 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 After a line has been exited the following will be formatted e Lowercase operators will be displayed in uppercase e Tabs will be inserted for uniform column arrangement Declarations as tables If the option Declarations as tables is activated variables can be edited as table instead of using the declaration editor PLC_PRG PRG SFC Bil x VAR K_VARLINPUT YYVAR_OUTPUTYY VAR_IN_OUT gt CONSTANT Y RETAIN gt INFO N Name Address Type Initial Comment ft a feescue 1 ooogWat________ Boo __ e This table is arranged as a card index box with tab cards for input output local and input output variables e Fields for name address type initial value and comment are available for each variable Tab width Use the field Tab width to specify the tabulator width for the editors e The default setting is four characters with the character width be
309. ommands Edit Next fault and Edit Previous fault to jump from one error message to the next e The message window can be shown or hidden by pressing lt Shift gt lt ESC gt DDS EN 2 3 5 3 Show Hide Bookmarks efesotomasyon com Lenze 5 1 7 5 1 8 5 4 Drive PLC Developer Studio Working area Status bar The status bar at the bottom of the DDS main window displays information about the current project and menu commands e fa status applies the associated expression appears in black at the right hand end of the status bar otherwise it is greyed out e Status bar display is optional Project gt Options category Desktop Online mode In online mode the word Online is displayed in black in offline mode it is greyed out The status bar shows the following statuses in online mode e SIM DDS is in simulation mode e RUNNING the program is being processed e BP a breakpoint is set Other status bar displays e Text editors display the line and column number of the current cursor position The letters OVR appear in the status bar in overtype mode e lf the mouse pointer is in a visualization the current X and Y position of the cursor will be given in pixels relative to the top left hand corner of the image e lf the mouse pointer is positioned over an element or if an element is being edited the number of the element will be displayed e fan element has been selected for insertion this element will also be disp
310. on Menu Window Tile vertically Keyboard Use this command to tile all windows on the desktop vertically so that they will not overlap but fill the whole desktop Cascade con Menu Window Cascade Keyboard Use this command to cascade all windows on the desktop Arrange icons con Menu Window Arrange icons Keyboard Use this command to arrange all windows minimized on the desktop in a row at the bottom of the desktop Close all Icon Menu Window Close all Keyboard Use this command to close all windows open on the desktop Messages Icon Menu Window Messages Keyboard lt Umschalt gt lt Esc gt Use this command to open or close the message window displaying the messages from the last compile check or compare If the message window is open a tick Y appears in front of the command in the menu Library Manager com Use this command to open the dialog box Library Manager 2 8 41 log con Use this command to open the log window The menu command log is available for the open log window DDS EN 2 3 5 O1 efesotomasyon com Lenze 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
311. on CheckBounds of the library recognizes that the target system uses an array outside its defined limits e The global variable g_bErrorCheckBounds is set to TRUE e The status TRUE is not set back during runtime If the status TRUE at least once an array has been accessed outside its defined limits Lenze DDS EN 2 3 10 3 Show Hide Bookmarks efesotomasyon com Lenze 10 2 2 10 4 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 Implementation Declaration part FUNCTION Checkbounds INT VAR INPUT index lower upper INT END VAR Instruction part IF index lt lower THEN CheckBounds lower ELSEIF index gt upper THEN CheckbBounds upper ELSE CheckBounds index END IF The following program example for testing the CheckBounds function accesses outside the limits of a defined array The function CheckBounds ensures that the value TRUE is not assigned to A 10 but to the still valid upper range limit A 7 The CheckBounds function can thus be used to intercept any access beyond the array limits D
312. ons gt will be repeated endlessly forcing a runtime error Note The programmer himself must ensure that endless loops do not occur by changing the condition in the instruction part of the loop forinstance change the counter settings Otherwise the task with the endless loop would overflow Example WHILE Counter lt gt 0 DO Varl Varl 2 Counter Counter 1 END WHILE The WHILE and the REPEAT loops are more powerful in a way than the FOR loop since the number of loop cycles does not need to be known prior to loop execution In some cases these two loop types will have to be sufficient If the number of loop cycles is known however a FOR loop should be preferred Task overflows can also occur in FOR loops DDS EN 2 3 4 9 Show Hide Bookmarks efesotomasyon com Lenze 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 lt instructions gt UNTIL lt Boolean expression gt END REPEAT e The lt instructions gt are executed until lt Boolean expression gt returns TRUE e lf lt Boolean expression gt returns TRUE on first evaluation already the lt instructions gt will be executed exactly once e lf lt Boolean expression gt is never TRUE the
313. ontroller inhibit e 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 In the DDS these commands are added to the end of a message queue so that they will reach the controller with a delay of several seconds in a worst case scenario Controller inhibit Menu Online Controller inhibit Keyboard Use this command to inhibit the controller The menu item will be deactivated for automation systems without controller inhibit e In GDC this function corresponds to the key Stop DDS EN 2 3 6 41 Show Hide Bookmarks efesotomasyon com Lenze 6 4 6 4 1 6 4 1 1 6 42 Drive PLC Developer Studio Working with projects and objects 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 Log characteristics Log window The log window can be opened in both offline and online modes In online mode it canbe used as direct monitor Icon Menu Window Log Keyboard i Log lO x Log Internal a lt 27 05 02 13 46 18 gt lt 27 05 02 13 46 18 gt lt 27 05 02 13 46 18 gt Einloggen gt Projekt nicht korrekt a lt 27 05 02 13 46 33 gt lt 27 05 02
314. oolean variable remains TRUE SFCError This Boolean variable becomes TRUE if a timeout occurred in an SFC diagram If variable SFCError is not reset again and the first timeout is then followed by a second one in the program the second one will not be registered SFCTrans This Boolean variable becomes TRUE when a transition switches SFCErrorStep This variable is a STRING type variable that if SFCError registers a timeout stores the name of the step that causes the timeout SFCErrorPOU This STRING type variable after a timeout contains the name of the organization unit in which the timeout occurred SFCCurrentStep This variable is a STRING type variable that saves the name of the active step independently of the watchdog function In parallel branching the step is saved in the branch at the extreme right SFCTip SFCTipMode These BOOL type variables permit the SFC tip mode If that is activated via SFCTipMode TRUE the next step can be reached only if SFCTip is set to TRUE As long as SFCTipMode is set to TRUE the transitions may also be used for switching SFCErrorAnalyzation This variable is a STRING type variable If the SFC flag SFCError registers a timeout SFCErrorAnalyzation outputs the responsible variables or transition expressions This function requires the library Analyzation lib to be integrated into the DDS project Note On some target systems the length of the output of variables or transition ex
315. operator 4320 Non Boolean expression lt name gt used for contact The switching signal for a contact must be a Boolean expression 4321 Non Boolean expression lt name gt used for coil The output variable of a coil must be BOOL type lt name gt unit lt name gt Expression expected at input lt name gt of organization unit lt name gt 4333 ldentifier expected in jump The specified jump target is no valid identifier 4334 Expression expected at jump input Assign the jump input with a Boolean expression If that is TRUE the jump is executed 4335 Expression expected at Return input Assign the input of the Return instruction with a Boolean expression If that is TRUE the return is executed 4336 Expression expected at output input Link the output with the expression that can be assigned to this output 4337 ldentifier expected for input Insert a valid expression or identifier in the input box 4338 Organization unit lt name gt has no real inputs None of the inputs of operator organization unit lt name gt is assigned with a valid expression 4339 Incompatible types at output Cannot convert lt name gt into The expression in the output box is not type compatible with the expression it is to be lt name gt assigned 4340 Jump requires a Boolean input Ensure that the input for the jump is a Boolean expression 4341 Return requires a Boolean input Ensure that the input for the Return instruction is a Boolean expression
316. or the specified one from the library list of the currently open project lt library 1 gt lt library 2 gt lt library n gt Copy objects object copy Copy objects from the specified path of the source project file into the target path of the currently open project lt Source project file gt If the source path is the name of an object that object will be copied If it is a folder all objects under this folder lt Source path gt will be copied In this case the folder structure under the source folder will be accepted lt Target path gt If the target path does not yet exist it will be generated Set the communication parameters gateway device gateway local Set the gateway of the local processor as the current gateway gateway tcpip Set the gateway set in the specified remote processor as the current gateway lt Address gt lt Address gt TCP IP address or host name of the remote processor lt Port gt lt Port gt TCP IP port of the remote gateway Caution Only those gateways without a set password can be accessed Set the device with the specified GUID as the current device The GUID must correspond to the following format 01234567 0123 0123 0123 0123456789ABC The curly brackets and hyphens must be located at the specified positions device name Set the device with the specified name as the current device lt devicename gt DDS EN 2 3 15 3 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer S
317. or window and the current cursor position e With arguments e Inthe case of this option the arguments to be transferred are also specified on insertion of the selected element Examples Selection of function block ful with defined input variable var_in ful var_in Insertion of function func1 that requires var1 and var2 as transfer parameters func1 var1 var2 Toggling between structured and non structured representation of the available elements is possible on principle by activating deactivating the option Structured DDS EN 2 3 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors Unstructured diagram Declarations na Cancel Standard Function Blocks User defined Function Bloc IT Structured 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 unitnames are completed with a period A list of associated variables is displayed once an organization module has been selected This list can be opened further if there are instances and data types Click OK to accept the last selected variable Structured diagram EJ User defined Function Blocks in Cancel Declarations User defined Function Bloc M Structured
318. ord FUNCTION e Aresult must be assigned to the function i e the function name is used like an output variable e In ST a function call may occur as an operand in expressions e Functions cannot save their internal statuses Function calls using the same input parameters always return the same value e No functions can be programmed in SFC DDS EN 2 3 Lenze Show Hide Bookmarks 2 2 3 1 Lenze efesotomasyon com Lenze 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 Wi CheckBounds FUN ST 0008 lower BOOL 0009 upper BOOL 0010 index BOOL 0011 CheckBound BOOL a al pis 0001 IF index lower THEN 0002 CheckBounds lower OOOS ELSIF index upper THEN 0004 CheckBound upper OOOS ELSE 0006 CheckBound index OOOFJ END_IF The following program example to test the CheckBounds function corrects access outside defined array boundaries PLC_PRG PRG ST Dx 0001 PROGRAM PLC_PRG E D002 VAR E AARRAY O 7 OF BOOL B INT 10 v Doe ajz H 0004 S 0005 A B TRUE 0006 OP The function CheckBounds ensures that the value TRUE is not ass
319. own syntax In the case of a division by zero 100 0 the divisor is replaced by one 100 1 At the same time the variable g_bErrorCheckdiv is set to TRUE DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 0001 PROGRAM PLC_PRG res REAL v1 REAL d REAL 12 1 5 MOD Modulo division Modulo division of a variable of type BYTE WORD DWORD SINT USINT INT UINT DINT UDINT with another variable of one of these types The result of this function is an integer remainder of the division 12 1 6 INDEXOF The result of this function is the internal index of an organization unit INDEXOF organization unit2 Lenze DDS EN 2 3 12 3 Show Hide Bookmarks efesotomasyon com Lenze 12 1 7 12 2 12 2 1 12 4 Drive PLC Developer Studio IEC 61131 3 Operators SIZEOF The result of this function is the number of bytes required by the specified data type IL Declaration ui arrl ARRAY arr ARRAY
320. ox to the right a the augue 1362 _ 1365 _ Le a label for the parallel step is no permissible identifier at a valid identifier next to the triangle identifying the jump label lt name gt 4367 The label lt name gt The label lt name gt already exists exists You have You have already assigned this name to a jump label or a step Rename accordingly assigned this name to a jump label or a step Rename accordingly a Action lt name gt used on several superimposed Te rtf levels VE E e are using the action lt name gt both in the organization unit as well as in one or several actions of this organization unit 4369 Exactly one network required for transitions You have used several FBD or LD networks for the transition Reduce to exactly one network Superfluous lines behind correct IL transition Delete the superfluous lines at the transition end on 1 Superfluous characters after valid expression lt name gt Delete the superfluous characters at the transition end 4400 Organization unit lt name gt imported or converted The organization cannot be converted completely to IEC 61131 3 incomplete with errors 4401 S5 time constant lt number gt seconds too high max No valid BCD coded time in accumulator 9990s 4402 Direct access Direct access permitted to Os only to I Os only Ensure that you are only accessing a variable defined as input or output La SS e TT command invalid or inconvertible to IEC 61131
321. p Positioning the mouse pointer briefly over a variable will display a tool tip with the variable s address type and any comments Lenze DDS EN 2 3 7 41 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Editors Tf 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 e Do not delete the error message e 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 e After that confirm the error message DDS tries to correct the error automatically e Check the logic of the CFC editor e lf errors are found use the backup copy Delete the pro file and change the asd file into pro This measure ensures that you always have a reliable and up to date project version The CFC editor Continuous Function Chart editor does not use any networks Instead elements may be placed freely Note If you work with the CFC editor the automatic backup should be active Project gt Option Category Load amp Save After extensions or changes the operations should be saved DFOUT_ninput_a FCODE_nC108_1a FCODE_ nC109_1a DGIN blni DIGIN bln S 7 42 DDS EN 2 3 Lenze Show Hide Bookmarks 1 1 1 T 1 2 7
322. perators and click OK to insert the highlighted operator at the current cursor position Operand Icon Menu Insert Operand Keyboard Use this command to display all variables in a dialog box Select between lists of global local or system variables e Select one of the operands and click OK to insert the highlighted operand at the current cursor position Function Icon Menu Insert Function Keyboard Use this command to display all functions in a dialog box Select between a list of user defined or standard functions e Select one of the functions and click OK to insert the highlighted function at the current Cursor position If the check box With arguments was activated in the dialog box the input variables required for the function will be inserted as well DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Editors 7 3 1 4 Function block jon Menu nsert gt Funetion block QKeyboard Use this command to display all function blocks in a dialog box Select between a list of user defined or standard function blocks e Select one of the function blocks and click OK to insert the highlighted function block at the current cursor position e lfthe option With arguments was activated in the dialog box the in output variables required for the function block will be inserted as well Organization unit call with output parameters The output paramete
323. phics that show any program process by means of connection elements See Function Block Diagram Instruction List see Instruction List Call of an FB instance whose name has been transferred to a POU as vAR_IN OUT parameter Structured data set of an FB by declaration of a function block plus indication of the FB type Abbreviation for Ladder Diagram The configuration Configuration defines the PLC structure and represents the highest level in the IEC 61131 3 software model Ladder Diagram Ladder Diagram LD is a programming language to describe networks with simultaneously operating Boolean and electromechanical elements such as contacts and coils Ladder Diagram see Ladder Diagram Abbreviation for Program Organization Unit Program Organization Unit POU Program Organization Unit see Program Organization Unit The Program Organization Unit is an organization unit in IEC 61131 3 of type function function block or program It builds up user programs hierarchically A resource Resource is a central unit CPU of a configuration Status node in an SFC program Actions referring to a step are started here Sequential Function Chart see Sequential Function Chart Programmable Logic Controller Programmable Controller DDS EN 2 3 15 23 Show Hide Bookmarks n O 15 24 efesotomasyon com Lenze Drive PLC Developer Studio Appendix ST Standard functions Standard organization units Standard function blocks Struc
324. plays all subordinate objects mE Programs E29 Functions A minus sign appears instead of the plus sign poi Click on the minus sign to close the folder again EET tecni dg PRG H E Programs The shortcut menu contains the commands Expand node and Minimize node which have the same functionality Drag amp Drop Drag amp Drop moves objects and folders within their object type e To do so select the object and move it to the desired position while keeping the left mouse key depressed Tip Folders do not influence the program All they do is structure projects 6 2 3 Commands in the shortcut menu 6 2 3 1 New folder on Use this command in the shortcut menu of the Object Organizer to insert a new folder as object e fa folder is selected the new folder will be inserted thereunder otherwise at the same level e fan action is selected the new folder will be inserted at the organization unit level where the action is linked To open the shortcut menu select an object or the object type and press the right mouse key or lt Umschalt gt lt F10 gt Folder naming convention e Newly inserted folders are identified New folder e Folders and objects cannot bear identical names at the same level 6 2 3 2 Expand node con Use this command in the shortcut menu of the Object Organizer to display the objects underneath the selected object e Folders can also be opened and closed with a double click or pressing lt
325. pressions can be limited In some cases the string routines can only process 20 characters DDS EN 2 3 Lenze Show Hide Bookmarks 4 4 10 4 4 11 4 4 12 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Programming languages 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 If the step before the alternative start line is active the first transition of every alternative branch will be evaluated from left to right The first transition from the left whose transition condition is TRUE is opened and the subsequent steps are activated Parallel branch Two or more branches in SFC may be defined as parallel branches Every parallel branch must start and end with a step Parallel branches may include alternative branches or further parallel branches A parallel branch starts with a double line parallel start and ends with a double line parallel end or a jump and can be assigned a jump label If the step before the parallel start line is active and the transition condition after this step is TRUE the first steps of all parallel branches will become active These branches will then all
326. prior to log in Execute the menu command Project gt Load download information Icon Menu Project gt Clean all Keyboard This command clears the information of the last download and the last compile Once the command has been executed the system displays a dialog to advise that no log in is possible without another download You can continue or cancel the process at this point Load download information Menu Project Load download information Keyboard Use this command to directly reload the associated download information as long as the information was not stored in the project directory The standard dialog File Open allows the direct loading of stored information e On each download the download information is automatically put into a file project name Targetidentifier ri Example LD_FillingPlants00000000r ri and included in the project directory e t will be reloaded automatically every time the project is opened and allows the control to perform an ID check to establish whether the project on the control matches the open project e Acheck is made to find those organization units whose generated code has changed Only these organization units are reloaded during downloads for systems supporting online change If the ri file was deleted from the project directory via the menu command Project Clean all the download information can be explicitly loaded from another directory with Project Load download informat
327. projects so that programs can be exchanged between different IEC programming systems e There is so far one standardized exchange format for organization units in IL ST and SFC IEC 61131 3 Common Elements Format e The DDS offers a separate save format for organization units in LD and FBD and the other objects as IEC 61131 3 does not provide any appropriate textual format The selected objects are written to an ASCII file e Organization units data types visualizations and resources can be exported e In addition to that the entries in the Library Manager i e the library linking information can also be exported The libraries themselves are not exported Command selection opens a dialog box to select the objects to be exported e Make your selection and click OK e The dialog box Save is opened Enter a file name with the extension exp 6 14 DDS EN 2 3 Lenze Show Hide Bookmarks 6 1 2 9 6 1 2 10 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Working with projects and objects 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 e Confirm with Yes to replace the object in the project with the object from the import file e Confirm with No to import the object from the import file with a name extension underscore and con
328. pse 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 e Use the depressed left mouse key to size the element as required in the editor window Polyline Icon al Menu Insert Polyline Keyboard Use this command to insert a polyline as element into your current visualization Command selection turns the mouse pointer into the associated icon in the editor window 1 Click the starting point of the polyline in the editor window 2 Click to add further reference points 3 Double click to complete the polyline OA Menu Insert Curve Keyboard Use this command to insert a curve Beziers curve 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 curve in the editor window 2 Click two other points to define the tangents of the curve The curve is being drawn Its end point may be moved with the mouse 3 Double click to complete the curve or use the mouse to expand it Example DDS EN 2 3 9 3 Show Hide Bookmarks efesotomasyon com Lenze 9 1 1 6 9 1 1 7 9 1 1 8 9 1 1 9 9 4 Drive PLC Developer Studio Visualization Polygon Icon ga Menu Insert Polygon Keyboard Use this command to insert a polygon as an element into your current
329. r message output New messages will be attached Manage the replacement of objects or files during Import Export Replace replace ok replace yes Replace replace yesall Replace all replace noall Replace none DDS EN 2 3 Lenze Show Hide Bookmarks Lenze efesotomasyon com Lenze Drive PLC Developer Studio Appendix Manage the default behaviour of DDS dialogs uery on Display dialogs expecting user input uery of ok All dialogs behave in accordance with a click on OK uery off no All dialogs behave in accordance with a click on No query off cancel All dialogs behave in accordance with a click on Cancel Command to call command files as subroutines call lt parameter 1 gt Call command files as subroutines Up to 10 parameters may be transferred In the called file 0 9 may be used to access the parameters lt parameter 10 gt Set used DDS directories dir lib lt libdir gt et lt libdir gt as the library directory dir compile lt compiledir gt Set lt compiledir gt as compilation file directory Delay CMDFILE processing delay 5000 Wait 5 seconds accuracy of execution in 100ms steps Integrate libraries library add Attach the specified library files to the library list of the currently open project If the file path is relative the library lt libraryfile 1 gt directory set in the project will be set as the path root lt libraryfile 2 gt lt libraryfile n gt library delete Delete all libraries
330. ransition becomes TRUE SFCError e Variable of type BOOL e This variable will be set if a timeout has occurred in an SFC diagram SFCErrorStep e Variable of type String e Inthe event of timeout this variable saves the name of the step that caused the timeout SFCErrorPOU e Variable of type String e Inthe event of a timeout this variable saves the name of the organization unit in which the timeout occurred SFCCurrentStep e Variable of type String e This variable saves the name of the active step independently of the time limits e Inthe case of parallel branching the step will be saved in the branch on the extreme right SFCTip SFCTipMode These variables of type BOOL allow the tip area of SFC If that is activated by SFCTipMode TRUE advance to the next step is possible only by setting SFCTip to TRUE As long as SFCTipMode is set to TRUE advance is also possible via the transitions SFCErrorAnalyzation This variable is of type STRING If the SFC flag SFCError registers a timeout SFCErrorAnalyzation will output the responsible variables or transition expressions This function requires the library Analyzation lib to be integrated into the DDS project DDS EN 2 3 Lenze Show Hide Bookmarks 7 8 6 Lenze efesotomasyon com Lenze 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 Sequential
331. re that the dialog box closes without any error messages When the file is saved and re opened a dialog will be displayed for password entry The project will only be opened if the password is correct otherwise the message The password is not correct will appear Defining a password for editing a file Passwords can protect a file from being opened and or edited 1 Enter the required password in text field Write Protection Password Every letter is represented by an asterisk 2 Repeat the password entry in the text field Confirm write protection password 3 Click OK to close the dialog box If the message Password and its acknowledgement do not match appears one of the two inputs contains a typing error Retype both entries to ensure that the dialog box closes without any error messages Write protected projects can also be opened without the password e Todo so click Cancel when the DDS prompts for the write protection password on opening the file It is now possible to compile the project load it into the control simulate it etc but it cannot be edited e Thestatus bar now includes the display READ 5 14 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Working area Note Make sure to remember the passwords Contact Lenze if you do forget one of the passwords e The passwords are saved together with the project e Create user groups to assign
332. return value of the function type STRING e LEFT STR SIZE means Take the first SIZE characters from the left in the string STR ST D SUSI Varl LEFT SUSI Varl SUS DDS EN 2 3 14 7 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Standard functions 14 3 3 RIGHT Returns a right start string of a string e STRis of type STRING SIZE of type INT the return value of the function type STRING e RIGHT STR SIZE means Take the first SIZE characters from the right in the string STR LD Susi Varls RIGHT Suel 2 4 RIGHT 3 ST Varl Varl US1 14 3 4 MID Returns a segment of a string e STR is of type STRING LEN and POS of type INT the return value of the function type STRING e MID STR LEN POS means Get LEN characters from the string STR starting with the character at POS LD Sus Varl MID SUSI 2 2 MID 2 2 SUSI ISTR ST Varl Varl US 2 LEN 24P0S 14 3 5 CONCAT Concatenation Concatenating two strings e STR1 STR2 and the return value of the function are of type STRING LD SUSI Varl CONCAT NI CONCAT WILLI SUSI WILLI SUSI STRI Wart ST Vari WILLI 4STR2 Varl SUSIWILLI 14 3 6 INSERT Inserts a string into another string from a specific position e STR1 and STR2 are of type STRING POS of type INT the return value of the function type STRING e INSERT STR1
333. rflow e QU returns TRUE if cv has become greater than or equal to PV e QD returns TRUEIf cv has become less than or equal to 0 CTUD CU CD RESET LOAD PV QU QD CV CAL CTUDInst CU VarBOOL2 RESET VarB00L32 LOAD VarB00L4 PV VarINT1 CTUDInst QU VarBOOL5 CTUDINST OD VarBOOL6 CTUDInst CV VarINT2 CTUDInst CU VarBOOL2 RESET VarB00L32 LOAD VarBOOL4 PV VarINT1 VarBOoOLs CTUDInst QU VarBOOL6 CTUDInst QD VarINT2 CTUDInst CV Lenze DDS EN 2 3 14 15 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Standard functions 14 7 Timers 14 7 1 TP Pulse encoder TP IN PT Q ET means e IN and PT are input variables of type BOOL or TIME e Qand ET are output variables of type BOOL or TIME e After a positive edge at input IN output Q becomes TRUE for the time specified at PT Then Q willbe FALSE again e Assoonas IN returns TRUE ET will count the time in milliseconds until the value equals that in PT and then remain the same e thus returns a signal for the time specified at PT Graphic representation of TP s time sequence SIL WT L t0 tl t2t3 td t5 Q SL IU we t0 t0 PT t2t2 PT t4 t4 PT CAL TPInst IN VarBOOL1 PT T 5s TFInst LD TPInst 0 TP ST VarBOOL2 VarBOoL1 iN a VarBOOL T 5sHPT ET TPInst IN VarBOOL1 PT T 5s VarBOOL2 TPinst Q 14 16 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze
334. rking with projects and objects Rename object Icon Menu Project gt Rename object Keyboard lt Space bar gt Use this command to rename the currently selected object or folder e Make sure that the object name has not been used before e Ifthe object edit window is open the rename will automatically change its title Convert object Icon Menu Project Convert object Keyboard This command can only be used for organization units Use this command to convert organization units written in CFC ST FBD LD and IL into IL FBD or LD Note This command can only be used for organization units and requires a project compile for its execution h Enter the name of the new organization unit in the dialog box Make sure that the name of the organization unit is not used for another organization unit NO Select the language into which to convert 9 Click OK to add the new organization unit to your organization unit list Copy object Icon Menu Project Copy object Keyboard Use this command to copy a selected object and save it under a new name Enter the name of the new object in the dialog box Make sure that the object name has not been used before Click OK to copy the selected object e Use menu command Edit Copy to copy the object to the clipboard No dialog box is displayed in this case Edit object Menu Project Edit object Keyboard lt Enter gt Use this command to loa
335. rs Example of a 20 character string declaration str STRING 20 This is a string Time data types The data types TIME TIME OF DAY in short TOD DATE and DATE AND TIME in short DT are processed internally like DWORD e TIME and TIME OF DAY specify time in milliseconds with the count starting at TOD 00 00 o clock e DATE and DT specify time in milliseconds starting with the 1st of January 1970 at 00 00 o clock e Inthe time specification h hours m minutes s seconds and ms milliseconds Example TIME 2h4m12s123ms Defined data types Array One two and three dimensional arrays of elementary data types are supported Arrays can be defined in the declaration part of an organization unit or in a global variable list Structures may also form arrays Syntax lt Field niame gt ARRAY lt ll1l gt lt ulls lt Ll2s lt lt ul2 gt OF lt elem types e lt ill gt lt 112 gt specify the lower field range limit e lt ul1 gt lt ul2 gt specify the upper field range limit e Limit values must be integers The following syntax is used to access components of arrays in the case of a two dimensional field lt Field name gt Index1 Index2 Example Declaration Card game ARRAY 1 13 1 4 OF INT Implementation Card game 9 2 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Data types Initializing arrays
336. rs contact Lenze 41222 Internal program error Restart the application A106 Error when reading a data block If the error still occurs contact Lenze 41223 Internal program error invalid size Restart the application A107 If the error still occurs contact Lenze 41224 Error when initializing the data download Restart the application farog n fie tre ratem pus configurator to cheek i the target tem resons 41225 Error when initializing the data upload Restart the application farog AENA tre som mus configurator to check i the target tem resonas 41226 Error during data transfer Restart the application A10A Use the system bus configurator to check if the target system responds 41227 Incorrect I O address Set a valid I O address for the selected system bus adapter on the Settings tab A10B 15 20 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Appendix 41228 ncorrect interrupt Set a valid interrupt for the selected system bus adapter on the Settings tab A100 41229 ncorrect baud rate Set a valid baud rate for the selected system bus adapter on the Settings tab A10D 41230 The drivers required for the selected system bus adapter Reinstall the drivers for the selected system bus adapter A10E were not found The system bus adapter is already used by another Close all applications and try again A10F application in an incompatible mode 4123
337. rs of a called organization unit can be assigned directly in the call in the text languages IL and ST Example Output parameter out1 of afbinst is assigned to variable a IL CAL afbinst inl 1 outl gt a ST afbinst inl 1 outl gt a A multi line organization unit call is possible CAL CTU insti CUsssiXLy0g 0 PV LD A ADD 5 7 3 2 Text editors in online mode In online mode breakpoints can be set and single steps can be processed in text editors This combines with monitoring into the debugging function of a state of the art Windows very high level language debugger In online mode the text editor window is vertically split in two e Normal program text is shown on the left e Variables and their respective values are shown on the right Tip The current variable values are displayed monitoring while the control is running Observe the following when monitoring expressions or bit addressed variables The value displayed for bit addressed variables is always the addressed bit value monitor Positioning the mouse pointer briefly over a variable in online mode will display a tool tip with the variable s type and any comments Only the variable type is displayed in offline mode Multi element variables Multi element variables arrays structures and instances of function blocks are identifed with a plus sign in front of the identifier e Press lt Enter gt or double click the variable to open it and
338. rt gt New watch list The variables to be watched can be selected from alist of all variables called with the Help Manager or entered via the keyboard in accordance with the following notation lt Organization unit name gt lt Variable name gt e Global variables do not have an organization unit name but start with a period The variable name can be multi level e Addresses can be entered directly Example of a multi level variable PLC PRG Instance l Ilstancez Strueture Component name Example of a global variable globall component1 Variables in the watch list can be pre assigned constant values i e in online mode these values can be written to the variables using the menu command ExtrasWrite receipt For this purpose the constant value must be assigned to the variable with Example PLC PRG TIMER 50 Lenze DDS EN 2 3 8 35 Show Hide Bookmarks efesotomasyon com Lenze 8 9 2 8 9 3 8 9 3 1 8 9 3 2 8 9 3 3 8 36 Drive PLC Developer Studio Resources Watch and Receipt Manager in online mode In online mode the Watch and Receipt Manager displays the values of the entered variables Watch and Receipt Manager OF x Standard PLC_PRG LIGHT1 STATE 1 PLC_PRG LIGHT1 RED HEE PLC_PRG LIGHTI YELLOW ZIRE PLC_PRG LIGHTA GREEN l Structured values arrays structures and instances of function blocks are identified with a plus sign in front of the identifier
339. rt system bus dongle for example Remove a channel selected in pane Channels Gateway Create a new communication channel to a remote gateway PC Update Check parameters or update the display Creating a communication channel via the system bus dongle The most commonly used communication option is via the system bus dongle connected to a local PC via the parallel port Two parameters must be known to establish a connection to a certain automation system e g 9300 Servo PLC within a CAN bus network e The device address on the bus CAN bus node address The device address is stored in code C0350 of the automation system and must match the setting of the communication channel e The baud rate set on the bus CAN bus baud rate The device address is stored in code C0351 of the automation system and must match the setting of the communication channel DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio i 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 Select Communication parameters and click localhost gt Lenze standard and then OK 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 Name localhost via Tepp Device Cancel _ Name fimo
340. rupted by high priority tasks during read and write access Read write access of the low priority task will be completed Data consistency must be ensured in the following cases e Bit access in the form of byMyByte 1 TRUE Lenze DDS EN 2 3 8 39 Show Hide Bookmarks efesotomasyon com Lenze 8 40 Drive PLC Developer Studio Resources Use of older versions Note The following restrictions orbehaviour can occur when older program versions or projects are used e f 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 e f projects that were created with DDS 2 2 are opened with DDS 2 1 or 2 0 data consistency for multi tasking is not supported Data consistency and runtime errors may occur during the compilation with DDS 2 1 or 2 0 Memory Layout The index card is not editable General Target Platform Memory Layout General Networkfunctionality 1 0 Configuration I No address checking Address checking is active by default so that the project can only use absolute addresses that have been entered in the PLC configuration The control box No address checking deactivates the address checking When compiling the project the IEC addresses will not be checked Network functionality The index card is not active DDS EN 2 3 Lenze Show Hide Bookmark
341. s 8 11 8 11 1 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Resources Library Manager Inthe DDS libraries are managed with the Library Manager that can be activated with the command Window Library Manager e Information about the linked libraries is stored with the project e The Library Manager shows all libraries available for the current project e Organization units data types visualizations and global variables of the libraries can be used like user defined organization units data types visualizations and global variables Library Manager window The Library Manager window is split into three or four panes standard LIB 25 3 02 11 07 46 amp FUNCTION_BLOCK L_PHCMP LenzeElectricalShaft lib 26 4 01 19 30 34 VAR_INPUT LenzeDrive lib 27 6 02 12 55 22 r dnini_p DINT Lenze93000Servo lib 18 5 00 15 46 44 dnin2_p DINT 4 __ P bOut_b BOOL E L_FLIP FB a L_FUNCodelndexCony FUN VAR CONSTANT RETAIN fo E L_Fw FB byFunction BYTE i L_LIM FB H E L_MPOT FB pe E L_NOT FB E a B L_PHCMP B L_ParRead FB fue E L_Parwrite FB L_PCTRL FB L_PHADD FB Libraries The upper left hand pane shows the libraries available for the project Organization units data types visualizations global variables Depending on the selected tab the lower left hand pane lists the organization units data types
342. s Strings comments visualization Position information If the relevant options are ticked the information will be included as linguistic symbols from the Current project into a translation file that either already exists or needs to be created or updated in an existing one If the relevant option is not selected all information of the individual category no matter from which project will be removed from the translation file The visualization texts in this case are the elements Text and Tool tip text of the visualization elements Tip Note for the visualization texts Text and Tool tip text of the visualization elements that they must be framed by two characters in the configuration dialog of the visualization element text to be included in the translation file Position information This uses the data of file path organization unit and line to describe the position of the linguistic symbol provided for translation Three options are available e None No position formatting is generated e First occurrence The position at which the element to be translated first occurs will be included in the translation file e All All positions at which the relevant element occurs in the project are specified Where an older translation file is edited that already contains more position information than selected here this information will be reduced accordingly or deleted in full independent of the project in which it was
343. s are used through linking a library e g LenzeDrive lib If the function block e g L_NSET is to be assigned standard parameterization codes the function block will be instanced as L_NSET1 of type L_NSET First instancing The codes including scaling for this function block can be created in the Parameter Manager Parameterization program GDC or the parameter monitor display every code together with a max 35 character long text for languages parameterization diagnostics This text can be defined in several languages standard language language1 language2 in the Parameter Manager The language can be selected when the GDC description file is created so that the user decides the language to be used for text displays Initialization An initial value can be assigned to the code to be accepted as initial value in the code s default setting C0002 Instance Parameter Manager Assignment of codes for variables used by the created program POUs or for the global variables of a project Scale factor scale function Internal variables can be shown more transparently using scale factors The IEC 61131 3 program uses a 16 bit value e g integer for example while the scale function allows a value between 200 to be set in the GDC The 16 bit value is simply scaled from 32767 to 200 The user can define the limits of the value range in the code so that the integer value of the code can only be set between 16384 100 for example Scale func
344. s can be easily displayed with references of the same visualisation When configuring visualisation elements placeholders enable the visualisation objects to be used several times If a visualisation object created with placeholders is inserted into another visualisation the placehol ders are replaced by variables or strings Besides organisation units and global variables visualisation objects can also be stored in libraries The use of placeholders enable the instances of the organisation unit to be referenced within the li brary Caution lf after a visualization has been inserted this reference is selected and configured it will be considered object and respond as such to inputs in online mode in accordance with its configuration If no configuration input is made forthe reference at the point of insertion its individual elements will respond like those of the original visualization in online mode Visualisation object with placeholders e Declare the following function block in ST PROGRAM PLC PRG VAR nVarl0 INT 10 nVar20 INT 20 END VAR DDS EN 2 3 9 19 Show Hide Bookmarks efesotomasyon com Lenze 9 3 2 1 9 20 Drive PLC Developer Studio Visualization E A semicolon must be entered into the instruction part Create a new visualisation with the name Screeni and insert a rectangle with Insert gt Rectangle Mark the rectangle and open the configuration dialog with Extras Configure
345. s category 3452 The module lt Name gt could not be generated The device file for module lt Name gt no longer suits the current configuration It may have eee been changed since the original configuration or be corrupted 453 Channel lt Name gt could not be generated The device file for channel lt Name gt no longer suits the current configuration It may have been changed since the original configuration or be corrupted You have activated the option Check for overlapping addresses in dialog Settings of the PLC configuration and an overlap was found Note that the range check is based on the size resulting from the module data type and not the value in the entry Size in the configuration file 3455 Loading error GSD file lt Name gt could not be found but is The device file required for Profibus configuration may possibly not be available in the used in the configuration correct directory Refer entry for configuration files in Project Options category 3456 The Profibus device lt Name gt could not be generated The device file for device lt Name gt no longer suits the current configuration It may have al E been changed since the original configuration or be corrupted 3457 Incorrect module description lt Name gt Check the device file pertaining to the module 3500 No VAR_CONFIG for lt Name gt Insert a declaration for the named variable in the global variable list with Variable_Configuration Resources Glo
346. s for network comments 7 26 rganization unit 2 2 utput 7 33 7 44 utput call tree 6 20 aximum comment size 7 26 aximum function 12 8 emory Address Manager 13 6 utput cross reference list 6 30 essages 5 s utput unused variables 6 3 inimize node 6 2 utput variables 7 1 inimum comment size 7 26 inimum function 12 9 odifiers 4 2 11 Parallel branch left 7 58 odule number 13 5 Parallel branch right 7 58 odulo division 12 3 Parallel contact 7 3 2 10 3 14 7 28 7 65 Paste above 7 39 Parallel or series connection 4 20 Parameter Manager 8 8 Parameter monitor 8 6 Parameterizing codes 8 Passwords 5 14 Paste after 7 39 Paste below 7 39 laceholder 6 etwork after 7 26 aceholder concept 9 19 etwork before 7 26 laceholders 9 9 ew 6 PLC configuration in online mode 8 24 ew folder 6 25 PLC_PRG 2 7 8 29 ew watch list 8 36 ew with template 6 1 ext fault 7 8 Position information 6 11 ormal data processing 8 30 Pragma 7 2 ot equal to 12 11 Previous fault 7 8 Print 6 6 Printer borders 5 10 PRIORITY 8 3 Process image 8 20 8 2 bject Organizer 8 1 nline in security mode 5 9 0 Object Organizer 8 1 Online in security mode 5 9 Online mode 5 4 nline mode 5 4 Program 2 6 J J J J J J CO CO CO CO CO CO CO CO CO CO d O N Ci I a L L 2 Program example 2 6 pen instance 7 34 7 40 Program tutorial 3 1 16
347. s that depend on the selected automation system and were added to the automation system s PLC configuration To find out the automation system s system variable select the command Insert gt Operand In the dialog box Help Manager then select category System variable 13 2 2 Access to variables of arrays structures and organization units Two dimensional array components are accessed with the following syntax lt Feldname gt Index1 Index2 Variables of structures are accessed with the following syntax lt Structure name gt lt Variable name gt Variables of function blocks and programs are accessed with the following syntax lt Organization unit name gt lt Variable name gt 13 2 3 Addressing bits in variables Integer variables allow individual bits to be addressed For this purpose the variable is given an index of the bit to be addressed The bit index may be given through any constant Indexing is 0 based a INT b BOOL a 2 D The third bit of variable a is set to the value of variable b The following error message is output ifthe index is greater than the variable s bit width Index lt n gt outside the range valid for variable lt var gt The following variable types allow bit addressing SINT INT DINT USINT UINT UDINT BYTE WORD DWORD The following error message is output if the variable type is not permitted Bit access must not be assigned to a VAR_IN_OUT variable 13
348. s the lowest order data type The data type of the output variable has no effect on the arithmetic operation DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 Vari 0111_0010 IN s 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 The data type of the output variable has no effect on the arithmetic operation Lenze DDS EN 2 3 12 7 Show Hide Bookmarks efesotomasyon com Lenze 12 4 12 4 1 12 4 2 12 8 Drive PLC Developer Studio IEC 61131 3 Operators Selection operators All selection operations can also be carried out on variables For better understanding the examples below use constants as operands SEL Binary selection OUT SEL G INO IN1 means IF G THEN OUT IN1 ELSE OUT INO END_IF INO IN1 and out can be of any type c must be of type BOOL The result of the selection is e InolfGIS FALSE e iInlifGIS TRUE Varl SEL TRUE 3 4 INO 3 IN1 4 Result Var1 4 Result 4 FALSE SEL 3 4 ST Varl Result 3 Tip Processing is as follows for runtime optimization An
349. secutive number _0 _ 1 e Confirm with Yes all or No none to apply the actions described before to all objects The message window logs the import Note The following resource elements will be exported incompletely or not at all e Code initialization values e Instance Parameter Manager e Type Parameter Manager e Task configuration Compare Menu Project gt Compare Keyboard Use this command to compare two projects an open project with the one last saved Do not save to allow the changes to be displayed Tip If the compare mode is active status bar Compare the project cannot be edited Conventions Designation Meaning CS urrent project The project currently edited C Project to compare The project called for the compare If Project gt Compare was selected the project is in compare mode The sali compare un In compare mode the current and the compare objects will be displayed in a split window The editor organization units offer the possibility of a directly aligned content compare Filters can be activated prior to the compare DDS EN 2 3 6 15 efesotomasyon com Lenze Drive PLC Developer Studio Working with projects and objects Comparing projects Project Comparison EI Project to compare ts SimplePLCS amples Practice_TrafficLight test pro PE Options Cancel TT Ignore whitespace MW Oppose differences Project to compare By
350. signed value 128 as the intermediate variable has overflown Variable y is assigned value 128 Processing sequence The CFC editor assigns a processing number to boxes outputs jumps returns and labels and processes the individual elements in this sequence at runtime e On element insertion this number will be automatically assigned in a topological sequence from left to right and from top to bottom e Ifthe sequence has already been changed the new element will be assigned the number of its topological descendant and all higher numbers will be increased by one e Moving an element will not affect the number e The sequence influences the result and must therefore be changed under certain circumstances e f sequence display is activated the element s processing number is displayed in a grey field in the top right hand corner Processing sequence display on Processing sequence display off AND DDS EN 2 3 Lenze Show Hide Bookmarks 7 7 12 7 7 12 1 7 7 12 2 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors Commands in the Extras menu submenu Order Display Icon Menu Extras Order Display Keyboard Use this command to switch the processing sequence display on and off in the CFC editor e The default is ON e A tick in front of the menu command indicates that the display is on Arrange topologically Icon Menu Extras gt Order Keyboard
351. so called assignment combs i e the assignment of the value currently assigned to the line to several variables e Ifthe selected intersection is over an assignment or the directly preceding output another assignment will be added behind those already in existence e Ifthe selected intersection is directly in front an assignment an assignment will be inserted in front of this assignment The inserted output is pre assigned with e Click this text to change it to the required variable Alternatively use the Help Manager lt F2 gt to do so Note This command is also available in the ladder diagram editor Commands in the Extras menu Negation Icon of Menu Extras gt Negate Keyboard lt Ctrl gt lt N gt IH Use this command to negate inputs outputs jumps or RETURN instructions The symbol for the negation is a small circle on a connection e Selected inputs will be negated e Selected outputs will be negated e Selected jumps or RETURNs will have the input of this jump or RETURN negated A negation can be deleted by another negation Set Reset Icon G Menu Extras gt Set Reset Keyboard R Use this command to define outputs as Set or Reset outputs A gate with Set output is represented with an S and a gate with Reset output with an R EQ STATE S GREEN 1 EQ STATE GREEN 1 e A Set output is set to TRUE if the associated gate returnTRUE The output now retains this value even if t
352. splay and operating tools Grouping of codes e The folder Code list contains all codes The system codes of the selected PLC and the user codes created in the project e The folder Individual IEC 61131 codes only contains the user codes created in the project e All other folders contain system codes of the selected PLC for the parameterization of a specific functionality The folder Multitasking contains all codes that can be used to parameterize the multitasking behaviour of the PLC Parameterizing codes Tip For code parameterization via the parameter monitor the DDS must be connected online with the PLC e Click the code to be changed to open a dialog box for the modification of the selected code Differentiating between online and offline mode Offline mode e displays those write code values that were written last by the DDS e displays the preset read code values in general 0 Online mode e reads the code values visible in the parameter monitor permanently from the PLC and displays them Codes whose values have not been read from the PLC yet are shown in green e will not save any value changes to write accessible codes made during a mains off Only with Save parameter set C0003 1 will the changed values be saved in the PLC s parameter set and made available after mains switching The monitoring of variables is restricted while the parameter monitor is open Variables may only be updated slowly or not at all
353. ss on the left hand side of an assignment by using the assignment operator Example Varl Var2 10 After this line has been executed Vari is ten times the value of Var2 Lenze DDS EN 2 3 4 5 Show Hide Bookmarks efesotomasyon com Lenze 4 3 5 4 3 6 4 3 7 4 6 Drive PLC Developer Studio Programming languages 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 e Atimer is called with assignments for parameters IN and PT CMD TMR IN IX1 0 1 PT T 300 e The result variable Q is then assigned to variable A A CMD TMR Q e Asin IL the result variable is addressed using the function block name followed by a period and the variable name RETURN instruction The RETURN instruction is used to complete the processing of the organization unit and to return to the calling organization unit depending on a condition for instance IF instruction Use the IF instruction to check a condition Instructions can be executed depending on this condition Syntax IF lt Boolean expressionl gt THEN lt IF instructions gt ELSIF lt Boolean expression2 gt THEN lt ELSIF instructions1 gt ELSIF lt Boolean expression n gt THEN lt ELSIF instructions n 1 gt ELSE lt ELSE instructions gt END IF e The part in curly brackets is option
354. ssed 2 The generated button can later be formatted with the menu command Extras gt Configure DDS EN 2 3 Lenze Show Hide Bookmarks 9 2 9 2 1 9 2 2 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Visualization Editing visualization elements 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 Insertion mode If the insertion mode is active the name of the element to be inserted will be displayed Expressions The following inputs are possible if PLC variables are effective in the configuration of a visualization object e Variable name with Help Manager e Composite expressions consisting of component accesses e g STRUCT field accesses ARRAYaccess with constant index variables and direct addresses e Operators and addresses that can be combined with the named expressions Examples of permissible expressions X y 100 PLC PRG a TRUE NOT PLC PRG b q sin x 100 cos y 100 The following inputs are not possible e Function calls Impermissible expressions lead to an error message during log in incorrect Watch expression DDS EN 2 3 9 5
355. stics POUs 4 Data types 0 Global Variables 20 Local Variables 1 The statistics of the last compilation are displayed The statistics contain project information number of POUs data types local and global variables as saved on the last compile e Select the dialog box Option category Load amp Save and there Ask for project information to obtain project information automatically when a new project is stored or an already existing project is saved under a new name 6 1 2 13 Global search Menu Project gt Global search Keyboard Use this command to find text in organization units data types or objects of the global variables Command selection opens a dialog box to select the required objects Confirm the selection with OK to open the dialog box Find e lf atext is found in an object the object will be loaded into the associated editor and its occurrence displayed e Display of the found text Find and Find next are analogous to the menu command Edit Find 6 18 DDS EN 2 3 Lenze Show Hide Bookmarks 6 1 2 14 Lenze efesotomasyon com Lenze 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 t
356. t Name gt Direct bit addressing is permitted for integer and bitstring data types only You are using a type REAL LREAL variable var1 in bit access lt var1 gt lt bit gt or a constant Bit index lt d gt outside the valid range for lt Name gt type variables 7 4023 Number expected after or Enter a number 4024 Expect lt Operator 0 gt or lt Operator 1 gt or in front of Enter a correct operator at the named position lt Name gt 4025 Expect or gt in front of lt Name gt Enter one of the two operators at the named position 4026 BITADR expects a bit address or a variable at a bit address Use a correct bit address for example lIX0 1 4027 Integer or symbolic constant expected Insert an integer or the identifier of a correct constant 4028 INI operator requires a function block instance or a Check the type of the variable to which you apply the INI operator structure variable 4029 Internested calls of the same function are not possible In non reentrant automation systems and in simulation mode a function call must not contain a call for itself as parameter Example fun1 a fun1 b c d e Use an intermediate variable 4030 No constants and expressions are allowed as ADR operands Replace the constant or the expression with a variable or a direct address 031 The address operator is not permitted on bits Use BITADR eS EEE arson retums no psc memo ates 032 lt Number gt operan
357. t condition of a higher priority task is satisfied while another task is being processed the lower priority task will be interrupted and continued after the higher priority task has been processed 8 8 6 Working in the task configuration The task configuration is an object on the tab Resources in the Object Organizer Double click the object Task configuration in the Object Organizer to display the current task configuration in the task editor in the right hand window pane Structure of the task configuration The task configuration is structured like a directory tree 8 32 The text Task configuration appears at the highest hierarchical level One level below includes a sequence of task entries name priority interval event watchdog time task ID Each task entry in turn contains a sequence of program calls A plus sign in front of the entry indicates that this entry contains subentries that can be shown by clicking the plus sign Click the minus sign to hide the subentries again Select Insert gt Insert task to insert a task above the selected task Select Insert Add task to add a task to the end of the existing list when the highest level Task configuration was selected Select Insert gt Insert program call to add a program call to the selected task If several programs are added to the task these POUs will be processed one after the other Select Extras Edit entry to edit the task properties or program
358. t connected You are using an input box in the CFC that is not connected further ee ee te lt Name gt Element lt Element number gt Incorrect Watch expression lt Name gt name and placeholder substitutes 1 No entry possible to expression You are using a composite expression as the target of an entry action in the visualization object configuration Replace this with a single variable The POU lt Name gt entry function is not available in the The entry organization unit e g PLC_PRG will not be available during library use library 15 10 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Appendix 1901 Access variables and configuration variables are not saved Access variables and variable configurations are not saved in the library in a library lt Name gt Library not suitable for the current machine type The obj file of the library was generated for a different machine type lt Name gt Incorrect library The file does not correspond to the file format required by the automation system A system organization unit was used in a scale function It Ensure with the help of the process image monitor that a process image is generated for the is possible that no process image will be generated for this applied system organization unit system organization unit Chapter on Scale functions A system organization unit was used in a system POU It is Ensure wit
359. t load the project into the control e Select Yes to load the current project into the control Log out Menu Online gt Log out Keyboard lt Ctrl gt lt F8 gt Use this command to disconnect the link with the control or the simulation program and to change into offline mode Load Menu Online Download Keyboard Use this command to download the program into the PLC e Notethatalog in will not launch a program download if the project in the DDS is identical to the project in the PLC DDS EN 2 3 Lenze Show Hide Bookmarks 6 3 1 4 6 3 1 5 6 3 1 6 6 3 1 7 6 3 1 8 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Working with projects and objects Icon Menu Online Start Keyboard lt F5 gt 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 e After the user program was stopped in the control with the command Online Stop e lf the user program has hit a breakpoint e lif the menu command Online Single cycle was executed Stop Icon T Menu Online Stop Keyboard lt Shift gt lt F8 gt Use this command to stop processing of the user program in the PLC or simulation between two cycles e lf the program is stopped the PLC sets quick stop QSP e Use the command Online Start to continue program processing Reset Ico
360. t of the current PLC configuration Convert the older project only if you require and want to use the functions of DDS 2 x Note The old configuration cannot be restored O1 DDS EN 2 3 8 2 Show Hide Bookmarks efesotomasyon com Lenze 8 6 2 8 6 3 8 6 4 8 26 Drive PLC Developer Studio Resources 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 e fa digital input is used as a touch probe it can not be used to start a task e Every touch probe input is assigned a task to reduce the number of interrupt tasks available for the application Configuring an I O module Once an I O module has been selected in the configuration tree the system displays the dialog box Basic parameters with the following options Module ID This is an unequivocal module identifier within the entire configuration environment taken from the configuration file and cannot be edited Node number The node number results from an entry in the configuration file If there is no entry there it is sourced from the position within the configuration tree Configuring a channel Basic parameters of a channel Once a channel has be
361. t off and may not be visible any more DDS EN 2 3 Lenze Show Hide Bookmarks Lenze efesotomasyon com Lenze Drive PLC Developer Studio Visualization e 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 Where no predefinition has been made a double click on the associated field in the column Substitutes will open the placeholder in an edit field where it can be completed as required e Another option to substitute placeholders in references is directly on a visualization call via an entry in text field Zoom to Vis category Input of the configuration dialog for a visualization element Caution The chronological substitution sequence can not be influenced No placeholders should be substituted with texts that include placeholders themselves The use of placeholders makes it impossible to check any invalid entries in the configuration of the visualization elements at the time of project compilation so that any relevant error messages will be output in online mode only incorrect Watch expression Placeholder concept Example for using the placeholder concept Function block instance
362. t whether a project specific device description file PDB is to be created for Global Drive Control GDC and if so for which languages Tip A PDB will be created only if a directory has been specified under Path and the check box Build GDC Device Description has been activated The PDB is built updated on project compile if PDB relevant data have changed The file name of the PDB consists of the project name followed by an index _S _1 _2 forthe associated language and the extension pdb Example e Name of the project Example e Language selection Standard language and Language Two e PDB file names Example_S pdb and Example_2 pdb DDS EN 2 3 5 17 Show Hide Bookmarks efesotomasyon com Lenze 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 e 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 e Up to three country specific PDBs can be created per project e The associated GDC display texts for the relevant code are defined in the Instance Parameter Manager in the dialog box More details and information call via Extended in the Parameter Manager e The selected language
363. tch case Select whether the search is to be case sensitive or not Direction Select whether the search is to be up or down from the current cursor position Start search Click Find next to start the search Search starts at the selected position and is performed in the selected direction e Any found text occurrence will be highlighted e Unsuccessful searches will be notified Tip The search can be repeated by clicking Find next again and will stop on reaching the beginning or end of the editor window contents Note that the text found may be hidden behind the dialog box Find Find next Icon Cai Menu Edit gt Find next Keyboard lt F3 gt Use this command to search the text using the same parameters as before with the command Edit Find DDS EN 2 3 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Editors 7 1 1 9 Replace Menu Edit gt Replace Keyboard lt Ctrl gt lt H gt 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 Ersetzen ex Suchen nach PROGRAM Weitersuchen Ersetzenduch _ Erseten All t T Nur ganzes Wort Hes ersetzen TT Grof AKleinschreibung Abbrechen e 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 Replace with Use the input
364. ted the tool bar willbe displayed below the menu bar for faster access to menu commands Status bar If the option Status bar is activated the status bar will be displayed at the bottom edge of the DDS main window Online in security mode If the option Online in security mode is activated online mode displays a dialog box for the commands Start Stop Reset Breakpoint on Single cycle and Write values offering an additional security prompt as to whether the command is indeed to be executed This option is saved together with the project Language DDS dialog and menu languages are German and English Note Languages can be selected under Windows NT and Windows 2000 only DDS EN 2 3 5 9 Show Hide Bookmarks Options Colours efesotomasyon com Lenze 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 DDS colour settings can be changed for the following elements Category Load amp Save ne Line numbers Current position Breakpoint position Reached position GDC Device Description Set breakpoint Mon
365. ter Trans0 33 Repeat the above step seven times to create the following sequential function chart To delete a step or transition select the step and the associated transition otherwise they cannot be deleted First click the step press lt Shift gt then click the transition PLC_PRG PRG SFC ox CGA Ol x 0001 PROGRAM PLC_PRG 0001 PROGRAM PLC_PRG Lame e Clicking the name of a transition or step directly will invert the text for editing 34 Change the name of the first transition after Init to TRUE 35 Change the names of all subsequent transitions to WAIT1 OK e The first transition switches all the time all other transitions when WAIT1 in OK becomes TRUE i e when the specified time has expired 36 Change the names of the steps as described below from top to bottom Init remains unchanged CHANGE1 GREEN1 CHANGE2 RED1 CHANGES GREEN2 CHANGE4 RED2 e CHANGEx stands for a amber phase each time GREEN1 means that traffic light 1 will be green and GREEN2 applies for traffic light 2 RED1 means that traffic light 1 will be red and RED2 applies for traffic light 2 Lenze DDS EN 2 3 3 9 Show Hide Bookmarks efesotomasyon com Lenze 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 P
366. ter is the instance name of function block L_IOParCounterModule and can be used as input in the code Note All values remain the same from one execution of the function block to the next Therefore function block calls with the same arguments do not necessarily return the same output values Should the function block include at least one Retain variable the whole instance is stored in the Retain area 2 2 4 2 Calling a function block The input and output variables of a function block can be approached by another organization unit For this purpose a function block instance must be generated and the desired variable specified with the help of the following syntax lt Instance name gt lt Variable name gt Input writes only Input and output reads e Tosetthe input parameters on call in the IL and ST text languages assign values to the parameters in brackets after the function block instance name assignment via as for the initialization of variables at the point of declaration Tip SFC allows function block calls in steps only Lenze DDS EN 2 3 2 5 Show Hide Bookmarks efesotomasyon com Lenze 2 2 9 2 2 5 1 2 6 Drive PLC Developer Studio Introduction Declaration part Instruction part PROGRAM test CAL instanz parl 5 par2 5 VAR LD instanz varout2 quad BOOL ST quad instanz fub LD instanz varoutl value INT 0 ST value END VAR Instanz pari 5 par2 5 quad instanz varout2 v
367. tered in the input field behind e Every mouse click on the visualization element will toggle the value of the Boolean variable from TRUE to FALSE or from FALSE to TRUE Tip variable If check box Tip variable is activated the value of the Boolean variable specified in the input field behind will be changed by pressing the left mouse key and keeping it depressed e Thevalue of the Boolean variable will change from TRUE to FALSE or fromFALSE to TRUEwhen positioning the mouse pointer over the visualization element then pressing the left mouse key and keeping it depressed e The value of the Boolean variable will return to its original status on releasing the left mouse key e f check box Tip FALSE is active the value on clicking OK will change from TRUE to FALSE Caution This function cannot always be guaranteed to be reliable Do not use Tip variable for safety relevant drive control functions such as positioning for example DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 e Activating check box Toggle variable as well will toggle the variable specified in text field Toggle variable e lfaSTRING type program variable e g PLC PRG xxx is specified in the text field instead of t
368. tion Changing size and shape of visualization elements Once an element has been selected its centre of rotation and reference points are marked in black e The size of the selected element can be changed by moving the respective reference point while keeping the left mouse key depressed e Thecentreof rotation of the visualization element can be moved by keeping the left mouse key depressed The element will then move around this point according the set rotation angle Polygon Move reference point e Keep the left mouse key depressed to move any reference point of a polygon Insert reference point e Hold the lt Ctrl gt key while pressing the left mouse key to move the new reference point from an already existing reference point location to the desired position Remove reference point e Hold the lt Umschalt gt lt Ctrl gt keys and click the reference point to be removed Moving visualization elements One or several selected elements can be moved using the arrow keys or keeping the left mouse key depressed Copying cutting inserting visualization elements One or several selected elements can be copied cut or inserted via the clipboard Copying with the lt Ctrl gt key Elements may also be copied as follows e Select the elements to be copied e Press lt Ctrl gt and lt C gt simultaneously to copy one of the selected elements e Press lt Ctrl gt and lt V gt simultaneously to paste the copy slightly displaced
369. tion unit in question DDS EN 2 3 Lenze Show Hide Bookmarks 6 2 4 12 Lenze efesotomasyon com Lenze Drive PLC Developer Studio Working with projects and objects Output unused variables Menu Project Output unused variables Keyboard Use this command to output a list of all variables declared but not used in the project PLC Configuration 0 AIN1_bError_b PLC Configuration 0 AOUT1_nOut_a PLC Configuration 0 DIGIN_bCInh_b PLC Configuration 0 DIGIN_bIn1_b PLC Configuration 0 DIGIN_bIn2_b PLC Configuration 0 DIGIN_bIn3_b PLC Configuration 0 DIGIN_bIn4_b PLC Configuration 0 DIGIN_bIn5_b Library object 2 g_fScaleFunctionReal Library object 3 g_byScaleFunctionByte Library object 4 g_siScaleFunctionSint Library object 5 g_nScaleFunctionint Library object 6 g_wScaleFunctionWord Library object 7 g_dnScaleFunctionDint Library object 8 g_dwScaleFunctionDword Library object 9 g_bScaleFunctionBool Library object 10 g_bScaleFunctionError Alon E 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 e A message will be displayed if there are no unused variables within the project DDS EN 2 3 6 31 Show Hide Bookmarks efesotomasyon com Lenze n O 6 3 6 3 1 6 3 1 1 6 3 1 2 6 3 1 3
370. tions allow complex scaling operations Scale functions are small IEC 61131 3 programs and can be programmed by the user The program may contain internal conversion scaling operations limit value calculations etc Subcodes Subcodes are assigned automatically if the variable is an Array data type Example varl ARRAY 0 4 OF INT up to 5 subcodes assigned All subcodes are given the same initialization value in the Parameter Manager Type Parameter Manager Definition of a standard setting Predefinition of variables of created function block POUs Variable types Variables of type VAR IN OUT and variables within a type VAR function block cannot be assigned Variable value The variable value is the value processed in the IEC 61131 3 program e g integer value of 16384 codes 8 10 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 8 4 3 8 4 3 1 8 4 3 2 Lenze Drive PLC Developer Studio Resources Instance Parameter Manager fl 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 e Thevariables can be declared globally or locally in Program type POUs e Once the Instance Parameter Manager has been started codes can be assigned for the entire project Tip The available first instances of a function block are described in the relevant manual for the function library and in the on
371. to a different elementary LREAL_TO_ lt type gt in LREAL_TO_ lt type gt Type conversion of the LREAL operand into a different elementary type mM A pen lt lt 2 cD V in TIME_TO_ lt type gt Type conversion of the TIME operand into a different elementary ne a a in TOD_TO__ lt type gt Type conversion of the TOD operand into a different elementary La 7 E ne Ss a Ld LS La O LS ss SS I Ss A pe lt ge D V DATE_TO_ lt type gt in DATE_TO_ lt type gt DT_TO_ lt type gt in DT_TO_ lt type gt bi in STRING_TO_ lt type gt Type conversion of the operand into a different elementary type Type conversion of the operand into a different elementary type N zy ma io A pa lt lt 2 D V Type conversion of the operand into a different elementary type in must contain valid value of the target type TRUNC Conversion from REAL to INT ABS Absolute value of the operand SQRT in S Square root of the operand LN in Natural logarithm of the operand Logarithm of the operand to the base of 10 XP Exponential function of the operand SIN in SIN ine of the operand COS in COS Cosine of the operand da na DPI DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Operators 11 2 Standard lib integrated IEC operators TO LEFT str size RIGHT str size MID str size CONCAT s
372. to create and manage communication channels to the automation system Note Use of the OPC or DDE server requires the same communication parameters to be set in that server s configuration DDS EN 2 3 6 37 Show Hide Bookmarks efesotomasyon com Lenze n O 6 38 Drive PLC Developer Studio Working with projects and objects The following channels to the automation system are currently available for practical use e Local gateway e Remote gateway Via a TCP IP network to a remote gateway PC with parallel port and dongle PC_lokal PC_PLC1 TCP IP local shared memory The dialog box Communication parameters is divided into four panes Communication Parameters Fa Channels El localhost via Tcp Ip can 8220 OsziTest pro Lokal__ c Name Value Comment __Lencel_ Lenze OPC Parameter chan 2 SN bus node 1 b9 N bus baud 500 KBaud New Fi 0 15 1640378 Remove Gateway Update 1 Channels This is where the communication channels from the local host are displayed and those to be edited are selected 2 Communication driver display The currently loaded communication driver e g CAN 8220 JumpingLEDs pro 3 Communication parameters The parameters set for the currently loaded communication driver 4 Buttons OK Quitand accept parameters Cancel Quit and reject parameters New Create a new communication channel via the parallel po
373. to list all its components The variable will then be identified with a minus sign e Double click again or press lt Enter gt to hide the components and to return the plus sign Lenze DDS EN 2 3 7 23 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Editors 7 3 2 1 Configuring the monitoring window Menu Extras Monitoring options Keyboard Use this command to configure the monitoring window In online mode the text editor window is vertically split in two e Normal program text is shown on the left e 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 Go z Distance of two Variables 200 Cancel e Width of monitor window in percent e Distance between two monitoring variables in a line Distance 1 corresponds to one pixel in the selected resolution 7 3 3 Breakpoint positions Breakpoint positions are all program locations where variable values can change or program flow branches e As the DDS internally combines several IL lines into one C code line it is not possible to set breakpoints in every line e Exception Function calls Breakpoints must be set in the functions as necessary Possible breakpoint positions are identified with a dark grey line number field WAIT FB IL _ OF x hhh eee a 0002 SETTIME a 0003 OK LD DELAY Q a DELAY Q
374. to the clipboard and can be inserted as often as required e Todo so first select the insertion position Inputs and outputs are valid insertion positions e lf an organization unit was loaded into the clipboard in this case all connected branches with the exception of the first have also been transferred to the clipboard the first input will be connected to the branch before the insertion position e Otherwise the whole branch before the insertion position will be replaced with the contents of the clipboard e In every case the last inserted element will be connected to the branch to the right of the insertion position Tip Cut and Insert solve the following problem Anew operator is inserted in the middle of anetwork The branch to the right of the operator is now connected to the first input but should be connected to the second input Select the first input and then Edit Cut Then select the second input and click Edit gt Insert The branch is now connected to the second input DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 ofthe network with the breakpoint and the network number field turns red In single stepping the process jumps to every single network
375. to this label using Insert gt Jump Return F Use this command to insert a RETURN instruction in the CFC editor Comment Icon oO Menu Insert gt Comment Keyboard lt Ctrl gt lt K gt Use this command to insert a comment in the CFC editor e Use lt Ctrl gt lt Enter gt to add a line break in a comment Box input Icon Menu Insert Box input Keyboard lt Ctrl gt lt U gt Use this command to insert a box input in the CFC editor With many operators the number of inputs may vary e g the box ADD may have two or more inputs In order to extend such an operator by one input the operator itself must be selected first In pin out pin Icon Menu Insert gt In pin Keyboard e Icon Menu Insert Out pin Keyboard s These commands are available only while a macro is open and e support the insertion of in or out pins as the inputs and outputs of a macro e receive no position index DDS EN 2 3 7 45 Show Hide Bookmarks efesotomasyon com Lenze 7 7 6 7 7 6 1 7 7 6 2 7 7 6 3 7 7 6 4 7 46 Drive PLC Developer Studio Editors Commands in the Extras menu Negation Icon of Menu Extras Negation Keyboard lt Ctrl gt lt N gt IH 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 e Selected inputs will be negated e Selected outputs will be negated e
376. tomasyon com Lenze n O 6 1 2 6 6 12 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 pro ST Visualisierung 0 ST Visualisierung English TODO French TODO END NAME ITEM After the translation TODO was substituted with the English and French expressions NAME ITEM D DDS projects Bspdt 22 pro ST Visualisierung 0 ST Visualisierung English ST Visualization French ST Visu END NAME ITEM Make sure that translated identifiers and names remain valid under the standard and that strings and comments are placed within the relevant brackets Note The following blocks of the translation file should not be modified without detailed knowledge Language block flag block position information original texts Translate this project Menu Project Translate this project Keyboard This menu command offers subitems e Create translation file e Translate project into another language Tip The translate cannot be undone Save a project copy under a different name before translating Creating a translation file Translating a project into another language
377. tr1 str2 INSERT str1 str2 pos DELETE str1 len pos REPLACE str1 str2 len p REPLACE os str2 len pos FIND str1 str2 FIND str2 Left hand start string size of string str Replace segment of length len starting at position pos of str1 with str2 una 2 a a Ts e petbistabie tinction Bock o dominanti si reset state nator o a na a E ne ca a Co SEMA R_TRIG F_TRIG CTU For a detailed description refer associated libraries Lenze DDS EN 2 3 11 3 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Operators 11 4 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 1 ADD Addition It is also possible to add two TIME variables the sum being again a time e g t 45s t 50s t 1m35s 12 1 2 MUL Multiplication 12 1 3 SUB Subtraction A TIME variable can also be subtracted from another TIME variable the result being a
378. treme right of an organization unit the process exits the SFC organization unit and returns to the invoking unit starting the next cycle if that is the main program e astepina parallel branch not at the extreme right the process jumps to the active step in the next parallel branch e the last breakpoint position within an action the process jumps to the unit that called the SFC e the last breakpoint position within an IEC action the process jumps to the unit that called the SFC e the last breakpoint position within an entry action or exit action the process jumps to the first active step DDS EN 2 3 7 65 Show Hide Bookmarks efesotomasyon com Lenze 7 66 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 SVWITCH1 SWITCH1 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 First all Action Control Block Flags of IEC actions used in this sequencer are reset The flags of IEC actions that are called within actions remain set 2 All steps in the sequencer are checked in their sequence in the sequencer as to whether the condition to execute the exit action is fulfilled and executed if so 3 All steps are
379. try to the variable in accordance with IEC syntax in the associated declaration editor Lenze DDS EN 2 3 7 17 Show Hide Bookmarks efesotomasyon com Lenze 7 2 16 7 2 17 7 2 17 1 7 18 Drive PLC Developer Studio Editors Tip The variable declaration dialog can also be opened via Edit gt Declare 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 lt Shift gt lt F2 gt Line numbers in the declaration editor e In offline mode a whole text line can be selected by clicking the line number e In online mode in the case of a structured variable the variable in a line will be opened or closed by clicking on the line number Declarations as tables If control box Declarations as tables in the dialog box Options category Editor is activated variables in the table can be edited as table instead of using the declaration editor PLC_PRG PRG SFC VAR K_VARLINPUT YYVAR_OUTPUTYY VAR_IN_OUT gt CONSTANT Y RETAN X INFO ON Name Address Type Initial Comment amon J pea __ aooaa oe f e This table is arranged as a card index box with tab cards for input output local and input output variables Select the tab card for the respective variable category by clicking a tab and edit the variables The following input fields are available for each variable Name Variable identifier Address linked to
380. ts a string into another string from a specific position Deletes a segment from a string from a specific position Replaces a segment within a string with another string Looks for a segment within a string DI N DD D h O r O A n Bistable function block dominant set Bistable function block dominant reset SEMA Software semaphore interruptible mi J w Q Mi Ke D I D D O R_TRIG F_TRIG Rising edge detector Falling edge detector 4 Cc C2 Up counter Down counter CTUD Up and down counter 3 T Pulse encoder as 4 oj tv Timer on delay 4 oO n Timer off delay RTC Runtime clock oO et ep am O oO O D a DDS EN 2 3 14 L Show Hide Bookmarks efesotomasyon com Lenze 14 1 14 1 1 14 1 2 14 2 Drive PLC Developer Studio IEC 61131 3 Standard functions 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 lt elem typel gt TO lt elem type2 gt Converting between integer number types Conversion from an integer number type to another number type Conversion from higher to lower order types may resu
381. tudio Resources Target Platform Target Platform Memory Layout General Networkfunctionality m Libraries lable ibe Wate lena fies fice JU M Output TRE RR E fi I HEX P LST I MAP None 2 LST with Addresses l HRN i __ M Data consistency for multitasking 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 If the LST control box is activated a LIST file willbe created containing the disassembled program This file can also be created including addresses LST with Addresses If the MAP control box is activated a MAP file will be created containing the memory allocation Data consistency errors Some variable types cannot be read or written with a single processor access in a multi tasking environment Processing requires several accesses If a variable is simultaneously accessed by several tasks data inconsistency may occur The following data types are concerned e DWORD DINT UDINT REAL TIME BOOL if the BOOL variable has an absolute address bMyBool AT MX0 0 BOOL Note If the Data consistency for multi tasking checkbox is activated low priority tasks can no longer be inter
382. tudio Appendix Set the communication parameters gateway device device instance lt Instance name gt Set the instance name for the current device to the specified name device parameter Assign the parameter with the specified ID or optionally the specified parameter name the specified value that lt ld gt lt paramtername gt will then be interpreted by the device lt value gt system lt Command gt Execute the specified operating system command Select automation system target lt Id gt lt name gt Set the target platform for the current project Specification of target ID or optionally the target name as specified in the target file Command file command cmd file open C projects DDS test ampel pro guery off ok watchlist load c work w wtc online login online run delay 1000 watchlist read watchlist save c work watch wtc online logout file close This command file e opens the project file ampel pro e loads a Watch list loaded under w wtc e starts the user program e after one second writes the variable values into the Watch list watch wtc that is saved e and then closes the project again The command file is called as follows in the command line lt Path DDS file gt lt Path cmd file gt 15 4 DDS EN 2 3 Lenze efesotomasyon com Lenze Show Hide Bookmarks Drive PLC Developer Studio Appendix 15 3 IEC keywords Keywords are unique character combinations used as i
383. tured Text Task Transition Type definition Variable Cycle Cycle time Abbreviation for Structured Text All functions predefined by IEC 61131 3 to implement PLC typical functionality See Standard function blocks All function blocks Function Blocks predefined by IEC 61131 3 to implement PLC typical functionality Structured Text Structured Text is a programming language to describe algorithms and execution control by means of the latest high languages Definition of run time features of a program Transition from one SFC step to the next by evaluation of the transition condition Definition of a user specific data type based on already existing data types Name of a data memory which can contain values determined by the data type or variable declaration The cycle of a periodically called user program The cycle time is the time needed by the user progam for a cycle DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Index 16 Index A Binary selection 12 8 Bistable function blocks 14 10 Absolute value 14 5 Bit channels 8 2 Access rights 5 15 6 21 6 28 Add action 7 6 Bitmap 9 4 9 18 Add entry action 7 58 Add exit action 7 50 Add label to parallel branch 7 59 Breakpoint dialog 6 3 Add program call 8 34 Breakpoint on off 6 34 Add subelement 8 24 Breakpoint 7 28 7 65 Add task 8 33 Bring forward by one 7 52 Addition 12 1 Addition
384. uction must be INT type The end value of the FOR instruction must be compatible with the counter variable type 4261 The incrementation value of the FOR instruction must be The incrementation value of the FOR instruction must be compatible with the counter INT type variable type 4262 EXIT is EXIT is permitted only within a loop only within a loop Use EXIT Use EXIT only within FOR WHILE or UNTIL instructions within FOR WHILE or UNTIL instructions 4263 Number FN a or END_CASE expected CE Ron bt a number or an ELSE instruction or the end instruction END_CASE can be specified within a CASE 15 16 DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Appendix Possible remedy 4264 The selector of the CASE instruction must be INT type Ensure that the selector is an integer or bitstring data type DINT DWORD for example 4265 Number expected after In the CASE selector list another selector must be specified after a comma 4266 At least 1 instruction required Enter an instruction at least a semicolon 4267 A function block call must start with an instance name The identifier in the function block call is no instance Declare an instance of the required function block or use the name of an instance that has already been declared 4268 Expression expected Enter an expression at this position 4269 END_CASE expected after ELSE branch Complete the CASE instr
385. uction with an END_CASE after the ELSE branch 4270 CASE constant ld already in use A CASE selector must be used once only within a CASE instruction 4271 The lower limit of the specified range is greater than the Correct the selector range limits so that the lower limit is not greater than the upper limit upper limit 4272 Parameter lt Name gt expected at lt Position gt in lt Name gt If the function parameters within the function call are specified with parameter names the Call position of the parameters Sequence must match that in the function definition 4273 CASE range lt range limits gt overlaps with already used Ensure that the selector ranges specified in the CASE instruction do not overlap range lt range limits gt 4274 Multiple ELSE branch in CASE instruction A CASE instruction must not contain in excess of one ELSE branch 4300 Jump or Return require a Boolean input Ensure that the input for the jump or the Return instruction is a Boolean expression 4301 Organization unit lt Name gt requires exactly lt number gt The number of inputs does not match the number of VAR_INPUT and VAR_IN_OUT variables inputs specified in the organization unit definition 4302 Organization unit lt name gt requires exactly lt number gt The number of outputs does not match the number of VAR_OUTPUT variables specified in the outputs organization unit definition 4303 lt Name gt is not an operator Replace lt name gt with a valid
386. ues in the Object Organizer to open the dialog box Code initialization values Initialize values of code Ea C0114 001 0 0000 DIGIN_bIn1_b input level can be inverted C0114 002 0 0000 DIGIN_bln2_b input level can be inverted C0114 003 0 0000 DIGIN_bln3_b input level can be inverted New C0114 004 1 0000 DIGIN_bln4_b input level can be inverted C0114 005 0 0000 DIGIN_blnS_b input level can be inverted C0118 001 0 0000 DIGOUT_bOut1_b output level can be inve C0118 002 1 0000 DIGOUT_bOut2_b output level can be inve C0118 003 0 0000 DIGOUT_bOut3_b output level can be inve C0118 004 0 0000 DIGOUT_bOut4_b output level can be inve C2104 000 1 0000 Automatic start of the PLC program after po DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Resources Adding code with initial value 1 2 In the dialog box Code initialization value click New to add a code with initial value 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 Use input field Initialize value to enter a value for code initialization 4 Ifthe code has subcodes use input field Subcode to enter the associated subcode Optionally input field Remark can be used to enter a comment to be displayed in dialog box Code initialization values Confirm with OK to accept the inp
387. uired system organization units of the selected Lenze automation system System organization units System organization units are interfaces organization units permanently integrated into the device quasi hardware interfaces that cannot be programmed using the DDS e g MCTRL_MotorControl DIGITAL_IO DCTRL_DriveControl AIF_IO ANALOG1_IO e TheDDScheckson the basis of the relevant system organization unit description whether the IEC addresses applied in the program do indeed exist in the automation system The system organization units in the PLC configuration consist of several elements that are either inputs or outputs e Every input output has a symbolic name identifier that can be changed if necessary and is assigned an IEC address Thus every input output can be addressed directly e g IX1 0 1 or via system variables DIGIN_bIn1_b in the program DDS EN 2 3 8 23 Show Hide Bookmarks efesotomasyon com Lenze 8 6 1 8 6 1 1 8 6 1 2 8 6 1 3 8 24 Drive PLC Developer Studio Resources 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 Elements identi
388. ure name gt STRUCT lt Variable declaration 1 gt lt Variable declaration n gt END STRUCT END TYPE lt Structure name gt is now atype known throughout the entire project and canbe used like astandard data type Nested structures are permitted the only restriction being that variables cannot be set to addresses An AT declaration is not permitted Structure components are accessed with the following syntax lt Structure hame gt lt Component name gt For instance the structure Week including the component Monday can be accessed as follows Week Monday Example Structure definition for a polygon TYPE Polygon STRUCT Start ARRAY 1 2 OF INT Point1 ARRAY 1 2 OF INT Point2 ARRAY 1 2 OF INT Point3 ARRAY 1 2 OF INT Point4 ARRAY 1 2 OF INT End ARRAY 1 2 OF INT END STRUCT END TYPE DDS EN 2 3 Lenze Show Hide Bookmarks efesotomasyon com Lenze 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 lt Identifier gt lt Assignment expression gt END TYPE Example TYPE message STRING 20 END TYPE 10 2 6 Subrange types The value range of a subrange type merely co
389. using the menu commands Project Insert object or change lt Name gt to the name of a defined organization unit 4051 lt Name gt is not a function Use a function name defined in the project or in the libraries for lt Name gt 4052 lt Instance name gt must be a declared instance of function Use a type lt Name gt instance defined in the project for lt Instance name gt or change the type block lt Name gt from lt Instance name gt to lt Name gt 4053 lt Name gt is no valid organization unit or operator Replace lt Name gt with the name of an organization unit or an operator defined in the project 4054 Organization unit name expected as parameter of INDEXOF The specified parameter is no valid organization unit name 4060 VAR_IN_OUT parameter lt Name gt of lt Name gt requires Write accessible variables must be transferred to VAR_IN_OUT parameters as these can be write accessible variable as input modified within the organization unit Lenze DDS EN 2 3 15 15 efesotomasyon com Lenze Drive PLC Developer Studio Appendix Possible remedy 4061 VAR_IN_OUT parameter lt Name gt of lt Name gt must be Write accessible variables must be assigned to VAR_IN_OUT parameters as these can be assigned modified within the organization unit 4062 No external access to VAR_IN_OUT parameter lt Name gt of VAR_IN_OUT parameters must only be written or read within the organization unit reference lt Name gt transfer
390. ust be preceded by a structure variable The identifier to the left of the period must be a STRUCT or FUNCTION_BLOCK type variable or the name of a FUNCTION or a PROGRAM 4121 lt Name gt is no component of lt Name gt is no component of lt Object name gt name gt The component lt Name gt is not included in the definition of object The component lt Name gt is not included in the definition of object lt Object name gt name gt 4122 lt Name gt is not an input parameter I I N a the called function MII OR ee the input variables of the called function block and change lt Name gt into one of these block variables 4200 LD expected Add at least one LD instruction in the editor window of the IL organization unit or behind the jump label 4201 IL operator expected Every IL instruction must start with an operator or a jump label 4202 Unexpected end of the subexpression Insert the right parenthesis 4203 lt Name gt in parentheses not allowed The specified operator is not permitted within an IL subexpression impermissible are JMP RET CAL LDN LD TIME 4204 Right parenthesis without left parenthesis Insert left parenthesis or delete right parenthesis 4205 No comma permitted after Remove the comma behind the right parenthesis 4206 No jump labels in subexpressions Move the jump label outside the subexpression 4207 N modifier requires a BOOL BYTE WORD or DWORD type The N modifier requires a data type for whi
391. ut or select Cancel to end the process and close the dialog box Changing the initial value of a code 1 2 In the list box use the mouse pointer symbol to click on the line with the code to be changed Use dialog box Initialize value to change the values as required and confirm with OK Deleting code with initial value 1 2 In the list box use the mouse pointer symbol to click on the line with the code to be deleted Use dialog box Initialize value button Delete to delete the selected code Example A project using a 9300 Servo PLC is to always use the same motor type To avoid repeated reconfiguration the motor type can be hardwired in the project with the help of code initialization values Lenze 0086 Motor type selection code Initialization value 108 motor type MDSKSXX036 13 fn 200 Hz Code 0086 ok 000 Subcode Initialize value fi 08 0000 Remark Motortyp MSDKS X036 13 DDS EN 2 3 8 5 Show Hide Bookmarks efesotomasyon com Lenze Resources Drive PLC Developer Studio 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 sav
392. valid Delete the impermissible characters in the step name characters 4354 Jump to undefined step lt name gt Select an existing step name as the jump target or insert a step with the as yet undefined name 4355 A transition must not have any side effects assignments A transition must only contain a Boolean expression FB calls etc 4356 Jump without valid step names lt name gt Use a valid identifier as jump target 4357 EC library not found Check whether the library iecsfc lib was integrated into the Library Manager and whether the library paths specified in the project options are correct Lenze DDS EN 2 3 15 17 efesotomasyon com Lenze Drive PLC Developer Studio Appendix Possible remedy 4358 Undeclared action lt name gt Ensure that the IEC step action is inserted in the Object Organizer below the SFC organization unit and that the action name is entered in the box to the right of the qualifier 4359 Invalid qualifier lt name gt Enter a Enter a qualifier for the IEC action in the box to the left of the action name for the IEC action in the box to the left of the action name Lea Time constant expected behind qualifier lt name gt Enter a time constant behind the GIU II I tare for the IEC action in the box to the left of the action name 4361 ldentifier lt name gt identifies no action Enter the name of an action or a Boolean variable defined in the project for the IEC action in b
393. vari INT JMP label C Closing instruction e g a var1 N aN cn i N i i N Set Boolean operand boolvar to TRUE exactly if the current result is TRUE Set Boolean operand to FALSE exactly if the current result is TRUE Jump to label Call program prog1 Call function block instance inst1 Call function and transfer variables vx vy Exit organization unit and if necessary return to calling unit Value following the parenthesis is taken as the operand the preceding operation is put on hold until the right parenthesis is reached Evaluate operation on hold Bit by bit AND Bit by bit OR Load value of var1 into the accumulator Save current result at operand position vari lt Fktname gt VX vy lt Fktname gt vx vy C RETURN C M Bioy OR N ___ Bit by bi N Bit by bit exclusive OR by bi NO Division A e e __ o h R N M D E o h ET ND OR OT UL IV E Q E E Lenze DDS EN 2 3 11 1 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio IEC 61131 3 Operators Operator IL Mod IL LT aS D D aN MOD in Modulo division INDEXOF in INDEXOF Ld Internal index of an organization unit int INT SIZEOF in IZEOF Required number of bytes for data type specified for in SHL K in SHL K __ Shift bits left by K within an operand SHR K in SHR K a Shift bits right by K within an operand ROL K in ROL K __ Rotate bits left by K with
394. variable returns the value FALSE e fajump or return is highlighted the input of the jump or return will be negated A negation can be deleted by another negation O DDS EN 2 3 7 3 Show Hide Bookmarks efesotomasyon com Lenze 7 6 4 5 7 6 4 6 7 6 4 7 7 40 Drive PLC Developer Studio Editors Set Reset Icon Menu Extras Set 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 Otherwise the variable will remain as it is A Reset coll never overwrites the value FALSE in the associated Boolean variable e A Reset coil is identified with an R in the coil symbol If the network result is TRUE the Boolean variable as a consequence of the Reset coil will be set to FALSE Otherwise the variable will remain as it is If the command is executed more than once the coil toggles between Set Reset and normal coil Open instance This command corresponds to the command Project Open instance Options Menu Extras Options Keyboard Use this command to open the dialog box Function block and ladder diagram options Function Block and Ladder Dia
395. veloper 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 To avoid this behaviour insert an intermediate step to allow re initialization of the action status in the additional cycle that must then be run Implicit SFC variables SFC provides implicitly declared variables for use e The step flag active or inactive step status is called lt StepName gt x for IEC steps e This Boolean variable has a value TRUE if the associated step is active and FALSE if it is not This variable is implicitly declared and can be used in any action and transition of the SFC organization unit e Whether an IEC action is active or not can be interrogated with the help of variable lt ActionName gt x During the IEC action deactivation run this variable already holds a value FALSE e With IEC steps the implicit variable lt StepName gt t can be used to interrogate the active time of a step Interrogation works only if a minimum time was set in the step attributes for the step to be interrogated for example t 0ms SFC flags SFC flags are for step control and must be globally or locally declared Flag variables and their properties SFCEnableLimit This
396. vidual light phases will be assigned to the traffic lights i e the red light will be on during the red and amber red phases the amber light will be on during the amber and amber red phases etc WAIT In the organization unit WAIT a simple timer will be programmed to receive as input the phase duration in milliseconds and to return an output TRUE as soon as the time has expired PLC_PRG The organization unit PLC_PRG links the organization units with each other so that the traffic light emits the correct colour at the correct time and for the specified time It processes the entire project during the cyclical task 3 2 5 The organization unit TRAFFICLIGHT 7 To edit the organization unit TRAFFICLIGHT activate its editor window by selecting Object Organizer tab Organization units and double clicking TRAFFICLIGHT 3 2 5 1 Declaration 8 In the declaration editor declare as input variable between the keywords VAR_INPUT and END VAR a variable named STATE of type INT as output variables between the keywords VAR_ OUTPUT and END VAR the variables RED AMBER GREEN and OFF of type BOOL Lenze DDS EN 2 3 3 3 Show Hide Bookmarks efesotomasyon com Lenze 3 2 5 2 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 1 FALSE FALSE
397. 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 Menu Insert gt Bitmap Keyboard Bitmap Use this command to insert a graphic that must be in a bitmap bmp or tagged image file format tif as an element into your current visualization Command selection turns the mouse pointer into the associated icon in the editor window 1 In the editor window mark the area for the graphic keeping the left mouse key depressed 2 Select the graphic file to be inserted from the dialog box Open Visualization Menu Insert Visualization Keyboard Use this command to insert an existing visualization into your current visualization Command selection turns the mouse pointer into the associated icon in the editor window An inserted visualization is called a reference 1 In the editor window mark the area for the visualization keeping the left mouse key depressed 2 In the dialog box Select visualization select the visualization to be inserted Button Icon Menu Insert Button Keyboard og MMS e Use this command to insert a blank button into your current visualization The button will visualize any toggle variables configured for a button 1 Size the element as required keeping the left mouse key depre
398. visualizations or global variables of the library selected in the upper pane e Folders are opened or closed with a double click or by pressing lt Enter gt e A plus sign in front of the closed folder icon indicates that this folder contains objects and or other folders A click on the plus sign opens the folder and shows all subordinate objects A minus sign now replaces the plus sign o A click on the minus sign closes the folder again Oo eg nemete OO Declaration graphic representation of an organization unit If an organization unit is selected by mouse click or arrow keys the upper right hand pane of the Library Manager will display the declaration of the organization unit and the lower right hand pane the graphic representation as black box with inputs and outputs DDS EN 2 3 8 41 Show Hide Bookmarks efesotomasyon com Lenze 8 11 1 1 8 11 1 2 8 42 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 Insert library Menu Insert Additional Libraries Keyboard lt insert gt Use this command to link another library to your project Selection of the command opens the dialog box Open e Select the required file extension lib
399. w compile the program and test it ina simulation Extending the program with an alternative branch To include at least one alternative branch in our chart so that we can turn the traffic lights off over night we will include a counter to deactivate the system after a specific number of traffic light cycles Firstly we will need a new variable COUNTER of type INT 41 To edit the organization unit PLC_PRG activate its editor window by selecting Object Organizer tab Organization units and double clicking PLC_PRG 42 Use the declaration editor to declare as local variable between the keywords VAR and END VAR the variable COUNTER of type INT 43 Initialize the variable COUNTER in the step Init with O Step Actions Status ioti LIGHT1 STATE 3 LIGHT2 STATE 3 0 COUNTER DDS EN 2 3 3 11 Show Hide Bookmarks efesotomasyon com Lenze Drive PLC Developer Studio Program example 44 Select the transition after CHANGE1 and then Insert gt Step transition after to insert a step transition WI PLC_PRG PRG SFC Jol ES D001 FROGRAM PLC_PRG 4 45 Select the newly new created transition and then Insert gt Alternative branch left to insert an alternative branch to the left of it PLC_PRG PRG SFC Pile ES 0001 PROGRAM PLC_PRG 4 46 Select the left transition and then Insert Step transition after to insert a step transition 47 Select the newly new created transition and the
400. wing information into the archive I Referenced Libraries Details I Compile Information Details 7 INI File I Log File Bitmap Files Details MV Registry Entries I Symbol Files Details MW Configuration Files Details MV Target Files Details FEE I Local Gateway Details Other Files Comment Mail Cancel 5 If you have ticked the items save the archive Include the following information into the archive Apart from the procedure described the ZIP archive can also be used in general A category must be selected with Y Category Relevant files Project file lt project name gt pro the DDS project file Referenced libraries lib obj hex libraries and if necessary the associated obj and hex files Compile information ci information specific to the last compile ri information specific to the last download lt temp gt temporary compilation and download files also for simulation Nii Log file log project log file Bitmap files bmp bitmaps used in project organization units and visualizations Registry entries Registry reg entries for Automation Alliance gateway and PLC sdb sym icon information generated from the project Configuration files PLC configuration files configuration files device master files icons etc e g cfg con eds dib ico Target files trg binary format target files for all installed targets txt
401. work 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 gt Network after Insert gt Network before 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 It is now possible to enter a label followed by a colon Network comments Every network can be commented in several lines To distinguish them from program text comments are shown in grey Options for network comments Menu Extras Options Keyboard Use this command to define the following options for network comments Maximum comment size Use the field Maximum comment size to define the maximum number of lines to be available fora network comment preset 4 Minimum comment size Use the field Minimum comment size to define the number of lines to be generally available for comments preset 0 e lf this field specifies 2 for example every network will start with two blank comment lines after the label line The lower the value the more networks can be displayed on screen e lf the minimum comment size is greater than 0 click the associated comment line to enter a comment e fthe minimum comment size is 0 first select the network to be commented and then click Insert gt Comment to insert a co
402. written again immediately Call hierarchy Menu Online Show Call Stack Keyboard If simulation stops at a breakpoint use thiscommand to open a dialog box that lists the organization units currently in the call stack Callstack Ed Aktion Init 4 TRAFFICLIGHT 1 e The first organization unit is always PLC_PRG as this is where processing starts e The last organization unit is always the organization unit that is currently being processed Select an organization unit and click Go to to load the selected organization unit into a window and to display the line or network that is currently processed Simulation Menu Online Simulation Keyboard Selection of Simulation puts a tick v in front of the menu item In simulation mode the user program will run under Windows on the same PC Simulation tests the project Communication between PC and simulation uses the Windows Message Mechanism If the program is not in simulation mode it will run on the control Communication between PC and control uses a gateway The status of this flag is stored with the project Restrictions for simulation If all tasks are to be considered during simulation adapt the interval times accordingly The following projects are restricted during simulation or cannot be simulated e Lenze function blocks e System organization units Communication parameters Menu Online Communication parameters Keyboard Use this command
403. y of E2 Releasing the left mouse key automatically creates a connection with the topmost unassigned input of E2 If the box E2 has no unassigned input but is an operator that can be extended by one input a new input will be created automatically Use method 1 2 or 4 to connect the output and input of a box feedback Connecting two pins Left click a pin and keep the key depressed Drag the mouse to the required pin and release the mouse key Tip Make sure not to accidentally leave the editor window during dragging as this will lead to screen scrolling Simple data types are type checked during connection Incompatible types cannot be connected Changing connections A connection between the output of E1 and the input of E2 can be easily changed into a connection between the output of E1 and the input of E3 Deleting connections There are several possibilities to delete a connection between the output of element E1 and the input of element E2 e Select the output of E1 and press lt Del gt or execute command Edit gt Delete If the E1 output is connected to several inputs several connections will be deleted e Select the input of E2 and press lt Del gt or execute command Edit Delete e Select the E2 input keep the left mouse key depressed and follow the connection away from input E2 Release the mouse key in a free area to delete the connection DDS EN 2 3 7 49 Show Hide Bookmarks efesoto
404. yboard Use this command to paste the contents of the clipboard as serial contact behind the selected position e This command can only be used if the contents of the clipboard and the selected position are contact networks Paste below Icon Menu Extras Paste below Keyboard lt Ctrl gt lt U gt Use this command to paste the contents of the clipboard as parallel contact below the selected position e This command can only be used if the contents of the clipboard and the selected position are contact networks Paste above Icon Menu Extras gt Paste above Keyboard Use this command to paste the contents of the clipboard as parallel contact above the selected position e This command can only be used if the contents of the clipboard and the selected position are contact networks A Menu Extras Negation Keyboard lt Ctrl gt lt N gt Use this command to negate a contact coil jump RETURN instruction or an input or output of an EN organization unit at the current cursor position e A slash appears between the parentheses of a coil or the straight lines of a contact or l l e Asinthe FBD editor jumps returns inputs and outputs of EN organization units are identified with a small circle in the connection The coil now writes the negated value of the input connection to the associated Boolean variable e Anegated contact switches the status of the input to the output exactly when the associated Boolean
405. yon com Lenze Drive PLC Developer Studio Editors Macros Icon Menu Edit gt Macros Keyboard This menu item lists all macros agreed for the current project New macros can be created under Project gt Options 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 The message window will show a message that will be logged in online mode Macro canceled Macros may be processed both online and offline Only the commands available in the respective mode will be executed DDS EN 2 3 7 9 Show Hide Bookmarks efesotomasyon com Lenze 7 2 7 10 Drive PLC Developer Studio Editors Declaration editor The declaration editor is used to declare variables of organization units and global variables fordata 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 lt Insert gt to toggle between overwrite and insert modes W PLC_PRG PRG SFC Ela x DODIPROGRAM PLO_PRG LIGHT1 TRAFFICLIGHT LIGHT2 TRAFFICLIGHT WAIT AWAIT WAIT BOOL t BOOL COUNTER INT LIGHTOFF BOOL LIGHT BOOL OK BOOL OOIZIEND VAR nl e Variable declaration is supported by the use of various co
406. zation 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 For this reason vAR_IN OUT variables of a function block can not be read directly from outside via Function block instance Input output variable Example VAR_IN OUT inoutl INT 1 input output variable END VAR Local variables Between the keywords VAR and END VAR all local variables of an organization unit are declared e Local variables have no connection to the outside i e they cannot be written from outside Example VAR loc1 INT 1 local variable END VAR Retentive variables Retentive variables may retain their value beyond the standard program runtime Retentive variables include Retain variables and persistent variables Retain variables All retain variables of an organization unit are declared between the keywords VAR Retain and END VAR e Retain variables retain their values after a control disconnect or after a reset When the program is restarted the stored values are used for further processing e n two cases the retain variables are reset to their initialization values With a program download In online mode with the menu commands Online Reset cold and Online Reset bootstrap Persistent variables Persistent variables are stored in the persistent
Download Pdf Manuals
Related Search
Related Contents
Article Artema Hybrid - EC Cash Direkt Cisco Systems OL-15491-01 User's Manual UniOP eTOP312 - Controller Service and Sales Agilent 4284A プレシジョンLCRメータ 20 Hz-1 MHz DFF1 Operator`s Manual Polk Audio TL1 FujiFilm 106-8620 Digital Camera User Manual Copyright © All rights reserved.
Failed to retrieve file