background image

Manual – IPOSplus® 

331

23

Program commands

Assembler – Commands

Structure

JMP/System

Jumps to the label indicated in the command if comparison operation is fulfilled.

The system values listed can be queried directly by means of a JMP command. Other
system values are available as system variables or must be read in using the GETSYS
command and processed further.

Structure

Command structure

Mxxx JMP X1 OP X2, Myyy

Mxxx: Label 

(optional)

X1:

Variable

OP:

Operator: >  / > = / < / <= / = / !=

X2:

H = variable
K = constant
0 = zero (in a comparison with zero, only the operators = and 
!= are possible).

Myyy:

Jump label to which the program jumps if the condition is ful-
filled.

515195787

Command structure

Mxxx JMP X1, Myyy

Mxxx: Label 

(optional)

X1:

UNCONDITIONED: Unconditional jump.
N == 0: Jump if the speed is equal to zero.
N != 0: Jump if the speed is not equal to zero.
NOT IN POSITION: Jump if not in position
TP1: Jump if there is an edge change at touch probe terminal 
DI02.
NOT TP1: Jump if there is not an edge change at touch probe 
terminal DI02.
TP2: Jump if there is an edge change at touch probe terminal 
DI03.
NOT TP2: Jump if there is not an edge change at touch probe 
terminal DI03.

Myyy:

Jump label to which the program jumps if the condition is ful-
filled.

P

i

f

kVA

Hz

n

P

i

f

kVA

Hz

n

Summary of Contents for IPOS plus

Page 1: ...Drive Technology Drive Automation System Integration Services Manual IPOSplus Positioning and Sequence Control System Edition 11 2009 11645415 EN ...

Page 2: ...SEW EURODRIVE Driving the world ...

Page 3: ...ules 22 3 4 1 Technology options 22 3 4 2 Application modules 23 3 5 Technical data 25 3 5 1 MOVIDRIVE B 25 3 5 2 MOVITRAC B 25 3 5 3 MQx 26 3 6 Reference documents 27 3 6 1 General manuals 27 3 6 2 Manuals for serial interfaces fieldbuses 27 3 6 3 Manuals for synchronized axis movements 27 3 6 4 Manuals for application modules 27 3 6 5 Manuals for the MQx fieldbus interfaces 27 4 IPOS Variables 2...

Page 4: ...irection of rotation of the motor P35_ 61 6 5 4 3 Set counting direction P951 for the SSI absolute encoder 61 6 5 5 4 Set encoder scaling P955 61 6 5 6 5 Set position offset P953 61 6 5 7 6 Set Zero offset P954 62 6 5 8 7 Set encoder factors P942 and P943 62 6 5 9 8 Set P941 actual position source 62 6 6 Referencing 63 6 6 1 Type 0 Reference travel to zero pulse 67 6 6 2 Type 1 CCW end of the refe...

Page 5: ...cess data 103 8 3 2 Cyclical user specific process data 104 8 4 Acyclical communication 105 8 5 Special features of communication via SBus 105 8 6 Special features of communication via RS 485 106 8 7 Fieldbus control words and fieldbus status words 106 9 IPOSplus and Synchronized Motion 107 9 1 Introduction 107 9 2 Speed synchronization via master slave function 107 9 3 Synchronous operation with ...

Page 6: ... 12 2 5 P916 Ramp type 128 12 2 6 P917 Ramp mode 130 12 2 7 P918 Bus setpoint source 130 12 3 P92x IPOS monitoring 131 12 3 1 P920 P921 SW limit switch CW CCW 131 12 3 2 P922 Position window 131 12 3 3 P923 Lag error window 131 12 3 4 P924 Positioning interruption detection 131 12 4 P93x IPOSplus special functions 132 12 4 1 P930 Override 132 12 4 2 P931 IPOS CTRL W Task 1 132 12 4 3 P932 IPOS CTR...

Page 7: ... MotionStudio 143 13 2 2 Step 2 Creating a new project 145 13 2 3 Step 3 The first IPOSplus program 148 13 2 4 Step 4 Compiling and starting the IPOSplus program 151 13 3 Settings for the IPOSplus Compiler 154 13 4 Search function 157 13 5 Creating a new project 158 13 5 1 Project properties 158 13 5 2 Defining the program structure 159 13 6 Saving a project 161 13 7 Setting up a project managemen...

Page 8: ...8 14 14 Identifiers 190 14 15 Constants 190 14 16 IPOSplus variables in the compiler 191 14 16 1 Example 191 14 17 Declaration of global variables 191 14 18 Indirect addressing pointer 192 14 19 numof 193 15 Compiler Operators 194 15 1 Order of priority of operators 194 15 2 Unary operators 195 15 3 Binary operators 196 15 3 1 Example 196 15 4 Ternary operators 196 15 4 1 Example 196 16 Compiler C...

Page 9: ...210 17 3 6 _Copy 210 17 3 7 _FaultReaction 210 17 3 8 _GetSys 211 17 3 9 _Go0 217 17 3 10 _GoAbs 218 17 3 11 _GoRel 219 17 3 12 _InputCall 220 17 3 13 _Memorize 221 17 3 14 _MoviLink 222 17 3 15 _MovCommDef 227 17 3 16 _MovCommOn 229 17 3 17 _Nop 229 17 3 18 _SBusCommDef 230 17 3 19 _SBusCommOn 234 17 3 20 _SBusCommState 234 17 3 21 _SetInterrupt 235 17 3 22 _SetSys 236 17 3 23 _SetTask 238 17 3 2...

Page 10: ...de 1 265 18 9 3 Mode 2 265 18 9 4 Mode 3 265 18 10 Compiler programming frame 266 19 Compiler Error Messages 275 20 Assembler Introduction 276 20 1 Setting the user travel units 276 20 1 1 Travel distance factors NUMERATOR DENOMINATOR 276 20 1 2 UNIT 278 20 2 First steps 279 20 2 1 Starting the IPOSplus Assembler 279 20 2 2 Creating a new program 280 20 2 3 Compiling and starting the program 281 2...

Page 11: ...Setting analog outputs 296 23 Assembler Commands 297 23 1 General information 297 23 2 Overview of commands 297 23 2 1 Arithmetic commands 297 23 2 2 Bit commands 298 23 2 3 Communication commands 298 23 2 4 Positioning commands 299 23 2 5 Program commands 299 23 2 6 Set commands 300 23 2 7 Special unit commands 300 23 2 8 Comparison commands 301 23 3 Arithmetic commands 302 23 3 1 Fundamental ope...

Page 12: ...nit commands 349 23 9 1 ASTOP MEM TOUCHP WDOFF WDON 349 23 10 Comparison commands 355 23 10 1 Comparison operations CPEQ CPGE CPGT CPLE CPLT CPNE 355 23 10 2 Logical operations ANDL ORL NOTL 358 24 Assembler Examples 360 24 1 Flashing light sample program 360 24 1 1 Sample Controller 360 24 1 2 Sample Positioning 361 24 2 Hoist sample program 362 24 2 1 Characteristics 362 24 2 2 Settings 362 24 2...

Page 13: ...lus 13 Contents 24 4 Table positioning sample program 372 24 4 1 Characteristics 372 24 4 2 Settings 373 24 4 3 Input terminals 374 24 4 4 Output terminals 374 24 4 5 Program source code with remarks 375 Index 378 ...

Page 14: ...garded Measure s to prevent the danger Pictogram Signal word Meaning Consequences if disregarded Example General danger Specific danger e g electric shock DANGER Imminent danger Severe or fatal injuries WARNING Possible dangerous situation Severe or fatal injuries CAUTION Possible dangerous situation Minor injuries NOTICE Possible damage to property Damage to the drive system or its environ ment I...

Page 15: ...who work independently on the units You must also ensure that the operating instructions are legible 1 3 Exclusion of liability You must comply with the information contained in this manual and in the operating in structions of the units to ensure safe operation and to achieve the specified product characteristics and performance requirements SEW EURODRIVE assumes no liability for injury to person...

Page 16: ...tation of the units 2 1 General information Read through this manual carefully before you start working with IPOSplus This document does not replace the detailed operating instructions for the units This manual assumes that the user has access to and is familiar with the documentation on the units Never install damaged products or put them into operation Submit a complaint to the shipping company ...

Page 17: ... only be performed by qualified personnel Observe IEC 60364 and CENELEC HD 384 or DIN VDE 0100 and IEC 60664 or DIN VDE 0110 as well as the national accident prevention regulations Qualified personnel in the context of these basic safety notes are persons familiar with installation assembly startup and operation of the product who possess the required qualifications All work in further areas of tr...

Page 18: ...r MOVIDRIVE B With a reduced command set IPOSplus can also be used in conjunction with the MOVITRAC B control cabinet inverter and the MQx modules from decentralized tech nology Any deviations regarding the functionality compared to MOVIDRIVE B are pointed out in the respective technical data in the following sections IPOSplus for MOVITRAC B see page 118 IPOSplus for MQx see page 120 First the man...

Page 19: ...ing interrupts The user programs can contain several 100 program lines see Technical data page 25 Easy to use and comprehensive control options for IPOSplus units Access to all available options Input output card Fieldbus interfaces Synchronous operation card Extensive communication options System bus S bus RS 485 RS 232 with USS21A UWS11A UWS21A interface adapters Fieldbus interfaces Processing o...

Page 20: ...Sine Square Bus ramp Jerk limited Electronic cam I synchronous operation Status and monitoring functions Lag error monitoring Position reporting Software and hardware limit switches Encoder function 9 reference travel types The following functions can be changed during movement Target position Travel speed Positioning ramp Torque Endless positioning is possible Override function The following tech...

Page 21: ...entered in the program header Setpoint selection Depending on the hardware and the required setpoint the following options are available for the specification Analog setpoints Fixed setpoints Fixed setpoints analog setpoints Motor potentiometer Master slave operation with SBus Master slave operation with RS 485 DRS setpoint only with the DRS11 option Fieldbus fieldbus monitor setpoint only with th...

Page 22: ...870 P872 3 4 Technology options application modules 3 4 1 Technology options MOVIDRIVE units with the technology option ending OT in the unit designation offer additional functions such as Internal Synchronous Operation ISYNC Electronic cam Application modules Auto ASR Anti slip regulation currently only available with MOVIDRIVE A SBus TP SBus touch probe only available with MOVIDRIVE A in the MOV...

Page 23: ...s a protected user program designed by SEW that can be loaded into the inverter A comprehensive package of coordinated functions easy to use input boxes and finely tuned user guidance make startup easier to handle The user cannot adjust the IPOSplus program Overview of application modules Positioning 473361163 Winding 473365515 ...

Page 24: ...or errors since only those parameters required for the application have to be entered All relevant data for example terminal states or position values can be observed using a diagnostics tool during the ongoing operating process The functionality of each these modules is described in individual manuals Flying saw 473369867 Internal Synchronous Operation ISYNC only MOVIDRIVE B and MCH 473374219 Rot...

Page 25: ...s H453 to H560 Touch probe inputs 2 inputs processing time 200 µs Sampling interval of analog inputs 1 ms Sampling interval of binary inputs 1 ms Binary inputs outputs MOVIDRIVE B DIO option DIP option 8 inputs 6 outputs 8 inputs 8 outputs 8 inputs 8 outputs Analog inputs outputs MOVIDRIVE B DIO option 1 input 0 10 V 10 V 0 20 mA 4 20 mA 1 input 0 10 V 10 V 0 20 mA 2 outputs 10 V 0 20 mA 4 20 mA E...

Page 26: ...ximum program length program memory 4 kByte Command processing time Task 1 1 Assembler command ms Task 2 2 Assembler commands ms Interrupts Variables 512 of which 128 0 127 can be stored in non volatile memory System variable area IPOS variables H453 to H511 Touch probe inputs Sampling interval of analog inputs Sampling interval of binary inputs 4 ms input frequency at the counter inputs max 4 KHz...

Page 27: ...erfaces fieldbuses MOVIDRIVE MDX60B 61B Communication and Fieldbus Unit Profile DFx MOVIDRIVE fieldbus interface 3 6 3 Manuals for synchronized axis movements MOVIDRIVE Electronic Cam addendum to the system manual MOVIDRIVE Synchronous Operation Card Type DRS11 MOVIDRIVE Internal Synchronous Operation 3 6 4 Manuals for application modules MOVIDRIVE Positioning with Absolute Encoder Option DIP11 MO...

Page 28: ... must check that the final result of a cal culation lies within the number range The number range can be represented as follows in a number circle Example Each variable has an index that can be used to read and write variables using for ex ample the Movilink command _MoviLink MOVLNK The index is calculated as follows Index VarNo 11000 Example H371 has the index 11371 473666955 2147483647 0x7FFF FF...

Page 29: ...ller inhibit or the stop bit has been set If the drive is enabled again it continues with the positioning process Bit 1 TargetGAZ_Select Bit 1 0 Standard setting 360 output corresponds to 216 incr Bit 1 1 Setting for increasing the resolution 360 corresponds to the product from modulo numerator P961 x modulo encoder resolution P963 Positioning cannot be performed over several revolutions 454 ModTa...

Page 30: ...Measurement of the actual position value of a modulo axis In the IPOS program the command H474 H455 is called up cyclically and in SCOPE channel 1 is set to IPOS variable H474 Low and channel 2 is set to IPOS variable H474 High 475 Scope475 SCOPE 475 476 DRS_Ctrl DRS CTRL Signal level of the binary outputs of the synchronous operation board DRS11 READ and SET Bit terminal level 0 X40 9 AUSG0 1 X40...

Page 31: ...nary output is toggled in IPOS the physical output at the terminal is toggled 1 ms later if it is set as the IPOS output Bit IPOS name DIO DIO DIO DIP DIO field bus DIP DIP field bus Fieldbus P63x has an effect on DIO P63x has an effect on DIP P873 status word 2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 DO10 DO11 DO12 DO13 DO14 DO15 DO16 DO17 X23 1 X23 2 X23 3 X23 4 X23 5 X23 6 X23 7 X23 8 X23 1 X23 8...

Page 32: ...01 DO02 X61 1 X61 2 X61 3 X61 4 X61 5 X61 6 X61 7 X61 8 DB00 DO01 DO02 Bit 8 Bit 9 Bit 10 Bit 11 Bit 12 Bit 13 Bit 14 Bit 15 483 InputLevel INPUT LVL MOVIDRIVE A MOVIDRIVE B H520 Signal level of the binary inputs READ only Bit IPOS name DIO DIO DIO DIP DIO field bus DIP DIP field bus Fieldbus P870 sta tus word 2 0 1 2 3 4 5 DI00 DI01 DI02 DI03 DI04 DI05 Depends on the basic unit e g X13 1 X13 2 X1...

Page 33: ...nal Drive vibration warning 28 Condition Monitoring switching signal Vibration fault 29 Condition Monitoring switching signal Brake wear error 30 Controller inhibit 31 Reserved 485 T0_Reload T0 RELOAD READ and SET loading value for the user timer 0 cycle time The cycle time can be specified with H485 if a user timer TIMER0 H489 is to be used cyclically with the SET INTERRUPT SETINT command The tim...

Page 34: ... output that is to be parame terized to the IPOS IN POSITION function and in the system variable H473 bit 19 The IPOS IN POSI TION message is reset as soon as a GO command is placed The position window is always monitored provided an operating mode with IPOS is active P700 The posi tioning accuracy is not affected by the value of the position window Setting range 0 50 215 1 increments 494 LagWindo...

Page 35: ...OS2MOT 506 TpPos1_Ext TP POS1EXT 507 TpPos1_Mot TP POS1MOT 508 IPOS counter Counter value for the frequency input if it is activated via DIP switch S14 High resolution motor position if the interpolated position signal is set via P916 509 ActPos_Abs ACTPOS ABS Current actual position of the DIP absolute encoder SSI READ IMPORTANT System control variable Value must not be overwritten This actual po...

Page 36: ...th every zero pulse at the external encoder X14 520 InpLevelB INPUTLVLB MOVIDRIVE B MOVIDRIVE A H483 Signal level of the binary inputs READ only Bit IPOS name DIO DIO DIO DIP DIO fieldbus DIP DIP fieldbus Fieldbus P870 control word 2 0 1 2 3 4 5 6 7 DI00 DI01 DI02 DI03 DI04 DI05 DI06 DI07 Depends on the basic unit e g X13 1 X13 2 X13 3 X13 4 X13 5 X13 6 X16 1 X16 2 8 9 10 11 12 13 14 15 16 17 18 1...

Page 37: ... set The bit can only be reset in the user program Event driven telegrams can be sent and received via the SBus if a variable interrupt has been set for the corresponding bit in H522 The bit reset must make up the last command in the interrupt routine When designing a process image the user must ensure that no side effects are caused when the same object is received during processing cyclical rece...

Page 38: ...DCOMMAND PID controller Setpoint H546 and P271 are identical When P270 0 Parameter P271 H546 contains the required process setpoint 32000 Setpoint 32000 for speed control 1 increment corresponds to 0 2 min default 0 547 PID_CmdAdr PID CMDADR PID controller Setpoint address H547 and P272 are identical When P270 1 IPOS variable P272 H547 contains the address of the IPOS variable with the setpoint de...

Page 39: ...559 PID_Status PID STATUS PID controller status word Bit 0 Total of actual value and offset exceeds limit xemin Bit 1 Total of actual value and offset exceeds limit xemax Bit 2 Value of the controller P component is limited Bit 3 I component of the controller is deactivated Bit 4 Value of the controller I component is limited Bit 5 Value of the controller D component is limited Bit 6 PID controlle...

Page 40: ...H0 H1023 for MOVIDRIVE B There are no local variables that are only declared in either a task or a function There is an overview of the areas reserved for system variables in section IPOS variables Overview of the System Variables You can enter the commands in a program window You must create all program sec tions using the same language Assembler or Compiler 5 2 Task management for MOVIDRIVE A an...

Page 41: ...in task 1 once you can exclude this program section using an endless loop main Program code only initialization while 1 cyclical program code 473926155 1 Status of task 1 START started 2 Status of task 2 PSTOP stopped 3 Lightning icon to start task 1 4 STOP icon to stop the entire IPOS processing 474186507 1 Status of task 1 PSTOP stopped 2 Status of task 2 PSTOP stopped 3 Status of task 3 PSTOP s...

