Nidec SM-Applications Series User Manual
Nidec SM-Applications Series User Manual

Nidec SM-Applications Series User Manual

Modules and motion processors
Table of Contents

Advertisement

User Guide
SM-Applications
Modules and
Motion Processors
SM-Applications
SM-Applications Lite
SM-Applications Plus
SM-Applications Lite V2
Digitax ST Indexer
Digitax ST Plus
Part Number: 0471-0062-04
Issue: 4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SM-Applications Series and is the answer not in the manual?

Questions and answers

Summary of Contents for Nidec SM-Applications Series

  • Page 1 User Guide SM-Applications Modules and Motion Processors SM-Applications SM-Applications Lite SM-Applications Plus SM-Applications Lite V2 Digitax ST Indexer Digitax ST Plus Part Number: 0471-0062-04 Issue: 4...
  • Page 2 European Chemicals Agency (ECHA) to be a Substance of Very High Concern (SVHC) and is therefore listed by them as a candidate for compulsory authorisation. Further information on our compliance with REACH can be found at: http://www.drive-setup.com/reach Registered Office Nidec Control Techniques Ltd The Gro Newtown Powys SY16 3BE Registered in England and Wales.
  • Page 3 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. Copyright © 23 January 2018 Nidec Control Techniques Ltd...
  • Page 4: Table Of Contents

    Contents Safety Information ..............7 Warnings, Cautions and Notes ..............7 Important safety information. Hazards. Competence of designers and installers ..........7 Responsibility ..................7 Compliance with regulations ..............7 Electrical hazards ..................8 Stored electrical charge ................8 Mechanical hazards ................8 Access to equipment ................8 Environmental limits ................9 1.10 Hazardous environments ................9 1.11...
  • Page 5 Getting Started ..............21 Using SyPTPro and SyPTLite ...............21 Connecting the PC to the Second Processor ........21 CTNetAPI routing ..................22 Configuring Communications within SyPTPro ........22 Creating a Node in SyPTPro ..............23 Porting UD70 programs to the Second Processor ........23 Using SyPTLite ..................24 DPL Programming Basics ..............25 Program Example ..................26 4.10...
  • Page 6 CTSync .................97 Overview ....................97 Connections ..................97 Limitations .....................98 CTSync Function Blocks ...............98 Motion Engine ..................99 Virtual Master Example ...............102 Inter-option Synchronization ..........104 10.1 Overview .....................104 10.2 Inter-Option Synchronization example 1 ..........104 10.3 Inter-option Synchronization example 2 ..........107 10.4 Position control tasks ................111 Diagnostics ..............112 11.1 Run-time Errors ...................112...
  • Page 7: Safety Information

    Safety Information Warnings, Cautions and Notes A Warning contains information, which is essential for avoiding a safety hazard. WARNING A Caution contains information, which is necessary for avoiding a risk of damage to the product or other equipment. CAUTION A Note contains information, which helps to ensure correct operation of the product. NOTE Important safety information.
  • Page 8: Electrical Hazards

    All machinery to be supplied within the European Union in which this product is used must comply with the following directives: 2006/42/EC Safety of machinery. 2014/30/EU: Electromagnetic Compatibility. Electrical hazards The voltages used in the drive can cause severe electrical shock and/or burns, and could be lethal.
  • Page 9: Environmental Limits

    Environmental limits Instructions in this guide regarding transport, storage, installation and use of the equipment must be complied with, including the specified environmental limits. This includes temperature, humidity, contamination, shock and vibration. Drives must not be subjected to excessive physical force. 1.10 Hazardous environments The equipment must not be installed in a hazardous environment (i.e.
  • Page 10: Introduction

    Introduction Features for Different Module Variants Modern variable speed drives 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.
  • Page 11 Specifications for SM-Applications Plus • Enhanced high speed dedicated microprocessor • 384 kb Flash memory for user program • 80 kb user program memory • EIA-RS485 port offering ANSI, Modbus-RTU slave and master and Modbus- ASCII slave and master protocols •...
  • Page 12: Solutions Module Identification

    The SM-Applications Plus module, SM-Applications Lite V2 module and the Digitax ST NOTE Plus has a slightly faster variant of the SM-Applications microprocessor, thereby increasing performance of the module over the SM-Applications. Solutions Module identification Figure 2-1 Second Processor The Second Processors can be identified by: 1.
  • Page 13: Pc Development Software

    In the case of a Solutions Module, the parameters will appear in menu 15, 16 or 17 for the drive depending on the slot the module is fitted into. In the case of embedded solutions these will appear in menu 17. The menu is determined by the number before the decimal point.
  • Page 14: Installation

    Installation Before installing or removing a Solutions Module in any drive, ensure the AC supply has been disconnected for at least 10 minutes and refer to Chapter 1 Safety Information on page 7. If using a DC bus supply ensure this is fully discharged before working on any drive or Solutions Module.
  • Page 15 Please note that SM-Applications Lite, SM-Applications Lite V2 and ST Indexer do not have these terminals. Please ensure that the drive is off before removing any modules. NOTE Please refer to your installation sheet for more information. Table 3-1 Module Connectors Terminal Function Description...
  • Page 16: Connections

    Connections This User Guide covers only the basics of connecting a CTNet network. Please refer to NOTE the CTNet User Guide for full information. Digitax connections are given in the Digitax ST Plus manual. SM-Applications Lite, SM-Applications Lite V2 and ST Indexer do not have these CTNet Connections.
  • Page 17: Ctnet Network Termination

    CTNet Network Termination It is very important in high-speed communications networks that the network communications cable is fitted with the specified termination resistor network at each end of the cable. This prevents signals from being reflected back down the cable and causing interference.
  • Page 18: Eia-Rs485 Connections

    Repeaters can be purchased from Control Techniques. The table below shows the part numbers for the different repeaters available. Part Description Numer 4500-0033 AI3-485X - Rev A 4500-0083 AI3-485X-CT - Rev D (Port 1), Rev A (Ports 2 and 3) 4500-0082 AI3-CT - Rev D 4500-0032 AI2-485X/FOG-ST - Rev A (Fibre Optic) 4500-0081 AI2-CT/FOG-ST - Rev D (Fibre-Optic)
  • Page 19 3.7.2 2 Wire EIA-RS485 Network The diagram below shows the connections required for a 2 wire EIA-RS485 network, using a master controller with an EIA-RS485 port. SM-Applications Modules & Motion Processors can be configured to act as master controllers, but this requires DPL programming to control the network.
  • Page 20: Digital I/O Connections

    Digital I/O Connections DIGOUT1 DIGIN0 DIGOUT0 DIGIN1 The SM-Applications, SM-Applications Plus and Digitax ST Plus are equipped with 2 digital inputs, known as DIGIN0 and DIGIN1, and 2 digital outputs, known as DIGOUT0 and DIGOUT1. These inputs and outputs can be read/controlled from the user program loaded into the SM-Applications Modules &...
  • Page 21: Getting Started

    Getting Started This chapter describes the basics of a user program using the SM-Applications Modules & Motion Processors and some of the aspects of using SyPTPro. Within the SM-Applications Modules & Motion Processors the current slot menu is aliased as menu 81. Therefore when connected to the module via a communications link or from the user program, it is easiest if configuration parameters are referenced as menu 81.
  • Page 22: Ctnetapi Routing

    4.2.2 EIA-RS485 Serial port You can connect the PC to the RJ45 serial port on the front of the drive. Special pre- made leads are available from Control Techniques for this purpose. These leads are to connect from your pc by either EIA-RS232 to EIA-RS485 or USB to EIA-RS485 - these leads are used with other Control Techniques products that use a RJ45 EIA-RS485 connector such as the Commander SE and Commander SK.
  • Page 23: Creating A Node In Syptpro

    4. Press OK. Apps Apps Lite Apps Plus Lite V2 ST Plus ST Indexer       Creating a Node in SyPTPro Figure 4-2 Node icon 1. Insert a new node by selecting Node from the Insert menu or by double-clicking on the Double-click to Insert Node icon.
  • Page 24: Using Syptlite

    Using SyPTLite The SyPTLite program provides an alternative development platform to SyPTPro for the Applications Lite module, the applications Lite V2 module and the Digitax ST Indexer. SyPTLite is the ‘entry’ level programming tool which is delivered free-of-charge with the drive and can be used straight out of the box for programming in quick ladder logic Connectivity to the PC is the same as mentioned in section 4.2 Connecting the PC to the Second Processor on page 21.
  • Page 25: Dpl Programming Basics

    DPL Programming Basics The SM-Applications Modules & Motion Processors can be programmed using a mixture of ladder diagrams (LD), function block diagrams (FBD) and DPL code (Drive Programming Language). Collectively they are known as a DPL Program. Only the ladder programming is available with SyPTLite. At the very top level a program consists of: •...
  • Page 26: Program Example

    Program Example Shown below is an example of a DPL program written within SyPTPro: Figure 4-5 Example DPL Program This program will take the positional feedback information from the drive (which is scaled to 2 /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.
  • Page 27: Downloading Programs

    4.9.2 Initial Task As explained later in section 7.2 Tasks on page 79, this is a task which is executed when the SM-Applications Modules & Motion Processors is first powered up or is reset, providing the Autorun parameter is set (refer to the section on saving parameters). In this task are some DPL statements that initialise some integer variables (denoted by a trailing % symbol) to zero.
  • Page 28: Parameters

    Parameters Overview The Second Processor contains two parameter databases: • The drive database This contains the entire drive parameter set. The Second Processor caches this database in its own non-volatile flash memory. At power-up the module will check to see if this cache matches that of the drive. If it doesn’t the database will be loaded from the drive, during which time the word “Loading”...
  • Page 29: Configuration Parameters

    Configuration Parameters The basic configuration (or setup) parameters are held in the appropriate menu for the slot where the Second Processor is fitted. Slot Menu For the Digitax ST Plus and the Digital ST Indexer, menu 17 is reserved for the motion NOTE processor.
  • Page 30 Pr 81.02 Firmware Version - Major Access Range 00.00 to 99.99 Default Update Rate N/A Apps Apps Lite Apps Plus Lite V2 ST Plus ST Indexer       Specifies the major revision number of the operating system of the Second Processor. Use in conjunction with Pr 81.51 to form the complete version number.
  • Page 31 Pr 81.06 EIA-RS485 Mode Access Range 0 to 255 Default Update Rate Initialization Defines the mode of operation (or protocol) for the on-board EIA-RS485 port. For details of these modes, refer to Table 5-1 Serial modes - Pr 81.06 . Table 5-1 Serial modes - Pr 81.06 Mode Description...
  • Page 32 Table 5-1 Serial modes - Pr 81.06 Mode Description 2-wire Modbus RTU master The EIA-RS485 port is set for: 19, 49, 79 Mode 19: 1 start bit, 8 data bits, NO parity, 2 stop bits. Mode 49: 1 start bit, 8 data bits, EVEN parity, 1 stop bit. Mode 79: 1 start bit, 8 data bits, ODD parity, 1 stop bit.
  • Page 33 Pr 81.09 EIA-RS485 Tx Enable Delay Access Range 0 to 1ms Default Update Rate Initialization This parameter allows a 1ms delay to be introduced between the Second Processor enabling the EIA-RS485 transmitter and actually commencing the transmission. This should only be required if it is found that the recipient of the transmission is receiving a corrupted start of message.
  • Page 34 Pr 81.12 POS task scheduling rate Access Range 0 to 6 Default Update Rate Initialization Defines the scheduling rate for the POS tasks to suit the application performance and the resource needed to run the user DPL program. The following values are defined: Display Value Description...
  • Page 35 Pr 81.16 Encoder Data Update Rate Access Range Default Update Rate Initialization Display Description APC data and menu 90 encoder parameters are updated every 250 µs. APC data and menu 90 encoder parameters are updated immediately prior to every POS task. APC data and menu 90 encoder parameters are updated immediately prior to every CLOCK task.
  • Page 36 Pr 81.19 Save Request Access Range Default Update Rate 100ms Setting this parameter to 1 will initiate an immediate save of all non-volatile Second Processor data. This consists of the P/Q/T/U PLC register sets and optionally menu 20 (depending upon the setting of Pr 81.21 ) Apps Apps Lite Apps Plus Lite V2...
  • Page 37 Pr 81.22 CTNet Token Ring ID Access Range 0 to 255 Default Update Rate Initialization This parameter allows the user to specify the identity of the CTNet token ring to which a Second Processor is connected. In a system incorporating a single token ring this parameter can be left at its default value.
  • Page 38 Pr 81.26, Pr 81.28, CTNet Easy Mode Setup Parameters Pr 81.30 Access Range 0 to 25503 Default Update Rate Initialization Apps Apps Lite Apps Plus Lite V2 ST Plus ST Indexer       Pr 81.27, Pr 81.29, CTNet Easy Mode Setup Parameters Pr 81.31- Pr 81.34...
  • Page 39 Pr 81.36 CTNet Diagnostics Access Range -3 to 32767 Default Update Rate 1 second The status of the CTNet network is displayed in the CTNet Diagnostic parameter. When the Second Processor is communicating successfully on the CTNet network the number of messages per second is displayed.
  • Page 40 Pr 81.39 Inter-module Drive Sync Status Access Range Default Update Rate NA This parameter displays the current module’s synchronization status. Synchronization Status Status The synchronization master request is zero or another option module is synchronization master. The option module is synchronization master. The option module is synchronization master, but the synchronization frequency is out of specification or not present.
  • Page 41 Pr 81.43 Freeze Invert Access Range Default Update Rate Initialization When this parameter is set to zero a freeze occurs on the rising edge of the module’s DIGIN0. When it is set to 1 a freeze occurs on the falling edge of the module’s DIGIN0. For further information on the Freeze Input refer to Chapter 8 Freeze and Marker on page 93.
  • Page 42 Pr 81.46 User Set-Up Parameter 2 Access Range Default Update Rate N/A This parameter is dependant on what is running in the module i.e. Indexer Apps Apps Lite Apps Plus Lite V2 ST Plus ST Indexer     ...
  • Page 43: Menus 70-75 - Plc Registers

    Pr 81.51 Firmware - Minor Version Access Range 0 to 99 Default Update Rate N/A Specifies the minor revision number of the operating system of the Second Processor. Use in conjunction with Pr 81.02 to form the complete version number. Apps Apps Lite Apps Plus Lite V2...
  • Page 44: Menu 85 - Timer Function Parameters

    Menu 85 - Timer Function Parameters A hardware/counter is built into the Second Processor which has the following features: • A 16 bit incremental counter. • Count rate selectable from the internal clock. The clock rate divisor is selectable from rate/ 1, rate/ 4, rate/ 16, rate/ 64. •...
  • Page 45 Table 5-3 Control Word - Pr 85.01 Symbol Function Clock source: 0=internal clock 1=external clock provided on DIGIN1. Internal clock pre-scale select (ignored if external clock selected): 0=rate /1 (28.7MHz) b5-b6 1=rate /4 2=rate /16 3=rate /64 Timer mode: 0=Free Running mode The selected clock drives the counter.
  • Page 46: Menu 86 - Digital I/O Parameters

    Pr 85.03 Timer Unit 16-bit Timer Count Access Range 16 bit Default Update Rate Immediate The current timer value can be read and written at any time using this parameter. Apps Apps Lite Apps Plus Lite V2 ST Plus ST Indexer ...
  • Page 47 Pr 86.02 Digital Input 1 Access Range Default Update Rate Immediate These two parameters read the state of digital inputs 0 and 1. Inactive input (low) will give the value 0 and active input (high) will give 1. Apps Apps Lite Apps Plus Lite V2 ST Plus ST Indexer...
  • Page 48: Menu 88 - Status Parameters

    Menu 88 - Status Parameters Pr 88.01 Error code / Reset Access Range 0 to 9999 Default Update Rate On error This parameter has two purposes - when read it will return the identical run-time error as Pr 81.50 (note - it will not return drive trip codes). The parameter is cleared to zero on reset and when the user program execution is started.
  • Page 49 Pr 88.03 POS Resource Monitoring Access Range Default Update Rate Immediate This parameter allows the user to enable or disable monitoring of the motion engine tasks free resource. When set to 1, Pr 88.04 and Pr 88.05 become active. If set to zero, Pr 88.04 and Pr 88.05 will read zero.
  • Page 50: Menu 90 - General Parameters

    Pr 88.07 Free Resource for Clock Task Access Range 0 to 95 Default Update Rate See Pr 81.11 This parameter indicates the percentage resource available for running the Clock task. If this parameter value reaches zero a task overrun will occur. It is calculated every Clock period and is displayed for the previous Clock period.
  • Page 51 Pr 90.02 Feedback Encoder Revolution Count Access Range Unsigned 16-bit Default Update Rate See Pr 81.16 Contains the feedback encoder revolution count. Apps Apps Lite Apps Plus Lite V2 ST Plus ST Indexer       Pr 90.03 Reference Encoder Position (2 /rev) Access...
  • Page 52 Pr 90.11 Drive Status and Control Word Access Range Signed 16-bit Default Update Rate Immediate Writing to this parameter updates the control word. Reading from this parameter reads the status word (same as Pr 10.40 ). Table 5-5 Control Word Description If set, the value of Pr 01.46 is set from b6 If set, the value of Pr 01.45 is set from b5...
  • Page 53 Pr 90.12 Event task schedule reason Access Range Unsigned 16-bit Default Update Rate On Event For description see below Apps Apps Lite Apps Plus Lite V2 ST Plus ST Indexer       Pr 90.13 Event1 task schedule reason Access Range Unsigned 16-bit...
  • Page 54 Pr 90.18 Feedback Encoder Freeze Flag Access Range Default Update Rate 250µs This parameter needs to be set to zero for the freeze position to be captured. Once the freeze has occurred this parameter is set to 1. To reacitvate it simply set it to zero. Apps Apps Lite Apps Plus Lite V2...
  • Page 55 Pr 90.23 Drive Encoder Comms Receive Register Access Range Unsigned 16-bit Default Update Rate Immediate When the Drive Encoder Position Check parameter is disabled (Pr 90.21 =1) this parameter can be used to communicate with the encoder connected via serial comms with the drive.
  • Page 56 Pr 90.28 Reference Encoder Freeze flag Access Range Default Update Rate 250µs This parameter needs to be set to zero for the freeze position to be captured. Once the freeze has occurred this parameter is set to 1. To reacitvate it simply set it to zero. Apps Apps Lite Apps Plus Lite V2...
  • Page 57 Pr 90.33 Feedback Encoder Freeze Turns and Coarse Position Access Range Signed 32-bit Default Update Rate 250µs See Pr 90.34 for description. Apps Apps Lite Apps Plus Lite V2 ST Plus ST Indexer       Pr 90.34 Reference Encoder Freeze Turns and Coarse Position Access Range...
  • Page 58 Pr 90.38 Reference Encoder Marker Turns and Coarse Position Access Range Signed 32-bit Default Update Rate See Pr 81.16 These 2 parameters (Pr 90.37 ,Pr 90.38 ) store the 16-bit turns in the upper word and 16- bit position in the lower word, of the feedback (Pr 90.37 ) and reference (Pr 90.38 ) encoders at the time the marker pulse was activated.
  • Page 59 Pr 90.41 Reference Encoder Marker Flag Access Range Default Update Rate See Pr 81.16 See Pr 90.42 for description. Apps Apps Lite Apps Plus Lite V2 ST Plus ST Indexer       Pr 90.42 Feedback Encoder Marker Flag Access Range Default...
  • Page 60 Pr 90.46 Feedback Marker Flag Enable Access Range Default Update Rate Immediate Apps Apps Lite Apps Plus Lite V2 ST Plus ST Indexer       These 2 parameters (Pr 90.45 & Pr 90.46 ) must be set to 1 to allow the marker flags (Pr 90.41 and Pr 90.42 ) to be set when the marker pulse is activated.
  • Page 61: Menu 91 - Fast Access Parameters

    Menu 91 - Fast Access Parameters The parameters in this menu are Second Processor virtual parameters which provide a faster update rate or enhanced resolution than drive parameters. Pr 91.01 Short-cut enable Access Range Unsigned 8-bit Default Update Rate Immediate This parameter enables the short-cut parameters detailed later in this section.
  • Page 62 Pr 91.04 Torque setpoint (Pr 04.08) Access Range Signed 32-bit Default Update Rate 250µs Specifies the torque setpoint (drive Pr 04.08 ) in units of 0.01%. Ensure bit 2 of Pr 91.01 is set in order to use this parameter. Apps Apps Lite Apps Plus Lite V2...
  • Page 63 Pr 91.08 Drive analogue input 1 value Access Range ±4000 Default Update Rate 250µs This value will be taken from the drive’s analogue input 1 and is scaled for 4000 to ± represent the +/- full scale signal at the input. Refer to the Drive User Guide for information on the sampling rate of analogue inputs.
  • Page 64 Pr 91.12 Drive analogue output 2 Access Range ±1023 Default Update Rate NA This parameter sets the value of analogue output 2. Refer to Pr 91.01 for information on enabling this parameter Apps Apps Lite Apps Plus Lite V2 ST Plus ST Indexer ...
  • Page 65 Pr 91.18 Number of Bad CTSync Messages Received Access Range Signed 32-bit Default Update Rate This parameter will increment every time a CTSync message is received with a bad checksum Apps Apps Lite Apps Plus Lite V2 ST Plus ST Indexer ...
  • Page 66 Pr 91.22 Inter-option Synchronization Status Access Range Unsigned 8-bit Default Update Rate Immediate This parameter shows the status of the Second Processor in the Inter-option module synchronization scheme. For more information refer to Chapter 10 Inter-option Synchronization on page 104 Meaning Description This is identical to bit 1 of the Inter-Option Module...
  • Page 67: Menus 18,19 - Application Parameters

    5.10 Menus 18,19 - Application Parameters These two menus are designated as application parameters since they are all free to be used for whatever purpose the user wants. Both menus are identical in their layout. All parameters are read/write access to the Second Processor (and via comms), but may be read-only on the drive’s keypad.
  • Page 68: Menu 20 - Application Menu

    5.11 Menu 20 - Application Menu This menu, like menus 18 and 19, contains parameters that do not affect the operation of the drive and therefore can be used for general purpose. This menu is NOT saved in the drive’s non-volatile memory. Instead it can be stored in NOTE the Second Processor flash memory upon request.
  • Page 69: Communications

    Communications EIA-RS485 Serial Communications Port Please see Features section on pages 8, 9 & 10 for availability on your module. The Second Processor may come with a EIA-RS485 serial communications port on- board. Refer to section 3 Installation on page 14 for information on the hardware connections and wiring or the drive manual for Digitax ST Plus.
  • Page 70 Table 6-2 Slave response (if request was correct and parameter exists) Character Description Data: 1 digit Data: 2 digit Data: n digit End of text (Ctrl & C) Checksum If the parameter to be read does not exist, the End of transmission character (Ctrl & D) is returned.
  • Page 71 +1.2345 is written to a parameter with one decimal place the result is 1.2, if +1.2 is written to a parameter with three decimal places the result is 1.200). It should be noted that parameters can only have 0, 1, 2, 3, 4, 5, or 6 decimal places. 5.
  • Page 72 Parameter data can be accessed in either 16-bit or 32-bit mode. The mode is selected using the upper 2 bits of the register address, as follows: b it 1 5 b it 1 4 b it s 1 3 - 0 T Y P 1 T Y P 0 T y p e s e le c t...
  • Page 73 Table 6-6 Slave response Byte Description Slave source node address Function code 0x03 Length of register data in read block (in bytes) Register data 0 MSB Register data 0 LSB 3 + byte count CRC LSB 4 + byte count CRC MSB 6.1.2.2 FC06 Preset single register Writes a value to a single 16bit register.
  • Page 74 Table 6-9 Master request Byte Description Slave destination node address 1 through 247, 0 is broadcast Function code 0x10 Start register address MSB Start register address LSB Number of 16bit registers MSB Number of 16bit registers LSB Length of register data to write (in bytes) Register data 0 MSB Register data 0 LSB 7 + byte count...
  • Page 75: Ctnet

    Table 6-11 Master request Byte Description Register data 0 LSB 11 + byte count CRC LSB 12 + byte count CRC MSB Table 6-12 Slave response Byte Description Slave source node address Function code 0x17 Length of register data in read block (in bytes) Register data 0 MSB Register data 0 LSB 3 + byte count...
  • Page 76: Second Processor Mapping Parameters (Fieldbus)

    Second Processor Mapping Parameters (fieldbus) The Second Processor has internal parameters that can be written to or read from by fieldbus options also fitted to the drive. This can provide a convenient way to communicate between 2 fieldbuses. These parameters are shown in the table below. Table 6-13 Second Processor Internal Parameters DIrect to Parameter...
  • Page 77 6.3.2 Example configuration 2 Consider a Unidrive SP with the following configuration: • Slot 1 - Second Processor • Slot 2 - Second Processor • Slot 3 - SM-PROFIBUS-DP module If a parameter read request comes over the PROFIBUS-DP network to read Pr 71.08 , this will be re-directed to the Second Processor in the lowest slot number, i.e.
  • Page 78: Dpl Programming

    DPL Programming This chapter covers: • Basic DPL program structure and syntax • Basic DPL commands • New features offered by the Second Processor The full reference for all DPL commands and function blocks is provided by the on-line NOTE help guides.
  • Page 79: Tasks

    Tasks A DPL program is separated into separate sections called tasks. Within the tasks a user writes the program instructions that will be executed by the microprocessor under certain conditions or on a particular time-base. Each task has a particular name, purpose and priority and only one of each task can be present in the DPL program.
  • Page 80 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.
  • Page 81: Variables

    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 Pr 81.04 can be used to determine how heavily loaded the Second Processor is.
  • Page 82 7.3.3 Initialization of Variables All variables must be given an initial value before they can be used. This is typically done within the INITIAL task. For example, Initial { Speed_SP% = 0 Ramp% = 0 7.3.4 Scope and Lifetime of Variables Variables can either be global or local.
  • Page 83: Parameters

    7.3.8 Bit addressing of variables All integer variables and arrays may be bit-addressed. This means that each individual bit within the variable may be separately read or written. After the variable name, place a decimal point (.) followed by the bit number between 0 and 31. Example 1 (simple variable): Flags% = 0 // initialise all 32 bits to 0...
  • Page 84: Operators

    The Second Processor parameters are local and accessible only to the Second Processor. These parameters provide access to additional features of the Second Processor, and give faster access to some drive parameters. The Second Processor always guarantees that the drive parameter database it uses NOTE matches that of the host Unidrive SP.
  • Page 85: Basic Dpl Commands

    Table 7-3 Standard operators in precedence order Operator Meaning Subtraction & Bitwise AND Bitwise OR Bitwise exclusive OR (XOR) Table 7-4 Conditional operators in precedence order Operator Meaning Equality < Less than > Greater than <= Less then or equals >= Greater than or equals <>...
  • Page 86 This construct provides a convenient way to test for multiple constant values. Any number of CASE statements can be included. In the two examples shown above some sections are within square brackets ([ and ]). NOTE This section of code within the square brackets is optional. The CASE statements operate in the same way as programs like Visual Basic in that the NOTE program flow will NOT drop through to the next CASE as it does in the C programming...
  • Page 87 SCHEDULEEVENT This function block is used to schedule an EVENT task. The arguments are: • Slot number Specifies which slot to schedule the event task in. Currently only 0 is allowed here which means the local slot. • Task ID Range 0-3 to specify which EVENT task to trigger •...
  • Page 88 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 mode without any fitted option modules getting a hard reset.
  • Page 89 ANSIREPLY examples: Result% = ANSIREADN(12, 1811) //perform ansi read //has message been sent successfully IF Result% = 0 THEN //message not sent successfully goto top: ENDIF Timeout% = 0 //message sent successfully so intialise timeout (status%, reply%) = ANSIREPLY()// get status and value of read DELAY(1) // delay 100ms LOOP WHILE Status% = -65536 AND Timeout% <...
  • Page 90: User Defined Function Blocks

    AssRAM UnassRAM RamLength SetRamLength These commands allow the programmer to use the RAM files within the Second Processor. RAM files provide a means of accessing user program arrays via the CMP file services. For more information on these commands and RAM files refer to the on- line help.
  • Page 91 Each time a UDFB is used in a DPL program, a separate instance is made that is a copy of the UDFB with unique local variables. The local variables of a UDFB cannot be watched in the SyPTPro Watch Window NOTE 7.7.4 UDFB Naming...
  • Page 92 Below is an example of a simple UDFB that adds two numbers and scales by a pre- defined amount (0.5): (Output%) = _simplefb(Input1%, Input2%) { // Initialization code: Scale% = 500 // initialise a local variable FBbody // main body code: Output% = Input1% + Input2% * Scale% / 1000 SM-Applications Modules &...
  • Page 93: Freeze And Marker

    Freeze and Marker Freeze input See Features section on pages 8, 9 & 10 for availability of Digital inputs on your module. Digital Input 0 (DIGIN0) can be used to ‘freeze’ the reference and feedback encoder counters. Figure 8-1 SM-Apps/SM-Apps Plus/Digitax St Plus Reference Freeze Input Internal drive encoder position...
  • Page 94: Freeze Input

    When freezing the SM-Universal Encoder Plus data, the Second Processor’s freeze NOTE input cannot be used. The freeze should come from the SM-Universal Encoder Plus module. Refer to the SM-Universal Encoder Plus User Guide for more information on using its freeze with the Second Processors. Freeze input The SM-Applications Lite, SM-Applications Lite V2 and Digitax Indexer are unlike the SM-Applications, SM-Applications Plus and Digitax ST Plus modules in that they do not...
  • Page 95 Figure 8-4 Apps Lite/Apps Lite V2 and Digitax St Indexer Feedback Freeze Input Internal drive encoder position counter #90.19 #81.43 #90.48 Feedback encoder freeze position Set on detection Reset to arm freeze Position Module Freeze pulse #90.18 Feedback Detection encoder select Feedback encoder freeze turns...
  • Page 96: Marker Pulse

    Marker pulse The Second Processor is able to cache the position and revolution count at the point when a Marker pulse is seen on the reference or feedback encoders. Figure 8-5 Second Processor Reference Marker Internal drive encoder position counter #90.35 #90.45 Reference encoder...
  • Page 97: Ctsync

    CTSync Overview Please see Features section on pages 8, 9 & 10 for availability of CTSync on your Second Processor. The Second Processor may be used to synchronize two or more drives. This will ensure that the drives run their internal functions at exactly the same frequency and time meaning all actions are performed at the same instant.
  • Page 98: Limitations

    Limitations • Only one CTSync Master is permitted on the Network • All CTSync Master and Slave Pos tasks must be set to the same update time (Pr 81.12 ) • 8 nodes maximum for 2-wire and 16 nodes maximum for 4-wire before line repeaters are required.
  • Page 99: Motion Engine

    Input Arguments: Channel%: 1,2 or 3 for the 3 available “channels”. Menu%: Drive menu number to write to. Parmeter%: Drive parameter number to write to. Output Arguments: Result%: 1: Operation succeeded. -1: Invalid channel specified. -3: Channel configuration being run by another task. -4: Parameter does not exist or is read-only 9.4.4 CTSYNCEnableOutputChannel...
  • Page 100 4. The reference data is retrieved by the Slave(s) using the CTSYNCGetSlaveReferences function block. 5. The reference data is output by the CTSYNCWriteOutputChannel function block (if required) to the channels specified. 6. The Slave output values are written to the Drive parameters via the Drive’s ASIC. For more information on the timings refer to Figure 9-2 Motion Engine timing SM-Applications Modules &...
  • Page 101 Figure 9-2 Motion Engine timing SM-Applications Modules & Motion Processors User Guide Issue Number: 4...
  • Page 102: Virtual Master Example

    Virtual Master Example 9.6.1 Example Master Code The following code shows how the master would be set up to generate reference data and send the data to the slaves. It also shows that the master acts as a slave by using the reference data it has generated.
  • Page 103 9.6.2 Example Slave code The following code shows how the slave(s) would read the reference data generated by the Virtual Master. Initial #81.06=26 //CTSync Slave #81.12=2 //Pos task at 500us REINIT //Set up Virtual Master Ramp Reference. Ramp% = 0 //Configure Slave output channel 1 to menu 18, parameter 11.
  • Page 104: Inter-Option Synchronization

    Inter-option Synchronization 10.1 Overview The Inter-option Module Synchronization scheme provides a mechanism to allow position control tasks on one or more modules to be synchronized to position control tasks on another module on the same drive without the need for external wiring. Synchronization is achieved by one module producing a trigger signal and one or more modules consuming the trigger signal.
  • Page 105 Before setting the parameters above, the POS tasks may be executing out of phase with each other as shown in Figure 10-1 POS Task Execution BEFORE Inter-option Synchronization . After setting the parameters to the values shown above the POS tasks will be executing in phase with each other as shown in Figure 10-2 POS Task Execution AFTER Inter-option Synchronization .
  • Page 106 Figure 10-2 POS Task Execution AFTER Inter-option Synchronization SM-Applications Modules & Motion Processors User Guide Issue Number: 4...
  • Page 107: Inter-Option Synchronization Example 2

    10.3 Inter-option Synchronization example 2 In this example CTSync will be needed, please check for the availability of CTSync for your module in the Features section on pages 8, 9 & 10. This example shows a scenario where the POS0 tasks of the modules in 2 Unidrive SPs need to be synchronized.
  • Page 108 The italicised Pr 91.22 is a status parameter and does not require setting. It shows whether the module has achieved the Inter-Option functionality specified in Pr 91.21 . For more information refer to Pr 91.12 . When a module is a CTSync Slave, it has to be the Inter-Option Synchronization NOTE Producer on the drive it is fitted to therefore Pr 91.21 will automatically be set to a value of 1.
  • Page 109 Figure 10-3 POS Task Execution BEFORE Inter-option Synchronization with CTSync C TS ync SM-Applications Modules & Motion Processors User Guide Issue Number: 4...
  • Page 110 Figure 10-4 POS Task Execution AFTER Inter-option Synchronization with CTSync CTSync SM-Applications Modules & Motion Processors User Guide Issue Number: 4...
  • Page 111: Position Control Tasks

    10.4 Position control tasks The position control tasks consist of POS0, APC and POS1. The tasks are run in this order (POS0 runs first followed by the APC which is followed by POS1). Because the POS0 and APC tasks may not take the same time to execute on different modules the APC and POS1 tasks cannot be phased Therefore when using Inter-option synchronization the user must be aware that the position tasks as a whole for each module will start in phase, not the individual tasks.
  • Page 112: Diagnostics

    Diagnostics This chapter details the following: • Run-time errors and trip codes • Handling of run-time errors • CTNet network status • Support 11.1 Run-time Errors A run-time error is an error which occurs in a specific operation of the Second Processor.
  • Page 113: Second Processor Run-Time Error Codes

    11.3 Second Processor Run-time Error Codes If the Second Processor detects an error during operation the error code will be placed in the following parameter: Pr 81.50 Second Processor Error Code Access Range 0 to 255 Default Update Rate On error For certain errors the user may select if the drive should trip as well.
  • Page 114 Table 11-2 SM-Applications Modules & Motion Processors Error Codes Error Trip ERROR Prog Reason Code Drive? task? Halted? Array index out of range. E.g. arr%[20] where arr% has only been DIMensioned to 19 elements. Control word user trip. Instigated by setting the trip bit in the control word #90.11 DPL program incompatible with target.
  • Page 115: Handling Run-Time Errors With The Error Task

    Table 11-2 SM-Applications Modules & Motion Processors Error Codes Error Trip ERROR Prog Reason Code Drive? task? Halted? Over-temperature Hardware unavailable. The user program attempted to access unavailable hardware. e.g. if access is made to digital I/O, RS485 port or CTNet on SM-Applications Lite module.
  • Page 116: Resource Monitoring

    .When the parameter is written to with a value of 1070 the Second Processor will initiate a warm-restart of the drive and any other options. This can be used to restart the user program (providing auto-run Pr 81.13 =1) and clear any drive trip. This reset action can be performed at any time, not just after a run-time error or in an ERROR task Writing 1070 to Pr 88.01 will result in any drive trip being automatically cleared as well as resetting all fitted options in the Unidrive SP.
  • Page 117 Pr 88.05 Motion Engine Peak Resource Detect Access Range 0 to 95 Default Update Rate See Pr 88.04 This parameter shows the peak that parameter Pr 88.04 reaches. It will show the lowest value that parameter Pr 88.04 reaches since the monitoring was enabled (Pr 88.03 ). It will give a realistic indication of the worst case available resources for the motion engine tasks so that the user can see how close the module has been to a motion engine task overrun.
  • Page 118: Support

    11.6 Support The information from the parameters described below should always be noted before contacting your supplier for technical support. 11.6.1 Module Firmware Pr 81.02 Firmware - Major Version Access Range 00.00 to 99.99 Default Update Rate N/A Pr 81.51 Firmware - Minor Version Access Range...
  • Page 119: Migration Guide

    Migration Guide This chapter outlines some of the major differences between the UD70 product for Unidrive Classic and the SM-Applications Modules & Motion Processors for Unidrive SP that may be helpful in converting (porting) user DPL programs. 12.1 Drive Parameter Differences The Unidrive SP parameter set has quite a few differences compared to the Unidrive Classic.
  • Page 120 Table 12-1 Setup Parameter Changes Parameter Description Changes Pr 17.23 EVENT trigger control See Pr 81.35 . This parameter is now CTNet ID. See parameter Pr 81.08 . Parameter now used by Pr 17.24 ANSI 2-wire turn-around CTNet. Pr 17.25 + Unused There are now 51 set-up parameters.
  • Page 121: General Features

    12.3 General Features 12.3.1 DPL Language DPL remains backwardly compatible. The following enhancements have been made though: • Addition of new constructs such as FOR...LOOP and SELECT...CASE. • Nesting: The stack size is now allocated on a per-task basis and is larger than that of the UD70, so more nesting is allowed.
  • Page 122: Second Processor Porting Aid

    to POS0 and POS1, 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. •...
  • Page 123 double-clicking the line in the error window SyPTPro will show the DPL source line containing the changed item. This porting aid can be activated by using the new $PORTING directive after the main header information: $AUTHOR Kevin Vedmore $COMPANY Control Techniques $TITLE Test Program $VERSION...
  • Page 124: Quick Reference

    Quick Reference Parameters Refer to section 5 on page 28 for full details of these parameters. Table 13-1 Setup Parameters Parameter Description Cross Ref Range Default Pr 81.01 Module option code Section 5.3.1 on page 29 0-499 Pr 81.02 Module firmware version Section 5.3.1 on page 29 0-99.99 Pr 81.03...
  • Page 125 Table 13-1 Setup Parameters (Continued) Parameter Description Cross Ref Range Default CTNet Easy Mode Slot 1 destination Pr 81.32 Section 5.3.1 on page 37 0-9999 (MMPP) CTNet Easy Mode Slot 2 destination Pr 81.33 Section 5.3.1 on page 37 0-9999 (MMPP) CTNet Easy Mode Slot 3 destination Pr 81.34...
  • Page 126 Table 13-4 Status Parameters Parameter Description Range Default Pr 88.01 Section 5.7 on page 47 0-9999 Error Code / Reset Pr 88.02 Section 5.7 on page 47 0-50 Task In Error Pr 88.03 Section 5.7 on page 48 POS Resource Monitoring Free Resource for Motion Engine Pr 88.04 Section 5.7 on page 48...
  • Page 127 Table 13-5 Second Processor Error Codes (Continued) Error Trip ERROR Prog Reason Code Drive? task? Halted? Invalid encoder configuration. Only applies to system file V01.02.01 or earlier. Invalid timer unit configuration Function block does not exist. Not Run Flash PLC Storage corrupt. Occurs at startup and will mean that the PLC register set (P/Q/T/U) and menu 20 Not Run will not have been restored.
  • Page 128 Table 13-5 Second Processor Error Codes (Continued) Error Trip ERROR Prog Reason Code Drive? task? Halted? Inter-Option module comms error with module unknown slot. • Slot selected as the reference or feedback does not contain a position option module • Attempt to change the Reference source or the Feedback source in more than one task.
  • Page 129 Index Communications ................31, 69, 122 Connections ..................16, 18 CTNet ..................16, 17, 21, 122 CTSync .......................97 Diagnostics ....................112 Digital I/O ....................46, 125 Downloading ....................27 DPL ..................25, 78, 85, 121 Error Codes ....................113 Firmware ....................118 Firmware Version ..................118 Freeze ....................93, 94 Hardware ....................121 Installation ....................14 Inter-option ....................104 Mapping parameters (fieldbus) ..............76...
  • Page 130 SMARTCARD .....................14 SM-LON module - front view ..............14 Status .......................126 SyPTLite ....................21, 24 SyPTPro ..................21, 22, 23 Tasks ....................79, 121 Terminals ....................128 Termination ..................17, 19 Timer ......................44 Timer Unit ....................125 Trip Codes ....................112 UDFB ......................90 Variables ....................81 Virtual Master ...................102 SM-Applications Modules &...
  • Page 132 0471-0062-04...

Table of Contents