NORD BU0550 User Manual

NORDAC SK 200E Manual Safety information
GB
BU 0550
for NORD SK 54xE frequency inverters
BU 0550 GB-0813 1
PLC logic for NORD SK 54xE frequency inverters Safety information
N O R D Frequency inverters
Safety and operating instructions for
drive power converters
(as per: Low Voltage Directive 2006/95/EEC )
1. General Depending on their protection class, drive power converters may
have live, bare, moving or rotating parts or hot surfaces during operation.
Unauthorised removal of covers, improper use, incorrect installation or operation causes a risk of serious personal injury or material damage.
Further information can be found in this documentation. All transportation, installation, initialisation and maintenance work
must be carried out by qualified personnel (compliant with IEC 364, CENELEC HD 384, DIN VDE 0100, IEC 664 or DIN VDE 0110, and national accident prevention regulations).
For the purposes of these basic safety instructions, qualified personnel are persons who are familiar with the assembly, installation, commissioning and operation of this product and who have the relevant qualifications for their work.
2. Proper use in Europe
Drive power converters are components intended for installation in electrical systems or machines.
When installed in machines, the drive power converter cannot be commissioned (i.e. commencement of the proper use) until it has been ensured that the machine meets the provisions of the EC Directive 2006/42/EEC (Machine Directive); EN 60204 must also be complied with.
Commissioning (i.e. implementation of the proper use) is only permitted if the EMC Directive (2004/108/EEC) is complied with.
Drive power converters with the CE mark meet the requirements of the Low Voltage Directive 2006/95/EEC. The harmonized standards stated in the Declaration of Conformity are used for the drive power converters.
Technical data and information for connection conditions can be found on the rating plate and in the documentation, and must be complied with.
The drive power converters may only be used for the safety functions which are described and for which they have been explicitly approved.
3. Transport, storage
Information regarding transport, storage and correct handling must be complied with.
4. Installation
The installation and cooling of the equipment must be implemented according to the regulations in the corresponding documentation.
The drive power converters must be protected against impermissible loads. Especially during transport and handling, components must not be deformed and/or insulation distances must not be changed. Touching of electronic components and contacts must be avoided.
Drive power converters have electrostatically sensitive components, which can be easily damaged by incorrect handling. Electrical components must not be mechanically damaged or destroyed (this may cause a health hazard!).
5. Electrical connections
When working on live drive power converters, the applicable national accident prevention regulations must be complied with (e.g. VBG A3, formerly VBG 4).
The electrical installation must be implemented according to the applicable regulations (e.g. cable cross-section, fuses, ground lead connections). Further information is contained in the documentation.
Information about EMC-compliant installation – such as shielding, earthing, location of filters and installation of cables can be found in the drive power converter documentation. These instructions must be complied with even with CE marked drive power converters. Compliance with the limiting values specified in the EMC regulations is the responsibility of the manufacturer of the system or machine.
6. Operation
Where necessary, systems where drive power converters are installed must be equipped with additional monitoring and protective equipment according to the applicable safety requirements, e.g. legislation concerning technical equipment, accident prevention regulations, etc.
The parameterisation and configuration of the drive power converter must be selected so that no hazards can occur.
All covers must be kept closed during operation.
7. Maintenance and repairs
After the drive power converter is disconnected from the power supply, live equipment components and power connections should not be touched immediately, because of possible charged capacitors. Observe the relevant information signs located on the drive power converter.
Further information can be found in this documentation.
These safety instructions must be kept in a safe place!
2 BU 0550 GB-0813
NORDAC SK 200E Manual Safety information
BU 0550 GB-0813 3
PLC logic for NORD SK 54xE frequency inverters Concerning this document
Designation of previous issues
Software Version
Comments
BU 0550 GB, September 2011 Part No. 607 5501 / 3911
V 2.0 R0
First issue
BU 0550 GB, October 2011 Part No. 607 5501 / 4211
V 2.0 R1
Correction of errors / Change of function of the operators ANDN / ORN / XORN
BU 0550 GB, February 2013 Part No. 607 5501 / 0813
V 2.1 R0
The following PLC modules have been added: MC_Control, FB_Capture, FB_Read, FB_Write, FB_Weigh
For some MCs the BUSY output was updated. The process values 35 to 36, 62 to 66 and 141 to 147 have
been added. Functional extension in the section "jump marks" Command "SQR" renamed as "SQRT" The input RAMONLY is new in MC_WriteParameter16/32 The input MODE is new in MC_Home Names for process values corrected Number of PLC errors increased to 16 Addressing possibilities for PDO improved Example program supplemented
NOTE
This supplementary operating manual is only valid in conjunction with the operating manual supplied for the respective frequency inverter (Manual BU0500).
Documentation
Designation: BU 0550 GB Part No.: 607 55 01 Device series: SK 540E, SK 545E
Version list
Publisher
Getriebebau NORD GmbH & Co. KG
Rudolf-Diesel-Str. 1 D-22941 Bargteheide http://www.nord.com/ Tel.: +49 (0) 45 32 / 289-0 Fax +49 (0) 45 32 / 289-2555
4 BU 0550 GB-0813
PLC logic for NORD SK 54xE frequency inverters Concerning this document
Intended use of the frequency inverter
Compliance with the operating instructions is essential for fault-free operation and the
acceptance of any warranty claims. These operating instructions must be read before working with the device!
These operating instructions contain important information about servicing. They must therefore be kept close to the device.
NORD frequency inverters are devices for industrial an commercial systems used for the operation of three-phase asynchronous motors with squirrel-cage rotors and Permanent Magnet Synchronous Motors – PMSM (SK 54xE and above) These motors must be suitable for operation with frequency inverters, other loads must not be connected to the devices.
SK 5xxE frequency inverters are devices for stationary installation in control cabinets. All details regarding technical data and permissible conditions at the installation site must be complied with.
Commissioning (commencement of the intended use) is not permitteduntil it has been ensured that the machine complies with the EMC Directive 2004/108/EEC and that the conformity of the end product meets the Machinery Directive 2006/42/EEC (observe EN 60204).
Getriebebau NORD GmbH & Co. KG, 2013
BU 0550 GB-0813 5
PLC logic for NORD SK 54xE frequency inverters Concerning this document
6 BU 0550 GB-0813
Table of Contents
1 GENERAL INFORMATION ...................................................................................................... 9
1.1 Specification of the PLC ....................................................................................... 9
1.2 PLC structure ........................................................................................................ 9
1.2.1 Memory ..................................................................................................................... 9
1.2.2 Process image ........................................................................................................ 10
1.2.3 Program Task ......................................................................................................... 10
1.2.4 Setpoint processing................................................................................................. 11
1.2.5 Data processing via accumulator ............................................................................ 11
1.3 Scope of functions .............................................................................................. 12
1.3.1 Motion Control Lib ................................................................................................... 12
1.3.2 Electronic gear with Flying Saw .............................................................................. 12
1.3.3 Visualisation ............................................................................................................ 12
1.3.4 Process controller ................................................................................................... 13
1.3.5 CANopen communication ....................................................................................... 13
2 CREATION OF PLC PROGRAMS ......................................................................................... 14
2.1 Loading, saving and printing .............................................................................. 14
2.2 Editor .................................................................................................................. 14
2.2.1 Variables and FB declaration .................................................................................. 15
2.2.2 Input window ........................................................................................................... 15
2.2.3 Watch and Breakpoint display window .................................................................... 16
2.2.4 PLC message window............................................................................................. 16
2.3 Load PLC program into the FI ............................................................................ 16
2.4 Debugging .......................................................................................................... 17
2.4.1 Observation points (Watchpoints) ........................................................................... 17
2.4.2 Holding points (Breakpoints) ................................................................................... 17
2.4.3 Single Step ................................................................ ................................ .............. 17
2.5 PLC configuration ............................................................................................... 18
2.6 PLC program start .............................................................................................. 18
2.7 Program example ............................................................................................... 19
3 AWL (INSTRUCTION LIST, IL) .............................................................................................. 20
3.1 General ............................................................................................................... 20
3.1.1 Data types ............................................................................................................... 20
3.1.2 Literal ...................................................................................................................... 20
3.1.3 Comments ................................................................ ................................ ............... 21
3.1.4 Jump marks ............................................................................................................ 21
3.1.5 Function call-ups ..................................................................................................... 22
3.1.6 Bit-wise access to variables .................................................................................... 22
3.2 Operators ............................................................................................................ 22
3.2.1 Loading and storage operators ............................................................................... 22
3.2.2 Arithmetical operators ............................................................................................. 24
3.2.3 Extended mathematical operators .......................................................................... 29
3.2.4 Bit Operations ......................................................................................................... 31
3.2.5 Comparison operators............................................................................................. 37
3.3 Jumps ................................................................................................................. 40
3.3.1 JMP ......................................................................................................................... 40
3.3.2 JMPC ...................................................................................................................... 40
3.3.3 JMPCN .................................................................................................................... 40
3.4 Type conversion ................................................................................................. 41
3.4.1 BYTE_TO_BOOL .................................................................................................... 41
3.4.2 BOOL_TO_BYTE .................................................................................................... 41
3.4.3 INT_TO_BYTE ........................................................................................................ 41
3.4.4 BYTE_TO_INT ........................................................................................................ 42
3.4.5 DINT_TO_INT ......................................................................................................... 42
3.4.6 INT_TO_DINT ......................................................................................................... 42
BU 0550 GB-0813 7
PLC logic for NORD SK 54xE frequency inverters
3.5 Function blocks .................................................................................................. 43
3.5.1 Standard ................................................................................................................. 43
3.5.2 Motion Control ........................................................................................................ 50
3.5.3 Electronic gear unit with "Flying Saw" ..................................................................... 60
3.5.4 FB_FunctionCurve .................................................................................................. 63
3.5.5 FB_PIDT1 ............................................................................................................... 64
3.5.6 Visualisation with ParameterBox ............................................................................ 66
3.5.7 CANopen ................................................................................................................ 69
3.5.8 Recording of rapid events (FB_Capture) ................................................................ 74
3.5.9 Access to memory areas of the frequency inverter ................................................. 75
3.5.10 Weighing function (FB_Weigh) ............................................................................. 77
4 FREQUENCY INVERTER DETAILS ..................................................................................... 78
4.1 Parameters ........................................................................................................ 78
4.1.1 Operating displays .................................................................................................. 78
4.1.2 Control / PLC parameters ....................................................................................... 78
4.1.3 Control terminals ................................................................................................ ..... 80
4.1.4 Extra functions ........................................................................................................ 83
4.1.5 Information parameters ........................................................................................... 85
4.2 Process values .................................................................................................. 87
4.2.1 Inputs and outputs .................................................................................................. 87
4.2.2 PLC setpoints and actual values............................................................................. 88
4.2.3 Bus setpoints and actual values ............................................................................. 89
4.2.4 ControlBox and ParameterBox ............................................................................... 90
4.2.5 Info parameters ....................................................................................................... 90
4.2.6 PLC error ................................................................................................................ 91
4.2.7 PLC parameter ....................................................................................................... 92
4.3 PLC Error messages ......................................................................................... 93
5 LISTS / INDEX ....................................................................................................................... 94
5.1 Abbreviations: .................................................................................................... 94
5.2 Figures ............................................................................................................... 95
5.3 Tables ................................................................................................................ 95
5.4 Keyword index ................................................................................................... 97
8 BU 0550 GB-0813
1 General information
NOTE
Programming and download into the frequency inverter is exclusively via the NORD software NORDCON.
Function
Specification
Standard
Orientated to IEC61131-3
Language
Instruction List ( IL )
Task
A cyclic task, program call-up every 5 ms
Computer performance
Approximately 200 AWL commands per 1 ms
Program memory
4032 Byte for flags, functions and the PLC program
Max. possible number of commands
approximately 1280 commands Attention! This is an average value. Heavy use of flags, process data and
functions considerably reduces the possible number of lines, see the "Resources" section
Freely accessible CAN mailboxes
20
Total memory
4032 Byte
Program memory Flag memory
Variables
Instances of
function commands
The NORD SK 54xE frequency inverter contains logic processing which is similar to the current IEC61131-3 standard for memory programmable control units (SPS / PLC). The reaction speed or computing power of this PLC is suitable to undertake smaller tasks in the area of the inverter. Inverter inputs or information from a connected field bus can be monitored, evaluated and further processed into appropriate setpoint values for the frequency inverter. In combination with other NORD devices, visualisation of system statuses or the input of special customer parameters is also possible. Therefore, within a limited range, there is a potential for savings via the elimination of a previous external PC solution.
AWL is supported as the programming language. AWL is a machine-orientated, text-based programming language whose scope and application is specified in IEC61131-3.
1.1 Specification of the PLC
1 General
Table 1PLC specification
1.2 PLC structure
1.2.1 Memory
The PLC memory is divided into the program memory and the flag memory. In addition to the variables, instances of function blocks are saved in the area of the flag memory. In instance is a memory area in which all internal input and output variables of function command are saved. Each function command declaration requires a separate instance. The boundary between the program memory and the flag memory is determined dynamically, depending on the size of the flag area.
Fig. 1 Memory structure
BU 0550 GB-0813 9
PLC logic for NORD SK 54xE frequency inverters
NOTE
If the blocks MC_Power, MC_Reset, MC_MoveVelocity, MC_Move…, MC_Home or MC_Stop are used, the process values "PLC_Control_Word" and "PLC_Set_Val1" to "PLC_Set_Val5" must not be used. Otherwise the values in the list of variables would always overwrite the changes to the function block.
Read in process
PLC program execution
Save process values
Start of cycle
End of cycle
In the flag memory, two different classes of variables are stored in the variable section: [VAR]
Memory variables for storage of auxiliary information and statuses. Variables of this type are initialised every time the PLC starts. The memory content is retained during the cyclic sequence of the PLC.
[VAR_ACCESS] These are used to read and describe process data (inputs, outputs, setpoints, etc.) of the frequency inverter.
These values are regenerated with every PLC cycle.
1.2.2 Process image
Several physical dimensions such as torque, speed, position, inputs, outputs etc. are available to the inverter. These dimensions are divided into actual and setpoint values. They can be loaded into the process image of the PLC and influenced by it. The required process values must be defined in the list of variables under the class VAR_ACCESS.
With each PLC cycle, all of the process data for the inverter which is defined in the list of variables is newly read in. At the end of each PLC cycle the writable process data is transferred back to the inverter. See the following diagram.
Fig. 2 Process image
Because of this sequence it is important to program a cyclic program sequence. Programming loops in order to wait for certain events (e.g. changes of input level) does not produce the required result.
This behaviour is different in the case of function blocks which access process values. Here, the process value is read on call-up of the function block and the process values are written immediately when the block is terminated.
1.2.3 Program Task
Execution of the program in the PLC is carried out as a single task. The task is called up cyclically every 5 ms and its maximum duration is 3 ms. If a longer program cannot be executed in this time, the program is interrupted and continued in the next 5 ms task.
10 BU 0550 GB-0813
1.2.4 Setpoint processing
CAN /CANopen
USS
TU3_xxx
Local
PLC
Cycle 5ms
P509 & P510[1]
Cycle 1 ms
P350
P350=0
P350=1
P351
Setpoint
The inverter has a variety of setpoint sources, which are ultimately linked via several parameters to form a frequency inverter setpoint.
1 General
Fig. 3 Generation of control word and main setpoints from a range of possible sources
If the PLC is activated (P350=1) preselection of setpoints from external sources (main setpoints) is carried out via P509 and P510[-01] Via P351, a final decision is made as to which setpoints from the PLC or values input via P509/P510[-01] are used. A mixture of both is also possible.
No changes to the auxiliary setpoints (P510[-02]) are associated with the PLC function. All auxiliary setpoint sources and the PLC transfer their auxiliary setpoint to the frequency inverter with equal priority.
1.2.5 Data processing via accumulator
The accumulator forms the central computing unit of the PLC. Almost all AWL commands only function in association with the accumulator. The NORD PLC has three accumulators. These are the 23 Bit Accumula­tor 1 and Accumulator 2 and the AE in BOOL format.
The AE is used for all boolean loading, storage and comparison operations. If a boolean value is loaded, it is displayed in the AE. Comparison operations transfer their results to the AE and conditional jumps are triggered by the AE.
Accumulator 1 and Accumulator 2 are used for all operands in the data format BYTE, INT and DINT. Accumulator 1 is the main accumulator and Accumulator 2 is only used for auxiliary functions. All loading and storage operands are handled by Accumulator 1. All arithmetic operands save their results in Accumulator 1. With each Load command, the contents of Accumulator 1 are moved to Accumulator 2. A subsequent operator can link the two accumulators together or evaluate them and save the result in Accumulator 1, which in the following will generally be referred to as the "accumulator".
BU 0550 GB-0813 11
PLC logic for NORD SK 54xE frequency inverters
1.3 Scope of functions
The PLC supports a wide range or operators, functions and standard function modules, which are defined in IEC1131-3. A detailed description can be found in the following sections (Sections 2.7 and 4)
Function blocks which are additionally supported are also explained (see Section 3.5 ).
1.3.1 Motion Control Lib
The Motion Control Lib is orientated to the PLCopen specification "Function blocks for motion control". This mainly contains function blocks which are used to move the drive. In addition, function blocks for reading and writing FI parameters are also provided.
1.3.2 Electronic gear with Flying Saw
The inverter is equipped with the functions electronic gear (synchronous operation in positioning mode) and Flying Saw. Via these functions the inverter can follow another drive unit with angular synchronism. Also, via the additional Flying Saw function it is possible to synchronize to the precise position of a moving drive. The electronic gear mode can be started and terminated at any time. This enables a combination of conventional
position control with its move commands and gear unit functions. For the gear function a NORD frequency inverter with internal CAN bus is required on the master axis.
1.3.3 Visualisation
Visualisation of the operating status and the parameterisation of the frequency inverter is possible with the aid of a ControlBox or a ParameterBox.
Alternatively, the CANopen Master functionality of the PLC CAN bus panel can be used to display information.
1.3.3.1 ControlBox
The simplest version for visualisation is the ControlBox. The 4-digit display and the keyboard status can be accessed via two process values. This enables simple HMI applications to be implemented very quickly.
In order for the PLC to access the display, P001 must be set to "PLC-Ctrlbox Value". A further special feature is that the parameter menu is no longer accessed via the arrow keys. Instead, the "On" and "Enter" keys must be pressed simultaneously.
1.3.3.2 ParameterBox
In visualisation mode, each of the 80 characters in the P-Box display (4 rows of 20 characters) can be set via the PLC. It is possible to transfer both numbers and texts. In addition. keyboard entries on the P-Box can be processed by the PLC. This enable the implementation of more complex HMI functions (display of actual values, change of window, transfer or setpoints etc.). Access to the P-Box display is via function blocks in the PLC.
Visualisation is via the operating value display of the ParameterBox. The content of the operating value display is set via the P-Box parameter P1003. This parameter can be found under the main menu item "Display". P1003 must be set to the value "PLC display". After this, the operating value display can be selected again by means of the right and left arrow keys. The display controlled by the PLC is then shown. This setting remains in effect even after a further switch-on.
12 BU 0550 GB-0813
1.3.4 Process controller
The process controller is a PID-T1 controller with a limited output size. With the aid of this function module in the PLC it is possible to simply set up complex control functions, by means of which various processes, e.g. pressure regulation can be implemented in a considerably more elegant manner than with the commonly used two-point controllers.
1.3.5 CANopen communication
In addition to the standard communication channels, the PLC provides further possibilities for communication. Via the internal CAN bus of the inverter (connection via the RJ45 sockets), it can set up additional communications with other devices. The protocol which is used for this is CANopen. Communications are restricted to PDO data transfer and NMT commands. The standard CANopen inverter communication via SDO, PDO1, PDO2 and Broadcast remains unaffected by this PLC function.
PDO (Process Data Objects)
Other frequency inverters can be controlled and monitored via PDO. However, it is also possible to connect devices from other manufacturers to the PLC. These may be IO modules, CANopen encoders, or panels etc. With this, the number of inputs and outputs of the frequency inverter can be extended at will. Analog outputs would then also be possible.
NMT (Network Management Objects)
All CANopen devices must be set to the CANopen bus state "Operational" by the bus master. PDO communication is only possible in this bus state. If there is no bus master in the CANopen bus, this must be performed by the PLC. The function module FB_NMT is available for this purpose.
1 General
BU 0550 GB-0813 13
PLC logic for NORD SK 54xE frequency inverters
Input window Variables and FB
declaration
Watch and Breakpoint display window
PLC message window
2 Creation of PLC programs
Creation of PLC programs is carried out exclusively via the PC program NORDCON. The PLC editor is opened either via the menu item "File/New/PLC program" or via the symbol . This button is only active if
a frequency inverter with PLC functionality forms the focus of the device overview.
2.1 Loading, saving and printing
The functions Load, Save and Print are carried out via the appropriate entries in the main menu or in the symbol bars.
When opening, it is advisable to set the data type to "PLC Program" (*.awl / *.awlx) in the Windows dialog. With this, only files which can be read by the PLC editor are displayed.
If the PLC program which is created is to be saved, the Windows window of the PLC editor must be active. The PLC program is saved by actuating "Save" or "Save as". With the operation "Save as", this can also be recognised by the data type (540E PLC (*.awlx)).
The appropriate PLC window must be active in order to print the PLC program. Printout is then started via "File/Print" or the appropriate symbol.
2.2 Editor
The PLC Editor is divided into four different windows.
Fig. 4 PLC Editor
The individual windows are described in more detail in the following sections.
14 BU 0550 GB-0813
2 Creation of PLC programs
2.2.1 Variables and FB declaration
All the variables, process values and function blocks which are required by the program are declared in this window.
Fig. 5 Declaration window
Variables Variables are set up by setting the class "VAR". The Name of the variable can be freely selected. In the Type field, a selection can be made between BOOL, BYTE, INT and DINT. A start initialisation for the variables can be entered under Init-. Value.
Process values These can be set up by selecting the entry "VAR_ACCESS" under Class. The Name cannot be freely selected and the field Init. Value is barred for this type.
Function modules The entry "VAR" is selected under Class. The Name for the relevant instance of the function module (FB) can be freely selected. The required is selected under Type. An Init. Value cannot be set for the FB.
All menu items which concern the variable window can be called up via the context menu (right mouse button). Via this, entries can be added and deleted. Variables and process variables for monitoring (Watchdog function) or debugging (Breakpoint) can be activated.
2.2.2 Input window
The input window is used to enter the program and to display the AWL program. It is provided with the following functions:
Syntax highlighting Bookmarks Declaration of variables Debugging
Syntax highlighting If the command and the assigned variable are recognised by the Editor, the command is displayed in blue and the variable in black. As long as this is not the case, the display in in thin black italics.
Bookmarks As programs in the Editor can have a considerable length, it is possible to mark and jump to important points in the program via the Bookmarks function. The cursor must be located in the relevant line in order to mark it. Via the menu item "Switch bookmark" (right mouse button menu) the line is marked with the required bookmark. The bookmark is accessed via the menu item "Go to bookmark".
Declaration of variables New variables can be declared via the Editor by means of the editor menu "Add variable" (right mouse button).
BU 0550 GB-0813 15
PLC logic for NORD SK 54xE frequency inverters
Debugging The positions of the Break and Watchpoints for the Debugging function are specified in the Editor. This can be done via the menu items "Switch breakpoint" (Breakpoints) and "Switch monitoring point" (Watchpoints). The position of Breakpoints can also be specified by clicking on the left border of the Editor window.
Variables and process values which are to be read out from the frequency inverter during debugging must be marked. This can be done in the Editor via the menu items "Debug variable" and "Watch variable". For this, the relevant variable must be marked before the required menu item is selected.
2.2.3 Watch and Breakpoint display window
This window has two tabs, which are explained below. Holding points
This window displays all the breakpoints and watchpoints which have been set. These can be switched on and off via the checkboxes and deleted with the "Delete key". A corresponding menu can be called up with the right mouse button.
Observation list This displays all the variables which have been selected for observation. Their actual value is displayed in the Value column. The display format can be selected via the Display column.
2.2.4 PLC message window
All PLC status and error messages are entered in this window. In case of a correctly translated program the message "Translated without error" is displayed. The use of resources is shown on the line below this. In case of errors in the PLC program, the message "Error X" is displayed. The number of errors is shown in X. The following lines show the specific error message in the format:
[ Line number]: Error description
2.3 Load PLC program into the FI
In order for a program to be loaded into the FI the PLC window must be online and the program translated without errors.
The PLC window is online if the PLC window is shown in the tree diagram of the FI (54xE). See following picture.
Fig. 6 NORDCON overview window
This is achieved if the PLC window is opened via the PLC symbol . If a PLC program is opened in the offline window, a device can be assigned to the PLC program via the
menu item "PLC -> Link". The PLC program can be reset to offline mode with the menu item "PLC -> Detach".
The PLC program is loaded into the FI via the symbol and is saved immediately. After this, the program can be started in the frequency inverter via the symbol.
16 BU 0550 GB-0813
2 Creation of PLC programs
2.4 Debugging
As programs only rarely function the very first time, the NORD PLC provides several possibilities for finding faults. These possibilities can be roughly divided into two categories, which are described in detail below.
2.4.1 Observation points (Watchpoints)
The simplest debugging variant is the Watchpoint function. This provides a rapid overview of the behaviour of several variables. For this, an observation point is set at an arbitrary point in the program. When the PLC executes this program line, up to 5 values are saved and displayed in the observation list ("Holding point" window). The 5 values to be observed can be selected via the context menu (right mouse button) in the input window or the variable window.
2.4.2 Holding points (Breakpoints)
Via holding points it is possible to deliberately stop the PLC program at a specific line of the program. If the PLC runs into a holding point, the AE, Accumulator 1 and Accumulator 2 are read out, together with all the variables which have been selected under the menu item "Debug variables" (right mouse menu).
Up to 5 Breakpoints can be set in a PLC program. This function is started via the symbol. The program now runs until a holding point is triggered. Further
actuation of the symbol bar allows the program to continue running until it reaches the next holding point.
If the program is to continue running, the symbol is actuated.
2.4.3 Single Step
With this debugging method it is possible to execute the PLC program line for line. With each individual step, all the selected variables are read out of the FI PLC and displayed in the "Observation list" window. The values to be observed can be selected in the input window or the variable window by means of the right mouse button menu.
The prerequisite for debugging in single steps is that at least one holding point (see Section 2.4.2) has been set before debugging is started. The debugging mode is switched on by actuating the symbol. It is only possible to debug the program in single steps via the symbol after the program has run into the first
holding point. Some command lines contain several individual commands. Because of this it is possible that two or more
individual steps must be executed before the step indicator moves forward in the input window. The actual position is shown by a small arrow in the left PLC Editor window.
When the symbol is actuated, the program continues running until the next holding point.
If the program is to continue running, the symbol is actuated.
BU 0550 GB-0813 17
PLC logic for NORD SK 54xE frequency inverters
2.5 PLC configuration
The PLC configuration dialogue is opened via the symbol. Here, basic settings for the PLC can be made, which are described in further detail below.
Cycle time monitoring
This function monitors the maximum processing time for a PLC cycle. With this, unintended continuous program loops in the PLC program can be caught. The time can be set in 5ms steps up to a maximum of 1 second. Error 22.4 is triggered in the frequency inverter if this time is exceeded.
Allow ParameterBox function module
This option must be activated (see Section 3.5.6) if visualisation via the ParameterBox is to be carried out in the PLC program. Otherwise, the relevant function blocks generate a Compiler error when the frequency inverter is started.
Invalid control data
The PLC can evaluate control words which are received from the possible bus systems. However, the control words can only get through if the bit "PZD valid" (Bit 10) is set. This option must be activated if control words which are not compliant with the USS protocol are to be evaluated by the PLC. Bit 10 in the first word is then no longer queried.
Warm start after error
When the PLC starts, all variables are always loaded with "0" or their initialisation value. It does not matter whether the start is performed after a stop, a program download or a PLC error.
With the option "Warm start after error the content of the variables is not changed for a warm start. A warm start is performed after a PLC Stop command or a PLC error.
Do not pause the system time at holding point
The system time is paused during debugging if the PLC is in the holding point or in single step mode. The system time forms the basis for all timers in the PLC.
This function must be activated if the system time is to continue running during debugging.
2.6 PLC program start
Execution of a PLC program in the frequency inverter can be started in several ways:
NORDCON: Activation of the symbol in the menu bar.  Parameter P350 setting 1 "On" - The program starts immediately after the control board of the
frequency inverter becomes ready for operation - e.g after the power supply is switched on.
In case of interruptions of the program by P420/P480 [-xx] setting 80 "PLC Stop": by resetting the
input.
18 BU 0550 GB-0813
3 AWL (Instruction List, IL)
Parameter P350 = 1
Control of the FI via PLC
Parameter P351 = 0
Control work and main setpoint from the PLC
Parameter P553[-01] = 1
The PLC setpoint 1 is defined as the setpoint frequency
_5_State_digital_input
Status of the digital inputs
_7_Analog_input1
Value of analog input 1
_21_PLC_set_val1
PLC – setpoint 1
Run
Instance of the Motion Control module "MC_Power" (name freely selectable)
Command
Meaning
Example
LD _5_State_digital_input.0
Reads the status of the digital inputs and loads the
value of digital input 1 into the accumulator
Digital input 1: high Accumula­tor = 1
ST Run.Enable
Saves the value from the accumulator in the Mo-
tion Control block called up by the variable Run as the value for Enable.
Enable = 1
LD _7_Analog_input1
Reads the value of analog input 1 (Standardisation:
10 V = 1000) and loads it into the accumulator
AIn1 = 2.5 V accumulator = 250
SUB int#500
Subtracts the integer value 500 from the accumu-
lator (shifts the 0-point from 0 to 5 V)
250 - 500 = Accumulator = - 250
MUL int#32
Multiplies the integer value 32 with the accumula-
tor value ( Standardisation of the setpoint to the value range of the FI (100 % = 4000
hex
16000
dec
).
-250 * 32 = Accumulator = - 8000
dec
ST _21_PLC_set_val1
Saves the accumulator in the process variable
PLC-setpoint1.
-8000
dec
setpoint - 50 %
(Setpoint 50 % of the maximum frequency in the direction of rota­tion to the left)
Cal Run
The Motion Control function module for setting the
output stage of the inverter is executed
Output stage is enabled.
2.7 Program example
1. Comment to program function and the outline conditions for the program e.g parameterise inverter for PLC control (the parameterisation must be carried out in the inverter.):
2. Definition of the variables and process values used in the PLC
3. Program sequence
BU 0550 GB-0813 19
PLC logic for NORD SK 54xE frequency inverters
Name
Required memory space
Value range
BOOL
1 bit
0 to 1
BYTE
1 Byte
0 to 255
INT
2 Byte
-32768 to 32767
DINT
4 Byte
-2,147,483,648 to 2,147,483,647
LABEL_ADDRESS
2 Byte
Jump marks
Literal
Example
Number displayed in decimal
BOOL
FALSE
0
TRUE
1
BOOL#0
0
BOOL#1
1
Dual (Base 2)
2#01011111
95
2#0011_0011
51
BYTE#2#00001111
15
BYTE#2#0001_1111
31
Octal (Base 8)
8#0571
377
8#05_71
377
BYTE#8#10
8
BYTE#8#111
73
BYTE#8#1_11
73
Hexadecimal (Base 16)
16#FFFF
-1
16#0001_FFFF
131071
INT#16#1000
4096
DINT#16#0010_2030
1056816
Integer (Base 10)
10
10
-10
-10
10_000
10000
INT#12
12
DINT#-100000
-100000
Time
TIME#10s50ms
10.050 seconds
T#5s500ms
5.5 seconds
TIME#5.2s
5.2 seconds
TIME#5D10H15M
5 days + 10 hours + 15 minutes
T#1D2H30M20S
1 day + 2 hours + 30 minutes + 20 seconds
3 AWL (Instruction List, IL)
3.1 General
3.1.1 Data types
The PLC supports the data types listed below.
Table 2 Data types
3.1.2 Literal
For greater clarity it is possible to enter constants for all data types in various display formats. The following table gives an overview of all possible variants.
Table 3 Numeric literals
20 BU 0550 GB-0813
3 AWL (Instruction List, IL)
3.1.3 Comments
It is advisable to provide the sections of the program with comments in order to make the PLC program understandable at a later date. In the application program these comments are marked by starting with the character sequence "(*" and finishing with "*)" as shown in the following examples. These comments are not communicated to the frequency inverter.
(* Comment about a program block *)
LD 100 (* Comment about a command *) ADD 20
3.1.4 Jump marks
Entire sections of the program can be skipped with the aid of the operators JMP, JMPC or JMPCN (see Section 3.3). A jump mark is given as the target address. With the exception of umlaut characters and "ß" they may contain all letters, the numbers 0 to 9 and underscores. Other characters are not permitted. The jump mark is terminated with a colon. This may stand on its own. There may also be further commands after in the same line after the jump mark.
Possible variants may appear as follows
Jump mark: LD 20
This_is_a_jump_mark: ADD 10
MainLoop: LD 1000
A further variant is the transfer of a jump mark as a variable. This variable must be defined as type LABLE_ADDRESS in the variable table, then this can be loaded into the variable 'jump marks'. With this, a status machine can be created very simply, see below
JMP Address_Var
Address_1:
LD Address_2 ST Address_Var JMP End
Address_2:
LD Address_3 ST Address_Var JMP End
Address_3:
LD Address_1 ST Address_Var
End:
BU 0550 GB-0813 21
PLC logic for NORD SK 54xE frequency inverters
Command
Meaning
LD Var1.0
Loads Bit 0 of Var1 into the AE
ST Var1.7
Stores the AE on Bit 7 of Var1
EQ Var1.4
Compares the AE with Bit 4 of Var1
Operator
Explanation
LD
Load
LDN
Load negated (BOOL)
ST
Memory
STN
Memory negated (BOOL)
3.1.5 Function call-ups
At present, the Editor only supports the following list form for function call-ups. The function CTD is called up via the instance I_CTD. The results are saved in variables. The meaning of the functions used below is described in further detail later in the manual.
LD 10000 ST I_CTD.PV LD LoadNewVar ST I_CTD.LD LD TRUE ST I_CTD.CD CAL I_CTD LD I_CTD.Q ST ResultVar LD I_CTD.CV ST CurrentCountVar
3.1.6 Bit-wise access to variables
A simplified form is possible for access to a bit from a variable or a process variable.
Table 4 Bit-wise access to variables
3.2 Operators
3.2.1 Loading and storage operators
Table 5 Overview of loading and storage operations
22 BU 0550 GB-0813
BOOL
BYTE
INT
DINT
Possible data types
X X X
X
Commands
Explanation
LD 10
Loads 10 as BYTE
LD -1000
Loads -1000 as BYTE
LD Value1
Loads variable Value 1
BOOL
BYTE
INT
DINT
Possible data types
X
Commands
Explanation
LDN Value1
Value1 = TRUE AE = FALSE
ST Value2
Save to Value2 = FALSE
BOOL
BYTE
INT
DINT
Possible data types
X X X
X
Commands
Explanation
LD 100
Loads the value 100
ST Value2
Accumulator content 100 is saved in Value1
BOOL
BYTE
INT
DINT
Possible data types
X
Commands
Explanation
LD Value1
Value1 = TRUE AE = TRUE
STN Value2
Save to Value2 = FALSE
3.2.1.1 LD
Loads a constant or a variable into the AE or into the accumulator
Table 6 LD
3.2.1.2 LDN
Loads the negative value of a boolean variable into the AE
3 AWL (Instruction List, IL)
Table 7 LDN
3.2.1.3 ST
Saves the content of the AE or accumulator to a variable. The variable to be saved must match the previously loaded and processed data type.
Table 8 ST
3.2.1.4 STN
Saves the content of the AE to a variable and negates it. The variable to be saved must match the previously loaded and processed data type.
Table 9 STN
BU 0550 GB-0813 23
PLC logic for NORD SK 54xE frequency inverters
Operator
Explanation
ABS
Absolute value
ADD
Addition
DIV
Division
LIMIT
Limiter
MAX
Determines the larger of two numbers
MIN
Determines the lesser of two numbers
MUX
Multiplexer
MOD
Modulus operation
MUL
Multiplication
SUB
Subtraction
NOTE
Some of the following operators may also contain further commands. These must be placed in brackets behind the operator
It must be noted that a space must be included behind the opened bracket. The closing bracket must be placed on a separate line of the program.
LD Var1 ADD( Var2
SUB Var3 )
BOOL
BYTE
INT
DINT
Possible data types
X
X
Commands
Explanation
LD -10
Loads the value -10
ABS
Accu = 10
ST Value2
Saves the value 10 in Value1
3.2.2 Arithmetical operators
Table 10 Overview of arithmetical operators
3.2.2.1 ABS
Forms the absolute value from the Accumulator.
Table 11 ABS
24 BU 0550 GB-0813
3 AWL (Instruction List, IL)
BOOL
BYTE
INT
DINT
Possible data types
X X
X
Commands
Explanation
LD 10
ADD 204
Addition of two constants
LD 170
Addition of a constant and 2 variables.
ADD Var1, Var2
170
dec
+ Var1 + Var2
LD Var1
ADD( Var2
SUB Var3
Var1 + ( Var2 - Var3 )
)
BOOL
BYTE
INT
DINT
Possible data types
X X
X
Commands
Explanation
LD 10
DIV 2
Division of two constants
LD 170
Division of a constant and 2 variables.
DIV Var1, Var2
(170
dec
: Var1) : Var2
LD Var1
Divide Var1 by the contents of the brackets
DIV( Var2
Var1 : ( Var2 - Var3 )
SUB Var3
)
3.2.2.2 ADD and ADD(
Adds the variables and constants together with the correct prefixes. The first value for addition is in the AE/accumulator, the second is loaded with the ADD command or is inside the bracket. Several variables or constants can be added to the ADD command.
For bracket addition, the accumulator is added to the result of the expression in brackets. Up to 6 bracket levels are possible.
The values to be added must belong to the same type of variable.
Table 12 ADD and ADD(
3.2.2.3 DIV and DIV(
Divides the accumulator by the operands. For divisions by zero, the maximum possible result is entered into the accumulator, e.g. for a division with INT values, this is the value 0x7FFF or the value 0x8000 if the divisor is negative.
For bracket division, the accumulator is divided by the result of the expression in brackets. Up to 6 bracket levels are possible.
The values to be divided must belong to the same type of variable. the part of the result following the decimal point are cut off. If places after the decimal point are required, the
remainder from the division can be determined with the Modulus operation (MOD) and further calculation can be performed with this.
Table 13 DIV and DIV(
BU 0550 GB-0813 25
PLC logic for NORD SK 54xE frequency inverters
BOOL
BYTE
INT
DINT
Possible data types
X X
X
Commands
Explanation
LD 10
Loads the value 10 into the accumulator
LIMIT 20,30
The value is compared with the limits 20 and 30. The value in the accumulator is smaller, the accumulator is overwritten with 20
ST Value1
Saves the value 20 in Value1
BOOL
BYTE
INT
DINT
Possible data types
X X
X
Commands
Explanation
LD 100
Load 100 into the accumulator
MAX 200
Compare with the value 200
ST Value2
Save the value 200 in Value2 (because it is the larger value)
BOOL
BYTE
INT
DINT
Possible data types
X X
X
Commands
Explanation
LD 100
Load 100 into the accumulator
MIN 200
Compare with the value 200
ST Value2
Save the value 100 in Value2 (because it is the smaller value)
3.2.2.4 LIMIT
This command limits the value in the accumulator to transferred minimum and maximum values. If this is exceeded the maximum value in the accumulator is transferred and the minimum value is transferred if this is undershot. There is no effect if the value is within the limits.
Table 14 LIMIT
3.2.2.5 MAX
This command determines the maximum value of two variables or constants. For this, the current value of the accumulator is compared with the value transferred in the MAX command. After the command, the larger of the two values is in the accumulator.
Both values must belong to the same type of variable.
Table 15 MAX
3.2.2.6 MIN
This command determines the minimum value of two variables or constants. For this, the current value of the accumulator is compared with the value transferred in the MIN command. After the command, the smaller of the two values is in the accumulator.
Both values must belong to the same type of variable.
Table 16 MIN
26 BU 0550 GB-0813
3 AWL (Instruction List, IL)
BOOL
BYTE
INT
DINT
Possible data types
X X
X
Commands
Explanation
LD 1
Select the required element
MUX 10,20,30,40,Value1
MUX command with 4 constants and one variable
ST Value2
Save the value 20 in Value2
BOOL
BYTE
INT
DINT
Possible data types
X X
X
Commands
Explanation
LD 25
Load the dividends
MOD 20
Division 25/20 Modulus = 5
ST Var1
Save the result 5 in Var1
LD 25
Load the dividends
MOD( Var1
Result = 25/(Var1 + 10) Modulus in the accumulator
ADD 10
)
ST Var3
Save the result 10 in Var3
3.2.2.7 MUX
Various constants or variables can be selected by means of an index which is located in front of the command in the accumulator. The first value is accessed via Index 0. The selected value is loaded into the accumulator. The number of values is only limited by the program memory.
Table 17 MUX
3.2.2.8 MOD and MOD(
The accumulator is divided by one or more variables or constants. The remainder from the division stands in the accumulator as the result.
For bracket Modulus, the accumulator is divided by the result of the expression in the brackets and the modulus is formed from this. Up to 6 bracket levels are possible.
Table 18 MOD and MOD(
BU 0550 GB-0813 27
PLC logic for NORD SK 54xE frequency inverters
BOOL
BYTE
INT
DINT
Possible data types
X X
X
Commands
Explanation
LD 25
Load the multiplier
MUL Var1, Var2
25 * Var1 * Var2
ST Var2
Save the result
LD 25
Load the multiplier
MUL( Var1
Result = 25*(Var1 + Var2)
ADD Var2
)
ST Var3
Save the result as Var3
BOOL
BYTE
INT
DINT
Possible data types
X X
X
Commands
Explanation
LD 10
SUB Value1
Result = 10 - Value1
ST Value1 LD 20
SUB Value1,Value2,30
Result = 20 - Value1 - Value2 - 30
ST Value1
LD 20
SUB( 6
Subtract 20 from the contents of the bracket
AND 2
)
Result = 20 - (6 AND 2)
ST Value1
Save the result 18 in Var1
3.2.2.9 MUL and MUL(
Multiplication of the accumulator with one or more variables or constants. For bracket multiplication, the accumulator is multiplied by the result of the expression in brackets. Up to 6
bracket levels are possible. Both values must belong to the same type of variable.
Table 19 MUL and MUL(
3.2.2.10 SUB and SUB(
Subtracts the accumulator from one or more variables or constants. For bracket subtraction, the accumulator is subtracted from the result of the expression in brackets. Up to 6
bracket levels are possible. The values to be subtracted must belong to the same type of variable.
Table 20 SUB and SUB(
28 BU 0550 GB-0813
Operator
Explanation
EXP
Exponential function
LOG
Logarithm, base 10
LN
Logarithm, base e
SQRT
Root
COS, ACOS
Trigonometrical operators SIN, ASIN
TAN, ATAN
NOTE
The operators listed here require a large amount of computation. This may result in a considerably longer running time for the PLC program.
1000
1000
 
 
Akku
eAkku
BOOL
BYTE
INT
DINT
Possible data types
X
Commands
Explanation
LD 1000
EXP
Result = 2718
ST Var1
1000
1000
10
log
 
 
Akku
Akku
BOOL
BYTE
INT
DINT
Possible data types
X
Commands
Explanation
LD 1234
LOG
Result = 91
ST Var1
3.2.3 Extended mathematical operators
Table 21 Overview of extended mathematical operators
3 AWL (Instruction List, IL)
3.2.3.1 EXP
Forms the exponential of the accumulator to the base of Euler's number (2.718). Up to 3 places behind the decimal point may be stated, i.e. 1.002 must be entered as 1002.
Table 22 EXP
3.2.3.2 LOG
Forms the logarithm to base 10 from the accumulator. Up to 3 places after the decimal point may be stated, i.e. 1.000 must be entered as1000.
Table 23 LOG
BU 0550 GB-0813 29
PLC logic for NORD SK 54xE frequency inverters
1000
1000
ln
 
 
Akku
Akku
BOOL
BYTE
INT
DINT
Possible data types
X
Commands
Explanation
LD 1234
LN
Result = 210
ST Var1
Save the value 210 in Value1
1000
1000
 
 
Akku
Akku
BOOL
BYTE
INT
DINT
Possible data types
X
Commands
Explanation
LD 1234
SQRT
Result = 1110
ST Var1
Save the value 1110 in Var1
1000
1000
sin
 
 
Akku
Akku
1000
1000
cos
 
 
Akku
Akku
1000
1000
tan
 
 
Akku
Akku
1000
1000
sin
 
 
Akku
aAkku
1000
1000
cos
 
 
Akku
aAkku
1000
1000
tan
 
 
Akku
aAkku
BOOL
BYTE
INT
DINT
Possible data types
X
Commands
Explanation
LD 1234
SIN ST Var1
Save the value 943 in Var1
3.2.3.3 LN
Logarithm to base e (2.718). Up to 3 places behind the decimal point may be stated, i.e. 1.000 must be entered as 1000.
Table 24 LN
3.2.3.4 SQRT
Forms the square root of the accumulator. Up to 3 places behind the decimal point may be stated, i.e. 1.000 must be entered as 1000.
Table 25 SQR
3.2.3.5 COS, ACOS, SIN, ASIN, TAN, ATAN
Calculates the relevant mathematical function. The value to be calculated must be available in the accumulator in radians. The scaling corresponds to 1 = 1000.
Conversion: Angle in radians = (Angle in degrees * PI / 180)*1000 e.g. an angle of 90° is converted as follows 90° * 3.14 / 180) *1000 = 1571
Table 26 Trigonometrical functions
30 BU 0550 GB-0813
Loading...
+ 70 hidden pages