Page 42: ...Mxx STOP icon or _SetTask ST3_S TOP Task3Name or TASK TASK3 STOP Mxx As task 1 or as assigned task 2 or 3 Interrupt MOVIDRIVE A Via Task1 interrupt Cannot be interrupted Not available With other task 1 interrupt with higher pri ority Not available Interrupt MOVIDRIVE B Via Task1 interrupt With variable interrupt With variable interrupt With other task 1 interrupt with higher pri ority With variabl...

Page 43: ...hine control function or another MOVIDRIVE In this way IPOSplus also performs these functions when the interrupt routine is active in task 1 5 4 Tasks for MOVIDRIVE B In addition to the general section in chapter Task Management for MOVIDRIVE A and B this section provides specific implementation information for MOVIDRIVE B 5 4 1 Processing time for task 1 task 2 The factory setting for the task pr...

Page 44: ...the guaranteed run time of the individual program lines is not important are processed faster in task 3 5 4 3 Implementation information In contrast to MOVIDRIVE A you program the motion sequence in task 1 or task 3 Program the following functions in task 2 or task 3 Rapid time critical processes Calculations Monitoring for system values Communication with the SEW operator terminals Copying variab...

Page 45: ...ensures the fastest total application performance if tasks 1 and 2 run with the minimum speed 5 5 Interrupts An interrupt triggered by an event interrupts the processing of the task it is assigned to The entire interrupt routine is run through once as long as it is not interrupted by an interrupt with a higher priority of the same task An interrupt that is activated by _SetInterrupt or SETINT can ...

Page 46: ... instead of task 1 5 6 2 Error interrupt The entire interrupt routine is run through once if an error occurs After one run through an Assembler command from task 1 is processed before the system checks whether the error still occurs If the error is still present the interrupt routine is processed again To remain in the interrupt routine until the error is no longer present the routine must con tai...

Page 47: ...the touch probe has been released with the command _TouchProbe condition or TOUCHP and the edge condition is fulfilled Then processing for task 1 continues The interrupt routine is only called a second time when the touch probe is released again and the condition is fulfilled See also the com mand _TouchProbe or TOUCHP Sample fnTouchInterrupt H0 Main function IPOS initial function main _SetInterru...

Page 48: ...routine This results in the following options If a program section is to be processed at equal intervals with the timer0 interrupt the timer0 must be reloaded with the T0_Reload for example If a program section is to be run through once with the timer0 interrupt at a defined time after IPOS has been started the timer0 must be set to 1 in the interrupt Sample fnTimerInterrupt H0 H0 1 T0_Reload 1000...

Page 49: ...variable interrupt with the data structure as of the variable pData which runs the myfunction function when the interrupt event occurs Assembler VARINT Hxx Mxx Activates a variable interrupt with the data structure as of variable Hxx which performs the commands as of the Mxx label when the interrupt event occurs The following properties and functions of the variable interrupt can be defined in the...

Page 50: ...able interrupt can be triggered as long as the corresponding variable interrupt has been activated beforehand A variable interrupt can be used to configure time controlled program processing for ex ample the cyclical calculation of acceleration from a speed In addition when a high priority variable interrupt is being processing you can delete a pending lower priority interrupt by deleting the corr...

Page 51: ...tSet StdOutpIPOS 1 Set DO01 fnCLOSEvalve Switch off metering unit _BitClear StdOutpIPOS 1 Delete DO01 hCLOSEvalve Mode 0 Deactivate stop IRQ _SetVarInterrupt hCLOSEvalve fnCLOSEvalve Main function IPOS initial function main Initialization part hOPENvalve Control 2 Interrupt task3 hOPENvalve IntNum 0 continuous no hOPENvalve SrcVar numof ModActPos Modulo motor encoder hOPENvalve CompVar 910 5 on th...

Page 52: ...rrupt routine and task3 _SetTask ST3_START fnTask3 _SetVarInterrupt hOPENvalve fnOPENvalve Main program loop while 1 cyclical program section End while 1 End main Example solved in the Assembler Necessary parameter settings P620 IPOS output P960 for example SHORT 474256139 P i f kVA Hz n P i f kVA Hz n ...

Page 53: ... encoder at X15 Encoder type Absolute encoder on DIP11 P941 Absolute encoder DIP Hiperface encoder incre mental encoder simulation incremental encoder P941 External encoder X14 Incremental encoder Resolver Hiperface encoder P941 Motor encoder X15 Connection X62 DIP11 X14 basic unit X15 basic unit Actual value on variable H509 ACTPOS ABS ActPos_Abs H510 ACTPOS EXT ActPos_Ext H511 ACTPOS MOT ActPos_...

Page 54: ...otor encoder 474539019 An incremental encoder resolver Hiperface encoder X15 must be installed on the motor In IPOSplus positioning commands for example GOA are performed with reference to the actual source position here motor encoder X15 vmax maximum speed amax maximum acceleration PG Profile generator Pact Actual position of the motor encoder PC Position controller nact Actual speed nC Speed con...

Page 55: ...generator PC Position controller nact Actual speed nC Speed controller ABS absolute encoder IPOS IPOSplus program vmax amax PG PC nC nact M DIP ABS IPOS Position control with incremental encoder on the motor Processing the absolute encoder position in the IPOSplus program 474543627 Position control is performed in IPOSplus using the motor encoder connected to X15 An incremental encoder resolver is...

Page 56: ... Speed controller ABS absolute encoder EXT external encoder SV System variable IPOS IPOSplus program vmax amax PG PC nC nact M DIP ABS Pact SV O X14 EXT Processing the absolute encoder position in the IPOSplus program 474585099 The position information of the absolute encoder is mapped automatically in an IPOSplus variable and can be processed using program control The DIP11 or a HIPERFACE encoder...

Page 57: ... encoder H510 For all other encoder types H510 0 increments The external encoder can be refer enced as the motor encoder see the chapter Reference Travel 6 4 2 Slip compensation with external encoder A trolley on wheels is run on rails The carriage is moved by powering the wheels with a gearmotor The connection between the wheels and the rails is non positive This causes slip between the rotationa...

Page 58: ...xample Motor encoder 4096 Inc ext encoder 800 inc 5 12 Value 4 Fixed 1 2 4 8 16 32 64 P943 Encoder fac tor denomi nator Denominator to deter mine the ratio between the motor encoder and the ext encoder Number of increments in H511 to read ACTPOS MOT for a certain distance s max 32767 P942 Encoder fac tor numerator Numerator to determine the ratio between the motor encoder and the ext encoder Numbe...

Page 59: ...ACTPOS EXT Variable H506 shows the touch probe position 1 TP POS1EXT Variable H504 shows the touch probe position 2 TP POS2EXT The variables are always evaluated with parameter P944 INFORMATION The calculation of P210 P gain hold controller is optimized for P941 motor encoder at start up If you use an external encoder or absolute encoder the parameter may have to be set to a lower value P i f kVA ...

Page 60: ...pective of the setting of parameter Actual position source P941 If the DIP encoder has been set manually the reference travel only references the motor encoder also irrespective of the setting of P941 Alternatively you can perform startup for the DIP11 option for the absolute encoder step by step as described below 6 5 2 1 Select encoder type P950 In P950 Encoder type select the encoder you are us...

Page 61: ...e absolute encoder is multiplied by this value The pa rameter is set so the travel information ratio between the motor encoder and the abso lute encoder is as close to 1 as possible First set the parameter to 1 Note down the values of variables H509 ACTPOS ABS and H511 ACTPOS MOT Move the drive by at least 1 motor revolution Determine the difference between the noted and the current values of the ...

Page 62: ...at an IPOS operating mode has been set in P700 Operating mode There are positioning commands in the IPOSplus program to control the motor con nected to MOVIDRIVE Set the Source actual position to Absolute encoder DIP if the motor is to be positioned using the absolute encoder 476717707 Px Non linearized position value of encoder Pabs Actual position value for ramp generator and position controller...

Page 63: ...ro pulse and the arguments of the IPOSplus command _Go0 or GO0 and that result from the reasonable combination of the following characteristics Encoder is set without reference travel no reference travel Search direction is set direction of movement at start of reference travel Referencing is set to the hardware limit switches Referencing is set to zero impulse only possible in external encoders w...

Page 64: ...stem occur exception for Hiperface encoders see the note below For advanced users MOVIDRIVE offers the option of setting an absolute encoder for which a new encoder offset is calculated and described at the reference point when the drive is not enabled and when it is in the safe stop status for example It is also possible to evaluate distance coded encoder systems using complex IPOSplus programmin...

Page 65: ...s that in this case only the end of the reference cam can be selected as the reference point The length of the reference cam and the reference speeds must be selected so the drive can reliably decelerate to the slower reference speed reference speed 2 on the reference cam The end of the reference cam or the closest zero pulse of the encoder system can be used as reference point The zero pulse can ...

Page 66: ...3 Between the reference cam and the left hardware limit switch LHWLS CCW hardware limit switch RHWLS CW hardware limit switch CAM Reference cam RefCAM Reference position cam Movement to this position takes place when the argument of the GO0 reference travel command contains CAM RefZP Reference position zero pulse Movement to this position takes place when the argument of the GO0 reference travel c...

Page 67: ...5 and sets the current position to the reference reference position 6 6 2 Type 1 CCW end of the reference cam The reference position is the left end of the reference cam or the first zero pulse to the left after the end of the reference cam One of the binary inputs P600 606 must be set to REFERENCE CAM Reference travel starts in a CCW direction P901 Reference speed 1 is used up to the first positi...

Page 68: ...to the first positive edge of the reference cam then P902 Reference speed 2 is used If reference travel is started via the positive edge on the REF TRAVEL START input the drive is either referenced to the falling edge of the reference cam or to the zero pulse after the falling edge of the reference cam depending on the setting in P904 Referenc ing to zero pulse If reference travel is started with ...

Page 69: ... zero pulse should be set to YES If the reference travel is started via the IPOSplus command Go0 you have to set the argument ZP 6 6 5 Type 4 CCW limit switch The reference point is the first zero pulse to the right of the CCW limit switch The setting Right end of the CW limit switch is not important because after reference travel the drive could be located in the switch hysteresis of the limit sw...

Page 70: ...the machine operator can tell where the drive is located within each feed movement 6 6 7 Type 6 Reference cam flush with CW limit switch The reference position is the left end of the reference cam or the first zero pulse to the left after the end of the reference cam One of the binary inputs P600 606 must be set to REFERENCE CAM The reference travel starts in CW direction with P901 reference speed...

Page 71: ...tion is the right end of the reference cam or the first zero pulse to the right after the end of the reference cam One of the binary inputs P600 606 must be set to REFERENCE CAM The reference travel starts in CW direction with P901 reference speed 1 until the first positive edge of the reference cam is reached Then P902 reference speed 2 is used As opposed to type 2 the drive starts in CW directio...

Page 72: ...ve no effect It makes sense to use this type of reference travel with absolute encoders and for drives that are to be referenced at standstill For example the position of a feed axis can be set to zero when the drive is at a standstill In this way the machine operator can tell where the drive is located within each feed movement In contrast to type 5 type 8 reference travel can also be performed w...

Page 73: ... 90 modulo value Permanently accurate positioning without long term drift or positioning errors even for non integer gear unit reduction ratios as long as the project planning guidelines are adhered to Previous solutions involved mounting an external synchronous encoder or using a digital input to register the zero cross over which meant additional programming in IPOSplus Absolute position specifi...

Page 74: ... unit The mechanism of the application is simulated during startup You have to specify the exact number of teeth of the gear unit and the additional gear if required This informa tion is represented in the following SHELL parameters Modulo numerator and denominator P961 P962 Modulo encoder resolution P963 The user can use the following IPOSplus system variables to specify target positions in outpu...

Page 75: ...odulo control H455 Actual modulo position output H456 Modulo numerator ABS EXT DIP MOT H509 H510 H511 P941 H453 Bit 1 H456 P961 x P963 H455 1 0 2 16 P961 P962 P963 MODULO INFORMATION If the drive is to be positioned to the target position in the modulo range the drive start positioning when the target position is written to variable H454 MOD TAGPOS GO commands refer to the IPOSplus encoder and can...

Page 76: ...to below as 216 360 standard setting In this case the higher value bit range can be used for specifying whole number 360 rotations 360 32 bit referred to below as 232 360 standard setting This notation should be avoided due to the restriction on the maximum range of representation If used the product of modulo numerator and modulo encoder resolution corresponds to one 360 revolution Sample positio...

Page 77: ...e travel strategy for positioning is selected via the SHELL parameter 960 Modulo function The modes can be changed using an IPOSplus program with the MOVILINK command see section User interface The examples refer to the selected resolution 216 360 A motor encoder has been entered as the IPOSplus encoder P941 Source actual po sition MOTOR ENC X15 Short distance Modulo mode Short distance P960 SHORT...

Page 78: ...o 0x FFFF0000 CW Modulo mode CW P960 CW The drive moves from the current actual position H455 MOD ACTPOS clockwise to the target position H454 MOD TAGPOS Target position that can be represented H454 MOD TAGPOS k 360 0 360 k 216 0 216 1 Only positive values are permitted in the high part If this condition is not met and the sign bit 232 is set the drive inverter displays the fault status IPOSplus p...

Page 79: ...drive inverter displays the fault status IPOSplus program error Parameters and variables Parameters and variables for the modulo function See sections IPOSplus Parameters and System Variables 477247627 Parameter no Name P 960 Index 8835 Modulo control P 961 Index 8836 Modulo numerator P 962 Index 8837 Modulo denominator P 963 Index 8838 Modulo encoder resolution INFORMATION To use the modulo funct...

Page 80: ...Modulo denominator P962 Modulo encoder resolution P963 Resources for determining the number of teeth in the gear unit SEW Technical Manual SEW Wingear program to reduce the numerator denominator factors Modulo range of representation and maximum output position Condition for the range of representation Modulo encoder resolution x modulo numerator 231 Condition for maximum output position 231 modul...

Page 81: ...tep 3 Modulo range of representation and maximum target position Check the modulo range of representation The product of the modulo encoder resolution and modulo numerator must be 231 decimal 2147483648 Modulo numerator x modulo encoder resolution 113553 4096 465113088 The condition has been met the target position can be represented Check the maximum target position The maximum target position co...

Page 82: ... Determining the SHELL parameters Number of teeth of the additional gear chain sprocket ZAG1 5 Carrier spacing in chain links ZAG2 36 i additional gear 5 36 Modulo numerator 1021977 Modulo denominator 1360 Modulo encoder resolution 4096 Technical data Gear unit type KA47B Output speed rpm 19 Motor speed rpm 2000 Gear unit reduction ratio i 104 37 Motor type DY71S 477253515 M M i i M M Z Z Z Z Z Z ...

Page 83: ... or hardware terminal Why is it recommended to set P960 to SHORT The travel strategy is adhered to strictly when the target position is set during standstill If the drive is set to P960 CW for example when the target position is set only one increment CW away the drive moves through a complete rotation Why does positioning not start once the target position has been sent The drive must be started ...

Page 84: ...gram An unlimited number of outputs is theoretically possible but the number of outputs is practically limited by the IPOSplus program length and the acceptable execution time New MOVIDRIVE units MDx_A MCV MCS MCF as of version 14 MCH as of ver sion 13 and MDx_B and the technology options have an expanded cam controller with eight outputs that is cyclically calculated in the background by the firm...

Page 85: ...or not The GETSYS command initializes the function and forms the new status of the output a single time once the command is given The command must be activated every time a new status is required in the IPOSplus program the new generation of the cam output depends on the program cycle time The reference value can be set typical reference sizes are H511 Current actual position motor encoder H510 Cu...

Page 86: ...2 GSCAM DestVar Number of variables in which the output will be set or reset H 3 GSCAM BitPosition Position of the bit in variable H 2 if the cam output is assigned to a unit output e g H481 this binary output is to be reserved with P620 P639 as an IPOSplus output H 4 GSCAM BitValue Polarity of the output 0 bit set if the reference variable H 0 has been set within the position window H 6 to H 13 1...

Page 87: ...ve is in the first and in the last motor revolution or in a range of 10 around the center of the travel range A second output is to be set when the drive is in the second revolution Required parame ter settings P620 IPOSplus output P621 IPOSplus output 477561867 0 t 3600 40960 Inc t t 360 4096 Inc 720 8192 Inc 0 1 1 H481 1 H481 2 3240 36864 Inc P i f kVA Hz n P i f kVA Hz n ...

Page 88: ...window left limit value Cam1 PosR1 4096 1st window right limit value Cam1 PosL2 20366 2nd window left limit value Cam1 PosR2 20594 2nd window right limit value Cam1 PosL3 36864 3rd window left limit value Cam1 PosR3 40960 3rd window right limit value Cam2 SourceVar numof ActPos_Mot Reference size motor encoder Cam2 DbPreCtrl 0 no delay time compensation Cam2 DestVar numof StdOutpIPOS Output onf Do...

Page 89: ...operating modes with technology options Eight outputs cam bits are available Up to four position windows and a delay time compensation can be defined for each output corresponds to four cams on a mechanical cam disk The outputs 1 4 are processed every 1 ms outputs 5 8 every 4 ms The GETSYS command initializes and starts the function The cams are generated with the fixed time interval in the backgr...

Page 90: ...m or internal synchronous operation You can stop the expanded cam function by calling up GETSYS with bit 31 0 This step stops processing in the firmware and the function no longer requires any processor capacity If however the CamState is assigned 0x8000 0000 the cam function will also be stopped but runs in the background without setting any outputs Starting the expanded cam control Compiler _Get...

Page 91: ...ior to shifting with H 2 NOT on the target variable defined with H 6 H 4 CamForceOff Mask to force deletion of outputs The mask takes effect on the internal data buffer prior to shifting with H 2 NOT on the target variable defined with H 6 CamForceOff dominates CamForceOn H 5 CamSource Bit 31 switches between preset reference variables and an indicator to a random reference variable Bit 31 0 0 enc...

Page 92: ...the CW limit value If a modulo axis requires a position window that exceeds the 360 0 limit then this area will have to be divided into two position windows This process lets the operator set three related ranges for this output H 2 LeftLimit1 CCW limit window 1 H 3 RightLimit1 CW limit window 1 H 8 LeftLimit4 CCW limit window 4 H 9 RightLimit4 CW limit window 4 477814283 INT CAM 1 Internal cam si...

