3940 en
3940 en
2005 / a
iven
a l i s to be g
anu r
This m the end use
to
SM-APPLICATIONS LITE
Solutions module for UNIDRIVE SP
User guide
General Information
The manufacturer accepts no liability for any consequences resulting from inappropriate,
negligent or incorrect installation or adjustment of the optional operating parameters of
the equipment or from mismatching the variable speed drive (drive) with the motor.
The contents of this guide are believed to be correct at the time of printing. In the
interests of a commitment to a policy of continuous development and improvement, the
manufacturer reserves the right to change the specification of the product or its
performance, or the contents of this guide, without notice.
All rights reserved. No parts of this guide may be reproduced or transmitted in any form
or by any means, electrical or mechanical including photocopying, recording or by an
information storage or retrieval system, without permission in writing from the publisher.
2 Introduction 7
2.1 Introduction 7
2.2 SM-Applications Lite module for Unidrive SP 7
2.3 Specifications 8
2.4 PC development software 8
2.5 User knowledge 8
3 Installation 9
3.1 Mechanical installation 9
3.2 SMARTCARD installation 9
4 Getting started 10
4.1 Connecting the PC to the SM-Applications Lite module 11
4.2 Using SYPT Workbench 11
4.3 Using SYPTLite 15
5 Parameters 17
5.1 Overview 17
5.2 Saving Parameters 17
5.3 Configuration Parameters 18
5.4 Menus 70-75 - PLC Registers 24
5.5 Menu 88 - Status Parameters 24
5.6 Menu 90 - General Parameters 25
5.7 Menu 91 - Fast Access Parameters 32
5.8 Menus 18,19 - Application Parameters 36
5.9 Menu 20 - Application Menu 37
6 Communications 38
6.1 SM-Applications Lite mapping parameters 38
10 Diagnostics 60
10.1 Run-time Errors 60
10.2 Unidrive SP Trip Display Codes 60
10.3 SM-Applications Lite Run-time Error Codes 61
10.4 Handling Run-Time Errors with the ERROR task 62
10.5 Support 63
11 Migration Guide 64
11.1 Drive Parameter Differences 64
11.2 UD70 Parameters 64
11.3 General Features 65
11.4 SM-Applications Porting Aid 67
12 Quick Reference 68
A Caution contains information, which is necessary for avoiding a risk of damage to the
product or other equipment.
CAUTION
NOTE A Note contains information, which helps to ensure correct operation of the product.
1.6 Motor
Ensure the motor is installed in accordance with the manufacturer’s recommendations.
Ensure the motor shaft is not exposed.
Standard squirrel cage induction motors are designed for single speed operation. If it is
intended to use the capability of the drive to run a motor at speeds above its designed
maximum, it is strongly recommended that the manufacturer is consulted first.
Low speeds may cause the motor to overheat because the cooling fan becomes less
effective. The motor should be fitted with a protection thermistor. If necessary, an
electric forced vent fan should be used.
The values of the motor parameters set in the drive affect the protection of the motor.
The default values in the drive should not be relied upon.
It is essential that the correct value is entered in Pr 0.46 motor rated current. This affects
the thermal protection of the motor.
NOTE Unidrive SP parameters are denoted in this manual by “#MM.PP”, where MM refers to
the menu number, and PP refers to the parameter number within that menu. Please refer
to the Unidrive SP manual for full parameter definitions.
2.1 Introduction
Modern variable speed drives such as the Unidrive SP offer a multitude of in-built
features such as ramp control, PID loops, simple position control, etc. However this
functionality is limited. The drive can only do so many things and when it comes to
controlling more complex applications, users often have to resort to using external
equipment such as PLCs to control the drive from a system point of view.
However the flexibility of the Unidrive SP can be substantially increased by using an
SM-Applications Lite module. This module is a second processor for the drive and
allows the user to utilise existing, or write their own, application-specific software.
The SM-Applications Lite module is powered from the Unidrive SP internal power
supply.
SYPT Workbench offers the following tools to help in developing more powerful
solutions:
With both software packages you must connect to the SM-Applications Lite via a direct
connection to the RS485 port on the front of the Unidrive SP.
Figure 3-2
This program will take the positional feedback information from the drive (which is
scaled to 232/rev), work out the delta (which will be proportional to speed) and convert to
encoder counts (based on a standard quadrature encoder) and add this to an
accumulator.
NOTE If you wish to create and try this program yourself and you have not used the SYPT
Workbench or SYPTLite software before then it is advised to read through the remainder
of this chapter first, then read the appropriate documentation of the software you are
using.
In order to ensure that the POS0 task is executed, parameter #81.12 must be set to a
non-zero value in the Initial task. After setting this a REINIT command must be issued
(see below).
On choosing SM-Applications Lite, you have the option of 3 tasks to choose from.
Background, Clock or Initial. You will only be able to use one of these tasks for the
whole program.
All of the programming in SYPTLite is in ladder and you are limited to 10kb of
executable memory.
For further information see Help in SYPTLite.
Unless otherwise indicated, these parameters are only read when the SM-Applications
Lite is first powered up, on a reset or on a REINIT DPL command. Changing one of these
WARNING
parameters on the fly will have no immediate effect.
To reset the SM-Applications Lite from the drive display, enter the value of 1070 in
parameter zero of any menu and press the reset button.
NOTE Throughout this User Guide, the configuration parameters will be referred to as #81.xx.
When setting parameters directly on the drive keypad use the appropriate menu 15, 16
or 17 instead.
NOTE The update rate specified for any parameter refers to the rate at which the parameter is
updated for reading or when writing, when the new value takes effect.
“Initialisation” means that the parameter is read only on module reset or REINIT DPL
command.
Changing the drive mode will clear all configuration and application parameters back to
their default value as well as drive parameters. This can be avoided by using the code
1255 in parameter zero rather than the usual 1253. Only drive parameters will be
TIP defaulted, and menus 15 to 20 will be left unchanged.
NOTE Prior to version 01.05.00 Unidrive SP the default for this parameter was 0 (disabled).
NOTE With the Unidrive SP version 01.03.00 and earlier, the display will not show the actual
rate, but its aliased number. For instance 250µs will be shown on the display as 1.
NOTE Note that this will also cause a reset of the module and this parameter will return back to
zero automatically. Also if the Unidrive SP is tripped, it will be reset. Menu 81 will not be
saved.
NOTE Note that when a ‘UU’ save occurs the SM-Applications Lite module will be reset.
NOTE Unlike other setup parameters, parameters #81.20 and #82.21 are not cached, which
means a change to the parameter takes immediate effect.
Writing 1070 to parameter #88.01 will result in any drive trip being automatically cleared
as well as resetting all fitted options in the Unidrive SP. This behaviour is different to the
UD70 product on UMV 4301 where the drive was not reset.
WARNING
NOTE When porting UD70 programs to SM-Applications Lite special care must be taken as
these parameters are different than those on UD70.
?
ONLINE
HELP
More information on the use of these feedback parameters can be found in the on-line
help of the SYPT Workbench.
#1x.11-
Integer, read-write
#1x.30
Access RW Range Signed 16-bit
Default 0 Update Rate N/A
#1x.31-
Bit, read-write
#1x.50
Access RO Range 0/1
Default 0 Update Rate N/A
Parameters #1x.11-#1x.50 are saveable in the drive’s non-volatile memory.
NOTE This menu is NOT saved in the drive’s non-volatile memory. Instead it can be stored in
the SM-Applications Lite module’s flash memory upon request. If more than one SM-
Applications Lite module is fitted, only one should be configured to store and restore this
menu for obvious reasons.
If parameter #81.21 is set, this menu will be saved and restored by the SM-Applications
Lite module.
#20.01-
Integer, read-write
#20.20
Access RW Range Signed 16-bit
Default 0 Update Rate N/A
These parameters are standard integers giving them a range of -32768 to 32767.
#20.21-
Long integer, read-write
#20.40
Access RW Range Signed 32-bit
Default 0 Update Rate N/A
These parameters are long-integers, which give them a range of -231 to 231-1. On the
drive display/keypad if the value exceeds the maximum that can be displayed
(9,999,999), “------” will be shown. It is not possible to enter values larger than the
maximum display value on the keypad.
NOTE If a single SM-Applications Lite module is fitted to the Unidrive SP, normal SM-
Applications Lite parameter references can be used without problem, as the SM-
PROFIBUS-DP will automatically divert them to the SM-Applications Lite module.
NOTE If dual SM-Applications Lite modules are fitted to the Unidrive SP, it is best to access SM-
Applications Lite module parameters using the direct slot parameter references. If
normal SM-Applications Lite module parameters are used, and the SM-Applications Lite
module is removed from slot 1, these parameter references will be re-directed to slot 2
instead.
NOTE The SM-Applications Lite module cannot access the #1xx.xx internal menus. It must
access them directly by the parameter reference number. e.g. if you wanted to read
parameter #104.35 you would need to use #74.35.
?
ONLINE
HELP
This is by no means a complete guide to the DPL language. The full reference for all DPL
commands and function blocks is provided by the on-line help guides.
NOTE It is recommended that aliases representing integer values have a '%' symbol appended
to the alias name. In graphical programming tools (QLD/FBD), SYPT will treat all aliases
without a % symbol as floating-point values. Hence they will be rejected on LD or integer
only inputs.
The $DEFINE directive does NOT produce any code, nor does it speed up the execution
time of your program - it simply allows you to refer to something with a different name.
NOTE The UD70 ENCODER and SPEED tasks can still be used. These are now aliases for the
POS0 and POS1 tasks respectively (i.e. if the program has an ENCODER task this is the
same as if it contained a POS0 task) . The timebase for both tasks are not fixed as in the
UD70 but specified by the user. The CLOCK task in the SM-Applications Lite module can
be used in place of the ENCODER task in the UD70, thus giving a timebase closer to
that of the UD70 ENCODER task than is available with the POS0 and POS1 tasks.
All program instructions must live within a task. For time-based tasks like POS0, POS1
and CLOCK the instructions within the task have only a finite time in which to complete,
therefore only time critical functions should be performed within them.
Tasks have different priority levels, therefore it is possible for one task to interrupt
another task. In the above table, the higher the priority number the higher the priority is.
Therefore a POS0 task can interrupt a CLOCK task which can interrupt the
BACKGROUND task.
5ms
INITIAL
CLOCK
(5ms tick)
BACKGROUND
1 2 3
Time
Key:
1. INITIAL task has exclusive control. No other tasks can run
2. CLOCK task which has a higher priority than the BACKGROUND task runs.
3. CLOCK task has finished and now the BACKGROUND task can run - until the next
clock tick occurs.
Take particular note that the CLOCK task is run on a fixed timebase (in the diagram
above it is 5ms). This means that the instructions within the CLOCK task MUST take
less than 5ms to complete otherwise the BACKGROUND task will not get a look-in, or a
processor overload trip will occur.
The following diagram shows what happens when the POS tasks are used as well:
5ms
2ms
INITIAL
POS0/1
(2ms tick)
CLOCK
(5ms tick)
BACKGROUND
Time
This shows the POS0 and POS1 tasks interrupting the CLOCK task which in turn
interrupts the BACKGROUND task. As can be seen, this is quite a heavily loaded
program since the background task is only executed once in a while. The processor free
resource parameter #81.04 can be used to determine how heavily loaded the SM-
Applications Lite module is.
7.2.1 EVENT tasks
There are four event tasks provided. The event tasks can be triggered on:
• User program initiated
• New DPL command SCHEDULEEVENT. See on-line help for information
Example of variables:
A special statement is placed at the start of the program to declare what type of floating
point variable is used throughout the program - either single or double precision. By
default double-precision variables will be used. By including the following line
immediately below the program header region (with $TITLE, etc.) the float type will be
single-precision:
$flt single
NOTE • Variable names are case sensitive (e.g. The variable name speed% is NOT the same
as SPEED%).
• SYPT QuickLD and FBD editors will only allow the use of variables no longer than 16
characters including any % sign.
DIM myarray%[10]
...
IF myarray%.1[4] = 1 THEN;test bit 1 of element #4.
PRINT "Test satisfied."
ENDIF
Note: The bit number must be a constant number - variables are not allowed.
7.3.9 PLC registers
The 'PLC' area is a special range of pre-defined 32-bit registers. The PLC registers are
split into 6 sets of 100 parameters numbered 00 to 99. The registers can also be
accessed from within a user DPL program by a special variable name or array name.
Four of the register sets are also saveable in the SM-Applications Lite module flash
memory.
See section 5.4 Menus 70-75 - PLC Registers for further information on PLC registers.
7.3.10 RAM files
RAM files enable the user to store ‘files’ in the user RAM of the SM-Applications Lite
module. These can be uploaded and downloaded using DPL commands. They have an
advantage in that you can retrieve or write an array of numbers in one go rather than
each element of the array individually.
?
ONLINE
HELP
For further information on RAM files, including example programs, please refer to the on-
line help.
7.4 Parameters
Parameters are categorised into two sets:
• Drive Parameters
• SM-Applications Lite Parameters
Drive parameters are ones which reside in the host drive. The majority of them affect the
operation of the drive, however a few are set aside as “application parameters”. These
are menus 18, 19 and 20.
The SM-Applications Lite parameters are local and accessible only to the SM-
Applications Lite module. These parameters provide access to additional features of the
SM-Applications Lite module, and give faster access to some drive parameters.
NOTE The SM-Applications Lite module always guarantees that the drive parameter database
it uses matches that of the host Unidrive SP. When a SM-Applications Lite module is
fitted to a Unidrive SP for the first time and powered up the word “Loading” may appear
on the drive display for a few seconds. This indicates the SM-Applications Lite module
is synchronising databases. This will only occur the first time the module is fitted to the
drive. Subsequent power-ups will shown “Loading” only for a very short time.
7.5 Operators
DPL offers all the standard operators as follows:
Table 7.3 Standard operators in precedence order
Operator Meaning
- Arithmetic negation
! Boolean negation (unary)
!(..., nbit) Negation of nbit bits
* Multiplication
/ Division
% Modulo (remainder)
+ Addition
- Subtraction
& Bitwise AND
| Bitwise OR
^ Bitwise exclusive OR (XOR)
?
ONLINE
HELP
Refer to the on-line help for full reference on the DPL language and function block library.
FOR loop
This is new to the SM-Applications Lite module.
FOR variable = integer_expression to integer_expression [STEP constant]
statements
LOOP
The STEP part is optional.
CASE
This provides an alternative to the IF-ELSEIF-ENDIF construct.
SELECT integer_expression
CASE integer_constant
statements
[CASE integer_constant, integer_constant ...
[statements]]
[ELSE
[statements]]
ENDSELECT
This construct provides a convenient way to test for multiple constant values. Any
number of CASE statements can be included.
NOTE The CASE statements operate in the same way as programs like Visual Basic in that the
program flow will NOT drop through to the next CASE as it does in the C programming
language.
UPPER/LOWER
These functions will take an array as a parameter and will return the upper and lower
array index respectively. For example:
// Create an array of 1000 elements
DIM array%[1000]
// now,
TRUNC
This is used to convert a floating point value to integer, truncating rather than rounding.
For example:
// Initialise floating point variable
floatval = 1.56
BACKGROUND {
... some code
// Schedule local event1 task with reason code of 45.
a% = SCHEDULEEVENT(0, 1, 45)
... some more code
}
EVENT1 {
IF #90.13 = 45 THEN
// task scheduled from DPL
ENDIF
}
GETPARATTR
This is used to get parameter attributes such as maximum and minimum values, read-
only flag, etc.
(max%, min%, flags%) = GETPARATTR(menu%, par%)
CModeXfer
This allows the user to change the drive type without any fitted option modules getting a
hard reset. It allows for a smoother drive type change. While the drive type change
occurs fieldbuses will not be able to write to parameters and this is handled at system
level. They will NOT get a ‘write to parameter failed’ message during this period.
PFIXREAD6/PFIXWRITE6
These blocks provide reading and writing of drive parameters in a fixed precision of 6
decimal places.
SETUSERID
This command is used to set the User ID parameter #81.49.
SETUSERID(101) // set #81.49 to 101.
OpenReadSmartCard
OpenWriteSmartCard
CloseSmartCard
ReadSmartCardByte
WriteSmartCardByte
GetNextSmartCardFile
ReadReadOnlyBit
WriteReadOnlyBit
These commands allow the user to utilise the Unidrive SP’s SMARTCARD. For further
information contact LEROY-SOMER.
7.6.2 DPL commands and function blocks
There is a rich list of commands and functions that may be used in a DPL program. This
list is too large to go into in this User Guide, so please refer to the on-line help.
NOTE Due to the fact that the SYPT Workbench was developed for the UD70, the tools used
to create UDFB’s still enforce the restriction on input and output arguments and the order
of floating point and integer variables. Therefore the full flexibility of the SM-Applications
Lite module’s implementation cannot be realised with SYPT Workbench V1.
More information on the restrictions can be found in the on-line help.
NOTE The input and output arguments of a UDFB are not available in the initial section..
The body section is where the actual code of the function block exists the part that does
the work of the function. Input and output arguments only have context within the body
section.
FBbody
// main body code:
The encoder revolution counter is cached into parameter #90.29 and the encoder
position is cached into #90.30.
Figure 8-2 SM-Applications Lite Feedback Freeze Input
The marker position is cached into parameter #90.35 and the marker revolution counter
is cached into parameter #90.36.
The user sets #90.41 to a zero and the drive sets #90.41 to a 1 EVERY time a marker is
detected. The user must ensure that the marker data is consumed before the next
marker pulse.
The marker position is cached into parameter #90.25 and the marker revolution counter
is cached into parameter #90.26.
The user sets #90.42 to a zero and the drive sets #90.42 to a 1 EVERY time a marker is
detected. The user must ensure that the marker data is consumed before the next
marker pulse.
NOTE Drive trips do not cause the ERROR task to run. Only certain DPL program errors do.
Within the ERROR task all standard DPL commands may be used as well as most
function blocks. All drive and SM-Applications Lite parameters can be accessed.
Writing 1070 to parameter #88.01 will result in any drive trip being automatically cleared
as well as resetting all fitted options in the Unidrive SP. This behaviour is different to the
UD70 product on UMV 4301 where the drive was not reset.
WARNING
The task that caused a run-time error can be determined by reading parameter #88.02,
as previously described.
If the user wishes to trip the drive (if it hasn’t already been tripped) then write the
appropriate trip code into parameter #10.38.
10.5 Support
The information from the parameters described below should always be noted before
contacting your supplier for technical support.
10.5.1 Module Firmware
#81.02 Firmware - Major Version
Access RO Range 00.00 to 99.99
Default N/A Update Rate N/A
The full version of the SM-Applications Lite module firmware version can be read for the
corresponding slot. This manual was written for SM-Applications Lite modules fitted with
V01.03.03 firmware. The table below shows how to construct the full firmware version
from these values.
Table 10.3 Firmware Version
Major Minor Firmware Version
Version Version
1.01 5 V01.01.05
NOTE The single-precision data type is not a direct replacement for double-precision and users
should make sure that the single precision type offers sufficient precision for their
application.
11.3.4 Tasks
The tasks have been changed.
• The ENCODER and SPEED tasks are no longer used. Instead the POS0 and POS1
tasks have been added. Also, the CLOCK task can be used as a replacement for
the ENCODER task. The POS0, POS1 and CLOCK tasks run synchronously to the
drive (like the SPEED task did), but you can now specify a multiple of that time -
from 250µs to 8ms for the POS0 and POS1 and 5ms to 200ms for the CLOCK task.
Users may still use the names SPEED and ENCODER since they are aliases to
POS0 and POS1 (when using SYPT Workbench V1 this may be beneficial since
there is an issue with breakpoints with POS0/1), but be aware that the timing is
different and code may have to be altered to take this into account. Note also that
the timing does not alter depending on drive switching frequency, as it did on UD70.
• Three new EVENT tasks have been added, but this should not cause any problems
migrating programs.
• EVENT tasks can now be scheduled from DPL using the new SCHEDULEEVENT
function block.
11.3.5 Position Controller
The SM-Applications Lite module has a built in Advanced Position Controller, however
this is completely different to the UD70 Advanced Position Controller. For information on
this refer to the Advanced Position Controller User Guide.
11.3.6 User Defined Function Blocks
• The UD70 had a limit of 10 integer inputs and 10 integer output. There were also
alignment restrictions. The SM-Applications Lite module has none of the
restrictions. Number of inputs and outputs are limited only by memory. There should
be no migration problems. (Note: The SYPT Workbench currently still imposes the
old limitations on programs developed for the SM-Applications Lite module).