Page 93: ...5 An output is to be set when the drive is in the 5 range of the stations Comment an active modulo function will resolve a full load rotation of 360 with 65536 increments see modulo function Required parame ter settings P620 IPOSplus output P960 e g SHORT P961 5 P962 1 P963 4096 477818635 355 64626 Inc 360 65536 Inc 5 910 Inc 175 31858 Inc 180 32768 Inc 185 33678 Inc 0 180 360 0 1 P i f kVA Hz n P...

Page 94: ...outputs MyCamControl CamSource numof ModActPos 1 31 Actual position value in modulo format MyCamControl CamDestination 481 Basic unit outputs MyCamControl CamOutputs 1 Number of cam discs max 8 MyCamControl CamDataStr0 numof CamData0 Start of the cam structure 1 output bit 0 CamData0 DeadTime 0 CamData0 CamAreas 3 3 cam ranges due to modulo overflow in the win dow CamData0 LeftLimit1 64626 355 at ...

Page 95: ...Manual IPOSplus 95 6 Cam controllers Position Detection and Positioning Example solved in the Assembler 477835787 P i f kVA Hz n P i f kVA Hz n ...

Page 96: ...OVIDRIVE B MOVITRAC B MQx module EI7C X EI76 X X EI72 EI71 ES16 X NV26 proximity sensor X INFORMATION If the resolution is too high the encoder might not be evaluated correctly at nominal speed Select an encoder with a resolution that suits the pulse frequency of the inverter Observe the technical data of the built in encoders in Drive Engineering Practical Implementation Encoder systems and the t...

Page 97: ...llowing technical data Simple positioning with MOVIDRIVE B requires the inverter to be in one of the following operating modes VFC without feedback V f characteristic curve Binary inputs Encoder signals 2 tracks Track A and track B Phase position 90 20 Mark space ratio 1 1 20 Max pulse frequency 350 Hz Connection of track A MOVIDRIVE B Terminal X13 3 DI02 Connection of track B MOVIDRIVE B Terminal...

Page 98: ...igital inputs of the MOVITRAC B via terminals X12 5 DI04 and X12 4 DI03 2 Set the following parameters indexes P602 binary input DI03 to IPOS input Index 8338 to 16 P603 binary input DI04 to IPOS input Index 8339 to 16 3 Set index 8845 to 1 to activate the simple positioning The position is determined in the IPOS variable H511 ActPos_Mot and is always 0 when the line voltage is switched on A refer...

Page 99: ...e proximity sensor evaluation is activated by setting the parameters for the two digital inputs DI0 and DI1 P600 und P608 to MQX ENCODER IN The parameter settings can be changed using the MOVITOOLS MotionStudio interface or in the initialization section of IPOSplus IPOSplus can address any MQx parameters at address 253 using the Movilink command The indices of the inputs are 8844dec for DI0 P608 a...

Page 100: ...one of the encoder cables does not change for 1 s a wire break is detected and displayed by fault 14 MOVIMOT stops and can only be started again when the MQx has been reset During this process the current position is lost and the system must be referenced again Encoder monitoring can be switched on or off using parameter P504 Encoder monitoring for motor 7 5 5 Storing the actual position When a MO...

Page 101: ...nnect the NV26 built in encoders proximity sensors refer to the Drive System for Decentralized Installation PROFIBUS Interfaces Field Distributors manual Two simple 4 pole shielded sensor cables with plug and M12 socket are required for connection The cable connects the NV26 proximity sensors to DI0 and DI1 of the bus module We recommend you use metal M12 plug and sockets and connect the shielding...

Page 102: ... to be sent via fieldbus P870 875 process data configuration Specifies the data to be exchanged via the bus The IPOSplus program code is generally the same for fieldbuses that is it is identical for INTERBUS and PROFIBUS A number of program examples displaying the connection between IPOSplus and the fieldbus are included in the Communication and Fieldbus Unit Profile manual Parameters P870 P877 ca...

Page 103: ... 1 Cyclical preset process data If a value for example SPEED is set in the parameters P870 P875 the process data item is linked directly with an internal value The drive receives a double word as a position setpoint MOVIDRIVE copies this value to variable H499 SetpPosBus and if P916 ramp type is set to BUSRAMP it automati cally uses this value as the position setpoint If P916 Ramp type LINEAR SINE...

Page 104: ...ems with user specific description should be transferred P870 877 IPOS PI DATA or IPOS PO_DATA At output word 2 3 the PLC transfers the position setpoint to the drive at input word 3 the drive sends the drives sends the actual position in modulo format 1 10 0 0 360 0 Compiler include const h Process data data structures GSPODATA10 tPA Output data PLC Drive SSPIDATA10 tPE Input data Drive PLC Main ...

Page 105: ...rter is accessed via index addressing For the index of a parameter refer to the parameter list or press CTRL F1 in the input field of the parameter The index of a H variable is the number of the variable plus 11000 for example H34 has the index 11034 With MOVIDRIVE B for example a parameter service is processed in a 5 ms time slice 8 5 Special features of communication via SBus If you use the SBus...

Page 106: ...ITRAC B due to the low transmission speed you should limit the use of the RS 485 interface to acyclical parameter communication 8 7 Fieldbus control words and fieldbus status words For detailed information regarding the control and status word refer to section SEW unit profile in the Communication and fieldbus unit profile manual P i f kVA Hz n P i f kVA Hz n ...

Page 107: ... for multiple axes to be operated at a synchronous angle in relation to one another or with an adjustable proportional relation ship electronic gear The system differentiates between master and slave drives The master drive used for positioning one or more slave drives can also be an incremental encoder The slave drive s follow s the specified master positions The basis for synchronous operation i...

Page 108: ... 9 OUTP0 to X40 1 free mode Command sequence in Assembler Set OUTP0 and thus DRS input Free running in free running mode the red LED on the DRS card is lit BSET H476 0 1 Switch back to the synchronous operation function The red LED does not light up in synchronous operation mode BCLR H476 0 0 Write to BCLR H476 0 Command sequence in the Compiler _BitSet 476 0 _BitClear 476 0 478829067 DRS11B X40 X...

Page 109: ...et is greater than P514 Command sequence in Assembler BSET H484 22 1 Set DRS11 to Set zero point WAIT 15 ms DRS specific waiting time of 15 ms BCLR H484 22 0 Reset function Set zero point Command sequence in the Compiler _BitSet 484 22 _Wait 15 _BitClear 484 22 Control example The drive should be switched to Free running using input DI10 Inputs DI10 DI17 can be either physical terminals on DIO11A ...

Page 110: ... between X40 9 and X40 0 by setting the output X40 9 _BitSet DRS_Ctrl A_DRS_OUTP0 Free running_Off Free running is deactivated over the external jumper between X40 9 and X40 0 by deleting the output X40 9 _BitSet DRS_Ctrl A_DRS_OUTP0 DRS_Zero point _BitSet ControlWord _DRS_SetZeroPoint Set zero point via control word _Wait 15 Response time in ms _BitClear ControlWord _DRS_Set zero point Delete bit...

Page 111: ...u can set reset the two programmable out puts of the DRS11 Offset wiring example Output X40 10 is set using the BSET H476 1 command A signal is sent to X40 2 via a jumper from X40 10 to X40 2 and the Offset function is activated 478833419 DRS11B X40 X44 X41 X42 X43 Sync OFF 5 1 9 6 5 1 9 6 5 1 9 6 1 2 3 4 5 6 7 8 9 10 11 1 2 3 INØ 5 DCOM V024 OUTØ 1 DGND V DC 24 V P i f kVA Hz n P i f kVA Hz n ...

Page 112: ...ffset1 Command sequence in Assembler Set the drive to the function Offset1 Slave drive changes its position in relation to the master to the value stored in offset1 BSET H476 1 1 Switch back to output terminal The slave drive moves back to the previous position in relation to the master BCLR H476 1 0 Write to BCLR H476 0 Command sequence in the Compiler _BitSet 476 1 _BitClear 476 1 P i f kVA Hz n...

Page 113: ...er settings for all used inputs at the IPOS input DI10 0 no free running DI10 1 Free running if operating mode CFC SYNC is set DI11 0 no function DI11 1 Set DRS zero point pulse DI12 1 Positioning operating mode CFC IPOS DI12 0 Synchronous operation operating mode CFC SYNC The operating modes can be changed using the command _SetSys SS_OPMODE H In which the value of the H variable has the followin...

Page 114: ...sition H0 define CFC_and_IPOS 13 Operating mode CFC IPOS define CFC_and_SYNC 14 Operating mode CFC synchronous operation Subprograms Free running_On Free running is activated over the external jumper between X40 9 and X40 0 by setting the output X40 9 _BitSet DRS_Ctrl A_DRS_OUTP0 Free running_Off Free running is deactivated over the external jumper between X40 9 and X40 0 by deleting the output X4...

Page 115: ...e positioned according to a specified offset and startup cycle An offset be tween the master and slave drive comes into effect after a specified number of master increments The synchronization mechanism time controlled synchronization process as seen with the DRS11 synchronous operation card is also implemented A variation between the angle of the slave drive and the master drive resulting from fr...

Page 116: ...h reference to this machine angle the Movement plan These control points specify the position of the particular slave drive with reference to the master The master drive can either be a physical drive or a virtual master encoder The master encoder can also be switched over using the synchronized system bus SBus The re lationship between the positions of the master drive and the slave drive is ofte...

Page 117: ...e used in the application program see section 3 2 Overview of System Variables Synchronous operation is controlled using IPOSplus variables within an IPOSplus program All states of the electronic cam can be viewed and set in the variable range for synchronous operation from H370 to H450 For more detailed information refer to the Addendum to the Electronic Cam system manual INFORMATION If the movem...

Page 118: ...echnology units Unlike MOVIDRIVE B the standard unit must first be enabled for IPOSplus be fore you can start programming Enabling IPOS plus in the standard unit 1 Open parameter tree 2 In the Unit functions setup parameter group set IPOS enable to ON Now you can program IPOSplus as usual using Compiler or Assembler 769774603 In the technology unit IPOSplus is enabled as standard P i f kVA Hz n P ...

Page 119: ...0 of the MOVIDRIVE B IPOSplus program memory of 16 kB Task 3 must not be used The program code programmed in task 3 is not executed No feedback is given on this Unsupported functions cause error 10 IPOS ILLOP Refer to the following sections for a detailed description of the differences Overview of commands for standard functions page 205 Technical data page 25 for MOVITRAC B Position detection pag...

Page 120: ...ace The NV26 proximity sensor provides you with a simple positioning system that can be inte grated in systems in conjunction with an MQx control program as standard components In principle the same IPOSplus program as used in MOVIDRIVE A runs in the MQx interface However full functionality cannot be realized in some cases The following section describes these differences The parameter group P900 ...

Page 121: ...r Func tions and Assembler Commands For any additional information refer to the online help of the programming tool selected There are no limitations compared to MOVIDRIVE A for loops and operators The fieldbus process data buffer can be accessed via the commands _GetSys and _SetSys The RS 485 interface for MOVIMOT can be influenced via the _MovComm commands 11 4 Digital inputs and outputs The DO0...

Page 122: ... H from where the read data is stored or from where the data to be written is obtained does not lie in the valid range H0 H450 502 MOVLNK Bus type is invalid Only 2 RS 485 2 permitted 503 MOVLNK An invalid PDU type was entered in format Only acyclical frames 128 134 are permitted 504 MOVCOM _MovCommDef command was called after cyclical communication was started _MovCommDef is locked by MovComOn 50...

Page 123: ...n P941 The value is displayed after the reference travel Ideally it should be half the encoder resolution after quadruple evaluation Relocate the cam if necessary 12 1 1 P900 Reference offset Setting range 231 1 0 231 1 Reference offset zero offset is used to determine the machine zero origin The follow ing applies Machine zero reference position reference offset The reference offset always refers...

Page 124: ...stablish the machine zero of a machine This setting also defines the search direction for the reference cam in the individual ref erencing phases Use parameter P904 Referencing to zero pulse page 126 to determine if the reference travel takes place to the edge change of the reference cam or the next zero pulse of the encoder Prerequisite for execution of reference travel is a drive that is ready a...

Page 125: ...reference offset Reference travel should take place to zero pulse Type 5 No reference travel Reference position current position Machine zero reference offset Type 6 Reference cam flush with CW limit switch First search direction is CW Reference position First zero pulse or falling edge to the left of the reference cam Machine zero reference position reference offset Note Reference cam and limit s...

Page 126: ...ts the actual position of the external encoder H510 H510 Encoder value P947 The actual position is determined directly after the values have been entered A Hiperface multi turn encoder must be referenced once a Hiperface single turn en coder must always be referenced Note When reference travel of a drive system takes place with a Hiperface encoder the Hip erface offsets P905 or P947 are recalculat...

Page 127: ...g operations P917 Ramp mode Mode 2 Positioning ramp 2 P912 is used for deceleration of the travel speed during travel Positioning ramp 1 P911 is used for acceleration 12 2 3 P913 P914 Travel speed CW CCW Setting range 0 1500 6000 rpm Specifies the speed used for positioning The setting must be adjusted to the maximum motor speed 12 2 4 P915 Velocity precontrol Setting range 199 99 0 100 199 99 Whe...

Page 128: ... torque and therefore the acceleration is trapezoidal to limit the jolting action Over time jerk limitation builds up the torque in linear form during acceleration until the maximum value is reached In the same way the torque is reduced again over time in linear form to zero This means that system vibrations can be virtually avoided A setting range can be selected from 0 005 ms to 2 ms P933 The po...

Page 129: ...s or Fieldbus Set one process output data word to position HIGH and another one to position LOW Important Position resolution via PI data assignment is 4096 increments per revolution 12 bit IPOSplus variable H508 provides the motor position extended to 16 bits The IPOSplus variable ActPos_Mot H511 has a position reso lution of 4096 increments per revolution 12 bit Position specification via SBus S...

Page 130: ... other positioning operations If position interpolation 12 bit or 16 bit is active it runs in mode 1 without dead time compensation P917 MODE 2 Positioning ramp 2 is always used for deceleration if the travel speed is changed during travel P911 positioning ramp 1 is used for acceleration If position interpolation 12 bit or 16 bit is active mode 2 activates a dead time compensation 12 2 7 P918 Bus ...

Page 131: ...oftware limit switches have no effect They are only activated again after the drive has been referenced If P838 Fault response SW limit switch is set to Warning the drive remains refer enced following a reset The drive can move past the target specified due to the mass moment of inertia of the machine or if the parameter settings are set incorrectly in the controller Software limit switches cannot...

Page 132: ...ing DBG60B START Task 2 of the IPOSplus program is currently being processed STOP Task 2 of the IPOSplus program is stopped 12 4 4 P933 Jerk time Setting range 0 005 2 s The jerk time indicates the duration of the torque formation The positioning time in com parison to the linear ramp is extended by the set jerk time The jerk time 0 005 2 s that has to be set for the function jerk limit Please not...

Page 133: ...ommands ms The speed can be in creased by up to 9 additional Assembler commands ms with P939 P938 and P939 share the resources for the speed increase that is task 1 and task 2 together can be assigned a total of 9 additional Assembler commands ms Example Task 1 2 additional Assembler commands ms 3 Assembler commands ms Task 2 7 additional Assembler commands ms 9 Assembler commands ms P i f kVA Hz ...

Page 134: ...f positioning to an external encoder X14 or an absolute encoder X62 then these two parameters are used for adapting the resolution to the motor encoder X15 Proceed as follows Write down the values of variables H509 absolute position H510 with external encoder and H511 Current motor position Move the drive by about 30 000 increments H511 Calculate the difference between the values you wrote down an...

Page 135: ...r factor numerator page 134 and P943 encoder factor de nominator page 134 as well as the parameter group P92x IPOS monitoring All posi tions of the IPOSplus program have to be adjusted when using the external encoder The setting of all listed parameters has to be adjusted every time the encoder scaling is changed The number of pulses detected at X14 is multiplied by P944 and then mapped to H510 Th...

Page 136: ...travel It adds or sub tracts the offset from the encoder value P905 Hiperface offset X15 page 126 has an effect on the actual position of the motor encoder H511 H511 Encoder value P905 P947 Hiperface offset X14 page 136 affects the actual position of the external encoder H510 H510 Encoder value P947 The actual position is determined directly after the values have been entered It does not require p...

Page 137: ...IT terminal is set to 1 and no terminal set to Enable receives a 1 signal If a terminal set to Enable receives a 1 signal or if no terminal is set to Enable error message F81 will be issued For linear motors with AL1H motor encoder SEW EURODRIVE recommends to set parameter P948 to OFF After having replaced the encoder test the drive system with reduced velocity and force in jog mode OFF The Hiperf...

Page 138: ...ng list VISOLUX EDM T R CE65 CE58 CE100 MSSI T R LE100 LE200 T R LA66K AV1Y ROQ424 STEGMANN AG100 MSSI SICK DME 3000 111 STAHL WCS2 LS311 STEGMANN AG626 IVO GM401 GXMMW A202PA2 STAHL WCS3 LEUZE OMS1 OMS2 T R ZE 65M LEUZE BPS37 SICK DME 5000 111 POMUX KH53 KÜBLER 9081 LEUZE AMS200 MTS TEMPOSONICS RP P F AVM58X 1212 Hübner HMG161 S24 H2048 Balluf BTL5 S112B M1500 T R LA41K Elgo LIMAX2 12 6 2 P951 Co...

Page 139: ...s the display value you wish to have for the current position 12 6 6 P955 Encoder scaling Setting range x1 x2 x4 x8 x16 x32 x64 Before setting P955 make sure that P942 and P943 are set to 1 The significance of the travel resolution of the motor encoder and absolute encoder is adapted The parameter is set so the travel information ratio between the motor encoder and the absolute encoder is as close...

Page 140: ...tion of rotation is not possible CCW The CCW modulo function is active The drives moves from its actual position to the target position with a CCW direction of rotation even if this means moving a longer distance The CW direction of rotation is not possible 12 7 2 P961 Modulo numerator Setting range 0 1 231 1 Simulation of the gear unit by entering the number of teeth of the gear unit and the ad d...

Page 141: ...e synchronized by SBus1 SBus2 or by DPRAM The inverters must not be synchronized from several interfaces at the same time SEW EURODRIVE recommends to set P885 P895 to an identifier that is not used in the entire CAN network You need parameters P888 and P916 to implement synchroniza tion with interpolating setpoint processing OFF Synchronized operation with the option card is not activated 12 8 2 P...

Page 142: ...mes Option of writing program modules that can be used again in other projects Clear modular and structured programming Various loop techniques Compiler control using preprocessor commands Standard structures User defined structures Access to all system variables Standard functions Debugger for troubleshooting Extensive options for making comments Integrated in the Windows interface Integrated in ...

Page 143: ... IPOSplus project Step 3 The first IPOSplus program This section is to assist you in creating your first IPOSplus program Step 4 Compiling and starting the IPOSplus program In this chapter you will compile the program you created in step 3 load it into MOVIDRIVE and run the program 13 2 1 Step 1 Starting IPOSplus Compiler with MOVITOOLS MotionStudio Requirements The IPOSplus Compiler is integrated...

Page 144: ...e a communication channel refer to the MOVITOOLS MotionStudio documentation manual or online help 2 Scan your network unit scan Press the Start network scan button 1 in the tool bar Starting IPOSplus Compiler Proceed as follows to start the IPOSplus Compiler via MOVITOOLS MotionStudio 1 Mark the device you want to start the IPOSplus Compiler for 2 Right click to open the context menu 3 Start the I...

Page 145: ... Project Create new from the menu bar Use the following dialog window to specify the basic project properties The first line contains the name of the project Give your project a unique name that you will recognize again in the future 482065675 1 Menu bar 2 Toolbar 3 Project window 4 Program window 5 Status bar 1 2 3 4 5 482580363 P i f kVA Hz n P i f kVA Hz n ...

Page 146: ...he MDX file file with the IPOSplus pro gram and the list file file with additional program information are to be created These files are only created if you have checked the appropriate boxes under Extras Settings Compiler Once you have confirmed your entries by clicking OK the Compiler performs the fol lowing steps It creates the folder Total in the specified directory only if you selected the op...

Page 147: ...itialization part The source file now has the following content IPOS source file include constb h include iob h Main function IPOS initial function main Initialization Main program loop while 1 The include constb h command for MOVIDRIVE B inserts the header file which defines the arguments for all the system functions The include iob h command for MOVIDRIVE B inserts a file containing the definiti...

Page 148: ...t 13 2 3 Step 3 The first IPOSplus program This section is to assist you in creating your first IPOSplus program Editing the IPOSplus program Start the Compiler again This time the project and the summe ipc file are loaded au tomatically as they were open when you exited the program To get to know all further functions of the IPOSplus Compiler you will now write a pro gram that adds together all t...

Page 149: ...th its status when last saved Save the program Saved is now displayed in the status bar Syntax highlighting is used so that words with different meanings are shown in different colors to give you a better overview For example all names that the Compiler recog nizes key words are shown in yellow The system functions provided by the unit are highlighted in blue 483418763 P i f kVA Hz n P i f kVA Hz ...

Page 150: ...on where you have placed the cursor in the source text To insert the _Wait function you must first select the _Wait function in the list of system functions The right hand side of the window displays the arguments relating to the cor responding function For our example enter the value 5000 stands for 5000 ms If you require additional information on a C construction or a system function simply se l...

Page 151: ...pilation The message window displayed above appears after the project has been compiled If the program does not contain any errors it is assigned the status OK The size of the program is also important It is specified as the length of the code words used in Assem bler code This absolute number is also converted to a percentage that specifies how much memory space is used in IPOSplus The compilatio...

Page 152: ... this example the third argument of the FOR loop is missing When you compile the system using the icon the following message appears Error message during compilation The status ERROR is output as an error has occurred The line error classification and the error code are also displayed Furthermore the program line in the source file con taining the error is highlighted with a red bar Click the OK b...

Page 153: ...am Starting and stop ping the program You can start the program by clicking the icon The program now runs in MOVIDRIVE and the START status is displayed in the toolbar Status START At the same time the light blue bar in the program is deleted You can see that the program is being processed In this small test program the variable H2 is incremented in steps of 5 s To see this open the variable windo...

Page 154: ...for instructions and key words Automatic indent The cursor is indented automatically in line with the first character of the previous line when you change to a new line by pressing the Enter key Persistent blocks Selected blocks remain marked until a new selection is made If this option is deactivated the text block selection mark disappears when the cursor is moved Pressing a key causes the selec...

Page 155: ... program sequence Save automatically before compiling If this checkbox is selected the source code is saved automatically before the start of each compiling process Do not test recursive function calls If this checkbox is not selected the Compiler reports an error when it detects a recursive function call If you want to permit recursive function calls you can deselect this checkbox The Compiler on...

Page 156: ...earch for and select this directory by clicking the Browse button In the MDX File Output Directory field specify the folder in which the MDX file should be saved if this function has been activated in the Compiler settings You can search for and select this directory by clicking the Browse button The include Directives Directory setting is made in the last line on this tab This field contains the ...

Page 157: ...s is H10 The fol lowing window appears Search window Click the Find Next button to search for the next occurrence of the word in question Click Cancel to close the window again The same functionality is also available for the Replace function in the Search menu item in the menu bar Replace window The Find Next button can be used to search for the corresponding word which can then be replaced with ...

Page 158: ... in the project window The root node is the project name The nodes Source file s and Documents are listed below the root node The source modules IPC files are listed below the source file s All the source modules contained therein are compiled to form an IPOSplus program Under the Documents node you can attach any files required for documentation for example Word documents right mouse click Add do...

Page 159: ...basic structure An initialization part is auto matically added to the basic structure if a task 2 task 3 is added This part contains the command for starting task 2 If an interrupt routine is to be programmed its basic structure can also be created at this stage This structure is created by selecting the corresponding Add check box Use the Interrupt Source selection field to select whether it is t...

Page 160: ...selected in which task 2 is to have the function name Monitoring the resulting Editor window displays the following program structure Compiler program 484392715 INFORMATION The IPOSplus Compiler is case sensitive which means that there could be 2 different variables for MYVAR and myvar ß is not permitted P i f kVA Hz n P i f kVA Hz n ...

Page 161: ...also be selected and assigned to the project When a file is selected it appears under the source file s root node and is assigned to the project 13 6 Saving a project There are several options for saving a project and the corresponding source files The complete project and all the source files in it can be saved by choosing File Save All If only changes made to the source file currently in process...

Page 162: ...cuments for entire project Project single inverter Documentation documentation for the individual drive if it is not stored in the com plete documentation Source all IPC files all h files including const h Parameters mdx file for unit exchange Measurements Scope files Project single inverter Documentation documentation for the individual drive if it is not stored in the com plete documentation Sou...

Page 163: ...on and source texts can be located quickly making it easy to keep an overview This facil itates easy maintenance of the software and the overall system The folders and subfolders can be created in the project management Customer Müller Machine Hoist station MOVIDRIVE hoist axis fork drive Complete documentation Hoist axis Documentation Source Parameters Measurements Fork drive Documentation Source...

Page 164: ...inverter Choose Project Download to save the current project and all the accompanying data including the project file itself in the MOVIDRIVE unit The project is compiled before it is downloaded If the compilation process fails the data is not downloaded If the available memory space in the inverter is too small an error message is generated and the process is canceled INFORMATION MOVIDRIVE B allo...

Page 165: ...e If there is no project data in the inverter the process is canceled 13 9 3 Calling up a project from the inverter This function is used to update the project on the PC laptop with the files from the in verter As opposed to Project Upload this menu item loads the files stored in the inverter memory and copies them to their original directories If a file with the same name already exists in the di...

Page 166: ...tion Status Result of the compiling process OK or ERROR File Source file of the project in which the error was detected Line Program lines in which the error was detected Class Error class of the error Code Error code of the error The status window also contains information about the length of the generated program code and the memory utilization in the inverter The length of the program code is e...

Page 167: ...inverter To do this select the Start menu command from the Run menu in the menu bar Alternatively you can also press the icon in the toolbar The light blue bar in the editor is deleted once the program has been started The display for the task status changes from PSTOP to START Status displays for task 1 and task 2 13 13 Stopping a program Select the Stop menu command from the Run menu in the menu...

Page 168: ... the current cursor position at any time during debugging While the program is running you can interrupt it by pressing the Alt F5 key combina tion or choosing Run Break The execution bar is now positioned at the command that is to be executed next The program can also be interrupted by pressing the F4 key or choosing Goto Cursor The program is stopped in the command line in which the cursor is po...

Page 169: ...rved in the variable window using the scroll bar Another way to observe variables is to set up a watch window Only selected variables are displayed in the watch window The fewer variables displayed at the same time the faster an individual value can be updated 485381387 INFORMATION The IPOS variables contained in the data backup of the device can also be displayed in offline mode The non volatile ...

Page 170: ... The selected variables are displayed in a list to the right of the window To remove a variable from the watch window you must highlight it in the list and press Remove Displaying the selected variable The window looks the same as the complete variable window but it only contains the selected variables Variables can have symbolic identifiers assigned to them because standard variable names e g H1 ...

Page 171: ... able can be displayed in various formats at the same time 13 17 Program information The Program Information menu command is available in the Display menu in the menu bar If you select this menu item the following window appears Program information This program information refers to the program stored in the inverter The size of the pro gram creation date and name of the source file are displayed ...

Page 172: ...ssing the icon in the toolbar Inserting an instruction You can use the insert tool to add C constructions system functions or predefined struc tures to the source text If you mark a C construction or a standard structure the text that will be inserted in the source text appears in the lower section of the window If you want to insert a system function you must also enter arguments of the function ...

Page 173: ...meone who does not know the program to become familiar with it quickly A long comment which may span several lines for example starts with and ends with A one line comment starts with and does not need an end mark A single line comment can also be entered directly after a command line in the source text Comments 486824075 P i f kVA Hz n P i f kVA Hz n ...

Page 174: ...ith the program in the inverter Project compile Compiles project Project compile download Compiles project and downloads it to inverter Program compare with inverter Compares project with the program in the inverter Run start Starts the IPOSplus program Run stop Stops the IPOSplus program Run run to cursor Runs program to where the cursor is positioned Run single step Runs single step Run skip Ski...

Page 175: ...h include io h Main Function IPOS Entry Function main Initialization activate task 2 _SetTask2 T2_START Monitor testing Main Loop while 1 Task2 Monitor User function Reference_travel Automatic_mode Manual_mode Comment with notes on the program Program header with pre processor state ments and if necessary definition of the variable The main function contains the initializa tion part and the endles...

Page 176: ...start of the source text They can however be located anywhere in the program Depending on the function of the direc tives they either apply as of the source text line in which they are located or for the entire program regardless of their location 14 2 Preprocessor statements The comment lines in the program header are followed by the preprocessor statements A statement of this type is inserted as...

Page 177: ...f instruction in the last program line of the header file The task of this ifndef and endif construction is to prevent the file being linked more than once The statements within this construction are only performed if a macro identifier here _CONST_H has not yet been defined ifnot defined A define _CONST_H is posi tioned in the next line of the program to define this macro identifier Therefore if ...

Page 178: ...s The syntax is include FileName FileName is the complete name of the file that is to be incorporated It is enclosed by pointed brackets It is sufficient to state the file name without path information if the file to be incorporated is located in the current folder The include directives can also be used in nested structures i e an included file can itself contain an include directive to include a...

Page 179: ...the in clude path would have to be edited in the program in the third method before the pro gram could be re compiled 14 5 define The define directive was previously used for identifying a Macro identifier However the basic function of the define directive is to define a macro Macros are used to re place symbols in the source text by strings This mechanism makes it possible to formu late constants...

Page 180: ...point maximum in this line the macro def setpoint and maxi mum are replaced meaning H123 2000 define setpoint H10 define variable1 setpoint define minimum 20 H11 variable1 minimum in this line the macro definition variable1 is replaced by setpoint then setpoint is replaced by H10 meaning H10 20 H11 INFORMATION Ensure that a variable identified with define has not been assigned two system vari able...

Page 181: ...l value and i Furthermore it also specifies that the IPOSplus variables H100 H101 and H105 are assigned 493925131 define basevariable H100 declare setpoint basevariable 0 declare actvalue basevariable 1 declare i basevariable 5 INFORMATION A maximum of 600 define and declare directives can be used INFORMATION The task of integrating modules is made easier by forming variable blocks using de clare ...

Page 182: ...ssed as explained in the following example The structure is addressed within the command by using the name of the structure variable without additions Instruction type Standard structure _GetSys GSAINPUT GSAOUTPUT GSCAM GSCAM_EXT CAM_EXT_OUT GSPODATA3 GSACTSPEEDEXT GSPODATA10 _MovCommDef only for MQx MOVCOM MCPDATA MCPARDATA _MoviLink MOVLNK MLDATA _SBusCommDef SCREC SCTRACYCL SCTRCYCL _SetSys SSP...

Page 183: ...ion from the menu bar Select the predefined structure and change the name of the variable in the editing window of the input help If several structure vari ables are declared from the same structure type separate them with a comma Once all structure variables have been declared they must be initialized depending on the specific application The insert tool can also be used for this process Place th...

Page 184: ...ure type table The next step is to access the elements The table must be initialized to do so The following is a general description of the procedure for setting up a user structure The insert tool can also be used for user defined structures To do so from the Pre de fined Structures window of the insert help choose typedef struct user defined Now you can change the name of the elements and the st...

Page 185: ...ture type This line must still be edited in the Editor Additional elements can be added within the structure type in the same way Once the entries have been compiled an initialization sequence can be activated using the insert tool Before doing so the cursor must be positioned in the Editor at the place where the initialization sequence is to be inserted Structures 493933835 P i f kVA Hz n P i f k...

Page 186: ...alue are assigned an IPOSplus variable The user always accesses the variable by using the symbolic name 14 11 initial long initial long is available as another key word initial long declares a variable that is then stored in the variable range from H0 to H127 during compiling This means the variable is stored in the variable range that is not lost when there is a power failure Example long Identif...

Page 187: ... the program Experience shows that the Com piler needs about 10 auxiliary variables The Compiler uses variables H400 through H419 if this directive is not specified explicitly pragma globals Hmin Hmax Instructs the Compiler to assign a variable number from the variable range Hmin to Hmax to the variables declared with the long key word The user is responsible for avoiding overlaps when linking var...

Page 188: ...n 2 01 Definition of bitmasks for digital in and outputs Please do not modify this file C 1999 SEW EURODRIVE ifndef _IO_H define _IO_H define DI00 H483 0b1 define DI01 H483 0b10 define DI02 H483 0b100 define DI03 H483 0b1000 define DI04 H483 0b10000 define DI05 H483 0b100000 define DI10 H483 0b1000000 define DI11 H483 0b10000000 define DI12 H483 0b100000000 define DI13 H483 0b1000000000 define DI1...

Page 189: ...supplies a binary evaluation In practical terms it is possible to query for zero DI00 0 or not equal to zero DI00 0 This program extract can be made clearer using the commands which have already been explained This is done by introducing additional symbolic identifiers The following appears in the variable window if DI00 H1 1 execute command block if terminal DI00 has NOT level 0 else H1 0 execute...

Page 190: ...erentiated in the source text by their specific notation Representation in different formats can im prove the legibility of the source text depending on how they are used The formats decimal hexadecimal or binary are possible forms of representation Hexadecimal constants start with the 0x string binary constants with the 0b string Here are a few examples The following identifiers are valid The fol...

Page 191: ...ers of the variables see pragma The variable numbers are assigned in ascending order according to where the variable declarations occur in the source text A declaration starts with the key word long followed by the list of symbolic identifiers separated by commas The declaration ends with a semicolon The declaration can be spread over several source text lines A global variable can be declared any...

Page 192: ...the System Variables A list of system variables and their symbolic identifiers is given in the appendix 14 18 Indirect addressing pointer The designations H0 to H511 are also allowed as variable names in order to make use of the possibility of accessing variables indirectly SET H H from IPOSplus These names can be used on both the right and left sides of assignments or in expressions such as H0 to...

Page 193: ...e a composite expression These program lines supply the IPOSplus variables with the following values define setpoint H200 declare setpoint2 setpoint 1 H1 numof H7 H2 numof setpoint H3 numof setpoint2 H1 7 H2 200 H3 201 INFORMATION The following program lines are not permitted define Setpoint H10 H30 define Var1 H200 H1 numof H1 H1 numof H1 H4 H1 numof H3 6 H1 numof Setpoint H1 numof Var1 1 P i f k...

Page 194: ...er of priority of operators Category Operator Description 1 Brackets 2 Unary Logical negation NOT bit by bit complement Unary plus Unary minus Pre or post incrementing Pre or post decrementing 3 Multiplicative Multiplication Integer division Modulo remainder 4 Additive Binary plus Binary minus 5 Shift Shift left Shift right 6 Relational Less than Less than or equal to Greater than Greater than or ...

Page 195: ...lowing statement H1 is assigned the value 29 Brackets have to be used if the addition is to be performed before the multiplication H1 is assigned the value 108 from 3 9 4 15 2 Unary operators Unary operators are operators positioned before or after an operand and only influence this operand H1 3 7 2 4 H1 3 7 2 4 INFORMATION The sequence can be forced by brackets to ensure the sequence of operation...

Page 196: ...le is the abbreviated notation of Where possible the ternary operator should not be used due to the illegibility of the source code H1 H2 The binary assignment operator assigns variable H1 the value of H2 H1 H2 3 The binary minus operator forms the difference between H2 and 3 Operator Operation Example Corresponds to Example H1 Simple assignment H1 H2 H1 H2 3 Assign product H1 H2 H1 H1 H2 6 Assign...

Page 197: ...h several state ments can be specified In this case the statement block must be enclosed by curly brackets statement block The expression may also be composed of several conditions which are logically inter linked Consequently logical AND and logical OR are available as logic op erations Example Variable H2 is set to the value 10 if H1 is greater than or equal to 3 and is also less than or equal t...

Page 198: ...ple H0 is set to zero at the start Then a check is performed to see whether H0 has reached the value 10 If this is not the case then the statement is processed In this example therefore H1 is increased by 2 The run variable H0 is then increased by one Next the check whether H0 has reached the value 10 is repeated etc At the end of the loop the value of H0 is 10 and that of H1 is 40 because the loo...

Page 199: ... loop is exited the value of variable H1 is 34 and that of H2 is 6 16 3 while 16 3 1 Syntax The while statement is a conditional loop which performs the statement for as long as the value of the expression is TRUE not equal to zero The statement is never per formed if the expression never has the value TRUE The expression is always pro cessed before the statement The statement can also be a statem...

Page 200: ... running through the loop again is tested H2 is not changed any further during addition loop cycles If the value of H1 is 20 the loop is exited Example This example has the same effect as the one shown previously The endless loop is left using the break statement if H1 equals 20 This is an endless loop which can be created using the following construction This is because expression 1 always return...

Page 201: ...t once in the do while loop Example The statements within the block are carried out as long as H1 is greater than 5 H2 gets the value 4 when the loop breaks off If the expression always remains TRUE the result is an endless loop In this case the expression has the value 1 which means that the loop is never broken This loop can be broken off using the break statement In this example the do loop is ...

Page 202: ...c If none of the values following case corresponds with Expression the default statement if programmed is executed Statement n Statements 1 2 n can also be function calls For example a jump distributor can be set up Value 1 Value 2 Value n must be constants or constant expressions No variables are permitted here H2 0 do H2 H2 3 if H2 20 break if H2 10 continue H0 while 1 switch Expression case Wer...

Page 203: ...turn ends the processing of a function and returns to the command following the function call The return statement makes it possible to end functions prematurely for example to increase the clarity of a C program However using this statement too often can have the opposite effect The following applies a function should contain as few exit points as possible The following example shows two coding p...

Page 204: ...n contrast to ANSI C Once the function has been performed the line following the function call is processed A function can be exited prematurely using the return statement In this case program processing is continued with the line following the function call Using the return statement can increase the clarity of a program structure However using this statement too often can have the opposite effec...

Page 205: ...ctions The parameters of the IPOSplus machine commands become function arguments of the standard functions The names of all standard functions start with an underscore _ so it is easier to distinguish them from user functions in the source text The constants specified as an argument in many functions are defined in the header file CONSTB H MOVIDRIVE B If you want to use your own names instead you ...

Page 206: ...ransfer via system bus X X page 234 Command Function Availability Reference MOVIDRIVE B MOVITRAC B MQx _Go0 Performs reference travel X page 217 _GoAbs Absolute positioning X page 218 _GoRel Relative positioning X page 219 Command Function Availability Reference MOVIDRIVE B MOVITRAC B MQx _InputCall Calls a defined function when spe cific selected bits are set or deleted at the input terminals X X...

Page 207: ... X X page 235 _SetVarInterrupt Defines a function as variable rou tine and activates or deactivates it only MOVIDRIVE B X page 240 _SetSys Sets an internal system value observe the unit specific command structure page 236 Command Function Availability Reference MOVIDRIVE B MOVITRAC B MQx _AxisStop The drive is stopped X page 208 _FaultReaction Sets the fault response to a selected fault X X page 2...

Page 208: ...basic unit P131 P133 followed by position control The last tar get position to have been transmitted is retained Inhibit via control word the ASTOP IPOS ENABLE command is required before the subsequent travel command The brake is not applied if the brake function is activated AS_PSTOP Positioning stop with positioning ramp P911 P912 and calculated STOP target position only possible in the position...

Page 209: ...ificant bit has the number 0 Key points h2 Name of the target variable bit2 Number of the target bit h1 Name of the source variable bit1 Number of the source bit Example main _BitMove H1 3 H2 4 copies H1 3 H2 4 _BitMove H1 1 H1 0 copies H1 1 H1 0 17 3 4 _BitMoveNeg Syntax _BitMoveNeg H2 bit2 H1 bit1 Description Copies the bit with the number bit1 in IPOSplus variable H1 to the bit with the number ...

Page 210: ...st source variable H2 the name of the first target variable A maximum of 10 variables can be copied Key points H2 Name of the first target variable H1 Name of the first source variable no Constant expression for the number of IPOSplus variables to copy Example main _Copy H1 H5 3 copy H1 H5 H2 H6 H3 H7 17 3 7 _FaultReaction Syntax _FaultReaction fnr r Description This command can be used to program...

Page 211: ... required FR_SWOFF_W Output stage inhibit without unit inhibit Reset re enables the unit FR_ESTOP_W Stop via emergency stop ramp without unit inhibit Reset re enables the unit FR_RSTOP_W Stop via rapid stop ramp without unit inhibit Reset re enables the unit GS_ACTCUR Active current in 0 1 rated unit current GS_ACTSPEED actual speed in 0 1 rpm GS_SPSPEED Setpoint speed in 0 1 rpm GS_ERROR Error co...

Page 212: ... cams are formed cyclically in the background For more information on the cam controllers and the data structure refer to section Cam controllers in chapter Position Detection and Positioning GS_ANOUTPUTS Analog outputs optional with 10 V 0 10 V 10000 0 10000 h Analog output 1 h 1 Analog output 2 GS_TIMER0 Counter value of TIMER 0 H489 in ms GS_TIMER1 Counter value of TIMER 1 H488 in ms GS_PODATA ...

Page 213: ...er 30 ms gLAActSpeed EncType 0 Encoder is connected to X14 gLAActSpeed Numerator 11250 Conversion into arcs per hour 11250 384 gLAActSpeed Denominator 384 1000 ms x 60 s x 60 min Inc x Time base gLAActSpeed DPointer numof hArcsPerHour 11250 negated representation _GetSys gLAActSpeed GS_ACTSPEEDEXT SPEEDMONITOR Numerator value of the speed monitoring The GETSYS command can be used as a prewarning f...

Page 214: ...lways be set 0x8000 0000 function inactive no new cam outputs will be generated set outputs will be retained and deleted after a reset or voltage off on only 0x8000 0001 function active internally but all cam out puts will be turned off 0x8000 0002 function active if drive is referenced H473 Bit20 1 0x8000 0003 function active even without referenced drive CamReserved1 Reserved CamOutShiftLeft Shi...

Page 215: ...Output structure first output CamData 8 Pointer to last CamOutput structure eighth output CAM_EXT_OUT DeadTime Delay time compensation for this channel 500 ms 0 500 ms to compensate the delay time of an actu ator connected to the inverter The output is preset depending on the rate of change of the reference variable value in such a way that the output is switched in advance by this time interval C...

Page 216: ...5 SBus 8 SBus 2 Len Number of process output data items PO1 Process output data 1 PO2 Process output data 2 PO3 Process output data 3 PO4 Process output data 4 PO5 Process output data 5 PO6 Process output data 6 PO7 Process output data 7 PO8 Process output data 8 PO9 Process output data 9 PO10 Process output data 10 Instruction type Standard structure Elements Brief description Element Unit specif...

Page 217: ...n _GetSys Ain GS_ANINPUTS Read analog inputs into structure Ain 17 3 9 _Go0 Syntax _Go0 type Description This command triggers reference travel of the axis The argument defines the type of the reference travel Reference travel is set with P903 and can only be changed there P i f kVA Hz n P i f kVA Hz n ...

Page 218: ...nced regardless of whether the axis is already referenced or not W Wait Waits in this statement line until reference travel performed NW NoWait Process the next statement line during reference travel recommendation ZP Zero Pulse Reference travel to zero pulse CAM Reference travel to the reference cam RESET Reference travel which has started is interrupted and the call is reset An axis which has be...

Page 219: ...TSYS P915 P203 Precontrol that can be used to influence the jerk P933 Jerk limitation only with MOVIDRIVE B P916 Ramp type P917 Ramp mode main Set speed and ramp tPosSpeed CW tPosSpeed CCW 1000 10 Speed 1000 rpm tPosRamp Up tPosRamp Down 1000 Ramp is based on 3000 rpm _SetSys SS_POSRAMP tPosRamp _SetSys SS_POSSPEED tPosSpeed If the speed and ramp are not changed in the program the values in SHELL ...

Page 220: ...ls to be tested The bits in the expression have the following meaning An input combination can be selected by setting the appropriate bits in the mask to 1 For example to query DI00 and DI03 mask must be 0b1001 main Set speed and ramp tPosSpeed CW tPosSpeed CCW 1000 10 Speed 1000 rpm tPosRamp Up tPosRamp Down 1000 Ramp is based on 3000 rpm _SetSys SS_POSRAMP tPosRamp _SetSys SS_POSSPEED tPosSpeed ...

Page 221: ...ument Key points action Constant expression for action action can adopt one of the following values INFORMATION If you use the command in a fast task you have to set a _Wait command of at least 1 ms after the _Memorize command MEM_NOP No data is saved MEM_STALL Saves program and variables MEM_LDALL Loads program and variables MEM_STPRG Saves program only MEM_LDPRG Loads program only MEM_STDATA Sav...

Page 222: ...umbers in MOVITOOLS MotionStudio by placing the mouse on the edit box or display field of the respective parameter tooltip An SBus or RS 485 interface can be used for communication between 2 units MOVILINK can be used in a unit for example to save the variable of a quantity counter protected against power outage without using the MEM command to save the entire power outage proof range Process data...

Page 223: ...S485 1 ML_BT_S1 2 RS485 2 ML_BT_SBUS1 ML_BT_SBUS 5 ML_BT_SBUS2 8 Address H 1 0 99 Single address 100 199 Group address 253 Address of the inverter 254 Point to point connection 255 Broadcast If an SBus group address e g 43 is addressed the offset 100 must be added In this case 143 Format H 2 Specification of the process PD and parameter PARAM channels for data transfer MoviLink Cyclic Frame Types ...

Page 224: ...IMOT Format H 2 no limitation no limitation only ML_CFT_2 2PD acyclical ML_CFT_PAR2 Param 2PD acycli cal ML_CFT_3 3PD acyclical ML_CFT_PAR3 Param 3PD acyclical ML_CFT_PAR Param acycl ical cyclical frame types are possible but _MovCommDef is recommended INFORMATION The element DPointer in the MOVLNK structure must be initialized with the first vari able number of the data structure that contains th...

Page 225: ...regarding the _MoviLink command refer to the following sec tions Reading an internal unit parameter page 253 Writing a variable via SBus page 254 Reading a parameter via SBus page 255 Parameter set tings for the sender master Addressing via RS 485 No settings required Addressing via SBus Parameters Address Explanation P816 The baud rate depends on the length of the bus cable and must be the same f...

Page 226: ...ed if set to 0 ms or 650 ms Parameters Address Explanation P881 P891 0 63 Single addressing P882 P892 0 631 1 When using the group address increase the input value for the target address by 100 Group addressing multicast the sender can write to all receivers with the same group address at the same time P883 P893 Timeout monitoring function deactivated if set to 0 ms or 650 ms P884 P894 The baud ra...

Page 227: ...e error message is revoked automati cally Enter all information required to execute a command into a data structure in the variable area with a user program The start of this variable structure is the argument for the com mand The variable is defined by the MOVCOM variable name and has the following structure INFORMATION With MOVIDRIVE B and MOVITRAC B the timeout monitoring is checked for tele gr...

Page 228: ... See the function _MovCommOn page 229 Data structure for H H 0 Contains the error code after connection or zero if there was no error 0x05000002 indicates the connection has timed out H 1 H 2 H 3 H 4 H 5 H 6 PO1 data of process data exchange PI1 data of process data exchange PO2 data of process data exchange PI2 data of process data exchange PO3 data of process data exchange PI3 data of process da...

Page 229: ...to MOVIMOT MCPDATA mcpd1 process data exchange with MOVIMOT MCPARADATA mcpara parameter data exchange with MOVIMOT not used Main Function IPOS Entry Function main Initialization fill control structure for communication link to MOVIMOT mc1 BusType ML_BT_S1 communication via RS 485 to MOVIMOT mc1 Address 1 MOVIMOT address 1 mc1 Format ML_FT_3 PDU type 3 process data words cyclic mc1 PdPointer numof ...

Page 230: ...one of the following values H First variable in the variable structure Corresponding data structures have been defined for the individual object types SCD_REC Initializes a data object that receives the data A maximum of 32 variables can be set up The object has the following structure H 0 Object number H 1 Number of data bytes and data format H 2 Number of the variable H from which point the rece...

Page 231: ...usCommDef SCREC ObjectNo H 0 Object number CAN Identifier e g 1024 Format H 1 Data format DPointer H 2 Number of the variable H from which point the received data is stored There must be 2 variables H and H 1 reserved for the reception of up to 8 bytes of data SCTRCYCL ObjectNo H 0 Object number e g without CANopen profile as of 1024 CycleTime H 1 Cycle time ms Offset H 2 Offset time ms Format H 3...

Page 232: ... and INTEL format Element Unit specific characteristics MOVIDRIVE B MOVITRAC B CycleTime H 1 Valid cycle times1 1 2 9 ms number of objects 15 10 20 65530 ms 1 The cycle time must always exceed the longest offset time Valid cycle times 1 255 ms granularity 1 ms number of objects 16 Offset H 2 Valid offset times 0 1 2 8 ms for cycle times 10 ms 0 10 20 65530 ms for cycle times 10 ms Valid offset tim...

Page 233: ...address 6 512 for group parameter request For communication via the CANopen profile the object numbers identifiers defined in DS301 by CANopen will be used INFORMATION Observe the following rules when selecting the object number CAN Identifier 1 In the entire SBus network an object number can only be set up for transmission once 2 Within a unit an object number may only be set up once either to be...

Page 234: ...nterface starts or stops the data reception and the acyclic transmission of predefined data objects via SBus 1 or SBus 2 The data objects re initialized via the SBussCommDef function Regardless of the value for action with MOVITRAC B the _SBusCommState com mand action always has the same effect as _SBusCommOn page 234 Key points action can adopt one of the following values INFORMATION This command...

Page 235: ...function is used for specifying a user defined function as an interrupt routine The name of the function is given as an argument An interrupt may be triggered by various events The required event is given as an argument Key points event Constant expression that can adopt one of the following values function name Name of the interrupt function Important In contrast to a function call only the name ...

Page 236: ...Note The new fixed setpoint is only certain to have been adopted after 5 ms You may want to delay program pro cessing after a _SetSys command by 5 ms with a _Wait command If the fixed setpoint value exceeds the permitted range the algebraic sign changes SS_PIDATA Updates PI data1 H Number of PI data items H 1 PI data 1 H 2 PI data 2 H 3 PI data 3 SS_OPMODE Sets the operating mode H 11 CFC speed co...

Page 237: ...ting with the electronic cam in ascending order from index 0 to 512 2 Start interpolation enter interpolated values from index 512 starting with the electronic cam in descending order from index 512 to 0 3 Preparatory parameter calculation for interpolation concluded start entering interpolated values in the electronic cam H 1 SplineModeControl Reserved H 2 SplineDest Value range 0 5 Number of the...

Page 238: ...RAMP Up Acceleration positioning ramp ms Down Deceleration positioning ramp ms SSPOSSPEED CW Positioning speed CW 0 1 rpm CCW Positioning speed CCW 0 1 rpm SSPIDATA31 Len Number of the process input data to be transmitted PI1 Process input data 1 PI2 Process input data 2 PI3 Process input data 3 SSPIDATA101 Len Number of the process input data to be transmitted PI1 Process input data 1 PI2 Process...

Page 239: ...nd start address are both set to 0 when the power is switched on i e Task2 is deactivated In MOVIDRIVE B the command has been replaced by _SetTask However due to downward compatibility it is still available with MOVIDRIVE B Key points control word Constant expression that can adopt one of the following values function name Name of the Task2 function Important In contrast to a function call only th...

Page 240: ...exam ple the value is only taken into account with the command _SetVarInterrupt H1 function name Key points H1 First variable of a data structure see table H 0 function name Name of the interrupt function In contrast to a function call only the name of the function without is specified here Data structure of the variable interrupt Variable VARINT element structure Description H 0 Control 0 All Var...

Page 241: ...s long as the value of the reference variable is less than or equal to the comparison value SrcVar CompVar 6 Value of the reference variable AND the comparison value is not 0 SrcVar CompVar 0 7 Value of the reference variable AND the comparison value is 0 SrcVar CompVar 0 8 Positive edge of the bit masked out by CompVar 9 Negative edge of the bit masked out by CompVar 10 As 2 however interrupt is ...

Page 242: ...easurement the touch probe must be enabled again The touch probe positions are stored in the following variables Key points action can adopt one of the following values Encoder Encoder position Position of touch probe 1 DI02 Position of touch probe 2 DI03 Motor encoder X15 H511 ActPos_Mot H507 TpPos1_Mot H505 TpPos2_Mot External encoder X14 H510 ActPos_Ext H506 TpPos1_Ext H504 TpPos2_Ext Absolute ...

Page 243: ... level Key points level Constant expression that specifies which signal level the terminals should be tested for It can adopt one of the following values mask Constant binary expression which specifies the terminals to be tested The bits in the expression have the following meaning INFORMATION If the waiting time is to be variable you will have to initialize a timer H487 H489 instead of a WAIT com...

Page 244: ...ession that specifies when the function waits This expression can adopt one of the following values Example main _WaitSystem SC_N0 as long as speed zero wait 17 3 31 _WdOff Syntax _WdOff Description The watchdog is switched off Argument The command does not have an argument Example main WdOFF SC_UC Unconditional SC_N0 When the speed is zero SC_N When the speed is not zero SC_NOTPOS If not in posit...

Page 245: ...has to prevent the watchdog timer from running down by cyclically resetting the counter The counter value has to last at least as long as one main program cycle Key points time Watchdog counter value in milliseconds ms Example define WD_TIME 1000 main while 1 Perform statements in the loop The total run time of the statements in the loop must not be longer than 1000 ms to prevent the watchdog from...

Page 246: ...ource text can be simplified even further if symbolic designators are used for the corresponding statements as well as the variables and constants Using _BitSet include const h include io h MOVIDRIVE A include iob h MOVIDRIVE B define SetDO02 _BitSet StdOutpIPOS 2 main Set DO02 If several outputs are to be set at the same time then you can either call the _BitSet function several times in successi...

Page 247: ...the example the output terminal DO02 of the basic unit is to be set to zero If several outputs are to be reset at the same time then you can either call the _BitClear function several times in succession or use the bit by bit AND logic opera tion In the second case one statement will suffice This reduces the amount of code and thus also has a positive effect on the program run time The following e...

Page 248: ...not zero then the bit is one The following example sets H10 to 1 if binary input DI03 is set to one 18 3 2 Testing several bits In order to test several bits of a variable for a certain state you have use an AND oper ation to mask the bits to be tested and compare the result with a constant that corre sponds to the bit pattern to be tested The following example sets H10 to 1 if there is a 1 at DI0...

Page 249: ...tive or negative edge Positive edge query include const h MOVIDRIVE A include io h MOVIDRIVE A Variables for edge generation long lDI02RisingEdge lDI02LastState lDO02State lInputLevel main while 1 Read DI02 lInputLevel InputLevel 0x00000004 Generate edge DI02 lDI02RisingEdge lInputLevel lDI02LastState lDI02LastState lInputLevel if lDI02RisingEdge lDO02State lDO02State Set output DO02 if lDO02State...

Page 250: ...ral tasks the edge must be created separately in each task Negative edge query include const h include io h Variables for edge generation long lDI02FallingEdge lDI02LastState lDO02State lInputLevel main while 1 Read DI02 lInputLevel InputLevel 0x00000004 Generate edge DI02 lDI02FallingEdge lInputLevel lDI02LastState lDI02LastState lInputLevel if lDI02FallingEdge lDO02State lDO02State Set output DO...

Page 251: ...urce file include constb h include iob h long BinInputsNew BinInputsOld Main function IPOS initial function main Initialization Main program loop while 1 Reading binary inputs _GetSys BinInputsNew GS_INPUTS Querying an edge if BinInputsNew 0x4 BinInputsOld 0x4 rising edge DI02 program statement is located here Saving input states BinInputsOld BinInputsNew P i f kVA Hz n P i f kVA Hz n ...

Page 252: ...ed The amount is stored in the variable lActSpeedAbsolute include constb h MOVIDRIVE A include iob h MOVIDRIVE B define SEKUNDE 1000 SSPOSSPEED tSpeed long lActSpeed lActSpeedAbsolute Task 2 Task2 _GetSys lActSpeed GS_ACTSPEED Calculate absolute speed value if lActSpeed 0 lActSpeedAbsolute lActSpeed else lActSpeedAbsolute lActSpeed main Initialization Positioning speed 500 rpm tSpeed CW tSpeed CCW...

Page 253: ... process data configuration of the inverter connected by SBus is read with the address 10 18 6 1 Reading an internal unit parameter Type of reference travel actually entered in P903 is read in task 1 and written to variable lRefType IPOS Source file include constb h include iob h Definition of MOVLNK structures MOVLNK tRefType MLDATA tData Definition of Variables long lRefType Main program main In...

Page 254: ...h Definition of MOVLNK structures MOVLNK tBus MLDATA tBusData Main program main Initialization of MoviLink for bus transfer tBus BusType ML_BT_SBUS1 bus type SBus1 tBus Address 10 SBus address 10 tBus Service ML_S_WRV write volatile tBus Index 11200 variable H200 tBus DPointer numof tBusData data buffer Main program loop while 1 if DI17 tBusData WritePar 1000 _MoviLink tBus else tBusData WritePar ...

Page 255: ...D 8 PARAM 10PD 9 10PD IPOS Source file include constb h include iob h Definition of MOVLNK structures MOVLNK tPD MLDATA tData Definition of variables long lPDData Main program main Initialization of MoviLink for bus transfer tPD BusType ML_BT_SBUS bus type SBus tPD Address 10 SBus address 10 tPD Format ML_FT_PAR only parameters tPD Service ML_S_RD read tPD Index 8451 P090 PD data config tPD DPoint...

Page 256: ... 7 1 Receiver The receiver obtains the data from the SBus and stores it in the variables H305 and H306 Get data object 1025 from SBus and store the data in variable H305 and H306 SHELL settings P813 SBus Address 2 P816 SBus Baudrate 500 kBaud IPOS Source file include constb h include iob h Definition of SCOM structures SCREC tBusRec Definition of variables define Data_Var1x H305 define Data_Var2x ...

Page 257: ...4444 SHELL settings P813 SBus Address 1 P816 SBus Baudrate 500 kBaud IPOS Source file include constb h include iob h Definition of SCOM structures SCTRCYCL tBusTr Definition of variables define Data_Var1 H208 define Data_Var2 H209 Main program main Initialization of SCOM transfer object tBusTr ObjectNo 1025 object number tBusTr CycleTime 10 cycle time tBusTr Offset 0 offset tBusTr Format 8 8 byte ...

Page 258: ...d Input DI10 must be active during the entire cycle If DI10 0 the timing belt stops sub ject to position control When the drive is restarted DI10 1 it completes the cycle The position values ramp and speed are entered in the variables H11 H14 Main program loop while 1 if DI17 Data_Var1 222222 Data_Var2 444444 else Data_Var1 111111 Data_Var2 222222 Variable Name Description H11 TP_Max_Pos Maximum t...

Page 259: ...nuated the drive moves to this target position If DI02 is attenu ated a new target position is calculated The new target position is calculated from the motor position during the touch probe event TpPos1_Mot H507 plus the remaining distance TP_Pos H12 Settings in SHELL P601 Binary input DI02 IPOS input P610 Binary input DI10 IPOS input P700 Operating mode IPOS include const h include io h define C...

Page 260: ...Speed CW tPosSpeed CCW Speed 10 Speed tPosRamp Up tPosRamp Down Ramp Ramp _SetSys SS_POSRAMP tPosRamp _SetSys SS_POSSPEED tPosSpeed switch State case CALCTARGET if DI10 lPosition ActPos_Mot TP_Max_Pos _TouchProbe TP_EN1_HI Activate rising edge State BUSSY break case BUSSY _GoAbs GO_NOWAIT lPosition _Go command to position if h473_ipos_in_position DI10 Axis in position and DI10 0 State CALCTARGET C...

Page 261: ...ldbus setpoint analog setpoint The operating mode is set using input terminals DI10 and DI11 The selected operating mode is to be displayed on outputs DO10 and DO11 The following operating modes should be provided The following status chart shows the transitions between the operating modes Chart of mode statuses INFORMATION Use IPOS to assign PO data and base the control word on the ControlWord H4...

Page 262: ...OS INPUT P630 P631 Binary output DO10 DO11 IPOS OUTPUT P700 Operating mode 1 IPOS P870 P872 Setpoint description PO1 PO3 IPOS PO DATA P873 P875 Actual value description PI1 PI3 IPOS PI DATA P876 PO data enable ON IPOS Source file include constb h include iob h pragma globals 350 399 Definition of structures GSPODATA3 busdata structure for fieldbus process data GSAINPUT analog structure for analog ...

Page 263: ...ta Len 3 busdata PO1 0 busdata PO2 0 busdata PO3 0 Activate task 2 _SetTask2 T2_START buscontrol Main program loop while 1 Task 2 buscontrol _GetSys busdata GS_PODATA get bus data mode modeselect read terminals for mode select OptOutpIPOS OutputLevel 3 0xFFFFFFFC mode output mode switch mode case 0 mode_0 break case 1 mode_1 break case 2 mode_2 break case 3 mode_3 break P i f kVA Hz n P i f kVA Hz...

Page 264: ...enable else rapidstop speed busdata PO2 setfixedsetpoint activatefixedsetpoint mode_1 if busdata PO1 6 enable else rapidstop _GetSys analog GS_ANINPUTS offset analog Input1 15 10 speed busdata PO2 offset setfixedsetpoint activatefixedsetpoint mode_2 enable deactivatefixedsetpoint mode_3 rapidstop P i f kVA Hz n P i f kVA Hz n ...

Page 265: ... rpm 1500 rpm 18 9 2 Mode 1 Control via fieldbus setpoint fieldbus setpoint analog setpoint Control is performed exclusively via the fieldbus A reduced control word 0 rapid stop 6 enable is also to be used The setpoint is the sum of the fieldbus setpoint bipolar 1500 rpm 1500 rpm and the analog setpoint 10 V 10 V 1500 rpm 1500 rpm 18 9 3 Mode 2 Control and setpoint via terminal or analog value The...

Page 266: ...FIELDBUS and define for constants for operation with fieldbus P6xx no functions exception e g P602 REFERENCE CAM per reference travel type P700 xxx IPOS P870 CONTROL WORD 2 P871 IPOS PO DATA P872 IPOS PO DATA P873 STATUS WORD 1 P874 IPOS PI DATA P875 IPOS PI DATA P916 e g to LINEAR P960 OFF replace if OFF ActPos_Mot ModActPos and TargetPos ModTagPos Drive control via PLC bus monitor process output...

Page 267: ...ist Assembler code with comments Constants define MY_PD_LENGTH 3 3 Fieldbus with process data define MY_FBUS_TYPE GS_BT_FBUS GetSys to Fieldbus during operation define MY_FBUS_TYPE GS_BT_S0 for bus monitor GetSys to RS485 define MY_HALT 13 Position Stop in IPOS control word H484 Bit masks define MY_OP_MODE 0x18 virtual inputs DI13 14 InputLevel Bit 9 10 define MY_READY_TO_RUN StatusWord 0x4 Ready ...

Page 268: ...variables long lDriveState Inverter status corresponds to the 7 segment display of MDx long lErrorCode Error code Process data data structures GSPODATA10 tPA Output data PLC Drive SSPIDATA10 tPE Input data Drive PLC Main function IPOS initial function main _WdOn 5000 Activate watchdog in the event of error code 41 while MY_READY_TO_RUN max 5000 ms wait until the inverter firmware is fully started ...

Page 269: ... been selected or a selection is not possible case DISABLE break Jog mode case JOGGING fnJogging break Referencing mode case HOMING fnHoming break Positioning mode case POSITIONING fnPositioning break Programming error invalid status default _AxisStop AS_PSTOP lGlobalStateMachine lOpMode 1 break End switch lGlobalStateMachine End while 1 End main P i f kVA Hz n P i f kVA Hz n ...

Page 270: ...ssing as long as the main state is set to Jogging do Import PO data _GetSys tPA BusType GS_PODATA if MY_JOG_PLUS MY_JOG_MINUS tPosVelocities CW tPosVelocities CCW tPA PO2 _SetSys SS_POSSPEED tPosVelocities TargetPos ActPos_Mot 409600 if MY_JOG_MINUS MY_JOG_PLUS tPosVelocities CW tPosVelocities CCW tPA PO2 _SetSys SS_POSSPEED tPosVelocities TargetPos ActPos_Mot 409600 if MY_JOG_MINUS MY_JOG_PLUS MY...

Page 271: ...t PO data _GetSys tPA BusType GS_PODATA switch lSubStateHoming case HOMING_STOPPED if MY_START_HOMING _Go0 GO0_U_NW_CAM lSubStateHoming HOMING_STARTED break case HOMING_STARTED if MY_START_HOMING _Go0 GO0_RESET lSubStateHoming HOMING_STOPPED if MY_REFERENCED lSubStateHoming HOMING_READY break case HOMING_READY if MY_START_HOMING lSubStateHoming HOMING_STOPPED break while lGlobalStateMachine HOMING...

Page 272: ... tPosVelocities CCW tPA PO2 _SetSys SS_POSSPEED tPosVelocities TargetPos lScalingNumerator tPA PO3 lScalingDenominator lSubStatePositioning POSITIONING_STARTED break case POSITIONING_STARTED if MY_START_POSITIONING tPosVelocities CW tPosVelocities CCW tPA PO2 _SetSys SS_POSSPEED tPosVelocities TargetPos lScalingNumerator tPA PO3 lScalingDenominator else _AxisStop AS_PSTOP lSubStatePositioning POSI...

Page 273: ... InputLevel 9 Move Bit0 to Bit 0 lPA_ControlWordHigh tPA PO1 8 Move Bit8 to Bit 0 lOpMode lPA_ControlWordHigh MY_OP_MODE 3 Bit 3 4 Operating mode Create status transitions switch lGlobalStateMachine Either no operating mode has been selected or a selection is not possible case DISABLE if lDriveState 0xA if lOpMode JOGGING lGlobalStateMachine JOGGING if lOpMode HOMING lGlobalStateMachine HOMING if ...

Page 274: ...t data and send to PLC fnBuildStatusWord Create status word _GetSys lActVelocity GS_ACTSPEED Read actual speed tPE PI2 lActVelocity Output actual speed lActPosition ActPos_Mot Actual position tPE PI3 lScalingDenominator lActPosition lScalingNumerator Actual position _SetSys SS_PIDATA tPE Len Send PD Function fnBuildStatusWord Here bit 0 7 of the status word is generated if an error occurs the othe...

Page 275: ...CKET Close bracket missing after expression in brackets FCT CALL CLOSE BRACKET NUMBER ARGS Close bracket missing after function name The number of arguments is incorrect FOR OPEN BRACKET SEMICOLON CLOSE BRACKET Open round bracket missing after for Semicolon missing between for expressions Close round bracket missing after for FUNCTION OPEN BRACKET CLOSE BRACKET Round bracket s missing for function...

Page 276: ...DENOMINATOR IPOSplus always operates with 4096 increments motor revolution The user may wish to program travel commands in user units other than increments motor revolution e g mm revs In this case the NUMERATOR and DENOMINATOR travel distance fac tors must be set as described below Exceptions to this are travel commands with vari ables as their argument These can only be specified in increments m...

Page 277: ...ed is one revolution of the driven gear Travel distance factor NUMERATOR Increments motor revolution gear ratio i 4096 4 16384 Travel distance factor DENOMINATOR Output diameter π 314 15926 The travel distance factor DENOMINATOR is not a whole number so the accuracy of the conversion can be increased by using an expansion factor The expansion factor should be as high as possible however the result...

Page 278: ...OMINATOR to the value 1 user travel units increments 2 Optional number of user travel units increments e g 100 000 increments 3 Measure the covered distance in point 2 of the plant e g Starting position 1000 mm Target position 1453 mm Distance covered 453 mm 4 Enter the travel distance factors in the program header of the Assembler Travel distance factor NUMERATOR 100 000 Travel distance factor DE...

Page 279: ...tudio Start the IPOSplus Assembler just like you would start the IPOSplus Compiler Refer to section Step 1 Starting the IPOSplus Compiler with MOVITOOLS MotionStudio page 143 The following program interface is displayed when you start the IPOSplus Assembler 511471115 1 Menu bar 2 Toolbar 3 Program window 4 Variable window 5 Status bar 1 2 5 3 4 P i f kVA Hz n P i f kVA Hz n ...

Page 280: ... open the dialog box of the insert tool click the icon To insert the first Assembler command in the program in the main menu window click on Set commands and choose SET H K from the window on the right In the lower section of the dialog box enter the jump label of the command line the tar get variable and the value constant to which the variable should be set Click on OK to close the insert tool a...

Page 281: ...ile memory IPOSplus programs can also be downloaded from one MOVIDRIVE to another MOVIDRIVE using a DBG60B DBG11B keypad This is done using parameters P807 Copy MDX DBG and P806 Copy DBG MDX A program can be started once it has been downloaded to the inverter Choose Run Start Alternatively you can click on the icon in the toolbar Once the program has been started a green arrow program pointer is d...

Page 282: ...tage and the number of program lines selected There are three input fields under the toolbar Numerator Denominator Unit Position setpoints can be scaled using the numerator denominator ratio which means that they can be specified in units defined by the user Positions specified via variables cannot be scaled using this ratio 511872523 1 Menu bar 2 Toolbar 3 Program window 4 Variable window 5 Statu...

Page 283: ...ositioning command you can now enter the required position in mm as long as the value is a constant The operating states of the user programs task 1 task 2 and task 3 are START program is running PSTOP Program stopped BREAK program is only processed up to the marked line STEP program is processed line by line by pressing the F7 key 21 2 Creating programs 21 2 1 Inserting command lines Open the ins...

Page 284: ...n MOVIDRIVE A Assembler programs are saved with the extension MDX In MOVIDRIVE B they are saved with the extension AS0 In the dialog box enter the name and directory of the Assembler program 21 3 Compiling and downloading To generate an Assembler program in a form that the inverter can understand the source code must be compiled To do so choose Program Compile or click on the icon in the toolbar I...

Page 285: ...e program pointer turns red and re mains in the first command line The status display for task 1 task 2 and task 3 in the toolbar changes from START to PSTOP 21 4 1 Variable window All variables and their content are displayed in the variable window Double click on a variable to change the contact of the variable directly using the keyboard Press the Enter key to adopt the new value 21 5 File unit...

Page 286: ...n calls in a program for test purposes You can start the program by clicking the icon in the tool bar function key F5 or the Stop menu command from the Run menu in the menu bar can be used to stop and reset the program at any time during debugging Click the icon from the toolbar or choose Run Start form the menu bar to start the program from the current cursor position at any time during the debug...

Page 287: ... from the tool bar are listed below Symbol Menu item Description File open Opens a program File save Saves a program Program compile Compiles a Program Program Compile download Compiles a program and downloads it into the inverter Program Upload Uploads a program from the inverter Program compare with unit Compares program in the editor with the program in the inverter Run Start Starts the IPOSplu...

Page 288: ...ey are not transferred when the program is downloaded to the inverter 22 1 4 Program branches Program branches are possible with jump flags M in conjunction with jump com mands JMP M Jump flags can be inserted before any command line 22 1 5 Subroutine system Subroutines can be called with a CALL command CALL M The corresponding jump flags M are inserted before the first command of the subroutine A...

Page 289: ...ction IPOSplus Parameters as arguments for the GETSYS and SETSYS commands are referred to below as system values These sys tem values can be used as follows Read with the GETSYS command e g active current and actual speed Reading via PO data items Writing with the SETSYS command e g fixed setpoint Writing fieldbus data via PI data items System values can also be read and written using the system v...

Page 290: ...ored in the non volatile memory via MOVITOOLS MotionStudio and the keypad The SET statement of a value for a variable in an IPOSplus program is always stored in the volatile memory To store the current status in the non volatile memory the command MEM must be performed in the IPOSplus pro gram INFORMATION Be careful when writing system variables The effects are described in the section IPOSplus wi...

Page 291: ...minals that are to be used for this func tion must be identified with a 1 in the terminal mask All defined terminals must have the selected terminal level to fulfill the jump condition for the jump command Example Jump to label 20 if the inputs DI03 and DI04 have a high signal 1 otherwise the next command line is processed Mxx JMP HI LO I 00 00000000 000000 Mxx Jump destina tion MOVITRAC 07 only h...

Page 292: ...d using the value of the vari ables H483 H520 This is useful for querying inputs to be used to transfer a binary coded for example for selecting a table position Binary terminals represented with the higher value bits of variables H483 H520 can also be queried using a combination of the BMOV and JMP commands This is the case when two options are installed at the same time with terminal expansion T...

Page 293: ...ternatively one or more terminal levels of the binary outputs can be filtered using a logical operation with the system variables H 482 OUTPUT LVL H521 OUTPUT LVL B The terminal level of output DO02 is queried using the following sample program The result of the AND operation is written to the first variable that is H200 Therefore the first argument must be a variable Setting the binary outputs To...

Page 294: ...esetting binary outputs 512416139 Table 4 Commands for setting binary outputs Unit Output Setting 1 level Resetting 0 level Parameter at IPOS output MOVIDRIVE A MOVIDRIVE B DB00 Set to Brake i e cannot be programmed Controlled by the firmware MOVIDRIVE A MOVIDRIVE B DO01 BSET H481 1 1 BCLR H481 1 0 P620 DO02 BSET H481 2 1 BCLR H481 2 0 P621 MOVIDRIVE B DO03 BSET H481 3 1 BCLR H483 1 0 P622 DO04 BS...

Page 295: ...y setting the system variables H480 and H481 to 0 This only makes sense if all outputs are set as IPOSplus outputs Outputs with other parameter settings are written by the firmware and should not be modified SET H480 0 Reset the outputs of option DIO11 or DIP11 SET H481 0 Reset the outputs of the basic unit Table 5 Assigning system variable H480 H481 to binary output terminals Binary outputs Binar...

Page 296: ...Example Command GETSYS H310 ANALOG INPUTS H310 contains the value of the analog input AI1 H311 contains the value of the analog input AI2 22 3 2 Setting analog outputs The analog outputs are set using the H479 ANA OUT IP and H478 ANA OUT IP2 system variables Command SET H479 K K any constant within the aforementioned value range SET H479 describes analog output 1 SET H478 describes analog output 2...

Page 297: ...l commands Command Key points Description see ADD H H H K Arithmetical addition ADD page 302 AND H H H K Logical AND AND page 304 ASHR ARITHMETIC SHIFT RIGHT H H Arithmetic H H H Arithmetic K Arithmetic shift to the right ASHR page 306 DIV DIVISION H H H K Division DIV page 303 MOD MODULO H mod H H mod K Modulo Division remainder MOD page 304 MUL MULTIPLY H H H K Multiplication MUL page 303 NOT H ...

Page 298: ... BSET BIT SET H Bit 1 Set bit BSET page 307 Command Function Availability1 1 Observe the unit specific command structure Reference MDX B MC07B MQx MOVLNK Acyclic process and or parameter data exchange via RS 485 or sys tem bus X X X MOVLNK page 309 MOVCOM Cyclical process data transfer via RS 485 with MQx for MOVIMOT X MOVCOM page 314 MOVON Start of cyclical process data transfer via RS 485 X MOVO...

Page 299: ...itioning variable indirect GOA page 325 GOR GO RELATIVE Relative positioning variable Relative positioning constant Relative positioning variable indirect GOR page 325 Command Description See CALL Calls a subroutine CALL page 329 END Textual end END page 329 JMP JUMP Jump input terminal Jump H 0 Jump H H Jump H K System conditioned jump JMP page 330 LOOPB LOOP BEGIN Program loop begin LOOPB page 3...

Page 300: ...LUE H System value GETSYS page 336 SET H H H K SET page 339 SETFR SET FAULT REACTION Set fault response SETFR page 339 SETI SET INDIRECT H H H H SETI page 339 SETINT SET INTERRUPT Sets start address of the interrupt routine SETINT page 339 SETSYS SET SYSTEM VALUE System value H SETSYS page 344 VARINT Sets start address and data structure for variable interrupt VARINT page 347 Command Description S...

Page 301: ... COMPARE EQUAL H H H H H K CPEQ page 355 CPGE COMPARE GREATER OR EQUAL H H K H H H CPGE page 355 CPGT COMPARE GREATER THAN H H H H H K CPGT page 356 CPLE COMPARE LESS OR EQUAL H H H H H K CPLE page 356 CPLT COMPARE LESS THAN H H H H H K CPLT page 357 CPNE COMPARE NOT EQUAL H H H H H K CPNE page 357 NOTL LOGICAL NOT H NOT H NOTL page 359 ORL LOGICAL OR H H H ORL page 358 P i f kVA Hz n P i f kVA Hz...

Page 302: ...1 After the ADD command H01 200 Example 2 SET H01 100ADD H01 1 After the ADD command H01 101 Example 3 SET H01 2000000000SET H02 2000000000ADD H01 H02 0x77359400 0x77359400 0 xEE6B2800 The number range has been exceeded After addition H01 has the value 294967296 Note If the number range is exceeded during addition the result is incorrect There is no error message Command structure Mxxx SUB X1 X2 M...

Page 303: ...H01 H02 0x0000C350 0x0000C350 0 x9502F900 The number range has been exceeded After multiplication H01 has the value 1794967296 Note If the number range is exceeded during multiplication the result is incor rect There is no error message Command structure Mxxx DIV X1 X2 Mxxx Label optional X1 Variable dividend and quotient X2 Variable or constant divisor DIV HXX HYY Variable HXX is the result of th...

Page 304: ...ample 2 SET H01 17SET H02 5MOD H01 mod H02 SET H01 17SET H02 5MOD H01 mod H02 After the MOD command H01 2 Command structure Mxxx AND X1 X2 Mxxx Label optional X1 Variable result and output value X2 Variable or constant output value AND HXX HYY Variable HXX is the bit by bit AND operation of variables HXX and HYY AND HXX K Variable HXX is the bit by bit AND operation of variable HXX and a con stant...

Page 305: ...X XOR K Variable HXX is the bit by bit XOR operation of variable HXX and a con stant K Example SET H01 65535XOR H01 XOR F0F0 hex 0x00000FFF 0x0000FF0F After the XOR command H01 0xFF0F Command structure Mxxx SHL X1 X2 Mxxx Label optional X1 Variable result and output value X2 Variable or constant number of shift operations SHL HXX HYY In variable HXX the bits are shifted HYY places to the left SHL ...

Page 306: ...fted HYY places to the right SHR HXX K In variable HXX the bits are shifted K places to the right Example 1 SET H01 62SET H02 1SHR H01 H02 0b0000000000111110 0b000 0000000011111 After the SHR command H01 31 Example 2 A certain binary significance is assigned to the input terminals of the basic unit and the DIO11A option To use inputs DI10 DI13 for table position ing in a useful manner 4 entries 0 ...

Page 307: ...ET HXX YY 1 In variable HXX bit YY is set to 1 Example SHELL P621 IPOS OUTPUT BSET H481 2 1 After the BSET command has been performed the 3rd bit is set in variable H481 and output DO02 Note If the output is reserved for a different function for example P621 MOTOR STANDSTILL the bit is set in H481 but not the binary output Command structure Mxxx BCLEAR HX1 X2 1 Mxxx Label optional X1 Target variab...

Page 308: ...el optional X1 Target variable X2 Bit position in a target variable X3 Source variable X4 Bit position in a source variable BMOVN HXX YY HZZ AA In variable HXX the bit YY is set to the negated value of bit AA of the vari able HZZ Example 1 BMOVN H2 4 H7 5 The command copies the negated bit 5 of variable H7 into bit 4 of variable H2 Example 1 SET H200 0BMOV H200 0 H473 20JMP H200 1 M01 The program ...

Page 309: ...R3 132 ML_CFT_3 133 ML_CFT_PAR 134 Service H 3 Communication service for parameters ML_S_RD 1 Read service ML_S_WR 2 Write to non volatile memory ML_S_WRV 3 Writing without saving Index H 4 Index number of the parameter to be modified or read see param eter index directory The subindex must be entered in the index element on bits 23 16 least significant byte of the high word Calculation H 4 or MOV...

Page 310: ...IDRIVE B MOVITRAC B MQx BusType H 0 only 2 RS485 at X13 5 SBUS at X12 8 via DFC11B only 2 RS485 at FSC FIO11B 5 SBUS at FSC FIO21B only 2 RS485 to MOVIMOT Format H 2 no limitation no limitation only 130 Param 2PD acyclical 131 2PD acyclical 132 Param 3PD acyclical 133 3PD acyclical 134 Param acyclical Cyclical frame types are possible but _MovCommDef is recommended Command structure Mxxx MOVLNK X1...

Page 311: ...e can also be created in the program using SET commands Example 2 Axis to axis communication Reading variables from another inverter via SBus The value of variable H005 on the receiver axis is read and written to variable H010 in the sender To do this it is necessary to have 2 inverters connected via the SBus and for the terminating resistors to be activated using DIP switch S12 514449547 H0 Bus T...

Page 312: ... Settings above Sender Master below Receiver slave 514453899 H0 Bus Type 5 SBus H1 Address 2 SBus address of receiver slave H2 Frametype 134 only Para H3 Service 1 Read H4 Index 11005 Index of H5 H5 D Pointer 9 Data pointer value at H9 P i f kVA Hz n P i f kVA Hz n ...

Page 313: ...PD or 3PD min control word and speed In the following example MOVIMOT is controlled using 3 process output data items control word 1 speed and ramp The values should be entered in variables H012 H014 514510219 H0 Bus Type 2 RS 485 H1 Address 1 RS 485 address of the receiver MOVIMOT H2 Frametype 133 3PD H3 Service 3 Writing without saving H4 Index 0 not relevant for PD H5 D Pointer 12 Data pointer ...

Page 314: ... _MoviLink command other units can no longer be accessed BusType H 0 Bus type interface ML_BT_S1 2 RS485 to MOVIMOT Address H 1 Individual address or group address for the MOVIMOT to be addressed 0 99 single addressing 100 199 group addressing 255 broadcast Format H 2 Entry of process data for data transfer 3 2 process data words cyclically for MOVIMOT ML_FT_2 5 3 process data words cyclically for...

Page 315: ...the cyclical communication Communication links set up using the MovCommDef command are activated As of this point you can no longer use MovCom mDef or MOVILINK commands Only the MOVILINK command to address 253 internal can still be used H 0 Contains the error code after the parameter service has been performed or contains zero if there was no error The errors are coded according to MOVILINK H 1 0 ...

Page 316: ...or more units and receive objects from one or more units simultaneously The bus run time for a message is 2 ms and depends on the baudrate setting Com munication with MOVIMOT or the MQ fieldbus interface is not possible Structure The design of the object structure is dependent on the first argument X1 Example SCOM TRANSMIT CYCLIC H0 This command initializes cyclical transfer the object structure s...

Page 317: ...t be sent if additional data objects are to be set up Only one SCOMON command is required following several SCOM TRANSMIT com mands After the first SCOMON command no other SCOM TRANSMIT commands are accepted The number of objects that can be set up depends on the cycle time max 5 objects at 1 9 ms max 10 objects at 10 65530 ms i e 15 objects in total Sender Receiver IPOSplus program with command S...

Page 318: ...t Value Function 0 3 0 8 Number of data bytes 4 7 0 Reserved 8 0 1 0 MOTOROLA format 1 INTEL format The format of the sender and receiver must be the same 9 31 0 Reserved H 4 Number of variable H at which the data to be sent are to start H 5 Result Return Code of SCOM command 0 Free bus capacity in calculated value of this unit 1 Incorrect cycle time 2 Too many objects set up 3 Bus overload 5 Wron...

Page 319: ...llowing an IPOSplus program restart F5 A P STOP F9 P Start or mains 24V auxiliary operation turned off and then on again You can set up max 32 data objects for reading in data H 0 Object number CAN Bus ID The object number is used for addressing the data object An object number can only be allocated once in a bus system The object numbers of the sender TRANSMIT and receiver RECEIVE must be the sam...

Page 320: ... must be the same 9 31 0 Reserved H 2 Number of the variable H from which point the received data is stored Differences in user data formats MOTOROLA and INTEL MOTOROLA format INTEL format CAN Data Byte 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 Variable H 1 H H H 1 Variables byte 3 2 1 0 3 2 1 0 0 1 2 3 0 1 2 3 INFORMATION In order to send or receive the data via SBus2 you have to add 0x1000000 to the ob je...

Page 321: ...ng data cyclically In MOVIDRIVE B the command has been replaced by SCOMST However due to downward compatibility it can still be used with MOVIDRIVE B 514591883 H0 Objectno 1025 user defined H1 Len 8 Variable length 8 bytes H2 D Pointer 5 Data pointer value at H5 H5 11111 sent value INFORMATION The synchronization procedure sync ID has been modified from MOVIDRIVE A In contrast to MOVIDRIVE A for M...

Page 322: ...and al ways has the same effect as SCOMON page 321 Structure Command structure Mxxx SCOMON Mxxx Label optional Argument Meaning START ALL Starts cyclical communication synchronously from SBus 1 and SBus 2 STOP ALL Stops cyclical communication synchronously from SBus 1 and SBus 2 START1 Starts cyclical communication from SBus 1 STOP1 Stops cyclical communication from SBus 1 START2 Starts cyclical c...

Page 323: ...t command is processed during reference travel recommended ZP zero pulse References to the zero pulse of the encoder signal not significant if 903 0 or P903 5 CAM reference cam References to the reference cam not significant if 903 0 or P903 5 RESET Reference travel which has started is interrupted brakes at positioning ramp and the call is reset For a reference axis the message Axis refer enced i...

Page 324: ...it can collide with the hardware limit switch at the slightest overshoot The same danger applies when the holding brake is released One way to prevent this from happening is to position the drive once reference travel is complete so that the drive is positioned a sufficient distance away from the hardware limit switch approximately 0 5 1 motor revolution INFORMATION If a waiting referencing comman...

Page 325: ...sitions are written directly to H454 INFORMATION Axes turning in one direction for example turntables conveyor belts or roll feeders are usually described as modulo axes see the modulo function P960 P963 In this case a mechanical position of the axis corresponds to an actual value H455 irrespec tive of the number of revolutions turned for prerequisites for this function see the de scription of the...

Page 326: ... in the program header numerator denominator unit A waiting period of 5 seconds elapses when a position is reached Command structure Mxxx GOR X1 X2 Mxxx Label optional X1 NoWait Program processing is continued while the drive is still moving This permits the program to be processed at the same time as the travel movement recommended Wait Program processing does not continue until the actual positi...

Page 327: ... 100 rpm to 3 000 rpm when the drive moves beyond posi tion 40960 The entire return travel takes place at 3 000 rpm 515073291 515074827 1 Slow CW travel 100 rpm 2 Slow CCW travel 100 rpm 3 Fast CW travel 3000 rpm 4 Fast CCW travel 3000 rpm 5 Reference travel 6 Travel to zero 7 Wait 1 s 8 Set slow speed 9 Travel to end position 10 As long as Actpos Mot H511 is less than 40960 stay in current line 1...

Page 328: ...te positioning is shown in the jog mode sample program INFORMATION The GOR command always refers to target position H492 For example if the GOR 1000 incr command is sent 100 times in a program the target position is set internally to 100 x 1000 increments The position setpoint may shift away from the actual posi tion of the motor if the command is called up cyclically The IPOS control may then fai...

Page 329: ... The following program lines will then be processed It is also possible to have nested subroutine calls maximum nesting depth 32 levels Structure Example The main program positions the drive 10 revolutions CCW after which there is a sub routine call CALL M1 Set 2 outputs of the basic unit for 1 s the output parameters must be set to IPOS OUTPUT The jump back to the main program RET takes place nex...

Page 330: ...le JMP HI I 0000000000000011 M03 After the JMP command has been performed processing continues from the M03 label if the input terminals DI00 and DI01 are set to level 1 JMP comparison The JPM command causes the program to jump to a specified label when comparison in the command results in a true statement Command structure Mxxx JMP X1 X2 Myyy Mxxx Label optional X1 HI Jump if the input terminals ...

Page 331: ...nly the operators and are possible Myyy Jump label to which the program jumps if the condition is ful filled 515195787 Command structure Mxxx JMP X1 Myyy Mxxx Label optional X1 UNCONDITIONED Unconditional jump N 0 Jump if the speed is equal to zero N 0 Jump if the speed is not equal to zero NOT IN POSITION Jump if not in position TP1 Jump if there is an edge change at touch probe terminal DI02 NOT...

Page 332: ...ber of loop cycles is to be variable a JMP command must be used instead of a LOOP command and the variable condition must be checked at each cycle Structure LOOPE LOOP END This command specifies the end of a program loop that was started using the LOOPB command 515235723 INFORMATION Do not exit program loops with a jump command Jump commands and subroutines are allowed within a program loop Comman...

Page 333: ... command ms in task 1 Structure REM REMARK The REM command adds a remark line to the program Remark lines cannot be saved in the inverter All remark lines are lost after DOWNLOAD of the program followed by an UPLOAD Remark lines can only be saved in program files on the PC Structure RET RETURN The RET command terminates a subroutine see the CALL command and jumps back to the program from which the...

Page 334: ... argument X1 START STOP that is the control word of TASK2 is written The control word and start address are both set to 0 when the power is switched on i e TASK2 is deactivated In MOVIDRIVE B the command has been replaced by TASK However due to down ward compatibility it can still be used with MOVIDRIVE B Structure Example TASK2 START M03 Task 2 is started at this command and the first command aft...

Page 335: ...s task once the time is up Structure Example SET H0 20000 SET H489 H0 M01 JMP H489 0 M01 INFORMATION If the waiting time is to be variable you will have to initialize a timer H487 H489 instead of a WAIT command and program a loop with the JMP command until the timer has expired Command structure Mxxx WAIT X1 Mxxx Label optional X1 Waiting time in ms 0 32767 P i f kVA Hz n P i f kVA Hz n ...

Page 336: ...and has been performed X2 ACTIVE CURRENT Active current in 0 1 rated unit current ACT SPEED actual speed in 0 1 rpm SETP SPEED Setpoint speed in 0 1 rpm ERROR Error code according to the Error messages and list of errors table in the system manual SYSTEM STATUS Operating status value of the 7 segment display without fault status in accordance with the table Operating display in the system manual A...

Page 337: ...S command activates the cam controller the cams are formed cyclically in the background The structure of the variables depends on whether the standard or expanded cam controller is called The data structure is described in section Position Detection and Positioning cam controllers 515353867 ANALOG OUTPUTS 10 V correspond to 10000 H The variable in the GETSYS H ANALOG OUTPUTS command defines the be...

Page 338: ...r 215 0 215 1 Numerator for user scaling H 3 Denominator 1 215 1 Denominator for user scaling H 4 D Pointer 0 458 Pointer to result variable H H Result unit nX14 Inc Time base Example The speed of the master encoder is to be displayed in arcs per hour With an average value filter of 30 ms and encoder X14 the arcs per hour are calculated as fol lows 11250 384 1000 ms 60 s 60 min Incr per full load ...

Page 339: ...ion to the unit fault is selected with argument 2 The selected fault reaction will only be executed once the SETFR command has been processed The most recently selected fault response call of the SETFR command or changes in P83_ Fault response is the one in effect You can program all responses to a fault as long as it has a point in column P in the fault list in the operating instructions or the s...

Page 340: ...he output stage is inhibited no torque the brake is activated After reset Response as for power off on The IPOSplus program reference position outputs parameters SETSYS command and variables set by IPOSplus are reset program starts in line 1 E STOP FAULT The drive is stopped at the emergency stop ramp After reset Response SWITCH OFF FAULT RAPID STOP FAULT The drive is stopped at the rapid stop ram...

Page 341: ...umber in variable X1 gets the value from variable X2 INFORMATION Is the number of the indirectly addressed variables outside the defined range e g MOVIDRIVE A range 0 512 the fault message IPOS INDEX OVERFL 32 is gen erated Command structure Mxxx SETI X1 X2 Mxxx Label optional X1 Hxxx Target variable X2 Hyyy Number of the source variable INFORMATION Is the number of the indirectly addressed variab...

Page 342: ...dependent of the currently processed main program line If the interrupt routine ends with the RET command pro gram processing continues from the point where the interruption occurred processing of an interrupted wait command is continued The SETINT command is only in effect in task 1 and processing of task 1 is interrupted whilst the interrupt is processed It is only possible to process one interr...

Page 343: ...nd Depending on the set fault reaction parameter group 830 or SETFR command pro cessing of the interrupt routine will result in a behavior other than the one described above No interrupt is performed if the faults in parameter group 830 are set to No response or if the SETFR command is set to NO RESPONSE The program is restarted see the SETFR command after acknowledgment of the fault if the fault ...

Page 344: ...e of one or more variables to an internal system value The first argument selects the system value to be written whilst the second argu ment contains the number of the first source variable The system values are reset to their original values when the system is switched off mains and 24 V power INFORMATION Writing system values can alter unit settings that have been made for the application during...

Page 345: ...ravel if there is no controller inhibit 11 12 13 14 16 17 18 19 CFC speed control CFC torque control CFC IPOS positioning CFC synchronous operation DRS11A SERVO speed control SERVO torque control SERVO IPOS positioning SERVO synchronous operation DRS11A IMAX Setting the maximum current only parameter set 1 as a percentage of the unit rated current setting range 0 1 150 in 0 1 steps settings can al...

Page 346: ...0 to 512 2 Start interpolation enter interpolated values from index 512 starting with the electronic cam in descending order from index 512 to 0 3 Preparatory parameter calculation for interpolation concluded start entering interpolated values in the electronic cam H 1 SplineModeControl Reserved H 2 SplineDest Value range 0 5 Number of the electronic cam in which the interpolated values are to be ...

Page 347: ...oints Hxx First variable of a data structure see table H 0 Mxx Label with the first command of the interrupt function Data structure of the variable interrupt Variable VARINT element structure Description H 0 Control 0 All VarInterrupt OFF Reset 1 Interrupt gets computing time from task 2 and interrupts this task for as long as the interrupt is processed 2 Interrupt gets computing time from task 3...

Page 348: ...comparison value SrcVar CompVar 6 Value of the reference variable AND the comparison value is not 0 SrcVar CompVar 0 7 Value of the reference variable AND the comparison value is 0 SrcVar CompVar 0 8 Positive edge of the bit masked out by CompVar 9 Negative edge of the bit masked out by CompVar 10 As 2 however interrupt is only processed once each time the condi tion is fulfilled edge triggered 11...

Page 349: ... position H492 to have been transmitted is retained Inhibit via control word the ASTOP IPOS ENABLE command is required with the subsequent travel command The brake is not applied if the brake function is activated TARGET POSITION Positioning stop with positioning ramp P911 P912 and calculated STOP target position only possible in the positioning mode followed by position control The last target po...

Page 350: ...ositions H511 H510 H509 are stored in the variables intended for this purpose H502 H507 once A counter is only available in MQX and MOVITRAC 07 with variable H511 To take an other measurement the touch probe must be enabled again It takes 100 µs to store the touch probe positions regardless of ongoing program pro cessing The terminal level must have been altered for at least 200 µs to be detected ...

Page 351: ...S ABS H503 TP POS1ABS H502 TP POS2ABS Virtual encoder only for MOVIDRIVE B H376 H501 TpPos1_VE H500 TpPos2_VE Command structure Mxxx TOUCHP X1 Mxxx Label optional X1 ENABLE 1 Enables the touch probe input DI02 When the signal changes low high and high low the actual positions are stored DISABLE 1 Inhibits the touch probe input DI02 ENABLE 2 Enables the touch probe input DI03 When the signal change...

Page 352: ...0 revs If there is a change of signal level at touch probe input DI03 whilst the drive is moving to the target position of 100 revs a further 10 revs 40960 incr is traveled from precisely this touch probe position For return travel to position 0 the touch probe function is de activated using the command DISABLE2 516738571 P i f kVA Hz n P i f kVA Hz n ...

Page 353: ...d up in the time interval specified in the argument All tasks are halted and the drive is stopped with fault 41 if the time specified in the watchdog timer H490 elapses before the monitoring function is switched off using the WDOFF com mand The output stage is inhibited and the brake is applied The drive coasts to a halt if there is no brake Structure 516742923 Command structure Mxxx WDON X1 Mxxx ...

Page 354: ...ommands Example The drive moves for as long as the level at DI05 is set to 1 high The watchdog func tion ensures that the drive does not travel for more than 10 s If the 10 second limit is exceeded the drive is stopped 516804619 P i f kVA Hz n P i f kVA Hz n ...

Page 355: ...further for example with a subsequent jump command Variable X2 remains unchanged Structure Example 1 SET H0 13 SET H1 50 CPEQ H0 H1 After the program has been processed H0 has the value zero and H1 the value 50 Example 2 SET H0 13 CPEQ H0 13 After the program has been processed H0 has the value one CPGE COMPARE GREATER OR EQUAL The CPGE command compares observing the signs whether variable X1 is g...

Page 356: ...value zero Example 2 SET H0 3 SET H2 2 CPGT H0 H2 After the program has been processed H0 has the value one CPLE COMPARE LESS OR EQUAL The CPLE command compares observing the signs whether variable X1 is less than or equal to the variable or constant X2 Variable X1 contains the result It is not equal to zero if the condition is fulfilled otherwise the result is zero The result can be processed fur...

Page 357: ...e one CPNE COMPARE NOT EQUAL The CPNE command compares observing the signs whether variable X1 is not equal to the variable or constant X2 Variable X1 contains the result It is not equal to zero if the condition is fulfilled otherwise the result is zero The result can be processed further for example with a subsequent jump command Variable X2 remains unchanged Structure Example 1 SET H0 13 SET H1 ...

Page 358: ...ter the program has been processed H01 has the value one ORL LOGICAL OR The ORL command is the logical OR operation of two variables The result is written to variable X1 Variable X2 remains unchanged The result is one when one of the two vari ables 0 The result is zero when both variables 0 Structure Example 1 SET H01 100 SET H02 0 ORL H01 H02 After the program has been processed H01 has the value...

Page 359: ...hanged The result is one when variable X2 0 The result is zero when variable X2 0 Structure Example 1 SET H02 100 NOTL H01 NOT H02 After the program has been processed H01 has the value zero Example 2 SET H02 0 NOTL H01 NOT H02 After the program has been processed H01 has the value one Command structure Mxxx NOTL X1 NOT X2 Mxxx Label optional X1 Variable result X2 Variable P i f kVA Hz n P i f kVA...

Page 360: ... and enter the sample program Flash output DOØ1 5 Download the sample program from the program window PC to the inverter s pro gram memory Press Ctrl F9 in the active program window 6 Start the sample program Press F9 in the active program window 7 Check the user program The task 1 display in the program header changes from PSTOP to START The program pointer runs in the program window In Shell the...

Page 361: ...binary input DI03 NO FUNCTION P603 binary input DI04 LS CW P604 binary input DI05 LS CCW P700 operating mode VFC n Reg CFC SERVO IPOS NUMERATOR 4096 DENOMINATOR 1 UNIT rev 2 Enter 10 motor revolutions back and forth sample program 3 Download the sample program Press F2 in the active program window 4 Drive must not reach the limit switches Terminals DIØ4 X13 5 and DIØ5 X13 6 must have the level 1 5...

Page 362: ...n a selected position is reached Automatic movement away from hardware limit switches The first 3 input terminals of the DIO11B option allow for 3 positions to be approached The drive is moved away from a hardware limit switch by entering a 1 signal at the RESET input DI02 24 2 2 Settings A detailed description of the configuration of inputs outputs is available in the remark section of the progra...

Page 363: ...6940939 100 100 i 5 100 100 2000 500 LHWLS LSWLS BD CAM MZP S d 50 mm M BD RHWLS RSWLS UP BD braking distance RHWLS CW hardware limit switch RSWLS CW software limit switch UP upper travel range S travel carriage CAM Reference cam MZP Machine zero LSWLS CCW software limit switch LHWLS CCW hardware limit switch P i f kVA Hz n P i f kVA Hz n ...

Page 364: ...2 3 4 5 6 7 8 9 10 11 RHWLS LHWLS CAM AI21 AI22 AGND AOV1 AOC1 AGND AOV2 AOC2 AGND DI1Ø DI11 DI12 DI13 DI14 DI15 DI16 DI17 DCOM DGND DO1Ø DO11 DO12 DO13 DO14 DO15 DO16 DO17 24VIN DIO11B MOVIDRIVE PLC GND 24 V 516945803 PLC external controller DI00 Controller inhibit DI01 Enable DI02 Reset DI03 Reference cam DI04 CW limit switch DI05 CCW limit switch DI10 Position 1 DI11 Position 2 DI12 Position 3 ...

Page 365: ...610 Binary input DI10 P617 Binary input DI17 IPOS INPUT IPOS INPUT 63_ Binary outputs DIO11 option P630 Binary output DO10 P636 Binary output DO16 P637 Binary output DO17 FAULT IPOS IN POSITION IPOS REFERENCE 7__ Control functions P700 Operating mode P730 Brake function CFC IPOS YES 9__ IPOS Parameter P900 Reference offset mm P901 Reference speed 1 rpm P902 Reference speed 2 rpm P903 Reference tra...

Page 366: ...set value 0 DI04 Limit switch right Limit switch for stopping 0 DI05 Limit switch left Limit switch for stopping 0 DI10 IPOS input Hoist position 0 mm 0 DI11 IPOS input Hoist position 1000 mm 0 DI12 IPOS input Hoist position 2000 mm 0 DI13 IPOS input 0 DI14 IPOS input Jog positive 0 DI15 IPOS input Jog negative 0 DI16 IPOS input Start reference travel 0 DI17 IPOS input Start positioning Level Term...

Page 367: ...branch distributor SETINT ERROR M10 M100 CALL M50 JMP LO I0001000000000000 M101 CALL M20 M101 JMP LO I0000010000000000 M102 CALL M30 M102 JMP LO I0000100000000000 M103 CALL M40 M103 JMP UNCONDITIONED M100 Program branch distributor Activate interrupt routine for hardware limit switch processing Reset move clear of limit switch Main program DI16 1 Reference travel DI15 1 Jog CW DI14 1 Jog CCW Subro...

Page 368: ... input DI02 24 3 2 Settings The detailed configuration of the inputs outputs and the variables used in the program is documented in the remark section of the program source code Reference subroutine M20 ASTOP IPOS ENABLE GO0 U NW ZP M22 JMP LO I0000000000000001 M21 SET H319 0 BMOV H319 0 H473 20 JMP H319 0 M22 M21 ASTOP TARGET POSITION RET Reference travel Travel release Reference travel no wait s...

Page 369: ...IPOS input 0 DI12 IPOS input 0 DI13 IPOS input 0 DI14 IPOS input Jog positive 0 DI15 IPOS input Jog negative 0 DI16 IPOS input Start reference travel 0 DI17 IPOS input Start positioning Level Terminal Unit terminal function Meaning 0 DB00 MDX Brake Brake control via auxiliary relay 0 DO01 MDX Ready Controller active power supply to electronics OK 0 DO02 MDX Fault no fault 0 DO10 DIO11B IPOS output...

Page 370: ... commas IPOS INPUT OUTPUT Terminal wiring of inputs DI00 Controller inhibit DI01 Enable DI02 Error reset move LS clear DI04 Reference cam DI03 CW limit switch DI05 CCW limit switch DI14 Jog CW DI14 Jog CCW DI16 Start reference travel DI17 Start positioning Terminal wiring of outputs DB00 Brake DO01 Ready signal DO16 IPOS in position DO17 IPOS reference Variables used H310 V jog CW 1 10 rpm H311 CC...

Page 371: ... Reset input function DI02 Then stop drive by setting target position to current position Reference subroutine GO0 U NW ZP M20 ASTOP IPOS ENABLE M22 JMP LO I0000000000000001 M21 SET H309 0 BMOV H309 0 H473 20 JMP H309 0 M22 M21 ASTOP TARGET POSITION RET Reference travel Travel release Reference travel do no wait start at zero pulse as long as Controller inhibit 0 and the bit in the status word IPO...

Page 372: ...ller inhibit and Enable 1 signal When a new table position is selected it is advisable to set input DI17 to a 0 signal until it is certain that all the bits of the table pointer have been set Jog M30 JMP LO I0000010000000000 M31 JMP HI I0000100000000000 M31 CALL M35 JMP H319 1 M32 GETSYS H317 ACT POSITION ADD H317 4096000 M32 ASTOP IPOS ENABLE GOA NOWAIT H317 JMP UNCONDITIONED M30 M31 ASTOP TARGET...

Page 373: ...are limit switch by entering a 1 signal at the RESET input DI02 24 4 2 Settings The detailed configuration of the inputs outputs see below and the variables used in the program is documented in the remark section of the program source code The table positions can be written via the variable window of the Assembler or with the keypad in the variables H00 H15 The variables are stored in the non vola...

Page 374: ...DI13 IPOS input Variable pointer bit 2 3 0 DI14 IPOS input Jog positive 0 DI15 IPOS input Jog negative 0 DI16 IPOS input Start reference travel 0 DI17 IPOS input Start positioning Level Terminal Unit terminal function Meaning 0 DB00 MDX Brake Brake control via auxiliary relay 0 DO01 MDX Ready Controller active power supply to electronics OK 0 DO02 MDX Fault no fault 0 DO10 DIO11B IPOS output Varia...

Page 375: ...ut inverted commas IPOS INPUT OUTPUT Terminal wiring of inputs DI00 Controller inhibit DI01 Enable DI02 Error reset move LS clear DI03 Reference cam DI04 CW limit switch DI05 CCW limit switch DI10 Variable pointer bit 2 0 DI11 2 1 DI12 2 2 DI13 2 3 DI14 Jog CW DI15 Jog CCW DI16 Start reference travel DI17 Start positioning Terminal wiring of outputs DB00 Brake DO01 Ready signal DO10 Variable point...

Page 376: ...MP HI I0000000000110000 M2 ASTOP IPOS ENABLE JMP UNCONDITIONED M3 M2 ASTOP TARGET POSITION M1 RET Reset move clear of limit switch If drive has not moved onto limit switch DI04 DI05 Limit switch CW CCW then return to branch distribu tor If it has then unlock travel and wait until drive has moved clear of limit switch parameterized Reset input function DI02 Then stop drive by setting target positio...

Page 377: ... M52 ASTOP HOLD CONTROL M55 RET Table positioning end END Main program table positioning Table positions are only approached with a referenced drive DO17 10 bit position in output terminal system vari able H473 parameter set to IPOS reference Set travel speed acceleration and deceleration ramp Select table pointer travel variable no binary coded with 4 inputs DI10 DI13 Reset the output Tab positio...

Page 378: ...17 DIO11A analog output 31 DIO11A analog outputs 30 DIO11A binary outputs 31 DIP11A binary outputs 31 Directories 156 Directory include directives 156 DPRAM synchronization 141 DRS11A binary inputs 30 DRS11A status message 30 DRS_Ctrl DRS CTRL 30 DRS_Status DRS STATUS 30 E Encoder scaling 139 Encoder scaling ext encoder 135 Encoder type 53 138 Error interrupt 46 Exclusion of liability 15 External ...

Page 379: ...ffset 38 Actual value scaling 38 D component 38 Filtered and scaled actual value 38 I component 38 Maximum actual value 38 Maximum output value 38 Maximum output value control variable 39 Minimum actual value 38 Minimum output value 38 Minimum output value control variable 39 Operating mode 38 P component 38 Precontrol 38 Proportional component 38 Setpoint 38 Setpoint address 38 Setpoint scaling 3...

Page 380: ...e X14 135 P946 synchronous encoder counting direction X14 136 P947 Hiperface offset X14 136 P948 Automatic encoder replacement detection 137 P95x absolute encoder SSI 138 P950 encoder type 138 P951 counting direction 138 P952 cycle frequency 139 P953 position offset 139 P954 Zero offset 139 P955 encoder scaling 139 P956 CAN encoder baud rate 139 P96x IPOS modulo function 140 P960 Modulo function 1...

Page 381: ..._2 TIMER 2 33 Touch probe 35 Touch probe DI02 interrupt 47 TpPos1_Abs TP POS1ABS 35 TpPos1_Ext TP POS1EXT 35 TpPos1_Mot TP POS1MOT 35 TpPos1_VE TP POS1VE 35 TpPos2_Abs TP POS2ABS 35 TpPos2_Ext TP POS2EXT 35 TpPos2_VE TP POS2VE 35 TP POS1ABS 35 TP POS1EXT 35 TP POS1MOT 35 TP POS2ABS 35 TP POS2EXT 35 TP POS2MOT 35 Travel speed CW CCW 127 T0_Reload T0 RELOAD 33 U User timer 33 User watchdog 34 V Vari...

Page 382: ......

Page 383: ......

Page 384: ...SEW EURODRIVE Driving the world SEW EURODRIVE GmbH Co KG Ernst Blickle Str 42 76646 BRUCHSAL GERMANY Tel 49 7251 75 0 Fax 49 7251 75 1970 sew sew eurodrive com www sew eurodrive com ...

Reviews: