Home

"user manual"

image

Contents

1. SEW EURODRIVE Driving the world _th cr a 4 w EP i em fl ER ow SEW EURODRIVE Driving the world EURODRIVE SEW EURODRIVE GmbH amp Co KG P O Box 3023 D 76642 Bruchsal Germany Phone 49 7251 75 0 Fax 49 7251 75 1970 sew sew eurodrive com www sew eurodrive com
2. CamOutputs Number of outputs max 8 CamData 1 Pointer to first CamOutput 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 CamAreas Number of the position windows for this channel 1 4 the left limit value must always be smaller than the right one If a modulo axis requires a position window that exceeds the 360 0 limit then this range will have to be divided into two position windows This process lets the operator set three related ranges for this output LeftLimit1 CCW limit window 1 RightLimit1 CW limit window 1 LeftLimit4 CCW limit window 4 RightLimit4 CW limit window 4 GSPODATA3 Bus types 0 reserved 1 SO RS485 1 2 S1 RS485 2 3 Fieldbus 4 reserved 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 Manual IPOSplus 17 215 17 216 Compiler Functions Standard functions Instruction type Standard structure Elements Brief description GSACTSPEEDEXT TimeBase Cycle time for speed d
3. H300 Travel speed CW 1 10 rpm H301 Travel speed CCW 1 10 rpm H302 acceleration ramp CW ms H303 deceleration ramp CCW linear H320 H324 auxiliary variables kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk corresponding variables 0 15 in binary coded format Comment Manual IPOSplus 24 375 24 376 Assembler Examples Table positioning sample program Initialization SET H300 15000 SET H301 15000 SET H302 1000 SET H303 1000 Set speed and acceleration values for table position ing see variable description in the remarks for the program source code 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 pro cessing reset move clear of limit switch main pro gram DI16 1 Reference travel DI14 1 Jog CW DI15 1 Jog CCW M10 JMP HI I0000000000110000 MI M3 JMP 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
4. Manual IPOSplus Label MI Constant dec K jo Condition type NO RESPONSE x DISPLAY FAULT SWITCH OFF FAULT E STOP FAULT RAPID STOP FAULT SWITCH DEE WARN E STOP WARNING RAPID STOP WARN 515358219 23 339 23 340 Structure Assembler Commands Set commands Command structure Mxxx Label optional Mxxx SETFR X1 X2 X1 Fault code of the fault for which the response is to apply The following error numbers are permitted 08 n monitoring 11 Overtemperature 26 External terminal P830 28 Fieldbus timeout P831 31 TF sensor P835 39 Reference travel 42 Lag error P834 43 RS 485 timeout P833 47 SBus timeout P836 77 IPOS control word 78 IPOS software limit switch P838 84 Motor protection P832 92 DIP operating range 93 DIP absolute encoder X2 NO RESPONSE No response and no fault display DISPLAY FAULT No response only the fault is displayed the terminal level of an output pro grammed to FAULT is set from 1 to 0 SWITCH OFF FAULT The 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 IPOS 4S are reset program starts in line 1 E STOP FAULT The drive is stopped at the emergency stop ramp After reset Response SWITCH OFF
5. Command structure Mxxx BMOV HX1 X2 HX3 X4 Mxxx Label optional X1 Target variable X2 Bit position in a target variable X3 Source variable X4 Bit position in a source variable BMOV HXX YY HZZ AA In variable HXX the bit YY is set to the value of bit AA of the variable HZZ Example 1 BMOV H2 4 H7 5 The command copies bit 5 of variable H7 into bit 4 of variable H2 Example 2 SET H200 OBMOV H200 0 H473 200MP H200 1 M01 The program jumps to the label M01 when the drive is referenced H473 STAT WORD 23 307 23 Bit commands Assembler Commands BMOVN BIT The BMOVN command copies a bit from one variable to a bit in another variable negat MOVE NEGATE ing it in the process The bit places of a variable have the numbers 0 31 The least significant bit has the number 0 Command structure Mxxx BMOVN HX1 X2 HX3 X4 Mxxx Label 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 OBMOV H200 0 H473 200MP H200 1 M01 The program jumps to the label M01 when reference travel has not yet been perfor
6. Controller inhibit Enable Enable Rapid stop Enable stop Hold control Integrator switchover Parameter set switchover Fault reset l l l l l l i tart reference travel l l I I i Operating mode bit 0 01 Jog 10 Referencing 11 Automatic I Operating mode bit 1 266 Manual IPOSplus Compiler Examples Compiler programming frame 18 Drive feedback to PLC bus monitor process input data m z 0 o Q ll status word user specific 2 word actual speed 1 10 rpm 3 word actual position in incr only low word Assignment of status word user specific 15 1413121110 9 8 7 6 5 4 3 2 1 0 not assigned inverter ready IPOS reference drive referenced Target position reached l l l Brake released Fault l i Acknowledge operating mode bit 0 01 Jog 10 Referencing 11 Automatic Acknowledge operating mode bit 1 note AKTIVE BA is acknowledged Brief intorduction to using the bus monitor 1 Start bus monitor in MOVITOOLS MotionStudio 2 Click the button Set PO data 3 In the left hand field click on the tab pages POl PO2 PO3 and enter the setpoints 4 click the send button This is sample software the functionality is NOT guaranteed Users accep
7. 6 5 7 6 Set Zero offset P954 Zero offset is used for assigning the value you want to a specific position Enter the pa rameter as described for P954 in the chapter IPOS Parameters 6 5 8 7 Set encoder factors P942 and P943 The parameters are used for internal adaptation of the speed control and for monitoring functions in the DIP11 Practically this adapts the physical quantity a mechanical ratio between the motor en coder and external encoder and the mechanical feedrate constant for example for ex ternal incremental linear encoders The following diagram shows the connection between the parameters and variables ABS Nag F N Jee T O H509 P955 P953 476717707 Py Non linearized position value of encoder Paps Actual position value for ramp generator and position controller P941 Actual position source P942 Encoder factor numerator P943 Encoder factor denominator P953 Position offset P954 Zero offset P955 Encoder scaling H509 External encoder with actual value on variable H511 Motor encoder with actual value on variable To find out how to determine encoder factors refer to the parameter descriptions for P942 P943 6 5 9 8 Set P941 actual position source This parameter determines which position encoder is used for position control provided that an amp IPOS operating mode has been set in P700 Operating mode There are positioning commands in the IPOSPlus pro
8. Manual IPOSplus 225 17 226 Parameter set tings for the receiver Compiler Functions Standard functions Data exchange via parameter channel Addressing via RS 485 P810 P812 Parameters Address Explanation P810 0 99 Individual addressing sender address P811 101 199 Group addressing multicast the sender can write to all receivers with the same group address at the same time P812 Timeout monitoring function deactivated if set to 0 ms or 650 ms Addressing via SBus P88_ and P89_ Parameters Address Explanation P881 P891 0 63 Single addressing P882 P892 0 63 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 rate depends on the length of the bus cable and must be the same for the sender and the receiver 1 When using the group address increase the input value for the target address by 100 Parameter P880 P890 SBus protocol must be set to MoviLink SBus terminating resistors must be switched on or connected in the first and last sta tions Data exchange via process data channel Serial communication must be set in accordance with the tables above addressing via RS 485 SBus for the process data exchange The following additional settings are re quired
9. P9xx IPOS Parameters P90x IPOS reference travel 12 First search direction is CW Reference position First zero pulse or falling edge to the right of the reference cam Machine zero reference position reference offset e Type 3 CW limit switch First search direction is CW Reference position First zero pulse or falling edge to the left of the right limit switch Machine zero reference position reference offset Reference travel should take place to zero pulse e Type 4 CCW limit switch First search direction is CCW Reference position First zero pulse or falling edge to the right of the left limit switch Machine zero reference position reference offset Reference travel should take place to zero pulse e Type 5 No reference travel Reference position current position Machine zero reference offset e 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 switches must be flush Type 7 Reference cam flush with CCW limit switch First search direction is CCW Reference position First zero pulse or falling edge to the right of the reference cam Machine zero reference position reference offset Note Reference
10. e Processing time either as long as the condition is fulfilled or once each time the condition is fulfilled edge triggered e Priority of the interrupt e Value of the reference variable used to trigger the interrupt Manual IPOSplus 49 Task Management and Interrupts Variable interrupts with MOVIDRIVE B INFORMATION functions Assembler commands The data structure of the command is described in the system function Compiler The behavior of the interrupt can by adapted dynamically during runtime by either e Changing the data structure and then calling the command again necessary if for example the CompVar value used for the comparison changes or e calling the command with a different data structure but with the same value in variable H 1 IntNum 5 7 2 IPOS access to the internal interrupt control Information as to whether a variable interrupt has been requested can be seen in the IPOSPlus program in the variable uVarEventRequest H530 bit 0 to 3 These Request bits can also be written in the IPOSP 4S program uVarEventRequest H530 0 Request for variable interrupt 0 uVarEventRequest H530 1 Request for variable interrupt 1 uVarEventRequest H530 2 Request for variable interrupt 2 uVarEventRequest H530 3 Request for variable interrupt 3 In this way for example the request bit can be set for test purposes during initial startup
11. 22 292 Assembler Programming Binary inputs outputs Query via system variable The terminal level of the binary inputs in the basic unit and any installed option are rep resented cyclically in the system variables H483 INPUT LVL MOVIDRIVE A H520 INPUT LVL B MOVIDRIVE B In the process the bits of the H483 system variable are each assigned to one hardware input The assignment of the H483 system variables for MOVIDRIVE A H520 for MOVIDRIVE B to the binary input terminals in described in the section IPOSPUS Vari ables Overview of the system variables The binary inputs in the IPOsPlus program can be queried 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 Table 3 Example of transmitting a binary coded value via input terminals of MOVIDRIVE A Example Reading inputs Unit s binary inputs Terminal designation DIO5 D104 DIO3 DI02 DIO1 DIOU Significance 2 24 28 2 2 20 Terminal level 1 0 0 0 1 1 Evaluation 1x25 0x 24 0x 23 0 x 2 1x21 1x 2 Variable value H4831 32 0 0 0 2 1 35 1 If all DIO11A DIP11A input terminals and control word 2 are set to level 0 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 w
12. BL Peer to peer 483418763 Changed is displayed in the status bar This means the program has been changed compared with 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 149 13 150 Compiler Editor First steps You can use the insert tool while you are editing the program Click the right mouse but ton to open the context menu containing the Insert Instruction menu item This menu item allows you to call up the insert tool Calls insert tool Insert Instruction x C Construction System Function System Function s Arguments Setlnterrupt SetVarlnterrupt Time ms 5000 wo 2 d T E SetT ask SetT ask2 _SystemCall TouchProbe _Waitlnput _WaitSystem _WwdOff _wdOn sel l Pre defined Structures GSAINPUT GetSys GSCAM GetSys GSPODATA3 GetSys GSPODATAI0 GetSys GSAOUTPUT GetSys GSACTSPEEDEXT TEJET MoviLink MOVLNK x Initializing Sequence _Wait 5000 Please push button below for pasting initializing sequence for each structure variable declared in user program Please note it s possible only after running compiler
13. IPOSplus fnErrorinterrupt H2 while StatusWord amp 0b10 only leave while loop when drive is fault free H1 main _SetInterrupt SI_ERROR fnErrorInterrupt while 1 HO HO is incremented as long as the inverter is functioning correctly If a fault occurs H2 is increased by one and H1 is incremented until the inverter functions correctly Depending on the fault response set the system either continues processing with the current values in task 1 or IPOS is restarted using the values from the EEPROM D102 interrupt The entire interrupt routine is run through once if 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 fnTouchIinterrupt Main function IPOS initial function _SetInterrupt SI_TOUCHP1 fnTouchInterrupt Act interrupt routine TouchProbe TP ENT j while 1 H1 H1 1 HO is increased by 1 once If the touch probe command is also called in the while loop or in the fnTouchInterrupt the interrupt would respond to all changes in edge signal on DIO2 Typical applications for the touch probe are Relative positioning for de stacking equip ment or regist
14. IPOSplus This argument initializes a data object that contains data received cyclically or acycli cally The variable in the argument of the SCOM RECEIVE command contains the vari able number as of which the receive data is to be stored The process of reading in the data must be started with the SCOMON command The process of reading in data runs in the background once it has been started regardless of the current command processing in the IPOsPlus program After the first SCOMON command no other SCOM RECEIVE commands are accepted A change of the data object will only become active following an IPOSPUs 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 23 319 23 320 Object structure Assembler Commands Communication commands H 0 Object number The object number is used for addressing the data object The object num bers of the sender TRANSMIT and receiver RECEIVE must be the same for the data exchange H 1 Number of data bytes and data format Bit Value Function 0 3 0 8 Number of data bytes K 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 2 Number of the variable H from which
15. Only available on request Also refer to the addendum to the Special Design SK 0C for Caluculated Curves operating instructions 1 Applies if parameter P101 is set to RS485 Fieldbus or SBus Manual IPOSplus Assembler Commands Set commands 23 23 8 5 VARINT Syntax Description Key points Manual IPOSplus VARINT Hxx Mxx This command is not available in MOVIDRIVE A only as of MOVIDRIVE B The command activates a variable interrupt with the data structure as of variable Hxx If the condition for the interrupt is fulfilled and task 2 or 3 in which this interrupt is pro cessed is started the commands are performed as of the label Mxx The event for the interrupt is the comparison with a variable value see H 4 If the data structure has been initialized during run time the behavior of the interrupt can be dynamically adapted to a complete Varlnterrupt using an IPOSP4S command Note The data from the data structure is only transferred when the command VARINT Hxx Mxx is called data consistency Example If the value from the data structure Hx 3 CompareVar is changed for exam ple the value is only taken into account with the command VARINT Hxx Mxx 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 Description structure H 0 Co
16. The setpoint position always has the following unit regardless of the encoder pulse count per rev olution 4096 Inc motor revolution encoder resolution 2 512 The current setpoint position represents the absolute position that is currently valid for position control in the travel job in progress The changes of the setpoint position result from the calcu lated travel profile taking into account the positioning ramp the travel speed the ramp type etc Once the requested travel has been completed and the drive is in standstill H491 corresponds to H492 Value range 231 0 231 1 inc 492 TargetPos TARGET POS Current target position READ and SET The target position always has the following unit regardless of the encoder pulse count per revolution 4096 Inc motor revolution encoder resolution 2 512 This variable represents the current target position of the travel job currently in progress H492 displays the position in its absolute form Example 1 current drive position 50000 Inc 2 GOR NOWAIT 8000 Inc 3 current target position 42000 Inc Value range 231 0 231 1 inc If H492 is written directly not using a GO command H473 bit 19 In position remains set for up to 1 ms 493 PosWindow POS WINDOW Positioning window READ and SET H493 is identical to P922 The positioning window defines a distance range around the target position H492 of a travel or stop com mand G
17. cccccceeeeeeeeeeceeceeeeeeeeeeeteeeeeneenaeees 127 12 2 2 P911 912 Positioning ramp 17 127 12 2 3 P913 P914 Travel speed WICH 127 12 2 4 P915 Velocity precontrol oe eccceeeeeteeeeeeeettteeeeeeetteeeeeeenaaes 127 12 2 5 P916 Ramp type enge hna a eta eee a etna 128 12 2 6 P917 RAMP MOdE ENNEN wii eae eis 130 12 2 7 P918 Bus setpoint source 130 12 3 GR IPOS ue lte ln EE 131 12 3 1 P920 P921 SW limit switch CW COW 0 cceeeeteeeeteeeees 131 12 3 2 P922 Position window ren 131 12 3 3 P923 Lag error window erioa iir a OE TE i 131 12 3 4 P924 Positioning interruption detection eeeeeeeeeeeeeeeneeee 131 12 4 P93x IPOSPYS special functions es sse1sneoienoieoooienooiionerinosrnoerrrenen 132 124A P930 OVS E 132 12 4 2 P931 IPOS CTRL W Task 132 12 4 3 P932 IPOS CTRL W Task 132 124 4 P933 Jerk Urne ine Eed 132 L PI Speed taak Toseta arn EE 132 12 4 6 P939 Speed task 2 133 12 5 P94x IPOSPIUS EE 134 12 5 1 P940 IPOS variable et 134 12 5 2 P941 Actual position source 134 12 5 3 P942 P943 Encoder factor numerator denominatot 134 12 5 4 P944 Encoder scaling ext encoder ce eeeeeeeeeentteeeeeeeeee 135 12 5 5 P945 Synchronous encoder type 714 135 12 5 6 P945 Synchronous encoder counting direction X14 136 12 5 7 P947 Hiperface offset SI4A 136 12 5 8 P948 Automatic encoder replacement detechon 137 Manual IPOSplus Contents Manual IPOSplus 13 12 6 P95x
18. forms the bit by bit complement of H2 H3 the pre increment operator increases the value of H3 by one Manual IPOSplus 15 195 15 Compiler Operators Binary operators 15 3 Binary operators 15 3 1 Example These operators link two operands together and are located between two operands H1 H2 H1 H2 3 The binary assignment operator assigns variable H1 the value of H2 The binary minus operator forms the difference between H2 and 3 Combined assignment operators lead to an abbreviated notation Although they make it more difficult to read a program they are mentioned for the sake of completeness The operation is performed in the example with H1 2 0b10 and H2 3 0b11 Operator Operation Example Corresponds to Example H1 Simple assignment H1 H2 H1 H2 3 Assign product H1 H2 H1 H1 H2 6 l Assign quotient H1 H2 H1 H1 H2 0 Assign remainder H1 H2 H1 H1 H2 2 Assign sum H1 H2 H1 H1 H2 5 Assign difference H1 H2 H1 H1 H2 1 amp Assign bit by bit AND H1 amp H2 H1 H1 amp H2 0b10 Assign bit by bit XOR H1 H2 H1 H1 H2 0b01 i Assign bit by bit OR H1 H2 H1 H1 H2 0b11 lt lt Assign shift left H1 lt lt H2 H1 H1 lt lt H2 0b1000 gt gt Assign arithmetical shift right H1 gt gt H2 H1 H1 gt gt H2
19. 0000 5555 MOD ACTPOS 50 0000 238E MOD ACTROS 120 H455 MOD ACTPOS 0000 5555 l SS 0 180 360 0 180 DU 0000 8000 FFFF 0000 8000 216 360 hex 477230091 1 Actual position prior to positioning Modulo actual position 2 Definition of target position Modulo target position 3 Actual position after positioning Modulo actual position Manual IPOSplus Position Detection and Positioning Modulo function CCW Modulo mode CCW P960 CCW The drive moves from the current actual position H455 MOD ACTPOS counter clock wise to the target position H454 MOD TAGPOS Target position that can be represented H454 MOD TAGPOS k x 360 0 360 k x 216 0 216 1 Only negative values are permitted in the high part If this condition is not met and the sign bit 232 is not set the drive inverter displays the fault status IPOSPlUs program error INK GA Z MOD ACTPOS 300 2 MOD TAGPOS 410 ____0000 D554 FFFE 238E eg fg s t H511 ActPos_Mot 2 A 3 MOD TAGPOS 120 7 MOD ACTPOS 50 0000 5555 0000 238E L P 3 a 000 5555 180 0 180 360 0 DU 8000 0000 8000 FFFF 0000 216 360 hex Parameters and variables 477247627 Parameters and variables for the modulo function See sections IPOSP YS Parameters and System Variables Parameter no Name P 960 Index 8835 Modulo control P 961 Index 8
20. 23 Assembler Commands Arithmetic commands SHR SHIFT RIGHT ASHR ARITHME TIC SHIFT RIGHT 306 The SHR command moves the content of a variable to the right by the number of bits specified in a variable or constant Zeros are moved along from the left Command structure Mxxx SHR X1 gt gt X2 Mxxx Label optional X1 Variable result and output value X2 Variable or constant number of shift operations SHR HXX gt gt HYY In variable HXX the bits are shifted HYY places to the right SHR HXX gt gt K In variable HXX the bits are shifted K places to the right Example 1 SET H01 62SET H02 1SHR 0b0000000000111110 0b000 H01 gt gt H02 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 15 positions shift the significance of the inputs so that the terminal with the lowest value DI10 receives the significance 2 SET H01 960SET H02 6SHR H01 gt gt H02 0b0000001111000000 0b000 0000000001111 The ASHR command shifts the content of a variable to the right by the number of bits specified in a variable or constant Either zeros or ones are shifted along from the left depending on the sign of the original value This ensures that a negative sign is kept dur
21. 303 Assembler Commands Arithmetic commands 23 MOD MODULO The command supplies the integer remainder when a variable has been divided by a variable or a constant The sign of the result is the same as the sign of the first variable Command structure Mxxx Label optional Mxxx MOD X1 mod X2 X1 Variable dividend and remainder of division X2 Variable or constant divisor MOD HXX mod HYY Variable HXX is the integer remainder after division of variables HXX and HYY MOD HXX mod K Variable HXX is the integer remainder after division of variable HXX and a constant K Example 1 SET H01 17SET H02 SET H01 17SET H02 5MOD H01 mod H02 5MOD H01 mod H02 After the MOD command H01 2 Example 2 SET H01 17SET H02 SET H01 17SET H02 5MOD H01 mod H02 5MOD H01 mod H02 After the MOD command H01 2 23 3 3 Logical operations AND OR XOR AND The AND command performs a bit by bit AND operation between a variable and a sec ond variable or a hexadecimal constant Command structure Mxxx Label optional Mxxx AND X1 amp X2 X1 Variable result and output value X2 Variable or constant output value AND HXX amp HYY Variable HXX is the bit by bit AND operation of variables HXX and HYY AND HXX amp K Variable HXX is the bit by bit AND operation of variable HXX and a con stant K Example 1 SET H01 12SET H02 BAND 0b0000000000001100 0b000 H01 amp H02
22. 55252 k d include lt constb h gt include lt iob h gt pragma globals 350 399 Definition of structures GSPODATA3 busdata structure for fieldbus process data GSAINPUT analog structure for analog values Definition of variables define modeselect InputLevel gt gt 6 amp 0x00000003 define setfixedsetpoint _SetSys SS_N11 speed define activatefixedsetpoint _BitSet ControlWord 4 define deactivatefixedsetpoint BitClear ControlWord 4 define enable _BitClear ControlWord 1 define rapidstop _BitSet ControlWord 1 Declaration of variables long mode speed offset 262 Manual POSplus Compiler Examples State machine fieldbus control with emergency mode Manual IPOSplus IA Main program SE EE k d main Initialization ss s s ss s s s s s s Initialize data structure bus data busdata BusType 3 bus type fieldbus busdata Len 3 busdata PO1 0 busdata PO2 0 busdata PO3 0 Activate task 2 _SetTask2 T2_START buscontrol j Main program loop while 1 IA Task 2 BESe sees EE EE EE EE EE E e neen P d buscontrol _GetSys busdata GS_ PODATA 1 get bus data mode modeselect read terminals for mode select OptOutpIPOS OutputLevel gt gt 3 amp OxFFFFFFFC mode output mode switch mode case 0 mode_0 break case 1 mode_1 break case 2
23. ASSEMBLER MOVITOOLS B Jos File Edit Program Bun Help RAM FORT oP Numerator 1 Denominator fi Unit inc Identifier H192 H193 H194 H195 H196 H197 H198 H199 H200 H201 H202 H203 H200 gt ADD H200 1 WAIT 500 ms UNCONDITIONED M2 B ba a H he K wie Peer to peer 0 3 f Program loaded into the inverter 511514635 Assembler commands are entered using the insert tool To open the dialog box of the insert tool click the icon Ral Edit IPOS Instruction 21x Main Menu Fast Search Sub Menu Arithmete commands Bit commands Communication commands Positioning commands Program commands COPY Blockwise copying of variables GETSYS H System value SET H H SETFR Set fault reaction SETI H H SETI H H SETINT Sets start address of interrupt routine SETSYS System value H VARINT Special unit commands Comparison commands Label M fi Target variable H Eu Constant dec K fo Help 511519755 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 and insert the command in the program Manual
24. B Command structure Mxxx Label optional Mxxx TASK X1 Myyy X1 TASK2 STOP Stop task 2 TASK2 START Start task 2 TASK3 STOP Stop task 3 TASK3 START Start task 3 Myvy Label at which the task starts TASK TASK2 START M03 Task 2 is started at this command and the first command after the label M03 is pro cessed parallel to task 1 This command is used to define the start address of TASK2 and to start or stop these with the 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 Command structure Mxxx Label optional Mxxx TASK2 X1 Myyy x1 STOP Stop task 2 START Start task 2 Myyy Label at which task 2 starts TASK2 START M03 Task 2 is started at this command and the first command after the label MO3 is pro cessed parallel to task 1 TASK2 STOP MO Label M Condition type STOP z Jump destination M START Help Cancel i Kei 515247499 Manual IPOSplus Assembler Commands Program commands 23 WAIT The WAIT command waits for the length of time specified in ms in the argument and then continues program processing for this task once the time is up
25. Change the FOR loop as follows while 1 Calculate sum H2 H2 HI Wait 5 s _Wait 5000 In this example the third argument of the FOR loop is missing When you compile the system using the Ei icon the following message appears for H1 0 H1 lt 100 Error message during compilation Compile x Status ERROR File O MD AMBRUSMIPOS Sum Sum sum IPC Line 24 Class FOR Code SEMICOLON Run Compiler Elapsed Time 0 10 Seconds 483692427 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 button and then rectify the error The compilation process must be re peated again once you have rectified the error Rectify the error by correcting the FOR loop as follows while 1 Calculate sum H2 H2 HI Wait 5 s _Wait 5000 for H1 0 H1 lt 100 H1 Manual IPOSplus Compiler Editor First steps 13 Loading the pro gram into the unit Starting and stop ping the program Manual IPOSplus As the next step the program must be loaded into the inverter To do so press the R icon or choose Project Compile and download The program is compiled again and loaded into the inverter once it has
26. CompVar 3 As long as the value of the reference variable is not equal to the compar ison value SrcVar CompVar 4 As long as the value of the reference variable is greater than or equal to the comparison value SrcVar gt CompVar 5 As long as the value of the reference variable is less than or equal to the comparison value SrcVar lt CompVar 6 Value of the reference variable AND the comparison value is not 0 SrcVar amp CompVar 0 7 Value of the reference variable AND the comparison value is 0 SrcVar amp 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 As 3 however interrupt is only processed once each time the condition is fulfilled edge triggered 12 As 4 however interrupt is only processed once each time the condi tion is fulfilled edge triggered 13 As 5 however interrupt is only processed once each time the condi tion is fulfilled edge triggered H 5 Priority Priority of the interrupt 1 10 task 2 and task 3 are both assigned the priority 0 H 6 IntEvent Process image of the reference variable from SrcVar to the time of the interrupt See Task Management and Interrupts Variable Interrupts with MOVIDRIVE B Manual IPOSplus Assembler Comm
27. Drive Technology Drive Automation System Integration Services UMMA AA AA ATA EURODRIVE Manual IPOSP 4S Positioning and Sequence Control System Edition 11 2009 11645415 EN SEW EURODRIVE Driving the world Contents Manual IPOSplus Contents 1 General Information is sce svoe cicceecssnesetccceadeneecccecedecersnesecuctccetaeedeeversdeetecttccnseetere 14 1 1 Structure of the safety notes 14 1 2 Liability for defects 2 02 aA AE EEE E E 15 1 3 Exclusion of liability 1 02 ii aada e RENE 15 LA COP ee UE 15 2 Safety Notes enstanen dices ties eegen deeg ee dente 16 2 1 General information ceccccceceecceececeeeee cece eeeeecceneaeeeeeeeeeeeeeeteeteeeieaeees 16 2 2 Designated Seminare a a ar aee a aa A 17 2 3 PEOC Lt le WEE 17 24 Programming enor aeeie bacpegeadtebidy Mentiebinecietd deavte re dldeieciete Aeceas 17 3 System Descnption ee SEENEN ENEE EES EENS ENEE EEN 18 SN 11 00 00 0 DEE 18 3 1 1 Scope of this documentation ssesseeeeeeentne nre nereeeeeeererrrrn nnen 18 3 1 2 Creating Programs cccececceceeeeeeceeeeeeeeeneeeeeeeeeeeeeeeenaeeeeeeeeaas 19 32 WO SPP EE 19 33 Controlling IPOSPYS ee ee 22 3 3 1 Active control Signal source 22 3 4 Technology options application modules ssseseneeeeeeneene nerne nenneeeeee ene 22 3 4 1 Technology Options 0 cccceceeceeeeeeeeeeeeeeeeeneeeeeeeeaeeeeeesaeeee
28. Free running On Switches between else Free running and synchronous operation Free running Off if E Set zero point The function Set zero point DRS_zero point is called 110 Manual IPOSplus IPOSplus and Synchronized Motion Synchronous operation with a DRS option card 9 3 3 Activating and deactivating the offset function Via the system variable DRS CTRL H476 you can set reset the two programmable out puts of the DRS11 Offset wiring example DRS11B IN 5 DCOM V024 OUT 1 eme Aeno bon X40 DGND On X44 DC 24V gi O Sync OFF E o SL Ju e 90 2 alt XJI 2 o 6 on E po 2 st XJ os bo oi a 478833419 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 Manual IPOSplus 112 Requirement Command sequence in Assembler Command sequence in the Compiler IPOSplus and Synchronized Motion Synchronous operation with a DRS option card A position offset can be applied using IPOSPIUS via a cable connection from terminal X40 10 to X40 2 Offset Set the drive to the function Offset1 Slave drive changes its position in relation to the master to the value stored in offse
29. H1 H1 1 Manual IPOSplus Task Management and Interrupts Variable interrupts with MOVIDRIVE B 5 7 Variable interrupts with MOVIDRIVE B All interrupts in MOVIDRIVE B units are the same as those used in MOVIDRIVE A see section Task Management for MOVIDRIVE A and B plus 4 additional variable interrupts The interrupts for specific variable values can for example respond to e A quantity value e All timers 0 1 and 2 e The fact that an axis position of its own a or different axis has been reached e A change in an I O signal s A certain inverter status H473 e New data that is to be received or sent by the SBus 5 7 1 Calling up the variable interrupt Compiler _SetVarlnterrupt pData myfunction Activates a variable interrupt with the data structure as of the variable pData which runs the myfunction function when the interrupt event occurs Assembler VARINT Hxx Max 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 data structure see also the command _SetVarinterrupt or VARINT e The task to be interrupted task 2 or task 3 e Sequential number of the interrupt 0 3 e Reference variable and the value to be compared with each other e Type of the mathematical comparison lt edge
30. IPOSplus H2 HI 10 do Il CH H2 H2 1 H1 H1 1 while H1 gt 5 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 do H2 H2 3 while 1 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 H2 H2 43 if H2 gt 20 break while 1 In this example the do loop is broken off using the break statement if the value of the IPOSPS variable H2 is greater than 20 16 201 Compiler Constructions switch case default 16 A continue statement is also possible It causes the program to skip to the end of the statement block and then to check the expression H2 H2 4 3 if H2 gt 20 break if H2 gt 10 continue H0 while 1 In this example the incrementation of the IPOS 4S variable HO stops as soon as the value of the IPOS 4S variable H2 is greater than 10 16 5 switch case default 16 5 1 Syntax switch Expression case Wert 1 statement 1 break case Wert 2 statement 2 break default Statement n The switch statement makes it possible to create multiple program branches depending on the value of an expression If
31. Total of PID controller correcting variable and presetting is limited 560 Reserved Manual IPOSplus 39 40 5 5 1 5 2 Task Management and Interrupts Introduction Task Management and Interrupts Introduction IPOSPIUS can process several subprograms at the same time One subprogram corre sponds to one task The following functions can trigger interrupts for task 1 e Timer0O overflow e System error unit error e Touch probe DI02 MOVIDRIVE B can interrupt task 2 and task 3 with 4 additional interrupts which are triggered by the comparison with a variable value MOVIDRIVE A can execute 2 subprograms task1 and task 2 running independently of each other MOVIDRIVE B can execute 3 subprograms task1 task 2 and task 3 running inde pendently of one another You can run MOVIDRIVE B in the same way as MOVIDRIVE A The following variables are global All tasks and interrupts use the same variables HO H511 for MOVIDRIVE A HO 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 Task management for MOVIDRIVE A and B Task 1 is the main pro
32. 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 and the new values of the variables H509 new H509 old H509 difference H511 new H511 old H511 difference The values must not differ by more than 32 767 215 1 If the values are greater divide both differentials by the same number to obtain correspondingly smaller values Alternatively repeat the procedure with a shorter travel distance Enter the result H511 difference in P942 Encoder factor nominator and H509 in P943 Encoder factor denominator Manual IPOSplus P9xx IPOS Parameters P94x IPOSplus encoder 12 12 5 4 P944 Encoder scaling ext encoder Setting range x1 x2 x4 x8 x16 x32 x64 Before setting P944 make sure that P942 and P943 are set to 1 The significance of the travel resolution of the motor encoder and external encoder is adapted The parameter is set so the travel information ratio between the motor encoder and the external encoder is as close to 1 as possible First set the parameter to x1 To do this note the values in variables H510 and H511 e Move the drive by about 1000 increments H511 e Calculate the difference between the values you wrote down and the current values H510 new H
33. prp Le i X13 3 DIO2 TP TP event TP_Pos Remaining travel PTP Position after TP event X13 3 D102 proximity switch SEW Crate on conveyor belt 506321163 Description A machine cycle is started via input DI10 The target position is the current motor position H511 plus TP_Max_ Pos H11 If the touch probe input DIO2 is not attenuated the drive moves to this target position ated a new target position is the motor position If DIO2 is attenu calculated The new target position is calculated from during the touch probe event TpPosl1 Mot H507 plus the remaining distance ID Dos H12 Settings in SHELL P601 Binary input DI02 P610 Binary input DI10 P700 Operating mode include lt const h gt include lt io h gt define define define define define define define define define CALCTARGET BUSSY STOP_AKTIV State ID Max Pos IP Dos Speed Ramp h473_ipos_in position long 1Position IPOS input IPOS input amp IPOS d 2 H10 H11 H12 H13 H14 StatusWord amp 0x00080000 StatusWord amp BIT19 18 259 Compiler Examples Touch probe interrupt processing 18 SSPOSSPEED tPosSpeed SSPOSRAMP tPosRamp Touchprobe 1Position TpPosl_Mot TP Pos calculate new target position _TouchProbe TP_DIS1 Deactivate touch probe IA Main function IPOS initial function ze EE EE EE EE EE EE E e eneen
34. with the system variable H485 takes place after Timer 0 has elapsed This reload value determined the time with which the interrupt routine is executed cyclically TOUCH PROBE Triggers an interrupt when there is a change of signal level on the touch probe termi nal DI02 if the touch probe was activated for terminal DIO2 parameter P601 IPOS INPUT and the TOUCHP command was transmitted Myyy Start label of the interrupt routine Example 1 Interrupt branch in the event of a unit fault In the sample program binary input DO01 is toggled after a 2 sec pause The program branches to the interrupt routine immediately if a unit fault occurs The system returns RET to the main program as soon as there is a high signal at terminal DI02 To reset the fault the parameter for input DIO2 should be set to Reset MQX unit errors can set the interrupt to ERROR Unit errors from the connected MOVIMOT cannot trigger the interrupt IPOSplus ASSEMBLER MO ITOOLS File Edit Program Run Help lol x Numerator 4096 Denominator 1 Unit June Main program SETINT ERROR M100 Mi WAIT 2000 ms BMOVN H481 1 NOT H461 1 JMP UNCONDITIONED Mi M100 JMP RET wee RHA oe 23 LO I10000000000000100 MO r Orre i Manual IPOSplus Program text modif 515392779 23 343 23 344 Assembler Commands Set commands Example 2 2
35. 113 9 4 Synchronous operation with technology option Internal synchronous Operation EE 115 9 4 1 R q ir MmentS s raadden s2eteh a aa aa aar eoan 115 9 5 Synchronous operation with technology option Cam s es 116 9 5 1 Requirements aiar n ec EE 117 IPOSP S for MOVITRAC B Charactertettes EE 118 10 1 Reouirements nadene aedini niha a ada ia ia eaaet 118 Z Funcional enna a hii E E E E 119 IPOSPUS for MQx Characteristics ccsscssssssssssssssssssssessseesssseesseeseeseees 120 TMH Introduction eebe areca ee eevee ae 120 Contents 12 11 2 Starting the programming Tool 121 11 3 Sequence control system 121 11 4 Digital inputs and outpouts cece eeeececce cece eee eeeeeeceeeaeceeeeeeeeeeeteeeeennaees 121 11 5 Values of the DIAG11 variable for the error IPOS ILLOP asssnnnnnnenaaaaa 122 B ss IPOS Parameters icc r a a eaaa aaar e e aaae aa ha iia adatt 123 12 1 P90x IPOS reference travel cccccccceeceeeseeeeeeceeeeeeeeeeeeeeeteetesseesaaeeees 123 12 1 1 P900 Reference offset ceeeeeeeeeeecceeceeeeeeeeeeeteeeeentnnaeees 123 12 1 2 P901 Reference speed 124 12 1 3 P902 Reference speed 2 124 12 1 4 P903 Reference travel type eee eeeeeeteeeeeeeenteeeeeeeneeeeeeeeaas 124 12 1 5 P904 Reference travel to zero Dulse 126 12 1 6 P905 Hiperface offset SIb 126 12 1 7 P906 Cam distance s iga cece cee e a E aea 126 12 2 P914x IPOSPYS EE 127 12 2 1 P910 Gain X Controller
36. A Assign bit by bit XOR Assign bit by bit OR lt lt Assign shift left gt gt Assign shift right 15 Comma Evaluate 194 Manual IPOSplus Compiler Operators Unary operators Category 1 has the highest priority category 2 unary operators has the second highest priority etc The comma operator has the lowest priority Operators in the same category have the same ranking The unary operators category 2 conditional operators category 13 and assignment operators category 14 assign from right to left all others assign from left to right The operator for multiplication is ranked before the operator for addition so mul tiplication is performed before addition in the following statement HI 3 7 2 4 H1 is assigned the value 29 Brackets have to be used if the addition is to be performed before the multiplication Hl 3 07 4 2 ay H1 is assigned the value 108 from 3 9 4 INFORMATION The sequence can be forced by brackets to ensure the sequence of operations is as you require it Nested brackets are permitted Superfluous brackets have no effect on the program function 15 2 Unary operators Unary operators are operators positioned before or after an operand and only influence this operand H1 H2 The unary minus operator forms the value of H2 with a changed sign H1 H2 The unary complement operator
37. A waiting period of 5 seconds elapses when a position is reached 0 100 revolutions 515070219 lt 3IPOSplue ASSEMBLER MOVITODLS File Edit Program Run Help S m RAR FON ilS Numerator 4096 Denominator 1 Unit turns aAkhoON Olne ADDR 2 06 E Program text modified 515071755 Reference travel Travel to zero Wait 5 s Travel to 100 Wait 5 s OTIR ONS Manual IPOSplus Assembler Commands Positioning commands 23 Example 2 Manual IPOSplus Once the END command has been performed the IPOSP S program automatically starts processing from the first line The program shown below causes movement to take place between the positions 0 and 409600 increments A waiting period of 1 second elapses when a position is reached The speed is increased from 100 rpm to 3 000 rpm when the drive moves beyond posi tion 40960 The entire return travel takes place at 3 000 rpm 0 40960 409600 Increments 515073291 BIPOSplue ASSEMBLE MOVITODLS File Edit Program Run Help SM RASA Fo Numerator 1 Denominator 1 Speed Initialization Slow v 100 rpm Fast v 3000 rpm 1 SET H300 1000 2 SET H301 1000 3 SET H302 30000 4 SET H303 30000 Main Program 5 Goo Es Bp P 6 GOA WAIT 0 inc 7 WAIT 1000 ms 8 SETSYS POS SPEED C C W H300 9 GOA WAIT 409600 inc 10 JMP H511 lt 4096 MO 11 SETSYS POS SPEED C C W
38. AS PSTOP while 1GlobalStateMachine JOGGING Instructions for leaving the main state Jogging Stopping the drive _AxisStop AS_PSTOP Clear mode _BitClear 1PE StatusWord 11 _BitClear 1PE_StatusWord 12 end fnJdogging Manual IPOSplus Compiler Examples Compiler programming frame Function fnHoming Axis reference travel Parameters of the group 97x are effective A positive edge on REF START starts a new reference travel fnHoming Instructions for entering the main state Homing Define substate 1SubStateHoming HOMING STOPPED Acknowledge mode _BitClear 1PE_ StatusWord 11 _BitSet 1PE_ StatusWord 12 cyclical processing as long as the main state is set to Homing y P g g g do Import PO data _GetSys tPA BusType GS_PODATA switch lSubStateHoming case HOMING STOPPED if MY_START_HOMING _Go0 GO0_U_NW_CAM 1SubStateHoming break case HOMING STARTED if MY_ START _HOMING _Go0 GOO_RESET 1SubStateHoming if MY_REFERENCED 1SubStateHoming break case HOMING READY if MY_START_HOMING 1SubStateHoming break while 1GlobalStateMachine HOMING i HOMING STARTED HOMING STOPPED HOMING READY HOMING STOPPED Instructions for leaving the main state Homing Stopping the drive if 1SubStateHoming HOMING STARTED _Go0 GO0_RESET
39. Cam1l 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 Do02 H481 2 Cam2 BitPosition 2 Cam2 BitValue 0 Output 1 if value in window Cam2 NumOfCam 1 Number of windows Cam2 PosL1 4096 1st window left limit value Cam2 PosR1 8192 1st window right limit value I EE ase Ss fe i Be ee St while 1 _GetSys Caml G CAN Form output of first cam _GetSys Cam2 G CAM Form output of second cam Manual IPOSplus Position Detection and Positioning Cam controllers Example solved in the Assembler The SET command is not necessary and serves demonstrative purposes only SET H13 H511 a GETSYS HO CAR Source Va GETSYS H14 CAN Hi DbPreCont 0 END H2 Dest Var 481 H3 Bit Posit 1 H4 Bit Polar 0 HS 3 He 0 H 4096 HS 20366 H9 20594 H10 36864 H11 40960 H12 0 H13 4016 H14 Source Va 511 H15 DbPreCont 0 H16 Dest Var 481 Hi Bit Posit 2 H18 Bit Polar 0 H19 1 H20 4096 H21 8192 477809419 6 8 2 Expanded cam controller Characteristics of the expanded cam controller Manual IPOSplus Is available as of MDx_
40. Declare SSPOSSPEED rapid speed slow speed Initiate rapid_speed cw 14000 vapid speed cw 1400 rpm rapid_speed ccw 12500 vapid speed ccw 1250 rpm slow_speed cw 3000 slow speed cw 300 rpm slow_speed ccw 4500 slow speed ccw 450 rpm set rapid speed _SetSys SS POSSPEED rapid speed set slow speed _SetSys SS _POSSPEED slow speed 182 Manual IPOSplus Compiler Programming SEW standard structures 14 Manual IPOSplus The insert tool can be used for support when declaring and initializing standard struc tures The cursor must be positioned in the Editor window at the place where the decla ration for the structure variables is to be inserted Call up the insert tool by clicking the right mouse button A context menu opens Choose the menu item Insert Instruction You can also call up the insert tool by pressing the a icon in the toolbar or by choosing Edit Insert Instruction 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 the cur sor in the Editor window at the place where the initialization sequence should be a
41. Direct speed control with external encoder and motor encoder SR W a EXT Michel act 474540555 e An incremental encoder resolver Hiperface encoder X15 is always required on the motor for speed feedback Slip or mechanical play gear unit backlash between the motor encoder and the external encoder is compensated automatically In IPOSP US positioning commands for example GOA are performed with reference to P941 actual source Sion here external encoder X14 s The dynamic response that can be achieved depends on the properties and the mechanical installation of the external encoder as well as the position resolution see section IPOSP 4S with Options External encoder Vmax maximum speed max Maximum acceleration PG Profile generator PC Position controller Nact Actual speed nc Speed controller EXT external encoder Manual IPOSplus Position Detection and Positioning Encoder combinations Direct position control with absolute encoder and motor encoder 474542091 Direct position control in IPOS 4S by means of the SSI absolute encoder connected via DIP 11 s An incremental encoder resolver Hiperface X15 is always required on the motor for speed feedback Slip or mechanical play gear unit backlash between the incremental encoder resolver Hiperface of the motor and the absolute encoder is compe
42. FAULT RAPID STOP The drive is stopped at the rapid stop ramp FAULT After reset Response SWITCH OFF FAULT SWITCH OFF The output stage is inhibited no torque the brake is activated WARNING IPOSP4S program continues reference position outputs parameters SETSYS com mand and variables set by IPOSP 4S are retained E STOP WARNING The drive is stopped at the emergency stop ramp IPOSP4S program keeps running gt SWITCH OFF WARNING RAPID STOP WARNING The drive is stopped at the rapid stop ramp IPOSP4S program keeps running gt SWITCH OFF WARNING even after fault confirmation Manual IPOSplus Assembler Commands Set commands SETI SET INDI Variable X1 gets the value of variable whose number is contained in variable X2 RECT H H 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 OVEREFL 32 is gen erated Structure Command structure Mxxx Label optional Mxxx SETI X1 X2 X1 Hxxx Target variable X2 Hyyy Number of the source variable Example SET SET SET Hl 7 H7 11 H3 H1 After the program has been run the variables have the following values H1 7 H7 11 H3 11 SETI SET INDI The variable with the number in variable X1 gets the value from variable X2
43. H302 JMP NOT IN POSITION Mi 1000 ms onne eae om E File OAMD AMBRUS ipos speer 515074827 Slow CW travel 100 rpm Slow CCW travel 100 rpm Fast CW travel 3000 rpm Fast CCW travel 3000 rpm Reference travel Travel to zero Wait 1 s Set slow speed Travel to end position As long as Actpos Mot H511 is less than 40960 stay in current line Set fast speed Stay in current line until the drive stops Wait 1s CO EO OVO Na A A A Co GA h 327 23 328 Assembler Commands Positioning commands Endless positioning The absolute travel range of IPOSPUS js limited to values in the range 231 20 NN 1 With the relative travel command a maximum travel distance of 231 can be added to any actual position see number circle An example of infinite 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 fail as of a critical value 231 2 drive turns in the opposite direction D 21 A Fr a 515076363 Manual IPOSplus Assembler Commands Program commands 23 7 Program commands 23 7 1 Program c
44. 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 Structure Command structure Mxxx Label optional Mxxx WAIT X1 x1 Waiting time in ms 0 32767 Example SET HO 20000 Manual IPOSplus SET H489 HO MOL JMP H489 0 MOL 335 23 Assembler Commands Set commands 23 8 Set commands 23 8 1 Copy variables COPY COPY Structure Example The COPY command copies the number of successive variables specified in the 3rd ar gument The second argument of the COPY command indicates the number of the first source variable the first argument indicates the number of the first target variable Up to 10 variables can be copied using one COPY command Command structure Mxxx Label optional Mxxx COPY X1 X2 X3 x1 Hxxx Number of the first target variable X2 Hyyy Number of the first source variable X3 K Constant number of variables to be copied 1 10 Myyy Semp label to which the program jumps if the condition is ful illed The command COPY H2 H20 3 corresponds to the command sequence SET H2 H20 SET H3 H21 SET H4 H22 23 8 2 Read system values GETSYS GETSYS GET The GETSYS command loads the value of an internal system value of argument X2 to SYSTEM VALUE one or more variables of argumen
45. Initialize Interruupt Identifier Mi SET H420 2 H417 D SET H421 0 H418 o SET H422 455 H419 SET H423 H910 SET H424 12 SET H425 6 SET H427 3 SET H428 1 SET H429 487 SET H430 200 SET H431 0 SET H432 7 VarInt runs in Task 3 gt start Task 3 TASK TASK3 START M3 N oO CO VARINT H420 M4 o gt MS NOP 7 Cyclic main loop o JMP UNCONDITIONED MS o Enable valve o HA SET H487 0 fal SET H431 2 o VARINT H427 M2 o BSET H481 1 1 o RET o Disable valve o M2 BCLR H481 1 0 o SET H431 0 o VARINT H427 M2 o RET o Task 3 jsut needed for VarInt o M3 NOP o RET fa D Y END Punkt zu Punkt 1 1 1 Programm in den Umrichter geladen 474256139 Manual IPOSplus Position Detection and Positioning Encoder evaluation 6 Position Detection and Positioning 6 1 Encoder evaluation MOVIDRIVE offers various options for positioning e external encoders e Motor encoder incremental encoder resolver Hiperface encoder absolute encoder e SSI absolute encoder The values are provided in system variables for processing The connections for the motor encoder X15 and external encoder X14 are in the con trol electronics MxV MxS und MCH The control electronics MxF does not have these connections The connection for the SSI absolute encoder is on the DIP11 option card X62 All connecte
46. SCOM RECEIVE HO HO 1100 SCOMON HO 1100 SCOM RECEIVE HO SCOMON HO 1102 SCOM 514545547 Unit 1 sends the object with the no 1100 cyclically or acyclically Manual IPOSplus Assembler Commands Communication commands Unit 2 receives the data Unit 3 ignores data but is waiting for data with object number 1102 Sender and receiver settings Sender Receiver IPOSPS program with command IPOSPIUS program with command SCOM TRANSMIT CYCLIC H SCOM RECEIVE H SCOMON SCOMON and or SCOM TRANSMIT ACYCLIC H Setting of communication parameters via variables Setting of communication parameters via variables Timeout monitoring P817 SBus baud rate P816 P884 P894 identical for sender and receiver First and last physical stations Set the bus terminating resistor via S12 INFORMATION Observe the following rules when selecting the object number 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 once for sending or once for receiving See also _SbusCommDef page 227 TRANSMIT CYCLIC Manual IPOSplus This argument initializes a data object whose user data is sent cyclically according to the SCOMON command Variable H of the SCOM TRANSMIT CYCLIC H command de fines the start of the communication and user data Cyclic
47. Sequence To do so the program must have been compiled at least once Manual IPOSplus Compiler Editor Comments 13 13 19 Comments Good use of comments makes it easier to read a program and also makes it possible for someone 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 IPOSplus COMPILER MOVITOOLS B sum IPC Bis Zj File Edit Search Project Run Display Options Window Help laj x D eR ROM Rae er Ba Fy Sum Source modul s sum IPC En Documentis Initialization of variab Wait 5 ti 5000 BL Peer to peer 486824075 Manual IPOSplus 173 13 174 Compiler Editor Overview of the icons 13 20 Overview of the icons Symbol Menu item Description D File new Creates new source file oS File open Opens source file File save Saves source file CH File compile Compiles source file aq File compile download Compiles source file and downloads it to inverter ES File compare with inverter Compares source file with the program in the inverter CH Project com
48. begin LOOPE Program loop end NOP No operation REM Remark E HI 10000000000000100 MO Labet MI M Don M ono S T Dm F on Condition type Hi sl G nm Fons M Dm M Dns Bit mask binary Hel ag oa M Dm M ong ae Jump destination M fo F Dos M Dns Cancel M Dne TC biz x 515191051 JMP comparison The JPM command causes the program to jump to a specified label when comparison in the command results in a true statement 330 Manual IPOSplus Assembler Commands Program commands Structure JMP System Structure Manual IPOSplus Command structure Mxxx JMP X1 OP X2 Myyy Mxxx Label optional X1 Variable OP Operator gt gt lt lt X2 H variable K constant 0 zero in a comparison with zero only the operators and are possible Myvy Jump label to which the program jumps if the condition is ful filled Edit IPOS Instruction Main Menu Arithmete commands Bit commands Communication commands Fast Search 2x Sub Menu Calls a subroutine Jump input terminals Positioning commands Jump e D Program commands Set commands JMP Jump H lt gt K Special unit commands JMP System conditioned jump Comparison commands LOOPB Program loop begin LOOPE Program loop end NOP No operation REM Remark Label M j Target variable H cf Condition type p zl Help Variable H Jump destination M Can
49. eae afta ee Se Se an ve eae activate task 2 Initialization part _SetTask2 T2_START Monitor testing RG was we ae te et te det Endless loop for task 1 n Task 2 endless loop is not required Functions subprograms created by the Reference travel user called up from task 1 and task2 Automatic_mode Manual_mode Manual IPOSplus 175 14 176 Compiler Programming Preprocessor 14 1 Preprocessor The IPOSPlus Compiler is a multi pass Compiler that processes the source text in sev eral run throughs During the first run through the preprocessor processes the state ments referred to below as directives which are intended for it tests the statements for conditional compiling deletes comments and finally creates a temporary file for the Compiler The preprocessor increases flexibility and productivity during programming in the following areas e Integration of text from other files header files which contain prepared and or user defined constants or source text functions e Definition of symbolic identifiers to improve the legibility of the source text e Definition of directives for conditional compiling to improve portability and simplify test phases Each line starting with a is treated as a preprocessor directive unless the is part of a comment Any blanks before or after the character are ignored Preprocessor
50. however contain any functions The program window now looks as follows IPOSplus COMPILER MOVITOOLS B sum IPC oj sl 7 File Edit Search Project Run Display Options Window Help l x D eRe Rae Raa Foes BK oo En Sum Source modul s En Document s 2 so Io a a a a i DR g BCE reenen wen m 7 482850699 If you make changes to the source text save the project using File Save All Close the program by choosing File Exit 13 2 3 Step 3 The first IPOSP 4S program This section is to assist you in creating your first IPOSPlus program Editing the Start the Compiler again This time the project and the summe ipc file are loaded au IPosPlus program 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 the numbers from 1 to 100 Rather than using the formula n 1 x n 2 for this you should program a loop that adds up the total by iteration 148 Manual POSplus Compiler Editor First steps 13 Manual IPOSplus The program should therefore have the following structure IPOSplus COMPILER MOVITOOLS B sum IPC Zj File Edit Search Project Run Display Options Window Help IS la x E Sum Source modul s Aeum IPC En Documentis De A Rinnen
51. ing shift operations For positive numbers the command supplies the predecimal number of the division X1 X2 For negative numbers the command supplies the predecimal number of the division X1 X2 1 Command structure Mxxx ASHR X1 gt gt X2 Mxxx Label optional X1 Variable result and output value X2 Variable or constant number of shift operations ASHR HXX gt gt HYY In variable HXX the bits are shifted HYY places to the right ASHR HXX gt gt K In variable HXX the bits are shifted K places to the right Example 1 SET H01 7ASHR H01 gt gt 2 0b0000000000000111 0b000 0000000000001 After the SHR command H01 1 Example 2 SET H01 7ASHR H01 gt gt 2 0b1111111111111001 0b111 1111111111110 After the ASHR command H01 2 Manual IPOSplus Assembler Commands Bit commands 23 4 Bit commands 23 4 1 Bit commands BSET BCLR BMOV BMOVN BSET BIT SET BCLR BIT CLEAR BMOV BIT MOVE Manual IPOSplus The BSET command sets a bit within a variable to 1 The bit places in the variable have the numbers 0 31 The least significant bit has the number 0 For example if a bit is set in the system variable H481 STD OUT IP a binary output can be set directly You must set the output to IPOS OUTPUT in parameters P62x in SHELL beforehand Command structure Mxxx BSET HX1 X2 1 Mxxx Label optional X1 Target variable X2
52. page 307 BMOVN H Bit NOT H Bit Copy bit and negate BMOVN BIT MOVE NEGATE page 308 BSET H Bit 1 Set bit BSET BIT SET page 307 23 2 3 Communication commands Commands for data exchange from to other units via interfaces Command Function Availability Reference MDX B MC07B MQx MOVLNK Acyclic process and or parameter X X X MOVLNK data exchange via RS 485 or sys page 309 tem bus MOVCOM Cyclical process data transfer via X MOVCOM RS 485 with MQx for MOVIMOT page 314 MOVON Start of cyclical process data X MOVON transfer via RS 485 page 315 SCOM Cyclical or acyclical process data X X SCOM exchange via system bus page 316 SCOMON Start of cyclical process data x X SCOMON exchange via system bus page 321 SCOMST Start of cyclical transfer for X X SCOMST MOVIDRIVE B page 322 1 Observe the unit specific command structure 298 Manual IPOSplus Assembler Commands Overview of commands 23 2 4 Positioning commands Commands for drive positioning e Reference travel e Absolute relative touch probe positioning Manual IPOSplus Command Description See GOO Performs reference travel GOO GO POSITION 0 page 323 GOA Absolute positioning variable GOA GO ABSOLUTE Absolute positioning constant page 325 Absolute positioning
53. scaling and offset H554 and P281 are iden PID ACTMAX tical 32000 32000 lt Xe max lt 32000 32000 default 10000 10 0 555 PID_LimitMin PID controller Minimum output value H555 and P282 are identical PID LMTMIN 32000 32000 lt Xcontroller min lt 32000 32000 default 1000 1 0 556 PID Limit_Max PID controller Maximum output value H556 und P283 are identical PID LMTMAX 32000 32000 lt Xcontroller max lt 32000 32000 default 10000 1 0 Manual IPOSplus IPOS Variables Overview of the system variables No Name Description Compiler Assembler 557 PID_SetpMin PID controller Minimum output value for correcting variable H557 and P284 are identical PID SETMIN 32000 32000 lt Xa min lt 32000 32000 Default 0 558 PID_SetpMax PID controller Maximum output value for correcting variable H558 and P285 are identical PID SETMAX 32000 32000 lt Xa max lt 32000 32000 Default 7500 7 5 559 PID_Status PID controller status word PID STATUS 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 l component of the controller is deactivated Bit 4 Value of the controller l component is limited Bit 5 Value of the controller D component is limited Bit 6 PID controller correcting variable is limited Bit 7
54. the commands from label Mxx are performed 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 tain a loop that fulfills this condition Depending on the fault response set in parameter group 83x or using the command _FaultReaction or SETFR the program acts as follows e No interrupt is triggered for a specific fault if the fault response of this fault is set to NO RESPONSE e If the fault response of a fault xy is set to and warning task 1 is continued from the same place once the fault has been reset e If the fault response of a fault xy is set to and fault IPOS is restarted once the fault has been reset and the variables are reinitialized with the values from the EEPROM Note In this case you can store important variable values protected against power failure with the MEM or MOVILINK command before resetting the error In doing so note that the number of permissible write accesses must not be exceeded see MEM or _Memorize Manual IPOSplus Task Management and Interrupts Interrupts for MOVIDRIVE A and B Sample 5 6 3 Touch probe Sample Manual
55. tums Identifier HO H1 H2 H3 H481 1000 ms H481 0 1000 ms ADDR 2 1 2 IG Program text modified A 515186699 23 329 Assembler Commands Program commands 23 23 7 3 Jump commands JMP JMP terminals The program jumps to the specified label if the input terminals marked in the mask are all set to level 1 or level O AND relation The bits 0 5 indicate the terminals of the basic unit bits 6 13 the terminals of the option card DIO11A The mask is created by entering the terminal levels directly in the input window Structure Command structure Mxxx Label optional Mxxx JMP X1 X2 Myyy x1 Hi Jump if the input terminals marked in the mask are set to level 1 LO Jump if the input terminals marked in the mask are set to level 0 X2 Ixxx Mask for the input terminals Myyy Jump label to which the program branches Example JMP HI I 0000000000000011 M03 After the JMP command has been performed processing continues from the MO3 label if the input terminals DIOO and DI01 are set to level 1 E 2x Main Menu Fast Search Sub Menu Arithmetc commands CALL Calls a subroutine Be commen 4 Jump input terminals om munication commands Positioning commands SE Semer Ze D Program commands JMP Jump H lt gt H Set commands JMP Jump H lt gt K Special unit commands JMP System conditioned jump Comparison commands LOOPB Program loop
56. 0 477818635 P620 IPOSPI S output P960 e g SHORT P961 5 P962 1 P963 4096 93 94 Position Detection and Positioning Cam controllers Example solved in the Compiler include lt const h gt include lt io h gt Variable structure for the cam controller defined externally in h include lt camdef h gt CamStructure CamData0 ControlStructure MyCamControl Main function IPOS initial function ee ee So oe es os Soe ee eee main on Oe aN See a fe ee eS Se Se ee Initialization nt ees ee pe ann Cae ee aa D a ete ee ne a MyCamControl CamControl 0x80000002 exp function active MyCamControl CamOutShiftLeft 1 MyCamControl CamForceOn Mandatory activation of mask MyCamControl CamForceOff 0 Mask Mandatory deactivation of outputs MyCamControl CamSource numof ModActPos 1 lt lt 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 LeftLimitl 64626 355 at load 360 x 64626 65536 CamData0 RightLimitl 65536 360 at load CamData0 LeftLimit2 0 0 at load CamData0 RightLimit2 910 5 at lo
57. 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 D110 D113 Reset the output Tab position valid if the table pointer has been changed Store current table pointer in comparison variable Write selected table pointer to output terminals D010 DO13 without altering other outputs of the output variable H480 If DI17 1 then travel to position value of selected travel variable otherwise stop drive Reset Table position selection valid signal Unlock travel Move to table position until position is reached or DI17 0 Set Table position selection valid signal Stop drive Manual IPOSplus 24 377 378 Index Index A Absolute encoder ccc cece ces ecseseseteseeseseeeeeseeeseeeees 53 absolute encoder GI 138 Absolute encoder actual position 0c08 35 ActPos_Abs ACTPOS AB 35 ActPos_Extt ACTPOS EST 35 ActPos_ Mot ACTPOS MOT 35 Actual position source 134 Actual position absolute encoder 35 Actual position external encoder 35 Actual position motor encoder 35 AnaOutpIPOS ANA OUT IP 31 AnaOutpIPOS2 ANA OUT IP2 cccccceceeeees 30 Automatic encoder replacement detection 137 B Background color 154 Binary inputs basic unt 32 36 Binary Outputs 2 0 0 e
58. 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 to 1 as possible First set the parameter to x1 To do this note the values in variables H509 and H511 e Move the drive by about 1000 increments H511 e Calculate the difference between the values you wrote down and the current values H509 new H509 old H509 difference H511 new H511 old H511 difference e Calculate the quotient from H511 difference divided by H509 difference Set parameter P955 Encoder scaling to the value that is closest to the calculated quotient Important Encoder scaling directly affects parameters P900 Reference offset page 123 P942 Encoder factor numerator page 134 P943 Encoder factor denomi nator page 134 P954 Zero offset page 139 as well as the parameter group P92x IPOS monitoring page 131 All positions 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 12 6 7 P956 CAN encoder baud rate Setting range 125 kbaud 250 kbaud 500 kbaud 1 Mbaud Manual IPOSplus 139 P9xx IPOS Parameters P
59. 14 In other words H2 is set to the value 10 if the value of H1 is not between 2 and 14 for Expressionl Expression2 Expression3 Statement The for statement can be used to construct program loops that should be exited after a specified number of repetitions The meanings of the three expressions are as follows Expression is executed once at the start of the for loop This is where the run variables are initialized Expression2 determines when the loop is broken off The loop is broken off if the expression returns the logical value FALSE or equal to zero Expression3 is processed after the statement has been executed As a rule it is used for altering the run variables The statement forms the body of the loop which may consist of one state ment or a statement block H1 20 for HO 0 HO lt 10 HO HI HI 2 HO is set to zero at the start Then a check is performed to see whether HO 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 HO is then increased by one Next the check whether HO has reached the value 10 is repeated etc At the end of the loop the value of HO is 10 and that of H1 is 40 because the loop is performed 10 times loop counter HO runs from 0 to 9 and then is canceled HL 20 H2 0 for HO 0 HO lt 10 HO0 HI Hl 2 H2 Whereas variable H1 is i
60. 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 firmware You initialize a cam controller in the drive and evaluate the status of the cams with the GETSYS command The GETSYS command accesses a data structure The bit with the highest value of the first variable in this data structure decides which cam controller the GETSYS command refers to Bit 31 0 Standard cam control with bit 31 1 Expanded cam control If both cam controllers are available in the unit on site SEW recommends to initially use the expanded cam control It is also possible to use both cam controllers at the same time The outputs of both cam controllers can be issued on the same binary output word by issuing the outputs of the standard cam controller in the lower 2 bits and the outputs of the expanded cam controller in the higher 4 bits shifted two places to the left INFORMATION If the output bit of a cam is copied to a binary terminal output the output is set 1 ms later as with all bits that are copied to outputs in IPOSPIUS Manual IPOSplus Position Detection and Positioning Cam controllers 6 8 1 Standard cam controller Characteristics of the standard cam controller Manual IPOSplus It is available with encoder for all operating modes Per declaration and request of a data structure on
61. 14 8 SEW standard Structures h peneca ennari a sE 182 14 9 User defined Structures c ccccccceceeeeeeeeeeeeseeeceeaeeeeeeeeeeeeeeteetenenenaeeas 184 TUON WEE 186 E rantang fs essed tee indeed alae aetna ete ee ct 186 Ree TEE 187 14 13 Explanation of const h and io h constb h and ohh 188 M Du EE 190 ak een EE 190 14 16 IPOSPIUS variables in the compiler csccsesescesescsessescseseesesesesetetseeeseeey 191 14 1621 E 191 14 17 Declaration of global variables 00 ecccccceeeeeeeeeeeeeeeeeeeneeeeeeetaeeeeeeeaas 191 14 18 Indirect addressing pointer eee eee ceseeeeeeeeeteeeeeeeeaeeeeeeenaeeeeeeeaas 192 E ak Blue EE 193 Compiler Operators eege chet knee ENEE EE SEENEN EEGEN 194 15 1 Order of priority Of Operators ccecceececeeeeeeeeeeeeeeeeneecaeeeeeeeeeeeeeeeeeneees 194 T5 2 Uniary Operators sv geess deeg eet ee Ee 195 15 3 Binary Operators idna eiri iaieiiea Ae a AEAN Ti EAA iaa 196 153 1 EXAM PICs scene selene EE 196 15 4 Ternary Operators 22 cccesscceeeeeseecceneseseccdesentensdeneasenecceeeessetedeneepencces 196 154 1 Exame 00 eaaa eiae es Nees ee diese Eed 196 Compiler Constructions geess Eege aaaea aa aaa deda anae naa daaa aaaea CH 197 le LEE 197 161 1 37 01 C Do ne ee 197 1 2 EE 198 d SIMA EE ee ed staat 198 AGS Te TEE 199 16 3 ECKE 199 184 dan While diesa Be eR NE 200 LE HE 200 16 5 switch Case derault nnn 202 LS MEET 202 16 0 Tetun caste ct ce nei a a
62. 1SubStateHoming HOMING STOPPED Clear mode _BitClear 1PE_StatusWord 11 _BitClear 1PE StatusWord 12 End fnHoming Manual IPOSplus 18 271 18 272 Compiler Examples Compiler programming frame Function fnPositioning Positioning fnPositioning Instructions for entering the main state Positioning Define substate 1SubStatePositioning POSITIONING STOPPED Acknowledge mode _BitSet 1PE_StatusWord 11 _BitSet 1PE_StatusWord 12 cyclical processing as long as the main state is set to Positioning do Import PO data _GetSys tPA BusType OG PODATA switch lSubStatePositioning case POSITIONING STOPPED if MY_START_POSITIONING tPosVelocities CW tPosVelocities CCW tPA PO2 _SetSys SS POSSPEED tPosVelocities ji TargetPos 1ScalingNumerator tPA PO3 1ScalingDenominator 1SubStatePositioning POSITIONING STARTED break case POSITIONING STARTED TE MY_START_POSITIONING tPosVelocities CW tPosVelocities CCW tPA PO2 _SetSys SS_POSSPEED tPosVelocities TargetPos lScalingNumerator tPA PO3 1ScalingDenominator else _AxisStop AS _ PSTOP 1SubStatePositioning POSITIONING STOPPED break while 1GlobalStateMachine POSITIONING Instructions for leaving the main state Positioning Stopping the drive if 1SubStatePositioning POSITIONING STARTED _AxisStop AS_PSTOP Clear mode
63. 380 Index P9xx IPOS parameters ceeeeeeeeeeeeeeteeeeeees 123 P90x IPOS reference Travel 123 P900 Reference offset cceeeeeeeeeeeeeteteteees 123 P901 Reference speed 124 P902 Reference speed 72 124 P903 Reference travel type n se 124 P904 Reference travel to zero pulse 126 P905 Hiperface offset XI 126 P906 Cam distance ccccccceceeeeeeeseeeeeeetteeeees 126 P91x IPOS travel parameters nnnnneneeeeeeeeeee 127 P910 Gain X controller erene 127 P911 Positioning ramp TN 127 P912 Positioning ramp 2 127 P913 P914 Travel speed CHIC 127 P915 Velocity precontro 127 P916 Ramp type nrinn 128 P917 Ramp mode ssnneeeeneseeeeeerernrrnrreneseeeseene 130 P918 bus setpoint source ccceceeceseeeseeeeeeeees 130 P92x IPOS monitoring c cee eeeeeeeeeeteeeeeeeeee 131 P920 SW limit switch CAN 131 P921 SW limit switch CO 131 P922 Position WINdOW ssssssseesseserernrrnrrensereesrene 131 P923 Lag error window 131 P924 Positioning interruption detection 131 P93x IPOS special funchons 132 P930 Owvemde cen on i e a a e 132 P931 IPOS CTRL word Task 132 P932 IPOS CTRL word Task 132 P933 Jerk time aasnasnnnnnenneneseeeenerrrrnnnsnresreerrene 132 P938 speed task A 132 P939 speed task 2 ccceececessssesseseseseeeseeeeeees 133 P94x IPOS encoder 134 P940 IPOS variable ect 134 P941 actual position source 134 P942 P943 enc
64. 9 P08 H 10 PO9 H 11 P010 GS_DCVOLT DC link voltage V GS_RELTORQUE Relative torque The value is available in the operating modes CFC and SERVO GS_RELTORQUEVFC The relative torque is the display value based on the rated unit current for the torque at the motor output shaft in 0 1 rated unit current The absolute torque can be calculated from this value using the following formula Mabs Mu x In x Mn 1000 len Maps absolute torque ly Rated unit current Me relative torque based on 0 1 Iy My Rated torque of the motor Nm lan Rated Q current A for selected connection type The value is available in the operating modes CFC and SERVO VFC1 VFC1 amp hoist VFC1 amp DC braking and VFC1 amp flying start Manual IPOSplus Compiler Functions Standard functions 17 GS_ACTSPEEDEXT Actual speed of the external encoder X14 H Time base average value filter for speed detection of external encoder Setting range 5 ms 31 ms H 1 Encoder type 0O Encoder X14 1 DIP encoder H 2 Numerator for the user scaling value range 215 0 2 5 1 H 3 Denominator for the user scaling value range 1 lga 1 H 4 DPointer pointer to the result variable H where H result unit nX14 Inc Time base Example Enter the speed in arcs per hour A structure GS_ACTSPEEDEXT gLAActSpeed has been defined for this process gLAActSpeed
65. A main Initialization State 0 Initialization of the interrupt routine for touch probe input DI02 _SetInterrupt SI_TOUCHP1 Touchprobe Main program loop while 1 Set speed and ramp tPosSpeed 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 1Position ActPos_ Mot TP Max Dos _TouchProbe TP_EN1 HI Activate rising edge State BUSSY break case BUSSY _GoAbs GO NOWAIT 1Position j _Go command to position if h473_ipos_in_ position amp amp DI10 Axis in position and DI10 0 State CALCTARGET Calculate new target position if h473_ipos_in_ position amp amp DI10 Positioning cancelled by DI10 0 _AxisStop AS_PSTOP State STOP AKTIV break case STOP AKTIV if DI10 DI10 1 gt Continue positioning break State BUSSY default break switch State while 1 main 260 Manual IPOSplus Compiler Examples State machine fieldbus control with emergency mode 18 18 9 State machine fieldbus control with emergency mode A drive is to be controlled via the fieldbus in normal mode However in the event of a bus fault manual operation via terminal and analog value should be possible Further provisions have to be made for a mixed mode fieldbus setpoint analog setpo
66. Bit position in a target variable BSET 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 DOO2 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 The BCLEAR command sets a bit within a variable to 0 The bit places in the variable have the numbers 0 31 The least significant bit has the number 0 For example if a bit is cleared in the system variable H481 STD OUT IP it resets a bi nary output directly You must set the output to IPOS OUTPUT in parameters P62x in SHELL beforehand Command structure Mxxx BCLEAR HX1 X2 1 Mxxx Label optional X1 Target variable X2 Bit position in a target variable BCLEAR HXX YY 0 In variable HXX bit YY is set to 0 Example SHELL P621 IPOS OUTPUT BCLEAR H481 2 0 After the BCLEAR command has been performed the 3rd bit is cleared in variable H481 and output DOO2 Note If the output is reserved for a different function for example P621 MOTOR STANDSTILL the bit is cleared in H481 but not the binary out put The BMOV command copies a bit from one variable in a bit in another variable The bit places of a variable have the numbers 0 31 The least significant bit has the number 0
67. Ble a MOVITRAC ES iparemeters Unit functions Setup pe E ag MOVITRAC S parameters IS 0 Display values E 1 Setpoints ramp generators 803 Parameter lock Of a a 2 Controller parameters 804 Reset statistics data No action 3 Motor parameters E 4 Reference signals 808 Auxiliary supply output VIO24 On H E 5 Monitoring functions B E Terminal assignment i 7 Control functions 8 Unit functions EI 80 Setup 81 Serial communication 82 Brake operation 83 Fault responses Ei 84 Reset behavior 85 Scaling actual speed value Gi E 86 Modulation EI 87 Process data parameter assignment J 88 Serial communication SBus Si 9 IPOS parameters g 802 Factory setting No suondo a Ss Re P pp a 809 IPOS enable OR E Paw 0 0 ow 769774603 Now you can program IPOSP S as usual using Compiler or Assembler In the technology unit IPOSP 4S is enabled as standard 118 Manual IPOSplus IPOSplus for MOVITRAC B Characteristics Functionality 10 10 2 Functionality In general MOVITRAC B IPOSPI S has the same functions as MOVIDRIVE B in VFC operating mode In addition there are the following restrictions e Restrictions regarding the range of commands with MOVIDRIVE B e The size of the IPOS program memory is 8kB which is only 50 of the MOVIDRIVE B IPOSP4S program memory of
68. CPNE H HI I H CPNE COMPARE NOT H HI I K page 357 EQUAL NOTL H NOT H NOTL LOGICAL NOT page 359 ORL H HiiH ORL LOGICAL OR page 358 23 301 23 Assembler Commands Arithmetic commands 23 3 Arithmetic commands 23 3 1 Fundamental operations ADD SUB MUL DIV The four basic arithmetical functions are performed taking account of signs They can also be performed with variables H and constants K The 1st argument is always a vari able H the 2nd argument can either be a second variable H or a constant K ADD The ADD command adds a variable to a constant and a variable observing the signs Command structure Mxxx ADD X1 X2 Mxxx Label optional X1 Variable summand and sum X2 Variable or constant summand ADD HXX HYY Variable HXX is the sum of variables HXX and HYY ADD HXX K Variable HXX is the sum of variables HXX and a constant K Example 1 SET H01 100ADD H01 H01 After the ADD command H01 200 Example 2 SET H01 100ADD H01 1 After the ADD command H01 101 Example 3 SET H01 2000000000SET 0x77359400 0x77359400 0 HO2 2000000000ADD H01 XEE6B2800 HO2 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 SUB SUBTRACT signs The SUB command subtracts a varia
69. Copy DBG gt 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 displayed in the project window to high light the program line currently being processed The display in the toolbar changes from PSTOP to START To stop the programs in task 1 task 2 and task 3 choose Run Stop from the menu bar Alternatively you can click on the e icon in the toolbar Once the program has been stopped all tasks the program pointer turns red and remains in the first command line of task 1 The status display for the program sequence in the tool bar changes from START to PSTOP Manual IPOSplus 281 21 282 21 Assembler Editor Assembler Editor The Editor is displayed after the IPOS S Assembler has been started if IPOSplus ASSEMBLER MOVITOOLS jol x 1 File Edit Program Run Help PeTo WU Seng H ei H g SSM 7 R g Numerator fi Denominator fi Unit inc 5 SL Peer to peer 01 4 gt 511872523 1 Menu bar 4 Variable window 2 Toolbar 5 Status bar 3 Program window The status bar shows whether the unit is online or offline It also displays the program memory content as a percentage and the number of program lines selected There are three input fields under the toolbar e Numera
70. ES2R EV1R EH1R INCREM ENCODER TTL 1024 ES1T ES2T EVT EH1T INCREM ENCODER TTL 1024 AV1H AS1H ES1H EV1H HIPERFACE 1 via DWI11A only Manual IPOSplus 135 P9xx IPOS Parameters P94x IPOSplus encoder 12 12 5 6 P945 Synchronous encoder counting direction X14 Setting range NORMAL INVERTED Defines the counting direction of the synchronous encoder The setting must be made so the counting direction of the motor encoder X15 and the synchronous encoder X14 match 12 5 7 P947 Hiperface offset X14 Setting range 231 1 0 2311 This parameter is used to specify the zero point of the motor encoder display Use this parameter to define the machine zero without reference travel It adds or sub tracts the offset from the encoder value e P905 Hiperface offset X15 page 126 has an effect on the actual position of the motor encoder H511 H511 Encoder value P905 e 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 prior reference travel Note When reference travel of a drive system takes place with a Hiperface encoder the Hiperface offsets P905 or P947 are recalculated and overwritten due to the reference travel depending on the set actual position source The following applies e P905 Encode
71. Editor window displays the following program structure Compiler program 3 POSplus COMPILER MOVITOOLS B sum IPC loj x LN File Edit Search Project Run Display Options Window Help l x eh Rage Ree F cay Ba Source modul s Eq Document s Initiali BE Peer to peer 484392715 INFORMATION The IPOSPUs Compiler is case sensitive which means that there could be 2 different variables for MYVAR and myvar R is not permitted 160 Manual IPOSplus Compiler Editor Saving a project 13 You also have the option of adding an existing source file to a project To do so click the right mouse button on the Source file root node and select Add source file to project from the context menu that appears The following dialog box appears LL 21x Current Path O MD AMBRUSMIPOS Sum Sum Suchen in Sum oie c Edv Dateiname Dateityp IPOS Compiler Project Files ICP X Abbrechen 484398091 The file type is preset to ipc Files with the ending ipc indicate source files Header files with the ending h can 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 s The complete project and all the source files in
72. Examples SCOM communication 18 18 7 2 Sender The variables H208 and H209 are transmitted cyclically every 10 ms to another inverter The values of H208 and H209 can be changed using input DI17 DI17 0 H208 111111 H209 222222 DI17 1 H208 222222 H209 444444 Task 2 is not implemented in this sample program Variables H208 and H209 are sent cyclic every 10 ms to another inverter via SBus The values of H208 and H209 can be altered with input DI17 DI17 0 H208 111111 H209 222222 DI17 1 H208 222222 H209 444444 SHELL settings P813 SBus Address gt 1 P816 SBus Baudrate gt 500 kBaud include lt constb h gt include lt iob h gt Definition of SCOM structures SCTRCYCL tBusTr Definition of variables define Data_Varl H208 define Data_Var2 H209 SE E EE EE eneen A d 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 tBusTr DPointer numof Data_Varl data buffer tBusTr Result 1111 default value for control Initialize variables Data_Varl 111111 Data_Var2 222222 Start SCOM _SBusCommDef SCD _TRCYCL tBusTr _SBusCommState SCS _START1 1 Start cyclic communication MOVIDRIVE B _SBusCommOn Start cyclic communication MOVIDRIVE A Manual IPOSplus 257 Compiler Examp
73. Expression has the value 1 Statement 1 is performed if Expression has the value 2 Statement 2 is performed etc If none of the values following Case corresponds with Expression the default statement if programmed is executed Statement n INFORMATION Statements 1 2 n are normally sequences of statements which end with a break statement If the sequence of statements does not end with a break statement all sub sequent case branches are performed until a break statement is encountered The value is then no longer compared with the expression 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 202 Manual IPOSplus Compiler Constructions return 16 6 return Manual IPOSplus The default branch must if available be the last line in a switch statement switch H1 case 1 H2 break case 2 H3 break default H4 break This program extract increments IPOSP S variable H2 if the value of IPOSP 4S vari able H1 is 1 If its value is 2 then the IPOSP S variable H3 is incremented IPOSPIUS variable H1 is incremented given any other value of IPOSPIUS variable H4 The following variant is also possible switch H1 case I case 2 H3 break default H4 bre
74. H H SETI SET INDIRECT H H page 339 SETINT Sets start address of the interrupt routine SETINT SET INTERRUPT page 339 SETSYS System value H SETSYS SET SYSTEM page 344 VALUE VARINT Sets start address and data structure for variable interrupt VARINT page 347 23 2 7 Special unit commands Commands for e Stopping the axis e Storing variables and programs in non volatile memory in the unit e Switching touch probe on off e Controlling the watchdog Command Description See ASTOP Stops axis ASTOP AXIS STOP page 349 MEM Saves and loads IPOSP 4S program and variables MEM MEMORIZE page 349 TOUCHP Touch probe command TOUCHP TOUCH PROBE page 350 WDOFF Switches off the watchdog WDOFF WATCHDOG OFF page 353 WDON Calls the watchdog in time intervals WDON WATCHDOG ON page 353 300 Manual IPOSplus Assembler Commands Overview of commands 23 2 8 Comparison commands Manual IPOSplus Commands for comparing variables and constants Command Key points See ANDL H H amp amp H ANDL LOGICAL AND page 358 CPEQ H H CPEQ COMPARE EQUAL H H page 355 CPGE H H gt K CPGE COMPARE H H gt H page 355 GREATER OR EQUAL CPGT H H gt H CPGT COMPARE H H gt K page 356 GREATER THAN CPLE H H lt H CPLE COMPARE LESS OR H H lt K page 356 EQUAL CPLT H H lt H CPLT COMPARE LESS H H lt K page 357 THAN
75. H arithmetic gt gt H Special unit commands ASHR H H Arithmetic gt gt E Comparison commands DIV H H H DIV Hz H E MOD H H modulo H MOD H H modulo K xl ADD HO HO Target variable H fo Variable H fo Help 511877899 All commands available in IPOS S can be selected in the insert tool 283 21 284 Assembler Editor Compiling and downloading When you select a command an input screen appears in which you have to enter the arguments available for the selected function Once you have entered all the arguments press OK to insert the command in the program You can use the lt Del gt key to remove selected command lines from the program In the same way you can insert entire command blocks by highlighting the required sec tion with the mouse and choosing Edit Copy and Edit Insert or delete them by choosing Edit Cut You can change an inserted command by double clicking the command line in the proj ect window or by choosing Edit Edit command from the menu bar Save the compiled Assembler program by choosing File Save Datei speichern unter 2 x Current Path O MD AMBRUSSIPOS Speicher fa IPOS wel ge eg EJ Ambrus a flash ASO Calculate sum a increment_variable ASO C Original SGML motor_turns ASO CI Sum a tasks_interrupts ASO a cyclic_process_data ASO Dateiname SEMPRE EEN Dateityp Assembler Files A
76. H01 65535XOR H01 XOR 0x00000FFF 0x0000FFOF FOFO hex After the XOR command H01 OxFFOF 23 3 4 SHIFT commands SHL SHR ASHR SHL SHIFT LEFT Manual IPOSplus SHIFT commands are used to move the content of a variable bit by bit All variable bits are given a new significance The number of places to be shifted is specified in the 2nd argument The SHL command moves the content of a variable to the left by the number of bits specified in a variable or constant Zeros are moved along from the right Command structure Mxxx SHL X1 lt lt X2 Mxxx Label optional X1 Variable result and output value X2 Variable or constant number of shift operations SHL HXX lt lt HYY In variable HXX the bits are shifted HYY places to the left SHL HXX lt lt K In variable HXX the bits are shifted by K places to the left Example 1 SET H01 31SET H02 1SHL 0b0000000000011111 0b000 HO1 lt lt H02 0000000111110 After the SHL command H01 62 Example 2 A certain binary significance is assigned to the output terminals of the basic unit and the DIO11A option To use outputs DO10 DO13 for table positioning in a useful manner 4 entries 0 15 positions shift the sig nificance of the outputs so that the terminal with the lowest value DO10 receives the significance 20 0b0000000000001111 0b000 0001111000000 SET H01 15SET H02 6SHL HO1 lt lt H02 305
77. Identifier after declare is invalid NO VARIABLE declare must describe a variable TOO MANY DEFINE Number of define exceeds resources DEFINE IDENTIFIER Identifier after define is invalid SYMBOL SEQUENCE Symbol sequence after define is invalid TOO MANY define Number of define exceeds resources DO WHILE while is missing after do statement OPEN BRACKET Open round bracket missing after while CLOSE BRACKET Close round bracket missing after while SEMICOLON Semicolon missing after while FACTOR CLOSE BRACKET Close bracket missing after expression in brackets FCT CALL CLOSE BRACKET Close bracket missing after function name NUMBER ARGS The number of arguments is incorrect FOR OPEN BRACKET Open round bracket missing after for SEMICOLON Semicolon missing between for expressions CLOSE BRACKET Close round bracket missing after for FUNCTION OPEN BRACKET Round bracket s missing for function declaration CLOSE BRACKET IDENTIFIER NOT FOUND Unknown identifier IF OPEN BRACKET Open round bracket missing after if CLOSE BRACKET Close round bracket missing after if CONSTANT ILLEGAL TYPE Syntax of dec binary or hex constant is incorrect PRAGMA IDENTIFIER Invalid keyword after pragma VARIABLE RANGE Variable range is not permitted PREPROCESSOR NO VARIABLE Variable name must follow numof TOO MANY include Too many include directives nested SOURCE TEXT TOO Source text exceeds maximum permitted length LONG Invalid header file n
78. MeineTask2 Statements of task 2 main Inform system of task 2 and start _SetTask2 T2_ START MyTask2 ji while 1 Main program Manual IPOSplus 239 17 240 Compiler Functions Standard functions 17 3 25 SetVarlInterrupt Syntax Description Key points _SetVarInterrupt hl function name This command is not available in MOVIDRIVE A only as of MOVIDRIVE B The command activates a variable interrupt with the data structure as of variable H1 If the condition for the interrupt is fulfilled the function name function is performed The event for the interrupt is the comparison with a variable value see H 4 If the data structure has been initialized during run time the behavior of the interrupt can be dy namically adapted to a complete Varlnterrupt using an IPOSPI S command Note The data from the data structure is only transferred when the command _SetVarInterrupt H1 function name is called data consistency An exception is the variable pSourceVar Example If the value from the data structure Hx 3 CompareVar is changed for exam ple the value is only taken into account with the command SetVariInterrupt H1 function name 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
79. Minimum actual Value ccccccceeeeeeeeeeeeeees 38 Minimum output value nen neeesserereene 38 Minimum output value control variable 39 Operating mode 38 P component eee 38 Precontrols cgett tease ie aie feta eee ale 38 Proportional component sssssssseesrerrrersssesrees 38 Setpoint a ee a ees 38 Setpoint address 38 Setpoint SCALING a arer AEA TENERA 38 Status WOM TEE 39 PID_ActAdr PID ACTADR 38 PID_ActMax DID ACTMAX 38 PID_ActMin PID ACTMIN ossis 38 PID_ActNorm PID ACTNOR 38 PID_ActOffset PID ACTOFF esssesenneeeenenneeeenn 38 PID_ActScale PID ACTSCA ccc 38 PID _CmdAdr PID CMDADR 38 PID_CmdScale PID CMDSCA 38 PID Command PIDCOMMAND onnie 38 PID Feet PID FEEDF innssosssosnesnnerernsreeseeerene 38 PID _K_p PID KP 38 PID_LimitMax PID UMTMAX 38 PID_LimitMin PID LMTMIN eee 38 PID Mode PID MODE nniiiiissessseseeesrrerrerssnsssesrrene 38 PID Outp D PIDOUTPBD eee 38 PID _Outp_I PID OUTPI 00 0 ccc 38 PID_Outp_P PID OUTPP deenaa 38 PID_SetpMax PID GETMAX 39 PID_SetpMin PID GETMIN oossoo 39 PID_Status PID STATUS 00 ccc 39 Position offset cccceeeeeeeeeeeeeceeeeeeeeeeeeeeeeeeeees 139 Position window cccccseseecceeeeeeeeeeeeeeaneeses 34 131 Positioning interruption detection 131 Positioning AMP T iee iaa 127 Positioning ramp 2 127 PosWindow POS WINDOWW 34 Processing time Iask 43 PST SE 283 379
80. Peer to peer 482065675 1 Menu bar 2 Toolbar 3 Project window 4 Program window 5 Status bar 13 2 2 Step 2 Creating a new project Manual IPOSplus To create a new project choose Project Create new from the menu bar Use the following dialog window to specify the basic project properties Project Properties SS sl Enter the project name Sum Select the project directory OAMD 4MBRUS IPOS Browse IV Create project subfolder The project will be created in folder O MD 4MBRUS IPOS Sum Directory for include directives OAMD MBRUS IPOS Browse Output directory for MDX file OAMD AMBRUSIPOS Browse Dutput directory for listfile OAMD AMBRUS IPOS OK Cancel 482580363 The first line contains the name of the project Give your project a unique name that you will recognize again in the future 145 13 146 Compiler Editor First steps The second line specifies the directory in which the project is to be saved Choose the directory using the Browse button The directory must already exist If a subfolder with the name of the project is to be created in the specified path you must mark the Create project subfolder box The project file is then stored in the subfolder The fourth line specifies the directory in which the Compiler is to search for the files These files are added to the source text files using an include statement The directory
81. RECT H H 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 OVEREFL 32 is gen erated Manual IPOSplus 23 341 23 Structure Example SETINT SET INTERRUPT 342 Assembler Commands Set commands Command structure Mxxx Mxxx SETI X1 X2 Label optional X1 Hxxx Number of the target variable X2 Hyyy Source variable SET H01 50 SET HO 10 MOL SETI HO H01 ADD HO 1 ADD H01 10 JMP HO lt 15 M01 After the program has been run the variables have the following values H10 50 H11 60 H15 100 The SETINT command sets the start address of an interrupt routine The address is in dicated as label in the command An interrupt may be triggered by various events The events are specified in Argument X1 The interrupt routine itself must be completed with a RET command A jump to the interrupt routine takes place immediately and independent 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 commana 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 on
82. Switch off metering unit _BitClear StdOutpIPOS 1 Delete DOO1 hCLOSEvalve Mode 0 Deactivate stop IRQ _SetVarInterrupt hHCLOSEvalve fnCLOSEvalve Jeestetceees soe ee EE nese Main function IPOS initial function Biel Se ee Ros od Se EH 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 the machine 5 x 910 65536 hOPENvalve Mode 12 once when gt 5 hOPENvalve Priority 6 middle priority hCLOSEvalve Control 2 Interrupt task3 hCLOSEvalve IntNum 1 continuous no hCLOSEvalve pSrcVar numof Timer 2 Timer 2 hCLOSEvalve CompVar 200 deactivate after 200 ms hCLOSEvalve Mode 0 Deactivate timer IR first hCLOSEvalve Priority 7 51 Task Management and Interrupts Variable interrupts with MOVIDRIVE B Activate interrupt routine and task3 _SetTask ST3_ START fnTask3 _SetVarInterrupt HOPENvalve fnOPENvalve sHeee ceases nceeees se ase sese cee eee sees while 1 cyclical program section End while 1 End main Example solved in Necessary parameter settings DEES P620 IPOS output P960 for example SHORT fg IPOSplus ASSEMBLER MOVITOOLS B ai Ea it Datei Bearbeiten Programm Ausf hren Hilfe Raa FORM Th S e Z hler fi Nenner fi Einheit finc
83. 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 DOO and DO1 digital outputs of MQx not available for MQx32 can be switched on and off using the H481 StdOutpIPOS variable To do so the parameters P620 DO1 and P628 DOO must be set to IPOS Output H481 E eee DO1 DOO The MQx digital inputs can be read using the H483 InputLevel variable D14 and DI5 are only available with MQx32 To be able to use the inputs as IPOSPlus inputs you must set them to IPOSP YS Input in parameter group 62 H483 5 1 WEIEN Di4 Dis Di2 Dm DIO Manual IPOSplus 121 11 122 IPOSplus for MQx Characteristics Values of the DIAG11 variable for the error IPOS ILLOP 11 5 Values of the DIAG11 variable for the error IPOS ILLOP An IPOS ILLOP error is generated as a general error message when an error occurs in the IPOSP 4S program An internal error number is sent to the diagnostic variable H469 DIAG11 for detailed error analysis Every error that can occur is assigned its own error number 999 means that the function or an argument of the function is not supported by the MQx module The following error numbers can occur when using the MOVLNK and MOVCOM com mands DIAG11 Command Cause of error 500 MOVLNK MOVLNK command was called afte
84. The zero pulse is evaluated according to the reference cam P904 Not significant for GOO INFORMATION The controller must be enabled to set an absolute encoder using the GOO command Alternatively the encoder can be set without an enable by setting the offset P905 for Hiperface or the parameters P953 P955 for an SSI encoder DIP Manual IPOSplus 23 323 Assembler Commands Positioning commands 23 INFORMATION For type 3 and 4 and for the CAM setting the drive must be referenced and positioned right next to the hardware limit switch For hoist applications and the lower reference point in particular when the drive is positioned to the lower point 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 If the software limit switches have been set via parameter P920 P921 the software limit switches are only monitored once reference travel is complete If the drive is not connected to an absolute or Hiperface encoder the reference point is lost after an error message occurs and the drive has to be RESET INFORMATION If a waiting referencing command is interrupted by withd
85. WINDOW sssssssnseseenenesesessereen 34 Liability for defects A 15 M ModActPos MOD ACTPOS 29 ModCount MOD COUNT sssssssssessessserrnnnssrseeereene 29 ModTagPos MOD TAGPOS nniinnineeeeeeeeeeeeeenn 29 Modulo Actual Position ceeeeeeeeeeeeeeteeees 29 Modulo denominator ssssessseeseenererrrrnnsenssrrerre ee 140 Modulo encoder resolution eeeeeeeeees 140 Modulo function 73 140 Modulo function control word 29 Modulo numeraior 29 140 Modulo Target Position 29 ModuloCtrl MODUL OCTRL 29 Motor encoder actual position 35 Motor encoder rack 36 Motor encoder zero pulse ssssessesnneerreneeeeeeeereeee 36 O Operating state 0 00 ccc eee cece eee eeeeeeeeeeeeeeneeees 283 OptOutpIPOS OPT OUT IP ee 31 OutpLevelB OUTPUT LVUR 37 Output GireCtory sirni iiai TEE 156 OutputLevel OUTPUT LA 32 Override EE 132 P Parameter description P9xx IPOS oarameiers 123 Manual IPOSplus PID controller Actual value address 0 0 ccceeeeeeeetestenteeeeeees 38 Actual value offset ssseseeesesernr rnr rrn neresen 38 Actual value scaling 00 02 eceeeeeeeeeteeeeeeeeeteeeeeeetee 38 D component aas eee aeae i 38 Filtered and scaled actual value 38 COMPONEN aaa Gare dn aaa aa aen 38 Maximum actual value cccccceeeeeeeeeeeeeeees 38 Maximum output value ennen rnn neeese 38 Maximum output value control variable 39
86. WORD RS 485 interface Fieldbus interface SBus system bus 3 3 1 Active control signal source Control via input terminals and the IPOS S control word H484 are always in effect You can determine additional control signal sources using the following parameters Setpoint source P100 Control signal source P101 Process data description P870 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 MOVIDRIVE B standard unit this is solved using a variable interrupt The functions internal synchronous operation ISYNC and electronic cam are ex plained in the section IPOSPIUS and synchronized movements and described in detail in separate manuals In these cases additional IPOSPIUS variables are assigned sys tem functions that you can address in IPO sPlus user programs Manual IPOSplus System Description Technology options application modules 3 4 2 Application modules Manual IPOSplus An application module is a protected user program designed by SEW that can be loaded into the inverter A comprehensive package of
87. X1 X1 NOP No data is stored STORE ALL Programs and data in the working memory are saved in the non volatile memory EEPROM LOAD ALL Programs and data are loaded from the non volatile memory EEPROM to the working mem ory STORE Only the program from the working memory is saved to the non volatile memory EEPROM PROG LOAD Only the program from the non volatile memory EEPROM is loaded to the working memory PROG STORE Only the variables from the working memory are saved to the non volatile memory DATA EEPROM LOAD DATA Only the variables from the non volatile memory are loaded EEPROM to the working mem ory If an error occurs the program jumps to an error interrupt routine Here the MEM STORE DATA command is called so that you can continue processing with the stored interim status of variables HO H127 after the error reset If you do not use this command the program starts with the most recent values from EE PROM and overwrites the most recent working values The command TOUCHP enables or locks a touch probe input The touch probe function is generally assigned to the input terminals DI and or DIO3 Inputs used for the touch probe function should be set to IPOS input to prevent them being allocated twice If there is a change of signal level at a touch probe input after the TOUCHP command has been carried out the current actual positions H511 H510 H509 are stored in the variables intended for this purpos
88. _ 0 180 360 0 180 Dun 0000 8000 FFFF 0000 8000 216 360 in hex 477219595 A new target position is specified by writing the IPOSPIUS variable H454 MODTAGPOS in 32 bit format The system software differentiates between 2 forms of representation which can be set in H453 bit 1 e 360 16 bit referred 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 2 4 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 position selection in output units in hexadecimal format Representation of several integral revolutions H454 MODTAGPOS k x 360 0 360 k x 216 0 218 1 Representation of one integral revolution H454 MODTAGPOS 0 360 Target position in output unit Realization via IPOSP 4S variable H454 MOD TAGPOS 360 0001 0000 3 x 360 0003 0000 180 0000 8000 270 0000 C000 Manual IPOSplus Position Detection and Positioning Modulo function 6 7 3 Travel strategies Referencing Positioning Short distance Manual IPOSplus When the modulo function is activated a number of travel strategies can be
89. _BitClear 1PE StatusWord 11 _BitClear 1PE StatusWord 12 End fnPositioning Manual IPOSplus Compiler Examples Compiler programming frame Function fnTask2 For time critical program sections that can run asynchronously from task one fnTask2 Read inverter state _GetSys 1DriveState GS SYSSTATE Read error number _GetSys lErrorCode GS_ERROR Import PO data _GetSys tPA BusType OG PODATA Create branch distributor Select operating mode Virtual fieldbus terminal can only be used if a DIO or DIP is in this case use 1PA ControlWordHigh tPA PI1 gt gt 8 otherwise 1PA ControlWordHigh InputLevel gt gt 9 Move 1PA_ControlWordHigh tPA PO1l gt gt 8 Move Bit8 to Bit 0 lOpMode 1PA_ControlWordHigh amp MY_OP_ MODE gt gt 3 Bit 3 4 Create status transitions switch 1GlobalStateMachine Either no operating mode has been selected or a selection case DISABLE if l1DriveState gt 0xA if 1lOpMode JOGGING 1GlobalStateMachine JOGGING if 1lOpMode HOMING 1GlobalStateMachine HOMING if 1lOpMode POSITIONING 1GlobalStateMachine POSITIONING break Tog mode case JOGGING if lDriveState gt 0xA if lOpMode DISABLE 1GlobalStateMachine DISABLE if lOpMode HOMING 1GlobalStateMachine HOMING if 1lOpMode POSITIONING 1GlobalStateMachine POSITIONING else 1GlobalStateMachi
90. been compiled successfully The first program line in the Main function is marked with a light blue bar once the pro gram has been downloaded successfully You can now start the program You can start the program by clicking the g icon The program now runs in MOVIDRIVE and the START status is displayed in the toolbar Status START IPOSplus COMPILER MO Zj File Edit Search Project Run Displz RL 1010 EGRESS osu Eb Project d ely Sum N Source modul s Asum IPC Ein Document s 483713291 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 window by choosing Display All Variables You can now observe the variable H2 Now we want to stop the program This is done by pressing the icon EH After this the first program line in the Main function is marked with a light blue bar 153 13 154 Compiler Editor Settings for the IPOSplus Compiler 13 3 Settings for the IPOSP 4S Compiler You can make a number of settings for the entire Compiler To do so choose Options Settings The following dialog box appears Editor settings Settings 2x Editor Compiler Folders Print Execution r Colors Tert Instructions EI Background z Keywords i Co
91. binary inputs can be queried in the IPOSPlus program using jump commands To do so in the input screen select the terminal level HI LO that should lead to the jump command being performed Terminals 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 Mxx JMP HI LO I 00 00000000 000000 Mxx Jump destina tion DIO0 MOVITRAC 07 only has the terminals DIO5 D101 DIOS DI0 MQxX only has the terminals DI00 DI01 ou or DI02 D103 Level Example Jump to label 20 if the inputs DIO3 and DI04 have a high signal 1 otherwise the next command line is processed Edit IPOS Instruction 2 xi Main Menu Fast Search Sub Menu Arithmete commands CALL Calls a subroutine Bit commands Jump input terminals Communication commands Positioning commands JHP Jump H lt gt 0 Program commands JMP Jump H lt gt H Set commands JMP Jump H lt gt K Special unit commands JMP System conditioned jump Comparison commands LOOPB Program loop begin LOOPE Program loop end NOP No operation REM Remark x JMP HI I10000000000000000 MO Label M j M Diop M Dno Tpit fF Dni Condition type HI z M Do M pn2 2 T Dm T DNS Bit mask binary Help M Dim M D4 te Jump destination M fo T Dos T DNS Cancel M DNE 512410763 Manual IPOSplus 291
92. bit with the number bit1 in IPOSP4S variable H1 to the bit with the number bit2 in IPOSPIUS variable h2 All bits of H1 and all other bits of H2 remain unchanged The bit positions of a variable are numbered 0 to 31 The least significant 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 IPOSP US variable H1 to the bit with the number bit2 in IPOSPI4S variable H2 The bit is negated during this process All bits of H1 and all other bits of H2 remain unchanged The bit positions of a variable are numbered 0 to 31 The least significant 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 Manual IPOSplus 209 Compiler Functions Standard functions 17 Example main _BitMoveNeg H1 3 H2 4 copies H1 3 NOT H2 4 _BitMoveNeg H1 1 H1 0 copies H1 1 NOT H1 0 17 3 5 _BitSet Syntax _BitSet H bit Description Within the IPOS S variable h _BitSet sets the bit with the number bit to one Key points H Variable name bit Constant expression with the
93. cam and limit switches must be flush e Type 8 Without enable Reference travel can take place when the drive is not enabled Reference position current position Machine zero reference offset Manual IPOSplus 125 P9xx IPOS Parameters P90x IPOS reference travel 12 12 1 5 P904 Reference travel to zero pulse Setting range YES NO e YES Reference travel takes place to the zero pulse of the selected IPOSP Us encoder s NO Reference travel takes place to the falling edge of the reference cam 12 1 6 P905 Hiperface offset X15 Setting range mY 1 0 ot This parameter is used to specify the zero point of the motor encoder display Use this parameter to define the machine zero without reference travel It adds or sub tracts the offset from the encoder value e P905 Hiperface offset X15 page 126 has an effect on the actual position of the motor encoder H511 H511 Encoder value P905 e 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 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 recalculated and overwritten due to the reference trav
94. control present The position information from the 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 variables and calculate the quotient ACTPOS ABS H509 old H509 new H509 difference Noted value ACTPOS MOT H511 old H511 new H511 difference Noted value The quotient Q results from the H511 difference divided by the H509 difference Q H511 old H511 new H509 old H509 new Set ENCODER SCALING P955 to the value closest to the calculated quotient Q pre ferably to the lower of the closest values If the quotient is greater than 80 positioning using the absolute encoder can only be per formed with reduced dynamic properties INFORMATION During project planning ensure that the encoder ratio does not exceed 1 10 6 5 6 5 Set position offset P953 The position offset P953 only has to be set on incremental encoders For other enco ders its should be set to 0 Proceed as described for P953 in the chapter IPOS Parameters Manual IPOSplus 61 Position Detection and Positioning SSI absolute encoder DIP
95. created during the installation is entered here as a default for example c pro gramme sew movitools projects include Lines 5 and 6 specify the directories in which the MDX file file with the IPOSP 4S 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 e It creates the folder Total in the specified directory only if you selected the option Create project subfolder e Itcreates a project file with the name Total icp in the Total folder e Itcloses the dialog box The project now appears as a hierarchical tree in the project window of the program win dow 5 POSplus COMPILER MOVITOOLS B loj x Run Display Options Window Help D SH RHH RAA FOS Ee Source modul s Ey Documentis BRON Peer to peer 482803339 The next step is to create a new source text file and add it to the project To do so choose File New Source file Confirm this dialog box with Yes A new source file is added to the project You are now asked to enter a name for the new source file Enter the name summe ipc Manual IPOSplus Compiler Editor First steps 13 When you click Save another window appears You create the program structure here Definin
96. data 8 3 2 Cyclical user specific process data Users have the option of choosing the description of the cyclical process data them selves To do so assign the parameter setting PO data for the output data or PI data for the input data in the process data configuration In this case process output data is not evaluated directly by MOVIDRIVE but must be copied to the IPOSP 4S variables using the commands GETSYS PO data or SETSYS PI data The variables are decoded in the IPOSPIus program In this way the user can for example transfer position setpoints in user units for example motor revolutions by multiplying or dividing the value trans mitted by the fieldbus before it is used for positioning Example Six process data items 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 lt const h gt Process data data structures GSPODATA10 tPA Output data PLC gt Drive SSPIDATA10 tPE Input data Drive gt PLC Main function IPOS initial function Initialize fieldbus variables for Getsys and Setsys commands tPA BusType GS_BT FBUS Process data operation via fieldbus interface see above tPA Len tPE Len 6 PD length 6 words Import PO data _GetSys t
97. ee sated Eed 203 Manual IPOSplus Contents 17 Compiler Functions ue eee ee eeeeeeeee eee eeeeeee eee seeseesneneeseeeeeeeens 204 17 1 User defined functions 2 ccc cee cece ceeeecee cee ee cette eee eeeeceaaeaaeeeeeeeeeeeeteeeeeees 204 17 2 Overview of commands for standard functions ceceeeteeeeeeeeteees 205 17 2 1 Standard bit functions 00 002 eee ee cee ceeecee eee ce eee eeeeteeeeeeeeneeeaeees 205 17 2 2 Standard communication funchons reee 206 17 2 3 Standard positioning FUNCTIONS eee eee eeeteteeeeteteeeeeeeaes 206 17 2 4 Standard program functions cee eeeeeeeeeeeteeeeeeettaeeeeeeenaes 206 17 2 5 Standard setting functions 0 cece eee eeeeteeeeeeettaeeeeeeeaas 207 17 2 6 Special standard unit functions s essseeseeeneeneenesreeerrnr rrr ne nn 207 17 3 Standard Bee EEN 208 VES 5 SAXIS SOP ON 208 Re E e LTE 209 US E Oe 209 hee let e E 209 Hax BitSetancnac sient ee ee ee ees 210 17 3 6 Ee 210 17 3 7 Faubtbeachon eee eeeeeeaeeaeeeeeeeeeeeeeseseeesennaeess 210 17 3 8 East eit aes ee he ies fac aa d 211 17 3 9 GOO Me aria hes th salts na eta at eet atest aden et rel cok ened 217 T7300 EE 218 RO a SGORCl TT 219 k pute EE 220 Re he WE Ee EEN VS AA Mowl nk egen dree eelere 222 17 3 15 _MovCommDef cece eee eeeeeeeceneeceeeeeeeeeeeeeeteccenaeeaeeeeeees 227 1753 16 MOVEOMMOR ET 229 SAL INO EH 229 17 3 18 SBusCommDef REENEN KEREN
98. expanded cam controller with 8 outputs Hxxis the first variable of a data structure CamControl or GS_CAM The bit with the highest significance bit 31 is used in Hxx to decide which cam controller the GETSYS command refers to Bit 31 0 Standard cam controller The GETSYS command activates the cam controller The cams are formed once when the GETSYS command is processed If the cam controller is to work cyclically the command must be called up cyclically Bit 31 1 Extended cam controller with technology option The GETSYS command activates the cam controller the 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 O 10000 h Analog output 1 h 1 Analog output 2 GS_TIMERO Counter value of TIMER 0 H489 in ms GS_TIMER1 Counter value of TIMER 1 H488 in ms GS_PODATA Reads the PO data buffer Regardless of the number of PO data items 2 PO data items or 10 PO data items are read data sent from the master to the unit H 0 Bus type 0 reserved 1 SO RS485 1 2 S1 RS485 2 3 Fieldbus 4 reserved 5 SBus 8 SBus 2 only MOVIDRIVE B H 1 Number of PO data items H 2 P01 H 3 P02 H 4 P03 H 5 P04 H 6 PO05 H 7 P06 H 8 PO7 H
99. 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 direction and reverses at the reference cam 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 Refe rencing to zero pulse If reference travel is started with the IPOSP S command Goo the drive is referenced to the falling edge of the reference cam or to the zero pulse after the falling edge of the reference cam depending on whether the argument ZP or CAM is set Manual IPOSplus 71 Position Detection and Positioning Referencing The reference cam must start just before or in line with the CCW hardware limit switch and must project into the limit switch This ensures that no contact is made with the hard ware limit switch during reference travel A D D E 1 nReft o i 1 nRef2 i 3 RefOficAM RefORZP RefCAM RefZP M P wsi ewj TI gt 476764811 6 6 9 Type 8 Without enable The reference position is the current position The argumen
100. fulfilled otherwise the result is zero The result can be processed further for example with a subsequent jump command Variable X2 remains unchanged Command structure Mxxx Label optional Mxxx CPLE X1 lt X2 x1 Variable result X2 Variable or constant SET HO 50 SET H1 13 CPLE HO lt H1 After the program has been processed HO has the value zero and H1 the value 13 SET HO 3 CPLE HO lt 3 After the program has been processed HO has the value one Manual IPOSplus Assembler Commands Comparison commands CPLT COMPARE LESS THAN Structure Example 1 Example 2 CPNE COMPARE NOT EQUAL Structure Example 1 Example 2 Manual IPOSplus The CPLT command compares observing the signs whether variable X1 is less than as 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 Command structure Mxxx Label optional Mxxx CPLT X1 lt X2 x1 Variable result X2 Variable or constant SET HO 3 CPLT HO lt 3 After the program has been processed HO has the value zero SET H2 CPLT HO 3 SET HO 2 lt H2 After the program has been processed HO has the value one The CPNE command compares observing the signs whether variab
101. in ms distributes the bus load when several SCOM TRANSMIT commands are used 514549899 Valid offset times See _SbusCommDef page 227 H 3 Number of data bytes and data format Bit 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 20 Free bus capacity in calculated value of this unit 1 Incorrect cycle time 2 Too many objects set up 3 Bus overload 5 Wrong object number 6 Wrong length Ensure that the entire calculated bus utilization does not exceed 70 for additional data exchange between slaves The bus utilization is calculated in bits per second using the formula Number of telegrams x bits telegram x 1 cycle time For example 2 messages with 100 bits in 1 ms cycle 200000 bits s 200 kBaud This results in the following bus load percentage in reference to the selected baud rate For example 200 kBaud 500 kBaud 40 lt 70 Manual IPOSplus Assembler Commands Communication commands TRANSMIT ACYCLIC Object structure This argument initializes a data object whose user data is transmitted once immedi ately Variable H of the SCOM TRANSMIT ACYCLIC H command defines the sta
102. inputs READ only INPUTLVLB e Bit IPOS DIO DIO DIP DIO DIP DIP Fieldbus MOvIDRINE B name DIO fieldbus fieldbus P870 MOVIDRIVE A control H483 word 2 0 DIOO Depends on the basic unit e g X13 1 1 DI01 X13 2 2 DIO2 X13 3 3 DIO3 X13 4 4 DI04 X13 5 5 DIO5 X13 6 6 DIOG X16 1 7 DIO7 X16 2 8 DI10 X22 1 X22 1 X22 1 X60 1 X60 1 Bit 8 9 DI11 X22 2 X22 2 X22 2 X60 2 X60 2 Bit 9 10 DI12 X22 3 X22 3 X22 3 X60 3 X60 3 Bit 10 11 DI13 X22 4 X22 4 X22 4 X60 4 X60 4 Bit 11 12 DI14 X22 5 X22 5 X22 5 X60 5 X60 5 Bit 12 13 DI15 X22 6 X22 6 X22 6 X60 6 X60 6 Bit 13 14 DI16 X22 7 X22 7 X22 7 X60 7 X60 7 Bit 14 15 DI17 X22 8 X22 8 X22 8 X60 8 X60 8 Bit 15 16 X60 1 17 X22 1 X60 2 18 A X60 3 19 X22 8 X60 4 20 X60 5 21 X60 6 22 X60 7 23 X60 8 Manual IPOSplus IPOS Variables Overview of the system variables No Name Description Compiler Assembler 521 OutpLevelB Signal level of the binary outputs READ only ce deers Bit IPOS DIO DIO DIP DIO DIP DIP Fieldbus MOVIDRIVE B name DIO fieldbus fieldbus P873 sta MOVIDRIVE A tus word 2 H482 0 DBOO DBOO DBOO DBOO DBOO DBOO DBOO d DO01 DO01 DO01 DO01 DO01 DO01 DO01 2 DO02 DO02 DO02 DO02 D002 DO02 DO02 3 DO03 DO03 DO03 DO03 DO03 DO03 DO03 4 DO04 DO04 DO04 DO04 DO04 DO04 DO04 5 DOO5 DOO5 DOO5 DOO5 DOO5 DOO5 DO05 6 DO10 X23 1 X23 1 X23 1 X61 1 X61 1 Bit 8 7 DO11 X23 2 X23 2 X2
103. kByte Command processing time Task 1 1 Assembler command ms Task 2 2 Assembler commands ms Interrupts Variables 1024 of which 128 0 127 can be stored in non volatile memory System variable area IPOS variables H453 to H560 Touch probe inputs Sampling interval of analog inputs 1ms Sampling interval of binary inputs 5 ms Binary inputs outputs MOVITRAC B 6 inputs 3 outputs FIO21B option 7 Inputs Analog inputs outputs MOVITRAC B 1 input 0 10 V FlO11B option 1 input 10 V 1 output 0 20 mA 4 20 mA Manual IPOSplus 25 26 System Description Technical data 3 5 3 MQx Encoder resolution MQx module has no encoder inputs but supports the position detection via binary inputs counter input For the technical data of the binary inputs refer to section Position detection via binary inputs page 96 Maximum 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 Binary inputs outputs MQ 21 MQ 22 4
104. limit switch accelerate to P901 reference speed 1 and then search for the condition for the end of the reference travel with P902 reference speed 2 Reference type 0 uses P902 Reference speed 2 right away 63 Position Detection and Positioning Referencing If a hardware limit switch is reached during reference travel with type 1 or type 2 and the reference point has not yet been found the drive turns and continues reference travel in the other direction Once the drive has found the reference point the following functions are performed e The drive stops and switches internally from speed to position control e Bit 20 IPOS Referenced in H473 StatusWord is set and a binary input with the parameter IPOS REFERENCE is set e Reference offset P900 is transmitted to the actual position value If the modulo function is deactivated P960 OFF this is the variable of the encoder H509 H511 selected in P941 If the modulo function is activated it is the variable H455 ModActPos As of this point the following formula applies for the machine zero Machine zero reference point reference offset The status referenced is reset when the inverter is switched off or if error messages relating to the position measuring system 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 describ
105. linear ramp type Setting in ms with reference value 3000 rpm H Positioning ramp 1 up H 1 Positioning ramp 2 down POS Positioning speed cw ccw settings can also be made during travel only for the linear SPEED ramp type Setting in 0 1 rpm H Positioning speed CW H 1 Positioning speed CCW OVERRIDE Switching override on off settings can also be made during travel only for the linear ramp ON type H 0 off H 1 On BRAKE Switching the brake function on off FUNC ON H 0 off H 1 On RAMP TYPE You should not make settings during travel torque shocks Changes P916 H 0 Linear H 1 sine H 2 square H 3 Bus ramp H 4 jerk limited H 5 Electronic cam H 6 l synchronous operation RESET Resets the system error in variable X2 ERROR 23 345 23 346 Assembler Commands Set commands ACT POSI Sets the motor encoder actual position ACTPOS MOT H511 TION SPLINE Internal drive calculation of an analytical cam disk The function is only available in MDX B MULTIAXIS with SD version 15C The spline calculation is initialized via the system function after up to 20 curve points x y value pairs x master position y slave position have been specified in a master encoder range The calculation is then started using h 0 SplineMode and either a complete cam disk or one segment of a selected cam disk is filled Currently a spline 0 procedure for opti mum running and a spline 1 procedure for sec
106. machine zero Depending on the encoder type this setting must either be made at initial startup absolute encoder or each time the machine is switched on again all other encoders MOVIDRIVE supports 9 types of reference travel that can be set via P903 Reference travel type P904 Reference travel to zero pulse and the arguments of the IPOsPlus command God orGoo and that result from the reasonable combination of the following characteristics e Encoder is set without reference travel no reference travel e Search direction is set direction of movement at start of reference travel e Referencing is set to the hardware limit switches e Referencing is set to zero impulse only possible in external encoders when the resolution lt 5000 inc revolution e Referencing is set to reference cam If referencing is set to the hardware limit switches and or the reference cam these must be set as binary inputs Parameter P941 Source actual position is used to define which encoder is used for ref erence travel Once the drive is enabled reference travel is started using one of the following methods e Via a positive edge on binary input P600 P606 or P610 P617 that is set to the function REF FAHRT START e via the IPOSP 4S command Goo or Goo The display changes to c REFERENCE MODE Stop ramp P136 is always used for acceleration during the reference travel Reference travel types with reference cam or
107. mode _2 break case 3 mode_3 break 18 263 18 264 Compiler Examples State machine fieldbus control with emergency mode mode_0 if busdata PO1 6 enable else rapidstop speed busdata PO2 setfixedsetpoint activatefixedsetpoint mode LI if busdata PO1l 6 enable else rapidstop _GetSys analog GS_ANINPUTS offset analog Inputl 15 10 speed busdata PO2 offset setfixedsetpoint activatefixedsetpoint mode 21 enable deactivatefixedsetpoint mode 3 rapidstop Manual IPOSplus Compiler Examples State machine fieldbus control with emergency mode 18 18 9 1 Mode 0 18 9 2 Mode 1 18 9 3 Mode 2 18 9 4 Mode 3 Manual IPOSplus Control and setpoint only via fieldbus Control is performed exclusively via the fieldbus A reduced control word 0 rapid stop 6 enable is also to be used The setpoint is specified in bipolar terms via the fieldbus 1500 rpm 1500 rpm 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 Control and setpoint via terminal or analog value The fieldbu
108. numof DATA DATUM 0 _SBusCommDef SCD TRCYCL Obj1 Send obj1 cyclically _SBusCommState SCS START1 Start of the transmission for SBus1 while 1 Main program task 1 17 3 21 _Setinterrupt Syntax _SetInterrupt event function name Description The 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 SI_DISABLE Interrupt is inhibited SI_ERROR Triggers an interrupt in case of a system error SI_TIMERO Triggers an interrupt when TimerO is exceeded SI_TOUCHP 1 Initiates an interrupt in case of an edge change on a touch probe terminal if touch probe was activated function name Name of the interrupt function Important In contrast to a function call only the name of the function without is specified here Manual IPOSplus 235 17 236 Compiler Functions Standard functions 17 3 22 _SetSys Syntax Description Key points include lt constb h gt TOInterrupt Statements of the interrupt routine for timer 0 main Inform system of TO interrupt and start _SetInterrupt SI_TIMERO TOInterrupt j while 1 Main program task 1 _SetSys sys H Sets the value of an internal system
109. of an input terminal can only be queried in the task in which the edge was created If this is not the case if the individual tasks are not synchronous the edge may not be detected or it may be interpreted incorrectly If the edge of an input terminal is required in several tasks the edge must be created separately in each task Manual IPOSplus Compiler Examples Querying an edge 18 4 2 Example 2 Manual IPOSplus In example 2 the program section within the if query is processed depending on the ris ing edge at DI02 IA IPOS source file ze EE EE EE EE EE en eens A d include lt constb h gt include lt iob h gt long BinInputsNew BinInputsOld IA Main function IPOS initial function EE EE EE EE EE E EE E e eneen AS d main EE Initialization SSeS a ee a SS ae Se S SE Se Ee Main program loop EE while 1 Reading binary inputs _GetSys BinInputsNew GS INPUTS Querying an edge if BinInputsNew amp 0x4 amp amp BinInputsOld amp 0x4 rising edge DI02 program statement is located here Saving input states BinInputsOld BinInputsNew 18 251 Compiler Examples Value of a number 18 18 5 Value of a number The following sample program demonstrates how the IPOS 4S Compiler can be used to create the absolute value of a number In task 1 a revision program is running that moves the drive relatively 40000
110. of the AND operation is written to the first variable that is H200 Therefore the first argument must be a variable AND operation of H200 and H482 H200 2 00000000010 DOO1 H482 11011100110 current status of the binary outputs Result 00000000010 the jump is performed as H200 2 To set the outputs the binary outputs parameters 620 621 MOVIDRIVE A 620 626 MOVIDRIVE B 630 637 must be set to IPOS OUTPUT Digital outputs are set using the system variables e H480 OPT OUT IP for option DIO11 DIP11 DO10 DO17 e H481 STD OUT IP forthe basic unit DO01 DO02 MOVIDRIVE A DO01 DO05 MOVIDRIVE B DBOO is set to Brake The brake is controlled directly by the firmware As a result the output cannot be written 22 293 22 294 Assembler Programming Binary inputs outputs Setting individual outputs The BSET and BCLR commands are used for setting resetting individual outputs To do so the bit number corresponding to the terminal must be entered as an operand in the command mask In the following example output DO01 should be set to 1 Edit IPOS Instruction HE Main Menu Fast Search BCLR H Bit BMOV H Bit BMOVN H Bit Sub Menu Arithmetc commands QO H Bit NOT H Bit Special unit commands Comparison commands BSET JG tee sal ek Label M l Target variable H fast Bit number fil Help Ca
111. of the watchdog counter to the value specified in time If the watchdog timer elapses task 1 and task 2 are stopped and an error message is issued The ap plication 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 running down _WdOn WD_ZEIT Retrigger WD every 1000 ms Manual IPOSplus 245 Compiler Examples Setting bits and output terminals 18 18 Compiler Examples 18 1 Setting bits and output terminals There are two ways of setting individual bits in variables 1 The _BitSet Hx y function sets bit y in variable x to one 2 The bit by bit OR operation Hx K sets those bits in variable x to one which are also set to one in constant K In both cases the legibility of the program can be improved if the bit position or the con stant is defined symbolically Bit setting functions are mainly used for setting binary unit outputs Therefore in the following example variable H481 StdOutpIPOS will be used as the target variable of the operation Variable H480 OptOutpIPOS would be used ac cordingly to a
112. option Cam A master movement is usually represented as a machine angle between 0 and 360 de grees A number of curve points are defined with 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 often specified in a 2 dimensional graph The position of the master drive is entered along the horizontal axis and the position of the slave drive along the vertical axis The range of positions along the horizontal axis is referred to as the master cycle the range of positions along the vertical axis as the slave cycle Electronic cam Slave length A 4 Oe a ee Slave cycle lt G Der Masterilength Startup cycle Master cycle Stop cycle is completed once is continued cyclically is completed once 478837771 1 Startup cycle is run through once 4 Slave cycle 2 Master cycle is repeated cyclically s1 Master length 3 Stop cycle is run through once s2 Slave length Manual IPOSplus IPOSplus and Synchronized Motion Synchronous operation with technology option Cam 9 5 1 Requirements The electronic cam option places the following requirements on the drive
113. option Internal synchronous opera Main function IPOS initial function if E_ Free running Free running On else Free running Off if E_ Set zero point DRS Zero point if E Switch Pos Sync Activate_IPOS _GoAbs GO _NOWAIT target position j else if E Free running Activate_synchronous operation 9 4 Synchronous operation with technology option Internal synchronous opera tion Internal synchronous operation is a firmware solution used to operate several axes at synchronous angles This software solution simply requires pulses from a master unit This master source can either be the X14 input physical master drive or any IPOSPlus variable virtual master drive e g in conjunction with the SBus or a virtual encoder As of the MOVIDRIVE B series any source can be selected for the actual position of the axis absolute encoder synchronous encoder or any IPOSPS variable In this way axes with slip can also be synchronized using internal synchronous opera tion For MOVIDRIVE A only the motor encoder can be used as the actual source po sition Synchronous operation comprises various functions One of the functions is that the drive can be 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 synchronizati
114. or tooth backlash or any mechanical play in gear unit backlash Table 1 Evaluation of the pulses of the external encoder Incoming pulses example 2048 2048 1024 1024 Quadruple evaluation fixed 8192 8192 4096 4096 Scaling external encoder P944 can be set x1 x8 x1 x2 Changing counter reading H510 ACTPOS EXT 8192 65536 4096 8192 per encoder revolution Once the control voltage has been switched on if an AS1H or AV1H is used the absolute value of this encoder is used as the actual position value of the external 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 Manual IPOSplus 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 rotational movement of the wheel and the resulting translational movement of the carriage This means for positioning using motor control it is essential that the position of the car riage is detected To do so at startup the ratio of the increments of the motor encoder must be set to the increments of the synchronous encoder A description of these parameters with exam ples and the procedure for setting them can be found in the descriptions of parameters P944 P943 and
115. parameters indexes e P601 binary inputs DIO2 to IPOS input Index 8336 to 16 e P602 binary inputs DIO3 to IPOS input Index 8337 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 plus A reference travel can only be performed by an IPOS program 7 4 Position detection with MOVITRAC B The binary inputs counter inputs of the MOVITRAC B have the following technical data Binary inputs Encoder signals 2 tracks Track A and track B Phase position 90 20 Mark space ratio 1 1 20 Max pulse frequency 120 kHz Connection of track A MOVITRAC B Terminal X12 5 DI04 Connection of track B MOVITRAC B Terminal X12 4 DI03 Reference potential GND to PE potential For MOVITRAC B SEW EURODRIVE recommends the EI7C built in encoder Proceed as follows to use a built in encoder 1 Connect the encoder to the digital inputs of the MOVITRAC B via terminals X12 5 DI04 and X12 4 DIO3 2 Set the following parameters indexes e P602 binary input DIO3 to IPOS input Index 8338 to 16 e P603 binary input D104 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
116. pobied caadd deed ESA ESA 285 21 6 Dlebug et Eege geed e See same eat eect teak 285 21 6 1 Execute to CUSON inpro neies idirin E e EE NT 286 2102 Single Sep EE 286 21 7 Loading the program from the Imverter 287 21 8 Overview Of the ICONS sisses eraen a EA EAE EAE EEA ATESA 287 Manual IPOSplus Contents Manual IPOSplus 22 Assembler Programming cceseeccecceseeeeeeeeeseeeeseeeeseeueseeeeseeaeeeeeeseeaeeeeeeneees 288 D2 O EE 288 22 1 1 Program header 288 22 1 2 Task 1 Task 2 Task i 288 22 123 een E ICT 288 22 1 4 Program branches css nates thie ite ada 288 22 1 5 Subroutine system 288 22 1 6 Program oons cor a ira A AGA 289 22 1 7 Positioning commande 289 22 1 8 Binary analog inputs outputs eect eeeeeteeeeeeentaeeeeeeenaes 289 22 1 9 Access to system values parameters eeeeeeeeeeeeteeeeeeenaes 289 22 13 10 Variables cin nascent Haden tied decade EEN 290 22 411 Program E 290 22 2 Binary inputs Outputs cccceeccececeeceeeeeeeeeeeeeaaeeeeeeeeeeeeeeeeseeesnnieeaeeees 291 22 21 Binary inputs ee d e eee eee 291 22 2 2 Binary outpute oreraa a aT EaR a aeS 293 22 3 Analog inputs outputs ccceceecceceeeeeeeeeeeeeeenceeaeeeeeeeeeeeeeeeetsenteeaeees 296 22 3 1 Reading analog inputs outputs eee eee este eeeeeenteeeeeeenaes 296 22 3 2 Setting analog outputs 0 eee eee eet eee eeeeneeeeeeetaaeeeeeeeaaes 296 23 Assembler C
117. same variables in 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 variable names with symbols using define The Compiler uses variables H420 through H449 if this directive is not specified explicitly pragma initials Hmin Hmax Instructs the Compiler to assign the numbers Hmin through Hmax to the global variables declared with the initial key word Initial variables are variables HO to H127 which are stored when the power is switched off Exception HO to H15 for MDS MDV MCS MCV with cam disk The Compiler uses variables HO to H127 if this directive is not explicitly specified INFORMATION Since the variable range H360 to H450 for the technology options Synchronous op eration and Cam Disk is assigned other system variables we recommend that you always assign the auxiliary and global variables with the pragma directive in a differ ent range Example pragma var 350 365 pragma globals 130 160 pragma initials 10 30 long pos speed cw pos speed ccw initial long start position end position These lines cause the Compiler to use th
118. shifting with CamOutShiftLeft NOT the target variable defined with CamDestination CamF orceOff Mask to delete mandatory outputs the mask affects the internal data buffer prior to shifting with CamOutShiftLeft NOT the target variable defined with CamDestination CamForceOff dominates CamForceOn Manual IPOSplus Compiler Functions Standard functions Instruction type Standard structure Elements Brief description CamSource Bit 31 switches between preset reference variables and an indicator to a random reference variable Bit 31 0 0 encoder X15 motor encoder H511 1 encoder X14 external encoder H510 2 encoder H509 absolute encoder DIP11 3 virtual encoder all following values are reserved Bit 31 1 CamSource includes a pointer to one IPOSPUS variable 2 CamDestination Pointer to target variable The bits not used in the target variables are available for other functions if you shift the outputs by four to the left with Shift Left it frees up bits 0 3 bits 4 7 are available for the cam functions and bits 8 31 are available for any assignment If the cam outputs are assigned to unit outputs e g H481 you have to reserve these binary outputs with P620 P639 as IPOSPS outputs The bits not used in this word are available for other outputs
119. special case a statement can also be a block in which several state ments can be specified In this case the statement block must be enclosed by curly brackets statement block Without else branch With else branch With block as if branch if H1 3 H2 10 if CELL zb H2 LOs else H2 8 if H1 gt 3 H2 10 H3 11 With block as else branch if H1 gt 3 H2 9 else H2 10 H3 11 The expression may also be composed of several conditions which are logically inter linked Consequently logical AND amp amp and logical OR are available as logic op erations INFORMATION Potential problem A semicolon at the end of an if statement always makes the con dition true Example if Hl gt 3 amp amp H1 lt 12 H2 10 Manual IPOSplus Variable H2 is set to the value 10 if H1 is greater than or equal to 3 and is also less than or equal to 12 In other words H2 is set to the value 10 if the value of H1 is between 3 and 12 The internal brackets are not necessary but they increase the legibility of the program 16 197 16 198 Example 16 2 for 16 2 1 Syntax Example Example of a statement block Compiler Constructions for if H1 lt 2 H1 gt 14 H2 10 Variable H2 is set to the value 10 if H1 is less than 2 or greater than
120. system e Encoder feedback e Operating mode CFC or Servo amp IPOS IPOSPUS variables H360 to H450 are reserved for synchronous operation and should not be used in the application program see section 3 2 Overview of System Variables Synchronous operation is controlled using IPOSP S variables within an IPOSPUS 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 movement plan contains a constant incline phase synchronous operation oc curs as a special case in the electronic cam Manual IPOSplus 117 IPOSplus for MOVITRAC B Characteristics Requirements 10 10 IPOSP S for MOVITRAC B Characteristics 10 1 Requirements Units from the MOVITRAC B series can be ordered as standard units or as technology units Unlike MOVIDRIVE B the standard unit must first be enabled for IPOSP 4S pe fore you can start programming Enabling IPOS Hl in the standard unit 1 Open parameter tree 2 In the Unit functions setup parameter group set IPOS enable to ON MOVITOOLS MotionStudio Default Project Edit Network View Plugin Settings Window Help De RH Dn pp WE X Ct Scan 4 Bi Project 4 E Tool start page E Parameter tree Default MC07B0015 5A3 wi Defaut
121. the latter two cases the transfer must also be started with SCOMON or SCOMSTATE Data exchange is only possible via the system bus and it transfers all the content of the variables Data exchange within the inverter is not possible A standard CAN telegram 11 bit identifier is used instead of a SEW s own protocol MOVILINK so that the sys tem can also communication with non SEW products see the MOVIDRIVE Serial Communication manual In accordance with the consumer producer principle every unit can send objects to one or more units and receive objects from one or more units simultaneously The bus run time for a message is lt 2 ms and depends on the baudrate setting Com munication with MOVIMOT or the MQ fieldbus interface is not possible Command structure Mxxx Label optional Mxxx SCOM X1 X2 X1 TRANSMIT CYCLIC Cyclical send RECEIVE Receive TRANSMIT ACYCLIC Acyclical send X2 Hxx Start of object structure for communication and user data The design of the object structure is dependent on the first argument X1 SCOM TRANSMIT CYCLIC HO This command initializes cyclical transfer the object structure starts at HO SCOM TRANSMIT ACYCLIC H10 This command initializes a one off cyclical transfer the object structure starts at H10 SCOM RECEIVE H50 The command initializes the reception of data the object structure starts at H50 SCOM TRANSMIT CYCLIC HO SCOMON or SCOM TRANSMIT ACYCLIC HO
122. the transmission command 20 Free bus capacity in calculated value of this unit 1 Incorrect cycle time 2 Too many objects set up 3 Bus overload 5 Wrong object number 6 Wrong length SCTRACYCL ObjectNo H 0 Object number e g without CANopen profile as of 1024 Format H 1 Number of data bytes and data format DPointer H 2 Number of the variable H where the data to be sent begins Result H 3 Status of the transmission command 0 Ready 1 Transmitting 2 Transmission successful 10 Transmission error 231 17 232 Compiler Functions Standard functions If objects defined via SCREC are received via SBus1 or SBus2 this is signaled in the corresponding system variables H522 and H523 see System variable overview page 29 Bit 24 of the ObjectNo defines whether the data are transmitted or received with the CAN identifier bit O 10 via SBus1 or SBus2 Bit 24 0 SBus1 ObjectNo CAN_ID SCD_SBUS1 Bit 24 1 SBus2 ObjectNo CAN_ID SCD_SBUS2 only MDX B with DFC11B Unit specific characteristics Element MOVIDRIVE B Unit specific characteristics MOVITRAC B CycleTime H 1 Valid cycle times 1 2 9 ms numbe 10 20 65530 ms r of objects 15 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
123. them into operation Submit a complaint to the shipping company immediately in the event of damage Only qualified personnel observ ing the applicable accident prevention regulations and operating instructions are al lowed to perform installation and startup tasks During operation units with this type of enclosure may have live uninsulated and some times moving or rotating parts as well as hot surfaces Removing covers without authorization improper use as well as incorrect installation or operation may result in severe injuries to persons or damage to machinery Refer to the documentation for more information Manual IPOSplus Safety Notes Designated use 2 2 Designated use Use the positioning and sequence control system with IPOSPUS for the following units from SEW EURODRIVE GmbH amp Co KG e MOVIDRIVE B MOVITRAC B e MQx In addition the following discontinued products support IPOSPIus MOVIDRIVE A MOVIDRIVE compact MOVITRAC 07 2 3 Target group The IPOSP S user is a qualified person has been trained accordingly SEW EURODRIVE recommends that the user attends additional product training courses for units and motors that are programmed with IPOSPUs _ Any work related to installation startup and maintenance of the devices as well as trou bleshooting may only be performed by qualified personnel Observe IEC 60364 and CENELEC HD 384 or DIN VDE 0100 and IEC 60664 or DIN VDE 0
124. times lt 10 ms 0 10 20 65530 ms for cycle times 10 ms Valid offset times D 255 ms granularity 1 ms The following must apply Offset time cycle time lt 255 1 The cycle time must always exceed the longest offset time Number of data bytes and data formats Bit Value Function 01 3 0 8 Number of data bytes AT Reserved 8 0 MOTOROLA format 1 INTEL format 9 31 Reserved Comparison of MOTOROLA and INTEL format MOTOROLA format INTEL format CAN byte 3210 3210 012 3 012 3 Variable H 1 H H H 1 Var byte 3210 3210 012 3 012 3 Manual IPOSplus Compiler Functions Standard functions 17 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 sent or re ceived once In particular during further data exchange between the slaves you must ensure that the total calculated bus utilization does not exceed 70 The bus utilization is calculated in bits per second using the formula Number of telegrams x bits telegram x 1 cycle time For example 2 messages with 100 bits in 1 ms cycle 200000 bits s 200 kBaud This results in the following bus load percentage in reference to the selected baud rate F
125. to use the process data Parameters Explanation P100 Set setpoint source to RS 485 or SBus only if you want to use setpoint specification via process data communication P101 Set control source to RS 485 or SBus P870 876 Process data description see detailed description in the Communication and fieldbus unit profile manual Parameter P880 P890 SBus protocol must be set to MoviLink INFORMATION It is important when using the MOVLNK command that the permanently saved vari ables HO 127 and all parameters are not written cyclically with communication ser vice 2 non volatile because the number of save processes for the used memory medium is limited Manual IPOSplus Compiler Functions Standard functions INFORMATION With MOVIDRIVE B and MOVITRAC B the timeout monitoring is checked for tele grams received within the defined timeout interval With MOVIMOT the timeout monitoring is activated with the first received cyclic frames ML_FT at the sender Acyclical communication deactivates the timeout monitoring of MOVIMOT Once cyclical communication has been started with the _MovCommOn command only the _MoviLink command to address 253 internal is possible When using the _MoviLink command other units can no longer be accessed 17 3 15 MovCommDef Syntax Description Manual IPOSplus The _MovCommDef command can
126. unit current Mre relative torque based on 0 1 Iy My Rated torque of the motor Nm lan Rated Q current A for selected connection type The value is available in the operating modes CFC and SERVO VFC1 VFC1 amp hoist VFC1 amp DC braking and VFC1 amp flying start ACT SPEED EXT Actual speed of the external encoder X14 The following data structure is used H Time Base 5 ms 31 ms Mean value for speed detection of external encoder H 1 Encoder type 0 Encoder X14 1 DIP encoder H 2 Numerator 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 x 60 s x 60 min Incr per full load revolution x TimeBase The minus sign at H32 causes the direction of rotation to be reversed SET H30 30 SET H31 0 SET H32 11250 SET H33 384 SET H34 40 GETSYS H30 ACT SPEED EXT SPEED MON TIMER Numerator value of the speed monitoring The GETSYS command can be used as a prewarning for speed monitoring Speed monitoring is triggered when the current is at the current limit for the number of seconds specified in P501 For example if P501 200 ms the numerator
127. up regardless of the actual interrupt condition and a variable 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 corresponding request bit Sample The transport axis of a filling machine should head for a metering unit using DO01 when it moves past the position 5 on the machine The output should be deactivated 200 ms later irrespective of the speed and axis position 50 Manual IPOSplus Task Management and Interrupts Variable interrupts with MOVIDRIVE B Example solved in the Compiler Manual IPOSplus Required parameter settings P620 IPOS output P960 for example SHORT include lt constb h gt include lt iob h gt necessary parameter settings P620 IPOS output P960 for example SHORT VARINT hOPENvalve hCLOSEvalve fnTask3 Task 3 is only needed to activate VarInt H1 H1 dummy command fnOPENvalve Switch on metering unit Timer 2 0 Reset timer 2 to 0 hCLOSEvalve Mode 2 Activate stop IRQ _SetVarInterrupt hHCLOSEvalve fnCLOSEvalve _BitSet StdOutpIPos 1 Set DOOL fnCLOSEvalve
128. used Examples long a b Variables are available in the range long this _is_a_ variable defined for global variables long c d The Compiler assigns variables H420 to H424 to the identifiers a b this_is_a_variable c and d In the following example the pragma globals directive instructs the Compiler to assign variables H150 to H160 to the identifiers pragma globals 150 160 long a b long this ie a variable long c d Manual IPOSplus 191 14 192 Compiler Programming Indirect addressing pointer INFORMATION Multiple declarations of global variables are not allowed long a b C long d a It is a good idea to use the option of defining global variables when the number of the variable is not important for the application This is usually the case because the vari ables are accessed continually by symbols Furthermore global variable declaration un derlines the modularity and makes it easier to reuse modules Standard or user defined structures can be used as a recourse if variable groups are required e g for system functions For a description of the system variables H473 to H511 refer to the section Overview of the System Variables A list of system variables and their symbolic identifiers is given in the appendix 14 18 Indirect addressing pointer The designations HO to H511 are also allowed as variable names in order to ma
129. used for po sitioning The travel strategy for referencing is dependent on this setting Reference travel is started in the same way as for referencing without the modulo function When the modulo function is activated the H455 MOD ACTPOS variable is referenced If a reference offset is specified in P900 it is interpreted as being in the output unit scaling 216 360 Once reference travel is complete the current target position H454 MOD ACTPOS is set to the actual value MOD ACTPOS see section Referencing ACTPOS MOT H511 is not referenced The 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 2 360 A motor encoder has been entered as the IPOS 4S encoder P941 Source actual po sition MOTOR ENC X15 Modulo mode Short distance P960 SHORT standard setting Starting from the current actual position H455 MOD ACTPOS the system calculates the shortest route to the required target position H454 MOD TAGPOS The direction of ro tation is selected on the basis of the shortest route Target position that can be represented H454 MOD TAGPOS k x 360 0 360 k x 216 0 216 1 a INK H511 ActPos_Mot GA Z 1 k MOD ACTPOS 300 2 ia 0000 D554 MOD TAGPOS 410 0001 238E a a 2
130. when the MOV LNK command has been executed If two or more MOVLNK commands are called cyclically these must be processed in one task This process is mainly carried out for MOVIDRIVE B in task 2 or task 3 Manual IPOSplus Compiler Functions Standard functions Example 1 Other examples Parameter set tings for the sender master include lt constb h gt MOVLNK ml MLDATA mld main while 1 Initialize ml BusType ml Address ml Format ml Service ml Index ml DPointer _MoviLink ml structure ml ML BT ai RS 485 2 I ML_FT_PAR2 2 PD with parameter ML_S_RD Read 8300 0 lt lt 16 Index of the inverter status numof mld Target structure actual command call 17 8300 0 For further examples regarding the _MoviLink command refer to the following sec tions e Reading an internal unit parameter page 253 e Writing a variable via SBus page 254 e Reading a parameter via SBus page 255 Addressing via RS 485 No settings required Addressing via SBus Parameters Address Explanation P816 for the sender and the receiver The baud rate depends on the length of the bus cable and must be the same INFORMATION With RS485 networks there must only be one master In SBus CAN networks there may be several active masters see also _SBusCommDef command page 230
131. x A The programs in the window and in the unit are identical N The programs in the window and in the unit are NOT identical 512040331 21 6 Debugger The integrated debugger is a tool used to run through a program in single step mode Once the program has been downloaded to the inverter you can choose from three functions Manual IPOSplus 285 21 286 Assembler Editor Debugger 21 6 1 Execute to cursor 21 6 2 Single step Choose Run Run to cursor or the 4 icon in the toolbar to run the program up to the current cursor position Choose Run Single step or the 7 icon in the toolbar to process the program line in which the cursor is currently positioned Choose Run Skip or the vg icon in the toolbar to skip the program line in which the cursor is currently positioned The cursor jumps to the next program line This function is helpful if you want to skip function calls in a program for test purposes You can start the program by clicking the e 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 3 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 debugging process You can interrupt a running program by pressing Alt F5 The execution bar is now po sitioned at the command that i
132. 0 M31 CALL M35 JMP SS es L v M32 GETSYS H317 ACT POSITION ADD H317 4096000 M32 ASTOP IPOS ENABLE GOA NOWAIT H317 JMP UNCONDITIONED M30 M31 ASTOP TARGET POSITION RET Jog M40 JMP LO 10000100000000000 M41 JMP HI I10000010000000000 M41 CALL M35 JMP H319 M42 GETSYS H318 ACT POSITION SUB H318 4096000 M42 ASTOP IPOS ENABLE GOA NOWAIT H318 JMP UNCONDITIONED M40 M41 ASTOP TARGET POSITION RET Jog CW Move for as long as DI14 1 and DI15 0 Query Is software limit switch active Add 1000 motor revolutions to the current actual position and use the result as the new target position Jog CCW Move for as long as DI14 0 and DI15 1 Query Is software limit switch active Add 1000 motor revolutions to the current actual position and use the result as the new target position 24 4 24 4 1 Characteristics Table positioning sample program e Binary coded selection of 16 table positions e Binary coded output of the currently selected table positioning e Clear message when selected table position has been reached e Automatic movement away from hardware limit switches The first 4 binary inputs of the DIO11B option can be used for selecting 16 table posi tions travel variables HOOO H015 in binary coded format When a travel variable number is selected table pointer it is always represented at the first 4 binary inputs of the DIO11A in binary coded forma
133. 0 the loop is exited H1 0 while 1 H1 if H1 20 break if H1 gt 10 continue H2 H2 2 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 while 1 Statement This is because expression 1 always returns the value TRUE Task1 typically runs in an endless loop of this kind Loop statement while Expression do The do statement is a conditional loop in which the break condition is checked at the end of the loop As a result this loop with the do statement always performs at least one it eration at least one run through Manual IPOSplus Compiler Constructions do while First the statement is performed As a statement block it may also contain several statements This is followed by the test of whether the expression has the value TRUE not equal to zero or FALSE equal to zero If the value is TRUE the statement is per formed again otherwise the loop is exited The expression can also be made up of several logically interlinked conditions In contrast to the while loop the statement is always performed at least once in the do while loop INFORMATION Potential problem The while line always ends with a semicolon Example Manual
134. 0 increments CW and 400000 increments CCW In task 2 the actual speed is read and the amount of the actual speed is created The amount is stored in the variable 1Act SpeedAbsolute include lt constb h gt MOVIDRIVE A include lt iob h gt MOVIDRIVE B define SEKUNDE 1000 SSPOSSPEED tSpeed long lActSpeed lActSpeedAbsolute _GetSys lActSpeed GS_ACTSPEED Calculate absolute speed value if lActSpeed lt 0 lActSpeedAbsolute lActSpeed else lActSpeedAbsolute lActSpeed main Initialization Positioning speed 500 rpm tSpeed CW tSpeed CCW 5000 _SetSys SS POSSPEED tSpeed Activate Task 2 _SetTask2 T2_START Task2 Main program loop while 1 _GoRel GO WAT 400000 _ Wait SEKUNDE _GoRel GO WAIT 400000 _Wait SEKUNDE 252 Manual IPOSplus Compiler Examples MoviLink command 18 6 MoviLink command The _MoviLink command exchanges data or parameters between units via SBus or RS 485 It is also possible to read or change internal unit parameters The following three examples are to illustrate the function of the MoviLink command e Reading an internal unit parameter The set reference travel type is read via _MovilLink e Writing a variable via SBus If a MOVIDRIVE unit is connected via SBus variable H200 is written depending on the status of the binary input DI17 e Readi
135. 0000 Bit 7 DI11 mask 0b10000000 Bit 8 DI12 mask 06100000000 Bit 9 DI13 mask 0b1000000000 Bit 10 DI14 mask 0b10000000000 Bit 11 DI15 mask 0b100000000000 Bit 12 DI16 mask 0b1000000000000 Bit 13 DI17 mask 0b10000000000000 Bit 14 31 Reserved An input combination can be selected by setting the appropriate bits in the mask to 1 For example to query DIOO and DI03 mask must be 0b1001 Manual IPOSplus Compiler Functions Standard functions 17 function name Name of the event function Important In contrast to a function call only the name of the function without is specified here Example include lt constb h gt define DI02 0b100 DIO2 0b100 TerminalIsOne Statements of the event function main while 1 Main program loop task 1 _InputCall IC_HIGH DI02 TerminalIsOne if terminal DIO2 HIGH 1 call the function 17 3 13 _Memorize 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 Syntax _Memorize action Description Enables IPOSP Us programs and or variables to be saved or loaded in or from the non volatile memory EEPROM on the unit The action is specified via the argument Key points action Constant expression for action action can adopt one of the following values MEM_NOP No data is saved MEM_STALL Saves pro
136. 0000000000101 0b000000000 0000100 After the AND command H01 4 Example 2 The position within a motor revolution is to be determined from the posi tion of the motor encoder SET H01 H511AND H01 amp OxFFF After the AND command H01 has a value between 0 and 4095 OR The OR command performs a bit by bit OR operation between a variable and a second variable or a hexadecimal constant Command structure Mxxx Label optional Mxxx OR X1 X2 X1 Variable result and output value X2 Variable or constant output value OR HXX HYY Variable HXX is the bit by bit OR operation of variables HXX and HYY OR HXX K Variable HXX is the bit by bit OR operation of variable HXX and a constant K Example SET H01 12SET H02 10R 0b0000000000001100 0b000 H01 H02 0000000000001 0b000000000 0001101 After the OR command H01 13 304 Manual IPOSplus Assembler Commands Arithmetic commands 23 XOR The XOR command performs a bit by bit XOR operation between a variable and a sec ond variable or a hexadecimal constant Mxxx Label optional X1 Variable result and output value X2 Variable or constant output value Command structure Mxxx XOR X1 XOR X2 XOR HXX XOR HYY Variable HXX is the bit by bit XOR operation of variables HXX and HYY XOR HXX XOR K Variable HXX is the bit by bit XOR operation of variable HXX and a con stant K Example SET
137. 000SET H02 0x0000C350 0x0000C350 0 50000MUL H01 H02 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 The DIV command divides a variable by a variable or a constant observing the signs The result is the predecimal number of the quotient Command structure Mxxx Label optional Mxxx DIV X1 X2 X1 Variable dividend and quotient X2 Variable or constant divisor DIV HXX HYY Variable HXX is the result of the division of variables HXX and HYY DIV HXX K Variable HXX is the result of the division of variables HXX and a constant K Example SET H01 13SET H02 3DIV H01 H02 After the DIV command H01 A Note Division by zero leads to an undefined result There is no error message 23 3 2 Auxiliary arithmetic functions NOT MOD NOT Manual IPOSplus The command negates the entire content of a variable bit by bit Command structure Mxxx NOT X1 NOT X2 Mxxx Label optional X1 Variable Result of the operation X2 Variable output value NOT HXX NOT HYY Variable HXX negates the variable HYY bit by bit In this way the hexa decimal sum of HXX and HYY OxFFFFFFFF Example SET H02 1NOT H01 NOT 0x00000001 OXFFFFFFFE H02 After the NOT command H01 2 23
138. 09 Current actual position SSI absolute encoder DIP11A option H455 Current actual position motor encoder in modulo format H376 Current actual position master value only for the technology functions electronic cam 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 Compiler _GetSys CamArray GS_CAM Initializes the cam controller and generates the status of all outputs with the data struc ture as of the variable CamArray Assembler GETSYS Hxx CAM Initializes the cam controller and generates the status of all outputs with the data struc ture as of the variable Hxx The expanded cam function is configured with the help of two data structures i e the CamControl structure and the CamOutput structure The CamControl structure controls the global behavior of the expanded cam function The CamOutput structure is used to define an output output of the cam disk and may be required up to eight times Manual IPOSplus Position Detection and Positioning Cam controllers SEW standard structure GSCAM_EXT Manual IPOSplus Variable Name Description H 0 CamState Bit 3
139. 1 must always be set otherwise processing in the firmware stops 0x8000 0000 function inactive no new cam outputs will be gener ated set outputs will be retained and only deleted after a reset or voltage off on 0x8000 0001 function active but all cam outputs will be turned off e 0x8000 0002 function active if drive is referenced H473 Bit20 0x8000 0003 function active even without referenced drive Hai CamReserved1 Reserved H 2 CamOutShiftLeft Shifts the internal data buffer of the outputs by n digits to the left prior to writing to the target variable H 6 NOTICE The shifting process will delete the information of the upper outputs This means that if the shift factor is 3 the upper 3 outputs with 4 ms cycle time are no longer available and the 4 outputs with 1 ms cycle time are assigned to bits 3 6 and the output with 4 ms cycle time is assigned to bit 7 H 3 CamForceOn Mask to force mandatory 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 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
140. 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 1000 _MoviLink tBus Manual IPOSplus Compiler Examples MoviLink command 18 6 3 Reading a parameter via SBus Manual IPOSplus Process data configuration of inverter connected via SBus is written to variable 1PDData in task 1 The received values correspond to the following process data configuration PARAM 1PD 1PD PARAM 2PD 2PD PARAM 3PD 3PD PARAM 6PD PARAM 10PD oOo OD JO UI PF GA MM H CO Il include lt constb h gt include lt iob h gt Definition of MOVLNK structures MOVLNK tPD MLDATA tData Definition of variables long 1PDData 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 DPointer numof tData data buffer Main program loop while 1 Read PD configuration _MoviLink tPD 1PDData tData ReadPar 18 255 Compiler Examples SCOM communication 18 18 7 SCOM communication The following example shows a program that sends two variable
141. 110 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 transportation storage operation and waste disposal must be carried out by qualified personnel who are appropriately trained 2 4 Programming errors Manual IPOSplus The IPOSPUs positioning and sequence control system allows you to adjust the IPOSPIUS Units to meet the exact specifications of your application As with all position ing systems there is however the risk of a programming error which may result in un expected although not uncontrolled system behavior 17 3 3 1 3 1 1 System Description Introduction System Description Introduction The basic functions and options of IPOSPUS Units ensure that the program is no longer only an open loop speed controller In fact the positioning and sequence control system integrated in MOVIDRIVE can often take a great deal of the load off the machine controller PLC or maybe even re place it Reducing the central control offers SEW customers significant potential savings in terms of hardware and the complexity of electrical installation The programming work is divided between the PLC and inverter control However users must familiarize themselves with the system This in
142. 16 kB s Task 3 must not be used The program code programmed in task 3 is not executed No feedback is given on this e Unsupported functions cause error 10 IPOS ILLOP The IPOS Compiler is not aware of these differences i e the complete MOVIDRIVE B functionality is provided Manual IPOSplus Refer to the following sections for a detailed description of the differences e Overview of commands for standard functions page 205 Technical data page 25 for MOVITRAC B Position detection page 98 with MOVITRAC B 119 11 120 IPOSplus for MQx Characteristics Introduction IPOSP US for MQx Characteristics Introduction In the same way as for MFx modules modules of the MQx series allow a cost effective fieldbus interface to MOVIMOT drives In addition the MQx modules are equipped with control functions that help you determine how the drive responds to external input via fieldbus and integrated I Os This allows for example sensor signals to be processed directly at the fieldbus interface or allows users to define their own communication profile via the fieldbus interface 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 realize
143. 17 mask 0b10000000000000 Bit 14 31 Reserved 243 Compiler Functions Standard functions 17 An input combination can be selected by setting the appropriate bits in the mask to 1 For example to query DIOO and DI03 mask must be 0b1001 Example include lt constb h gt main _WaitInput 1 0b100 as long as terminal DI02 HIGH 1 wait 17 3 30 _WaitSystem Syntax _WaitSystem event Description The function waits for as long as a system related event is present The required event is given as an argument Key points event Constant expression that specifies when the function waits This expression can adopt one of the following values SC_UC Unconditional SC_NO When the speed is zero SC_N When the speed is not zero SC_NOTPOS If not in position SC_TP1 If there is an edge change at touch probe terminal DIO2 SC_NTP1 If there is no edge change at touch probe terminal D102 SC_TP2 If there is an edge change at touch probe terminal DIO3 SC_NTP2 _ If there is no edge change at touch probe terminal DI03 Example main _WaitSystem SC_NO as long as speed zero wait 17 3 31 _WdOff Syntax _WdOFE Description The watchdog is switched off Argument The command does not have an argument Example main WdOFF 244 Manual IPOSplus Compiler Functions Standard functions 17 17 3 32 WdOn Syntax _WdOn time Description Sets the value
144. 23 The length of a variable corresponds to 4 bytes This means for a data length of 8 bytes two consecutive variables are transmitted Receiver settings HIPOSplus ASSEMBLER MOVITOOLS ioj x e Edit Program Run Help d EAI EE ECH 7 S Numerator 4036 Denominator fi Unit hun Eise RECEIVE 0 SCOMON Objectno 1025 MO JMP UNCONDITIONED TER 8 END D Pointer 5 E app 2 03 i Program text modified Z 3 SBus address fa 6 SBus baud rate kBaud 500 X 514591883 HO 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 MOVIDRIVE B you must ensure that in the POS ue program of the master drive the actual position is initialized first and then the sync ob ject with SCOM 23 5 5 SCOMON System Bus Communication On This command triggers the reception of data or the cyclical transmission of previously defined data objects The SCOM command initializes the data objects with the arguments RECEIVE receiv ing data or TRANSMIT CYCLIC sending 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 INFORMATION This command only activates SBus 1 not SBus 2 e Preferably use the SCOMSTATE comman
145. 230 17 3419 SBusCommoOn EE 234 17 3 20 _SBusCommState e a a a a a i iai 234 17 3 21 _Setlnt rr pt ENNEN ENER aerie aine iae naaran aada E aia ae 235 Re s SetSY Se a a aa a laa tee eo a aar a ences 236 UR ES KEE 238 TES EE 239 17 3 25 _SetVarlnterrupt ccc ccc ae N 240 17 3 26 _SystemCalll ectara 241 17 83 27 TOUCMPIODG ii sesg eiis cetpaticads aad eects Meade dee eege 242 TES 26 gt Walt egestas ties tee saeco tae aes tee a EE 243 Re GC WEE ul 243 CC EE 244 et NEE ee ad ees ee 244 1392 MN Elte ee eege A 245 18 Compiler Examples enger ian eege Seb thls ENEE EE ENEE 246 18 1 Setting bits and output ferminals cece eee eee eeeeteeeeeeettaeeeeeeeaas 246 18 2 Clearing bits and output terminals cc eeeeeeeeeeeeeeeeeeeeeneeeeeeeeeenaees 247 Manual IPOSplus 10 Contents 19 20 21 18 3 Querying bits and input terminals 2 0 0 ec eeeeeeeeeeeeeeeeteeeneeeeeteeeaeees 248 18 3 1 Testing single Dits nanii nar aE E ae 248 18 3 2 Testing several DiS lt arere s aa A EERIE R RAIA 248 18 4 Querying an edge aiiis ra a EEEa ii 249 TEL Example Tlia ae a ee 249 18 44 27 Eegen erated sea e Seed Ee beeen ce ae 251 185 Valie of a MUMDOR erei EA EE AT 252 18 6 MOoviLink commande 253 18 6 1 Reading an internal unit parameter seeeeeeeeeeeeeeeeeneeeeeneeee 253 18 6 2 Writing a variable via SBUS 0 0 0 eeceeeeeeeenteeeeeeeneeeeeeeenas 254 18 6 3 Reading a parameter via Gbus 255 18 7 S
146. 24 2 9 Program source code with remarks NUMERATOR 2048000 UNIT mm kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk DENOMINATOR 15708 Program hoist With the first 3 inputs of the option DIO11A the drive moves to position 0 1000 2000 File Hub 100 mdx Author SEW AWT Date 01 06 98 Changed 01 06 98 Terminal wiring of inputs DIOO Controller inhibit DIO1 Enable DIO2 Reset move LS clear DIO3 Reference cam DIO4 CW limit switch DIO5 CCW limit switch DI10 Hoist position D mm DILL z 1000 mm DI12 VW 2000 mm DITZ e DI14 Jog CW DI15 Jog CCW DI16 Reference travel DI17 Start positioning Terminal wiring of outputs DBOO Brake DO01 Ready signal DO16 IPOS in position DO17 IPOS reference Comment SETINT ERROR M10 M100 CALL M50 JMP LO I0001000000000000 M101 CALL M20 M101 JMP LO I0000010000000000 M102 CALL M30 M102 JMP LO I10000100000000000 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 M10 JMP HI I0000000000110000 MI M3 JMP HI I0000000000110000 M2 ASTOP IPOS ENABLE JMP UNCONDITIONED M3 M2 ASTOP TARGET POSITION M1 RET Reset move clear of limit switch If drive has
147. 276 Manual IPOSplus Assembler Introduction Setting the user travel units 20 INFORMATION If the numerator or denominator are non integer values the conversion can be made more accurate if both numerator and denominator are multiplied by the same expan sion factor e g 10 100 1000 etc Doing so will not limit the travel range Travel distance factor NUMERA TOR Travel distance factor DENOMINA TOR Example Example Example A mm Number of increments the motor moves to travel a defined distance Setting range 0 rie 231 4 Defined travel distance in user travel units Setting range 0 Tess 231 41 12376 increments correspond to 120 mm NUMERATOR 12376 DENOMINATOR 120 UNIT mm The following three examples will demonstrate how the travel factors numerator denom inator of a linear unit are set for position specification e Example A Position specification in mm for the linear axis e Example B Position specification in increments e Example C Position specification in output revolutions Mechanical structure of the linear unit d 100 mm x mm lt gt 511398411 The defined distance to be calculated is one revolution of the driven gear e Travel distance factor NUMERATOR Increments motor revolution x gear ratio i 4096 x 4 16384 e Travel distance factor DENOMINATOR Output diameter x Tr 314 15926 The travel distance factor DENOMINATOR is n
148. 3 2 X61 2 X61 2 Bit 9 8 DO12 X23 3 X23 3 X23 3 X61 3 X61 3 Bit 10 9 DO13 X23 4 X23 4 X23 4 X61 4 X61 4 Bit 11 10 DO14 X23 5 X23 5 X23 5 X61 5 X61 5 Bit 12 11 DO15 X23 6 X23 6 X23 6 X61 6 X61 6 Bit 13 12 DO16 X23 7 X23 7 X23 7 X61 7 X61 7 Bit 14 13 DO17 X23 8 X23 8 X23 8 X61 8 X61 8 Bit 15 14 X61 1 15 X23 1 X61 2 16 tet X61 3 17 X23 8 X61 4 18 X61 5 19 X61 6 20 X61 7 21 X61 8 522 RecStatS1 Status word for receiving SCOM data objects double words via the system bus SBUS1REC A receive bit is reserved for each data object set up using _SBusCommDef SCOM The first receive object initialized in the IPOS program is assigned bit 0 the second one bit 1 etc When MOVIDRIVE receives a telegram from an initialized receive object the corresponding bit is 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 receipt of an object To reset the bit use the BITCLEAR com mand so that receive bits in other transfers are not lost 523 RecStatS2 Only with CAN bus via DFC11B Status word for receiving SCOM data objects double words via the SBUS2REC CAN bus A receive bit is reserved for each data o
149. 3 8 4 SETSYS The following example illustrates the principle of this process MO SETINTERROR M01 JMP UNCONDITIONED MO Mo ADD HO 1 RET END HO counts up as long as the unit error still occurs After the fault reset HO contains the value from the EEPROM for example 0 The value from the working memory calculated during the error is lost The SETSYS command writes the value 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 startup In particular changes to positioning ramps and the maximum current must be adapted to the features of the system to preclude the risk of damage and haz ards e g due to mechanical overload Label M Condition type wn d Variable H Help POS SPEED DOC Cancel OVERRIDE ON BRAKEFUNC ON 516336139 Manual IPOSplus Assembler Commands Set commands Structure Manual IPOSplus Command structure Mxxx Label optional Mxxx SETSYS X1 X2 X2 Number of the first source variable X1 System values that can be selected The internal fixed setpoints parameter
150. 38 P939 task 3 will perform additional commands 20 40 commands ms is the typical number of commands for task 3 The absolute resource requirements for command processing is ca 20 40 lower in task 3 compared with task 1 or task 2 Application components for which 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 e Rapid time critical processes e Calculations e Monitoring for system values e Communication with the SEW operator terminals e Copying variables cyclically to the oscilloscope variables H474 H475 e Formatting the fieldbus SBus process data with a machine control function or another MOVIDRIVE In this way IPOSP 4S also performs these functions when the interrupt routine is active in task 1 Note that in contrast to task 3 the processing time per command in task 2 is determin istic Manual IPOSplus Task Management and Interrupts Interrupts 5 4 4 Example 5 5 Interrupts Manual IPOSplus MOVIDRIVE B positions a travel drive A PLC controls MOVIDRIVE via a fieldbus Change the individual parameters directly on MOVIDRIVE using SEW keypads Proposed solution Task 1 Programming the motion sequence Task 2 HMI communication with the operator termina
151. 486 define Timer_2 H487 define Timer_1 H488 define Timer_0 H489 define WdogTimer H490 define SetpointPos H491 define TargetPos H492 define PosWindow H493 define LagWindow H494 define LagDistance H495 define SLS right H496 define SLS left H497 define RefOffset H498 define SetpPosBus H499 define Reserve6 H500 define Reserve7 H501 define TpPos2_ Abs H502 define TpPosl_ Abs H503 define TpPos2_Ext H504 define TpPos2 Mot H505 define TpPosl_ Ext H506 define TpPosl Mot H507 define Reserves H508 define ActPos Abs H509 define ActPos Ext H510 define ActPos Mot H511 endif The actual structure of the header file starts with ifndef CONST_H after a general re mark section This ifndef instruction is at least always accompanied by an endif You can find this endif 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 the header file is processed during compilation by the include lt const h gt command the ifndef _CONST_H query is initially answered in the affirmative because the _CONST_H macro identifier has not yet been enc
152. 509 H453 a Bae Bit 1 1 EXT O H510 wert H511 Hase mob a P961 x P963 P941 Actual position source P961 Modulo numerator P962 Modulo denominator P963 Modulo encoder resolution H509 Current actual position absolute encoder H510 Current actual position external encoder H511 Current actual position motor encoder H453 Modulo control H455 Actual modulo position output H456 Modulo numerator 476895243 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 IPOSPYS encoder and cannot be used for modulo positioning INFORMATION The following examples use the modulo value 360 It is also possible to scale to a different physical value other than a modulo value Manual IPOSplus 75 Position Detection and Positioning Modulo function The diagram below shows the relationship between the current position of the IPOSPlus encoder for example the motor encoder H511 and the actual position in the modulo representation The actual modulo position always moves within the output unit for ex ample from 0 0 increments to 360 216 increments INK 4 H511 ActPos Mot GA Z Ee e zg ne H455 ModActPos ag yar a per ao mg ag et
153. 510 old H510 difference H511 new H511 old H511 difference e Calculate the quotient from H511 difference divided by H510 difference Set the parameter P944 Encoder scaling ext to the value that is closest to the calculated quotient Important The encoder scaling directly affects the parameters P900 reference offset page 123 P942 encoder factor numerator page 134 and P943 encoder factor de nominator page 13 Ajas well as the parameter group P92x IPOS monitoring All posi tions of the IPOSPUS 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 The external encoder must always provide fewer pulses than the motor encoder If this is not possible contact SEW EURODRIVE 12 5 5 P945 Synchronous encoder type X14 Setting range TTL SIN COS HIPERFACE Enter the used encoder type here Possible encoder types are e TTL Encoder with digital rectangular output signal TTL level 0 V 5 V with negated tracks encoder with signal level according to RS422 e SIN COS Encoder with analog sine shaped output signal 1 Vss HIPERFACE Encoder with designation AV1H AS1H ES1H EV1H SEW encoder type Startup parameters encoder type encoder PPR count ES1S ES2S EV1S EH1S SINE ENCODER 1024 AV1Y SINE ENCODER 512 ES1R
154. 836 Modulo numerator P 962 Index 8837 Modulo denominator P 963 Index 8838 Modulo encoder resolution INFORMATION To use the modulo function the peripheral condition of the product of modulo encoder resolution and modulo numerator lt 231 must be fulfilled Variable no Name H453 MODULOCTRL H454 MOD TAGPOS H455 MOD ACTPOS H456 MODCOUNT Manual IPOSplus 79 Position Detection and Positioning Modulo function 6 7 4 Project planning Definition of drive unit e Gear unit and the additional gear make up the output unit 360 e Determine the maximum target position in Number of drive units e Determine 16 bit or resolution encoder x modulo numerator for 360 l Determining the SHELL modulo parameters e Modulo function P960 select travel strategy e Modulo numerator P961 e Modulo denominator P962 e Modulo encoder resolution P963 Resources for determining the number of teeth in the gear unit e SEW Technical Manual SEW Wingear program to reduce the numerator denominator factors l Modulo range of representation and maximum output position Condition for the range of representation Modulo encoder resolution x modulo numerator lt 231 e Condition for maximum output position 231 modulo encoder resolution x modulo numerator If this condition is not met it can lead to positioning errors l Realiza
155. 9 106 r 107 if 108 Ld 29 001 X21 oe 5 002 Al sig 003 ch 004 Ll e 005 MEY 0 06 T 29 007 39 0 08 DI 49 UI s i x22 M eld Dei d gei D De eno J109 TP 29 TH 319 x23 H 49 M oe D i r 6 il ag 24 v _ E o CW limit switch CCW limit switch Position 1 Position 2 Position 3 Al21 Al22 AGND AOV1 AOC1 AGND AOV2 A0C2 AGND DI1 DI11 DI12 DI13 DI14 DI15 DI16 DI17 DCOM DGND D019 D011 D012 D013 D014 D015 D016 D017 24VIN DIO11B DI16 DI17 DO10 DO16 DO17 MOVIDRIVE 516945803 Start reference travel Start positioning Malfunction IPOS IN POSITION IPOS REFERENCE Manual IPOSplus Assembler Examples Hoist sample program 24 2 5 Setting parameters relevant to the example Group Parameter Setting 30_ Limits P302 Maximum speed 1 rpm 1500 P350 Change direction of rotation OFF 60_ Binary inputs basic unit P600 Binary input D101 ENABLE STOP P601 Binary input D102 RESET P602 Binary input D103 REFERENCE CAM P603 Binary input D104 LS CW P604 Binary input DIO5 LS CCW 61_ Binary inputs DIO11 option P610 Binary input DI10 IPOS INPUT P617 Binary input D117 IPOS INPUT 63_ Binary outputs DIO11 option P630 Binary output DO10 FAULT P636 Binary output DO16 P637 Binary output DO17 IPOS IN POSITION IPOS REFERENCE 7__ Control functions P700 Operating mode CFC amp
156. 903 determine the reference travel be havior The argument is a combination of 3 characteristic properties C U W NW ZP CAM re sulting in 8 selection options RESET can be used to interrupt reference travel G00 SIE Label M Condition type c w ZP zl Help Cancel HEE 514597259 Cc conditional Only performs reference travel if the drive has not been referenced already that is H473 Bit 20 0 U unconditional Always performs reference travel Ww wait Waits until the axis has been referenced No other task is performed in the mean time NW non wait The next 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 is reset and the message Axis in position is set Parameter settings P60_ If a reference cam is used one input must be set to the REFERENCE CAM function P900 Reference offset writes H498 P901 Reference speeds P902 P903 The reference travel type and the argument ZP CAM determine the condition required to end reference travel Example P903 1 GOO U W ZP
157. 96x IPOSplus modulo function 12 Sets the baud rate of the connected CAN encoder 12 7 P96x IPOSP 4S modulo function The IPOSP4S modulo function is used for endless positioning for example with circular indexing tables or chain conveyors Refer to the IPOSP 4S manual for detailed informa tion 12 7 1 P960 Modulo function Setting range OFF SHORT CW CCW e OFF The modulo function is deactivated e SHORT The short travel modulo function is active The drive moves from the actual position to the target position taking the shortest possible route Both directions of rotation are possible e CW The CW modulo function is active The drives moves from its actual position to the target position with a CW direction of rotation even if this means moving a longer distance The CCW direction of rotation is not possible e 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 2311 Simulation of the gear unit by entering the number of teeth of the gear unit and the ad ditional gear Modulo numerator Numerator gear unit i x numerator additional gear i 12 7 3 P962 Modulo denominator Setting range 0 1 SA Simulation of the gear unit by entering the number of teeth o
158. A MCV MCS MCFsoftware version 14 MCH as of software version 13 and MDx_B Is available for CFC or Servo 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 background and do not depend on the cycle time of the IPOSP 4S program Assign useful values to the data structures prior to their first invocation 89 90 Position Detection and Positioning Cam controllers Starting the expanded cam control Data structure of the expanded cam control Any changes in the data structure will be adopted every 1 ms This step changes the limits of a position window during the execution time these will be considered during the next processing cycle of the cam This option makes it possible to use other cam areas for the return travel in case of a reversing axis All outputs can be stored contiguously from any bit of a variable It is possible to set outputs i e to fix their setting to 1 or O in the program The reference value can be set typical reference sizes are H511 Current actual position motor encoder H510 Current actual position external encoder H5
159. BLE2 IHIPOSplus ASSEMBLER MOVITOOLS WER loj x File Edit Program Run Help ep Rss SE i ala Numerator 4036 Denominator fi Unit hun Identifier Yalu H488 TIMER 1 H489 TIMER 0 H490 WD TIMER H491 SETP POS H492 TARGET POS H493 POS WINDOW H494 LAG WINDOW H495 LAG DISTAN ASTOP IPOS ENABLE Goo C W ZP TOUCHP ENABLE2 GOR NOWAIT 100 turns H496 SLS RIGHT JMP TP2 HO H497 SLS LEFT JMP NOT IN POSITION M1 H498 REF OFFSET JMP UNCONDITIONED M2 H499 SP POS BUS SET H10 40960 H500 reserved ADD H10 H505 H501 reserved GOA WAIT H10 H502 TP POS2ZABS H503 TP POS1ABS H504 TP POS2EXT H505 TP POS2MOT H506 TP POS1EXT H507 TP POS1MOT WAIT 2000 ms TOUCHP DISABLEZ GOA WAIT 0 turns H508 reserved WAIT 2000 ms H509 ACTPOS ABS JMP UNCONDITIONED M3 H510 ACTPOS EXT GbOOoOooOooOooOo0oOo0oOo0oOo0oOo0oOo0oOo OO H511 ACTPOS MOT w l 0 8 25 Program text modified a 516738571 Manual IPOSplus Assembler Commands Special unit commands Example 2 WDOFF WDON WATCH DOG OFF ON Structure Manual IPOSplus As an alternative to the example above a program branch jump flag M100 can be ex ecuted when the touch probe position is reached This is achieved using the SETINT TOUCHP1 M100 command File Edit Program psTor START EHS HE Numerator 4036 Denominator f1 Unit ASTOP IPOS ENABLE Goo C W ZP SETINT TOUCHP1 M100 MO
160. C for MCH or MDxB Calculated Curves with MCH 1 Applies if parameter P101 is set to RS485 Fieldbus or SBus Manual IPOSplus 237 Compiler Functions Standard functions The following standard SEW structures are available for the _SetSys statement Instruction type Standard structure Elements Brief description _SetSys SSPOSRAMP 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 SSPIDATA3 Len Number of the process input data to be transmitted DI Process input data 1 DI Process input data 2 PI3 Process input data 3 SSPIDATA10 Len Number of the process input data to be transmitted DI Process input data 1 DI Process input data 2 PI3 Process input data 3 DA Process input data 4 PI5 Process input data 5 PI6 Process input data 6 PI7 Process input data 7 DIS Process input data 8 PI9 Process input data 9 PI10 Process input data 10 1 Applies if parameter P101 is set to RS485 Fieldbus or SBus Example 17 3 23 _SetTask Syntax Description Argument main Set the speed control operating mode HO 11 _SetSys SS _OPMODE HO _SetTask control word function name This function is used to determine a user defined function as a task and to start or stop this task The name of the funct
161. COM Communication nese nn a a A 256 TITI RECEVON TEE 256 Le ebe a a EAEE T O E Se ee 257 18 8 Touch probe interrupt Drocessing 258 18 9 State machine fieldbus control with emergency mode cee 261 189 1 Mode seccce ha sececcteescndeceeseudda cave ela deceeh aA ANTEE AAA aN 265 189 2 Modert iiser EEE E E EE Eege 265 193 MOOD Bor eege EE I ee 265 EE Mode EE 265 18 10 Compiler programming frame cccceceeceeeeeeeeeeeeeeeeeeeeeeeeeeeaeeeeeeeeaeees 266 Compiler Error MeSSages cccccecssseceeeeeeeeeeeeeeeeeeeeeeeeeseneeeeesseeneeeenseeeeeeeness 275 Assembler Introduction cccsceccccesseeeeeeseeseeeeeeeeeeeeeeseeseeeeeeseeeesseenseenessnees 276 20 1 Setting the user travel UNITS 2 0 eee ee eeteeeeeeeeetneeee eee EEANN 276 20 1 1 Travel distance factors NUMERATOR DENOMINATOR 276 20 4 2 UNIT einni daea a ae ns 278 AER DEE 279 20 2 1 Starting the IPOSP 4S Assembler cccccccsesesseseeeseeeeeees 279 20 2 2 Creating a new program 280 20 2 3 Compiling and starting the program 281 Assembler Editor ciscccicevecccccieccetsccte case teeta reeeh setts cepansceteceseuvscetversscncceeseeuvaeccee 282 211 Example vec tates ede Jeeves cee aed EEN den 283 21 2 Ciel e CIE 283 21 2 1 Inserting command Ines 283 21 3 Compiling and downloadimg 284 21 4 Starting stopping programS eects sees etieeeeeeeteeeeeeeeneeeeerees 285 21 4 1 Variable window 285 215 File umit COMPAMSOM enges bec
162. COMPARE EQUAL Structure Example 1 Example 2 CPGE COMPARE GREATER OR EQUAL Structure Manual IPOSplus A variable is compared with a 2nd argument variable or constant The following com parisons are possible e Equal to CPEQ e Greater than or equal to CPGE e Greater than CPGT e Less than or equal to CPLE e Less than CPLT e Not equal to CPNE The result can be processed further with a subsequent jump command The CPEQ command compares observing the signs whether variable X1 is the same as 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 Command structure Mxxx Label optional Mxxx CPEQ X1 X2 X1 Variable result X2 Variable or constant SET HO 13 SET H1 CPEQ HO H1 After the program has been processed HO has the value zero and H1 the value 50 SET HO 13 CPEQ HO 13 After the program has been processed HO has the value one The CPGE command compares observing the signs whether variable X1 is greater 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 further for example with a subsequent jump command Va
163. Cancel Help 483423627 You can use the insert tool to select various C constructions system functions and pre defined structures When you select a system function you have to enter the arguments of this function in the group box to the right of the window Use Add to insert the rele vant command to the position 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 lect the term in question in one of the two lists and press the lt F1 key gt or the Help but ton You can activate the help function from the source text by placing the cursor on the key word _Wait and pressing the lt F1 gt key INFORMATION The Compiler is case sensitive which means that there could be 2 different variables for MYVAR and myvar Manual IPOSplus Compiler Editor First steps 13 13 2 4 Step 4 Compiling and starting the IPOSP S program Compiling the pro gram Manual IPOSplus In this chapter you will compile the program you created in step 3 load it into IPOSPlus and run the program To generate a program in a form that the inverter c
164. Command syntax lt Argument 1 gt lt Operator gt lt Argument 2 gt lt M yy gt Jump destination label only used with jump commands Second argument not used in all com mands Operator only used in arithmetic com mands First argument used in all commands Command defines the operation to be performed used in every command line Jump address label can be inserted in every command line The write command for variables and indices distinguishes between non volatile and volatile storage The variables HO H127 can be written and stored using both func tions H128 H511 can only be stored in the volatile memory Variables HO H127 are always stored 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 When using the MEM command note that the variables stored in the non volatile mem ory HO 127 and all parameters are not written cyclically This is because the num ber of storage operations with the storage medium EEPROM is restricted to 10 stor age operations Manual IPOSplus Assembler Programming Binary inputs outputs 22 22 2 Binary inputs outputs 22 2 1 Binary inputs Direct query The terminal level of
165. D 329 23 7 2 Subroutine call CALL orr AEREA 329 23 7 3 Jump commands MP 330 23 7 4 Loop commands LOOP ssssssessssesseerrnrrrnnnenssreertenrrnnnrnnnenee 332 23 7 5 No Operation NOP remark REM return RET TASK TASK2 wait WAT 333 23 6 e ul En EE 336 23 8 1 Copy variableS COON 336 23 8 2 Read system values GET 336 23 8 3 Set commands variable SET fault response GEIER Indirect addressing SETI Interrupt SETINT system values GET 339 23 9 4 SETS d a areceisian gist a ea tate delet aba deae atta Ea naaa leaped hea 344 23 8 5 gt MARINE enee EE dee 347 23 9 Special unit commande rannent 349 23 9 1 ASTOP MEM TOUCHP WDOFF WDON ee 349 23 10 Comparison Commande 355 23 10 1 Comparison operations CPEQ CPGE CPGT CPLE CRINGE CRN Big tities teaver te A ag te each Ee te 355 23 10 2 Logical operations ANDL ORL NOT 358 Assembler Examples sinine naaa nananana ana naaa ee iaa Emea aani aaea eanan Saaana 360 24 1 Flashing light sample program sseseesessesiireseerrrssetirrsssrrrsssrerrrsssrrrnn 360 24 1 1 Sample Controller A 360 24 1 2 Sample Positioning eee eeeeneeeeeeeeeneeeeeeeseeeeeeeeaas 361 24 2 Hoist Sample program 362 CN HR elen ET 362 242 2 SOUINGS oo shes tenes AAS E dash anes ated eta es 362 24 2 3 Schematic Structure ccc ceeeeeeeeceeeeceeeeeeeeeeeseeeeceseceeaeeeeeees 363 24 2 4 Terminal Wiring ccccccceeeeeeeeeeeeeeneeeeeeeeaeeeeeeeeaeee
166. DO13 DIO11B IPOS output Variable pointer bit 2 3 0 DO14 DIO11B IPOS output 0 DO15 DIO11B IPOS output Table position valid 0 DO16 DIO11B IPOS in position Drive in positioning window 0 DO17 DIO11B IPOS reference Reference travel successfully completed 374 Manual IPOSplus Assembler Examples Table positioning sample program 24 4 5 Program source code with remarks NUMERATOR 1 DENOMINATOR 1 UNIT Inc kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk Program Table positioning File Tab mdx Author SEW AWT Date 01 06 98 Function Table positioning The first 4 inputs of the DIO11 option are used to select the positions in the Input DI17 X22 17 is used to enable the selected travel command Parameterization of inputs outputs In inverter commas specified function without inverted commas IPOS INPUT OUTPUT Terminal wiring of inputs DIOO Controller inhibit DIO1 Enable DIO2 Error reset move LS clear DIO3 Reference cam DIO4 CW limit switch DIO5 CCW limit switch DI10 Variable pointer bit 2 0 DILL 2 1 DI12 EM DI13 23 DI14 Jog CW DI15 Jog CCW DI16 Start reference travel DI17 Start positioning Terminal wiring of outputs DBOO Brake DOO1 Ready signal DO10 Variable pointer bit 2 0 DO11 2 1 DO12 EM DO13 243 DO14 DO15 Table position reached DO16 IPOS in position DO17 IPOS reference Variables used
167. D_REC SCD_TRCYCL 230 _SBusCommDef object type H This statement sets up a data object for cyclical or acyclical data transfer This object can be used to transfer up to 2 variables 8 bytes via the system bus The data object is written to a variable structure the initial variable of which is specified in h The cyclical data transmission must be started via function SBusCommOn or SBusCommState action see the following pages The type of the data object is specified in objecttype objecttype Expression that can adopt one of the following values SCD_REC Receive SCD_TRCYCL Cyclical send SCD_TRACYCL Acyclical send H First variable in the variable structure Corresponding data structures have been defined for the individual object types 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 received data is stored Initializes a data object whose data is transmitted cyclically The object has the following structure H 0 Object number H 1 Cycle time ms H 2 Offset time ms H 3 Number of data bytes and data format H 4 Number of the variable H where the data to be transmitted starts H 5 Result of the SCOM command Manual IPOSplus Compiler Functions Standard functions 17 SCD_TRACYCL Initi
168. Define outputs define A DRS OUTPO 0 Output DRS X40 9 Define control bits in IPOS control word define Free running 1 Bit 1 define DRS Set zero point 22 Bit 22 Define variables to switch between Positioning and synchronous operation define operating mode H300 define target position HO define CFC_and_IPOS 13 Operating mode CFC amp IPOS define CFC_and_ SYNC 14 Operating mode CFC amp synchronous operation JS seess e n Subprograms SE n d Free running oni 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 OUTPO 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 OUTPO 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 Activate_synchronous operation Operating mode CFC_and_SYNC _SetSys SS_OPMODE operating mode Switch operating mode DRS_zero point Delete quadrantal error Activate_IPOS Operating mode CFC_and_IPOS _SetSys SS OPMODE operating mode Manual IPOSplus IPOSplus and Synchronized Motion Synchronous operation with technology
169. End of program jump to start of program Manual IPOSplus Assembler Examples Flashing light sample program 24 24 1 2 Sample Positioning This sample program alternates the position of the drive 10 motor revolutions CW and CCW every 2 s Quick start exam Requirements BS e Inverter motor encoder connected e Inverter started up in VFC n Reg amp IPOS CFC amp IPOS or SERVO amp IPOS P700 operating mode in accordance with the MOVIDRIVE system manual P700 must have one of the settings after startup e Check the hardware limit switches of the Emergency switching off circuit 1 Parameter setting e P600 binary input DIO1 ENABLE STOP e P601 binary input DIO2 NO FUNCTION e P602 binary input DIO3 NO FUNCTION e P603 binary input DIO4 LS CW e P604 binary input DIO5 LS CCW e P700 operating mode gt VFC n Reg CFC SERVO amp IPOS e NUMERATOR 4096 e DENOMINATOR 1 e 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 DIO4 X13 5 and DI 5 X13 6 must have the level 1 5 Start the sample program Press F9 in the active program window 6 Check the sample program e The task 1 display in the program header changes from PSTOP to START e The motor moves 10 revolutions CW or CCW alternately every two seconds e The cha
170. FORMATION This command only activates SBus 1 not SBus 2 Argument The command does not have an argument Example See section Compiler Examples 17 3 20_SBusCommState Syntax _SBusCommState action Description This statement initializes the CAN interface 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 Value Argument Meaning 0 SCS_STARTALL Starts cyclical communication synchronously from SBus 1 and SBus 2 1 SCS_STOPALL Stop cyclical communication synchronously from SBus 1 and SBus 2 2 SCS_START1 Starts cyclical communication from SBus 1 3 SCS_STOP1 Stops cyclical communication from SBus 1 4 SCS_START2 Starts cyclical communication from SBus 2 5 SCS_STOP2 Stops cyclical communication from SBus 2 234 Manual IPOSplus Compiler Functions Standard functions 17 Example include lt constb h gt define DATA H20 declare DATE DATA 0 define INTEL 0x100 define NUM BYTES A SCTRCYCL Obj1 main Obj1 ObjectNo 1090 Obj1 CycleTime 10 Obj1 0ffset 0 Obj1 Format INTEL ANZ BYTES Set high und low byte Obj1 DPointer
171. Fieldbus interfaces e Processing of binary and analog input output signals e Positioning with adjustable travel speed and positioning ramps e Presetting for position speed and torque control loops with minimized lag error 19 3 System Description IPOSplus features e Absolute encoder processing e 1024 32 bit variables are available in the IPOS S program see Technical data page 25 e With IPOSP 4S all inverter parameters can be read and written via communication commands e 2 touch probe inputs e Ramp types Linear Sine Square Bus ramp Jerk limited Electronic cam synchronous operation e Status and monitoring functions Lag error monitoring Position reporting Software and hardware limit switches Encoder function e Q reference travel types e The following functions can be changed during movement Target position Travel speed Positioning ramp Torque e Endless positioning is possible e Override function e The following technology functions can be controlled with a virtual encoder e Electronic cam e Internal synchronous operation 20 Manual IPOSplus System Description 3 IPOSplus features e Programming in the Compiler also offers Program creation in a high level language Symbolic variable names Possibility of creating program modules that can be used again in other projects Clear modular and structu
172. Folders Print Execution I Generate IPOS Program file TM Generate List File LST I Save automatically before Compiling Do NOT test recursive function calls of different program E levels I Download nur im Zustand Keine Freigabe m glich Abbrechen 483721227 You can make settings for the Compiler process on the Compiler tab page Generate IPOS program file MDX An MDX file is generated during compilation The MDX file contains the Assembler code of the program in text form and can be loaded into the inverter via SHELL Copy unit data or opened in the Assembler Generate List File LST A list file is generated and saved during the compiling process It contains information on resource utilization and the 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 only issues a warning message Download only possible in the status No enable If this checkbox is selected an IPOSP 4S program can only be downloaded to the inverter when it has the status No enable INFORMATION Uploaded programs created by the Compiler can be opened but not pro
173. GO e Abbrechen 511934475 In MOVIDRIVE A Assembler programs are saved with the extension MDX In MOVIDRIVE B they are saved with the extension ASO In the dialog box enter the name and directory of the Assembler program INFORMATION MDX files created using the Assembler only contain program code and no parame ters MDX files created for storing parameters using SHELL contain both parameters and program code Therefore you must be careful when overwriting existing MDX files 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 If the program is compiled successfully this information is displayed in the status bar Peer to peer 0 3 f Program translated successfully 511940235 As the next step the compiled program must be loaded into the inverter To do so choose Program Compile download or click on the El icon in the toolbar Manual IPOSplus Assembler Editor Starting stopping programs 21 Peer to peer 0 3 1 Program loaded into the inverter a Cs 512034955 The IPOSPus program is now stored in the unit s non volatile memory IPOSPUS programs can also be downloaded from one MOVIDRIVE to another MOVIDRIVE using a DBG keypad This is done using parameters P807 Co
174. IDRIVE A 43 Tasks for MOVIDRIVE BR 43 TimerO Imterrupt 48 Timer_O TIMER D 33 Timer_1 TIMER Trrorac anien naaa 33 Timer_2 TIMER 2 33 TOUCH ere 35 Touch probe DI02 interrupt cccceeeeeeeeeeees 47 TpPos1_Abs TP POS1ABS L e 35 TpPos1_Ext TP POS1EXT ninni naain 35 TpPos1_Mot TPRRPOSITMO T onci 35 Tpoboe t VE ITPRPOBINE a 35 TpPos2_Abs TP POS2ABS leen 35 TpPos2_Ext TP POS2EXT eee 35 TpPos2_VE TP POS2VE seeen 35 TPR POSTABS aaura EN ens 35 Manual IPOSplus TR POS 1EX ink ascetic inh MRA Bie 35 TPE POSTMO Pinni a ENER 35 JE ROSA E E T 35 NR GT EE 35 TPs POS2MO EE 35 Travel speed CW COW nnnsssonssinsinnnnenseeeesererrrnn nnne 127 TO Reload TORELOAD 33 U Meer Heger ee E 33 User watchdog ic 2egddeEeee eerie cde 34 V Variable interrupt request cceceeeeeeeereteees 38 Variable interrupts MOVIDRIVE pe 49 Variable interrupt call 49 Variable interrupt IPOS access 50 VarintReq VARINTREO 38 Velocity precontrol 0 cceeeeeeeeeeeeeeeeeeetteeeeeeeee 127 Virtual encoder anae naaie adea raaa 35 WwW Watchdog WdogTimer WD TIMER 34 Z Zero ofset E A E 139 Symbole GetSYS eege eege e 182 214 Movi Linkse eteina e 182 223 309 SBUSCOMMDE Y cee ceeeececccccceeeeeeeeeeeeeees 182 231 SOLSYS eher 182 238 include direchor 156 381
175. IP field Fieldbus bus bus P63x has an effect on DIO P63x has an effect on DIP P873 status word 2 0 DO10 X23 1 X23 1 X23 1 X61 1 X61 1 Bit 8 1 DO11 X23 2 X23 2 X23 2 X61 2 X61 2 Bit 9 2 DO12 X23 3 X23 3 X23 3 X61 3 X61 3 Bit 10 3 DO13 X23 4 X23 4 X23 4 X61 4 X61 4 Bit 11 4 DO14 X23 5 X23 5 X23 5 X61 5 X61 5 Bit 12 5 DO15 X23 6 X23 6 X23 6 X61 6 X61 6 Bit 13 6 DO16 X23 7 X23 7 X23 7 X61 7 X61 7 Bit 14 7 DO17 X23 8 X23 8 X23 8 X61 8 X61 8 Bit 15 8 X61 1 9 X23 1 X61 2 10 we X61 3 11 X23 8 X61 4 12 X61 5 13 X61 6 14 X61 7 15 X61 8 481 StdOutpIPOS Binary outputs of the basic unit only SET STD OUT IP If a binary 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 0 DBOO cannot be programmed fixed assignment with Brake 0 DOOO MQx If P628 IPOS OUTPUT only MQx 1 DOO1 If P620 IPOS OUTPUT 2 DO02 If P621 IPOS OUTPUT 3 DO03 Only with MOVIDRIVE B if P622 IPOS OUTPUT 4 DO04 Only with MOVIDRIVE B if P623 IPOS OUTPUT 5 DOO5 Only with MOVIDRIVE B if P624 IPOS OUTPUT Manual IPOSplus 31 32 IPOS Variables Overview of the system variables No Name Description Compiler Assembler 482 OutputLevel Signal level of the binary outputs READ only OUTPUT LVL Bit IPOS name DIO DIO DIO DIP DIO field DIP DIP field Fieldbus MOVIDRIVE A bus bus
176. IPOS P730 Brake function YES H IPOS Parameter P900 Reference offset mm 500 P901 Reference speed 1 rpm 200 P902 Reference speed 2 rpm 50 P903 Reference travel type 1 P910 Gain X controller 2 8 P911 Positioning ramp 1 s 1 P912 Positioning ramp 2 s 1 P913 Positioning speed CW rpm 1350 P914 Positioning speed CCW rpm 1350 P915 Velocity precontrol 100 P916 Ramp type SINE P920 SW limit switch CW mm 2100 P921 SW limit switch CCW mm 100 P922 Positioning window inc 50 P923 Lag error window inc 5000 P930 Override OFF Travel distance factor NUMERA Travel distance factor NUMERATOR 2048000 TOR DENOMINATOR Travel distance factor DENOMINATOR 15708 Unit mm 24 2 6 Calculating the IPOS S parameters SW limit switch Travel distance factor numerator see schematic structure Incr motor rev x gear ratio 4096 incr x 5 20480 20480 x 100 expansion factor Manual IPOSplus The travel dimension unit should be set to mm Number of increments per revolution of the drive wheel 2048000 24 365 Assembler Examples Hoist sample program 24 Travel distance Circumference of the drive wheel in mm factor denominator ixi 50 mm x tr 157 0796327 157 08 x 100 expansion factor 15708 Unit The unit after the travel specific information is to be displayed in mm Travel speed 1350 rpm Position window The message Drive in position should be issued when the target positio
177. IPOSplus Assembler Introduction First steps 20 Now use the insert tool to insert the remaining commands in the program The following table lists the parameters for all the program commands If you need information on a command highlight it and press the lt F1 gt key Command Label Target Condition Constant Destination SET 1 200 0 JMP 2 200 gt 99 1 ADD 200 1 WAIT 500 JMP UNCONDI 2 TIONED 20 2 3 Compiling and starting the program 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 Ri icon in the toolbar 1010 If the program is compiled successfully this information is displayed in the status bar ONie Peer to peer 0 3 fl Program translated successfully E 511550475 As the next step the compiled program must be loaded into the inverter To do so choose Program Compile download or click on the E icon in the toolbar The status bar shows whether the program has been downloaded successfully ONline Peer to peer fo 3 H Program loaded into the inverter E 511552011 The IPOSPlus program is now stored in the unit s non volatile memory IPOSP4S programs can also be downloaded from one MOVIDRIVE to another MOVIDRIVE using a DBG60B DBG11B keypad This is done using parameters P807 Copy MDX gt DBG and P806
178. Interfaces Field Distributors e Drive System for Decentralized Installation INTERBUS Interfaces Field Distributors e Drive System for Decentralized Installation DeviceNet CANopen Interfaces Field Distributors Manual IPOSplus 27 4 4 1 IPOS Variables Introduction IPOS Variables Introduction The integrated positioning and sequence control system uses global variables that are used by all the tasks and interrupts There are no local variables that are only declared either in a task or a function All variables page 25 are 32 bit variables treated as signed integers during calcula tions and comparisons In the user program you 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 4294967295 x na OxFFFF FFFF x0 nexadec S 0 IPOS value 2147483648 2147483647 Ox7FFF FFFF See 2147483647 2147483648 473666955 Example HO HO 4 H1 7 H3 _ 0 H1 HO 2147483647 H1 1 H3 HO H1 2147 483648 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 Manual IPOSplus IPOS Variables Overview of the system variables 4 2 Overview of the system variables Some IPOS variables are assigned set fun
179. Le MOD TAGPOS 120 3 0000 5555 MOD ACTPOS 50 A 0000 238E Pa a Ss 3 MOD ACTPOS 120 H455 Seege OD ACTPOS 0 180 360 0 180 DU 0000 8000 FFFF 0000 8000 216 360 hex 477225739 1 Actual position prior to positioning Modulo actual position 2 Definition of target position Modulo target position 3 Actual position after positioning Modulo actual position 77 Position Detection and Positioning Modulo function Modulo short route note when MOD TAGPOS 120 the axis only moves in a coun terclockwise direction when the drive is positioned at least 1 increment CCW of 300 since 300 180 120 and 300 180 120 Therefore to position an axis that is at 0 1 revolution in a clockwise direction H454 must be set to Ox 10000 To move this axis 1 revolution CCW H454 must be set to 0x FFFFOOOO 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 x 360 0 360 k x 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 program error eg INK H511 ActPos Mot GA Z 1 ive MOD ACTPOS 300 2 Ee 0000 D554 MOD TAGPOS 410 Z 0001 238E t ie 2 MOD TAGPOS 120 3
180. M PosL4 CCW limit value of the fourth position window H 13 GSCAM PosR4 CW limit value of the fourth position window Manual IPOSplus Position Detection and Positioning Cam controllers Example A travel drive has a travel range of ten motor revolutions An output is to be set when the drive 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 A 3600 40960 Inc 3240 36864 Inc 720 8192 Inc 360 4096 Inc 1 H481 1 H481 2 477561867 Required parame P620 IPOSP 4S output ter settings P621 IPOSPlus output Manual IPOSplus 87 88 Position Detection and Positioning Cam controllers Example solved in the Compiler include lt const h gt include lt io h gt Declaration GSCAM Caml Cam2 Declaration of cam outputs 1 and 2 Main function IPOS initial function Cam1l SourceVar numof ActPos Mot Reference size motor encoder Cam1 DbPreCtrl 0 no delay time compensation Cam1 DestVar numof StdOutpIPOS Output onf Do01 H481 1 Cam1 BitPosition 1 Cam1 BitValue 0 Output 1 if value in window Cam1l NumOfCam 3 Number of windows Cam1 PosL1 0 1st window left limit value Cam1l PosR1 4096 1st window right limit value
181. MO VITOOLS xj File Edit Program Run Help Egg ew RAAH FSSR ll Numerator 1 Denominator fi Unit inc SET H151 2 Identifier Value SET H152 1 H126 m SET H153 5 H127 o SET H154 156 H128 Bus Type 3 SET H155 163 H129 Len 10 MOVCOM H151 H130 PA1 o HOVON H131 PAZ 0 SET H126 3 H132 PA o SET H129 10 H133 0 SET H140 10 H134 0 GETSYS H128 PO DATA H135 o SET H481 H133 H136 o SET Hiel H132 H137 o SET H159 H131 H138 o SET H157 H130 H139 0 SET H144 H483 H140 Len 10 SET H143 H162 H141 PE1 518 SET H142 H160 H142 PE2 o SET H141 H158 H143 PE3 3846 SETSYS PI DATA H140 H144 o JMP UNCONDITIONED M1 H145 o A H146 D G rir G z File O MD AMBRUS ipos movcomm MD _ 514515083 The command cannot be used with MOVIDRIVE The command starts 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 315 23 316 23 5 4 SCOM Structure Example Assembler Commands Communication commands An SCOM command System bus COMmunication can be used to transfer up to 2 vari ables 8 bytes via the system bus The SCOM command initializes the transfer object and defines whether the object should be sent acyclically or cyclically or whether objects are to be received In
182. MOVIDRIVE B P63x has an effect on DIO P63x has an effect on DIP P873 status H521 word 2 0 DBOO DBOO DBOO DBOO DBOO DBOO DBOO 1 DO01 DO01 DO01 DO01 DO01 DO01 DO01 2 DO02 DO02 D002 DO02 DO02 DO02 D002 3 DO10 X23 1 X23 1 X23 1 X61 1 X61 1 Bit 8 4 DO11 X23 2 X23 2 X23 2 X61 2 X61 2 Bit 9 5 DO12 X23 3 X23 3 X23 3 X61 3 X61 3 Bit 10 6 DO13 X23 4 X23 4 X23 4 X61 4 X61 4 Bit 11 7 DO14 X23 5 X23 5 X23 5 X61 5 X61 5 Bit 12 8 DO15 X23 6 X23 6 X23 6 X61 6 X61 6 Bit 13 9 DO16 X23 7 X23 7 X23 7 X61 7 X61 7 Bit 14 10 DO17 X23 8 X23 8 X23 8 X61 8 X61 8 Bit 15 11 X61 1 12 X23 1 X61 2 13 os X61 3 14 X23 8 X61 4 15 X61 5 16 X61 6 X61 7 X61 8 483 InputLevel Signal level of the binary inputs READ only INPUT LVL Bit IPOS name DIO DIO DIO DIP DIO field DIP DIP field Fieldbus MOVIDRIVE A bus bus P870 sta MOVIDRIVE B tus word 2 H520 0 DIOO Depends on the basic unit e g X13 1 1 DI01 X13 2 2 DIO2 X13 3 3 DI03 X13 4 4 D104 X13 5 5 DIO5 X13 6 6 D110 X22 1 X22 1 X22 1 X60 1 X60 1 Bit 8 7 DI11 X22 2 X22 2 X22 2 X60 2 X60 2 Bit 9 8 DI12 X22 3 X22 3 X22 3 X60 3 X60 3 Bit 10 9 DI13 X22 4 X22 4 X22 4 X60 4 X60 4 Bit 11 10 D114 X22 5 X22 5 X22 5 X60 5 X60 5 Bit 12 11 DI15 X22 6 X22 6 X22 6 X60 6 X60 6 Bit 13 12 DI16 X22 7 X22 7 X22 7 X60 7 X60 7 Bit 14 13 DI17 X22 8 X22 8 X22 8 X60 8 X60 8 Bit 15 14 X60 1 15 X22 1 X60 2 16 Me X60 3 17 X22 8 X60 4 18 X60 5 19 X60 6 20 X60 7 21 X60 8
183. MOVITOOLS MotionStudio can be used for simple positioning tasks with MOVITRAC B SV System variable IPOS IPOSPS program Manual IPOSplus Position Detection via Binary Inputs Position detection with MOVIDRIVE B 7 3 Position detection with MOVIDRIVE B For MOVIDRIVE B SEW EURODRIVE recommends the E176 built in encoder The binary inputs counter inputs of the MOVIDRIVE B have the following technical data 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 X13 4 DI03 Reference potential DCOM Simple positioning with MOVIDRIVE B requires the inverter to be in one of the following operating modes e VFC without feedback e MII characteristic curve Manual IPOSplus Position Detection via Binary Inputs Position detection with MOVITRAC B INFORMATION If MOVIDRIVE B is equipped with an encoder option it is not possible to evaluate the track signals of the binary inputs counter inputs Use the MOVIDRIVE B without encoder option Proceed as follows to use a built in encoder 1 Connect the encoder to the digital inputs of the MOVIDRIVE B via terminals X13 3 DIO2 and X13 4 D103 2 Set the following
184. Manual IPOSplus IPOS Variables Overview of the system variables No Name Description Compiler Assembler 484 ControlWord IPOSPS control word unit functions READ and SET CTRL WORD The IPOSP 4S control word can always be used irrespective of the operating mode control signal source and setpoint source The IPOSP4S control word is connected by an OR command with the terminal functions the fieldbus control word and the control word in the unit via the RS 485 RS 232 and the SBus Bit function with level 1 Bit function with level 1 0 No function 16 Reserved 1 No enable 17 Reference cam 2 CW 18 Reference travel start 3 CCW 19 Slave free running 4 n11 n21 fixed setpoint 1 20 Setpoint block 5 n12 n22 fixed setpoint 2 21 Reserved 6 Fixed setpoint selection 22 DRS zero point set 7 Parameter switchover param set 2 23 DRS slave start 8 Ramp switchover ramp set 2 24 DRS teach in 9 Motor potentiometer up 25 Reserved 10 Motor potentiometer down 26 Reserved 11 External fault 27 Condition Monitoring switching signal 12 Fault reset Drive vibration warning 13 Hold control 28 Condition Monitoring switching signal 14 CW limit switch Vibration fault 15 CCW limit switch 29 Condition Monitoring switching signal Brake wear error 30 Controller inhibit 31 Reserved 485 TO_Reload READ and SET loading value for the user timer 0 cycle time The cycle time can be specified with H485 if a TO
185. No inhibit via control word no ASTOP IPOS ENABLE command required before the subsequent travel com mand The brake is not applied if the brake function is activated Note Since the actual position is used as the setpoint position at standstill the command cannot be processed cyclically This is the case in axes with process forces or hoists because otherwise the axis drifts slowly out of position Note AS_PSTOP is not completed in the event of a fault The program stops AG ENABLE The inhibit is revoked using the IPOSP S control word INFORMATION Since the actual position is used as the setpoint position at standstill the argument AS_PSTOP cannot be processed cyclically This is the case in axes with process forces or hoists because otherwise the axis drifts slowly out of position Example main _GoAbs GO NOWAIT 3000 Start movement job _AxisStop AS PSTOP Cancel movement Statements during standstill _AxisStop AS ENABLE Revoke inhibit _GoAbs GO NOWAIT 3000 Send new movement job Manual IPOSplus Compiler Functions Standard functions 17 17 3 2 _BitClear Syntax _BitClear H bit Description _BitClear sets the bit within variable H to zero Key points H Variable name bit Constant expression for bit position Example main _BitClear H100 3 deletes bit 3 in H100 17 3 3 _BitMove Syntax _BitMove H2 bit2 H1 bitl Description Copies the
186. OMMAS cccccceseeenceeeeeeneeeeeeeeseeeeeeeeeseeeseeeesseaeseeeeeseanseeeesneaes 297 23 1 General information ccccccccceccecceee a aa i aae a a ea aaeeea 297 23 2 Overview of commande 297 23 2 1 Arithmetic commande 297 RSC HN ell EE 298 23 2 3 Communication Commandes sesessseeeeeeseerrreeeerressrrrnessrerrssne 298 23 2 4 Positioning commande 299 23 2 5 Program commande cirenean anekani eaa 299 23 2 6 gt Set COMMANAS EE 300 23 2 7 Special unit commande 300 23 2 8 Comparison commande ren 301 23 3 Arithmetic commande aineinaan adinira iaia 302 23 3 1 Fundamental operations ADD SUB MUL DIN 302 23 3 2 Auxiliary arithmetic functions NOT MOD 303 23 3 3 Logical operations AND OR KOR 304 23 3 4 SHIFT commands SHL SHR ASHR eeen 305 23 4 BI Otter E E EAEE A 307 23 4 1 Bit commands BSET BCLR BMOV BMOWN ose 307 23 5 Communication Commande 309 EE a Ee E EE 309 23 552 IMOMCOM vernie AA td deeg 314 23 10 39 MONON tis See ee nea ace ae teas 315 23 04 SCOM EG deenens ee e teak Walled lc cen tart 316 23 5 9 A SCOMON enee Eed eG ana E 321 239 6 SGOMST nck La ee ee i ee 322 11 12 Contents 24 23 6 Positioning Commande eect eter ee eee ettte eee eeeaeee eee teeeeeeetneeeeeee 323 23 6 1 Reference travel GOU 323 23 6 2 GOA absolute positioning GOR relative positioning 325 23 7 Program commande mesire ei AES EEA E ee dee 329 23 7 1 Program command EN
187. OSplus Compiler Editor Variable window 13 13 16 Variable window It is useful to open a Variable window so you can observe the contents of the variables during debugging or normal running of the program The Variable window is called up by selecting All Variables from the Display menu in the menu bar Displaying variables IPOSplus COMPILER MOVITOOLS B Bisi File Edit Search Project Run Display Options Window Help estor Few ae aera oe E E Project E r als SE Di Sum Source modul s Jeum IPC En Documents oo while 1 for H1 dd H2 DIT Peer to peer A 485381387 All variables can be observed 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 INFORMATION The IPOS variables contained in the data backup of the device can also be displayed in offline mode The non volatile variables are displayed with their permanently stored value The vol atile changes by the program code are not stored in the backup Manual IPOSplus 169 13 170 Compiler Editor Variable window To set up a watch window choose Display Variable Watch Edit Window from the menu bar The following window
188. OVIDRIVE B main if InputLevel amp DI03 0 _GetSys INPUTS GS_INPUTS H10 1 if INPUTS amp DIO3 0 H10 1 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 DIO1 and a 0 at DIO3 include lt const h gt define DIO3 0b1000 define DIO1 0b0010 main if InputLevel amp DI03 DIO1 0b0010 H10 1 Manual IPOSplus Compiler Examples Querying an edge 18 18 4 Querying an edge 18 4 1 Example 1 Manual IPOSplus In addition to the level of an input terminal the rising and falling edge can also be queries and evaluated In the following sample programs output DOO2 is toggled to DIO2 for a positive or negative edge Positive edge query include lt const h gt MOVIDRIVE A include lt io h gt MOVIDRIVE A Variables for edge generation long 1DI02RisingEdge 1DIO2LastState 1DO02State lInputLevel main while 1 Read DI02 lInputLevel InputLevel amp 0x00000004 Generate edge DI02 1DIO2RisingEdge lInputLevel amp amp 1DIO2LastState 1DIO2LastState lInputLevel if 1DI02RisingEdge 1po002State 1D002State Se
189. ObO 15 4 Ternary operators 15 4 1 Example 196 The IPOSPIUs Compiler only recognizes one operator that links together three oper ands The conditional operator Its form is as follows a b c means lfa then b otherwise c where a is a logical expression and b and c are expressions H1 H2 3 H3 H4 If H2 equals 3 H1 is assigned the value of otherwise it is assigned the value H4 The example is the abbreviated notation of if H2 3 HI e H else H1 H4 Where possible the ternary operator should not be used due to the illegibility of the source code Manual IPOSplus Compiler Constructions if else 16 16 1 16 1 1 Syntax if else level languages Compiler Constructions The IPOSPlus Compiler provides constructions that are also available in other high The following constructions are available e H else e for e while e do while e Switch Case default These are supplemented by statements such as continue and break which are used as control elements within these constructions if expression Instructionelse Instruction The key words if and else control the program flow depending on whether the expres sion following the key word if returns the value TRUE not equal to zero or FALSE equal to zero The else branch is optional It is performed if the expression returns the value FALSE In a
190. On command only the _MoviLink command to address 253 internal is possible When using the _MoviLink command other units can no longer be accessed 23 5 2 MOVCOM The command can be used with MQx only The MovComm commands enable cyclical data exchange between MQx and up to 8 MOVIMOT units via the RS 485 interface with the MOVILINK profile For a detailed description refer to _MovCommDef page 227 The variable is defined by the MOVCOM variable name in the Compiler and has the following structure 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 MOVIMOT ML_FT_3 Pd Pointer H 3 Number of the variable H in which the process data is stored or from which the data to be written is obtained The data structure for H is described in detail below Para Pointer H 4 Number of the variable H in which the parameter data is stored or from which the data to be written is obtained MOVIMOT does not support this function Variable structure of the process data Data structure for H H 0 Contains the error code after connection or zero if there wa
191. Ox or ASTOP TARGET POSITION As soon as the drive has reached the positioning window the signal IPOS IN POSITION is generated This message is available via a binary 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 LagWindow LAG WINDOW Lag error window READ and SET H494 is identical to P923 The lag error window defines the maximum permitted difference between the current setpoint position which the ramp generator specifies every 1 ms and the actual position If the specified value is exceeded fault F42 lag error is triggered The response to F42 must be set using parameter P834 Response LAG ERROR Deactivation You can deactivate the lag error monitoring by setting the P923 Lag error window to 0 Setting range 0 5000 231 1 increments 495 LagDistance LAG DISTAN Lag distance READ Value of the current lag distance in positioning difference between setpoint and actual position Value range 0 231 1 increments 496 SLS_right SLS RIGHT Software limit switch CW READ and SET H496 is identical to P920 Limits travel in a clo
192. P93x IPOSplus special functions 12 12 4 6 P939 Speed task 2 Setting range 0 9 additional Assembler commands ms The standard setting for task 2 is 2 Assembler commands 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 Manual IPOSplus 133 12 134 P9xx IPOS Parameters P94x IPOSplus encoder 12 5 P94x IPOSP 4S encoder 12 5 1 P940 IPOS variable edit Setting range ON OFF IPOSP4S variables edit with DBG60B keypad only not in SHELL IPOSPUS variables can be changed if P940 is set to ON 12 5 2 P941 Actual position source Setting range Motor encoder X15 Ext Encoder X14 absolute encoder X62 Defines the encoder to which IPOSP 4S positions 12 5 3 P942 P943 Encoder factor numerator denominator Setting range 1 32767 First set the parameter P944 encoder scaling ext encoder page 135 orP955 encoder scaling page 139 when using DIP11B or DEH21B option Next set P942 P943 In the event of 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
193. P942 in the section IPOS Parameters 57 58 Position Detection and Positioning External encoder X14 The following block circuit diagram applies EXT D 476710667 Px Non linearized position value of encoder Pact Actual position value for ramp generator and position controller P941 Actual position source P942 Encoder factor numerator P943 Encoder factor denominator P944 Encoder scaling external encoder H510 External encoder with actual value on variable H511 Motor encoder with actual value on variable Set the following parameters for the external encoder Table 2 Parameter settings for the trolley Num Designation Function Setting Range ber P944 Encoder Multiplies the encoder Highest value that is smaller than the Fixed 1 2 scaling ext signals with the set value ratio between the resolution of the 4 8 16 32 encoder motor encoder and the external 64 encoder Example Motor encoder 4096 Inc ext encoder 800 inc 5 12 Value 4 P943 Encoder fac Denominator to deter Number of increments in H511 to max 32767 tor denomi mine the ratio between read ACTPOS MOT for a certain nator the motor encoder and distance s the ext encoder P942 Encoder fac Numerator to determine Number of increments in H510 to max 32767 tor numerator the ratio between the read the ACTPOS EXT for a certain motor encoder and the distance s as for P943 ext enc
194. PA GS _PODATA Copy double word 2 3 to modulo target position ModTagPos tPA PO3 amp OxFFFF tPA PO2 amp OxXFFFF lt lt 16 PO2 P03 Regenerate process input data and send to PLC tPE PI3 3600 ModActPos 65536 Actual position in 1 10 degree at word 3 _SetSys SS PIDATA tPE Send PD End while 1 L Ende Main s S Sss2ssSS SSssSsS sesh Sse sseseeseeessasea 104 Manual IPOSplus IPOSplus and Fieldbus Acyclical communication Assembler SET H320 3 SET H332 6 SET H321 6 M1 GETSYS H320 PO DATA SET H300 H324 AND H300 amp FFFF hex SET H301 H323 AND H301 amp FFFF hex ADD H300 H301 SHL H300 lt lt L SET H354 H300 SET H300 3600 MUL H300 H355 DIV H300 65536 SET H335 H300 SETSYS PI DATA H332 JMP UNCONDITIONED M1 8 4 Acyclical communication For each fieldbus MOVIDRIVE supports the option to read and write all parameters variables cam disks and the IPOSP S program via acyclical communication also re ferred to as parameter channel or parameter service An IPOgPlus program or param eter settings are not required Data in the inverter 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
195. RELOAD user timer TIMERO H489 is to be used cyclically with the SET INTERRUPT SETINT command The time value entered in H485 is reloaded automatically with this time value every time the timer 0 runs down H489 0 Value range 0 231 1 ms 486 Reserved 487 Timer_2 Time for user timer 2 READ and SET TIMER 2 User time 2 counts upwards Value range 0 231 4 ms 488 Timer_1 Time for user timer 1 READ and SET TIMER 1 User timer 1 counts downwards to 0 Value range 0 231 1 ms 489 Timer_0 Time for user timer 0 READ and SET TIMER 0 User timer 0 counts downwards to 0 An interrupt branch is performed when the timer value reaches 0 if the SET INTERRUPT SETINT command is being used The cycle time can be specified with the variable TO RELOAD H485 if a user timer is to be used cyclically with the SET INTERRUPT SETINT command See section Task management and interrupts Value range 0 231 1 ms Manual IPOSplus 33 IPOS Variables Overview of the system variables No Name Compiler Assembler Description 490 WdogTimer WD TIMER Time for the user watchdog READ and SET The watchdog timer counts down to 0 The WATCHDOG ON WDON command activates the timer and determines the cycle time Value range 0 231 1 ms 491 SetpointPos SETP POS Current setpoint position READ IMPORTANT System control variable Value must not be overwritten
196. TOUCHP ENABLE1 GOA WAIT 100 turns TOUCHP DISABLE1 WAIT 2000 ms CCW GOA WAIT 0 turns WAIT 2000 ms JMP UNCONDITIONED MO M100 5ET H10 40960 ADD H10 H507 GOA WAIT EN RET pp 0 8 E Progran f 516742923 The watchdog is called 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 Command structure Mxxx Label optional Mxxx WDON X1 x1 Mxxx WDOFF Interval in ms in which the watchdog is called up 23 353 Assembler Commands Special unit commands 23 Example The drive moves for as long as the level at DIO5 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 lol x Numerator 4096 Denominator fi Unit June LO I10000000000100000 MO WDON 10000 ms GOR NOWAIT 9999 turns M2 JMP HI I0000000000100000 Mz TARGET POSITION 0 4 b Program textm 4 516804619 354 Manual IPOSplus Assembler Commands Comparison commands 23 10 Comparison commands 23 10 1 Comparison operations CPEQ CPGE CPGT CPLE CPLT CPNE CPEQ
197. This must be taken into account in the project planning phase see the Project Planning section Manual IPOSplus 73 Position Detection and Positioning Modulo function 6 7 2 Operating principle When the modulo function is active position setpoints are expressed in output units rather than in increments on the motor shaft Examples of output units GM motor encoder GS synchronous encoder e Turntable applications with the output unit 360 correspond to one turntable rotation Wee d 180 ef 270 476886155 e Conveyor chain with a carrier spacing as output unit 360 lt wl HUNN 476887691 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 e Modulo numerator and denominator P961 P962 e Modulo encoder resolution P963 The user can use the following IPOSPlus system variables to specify target positions in output units for the MOVIDRIVE system software e Modulo target position H454 to describe the target position e Actual modulo position of the output H455 for reading the actual position 74 Manual IPOSplus Position Detection and Positioning Modulo function The actual position H455 is calculated according to the following block diagram ABS gt H
198. TimeBase 30 Average value filter 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 for speed monitoring Speed monitoring is triggered when the current is at the current limit for the number of seconds specified in P501 For example if P501 200 ms the GETSYS command can be used to query the numerator value The travel speed is reduced after 50 ms In this way return travel can be made at rapid speed and when under load the speed can be reduced automatically by the inverter Manual IPOSplus 213 17 214 Compiler Functions Standard functions The following standard SEW structures are available for the _SetSys statement Instruction type Standard structure Elements Brief description _GetSys GSAINPUT Input Voltage value of analog input 1 Input2 Voltage value of analog input 2 GSAOUTPUT Output1 Voltage value for optional analog output 1 Output2 Voltage value for optional analog output 2 GSCAM SourceVar Number of the variable on which the command is exe cuted DbPreCtrl Delay time feedforward in 0 1 ms DestVar Nu
199. V2 AOC2 A001 P643 analog output AO2 IPOS OUTPUT 2 30 Manual IPOSplus IPOS Variables Overview of the system variables No Name Description Compiler Assembler 479 AnaOutpIPOS Analog outputs of the terminal expansion board type DIO11 only SET ANA OUT IP The value of variable H479 is output on an analog output when the corresponding terminal is programmed to IPOS OUTPUT Option DIO11 is required for MOVIDRIVE A and B for MCH and MCS MCV MCV 40A an output can be programmed as a binary output or analog output Variable value physical outputOutput terminal assignment 10000 0 10000 AOV1 A0C1 A001 P640 analog output AO1 IPOS OUTPUT 10000 0 10000 AOV2 AOC2 AO001 P643 analog output AO2 IPOS OUTPUT 480 OptOutpIPOS Binary outputs of the terminal expansion board types DIO11 DIP11 only SET OPT OUT IP The READ function can be performed for MOVIDRIVE A using H482 and for MOVIDRIVE B using H521 If a DIO11 or DIP11 option is not inserter virtual terminals can be set in status word 2 via fieldbus if for exam ple P873 STATUSWORD 2 The bits of variable H480 are reproduced on the binary outputs of the basic unit if the relevant terminal is set to IPOS OUTPUT If a binary 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 DIP D
200. VE The value of the virtual encoder H376 is stored in H599 if input DIO3 has been activated see also _TouchProbe TOUCHP 501 TpPos1_VE Only used in MOVIDRIVE B reserved in MOVIDRIVE A TP POS1VE The value of the virtual encoder H376 is stored in H501 if input DIO2 has been activated see also _TouchProbe TOUCHP 502 TpPos2_Abs The touch probe positions are stored in the following variables TP POS2ABS 503 TpPos1_Abs Encoder Encoder position Touch probe 1 Touch probe 2 TP POS1ABS DI02 DI03 504 TpPos2_Ext Motor encoder X15 H511 ACTPOS MOT H507 TP POS1MOT H505 TP POS2MOT TP POS2EXT External encoder X14 H510 ACTPOS EXT H506 TP POS1EXT H504 TP POS2EXT 505 TpPos2_Mot Absolute encoder X62 H509 ACTPOS ABS H503 TP POS1ABS H502 TP POS2ABS TP POS2MOT 506 TpPos1_Ext TP POS1EXT 507 TpPos1_Mot TP POS1MOT 508 IPOS counter e 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 Current actual position of the DIP absolute encoder SSI READ ACTPOS ABS IMPORTANT System control variable Value must not be overwritten This actual position is determined via the signals which are active on plug connector X62 DIP11A option Unit Increments depending on the encoder resolution 510 jActPos_Ext READ current actual position external encoder ACTPOS EXT IMPORTANT System control variable Value must not
201. W CCW return to branch distributor 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 position to current position GOO 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 RET TARGET POSITION 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 IPOS Reference 0 Jog mode query Is software limit switch active M35 SETSYS POS SPEED C C W H310 SETSYS POS RAMP H312 SET H319 0 BMOV H319 0 H473 20 JMP H319 0 M36 SET H319 H496 OR H319 H497 JMP H319 0 M36 SET H319 1 SET H317 H496 SET H318 H497 M36 RET Jog mode Query Is software limit switch active Set velocity Set ramp time Query has the axis been referenced software limit switch active Query both software ranges 0 software limit switch not active if software limit switch active set flag H319 1 and load jog travel variables H317 with the software travel ranges system variables H496 and H497 Manual IPOSplus 24 371 372 Assembler Examples Table positioning sample program Jog M30 JMP LO 10000010000000000 M31 JMP HI I1000010000000000
202. a cable connected from terminal X40 9 OUTPO to X40 1 free mode Command Set OUTPO and thus DRS input Free running in free running mode the red LED on sequence in the DRS card is lit Assembler 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 _BitSet 476 0 sequence in the d BitClear 476 0 Compiler T Manual IPOSplus IPOSplus and Synchronized Motion Synchronous operation with a DRS option card 9 3 2 Setting the zero pointfor DRS11B Command sequence in Assembler Command sequence in the Compiler Control example Manual IPOSplus The angular offset of DRS11 can be reset using IPOSP S without an external signal The H484 CTRL WORD system variable is used for this process The process of resetting the angular offset between the master and slave can be mon itored in the status LED of the DRS card Red free running Green DRS not in position angular offset is greater than P514 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 _BitSet 484 22 _Wait 15 _BitClear 484 22 e The drive should be switched to Free running using input DI10 Inputs DI10 DI17 can be either physical terminals on DIO11A and DIP11A or virtual terminals in fieldbus
203. a maximum input frequency of 4 KHz You must change the setting of the corresponding input to MQX ENCODER IN to activate the counter func tion This setting switches off the input filter automatically As a result the input signal for the counter must be fault free and bounce free The value of the counter is written to variable H511 INFORMATION If both the inputs DIO and DI1 are set to MQX ENCODER IN the proximity sensor evaluation is activated automatically and the counter function is switched off 7 5 7 Connecting the built in encoders Connecting the NV26 proximity sensor Connecting the EI76 ES16 incre mental encoder Manual IPOSplus The cabling of the built in encoders can be checked using the LEDs of the MQx When a motor turns slowly the LEDs at inputs DIO and DI1 flash To connect 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 DIO and DI of the bus module We recommend you use metal M12 plug and sockets and connect the shielding at both ends 480466315 If the MQx interface counts the motor position in H511 in the wrong direction the M12 plugs at inputs DIO and DI1 must be exchanged To conn
204. able H variable that contains the target position in increments based on 4096 increments motor revolution 23 325 23 326 Assembler Commands Positioning commands GOR GO RELA TIVE Structure Example 1 This command performs relative positioning to the position specified in the second ar gument X2 Argument X2 can be a constant variable or an indirect variable The entered travel distance is added to the current target position H492 TARGET PO SITION of the drive and displayed there The message IPOS in position is updated within a GOA or GOR command that is the message can be queried directly in the next program line Command structure Mxxx Label optional Mxxx GOR X1 X2 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 position of the drive has reached the position window P922 of the target position X2 K Target position in user units as a constant H Target position in user units as a variable H variable that contains the target position in increments based on 4096 increments motor revolution The program shown below causes the drive to travel between the positions 0 revolu tions and 100 revolutions entry in the program header numerator denominator unit
205. absolute encoder 1 138 12 6 1 P950 Encoder YPE aeae E 138 12 6 2 P951 Counting direction seirer e EA EAA 138 12 6 3 P952 Cycle freg eNCy eien a 139 12 6 4 P953 Position ofteet nin ee e aA 139 120 9 P994 Zero Of SOU e O ET SERA EE 139 1266 P955 Encoder scalmg 139 12 6 7 P956 CAN encoder baud rate 139 12 7 P96x IPOSPUS EE 140 12 7 1 P960 Modulo fUNction enas a 140 12 7 2 P961 Modulo numerator geeiecreiea ra aiia a 140 12 7 3 P962 Modulo denominator 140 12 7 4 P963 Modulo encoder resolution essseeeeeeeeeeeeeeerrrsseeenee 140 12 8 P97x IPOS svnchrontzaton cence cece EEE AAAA EEE 141 12 8 1 P970 DPRAM synchronization 0 eeeeeeeceeeeeeeeneneeeeeeenaes 141 12 8 2 P971 Synchronization phase cece eeeeeeeeeeeeteeeeeeeeaees 141 Compile r Editor ziea Aa a ae anaana aaa oiiae anaiai 142 13 1 Te hnical EEN 142 13 2 First Ste EE 143 13 2 1 Step 1 Starting IPOSP 4S Compiler with MOVITOOLS MOON STUGIO aar raea ie ed deb sn useneesuiceeoee donate 143 13 2 2 Step 2 Creating a new Droe 145 13 2 3 Step 3 The first IPOSPIYS program 148 13 2 4 Step 4 Compiling and starting the IPOSP S program 151 13 3 Settings for the IPOSPIUS Compiler c cccscssesesessesesessesesesesstseseeeseaes 154 EE SOArChTUNCUON TTT 157 13 5 Creating a NEW Droe 158 13 5 1 Project properties ceecccccccececeeeeeeeeeeeeeeeenteeeceeeeeeeeeeteeees 158 13 5 2 Defining the program Structure 0 cce
206. ad CamData0O LeftLimit3 31858 175 at load CamData0 RightLimit3 33678 185 at load CamData0 LeftLimit4 0 not used CamData0 RightLimit4 0 not used _Go0 GOO U WZP GetSys MyCamControl CamControl G CAM Manual IPOSplus Position Detection and Positioning Cam controllers Example solved in the Assembler Manual IPOSplus ba Generated IPOS Code ee 101 s i H430 2147483646 H432 1 H433 0 H434 0 H435 2147483193 H436 481 H437 1 H438 420 H420 0 H421 3 H422 H423 H424 H425 H426 H427 H428 0 H429 0 U W ZP H430 CAM UNCONDITIONED sl unt uuu du imi IPOS Variables 600001C7 h 481 420 477835787 95 Types of built in encoders Position Detection via Binary Inputs 7 Position Detection via Binary Inputs 7 1 Types of built in encoders For asynchronous AC motors SEW EURODRIVE offers a position detection with a sim ple incremental encoder without position control Those are built in encoders The following table illustrates recommended encoders for the respective products Encoder Unit MOVIDRIVE B MOVITRAC B MQx module EI7C x EI76 x xX EI72 EI71 ES16 D NV26 proximity sensor x e You may also use a different encoder but observe the following information INFORMATION speed counter input If the resolution is too high the encoder might not be e
207. ak This program extract increments IPOSPS variable H3 if the value of IPOSP US vari able H1 is 1 or 2 IPOSP 4S variable H1 is incremented given any other value of IPOSPIUS variable H4 The key word return 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 possibilities for achieving the same result The example on the left uses the return statement to exit the function prematurely whereas the example on the right does not use return Function Function Leave function when H1 is 5 Skip statement when H1 5 if H1 if H1 5 return H2 3 H2 3 16 203 Compiler Functions User defined functions 17 17 Compiler Functions 17 1 User defined functions The user can program functions subprograms Used defined functions cannot be called when function arguments are transferred However this is also unnecessary be cause all variables are global and cannot be encapsulated with local variables The structure of a function is as follows Funct ionName Statements The function prototypes in
208. al data exchange runs in the background once it has been started regardless of the current command processing in the IPOSPlus program H the program is stopped the data transfer stops automatically A change of the data object will only become ac tive following an IPOSPlus program restart F5 A P STOP F9 P Start or mains 24V auxiliary operation turned off and then on again Pro SCOM TRANSMIT command can set up one data object at the most Additional SCOM TRANSMIT commands must 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 23 317 23 318 Object structure Assembler Commands Communication commands H 0 Object number CAN Bus ID The object number is used for addressing the data object The object numbers of the sender TRANSMIT and receiver RECEIVE must be the same for the data exchange H 1 Cycle time in ms Specifies the time interval after which the data is sent again Valid cycle times See _SbusCommDef page 227 Note The value 0 ms causes an error message to be issued in the return code The cycle time must always exceed the longest offset time H 2 Offset
209. alizes a data object whose data is transmitted immediately once 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 where the data to be sent begins H 3 Status of the transmission command INFORMATION Prior to transmitting acyclical telegrams the SBus must also be activated with _SBusCommOn or _SBusCommState MOVIDRIVE B The IPOSPUs program waits at this command until the message has been sent but for a maximum of 10 ms Users can only monitor whether the tele gram has been sent correctly by evaluating the state H 3 or the expected response Manual IPOSplus The following standard SEW structures are available for the _SBusCommDef state ment Instruction type Standard Elements Brief description structure _SBusCommDef 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 Cycle time ms H 1 Offset H 2 Offset time ms Format H 3 Number of data bytes and data format DPointer H 4 Number of the variable H where the data to be sent begins Result H 5 Status of
210. ame HEADER FILE NAME File cannot be opened OPEN FILE Unexpected file end reached CLOSE FILE Source text row too long LINES TOO LONG RETURN SEMICOLON Semicolon missing after return SWITCH OPEN BRACKET No open round bracket after switch or open bracket CLOSE BRACKET missing from block Close round bracket missing after switch and close brackets missing after block UNDEF IDENTIFIER Identifier after undef is invalid WHILE OPEN BRACKET Open round bracket missing after while Close round bracket missing after while 19 275 Assembler Introduction Setting the user travel units 20 20 Assembler Introduction 20 1 Setting the user travel units In the program header of the Assembler the travel distance factors NUMERATOR DENOMINATOR and UNIT can be entered to determine the user travel unit e g mm rev 20 1 1 Travel distance factors NUMERATOR 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 motor revolution The conversion is carried out as follows NUMERA TOR DENOMI NATOR Increments User travel unit
211. an be used together with the oscilloscope SCOPE function integrated in MOVITOOLS SCOPE 474 MotionStudio to record measured values 475 Scope475 Example Measurement of the actual position value of a modulo axis In the IPOS program the command SCOPE 475 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 476 DRS_Ctrl Signal level of the binary outputs of the synchronous operation board DRS11 READ and SET DRS CTRL Bit terminal level 0 X40 9 AUSGO 1 X40 10 AUSG1 2 14 Reserved 15 Set hardware fault DRS fault 48 16 31 Reserved 477 DRS_Status Signal level of the binary inputs and status signals of the synchronous operation board type DRS11 DRS STATUS READ Bit terminal level status signals 0 X40 5 INP4 free input 1 1 X40 6 INP5 Free input 2 2 DRS prewarning 3 DRS lag error 4 DRS slave in position 5 Master standstill 6 31 Reserved 478 AnaOutpIPOS2 Analog outputs of the terminal expansion board type DIO11 only SET ANA OUT IP2 The value of variable H478 is output on an analog output when the corresponding terminal is programmed to IPOS OUTPUT 2 Option DIO11 is required for MOVIDRIVE A and B for MCH and MCS MCV MCV 40A an output can be programmed as a binary output or analog output Variable value physical outputOutput terminal assignment 10000 0 10000 AOV1 A0C1 A001 P640 analog output AO1 IPOS OUTPUT 2 10000 0 10000 AO
212. an understand the project must be compiled To do so press the Ei icon or choose Project Compile Message window displayed after compilation x Status OK File O MDNAMBRUSMPOSSSum Sum sum IPC Line Class Code Length 29 words 0 4 globals 420 420 420 449 o initials 0 0 4 0 127 var 400 400 4 400 419 H used pragma D 127 450 560 1023 Run Compilieren Elapsed Time 0 40 Seconds 483686539 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 IPOSP S The compilation process was successful for our program The program is 29 IPOS words in size that is it takes up 0 4 percent of the entire IPOSP US memory capacity Close the window by choosing OK 151 13 152 Compiler Editor First steps Error messages during compilation As syntax errors can occur during programming an error reporting system has been in tegrated in the IPOSPUS Compiler If the program detects an error it displays the line in which the error occurs and generates a corresponding error message classifying the error Observe the following example
213. ands Special unit commands 23 9 Special unit commands 23 9 1 ASTOP MEM TOUCHP WDOFF WDON ASTOP AXIS STOP Structure MEM MEMORIZE The ASTOP command is used to stop or re enable the drive see H484 bit 1 The ar gument of the command RAPID STOP HOLD CONTROL TARGET POSITION de fines the stop type ramp control when stopped etc or re enables the drive IPOS EN ABLE ASTOP RAPID STOP Label M tc Condition type RAPID STOP Z IPOS ENABLE Cancel 516341515 Command structure Mxxx Label optional Mxxx ASTOP X1 Lab RAPID Braking with the rapid stop ramp followed by speed control The last target position H492 to STOP have been transmitted is retained Inhibit via control word command ASTOP IPOS ENABLE is required before the subsequent travel command The brake is applied if the brake function is activated HOLD Braking with the ramp of the basic unit P131 P133 followed by position control The last tar CONTROL get 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 Positioning stop with positioning ramp P911 P912 and calculated STOP target position POSITION only possible in the positioning mode followed by position control The last target position H492 to have been transmitted is ov
214. ariables can also occur several times in the watch window In this way a vari 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 Program Information x Program Size 0 1 Date of Creation fi 4 04 2004 loaded modul Compiler V 04 10 Application modul No Close 485608587 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 in this window Click the Open File button to display the source code for the program in the inverter in an Editor window This assumes that the name of the source file has not been changed and can be located in the path that was used to transfer the program to the inverter Manual IPOSplus 171 13 172 Compiler Editor Entering instructions 13 18 Entering instructions In principle it is possible to enter the entire source text of an IPOSPlus program by typing it in using the keyboard In this case use the syntax based on the programming lan guage C You can undo the last five entries by using the key combination Ctrl Z You can use the insert tool while you are editing the program This can be called up by pressing the right mouse button to open a con
215. art reference travel 0 DI17 IPOS input Start positioning 24 3 4 Output terminals Level Terminal Unit terminal function Meaning 0 DBOO MDX Brake Brake control via auxiliary relay 0 DOO1 MDX Ready Controller active power supply to electronics OK 0 DO02 MDX Fault no fault 0 DO10 DIO11B IPOS output 0 DO11 DIO11B IPOS output 0 DO12 DIO11B IPOS output 0 DO13 DIO11B IPOS output 0 DO14 DIO11B IPOS output 0 DO15 DIO11B IPOS output 0 DO16 DIO11B IPOS in position Drive in positioning window 0 DO17 DIO11B IPOS reference Reference travel successfully completed Manual IPOSplus 24 369 24 370 Assembler Examples Jog mode sample program 24 3 5 Program source code with remarks NUMERATOR 1 DENOMINATOR 1 UNIT Inc KIO OR RAR RIO KR RR RR RR RR RR RRR RR RR RR RK KK Sample program Jog mode File Tipp mdx Author SEW AWT Date 01 06 98 Function Jog mode endless travel possible No need to reference the axis Travel limits are observed software LS Travel speeds ramps from H310 Inputs jog DI14 jog DI15 Parameter setting P600 of inputs outputs In inverter commas specified function without inverted commas IPOS INPUT OUTPUT Terminal wiring of inputs DIOO Controller inhibit DIO1 Enable DIO2 Error reset move LS clear DI04 Referen
216. be overwritten The actual position is determined via the track signals which are active on plug connector X14 Position detection is only performed if connector X14 is used as the encoder input Unit Increments depending on the encoder resolution 511 ActPos_Mot READ current actual position motor encoder ACTPOS MOT IMPORTANT System control variable Value must not be overwritten The actual position always has the following unit regardless of the encoder pulse count per revo lution 4096 increments per motor revolution encoder resolution 512 inc exception MQx with NV26 has 24 Increments per motor revolution Manual IPOSplus 35 36 IPOS Variables Overview of the system variables Furthermore the following variables are assigned functions or reserved in MOVIDRIVE B No Name Description Compiler Assembler 512 Reserved 515 516 CCount_MotOn Activate C track zero pulse counter for motor encoder X15 0 Counter disabled 1 Counter enabled 517 CCount_ExtOn Activate C track zero pulse counter for external encoder X14 0 Counter disabled 1 Counter enabled 518 CCount_Mot Counting of the zero pulses at X15 Low word is incremented with every zero pulse at the motor encoder X15 519 CCount_Ext Counting of the zero pulses at X14 Low word is incremented with every zero pulse at the external encoder X14 520 InpLevelB Signal level of the binary
217. bject set up using _SBusCommDef SCOM The first receive object initialized in the IPOS program is assigned bit 0 the second one bit 1 etc When MOVIDRIVE receives a telegram from an initialized receive object the corresponding bit is 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 H523 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 receipt of an object To reset the bit use the BITCLEAR com mand so that receive bits in other transfers are not lost Manual IPOSplus 37 38 IPOS Variables Overview of the system variables No Name Description Compiler Assembler 524 IPOS_Setp IPOS setpoint correcting variable of the PID controller when H540 1 When H540 0 or 2 the setpoint IPOS_SETP can also be written directly from the user program H524 can be used as a torque setpoint or speed setpoint when P100 Setpoint source IPOS and P700 Operating mode 1 xxx amp M control CFC or SERVO 1 increment in H524 then corresponds to 0 21 rpm setpoint speed or 0 01 Iy torque setpoint 525 Reserved 529 530 VarintReq If the corresponding request bit o
218. ble or constant from a variable observing the Command structure Mxxx SUB X1 X2 Mxxx Label optional X1 Variable minuend and difference X2 Variable or constant subtrahend SUB HXX HYY Variable HXX is the result of the subtraction of variables HXX and HYY SUB HXX K Variable HXX is the result of the subtraction of variables HXX and a con stant K Example 1 SET H01 10SET H02 50SUB H01 H02 After the SUB command H01 60 Example 2 SET H01 50SET H02 2147483600SUB H01 H02 0x00000032 0x80000030 0 x80000002 The number range has been exceeded After subtraction H01 has the value 2147483646 Note If the number range is exceeded during subtraction the result is incorrect There is no error message 302 Manual IPOSplus Assembler Commands Arithmetic commands MUL MULTIPLY DIV DIVISION The MUL command multiplies a variable with a constant or a variable observing the signs Command structure Mxxx MUL X1 X2 Mxxx Label optional X1 Variable factor and product X2 Variable or constant factor MUL HXX HYY Variable HXX is the result of the multiplication of variables HXX and HYY MUL HXX K Variable HXX is the result of the multiplication of variable HXX and a con stant K Example 1 SET H01 3MUL H01 50 After the MUL command H01 150 Example 2 SET H01 50
219. ccordance with the MOVIMOT operating instruc tions Communication with MOVIMOT is only possible via RS 485 Control is only possible via the process data channel with 2PD 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 IPOSplus ASSEM Jl x File Edit Program Run Help EES OME I Ern Numerator 1 Denominator fi Unit Identifier ONIine Peer to peer 810 R5485 address f2 811 RS 485 group address 100 812 R5485 timeout delay 3 fo 514510219 HO 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 value at H12 H12 6 PO1 Control word H13 50 PO2 speed in percent H14 50 PO3 ramp in percent Manual IPOSplus 313 23 Assembler Commands Communication commands INFORMATION With MOVIDRIVE B and MOVITRAC B the timeout monitoring is checked for tele grams received within the defined timeout interval With MOVIMOT the timeout monitoring is activated with the first received cyclic frames ML_FT at the sender Acyclical communication deactivates the timeout monitoring of MOVIMOT Once cyclical communication has been started with the _MovComm
220. ce all strings matching the search term Click Cancel to close this win dow Manual IPOSplus 157 Compiler Editor Creating a new project 13 13 5 Creating a new project An IPOSP4S program consists of one or more source text modules Each module is stored in a separate file with the extension IPC Information about the project is stored in a project file with the extension ICP This binary file is stored and administered by the Compiler 13 5 1 Project properties Select Project Create new A dialog box appears Enter the general project charac teristics here Project properties Project Properties 21x Enter the project name 1 sum Select the project directory 2 0 MD AMBRUS IPOS Sum Browse IV Create project subfolder The project will be created in folder 3 0 MD AMBRUSMIPOS Sum Sum Directory for Hinclude directives 4 B MD AMBRUSWIPOS Sum Output directory for MDX file 5 0 MD AMBRUS IPOS Sum Browse Output directory for listfile 6 _ 0 MD AMBRUS IPOS Sum Browse OK Cancel 484369163 1 Name of the project 2 Directory of the project 3 Directory in which the project folder is created 4 Directory in which the files that are inserted using the include instruction are stored 5 Output directory for MDX file if activated 6 Output di
221. ce cam DIO3 CW limit switch DIO5 CCW limit switch DI14 Jog CW DI14 Jog CCW DI16 Start reference travel DI17 Start positioning Terminal wiring of outputs DBOO Brake DOO1 Ready signal DO16 IPOS in position DO17 IPOS reference Variables used H310 V jog CW 1 10 rpm H311 CCW H312 acceleration ramp ms H313 deceleration ramp ms H316 H319 jog auxiliary variable kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk Comment SET H310 SET H311 SET H312 2000 SET H313 2000 toll uo uw Et EN oo a D Set velocity and acceleration values for jog mode see remark Manual IPOSplus Assembler Examples Jog mode sample program Program branch distributor SETINT ERROR M10 M100 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 pro cessing reset move clear of limit switch DI16 1 Reference travel DI15 1 Jog CW DI14 1 Jog CCW M10 JMP HI I0000000000110000 MI M3 JMP HI I0000000000110000 M2 ASTOP IPOS ENABLE JMP UNCONDITIONED M3 M2 ASTOP TARGET POSITION M1 RET Reset move clear of limit switch If there is no contact with the limit switch DI05 DI06 LS C
222. cel HR 515195787 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 Command structure Mxxx JMP X1 Myyy Mxxx X1 Myyy Label optional 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 DIO2 NOT TP1 Jump if there is not an edge change at touch probe terminal D102 TP2 Jump if there is an edge change at touch probe terminal DIO3 NOT TP2 Jump if there is not an edge change at touch probe terminal D103 Jump label to which the program jumps if the condition is ful filled 23 331 23 Program commands Assembler Commands fR Edit IPOS Instruction E Fast Search Main Menu Arithmete commands Bit commands Communication commands Positioning commands Program commands Set commands Special unit commands Comparison commands UNCONDITIONED LOOPE Program loop end NOP No operation REM 2 x Sub Menu Calls Jump Jump a subroutine input terminals H lt gt 0 Jump H lt gt H Jump H lt gt K System condition
223. cess data exchange PI3 data of process data exchange The process data is coded according to MOVILINK A variable structure containing the parameter data is defined in the Compiler by the MC PARADATA variable name 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 No action or parameter data exchange is complete 1 Start of the parameter data exchange H 2 ML_S_RD 1 Read service ML_S_WR 2 Write with storage in non volatile memory ML_S_WRV 3 Writing without saving H 3 Index number of parameter to be revised or read H 4 Read data after read service Data to be written in case of a write service Proceed as follows when making parameter settings 1 Entry of service index and data Start the parameter setting process by setting StartPar to 1 2 3 Wait for the service to be performed end is indicated when StartPar is set to 0 4 Evaluate ParaResult If an error has occurred the data value is invalid If no error occurred the service was successful H First variable of the variable structure See the function MovCommOn page 229 Manual IPOSplus Compiler Functions Standard functions 17 17 3 16_ MovCommOn Syntax Description Key points Example 17 3 17 Nop Syntax Description Argument Manual IPOSpl
224. cessed with the Assembler Manual IPOSplus 155 13 156 Compiler Editor Settings for the IPOSplus Compiler Directory settings Settings 2x Editor Compiler Folders Print Execution List File Output Directory Browse MDX File Output Directory c programme sew movitools projects project Browse Hinclude Directives Directory Jc programme sew movitools projects include Browse Abbrechen 483837963 In the IPOSPS Compiler a program can either be created as a project or as an indi vidual source file If the program is created as an individual source file you must make the following set tings as shown in the window above In the List File Output Directory field specify the folder in which the list 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 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 details of the directory in which the header files linked with the include command are stored If an IPOSPUS program is created as a project the settings in the Direc
225. ckwise direction The value is given in user travel units Setting range 231 0 user units 2 1 increments 497 SLS left SLS LEFT Software limit switch CCW READ and SET H497 is identical to P921 Limits travel in a counterclockwise direction The value is given in user travel units Setting range 231 0 user units 231 1 increments 498 RefOffset REF OFFSET Reference offset READ and SET H498 is identical to P900 The reference object allows for a shift of the machine zero without physically shifting the reference mark The following applies Machine zero reference position reference offset The drive moves to the reference point during the reference travel and stops there After the reference travel the machine zero is calculated with reference point and reference offset The reference offset is given in user travel units Setting range 231 EEGEN 34 Manual IPOSplus IPOS Variables Overview of the system variables No Name Description Compiler Assembler 499 SetpPosBus Setpoint position bus READ SP POS BUS Contains the setpoint position which is sent via the fieldbus process data The setpoint position is only accepted if POSITION LO and POSITION HI are programmed in the PO data description parameter group P87_ 500 TpPos2_VE Only used in MOVIDRIVE B reserved in MOVIDRIVE A TP POS2
226. cludes getting to know IPOSPIUs if you want to make effective use its benefits Scope of this documentation The present documentation provides information on the positioning and sequence con trol with IPOSP 4S for MOVIDRIVE B With a reduced command set IPOS 4S 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 IPOSPUS for MOVITRAC B see page 118 IPOSPIUS for MQx see page 120 First the manual describes the language independent functions of IPOSP S e Position control e Position processing e Task management e Interrupt management e IPOS parameters e IPOS variables Then the documentation focuses on the programming in compiler language SEW EURODRIVE recommends that you create new programs in Compiler language All MOVIDRIVE B units can be programmed in this language Next the documentation focuses on the programming in assemble language The final section describes program examples It includes an example for beginners with the basic structure of the state machine of a sequential program We recommend that you begin with this basic structure and develop the user program from there Manual IPOSplus System Description IPOSplus features 3 1 2 Creating pr
227. control word 2 DI10 1 Free running activated DI10 0 Free running mode deactivated drive runs in synchronous operation e The current angular offset is deleted via input DI11 DRS Set zero point 109 IPOSplus and Synchronized Motion Synchronous operation with a DRS option card Sample program with IPOSPIus Compiler include lt const h gt include lt io h gt Define inputs define E Free running DI10 Input DI10 define E Set zero point DI11 Input DI11 Define outputs define A_DRS_ OUTPO 0 Output DRS X40 9 Define control bits in IPOS control word define DRS Set zero point 22 Bit 22 Free running oni 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 OUTPO 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 OUTPO 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 IA Main function IPOS initial function EE EE EE EE EE EE EE SSS ease SSS e e eene d main if E_Free running E _FreeRunning input here DI10
228. coordinated functions easy to use input boxes and finely tuned user guidance make startup easier to handle The user cannot adjust the IPOSPIUS program Overview of application modules Positioning E s P i 473361163 Winding 473365515 23 24 System Description Technology options application modules Overview of application modules Flying saw 473369867 Internal Synchronous Operation ISYNC only MOVIDRIVE B and MCH Rotatory positioning 473378571 The intelligent application modules in the technology option offer a new level of function ality All the important machine data is easily accessible There are almost no sources for 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 Manual IPOSplus System Description Technical data 3 5 3 5 1 Technical data MOVIDRIVE B Encoder resolution X15 motor encoder X14 external encoder X62 absolute encoder including absolute encoder from HIPERFACE IPOSP4s always operates with 4096 increments motor revolution Pre requisite Encoder resolution of 128 512 1024 or 2048 pulses motor revolution an
229. ctions and are referred to as system variables page 25 The symbolic names are available in the Compiler when one of the following lines is in serted at the start of the program include lt constb h gt symb name MOVIDRIVE B system variables The following table describes the function of the system variables and their names in the Compiler and Assembler Variables in the range specified that are not assigned are reserved for internal functions and cannot be used for user variables No Name Description Compiler Assembler 128 This variable can be used in a user specific IPOS program The variable is used by the application modules to store the program identification 360 variable range for This variable range is assigned additional system variables if the technology options internal synchronous internal synchro operation or electronic cam are used In all other cases these can be used by the user as required 452 nous operation or electronic cam 453 ModuloCtrl Control word for the modulo function see also modulo function and IPOS parameter MODULOCTRL _ Bit 0 TargetReset_Off Bit 0 0 The current positioning task is deleted ModTagPos is set to ModActPos if the positioning operation is interrupted for example if the enable is revoked or if the controller inhibit or stop bit is set Bit 0 1 The target position is held even if the enable has been revoked or if the controller inhibit or the stop bit has been set If the drive i
230. d Manual IPOSplus 321 23 322 Assembler Commands Communication commands Structure 23 5 6 SCOMST Structure Command structure Mxxx Label optional Mxxx SCOMON This statement initializes the CAN interface 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 SCOM function Regardless of the value for X1 with MOVITRAC B the SCOMST X1 command al ways has the same effect as SCOMON page 321 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 communication from SBus 2 STOP2 Stops cyclical communication from SBus 2 Command structure Mxxx Label optional Mxxx SCOMST X1 X1 Argument Manual IPOSplus Assembler Commands Positioning commands 23 6 Positioning commands 23 6 1 Reference travel GOO GOO The GOO command triggers reference travel or sets an absolute encoder In doing so the operating status and the 7 segment display changes from A technology option to c reference mode Operating mode P700 is not affected The argument of GOO and parameters P900 P
231. d e g active current and actual speed e Reading via PO data items e Writing with the SETSYS command e g fixed setpoint e Writing fieldbus data via PI data items e System values can also be read and written using the system variables H458 H511 for MOVIDRIVE A H458 H560 for MOVIDRIVE B e The MOVLNK command enables you to change all parameters of the directly connected inverter or to exchange parameters with other inverters via RS 485 e The MOVLNK command enables you to change all parameters of the MQX and MOVIMOT or to exchange parameters with other inverters via SBus or RS 485 Manual IPOSplus 289 22 290 Assembler Programming Basics 22 1 10 Variables All variables HO H1023 can be read and written The variables have a value range from 231 231 1 If the variables HO H127 are entered in the variable list or written in the IPOSPlus program with the MEM command they are stored in a non volatile memory as soon as they are entered Variables H458 H511 contain frequently used unit values which are updated cyclically every 1 ms These variables are referred to below as system variables and are explained in more detail in section Overview of Sys tem Variables INFORMATION Be careful when writing system variables The effects are described in the section IPOSPIUS with Options 22 1 11 Program line lt M xx gt lt Com mand gt
232. d encoders are always evaluated regardless of the operating mode P700 Operating modes with positioning VFC n CTRL amp IPOS CFC amp IPOS SERVO amp IPOS always require a motor encoder at X15 Absolute encoder on DIP11 Hiperface encoder incre Incremental encoder EE EE P941 Absolute encoder DIP mental encoder simulation Resolver Hiperface encoder yP incremental encoder P941 Motor encoder X15 P941 External encoder X14 Connection X62 DIP11 X14 basic unit X15 basic unit Actual value on variable H509 ACTPOS ABS H510 ACTPOS EXT H511 ACTPOS MOT ActPos_Abs ActPos_Ext ActPos_Mot Resolution Absolute position after conver Actual encoder resolution with Always 4096 inc motor revolu sion with 4 fold evaluation after conver tion regardless of the actual Encoder scaling P955 sion with encoder resolution Zero offset P954 Encoder scaling ext encoder Position offset P953 P944 Counting direction P951 Edge at DI02 H503 TP POS1ABS H506 TP POS1EXT H507 TP POS1MOT TpPos1_Abs TpPos1_Ext TpPos1_Mot el Edge at DI03 H502 TP POS2ABS H504 TP POS2EXT H505 TP POS2MOT p TpPos2_Abs TpPos2_Ext TpPos2_Mot Max delay time 1 ms lt 100 us lt 100 us Manual IPOSplus 53 54 Motor encoder X15 Position Detection and Positioning The position values are always available for IPOSPI4S control in the variables H509 to H511 Even if position
233. d in some cases The following section describes these differences s The parameter group P900 IPOsPlus parameters is not implemented for the MQx interface As with MOVIDRIVE A the MQx fieldbus interface provides two tasks with the same command processing times for IPOSP4S commands When using the IPOS 4S variable H511 ActPos_Mot the NV26 encoder does not count 4096 inc revolution but 24 inc revolution Not all IPOSP 4S commands can be used Manual IPOSplus IPOSplus for MQx Characteristics Starting the programming tool 11 11 2 Starting the programming tool You can access the fieldbus interface via the diagnostics and programming interface under the screw plug on the front of the MQx modules e Connect the serial interface of your PC with the programming interface of the MQx Use the UWS21A option 480461579 e Start the required programming interface via MOVITOOLS MotionStudio Refer to section Step 1 starting IPOSPYS Compiler with MOVITOOLS MotionStudio page 143 11 3 Sequence control system The following section lists all the IPOS S functions that can be used in the MQx A more detailed description of the commands can be found in the sections Compiler 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
234. d unit inhibit Reset required FR_ESTOP_F Stop via emergency stop ramp with unit inhibit Reset required FR_RSTOP_F Stop via rapid stop ramp with unit inhibit Reset 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 FR_SWOFF_F FR_ESTOP_F FR_RSTOP F Unit is reinitialized i e IPOSPIUS is re started FR_SWOFF_W FR_ESTOP_W FR_STOP_W Unit is not reinitialized i e IPOSPlus continues to run Example main _FaultReaction 26 FR_SWOFF_F Emergency stop Malfunction with ext fault 17 3 8 _GetSys Syntax _GetSys H sys Description Loads the value of an internal system value in one or more IPOSPI4S variables Key points H Name of the target variable or target structure sys Expression that designates the system value sys can adopt one of the following values 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 code according to the Error messages and list of errors table in the system manual GS_SYSSTATE Value of the 7 segment display in accordance with the table Operating mode display in the system manual GS_ACTPOS Actual position depending on the encoder selected in P941 H509 H510 o
235. dded Compile the program and then call the insert tool Press Initializing Sequence An ini tialization block is created for each structure variable that has been declared Inserting an instruction Insert Instruction xl C Construction System Function System Function s Arguments Copy FaultReaction GetSys ol og SBS ag _lnputCall xl Pre defined Structures _MoviLink MOVLNK _MoviLink MLDATA SSPOSRAMP SetSyst SSPOSSPEED _SetSys SSPIDATA3 SetSys SSPIDATAIO SBusconmDet SCREC _ x Initializing Sequence SSPOSSPEED Speed Please push button below for pasting initializing sequence for each structure variable declared in user program Please note it s possible only after running compiler Cancel Help 493929483 183 Compiler Programming User defined structures 14 14 9 User defined structures Users can define their own structures in addition to the SEW standard structures First of all the structure must be created This is done in the declaration part of the program The typedef struct keyword is used for this This can be explained by taking an example which creates a position table Define user structure typedef struct long posi long pos2 long pos3 long pos4 long pos5 table This creates a structure with the name table You can now use this structure as ex plained for the standard structures The next step is
236. ddress the outputs of the option In the example the output terminal DOO2 of the basic unit is to be set Using Bitze Using the OR operation include lt const h gt include lt const h gt include lt io h gt MOVIDRIVE A include lt io h gt MOVIDRIVE A include lt iob h gt MOVIDRIVE B include lt iob h gt MOVIDRIVE B main main _BitSet StdOutpIPOS 2 StdOutpIPOs DO02 The source 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 lt const h gt include lt io h gt MOVIDRIVE A include lt iob h gt MOVIDRIVE B define SetDO02 _BitSet StdOutpIPOS 2 main Set DOO2 If several outputs are to be set at the same time then you can either call the _BitSet function several times in succession or use the bit by bit OR logic operation for this 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 example uses the OR operation to set D001 and DOO2 at the same time Using the OR operation include lt const h gt include lt io h gt MOVIDRIVE A include lt iob h gt MOVIDRIVE B main StdOutpIPOSs DO01 DO02 246 Manual IPOSplus Compiler Examples Clearing bits and output terminals 18 2 Clearing b
237. der of the Assembler e Travel distance factor NUMERATOR 100 000 e Travel distance factor DENOMINATOR 453 All travel distance entries are displayed with a unit in the program window This unit can be entered in the program header for UNIT It can be up to five characters in length INFORMATION This is a merely symbolic entry that does not affect the functionality of the drive 278 Manual IPOSplus Assembler Introduction First steps 20 20 2 First steps 20 2 1 Starting the IPOSP S Assembler The IPOSP S Assembler is started from the MOVITOOLS MotionStudio Start the IPOSP S Assembler just like you would start the IPOS S Compiler Refer to section Step 1 Starting the IPOSPus Compiler with MOVITOOLS MotionStudio page 143 The following program interface is displayed when you start the IPOSPIUS Assembler if IPOSplus ASSEMBLER MOVITOOLS lolx N File Edit Program Run Help 1 a RF CS Se Numerator 1 Denominator fi Unit inc 5 BE ONine Peer to peer 01 1 511471115 1 Menu bar 2 Toolbar 3 Program window 4 Variable window 5 Status bar Manual IPOSplus 279 20 280 Assembler Introduction First steps 20 2 2 Creating a new program To familiarize yourself with the IPOSPIUS Assembler you will write your first program to increment a variable from 0 to 99 in steps of 500 ms IPOSplus
238. directives are generally written at the 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 standard when you open a new Editor window The include lt const h gt statement integrates a header file called const h when the source text is compiled This file has a fixed format and must not be modified Neverthe less we shall explain the function of a header file with reference to this file An abbrevi ated form of the file is printed below as this is sufficient to demonstrate the main aspects File name Const h File version 2 20 SEW Include File for IPOSplus Compiler Please do not modify this file C 1999 SEW EURODRIVE ifndef _CONST_H define _CONST_H define Scope474 H474 define Scope475 H475 define DRS Ctrl H476 define DRS Status H477 define AnaOutIPOS2 H478 define AnaOutpIPOS H479 define OptOutpIPOS H480 define StdOutpIPOS H481 define OutputLevel H482 define InputLevel H483 define ControlWord H484 Manual IPOSplus Compiler Programming Preprocessor statements Manual IPOSplus define TO Reload H485 define Reserve4 H
239. drive has moved clear of limit switch parameterized Reset input function D102 Then stop drive by setting target position to current position M20 ASTOP IPOS ENABLE AND H480 amp FFFFFFFO hex BCLR H480 5 0 GOO 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 Delete output binary coded table position Delete output Table position valid Reference travel no wait start at zero pulse as long as Controller inhibit 0 and the bit in the status word IPOS Reference RET RET M30 M40 Option Subroutine e g jog mode Jog CW Jog CCW Manual IPOSplus Assembler Examples Table positioning sample program Main program table positioning M50 SET H321 0 BMOV H321 0 H473 20 JMP H321 0 M51 RET M51 SETSYS SETSYS POS RAMP H302 SET H320 H483 ASHR H320 gt gt 6 AND H320 amp F hex JMP H322 H320 M54 BCLR H480 5 0 M54 SET H322 H320 SET H323 H320 SET H324 H480 AND H324 amp FFFFFFFO hex OR H323 H324 SET H480 H323 M53 JMP LO I0010000000000000 M52 ASTOP IPOS ENABLE GOA NOWAIT H320 JMP NOT IN POSITION M53 BSET H480 5 1 JMP UNCONDITIONED M55 M52 ASTOP HOLD CONTROL M55 RET Main program table positioning Table positions are only approached with a referenced drive DO17
240. e 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 us to store the touch probe positions regardless of ongoing program pro cessing The terminal level must have been altered for at least 200 us to be detected reliably Manual IPOSplus Assembler Commands Special unit commands 23 The argument can be used to select the edge change that causes a touch probe TOUCHP ENABLE1 Label M a Condition type ENABLE1 S DISABLE1 G ENABLE2 Help DISABLE2 ENABLE1_HI ENABLE1_LO Cancel ENABLE2 HI ENABLE2 LO x K rt 516734219 The touch probe positions are stored in the following variables Encoder Encoder position Position Position Touch probe 1 Touch probe 2 DI02 DI03 Motor encoder X15 H511 H507 H505 ACTPOS MOT TP POS1MOT TP POS2MOT External encoder X14 H510 H506 H504 ACTPOS EXT TP POS1EXT TP POS2EXT Absolute encoder X62 H509 H503 H502 ACTPOS ABS TP POS1ABS TP POS2ABS Virtual encoder only for H376 H501 TpPos1_VE H500 TpPos2_VE MOVIDRIVE B Structure Command structure Mxxx Label optional Mxxx TOUCHP X1 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 i
241. e The acceleration and torque do not increase in comparison with the linear ramp ELECTRONIC CAM Activating the technology function Electronic cam SYNCHRONOUS OPERA TION Activating the technology function Electronic cam CROSS CUTTER Activating the technology function Cross cutter SPEED INTERPOLATION The speed values sent cyclically by the external controller are interpo lated linearly Speed specification via process data Set P888 Synchronization time SBus to 5 ms or 10 ms Get the P100 Setpoint source to SBus or Fieldbus You have to set a process output data word to Speed Speed specification via SBus SCOM object Set P888 Synchronization time SBus to 1 10 ms Set the P100 Setpoint source to BIPOL FIXED SETPT You must not set a process output data word to Speed Create a SCOM receive object using the SCOM receive command IPOSP 4S manual with the target variable SetpPosBus H499 Manual IPOSplus P9xx IPOS Parameters P91x IPOSplus parameters Ramp type Positioning characteristics POSITION INTERPOLATION 12 BIT The position specifications sent cyclically by the external controller are interpolated Position resolution 1 revolution corresponds to 4096 incre ments 12 bit e Position specification using process data Set P888 Synchronization time SBus to 5 ms or 10 ms Set P100 Setpoint
242. e 4 CCW limit Switch eiieeii inek irane iiei 69 6 6 6 Type 5 No reference travel cccccceeedeecceceeeeencceeeeeteeecenenentes 70 6 6 7 Type 6 Reference cam flush with CW limit switch 70 6 6 8 Type 7 Reference cam flush with CCW limit switch 71 6 6 9 Type 8 Without enable cee ccccececcccceeeeeceeeeeeteceeeeeseeeeaneeeeeees 72 DC r MOdUlOTUNCHON fc eege ana iad cape raaa a daa eaaa eddy 73 6 7 1 ite elle de EE 73 6 7 2 Operating principe 74 6 7 3 Travel Strate Gles i eiio crea a E dane 77 6 7 4 Project Planning 2 ccccceececceeeeeeeccdeeeceeccecetecseccedenesnecedeenenneaeees 80 6 7 5 Project planning examples 80 6 7 6 Frequently asked questions sssssseeseernennseessertrnrrrnrrenesene 83 Manual IPOSplus Contents Manual IPOSplus 10 11 G Cam copntrollerg edd ea aa aean a aeaaaioii ENNEN 84 6 8 1 Standard Cam controler sipsirin ainin i 85 6 8 2 Expanded cam copntroller 89 Position Detection via Binary INPUts ccccesseeeeeeeeseeeseeeeseeeeseeeeeeeeeeeeeseeeees 96 T t Types of built in encoders siaren ainnirean RERAN 96 7 2 Principle of the position deiechon 96 7 3 Position detection with MOVIDRIVE BR 97 7 4 Position detection with MOVITRAC BR 98 7 5 Position detection With Ms 99 7 5 1 Proximity Sensor evaluation cee eeeeeeeeeeneeeeeeeenteeeeeeeenaeeeeeeeaas 99 7 5 2 DIO and DI terminal assignments ccceee
243. e Constant that specifies the wait time in milliseconds no variable possible 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 until the timer has expired Example Timer_0 20000 start value 20 s 17 3 29 _WaitInput Syntax Description Key points Manual IPOSplus while Timer 0 wait 20 s _WaitInput level mask The function waits until a specific level is present at specific input terminals The re quired polarity of the input level and the relevant terminals are given as arguments The function waits until all input terminals marked with a one in mask have a 1 level or a 0 level level Constant expression that specifies which signal level the terminals should be tested for It can adopt one of the following values 1 HIGH level 1 level 0 LOW level 0 level mask Constant binary expression which specifies the terminals to be tested The bits in the expression have the following meaning Bit 0 DIOO mask 0b1 Bit 1 DI01 mask 0b10 Bit 2 DI02 mask 0b100 Bit 3 DI03 mask 0b1000 Bit 4 DI04 mask 0b10000 Bit 5 DIO5 mask 0b100000 Bit 6 DI10 mask 0b1000000 Bit 7 D111 mask 0b10000000 Bit 8 DI12 mask 0b100000000 Bit 9 DI13 mask 0b1000000000 Bit 10 DI14 mask 0b10000000000 Bit 11 D115 mask 0b100000000000 Bit 12 DI16 mask 0b1000000000000 Bit 13 DI
244. e IPOSP 4S variables are practically an element of the language and are not allowed to be declared explicitly They all have the same data type 32 bit with sign and are valid globally throughout the entire source text The following line is present implicitly in each module long HO H1 H2 H3 H1023 To identify variables symbolically the define or declare directives can be used to de fine a symbolic name 14 16 1 Example define TESTVAR1 H73 H73 has the symbolic name TESTVAR1 H73 is then assigned the value 134 in the program from one of 3 assignments TESTVAR1 134 TESTVAR1 0x86 TESTVAR1 0b10000110 14 17 Declaration of global variables Another option is to declare global variables with the long key word as already explained above The Compiler then automatically defines the numbers 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 anywhere in the program provided it is outside of blocks generally functions For reasons of clarity variables should be declared at the start of the source text module A global variable must also be declared before it is
245. e IPOSPI S variables from H350 onwards as auxiliary variables The variables PosSpeedCW and PosSpeedCCW that are declared with the long key word are now stored in the IPOSP4s variables between H130 and H160 because of the pragma globals 130 160 command line The variables StartPosi tion and EndPosition that are declared with the initial Jong key word are now stored in the IPOSP 4S variables between H10 and H30 because of the pragma initials 10 30 command line Since they are therefore also in the variable range from HO to H127 these variables can also be stored in the non volatile memory INFORMATION The variable numbers are used without the preceding letter H when they are used within the pragma directives Manual IPOSplus 14 187 14 188 Compiler Programming Explanation of const h and io h constb h and iob h 14 13 Explanation of const h and io h constb h and iob h The const h header file defines many useful identifiers As far as beginners are con cerned only the symbolic names of the system variables are of importance initially The other identifiers are important for expert users who no longer use the insert tool This section contains the definitions of arguments for calling the standard functions Both the header file io h and the file const h are predefined files that cannot be changed The file is printed out below IA File name Io h File
246. e JOGGING fnJogging break Referencing mode case HOMING fnHoming break Positioning mode case POSITIONING fnPositioning break Programming error invalid status default AxisStop AS_ PSTOP 1GlobalStateMachine l0pMode 1 break End switch 1GlobalStateMachine End while 1 End main Manual IPOSplus 18 269 18 270 Compiler Examples Compiler programming frame Function fndogMode Jog axis With 2 inputs the axis can be moved to the right and to the left If the jog mode is activated when If the jog mode is not set the drive remains in hold control the drive is released the main state machine would spring to state 99 fndogging Instructions for entering the main state Jogging Acknowledge mode _BitSet 1PE_StatusWord 11 _BitClear 1PE_ StatusWord 12 cyclical processing as long as the main state is set to Jogging y P g do Import PO data _GetSys tPA BusType GS_PODATA if MY_JOG_PLUS amp amp MY_JOG MINUS tPosVelocities CW tPosVelocities CCW _SetSys SS POSSPEED tPosVelocities j TargetPos ActPos Mot 409600 if MY_JOG_MINUS amp amp MY_ JOG PLUS tPosVelocities CW tPosVelocities CCW _SetSys SS POSSPEED tPosVelocities j TargetPos ActPos Mot 409600 if MY_JOG_ MINUS amp amp MY_JOG PLUS MY_JOG MINUS amp amp MY_JOG_PLUS _AxisStop
247. e interrupt at a time although an interrupt with a higher priority can interrupt the processing of another interrupt ERROR has the highest prior ity then TOUCH PROBE followed by TIMER 0 An interrupt only has to be initialized once using SETINT SETINT DISABLE MO Label M Ft i Condition type DISABLE z Jump destination M Help Cancel i Fas 515362827 Manual IPOSplus Assembler Commands Set commands Structure Command structure Mxxx SETINT X1 Myyy Mxxx Label optional X1 DISABLE Deactivating the interrupt the jump flag Mxx is of no importance ERROR Triggers an interrupt in case of a unit fault The interrupt routine runs cyclically until the error has been removed at which point the routine is left using the RET command 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 e 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 e The program is restarted see the SETFR command after acknowledgment of the fault if the fault response parameter group 830 or the SETFR command is set to FAULT Any reference ID that has been set is lost TIMER 0 Triggers an interrupt when the time set in Timer 0 H489 has elapsed An auto reload
248. e output with delay compensation is set or reset depending on the four position windows defined by a CCW and CW limit value The limits of the positioning window can be altered during the execution time and will be taken into consideration with the next GETSYS command This option makes it possible to use other cam areas for the return travel in case of a reversing axis The cam output can be assigned to any bit of a variable 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 A new output will be formed with the GETSYS command regardless of whether the drive is referenced 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 Current actual position external encoder H509 current actual position SSI absolute encoder DIP11A option H455 Current actual position motor encoder in modulo format H376 Current actual position master value only for the technology functions electronic cam or internal synchronous operation The cam outpu
249. e variable is not equal to the com parison value SrcVar CompVar 4 As long as the value of the reference variable is greater than or equal to the comparison value SrcVar gt CompVar 5 As long as the value of the reference variable is less than or equal to the comparison value SrcVar lt CompVar 6 Value of the reference variable AND the comparison value is not 0 SrcVar amp CompVar 0 7 Value of the reference variable AND the comparison value is 0 SrcVar amp 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 con dition is fulfilled edge triggered 11 As 3 however interrupt is only processed once each time the con dition is fulfilled edge triggered 12 As 4 however interrupt is only processed once each time the con dition is fulfilled edge triggered 13 As 5 however interrupt is only processed once each time the con dition is fulfilled edge triggered H 5 Priority Priority of the interrupt 1 10 task 2 and task 3 are both assigned the priority 0 H 6 IntEvent Process image of the reference variable from SourceVar to the time of the interrupt See Task Management and Interrupts Variable Interrupts with MOVIDRIVE B _SystemCall event function name The function is used to call a user defined function when a system controlled even oc curs The name o
250. ect the El76 and ES16 built in encoders refer to the Drive System for Decentralized Installation PROFIBUS Interfaces Field Distributors manual 101 102 8 8 1 IPOSplus and Fieldbus Introduction IPOSP S and Fieldbus Introduction Cyclical process data and acyclical parameters are exchanged between a PLC and input output signal stations via fieldbus SBus or RS 485 For information on the supported communication interfaces refer to the respective sys tem manual For a more detailed description of the communication interfaces refer to the Commu nication and Fieldbus Unit Profile manual and the manuals for the individual fieldbuses To control the MOVIDRIVE unit via fieldbus you usually have to change the following parameters e P100 Setpoint source e g fieldbus if setpoints are to be sent via fieldbus e P101 Control signal source fieldbus if control words are to be sent via fieldbus e P870 875 process data configuration Specifies the data to be exchanged via the bus The IPOSPI4S 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 IPOSPIUS and the fieldbus are included in the Communication and Fieldbus Unit Profile manual Parameters P870 P877 can be used to set up to 3 process data words in both direc tions without an IPOSP us program Depending on the fieldbus it migh
251. ectronic 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 electronic cam in which the interpolated values are to be entered H 3 SplineNUser Value range 2 20 Number of curve points to be used for interpolation and the calculation process bit 0 bit 4 number of curve points bit 7 0 spline O bit 7 1 spline 1 H 4 SplineXOUser Only a value gt 0 can be entered here Enter the curve point no of the X axis master H 5 SplineYOUser Value range long 23 0 231 1 Y value position value of the 1st curve point when ACTPOSSCALE 0 the scaled value must be entered in the structure H 42 SplineX19User Only a value lt 512 can be entered here Enter the curve point no of the X axis master H 43 SplineY19User Value range long 231 0 231 1 Y value of the 20th curve point when ACTPOSSCALE 0 the scaled value must be entered in the structure SS_MULTIAXIS Total drive calculation of a trajectory Only available on request See also the addendum to the operating instructions Special design SK O
252. ed 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 IPOSP 4S programming If you require support in performing either of these operations contact SEW service per sonnel INFORMATION For Hiperface and SSI absolute encoders the status referenced is always set and is only reset during reference travel INFORMATION The drive reacts differently when the controller inhibit is set during reference travel de pending on how reference travel was started e If reference travel was started via a positive edge at binary input REF TRAVEL START or via the non wait IPOS command _Go0 _NW_ or Goo NW the reference travel is not continued if the controller inhibit is reset To start travel a positive edge must be set at the input REF TRAVEL START e If reference travel was started via the wait IPOS command Goo W_ or Goo W the error message F39 reference travel is generated Manual IPOSplus Position Detection and Positioning Referencing When deciding whether to reference to the reference cam or zero pulse note the follow ing points e The zero pulse moves when the motor is replaced e The reference cam could become inaccurate as a result of age wear or switching hysteresis e Ifthe reference point is determined using the zero pulse and r
253. ed debugger is a useful tool for working through a program for test purposes or for troubleshooting in individual steps To use the debugger the program must be transferred to the inverter Three different functions are available for debugging Function Symbol Key Description Execute to cur ga lt F4 gt Program is only processed up to the current cursor position sor l Single step be lt F7 gt The program line highlighted by the cursor is processed If a function is called the program branches into this function Skip T lt F8 gt If the program lines highlighted by the cursor contain a function call the system does not branch to the function and the program line is skipped Click the e 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 dur ing debugging Click the icon in the tool bar function key F9 or the Start menu command from the Run menu in the menu bar can be used to start the program from the current cursor position at any time during debugging While the program is running you can interrupt it by pressing the AlttF5 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 positioned Manual IP
254. ed in particular to replace applications in which positioning usually takes place using rapid speed creep speed by means of several proximity switches e An incremental encoder resolver on the motor for speed feedback is not required you can use a standard asynchronous motor The operating mode amp IPOS is not required e Refer to the manual Positioning with Absolute Encoder DIP11 The application module Absolute positioning is available in SHELL to perform this type of positioning task ABS absolute encoder SV System variable IPOS IPOSP S program Nihres Setpoint speed Manual IPOSplus Position Detection and Positioning External encoder X14 6 4 6 4 1 External encoder X14 The following encoders can be connected to the MOVIDRIVE A and B drive inverters on X14 To find out which encoder type your unit supports refer to the system manual or the operating instructions Hiperface encoder type AS1H ES1H or AV1H only MOVIDRIVE B or MCH e sin cos encoder type ES1S ES2S or EV1S only MOVIDRIVE B or MCH e 5V TTL sensor with DC 24 V voltage supply type ES1R ES2R or EV1R e 5V TTL sensor with DC 5 V voltage supply type ES1T ES2T or EV1T via option DWI11 Positioning on external encoder X14 It makes sense to use an external encoder for positioning to compensate any connection subject to slip or play between the drive and distance for example due to slipping wheels
255. ed jump Program loop begin Remark x Ho Label M N 0 Jump destination M N LD NOT IN POSITION TPI Help ee ea Cancel 23 7 4 Loop commands LOOP 515235723 INFORMATION Do not exit program loops with a jump command Jump commands and subroutines are allowed within a program loop This command in combination with a LOOP command creates a program loop The number of loop cycles gt 0 is specified as a constant The loop ends at the associated LOOP command Program loops can be nested If the number 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 Mxxx X1 Label optional Number of loop cycles maximum 256 LOOPB LOOP BEGIN Structure Command structure Mxxx LOOPB X1 LOOPE LOOP END command 332 This command specifies the end of a program loop that was started using the LOOPB Manual IPOSplus Assembler Commands Program commands Structure Example Command structure Mxxx Label optional Mxxx LOOPE In the example below variable HO is incremented from 0 to the value 5 in 5 loop cycles Program processing starts again with the SET HO 0 command after 5 loop cycles SE File dit ar SCC EE Numerator 1 Denominator fi Ln 515243147 23 7 5 No Operation NOP remark REM re
256. ee ee aE TAA 30 Binary outputs basic unt 31 32 36 37 BREAK ee geet hots ae eae nies 283 BUS systems aaeeea ainiin aiii i 17 Cc Cam iStance nena e 126 CANCNCOUER eier ere ddEeerge Eee NEE 139 CCount Ext encase bien adie anes 36 CCount EXON nra ev ca e ta eat 36 CCount_Mot E EE E EA 36 fonnt Motet aa aaie 36 Color Backoround 154 Control Word sieni a aa 33 Control word modulo function 29 ControlWord CTRL WOR 33 ET e TEE 15 Counting direction ienien Arkna RE 138 Cycle frequency arree a 139 D Designated USE oori ir anrr rarr REENE 17 DIO11A analog output 0 eee eeeeeeeeeeeeeeeeees 31 DIO11A analog outpute nenene eenen 30 DIO11A binary outputs nre neeeeereereene 31 DIP11A binary outputs 00 00 ceeeeeeeeeeeeeeeees 31 Directori S EE EE 156 Directory include directives nsseneeeneeee1eeae 156 DPRAM synchronization eaee eee 141 DRS11A binary inputs cceceeeeeeeeeteeeeeeeeee 30 DRS11A status message 30 DRS Cd DRS CIR 30 DRS_ Status DRS GTIATUS eee 30 E Encoder Scaling arer 139 Encoder scaling ext encoder eesse 135 Encoder iwpe 53 138 Error interrupter a e 46 Exclusion of ab 15 External encoder actual positton 35 External encoder Zero pulse nnnnnnnnnenneeneneeeea 36 External encounter Crack 36 F Fieldbus setpoint position ceeeeeteeeeeeeees 35 G Gain X controller cccccccccccceceseeaeaeeeaeaeeeeese
257. eeeeeeeeteeeeeeetttteeeeeeeee 159 EE We Ree EE 161 13 7 Setting up a project management structure eee eee eeeeeeeeeeeeeneeeees 162 13 8 Opening a Proje Ct oer erha uaea a aa dena ias 164 13 9 Handling projects with MOVIDRIVE EE 164 13 9 1 Saving a project in the inverter eee eetteeeeeeeteteeeeeeeeee 164 13 9 2 Loading a project from the meter 165 13 9 3 Calling up a project from the meter 165 13 10 Compiling a Droe 166 13 11 Compiling and downloading ceeeeeeeeeeeeeeneeeeeeeeneeeeeeeenaeeeeeeenaeeeeeeeaaas 167 13 12 Starting a program 167 13 13 Stopping a program ce ceecccecceceeeeeeeeeeeceneeceeeeeeeeeeeteeseceeecaeeeeeeeeeeeeeteees 167 13 14 Comparison with Unit 2 cece cece eeecee eee ce cece eeeeeeteceeaeaeaeeeeeeeeeeeeeeeeeneees 167 ENEE te e ET 168 13 16 Variable WiIndOW 2 aie aA A itive ee aed dea 169 13 17 Program information seesi es e i i E S 171 13 18 Entering instructions nakenin erani iee a EAA erai AEEA 172 EC NENG ru EI 173 Contents 14 15 16 13 20 Overview of the ICONS rnn nn nenne 174 Compiler Programming ccccceeeseeceeeeeeeeeeeeeeseeeneeeeeseceeeesesseceeeeeeeneeeneeenes 175 14 1 PREPrOCESSON EE 176 14 2 Preprocessor statements sssssesseentnttrerstetetttttnrttnrennesterttnrtn nnn nn nne nnt 176 ae T E s Tae OTE SEI EE E TE AE E E E E EE 178 14 4 Include folders 179 N T 179 14 0 FEUNG E 180 TAT ele EE EE 181
258. eeeeeeesteeeeeeeenaes 99 7 5 3 Position detection with built in encoder ssssesssesrrrerenesene 100 7 5 4 Encoder Monitoring asane arne eE EO 100 7 5 5 Storing the actual position ee ee eeeee eee eeteeeeeeettteeeeeeeeee 100 7 5 6 le TEE 101 7 5 7 Connecting the built in encoders 0 00 ceeeeeeeeeteeeeeeeettteeeeeeeee 101 IPOSH US and ie lB Us euer 102 BT IntrodUCtiOn ege a adie neers nasties 102 8 2 Binary inputs and outputs 2 c cece eee eeeecee cece cece eeeeeeeeteceecncecaeeeeeeeeeeneess 103 8 2 1 Fieldbus interface DIO and DI 103 8 3 Cyclical process data siai ae cgedvensstdedgendancedeshpuacadeeveeueneee 103 8 3 1 Cyclical preset process data 103 8 3 2 Cyclical user specific process data 104 8 4 Acyclical communication 105 8 5 Special features of communication via Gbus 105 8 6 Special features of communication via HA 106 8 7 Fieldbus control words and fieldbus status words sssssessenenennseeeeene 106 IPOSPUS and Synchronized Motion E 107 CS WW IntrodUCHION EE 107 9 2 Speed synchronization via master slave function cc eeeeteeeeeneees 107 9 3 Synchronous operation with a DRS option Card 107 9 3 1 Activating and deactivating the free running function 108 9 3 2 Setting the zero point for DRS11B eects eetteeeeeeeee 109 9 3 3 Activating and deactivating the offset Tunchon ee 111 9 3 4 Switching between positioning and synchronous operation
259. eeeeenaeeeeeeeaas 364 24 2 5 Setting parameters relevant to the evample 365 24 2 6 Calculating the IPOSP 4S parameiers 365 24 2 7 Input terminals saaana aaaea anaa aaeain iiai 366 24 2 8 Output terminals cccccccceeeecececceeeceeeeeeeeeeeeseteeeeeceecaeeeeeees 366 24 2 9 Program source code with remarks 367 24 3 Jog mode sample program 368 24 3 4 e Ee Ee 368 24 20 DENNIS TEE 368 24 3 3 Input terminals 00 0 cece eeceeeeceeceee cee cee cette ee seeeecaaeaecaeeeeeeeeeess 369 24 3 4 Output terminals is aee ea a ae e a 369 24 3 5 Program source code with remarks 370 Manual IPOSplus Contents Manual IPOSplus 24 4 Table positioning Sample program cecceceeeeeeeeeeeeeecnecaeeeeeeeees 372 EN MR e Te En Ee 372 E de E 373 24 4 3 Input terminals 0 0 cece cece eeeeeeecne cee eeeeeeeeeeseeeenceaecaeeeeeeeneees 374 24 4 4 Output terminals 2 00 00 cccccceceesecececeeceeeeeeeeeeeeeeeeeesecaeeaeeeeeees 374 24 4 5 Program source code with remarks 375 EE 378 13 14 1 1 1 General Information Structure of the safety notes General Information Structure of the safety notes The safety notes in these operating instructions are designed as follows Pictogram gt A SIGNAL WORD Type and source of danger Possible consequence s if disregarded e Measure s to prevent the danger Pictogram Example gt Genera
260. eees 127 H Hiperface offset X14 cccccccccccceeceeeeseeeeeeeneneaes 136 l Incremental encoder cccccccesesssseseseeseeeceeeeeeeees 53 Incremental encoder simulation ccccccceeees 53 InpLevelB INPUT LNB 36 INPUT EVLn iden dailies endian 32 36 InputLevel INPUT LVL 0 ceeeeeeeteeeeeettteteeees 32 Interrupt activation ccccceceeceeeeeeeeeeeteeeseneeees 46 INterrul Pts eigene lake techs line conete se 40 45 Interrupt error Imierrupt 46 Interrupt timerO interrupt ceeeeeeeeeeereeeees 48 Interrupt touch probe DIO2 interrupt 47 IPOS COUNTE rari cei Ree ee 35 IPOS CTRL W Task 132 IPOS CTRL W Task 2 0 0 0 cccccccceceeeeeeeeeeseeseaeeees 132 IPOS Ree 134 IPOS modulo function 140 IPOS Monitoring scrierii ieina 131 IPOS parameters nesseeeenosnnenennnreenseeesrernn renn 123 IPOS reference travel ccccccssesesseseseeeeeseeeeeees 123 IPOS Setpoint atresia ates 38 Manual IPOSplus Index IPOS special functions cceeeeeeeeeeeeeteeereeees 132 IPOS synchronization secano ar a 141 IPOS travel poarameiers 127 IPOS Variable editiran aa 134 IPOS_Setp IPOS_SETP ceeceeeeeeeeeeees 38 J Jerk He 2 see ee SE 132 L Lag distanCe nis otc E eebe ee Ee 34 Lag error WINdOW iigieeeeritiirieieeii aiie aiaia 131 Lag WINGOW a A R AAEN 34 LagDistance LAG DISTAN 34 LagWindow LAG
261. eees 22 3 4 2 Application modules 23 3 5 e Ken Ile EEN 25 3 5 1 MMO VIDE EE 25 SEN ek EE 25 3 5 3 MOK TTC 26 3 6 Reference documents 27 3 6 1 General manuals neseeneseoeeeneeenn trente terteetnttr tn nrnnnttesernrnn nne 27 3 6 2 Manuals for serial miertacesitteldbuses 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 cceeeeseeeeeeeeeeees 27 4 IPOS NEE 28 ADV WIMOGUCUON sheeted eege ue aaa aaa seecselad E EAE 28 4 2 Overview of the system variables c cccecceeeeeeeeeeeeeeeeeeecneeeeeeetitaeeeere 29 5 Task Management and Interrupts ccceceseeseeeeeeneeeeeeeeeeeeeeeeeeeeeeeeeeeneeseenenes 40 HEM Introduction EE 40 5 2 Task management for MOVIDRIVE A and B 40 53 Tasks for MOVIDRIVE EE 43 54 Tasks for MOVIDRIVE EE 43 5 4 1 Processing time for task 1 task 2 43 5 4 2 WASK 3 EE 44 5 4 3 Implementation information ccccceceeeeeeeeeeeeeeecsneeeeeeeees 44 5 4 4 Eelere Ee 45 Contents 55 InterruptSen dicen aces aa aeaa e a A Madi dans 45 5 5 1 Exame geesde eege dee aao aa a ea aae a eaa 46 5 6 Interrupts for MOVIDRIVE E tates steerer lanes a 46 5 6 1 Interrupt activation 0 0 ee eee eeeeeceeeeeeceeceeeeeeeeeeeeteteeesnnnneaeeees 46 5 6 2 Error interruptesas sd ee ees ea eet eect ete ced cad eect 46 5 6 3 Touch probe DIO2 mterupt 47 5 6 4 Timer in
262. eference cam and the zero pulse is located exactly at the end of the reference cam the switching transition of the reference cam may be detected before or after the zero pulse switching hysteresis The result may be a reference position which varies by a motor revolution from one time to the next The situation can be remedied by shifting the reference cam by about half a motor revolution e Unidirectional drives can only be referenced using a reference cam Also note that there is no defined distance between the reference cam and zero pulse of the encoder for non integer ratios This means that in this case only the end of the reference cam can be selected as the reference point e 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 e The zero pulse can only be used as a reference point when the encoder has a zero pulse the zero track is connected to the inverter and the PPR count lt 5000 inc revolution INFORMATION In case of reference travel of a drive system with absolute encoder Hiperface or DIP the position offset will be recalculated and overwritten by the reference travel P905 Hiperface offset X14 P947 Hiperface offset X15 or DIP offset P953 Position offset depending on the so
263. el depending on the set actual position source The following applies e P905 Encoder value P900 e P947 Encoder value P900 12 1 7 P906 Cam distance Parameter P906 is a display parameter It shows the number of increments between leaving the reference cam and reaching the zero pulse of the encoder set in P941 Ideally the value should be half the encoder res olution after quadruple evaluation Relocate cam if necessary The value is displayed after the reference travel 126 Manual IPOSplus P9xx IPOS Parameters P91x IPOSplus parameters 12 2 P91x IPOSP 4S parameters 12 2 1 P910 Gain X controller Setting range 0 1 0 5 32 Setting value for the P controller of the position control loop in IPOSPIUS The value from P210 P gain hold controller is adopted here in the default setting 12 2 2 P911 912 Positioning ramp 1 2 Setting range 0 01 1 20s Value set for the ramp used during the positioning operation The same ramp position ing ramp 1 is always used for acceleration and deceleration when the ramp type setting is P916 Ramp function page 128 SINE and SQUARED With LINEAR ramp function deceleration will be set depending on P917 Ramp mode page 130 e P917 Ramp mode Mode 1 Deceleration for travel to target position spot braking only takes place with positioning ramp 2 P912 Positioning ramp 1 P911 is used for all other positioning operations e P917 Ramp mode Mode 2 P
264. ence travel can only be performed by an IPOSPlus program INFORMATION If you intend to use an application module for positioning refer to the MOVITRAC B Simple Positioning Application Module manual Manual IPOSplus Position Detection via Binary Inputs Position detection with MQx 7 5 Position detection with MQx 7 5 1 Proximity sensor evaluation The MQx modules allow simple positioning based on the NV2 proximity sensor system The two proximity sensors send 24 pieces of angle information per revolution These are counted by MQx and stored in the IPOSP S variable H511 ActPos_Mot as a position ing value This allows the position to be processed in IPOS S which enables for ex ample the drive to be stopped at a specified position Creep speed must be used to reach the exact position Position control is not available INFORMATION Only one MOVIMOT can be connected to the MQx fieldbus interface for proximity sensor evaluation Only the Movcom command can be used to control the MOVIMOT 7 5 2 DIO and DI1 terminal assignments Manual IPOSplus The proximity sensor evaluation is activated by setting the parameters for the two digital inputs DIO 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 IPOSPI S POSP 4S can address any MQx parameters at addre
265. encoder X15 motor encoder H511 1 encoder X14 external encoder H510 2 encoder H509 absolute encoder DIP11A 3 virtual encoder all following values are reserved Bit 31 1 CamSource includes a pointer to one IPOSP 4S variable 231 H 6 CamDestination Pointer to target variable The bits not used in the target variables are available for other functions if you shift the outputs by four to the left with Shift Left it frees up bits 0 3 bits 4 7 are available for the cam functions and bits 8 31 are avail able for any assignment If the cam outputs are assigned to unit outputs e g H481 you will have to reserve these binary outputs with P620 P639 as IPOS out puts The bits not used in this word are available for other outputs H 7 CamOutputs Number of outputs max 8 H 8 CamData 1 Pointer to first CamOutput structure first output H 15 CamData 8 Pointer to last CamOutput structure eighth output 91 Position Detection and Positioning Cam controllers Structure CAM_EXT_OUT Variable Name Description H 0 DeadTime Delay time compensation for this channel 500 ms 0 500 ms to compensate the delay time of an actuator 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 H 1 CamAreas Number of positi
266. er P110 is set to 1 22 3 1 Reading analog inputs outputs The status of the analog inputs outputs of the basic unit and the DIO11 terminal expan sion board can be written to variables of your choice using the GETSYS command First enter the variable into the GETSYS command followed by the system value here AN ALOG INPUTS or ANALOG OUTPUTS The first input output is written to the variable entered in the GETSYS command Hxxx whilst the second is written to the subsequent variable Hxxx 1 Example Command GETSYS H310 ANALOG INPUTS H310 contains the value of the analog input Al H311 contains the value of the analog input Al2 22 3 2 Setting analog outputs INFORMATION Prerequisite for setting The corresponding analog output P640 and P643 must be set to IPOS OUTPUT 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 296 Manual IPOSplus Assembler Commands General information 23 23 Assembler Commands 23 1 General information The result of the calculation operation is always assigned to the left hand argument always a variable The second argument variable or constant always remains unchanged The result of a mathematical operation is always a whole number The bit instances
267. er loop control for processes with a continuous material flow 47 Task Management and Interrupts Interrupts for MOVIDRIVE A and B 5 6 4 TimerO interrupt The entire interrupt routine is run through once when the timer has elapsed 0 After one run through an Assembler command from task 1 is processed before the system checks whether the time 0 Once the condition is fulfilled processing branches back to the interrupt routine The cycle time can be set in variable H485 TO_Reload to trigger a mert interrupt at equal intervals This cycle time is used to reload the timer0 automatically when it occurs in the interrupt routine INFORMATION Since the timerO counts backwards the interrupt condition would be fulfilled perma nently if TO_ Reload 0 and the value of the timer has not been changed in the inter rupt routine Sample This results in the following options e Ifa program section is to be processed at equal intervals with the timerO interrupt the timerO must be reloaded with the TO Reload for example e Ifa program section is to be run through once with the timerO interrupt at a defined time after IPOS has been started the mer must be set to 1 in the interrupt fnTimerInterrupt HO HO 1 TO Reload 10000 Reload timer 0 automatically with 10 s _SetInterrupt SI_TIMERO fnTimerInterrupt Activate interrupt main HO is increased by 1 every 10 s while 1
268. er value is converted to the modulo actual position H455 For H456 IPOS encoder value MOD P961 x P963 H455 H456 P961 x P963 x 216 prerequisite H453 bit 1 0 See section Modulo positioning If 0 is written to H456 H455 is set automatically to 0 Manual IPOSplus 29 IPOS Variables Overview of the system variables No Name Description Compiler Assembler 473 StatusWord The status word can be used to query the operating status of the inverter STAT WORD Bit function with level 1 Bit function with level 1 0 No function 13 Imax signal P442 1 Malfunction 14 Motor utilization 1 2 Ready 15 Motor utilization 2 3 Output stage on 16 DRS prewarning 4 Rotating field ON 17 DRS lag error 5 Brake released 18 DRS slave in position 6 Brake applied 19 IPOS in position see also H493 7 Motor standstill from n lt 20 rpm 20 IPOS referenced 8 Parameter set 21 Reserved 9 Speed reference P400 22 IPOS fault 10 Speed window P410 23 Reserved 11 Setpoint actual comparison P420 24 Current limit reached 12 Current reference P430 25 LSM commutated 26 S pattern profile is generated 27 Inverter in safe stop 28 31 Reserved If the actual position of the drive is within the position window around the target position the IPOS in position bit is set even when the enable signal is removed or the controller inhibit is acti vated 474 Scope474 These two variables c
269. erencing 6 6 1 Type 0 Reference travel to zero pulse The reference position is the first zero pulse CCW of the starting position of reference travel A reference cam is not required Only P902 Reference speed 2 is used for reference travel If reference travel is started via the positive edge at the REF TRAVEL START input P904 Reference travel to zero pulse should be set to YES If the reference travel is started via the IPOSP US command Goo the argument Zp should be set P904 is irrelevant If P904 NO in the first case or if the argument CAM is used in the second case the drive behaves like with type 5 and sets the current position to the reference reference position A D 3 nRef1 GI j nRef2 n RefOfiCAM _ Beier MZP RefzP X LHWLS RHWLS gt 476740875 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 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 o
270. erve the unit specific command structure page 222 exchange via RS 485 or system bus _MovCommDef Process data transfer via RS 485 x page 227 Especially with MQx MOVIMOT _MovCommOn Start of process data transfer via x page 229 RS 485 _SBusCommDef Definition of process data exchange X x page 230 via system bus _SBusCommOn Start of process data transfer via X X page 234 system bus _SBusCommState Start of process data transfer via X X page 234 system bus 17 2 3 Standard positioning functions 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 17 2 4 Standard program functions Command Function Availability Reference MOVIDRIVE E MOVITRAC B MQx _InputCall Calls a defined function when spe x x X page 220 cific selected bits are set or deleted at the input terminals _Nop No operation x x X page 229 _SystemCall Calls a defined function when the X X page 241 system even occurs _SetTask Defines a function as task 2 or task X only for task 2 page 238 3 and starts or stops it _SetTask2 Defines a function as task 2 and x x X page 239 starts or stops it _Wait Waits for a specified period X x x page 243 _WaitInput Waits until a certain level is present X x X page 243 at certain input terminals _WaitSystem Waits until a system e
271. erwritten by the stop position No inhibit via control word no ASTOP IPOS ENABLE command required before the subsequent travel command The brake is not applied if the brake function is activated Note Since the actual position is used as the setpoint position at standstill the command cannot be processed cyclically This is the case in axes with process forces or hoists because otherwise the axis drifts slowly out of position IPOS The inhibit is revoked using the IPOSP S control word ENABLE The MEM command makes it possible to save load IPOSPlus programs and or vari ables in from the non volatile memory on to the unit The action is specified via the argument INFORMATION When using the MEM command note that the variables stored in the non volatile memory HO 127 and all parameters are not written cyclically This is because the number of storage operations with the storage medium EEPROM is restricted to 10 storage operations Manual IPOSplus 23 349 23 350 Assembler Commands Special unit commands Structure Example TOUCHP TOUCH PROBE Individual variables can also be stored using the MOVILINK command Label M I Condition type NOP x STORE ALL Hel LOAD ALL Ee STORE PRG LOAD PRG Cancel STORE DATA LOAD DATA 516345867 Command structure Mxxx Label optional Mxxx MEM
272. es Integrated IPOSP S positioning and sequence control IPOSP YS units do not required any additional hardware Program creation in a high level language Symbolic variable names 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 the MOVITOOLS MotionStudio software package Manual IPOSplus Compiler Editor First steps 13 13 2 First steps This description is intended to help you familiarize yourself with the programming of the IPOSPlus Compiler as quickly as possible You are given an introduction into the basic functions of the Compiler by means of an example which is created and developed step by step from one chapter to the next This introduction is based on the assumption that you are familiar with a conventional Windows operating system and standard Office applications The introduction comprises the following 4 steps Step 1 Starting IPOSP S Compiler with MOVITOOLS MotionStudio This section illustrates the basic steps for starting the IPOSPus Compiler via MOVITOOLS MotionStudio Step 2 Creating a new project This section ill
273. ess H 2 Format process and or parameter data H 3 Service read write service H 4 Index number of the parameter to be modified or read see parameter index directory H 5 DPointer Number of the variable H from which the read data is stored or from where the data to be written is obtained This means it is the first variable number of the data structure H 0 Contains the data for the parameter write services H 1 Contains the data that is read by a parameter service H 2 PO1 data of process data exchange H 3 PO2 data of process data exchange H 4 PO3 data of process data exchange H 5 PI data of process data exchange H 6 PI2 data of process data exchange H 7 PI3 data of process data exchange H 6 Result Contains the error code after the parameter service has been executed or contains zero if there was no error The following standard SEW structures are available for the _MoviLink statement Instruction type Standard Elements Brief description structure _MoviLink MOVLNK BusType H 0 Possible bus types ML_BT_SO 1 RS485 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 Specificati
274. etection of external encoder setting range 5 ms 31 ms EncType 0 encoder X14 1 DIP encoder Numerator Numerator for user scaling Value range 215 0 215 1 Denominator Denominator for user scaling Value range 1 215 1 DPointer Pointer to result variable H GSPODATA10 Bus types 0 reserved 1 SO RS485 1 2 S1 RS485 2 3 Fieldbus 4 reserved 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 POY Process output data 9 PO10 Process output data 10 Unit specific characteristics Element Unit specific characteristics MOVIDRIVE B MOVITRAC B BusType H 0 GS_BT_SO RS485 at XT only GS_BT_S1 RS485 at X13 GS_BT_S1 RS485 at FSC FIO11B GS_BT_FBUS 3 fieldbus option GS_BT_SBUS1 SBus at FSC FIO21B GS_BT_SBUS1 SBus at X12 GS_BT_SBUS2 via DFC11B Manual IPOSplus Compiler Functions Standard functions 17 Example 17 3 9 _Go0d Syntax Description Manual IPOSplus include lt const h gt GSAINPUT Ain main _GetSys Ain GS ANINPUTS Read analog inputs into structure Ain _Go0 type This command triggers reference travel of the axis The argume
275. etwork 1 Set up a communication channel e g serial to communicate with your units For a detailed description on how to configure 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 D RH S xX Se 1 1132720523 Proceed as follows to start the IPOS S Compiler via MOVITOOLS MotionStudio 1 Mark the device you want to start the IPOSP S Compiler for 2 Right click to open the context menu 3 Start the IPOSP S Compiler via the following menu item Programming IPOS Compiler 3 CA Serial COM 1 a e Gap 1 IPOS Compiler Offline 2 IPOS Assembler Offline KE 3 Parameter tree Offline 2 Comparison Offline Startup Application modules gt gt Programming BS IPOS Assembler Offline gt gt Technology editors ES IPOS Compiler Offline Diagnostics IPOS manual Offline Automotive Show online unit status Assign configured unit Manage unit parameter set gt Remove x DEI SI Properties 2123686283 Manual IPOSplus Compiler Editor First steps 13 The IPOSP 4S programming interface opens IPOSplus COMPILER MOVITOOLS B 1 Fte tit Search Project Run Display Options Window Help DEE Cea Roe RAA F CRC Xse s e Ei Project 3 4 5 Sasa
276. f a variable interrupt is set a variable interrupt is triggered irrespective of VARINTREQ the actual interrupt condition The relevant variable interrupt must be activated beforehand Bit 0 Request for variable interrupt 0 Bit 1 Request for variable interrupt 1 Bit 2 Request for variable interrupt 2 Bit 3 Request for variable interrupt 3 540 PID Mode Operating mode of the PID controller H540 and P260 are identical PID MODE 0 Controller deactivated default 1 Control active 2 Step response open control system 541 PID_K_p PlD controller Factor of the proportional component H541 and P263 are identical 3 decimal places 0 lt PID KP Kp lt 32000 32 000 default 1000 1 0 542 PID _Outp_P P D controller Current value of the controller s P component PID OUTPP 543 PID_Outp_l PID controller Current value of the controller s l component PID OUTPI The value for the l component is in the high word the internal components for decimal places are in the low word for example H543 0x30000 gt l component 3 544 PID_Outp_D PID controller Current value of the controller s D component PID OUTPD 545 PID_Feedf PID controller precontrol value H545 and P266 are identical PID FEEDF 32000 lt Precontrol lt 32000 default 0 546 PID_Command PlD controller Setpoint H546 and P271 are identical PIDCOMMAND When P270 0 Parameter P271 H546 contains the required process setpoint 32000 lt Setpoint
277. f the function and the required event are given as arguments event Constant expression that specifies when the function name is called This expression can adopt one of the following values SC_UC Unconditional SC_NO When the speed is zero SC_N When the speed is not zero SC_NOTPOS If not in position SC_TP1 If there is an edge change at touch probe terminal DIO2 SC_NTP1 If there is no edge change at touch probe terminal D102 SC_TP2 If there is an edge change at touch probe terminal DIO3 SC_NTP2 If there is no edge change at touch probe terminal DI03 function name Name of the event function Important In contrast to a function call only the name of the function without is specified here 241 Compiler Functions Standard functions 17 Example include lt constb h gt SpeedZero Event function Statements of the event function main while 1 Main program task 1 _SystemCall SC_NO SpeedZero if speed zero call function 17 3 27 _TouchProbe Syntax _TouchProbe action Description Enables or locks a touch probe input Touch probe inputs are the input terminals D102 and DIO3 It takes 100 us to store the touch probe positions regardless of ongoing program pro cessing The terminal level must have been altered for at least 200 us to be detected reliably The argument can be used to select the edge change that causes a touch probe If an edge c
278. f the gear unit and the ad ditional gear Modulo denominator Denominator gear unit i x denominator additional gear i 12 7 4 P963 Modulo encoder resolution Setting range 0 4096 65535 gplus Resolution of the selected IPO encoder system in increments The IPOSP 4S encoder resolution for positioning to the motor encoder will be set to 4 096 increments prerequisite is an encoder resolution of 512 to 2 048 140 Manual IPOSplus P9xx IPOS Parameters P97x IPOS synchronization 12 12 8 P97x IPOS synchronization 12 8 1 P970 DPRAM synchronization Setting range ON OFF MOVIDRIVE B allows for synchronized operation with option cards e g DHP11B DFE24B ON Synchronized operation with option card is activated Important The inverters may either be 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 P971 Synchronization phase Setting range 2 0 2 ms Time interval between clock signal and data transfer Manual IPOSplus 141 13 142 Compiler Editor Technical features 13 Compiler Editor 13 1 Technical featur
279. formation about them An identifier is understood to be the name that can be adopted by a Macro identifier Define section a symbolic variable name or a function name Only letters numbers and an underscore can be used in an identifier and the identifier must start with a letter or an underscore An identifier can be up to 32 characters in length The following identifiers are valid TerminalX13_4 Setpoint1 _Control_word The following names are not identifiers TerminalX13 4 Setpoint 1 1st setpoint 1_Input My function ThisldentifierNamelsMuchTooLong INFORMATION The IPOSP 4S Compiler is case sensitive 14 15 Constants The IPOSPUs Compiler supports various types of constants which are differentiated 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 Ox string binary constants with the Ob string Here are a few examples Decimal constants Hexadecimal constants Binary constants 123 0x23 35 dec 0b000100 4 dec 50 Oxabc 2748 dec 0b10 2 dec 030 OxFFFFFFFF 1 dec 0611111111 255 dec Manual IPOSplus Compiler Programming IPOSplus variables in the Compiler 14 14 16 IPOSP 4S variables in the Compiler Th
280. fset REF OFFSET assseseeseenrneeeseeeerene 34 RESON GP tices nt i ede ned i eee eben 53 S Safoty NOES cessie aE Stee 16 Safety NOES eti ara Aa T TAT 14 SCOPE individ nina a a N 30 Scope474 SCOPE A 4 30 Scope475 SCOPE Ab 30 Setpoint Position ceeeeeeeeeeeceeceeceeeeeeeeeeeeeeees 34 Setpoint position fieldbus ceeeeeeeee 35 SetpointPos SETP POS ccccccceeeeteeeeeeeee 34 SetpPosBus SP POS BUS eee 35 SLS_left SLS LEF Triine a a e 34 SLS_right fGLGRIGHT 34 Software limit switch CC 34 Software limit switch CN 34 SPO NU e aeae reei raara ie elana a ai aae 157 Speed task A 132 ee RE 133 STAR Tarakun EE 283 Status word GCONM ieina rennara anean 37 StatusWord STAT WORD oo 30 StdOutpIPOS STD OUT IP ee 31 Manual IPOSplus Index STEP anita denis gee Aad 283 Structure of the safety notes 0 ec eeeeeeeeee 14 SW limit switch CO 131 SW limit switch CAN 131 Synchronization ohase 141 Synchronous encoder counting direction X14 136 Synchronous encoder type 131 135 Syntax display oea E 154 Syntax highlighting eiieeii 154 T Target Group eei EEEREN 17 Target POSition isni ENEE 34 TargetPos TARGET POS oseese 34 Task implementation Information 44 Task management eeeeeeeeeeeeerresseeerrssrrerrsses 40 Task processing time ceeeeeeeeeeeeeeeeeeeeenteeeees 43 Task speed y e a aea a aa ae 157 Task ET 44 Tasks for MOV
281. g the program structure x Main Function Interrupt IV Initialisation part IT Add Interrupt Source Task 2 System unit eg zl J Add Function Name Function Name Task 3 J Add Function Name ffak3 CS Cancel 482809355 In the main function group mark the Initialization part check box Once you have left the dialog box by confirming your entry with OK the Main function is automatically generated with the initialization part The source file now has the following content Se ee dee include lt constb h gt include lt iob h gt VA solos eo ea ee de ease ee Seeks Main function IPOS initial function EE main rence ates pea ay re ee ee Initialization d EE Sy ee EE ee ee Sed BP oy te SS ee eS eee eee oe Se Se ER Main program loop aas tt rd eee bee se Soe ee ese epee eee S while 1 The include lt constb h gt command for MOVIDRIVE B inserts the header file which defines the arguments for all the system functions The include lt iob h gt command for MOVIDRIVE B inserts a file containing the definitions of the digital inputs and outputs These constants and definitions can be ac cessed directly during programming Manual IPOSplus 147 Compiler Editor First steps 13 The Main function contains an initialization part and the main program loop This is a correct program that could be run but it does not
282. gram You can start task 1 using the lightning symbol in the toolbar or using the keypad P931 Initialize and start task 2 and task 3 using program com mands Task 3 is only available with MOVIDRIVE B The interrupt is initialized using program commands and triggered using an interrupt event If you stop task 1 using the STOP icon in the toolbar this stops the entire IPOS processing The DBG keypad can be used to stop all tasks by setting parameter P931 to STOP When P931 STOP only task 1 is stopped After a restart the program continues where it was interrupted Manual IPOSplus Task Management and Interrupts Task management for MOVIDRIVE A and B Manual IPOSplus Toolbar for MOVIDRIVE A EJ sro cosa kee Ree F 1 2 3 4 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 Toolbar for MOVIDRIVE B PSTOP j PsToP owt RL sc SC Si Ee 1 2 3 4 5 474186507 1 Status of task 1 PSTOP stopped 2 Status of task 2 PSTOP stopped 3 Status of task 3 PSTOP stopped 4 Lightning icon to start task 1 5 STOP icon to stop the entire IPOS processing IPOSP S processes a task cyclically A task starts with the first command again once the last command has been completed If you only want to execute an initialization rou tine in task 1 once
283. gram and variables MEM_LDALL Loads program and variables MEM_STPRG Saves program only MEM_LDPRG Loads program only MEM_STDATA Saves variables only MEM_LDDATA Loads variables only INFORMATION When using the _Memorize command with MOVIDRIVE A and MCO7B note that variables stored in the non volatile memory HO 127 and all parameters are not writ ten cyclically This is because the number of storage operations with the storage me dium EEPROM is restricted to 10 storage operations This restriction does not apply to MOVIDRIVE B Manual IPOSplus 221 17 222 Compiler Functions Standard functions Example 17 3 14 _MoviLink Syntax Description main _Memorize MEM STDATA Save variables HO H127 to EEPROM _MoviLink H The MOVLNK command allows extensive changes to be made to the inverter parame ters and any other units which may be connected via the system bus or the RS 485 To ensure the safety of people and systems take particular care when changing the in verter parameters In all cases higher level safety precautions must be able to intervene to counteract any possible programming errors When the command is called MOVLNK reads and writes process data variables or pa rameters from one unit to another once or reads or writes variables or parameters within a unit once The parameters are read written using index addressing For the corres
284. gram 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 INFORMATION The circuit gain for position control of IPOSPlus parameter P910 Gain X controller was preset during startup of the speed control loop This presetting means positioning control is performed with the motor encoder The difference in encoder resolution or the time characteristics of the absolute encoder e g laser distance measuring instru ment may require a lower value setting Manual IPOSplus Position Detection and Positioning Referencing Set a maximum of half the value of the calculated preset value If P955 is 2 32 only enter a quarter of the calculated preset value Start an IPOSP US program with a positioning operation between two valid points at moderate speed Reduce or increase parameter P910 Gain X controller step by step until the best movement and positioning charac teristics have been set If P955 is set to a high value it may be necessary that values in P910 are lt 1 The position value provided by the absolute encoder is available in variable H509 ACT POS ABS The position value can be processed with the internal IPOSPI4S control even without direct positioning 6 6 Referencing Manual IPOSplus For applications using absolute positioning commands you must define the reference point
285. group P160 P170 can be altered in steps of 0 1 rpm using the IPOSP S program even during travel if there is no controller inhibit Note The new fixed setpoint is only adopted after 5 ms You may want to delay program processing after a SetSys command with a wait command 5 ms If the fixed setpoint value exceeds the permitted range the algebraic sign changes N11 Internal fixed setpoint n11 N12 Internal fixed setpoint n12 N13 Internal fixed setpoint n13 N21 Internal fixed setpoint n21 N22 Internal fixed setpoint n22 N23 Internal fixed setpoint n23 PI DATA Process input data according to the fieldbus unit profile H Number of PI data items H 1 PI data 1 H 2 PI data 2 H 3 PI data 3 OP MODE _ Sets the operating mode The operating mode can only be changed within the same control procedure CFC or SERVO even during travel if there is no controller inhibit 11 CFC speed control 12 CFC amp torque control 13 CFC amp IPOS positioning 14 CFC amp synchronous operation DRS11A 16 SERVO speed control 17 SERVO amp torque control 18 SERVO amp IPOS positioning 19 SERVO amp 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 also be made during travel POS RAMP Positioning ramps up down settings can also be made during travel only for the
286. hange occurs on the enabled input the current actual positions are saved in specified IPOsPlus system variables To take another measurement the touch probe must be enabled again The touch probe positions are stored in the following variables Encoder Encoder position Position of touch Position of touch probe 1 D102 probe 2 D103 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 encoder X62 H509 ActPos_Abs H503 TpPos1_Abs H502 TpPos2_Abs Virtual encoder only for H376 H501 TpPos1_VE H500 TpPos2_VE MOVIDRIVE B Key points action can adopt one of the following values TP_EN1 Enables the touch probe input DIO2 TP_DIS1 Inhibits the touch probe input DI02 TP_EN2 Enables the touch probe input DIO3 TP_DIS2 Inhibits the touch probe input DI03 TP_EN1_HI Enables the touch probe input DI02 with rising edge TP_EN1_LO Enables the touch probe input D102 with falling edge TP_EN2_HI Enables the touch probe input DI03 with rising edge TP_EN2_LO Enables the touch probe input DIO3 with falling edge 242 Manual IPOSplus Compiler Functions Standard functions 17 Example main _TouchProbe TP_EN1 Enables the touch probe input DI02 17 3 28 Wait Syntax _Wait time Description Waits for the period in milliseconds ms specified in a constant Key points tim
287. he argument for the com mand The variable is defined by the MOVCOM variable name and has the following structure 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 MOVIMOT ML_FT_3 Pd Pointer H 3 Number of the variable H in which the process data is stored or from which the data to be written is obtained The data structure for H is described in detail below Para Pointer H 4 Number of the variable H in which the parameter data is stored or from which the data to be written is obtained MOVIMOT does not support this function 17 227 17 228 Argument Example Compiler Functions Standard functions A variable structure containing the process data is defined in the Compiler by the MCP DATA variable name H 0 H 1 H 2 H 3 H 4 H 5 H 6 Data structure for H Contains the error code after connection or zero if there was no error 0x05000002 indicates the connection has timed out PO1 data of process data exchange DI data of process data exchange PO2 data of process data exchange PI2 data of process data exchange PO3 data of pro
288. he software limit switches are only monitored in the amp IPOS P700 operating modes If P838 Fault response SW limit switch is set to Fault then a drive with incremental encoder is no longer referenced after a fault reset whereas a drive with absolute encoder is still referenced If the drive is not referenced the software 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 prevent this from happening Deactivation Set both parameter values to 0 for endless travel so that the software limit switch function is deactivated 12 3 2 P922 Position window Setting range 0 50 32 767 Inc The parameter defines a distance range position window around the target position of a travel or STOP command The Axis in position YES condition applies if a drive is inside the position window around the current target position H492 The Axis in posi tion information is used as a final condition for waiting positioning commands It can be used further as an output terminal function 12 3 3 P923 Lag error window Setting range 0 5000 231 _4 Inc The lag error window def
289. hen two options are installed at the same time with terminal expansion Manual IPOSplus Assembler Programming Binary inputs outputs 22 2 2 Binary outputs Reading binary outputs Setting the binary outputs Manual IPOSplus The terminal level of the binary inputs in the basic unit and any installed option are rep resented cyclically in the system variables H482 OUTPUT LVL MOVIDRIVE A H521 OUTPUT LVL B MOVIDRIVE B In the process the bits of the H482 system variable are each assigned to one hardware output The individual terminal levels of binary outputs can be evaluated with the BMOV com mand in the IPOSPus program The BMOV command copies a bit from system variable H482 OUTPUT LVL H521 OUTPUT LVL B to any bit position significance of an other variable The terminal level of output DOO2 is queried using the following sample program To do this bit 1 of system variable H482 is copied to bit 0 significance 2 of H200 This makes it easy to query 0 or 1 the terminal level with a JMP command SET H200 0 BMOV H200 0 H482 1 JMP H200 1 Mxx Alternatively 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 DOO2 is queried using the following sample program M1 SET H200 2 AND H200 amp H482 JMP H200 M1 The result
290. hes digital output DO 1 on and off every 2 seconds Requirements Mains connection and or 24 V supply backup voltage terminals X10 9 24 V VI24 and X10 10 0 V DGND connected no need to connect the motor and encoder no motor movement 1 No startup required for the speed control 2 Set the output in Shell P621 Binary output DO 1 IPOS OUTPUT 3 Start the Assembler 4 Open activate the Program window 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 e The task 1 display in the program header changes from PSTOP to START e The program pointer runs in the program window e In Shell the display parameter P052 output terminal DO 1 changes between 1 and 0 every 2 seconds Assembler program window IPOSplus ASSEMBLER MOVITOOLS B_ loj x File Edit Program Run Help start estor este OE Te a E ar Numerator f1 Denominator 1 Unit inc u 0 u IW 0 W WW ia af File O MD AMBRUSSIPOS fla _z 516819723 The program consists of 3 remark lines two dashed lines to highlight the program name and one line for the pro gram name Set output DO02 X13 3 to 0 Wait 2 seconds Set output DO02 X13 3 to 1 Wait 2 seconds
291. ical frame types are possible but _MovCommDef is recommended Structure Command structure Mxxx Label optional Mxxx MOVLNK X1 X1 Starting variable of the command structure MOVLNK HXX The MOVLNK command is performed using the command structure data starting in variable HXX Parameter set Description see Parameter settings for the sender master page 225 tings for the sender master Parameter set Description see Parameter settings for the receiver page 226 tings for the receiver 310 Manual IPOSplus Assembler Commands Communication commands 23 Example 1 Reading an internal unit parameter analog input Al1 The following IPOS 4S program and parameter setting are used to read the display pa rameter P020 with the index number 8331 and then to write it to variable H011 The vari able structure has been entered here in the editing window for variables The variable structure can also be created in the program using SET commands File Edit Program Run Help dE Numerator 1 Denominator 1 Unit ji H1 Address 28 H2 Frametype 25656 H3 Service Si H4 Index 0 HS D Pointer 12 H6 Returncod 83886082 H 0 Oe o y H10 H Hil sl Peer to peer D 1 Program ly 514449547 HO Bus Type 5 SBus not relevant H1 Address 253 own address H2 Frametype 134 only Para H3 Service 1 Read H4 Index 8331 Index of P020 H5 D Pointer 10 Data po
292. ich for example variables are initialized Also select the Add check box for task 2 task 3 if a basic structure for task 2 task 3 is to be created In this case it is also possible to enter the function name for task 2 task 3 which is then directly adopted in the 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 to be an interrupt for an error timer or touch probe The specified function name is adopted in the basic structure as the name of the interrupt function A statement line for activating the interrupt routine is inserted in the initialization part Click the OK button to complete the process of selecting the program structure If you click the Cancel button to complete the selection process the program displays an empty editor window without a program structure This is required for example for cre ating your own header file Manual IPOSplus 159 Compiler Editor Creating a new project 13 For instance if a structure with an initialization part and a task 2 is selected in which task 2 is to have the function name Monitoring the resulting
293. identifier name Code NOT FOUND position 493925131 14 7 declare This directive allows IPOSP S variables to be declared symbolically and relative to a base variable This facilitates the portability of source text modules as far as assigning variable numbers is concerned because the user only has to change the number of the base variable in order to change all the variable numbers used in the source text In this way it is easier to integrate preconfigured modules into your own source text pro vided that these modules have relative variable numbers Syntax declare IdentifierNew IdentifierOld Offset The following example illustrates this function define basevariable H100 declare setpoint basevariable 0 declare actvalue basevariable 1 declare i basevariable 5 The following variables are now available as symbolic variables setpoint actual value and i Furthermore it also specifies that the IPOSP 4S variables H100 H101 and H105 are assigned 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 directives However this remains quite difficult to handle because the user needs to have an overview of which variables have been occupied and which are still available As a result it is a good idea to use structures SEW standard structures or user defined struct
294. ificant byte of the high word Calculation H 4 or MOVILNK Index Index SubIndex lt lt 16 DPointer H 5 Number of the variable from which the read data is stored or from which the data to be written is obtained structure MLDATA Result H 6 Contains the error code after the service has been performed or contains zero if there was no error see Parameterization Return Codes in the Communication and Fieldbus Unit Profile manual with parameter list MLDATA WritePar H 0 Parameter that is sent for write services ReadPar H 1 Parameter that is sent for read services PO1 H 2 Process output data 1 PO2 H 3 Process output data 2 PO3 H 4 Process output data 3 PI1 H 5 Process input data 1 PI2 H 6 Process input data 2 PI3 H 7 Process input data 3 Manual IPOSplus 23 309 23 Assembler Commands Communication commands The following table shows the elements with unit specific characteristics 2 RS485 at X13 5 SBUS at X12 8 via DFC11B Element Unit specific characteristics MOVIDRIVE B MOVITRAC B MQx BusType H 0 only only only 2 RS485 at FSC FIO11B 5 SBUS at FSC Fl021B 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 Cycl
295. in the 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 Downloading the project data does not automatically download the compiled IPOSP 4S program 164 Manual IPOSplus Compiler Editor Handling projects with MOVIDRIVE B 13 13 9 2 Loading a project from the inverter Choose Project Upload to load a project stored in the inverter to the PC laptop Enter name for the project folder Please choise the directory for the project folder E temp Browse Cancel 484532491 You can enter the name of the project folder in a dialog box Select a target directory via the Browse button If a project file with the same name already exists in the directory the system asks whether it should overwrite this file If there is no project data in the inverter the process is canceled 13 9 3 Calling up a project from the inverter Manual IPOSplus 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 mem
296. in the variables and constants have the numbers 0 31 The least significant bit has the number 0 23 2 Overview of commands 23 2 1 Arithmetic commands This program group lists all arithmetic and logical commands Command Key points Description see ADD H H Arithmetical addition ADD H K page 302 AND H amp H Logical AND AND H amp K page 304 ASHR H H Arithmetic gt gt H Arithmetic shift to the right ASHR ARITHMETIC SHIFT H H Arithmetic gt gt K page 306 RIGHT DIV H H Division DIV DIVISION H K page 303 MOD H mod H Modulo Division remainder MOD MODULO H mod K page 304 MUL H H Multiplication MUL MULTIPLY H K page 303 NOT H NOT H Bit by bit negation NOT page 303 OR H H Logical OR OR H K page 304 SHL H H lt lt K Bit by bit shift to the left SHL SHIFT LEFT H H lt lt H page 305 SHR H H gt gt H Bit by bit shift to the right SHR SHIFT RIGHT H H gt gt K page 306 SUB H H Arithmetical subtraction SUB SUBTRACT H K page 302 XOR H XOR H Exclusive OR XOR EXCLUSIVE OR H XOR K page 305 Manual IPOSplus 297 Assembler Commands Overview of commands 23 23 2 2 Bit commands Commands for changing individual bits within a variable These are e Setting clearing moving bits Command Key points Description See BCLR H Bit 0 Clear bit BCLR BIT CLEAR page 307 BMOV H Bit H Bit Copy bit BMOV BIT MOVE
297. ines a permitted difference between the setpoint and actual po sition value If the permitted value is exceeded a lag error message or lag error re sponse will be triggered You can set the responses with P834 Response to lag error Deactivation Set value 0 deactivates lag error monitoring 12 3 4 P924 Positioning interruption detection Manual IPOSplus Setting range ON OFF This parameter determines whether the positioning process is monitored for interrup tions enable signal revoked The response is set in P839 Response to Positioning in terruption 12 131 12 132 P9xx IPOS Parameters P93x IPOSplus special functions 12 4 P93x IPOSP 4S special functions 12 4 1 P930 Override Setting range ON OFF The override function makes it possible to change the travel speed for positioning oper ations which is programmed in the IPOSPlus program The speed can be altered within the range from 0 to 150 of the specifically programmed speed This requires an analog input with O to 150 corresponding to 0 10 V at the analog input The maximum speed value is limited by P302 Maximum speed 1 P312 Maximum speed 2 12 4 2 P931 IPOS CTRL W Task 1 Setting range STOP START HALT IPOS CTRL W Task 1 in the DBG60B keypad only not in SHELL STOP Task 1 of the IPOSP S program is stopped START Task 1 of the IPOSP 4S program is started STOP Tasks 1 2 and 3 of the IPOS 4S program are st
298. ing was performed without IPOSPIUs impulse encoders con nected to X14 and X15 can be recorded and further processed in the IPOSPlus pro gram The system variables H570 H573 can be used to activate zero pulse counters for motor encoder X15 and external encoder X14 in order to record the number of zero pulses A motor encoder must be used for positioning with the IPOSP US commands GO The motor encoder supplies MOVIDRIVE with a high quality speed signal You can only use the IPOSPlus positioning control when a motor encoder is connected TA IPOS is set in P700 Operating mode 1 P941 Source actual position determines which position measurement is used for positioning The travel commands of IPOSP 4S control GO commands refer to the position infor mation of the encoder entered in P941 Source actual position 6 2 Motor encoder X15 to X15 and an operating mode 6 3 Encoder combinations Direct position control with motor encoder V a REREH 474539019 max e An incremental encoder resolver Hiperface encoder X15 must be installed on the motor In IPOSPI4S positioning commands for example GOA are performed with reference to the actual source position here motor encoder X15 Vmax Maximum speed Sue Maximum acceleration PG Profile generator Pact Actual position of the motor encoder PC Position controller Nact Actual speed nc Speed controller
299. inputs and 2 outputs MQ 32 6 Inputs Analog inputs outputs Manual IPOSplus System Description 3 Reference documents 3 6 3 6 1 3 6 2 3 6 3 3 6 4 3 6 5 Reference documents This document describes the IPOSP 4S positioning and sequence control integrated in MOVIDRIVE The following reference list is an overview of the documents referred to in this documen tation You do not have to have read these documents to be able to program with IPOSPI4S they simply offer additional information All the documents are available on the SEW EURODRIVE website under http Awww sew eurodrive de General manuals MOVIDRIVE MDX60B 61B system manual MOVITRAC B system manual e Manuals for the MQx field distributors Manuals for serial interfaces fieldbuses MOVIDRIVE MDX60B 61B Communication and Fieldbus Unit Profile DFx MOVIDRIVE fieldbus interface Manuals for synchronized axis movements MOVIDRIVE Electronic Cam addendum to the system manual MOVIDRIVE Synchronous Operation Card Type DRS11 MOVIDRIVE Internal Synchronous Operation Manuals for application modules MOVIDRIVE Positioning with Absolute Encoder Option DIP11 MOVIDRIVE Extended Positioning via Bus e MOVIDRIVE Bus Positioning MOVIDRIVE Table Positioning with Bus Control MOVIDRIVE Modulo Positioning Manuals for the MQx fieldbus interfaces e Drive System for Decentralized Installation PROFIBUS
300. 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 IPOSplus COMPILER MOVITOOLS NONAMEOLIPC ioj xj El File Edit Search Compiler Run Display Options Window Help la x 2 kK e e C Construction System Function SBusCommDef SBusCommOn Setlnterrupt SetSys SetTask2 _SystemCall _TouchProbe Wait Waitlnput WaitSystem WdOft WdOn v Pre defined Structures SetSysl SSPOSSPEED Please push button belo SetSys SSPIDATA3 structure variable declare SetSys SSPIDATA10 only after running compih SBusCommDef SCREC SBusCommDef SCTRCYCL SBusCommDef SCTRACYCL typedef struct user defined ST a TEE Initi SE i typedef struct Seas A long SMember SNAME Gei He 493933835 14 185 Compiler Programming long 14 14 10 long As an alternative to assigning variables using define the key word long can be used to declare an individual variable In this case the variable number is assigned by the Com piler during compilation The key word long initiates a declaration of one or more global variables The following example shows how to use the key word The syntax of a declaration of one or more global variables is as follows long Identifierl Identifier n Example long se
301. int 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 INFORMATION Use IPOS to assign PO data and base the control word on the ControlWord H484 otherwise there will be a problem in mode 2 if the bus fails The following status chart shows the transitions between the operating modes Chart of mode statuses 506325259 Manual IPOSplus 261 Compiler Examples State machine fieldbus control with emergency mode 18 Operating mode is selected with input terminals DI10 and DI11 and indicated at the outputs DO10 and DO11 The following operating modes are possible Mode 0 Control and setpoint via field bus Mode 1 Control via field bus setpoint added to analog value 1 Mode 2 Control via terminals setpoint analog 1 Mode 3 reserved SHELL settings P100 Setpoint source BIPOL FIX SETPT P101 Control signal source TERMINALS P600 P604 Binary input DIO1 DI05 NO FUNCTION P610 P611 Binary input DI10 DI11 IPOS INPUT P630 P631 Binary output DO10 DO11 IPOS OUTPUT P700 Operating mode 1 amp IPOS P870 P872 Setpoint description POl PO3 IPOS PO DATA P873 P875 Actual value description PI1 PI3 IPOS PI DATA P876 PO data enable ON ze EE EE EE EE EE EE EE EE e eneen d JS seess ee EE EE EE EE IPOS Source file
302. inter value at H10 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 Manual IPOSplus 311 Assembler Commands Communication commands 23 Settings above Sender Master below Receiver slave MB SIS Datei Bearbeiten Programm Ausf hren Hilfe EE F oe Nenner fi Z hler fi EE Be ONline Punkt 2u Punkt 613 SBus Adresse fi 814 SBus Gruppenadresse fio 815 SBus Timeout Zeit s3 jo 816 SBus Baudrate kBaud gIPOSplus ASSEMB loj x Datei Bearbeiten Programm Ausf hren Hilfe STOP He FS Be Z hler fi Nenner fi Einhe Identifier HO Hi H2 H3 o E o no omj V ONline Punkt 2u Punkt 613 SBus Adresse 2 614 SBus Gruppenadresse fio 815 SBus Timeout Zeit 3 jo 514453899 HO 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 312 Manual IPOSplus Assembler Commands Communication commands 23 Example 3 Controlling a MOVIMOT unit via RS 485 and 3PD MOVIMOT must be started up in a
303. interrupts lt 2ms 3 interrupts lt 3ms The response time for variable interrupts is dependent on the number of activated interrupts lt 1ms If an interrupt is triggered during a wait command the waiting time of the command con tinues to run in the background Once the program has jumped back to the task it only has to wait the remaining time before continuing 45 46 5 5 1 5 6 5 6 1 Task Management and Interrupts Interrupts for MOVIDRIVE A and B Example AWAIT 1000 ms command in task 1 is interrupted after 500 ms If the processing of task 1 is resumed after 175 ms the remaining runtime is 325 ms Interrupts for MOVIDRIVE A and B The following interrupts can be used in MOVIDRIVE A units e TimerO overflow H489 interrupt Priority 1 lowest priority e Touch probe DIO2 interrupt Priority 2 e Error interrupt Priority 3 highest priority Task 1 is interrupted each time In theory a timerO a touch probe and an error interrupt can be active at the same time An interrupt assigned a higher priority can interrupt the processing of another interrupt The DISABLE argument deactivates all interrupts see _Setinterrupt or SETINT Interrupt activation Compiler SetInterrupt event myfunction Activates an interrupt When the event event occurs the function myfunct ion is per formed instead of task 1 Assembler SETINT event Mxx Activates an interrupt When the event event occurs
304. ion Alert My _22 2Z4 Z Mp Z 23 2Z5 My _ 227106 _ 113553 Mp 2176 1088 My Modulo numerator Mp Modulo denominator ig i gear unit ing i additional gear The numerator and denominator were reduced in the above example happens auto matically with the Wingear program This results in the following input values for the SHELL parameters e Modulo numerator 113553 e Modulo denominator 1088 e Modulo encoder resolution 4096 Step 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 lt 231 decimal 2147483648 Modulo numerator x modulo encoder resolution 113553 x 4096 465113088 gt The condition has been met the target position can be represented Check the maximum target position 231 231 231 TB 46 M360 Mu sen 113553x4096 TP max Maximum target position M Modulo My Modulo numerator Mer Modulo encoder resolution The maximum target position corresponds to 4 6 output revolutions 81 82 Chain conveyor with carrier Position Detection and Positioning Modulo function Step 1 Defining the output unit Now the previous example shall be extended A gear wheel is mounted to the gear unit that drives a chain There are 35 chain links between each carrier Step 2 Determining the SHELL parameters Tech
305. ion and the control word are given as arguments control word Constant expression that can adopt one of the following values MOVIDRIVE A T2_START Start task 2 T2_STOP Stop task 2 MOVIDRIVE B ST2_STOP Stop task 2 ST2_START Start task 2 ST3_STOP Stop task 3 ST3_ START Start task 3 function name Name of the task function Manual IPOSplus Compiler Functions Standard functions 17 Example include lt constb h gt MyTask3 Statements of task 3 main Inform system of task 3 and start _SetTask ST3_START MyTask3 while 1 Main program 17 3 24 SetTask2 Syntax _SetTask2 control word function name Description This function is used to determine a user defined function as task 2 and to start or stop this task The name of the function and the control word are given as arguments 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 _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 T2_STOP Stop task 2 T2_START Start task 2 function name Name of the Task2 function Important In contrast to a function call only the name of the function without is specified here Example include lt constb h gt
306. ioning define POSITIONING STOPPED 0 define POSITIONING STARTED 1 general variables long 1DriveState Inverter status corresponds to the 7 segment display of MDx long 1lErrorCode Exrror code Process data data structures GSPODATA10 tPA Output data PLC gt Drive SSPIDATA10 tPE Input data Drive gt PLC Eessen erer er EE ee Main function IPOS initial function SE EE EE EE EE e eneen A main _WdOon 5000 Activate watchdog gt in the event of error code 41 while MY_ READY TO RUN max 5000 ms wait until the inverter firmware is fully started up _WdOff Deactivate Watchdog startup SE ar A aa i ey a Pe eR Pe Initialization Se a a a ee EEE OE a ee eT nr PRY Initialize main state 1GlobalStateMachine 0 Initialize scaling for the position 1ScalingNumerator 1 1ScalingDenominator 1 Initialize fieldbus variables for Getsys and Setsys commands tPA BusType MY_FBUS TYPE Process data operation via source see above tPA Len tPE Len MY PD LENGTH PD length see above Activate task2 _SetTask2 T2_START fnTask2 To debug task 2 add inverse slashes here and delete them below 268 Manual IPOSplus Compiler Examples Compiler programming frame Process main state machine switch 1GlobalStateMachine Either no operating mode has been selected or a selection is not possible case DISABLE break Jog mode cas
307. iption of the modulo function Parameter settings for all positioning commands GOA GO ABSO LUTE Structure Manual IPOSplus Parameter Explanation P913 P914 Travel speeds can be changed in the program using SETSYS P911 P912 Positioning ramps acceleration can be changed in the program using SETSYS P915 P203 Precontrol that can be used to influence the jerk P933 Jerk limitation only with MOVIDRIVE B P916 Ramp type P917 Ramp mode This command performs absolute positioning to the position specified in the second ar gument X2 Argument X2 can be a constant variable or an indirect variable The target position based on position 0 machine zero is entered as the travel distance The resulting target position is reflected in the system variables H492 TARGET POSI TION The message IPOS in position is updated within a GOA or GOR command that is the message can be queried directly in the next program line Command structure Mxxx Label optional Mxxx GOA X1 X2 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 Wait Program processing does not continue until the actual position of the drive has reached the position window P922 of the target position X2 K Target position in user units as a constant H Target position in user units as a vari
308. is displayed Selecting variables lEditWatch Window Watch Window 2 x Available Variables Watch Window Content Add gt lt Remove 485591563 Double click on the variable you want to display or select a number of variables and press Add to assign the required variables to the watch window 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 485597579 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 H2 etc are hard to follow in big programs These identifiers are also displayed at this point Manual IPOSplus Compiler Editor Program information 13 The values of the variables can be displayed in different formats You can select from the following formats signed decimal hexadecimal binary or ASCII To change from one format to another first select the required variable by clicking it Then call up a con text menu by pressing the right mouse button and select the required format from there Changing the variable format kl Variables Wate zafi H2 25656 USECH SETOO ELE Signed Decimal Hien O0 Unsigned Decimal Binary ASCII 485601931 Individual v
309. is written directly to H454 Syntax Description Key points _GoAbs type pos Absolute positioning to the position specified The message IPOS in position is updated within a GOA or GOR command that is the message can be queried directly in the next program line type Expression for the type of movement command type can adopt one of the follow ing values GO_NOWAIT No wait resumes processing of the program in the next statement line immediately after sending the movement command recommendation GO_WAIT Waits in this statement line until travel is completed pos Contains the absolute target position the following can stand for pos Constant expression for target position Name of a variable containing the target position Pointer to a variable containing the distance indirect addressing Manual IPOSplus Compiler Functions Standard functions 17 Parameter settings for all positioning commands Parameters Explanation P913 P914 Travel speeds can be changed in the program using SETSYS P911 P912 Positioning ramps acceleration can be changed in the program using SETSYS P915 P203 Precontrol that can be used to influence the jerk P933 Jerk limitation only with MOVIDRIVE B P916 Ramp type P917 Ramp mode Example Standard structures for speed and ramp SSPOSSPEED tPosSpeed SSPOSRAMP tPosRamp main Se
310. it can be saved by choosing File Save All e If only changes made to the source file currently in process are to be saved you can do so by choosing File Save or the pg icon from the toolbar e Choose File Save As to save the source file active in the project window under a different name Manual IPOSplus 161 Compiler Editor Setting up a project management structure 13 13 7 Setting up a project management structure A project management structure allows you access to all data relating to a project For example the following folder structure gives a clear overview Main project e g machine or customer Complete documentation documents 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 Source all IPC files all h files including const h Parameters mdx file for unit exchange Measurements Scope files 162 Manual IPOSplus Compiler Editor Setting up a project management structure Manual IPOSplus Exam
311. its and output terminals Manual IPOSplus There are two ways to clear individual bits in variables 1 The _BitClear Hx y function clears bit y in variable x 2 The bit by bit AND operation Hx amp K sets those bits in variable x to one that are also set to one in constant K In both cases the legibility of the program can be improved if the bit position or the con stant is defined symbolically Bit clearing functions are mainly used to reset binary unit outputs Therefore in the following example variable H481 StdOutpIPOS will be used as the target variable of the operation Variable H480 OptOutpIPOS would be used ac cordingly to address the outputs of the option In the example the output terminal DOO2 of the basic unit is to be set to zero Using _BitClear Using the AND operation include lt const h gt include lt const h gt include lt io h gt MOVIDRIVE A include lt io h gt MOVIDRIVE A include lt iob h gt MOVIDRIVE B include lt iob h gt MOVIDRIVE B main main _BitClear StdOutpIPOS 2 StdOutpIPOS amp DO02 The operator causes bit by bit negation of DOO2 Thus all the bits of DOO2 are 1 except for bit 2 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 red
312. ity for injury to persons or damage to equipment or property resulting from non observance of the operating instructions In such cases any liability for defects is excluded 2009 SEW EURODRIVE All rights reserved Copyright law prohibits the unauthorized duplication modification distribution and use of this document in whole or in part 15 16 2 2 1 Safety Notes General information Safety Notes The following basic safety notes must be read carefully to prevent injury to persons and damage to property The operator must ensure that the basic safety notes are read and observed Ensure that persons responsible for the system and its operation as well as persons who work independently on the units have read through the manual carefully and understood it If you are unclear about any of the information in this documentation please contact SEW EURODRIVE The following safety notes refer to the use of the IPOSPlus positioning and sequence control system Also take into account the supplementary safety notes in the individual sections of this documentation and in the documentation of the units General information Read through this manual carefully before you start working with IPOSPIus 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
313. k 1 interrupt interrupt in the MOVIDRIVE B interrupt interrupt interrupt with higher pri same task with ority higher priority Debug with breakpoint and Yes No No Yes No single step Command pro 1 Assembler 2 Assembler f Assembler cessing time Not available Not available MOVIDRIVE A command ms commands ms command ms min 1 com 1 10 2 11 Assem mand per ms Assembler bler com additional com AS task to Command pro which the eT commands mands ms mands are pro h 8 cessing time As task 1 interrupt is MOVIDRIVE B MS factory factory set cessed assigned task setting 1 com ting 2 com depending on 2 or 3 mand ms mands ms the processor utilization 1 Copy commands to task 1 for debugging Manual IPOSplus Task Management and Interrupts Tasks for MOVIDRIVE A 5 3 5 4 5 4 1 Manual IPOSplus Tasks for MOVIDRIVE A In addition to the general section in chapter Task Management for MOVIDRIVE A and B this section provides specific implementation information for MOVIDRIVE A The motion sequence with the positioning commands is programmed in task 1 Program the following functions in task 2 e Rapid time critical processes e Calculations e Monitoring for system values e Communication with the SEW operator terminals e Copying variables cyclically to the oscilloscope variables H474 H475 e Formatting the fieldbus SBus process data with a machine contro
314. ke use of the possibility of accessing variables indirectly SET H H from IPOSP S These names can be used on both the right and left sides of assignments or in expressions such as HO to H511 In this case however the Compiler inserts the indirect commands Example for using indirect variables H2 5 H3 6 H5 7 H6 3 H1 H2 H3 Variable H1 is assigned the value 10 because the value 7 is accessed indirectly via H2 see H5 and the value 3 is accessed indirectly via H3 see H6 Manual IPOSplus Compiler Programming numof 14 19 numof The key word numof returns the number of a variable The identifier of a direct or sym bolic variable is given as the argument The argument is not allowed to be a composite expression define setpoint H200 declare setpoint2 setpoint 1 H1 numof H7 H2 numof setpoint H3 numof setpoint2 These program lines supply the IPOSP4S variables with the following values H1 7 H2 200 H3 201 INFORMATION The following program lines are not permitted define Setpoint H10 H30 define Varl H200 H1 numof H1 H1 numof H1 H4 H1 numof H3 6 H1 numof Setpoint H1 numof Var1 1 Manual IPOSplus 14 193 Compiler Operators Order of priority of operators 15 15 Compiler Operators Operators are used to li
315. l Task 3 Fieldbus communication with the PLC It is important to distribute the additional commands correctly depending on the appli cation e Interrupt oriented programs When a user program is interrupt oriented and the task 1 interrupts should be processed quickly task 1 must be assigned a high calculation priority using additional commands in P938 e Runtime optimized programs f for example process data is to be converted in IPOS this must be done as quickly as possible Task 3 can be used to process convert routines as quickly as possible In this case task 1 and task 2 should be assigned as few additional commands ms as possible This ensures the fastest total application performance if tasks 1 and 2 run with the minimum speed 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 _Setlnterrupt or SETINT can be triggered by a Omer overflow a system unit fault or touch probe DIO2 and interrupts task 1 In MOVIDRIVE B up to 4 additional variable interrupts can be activated using _SetVarinterrupt or VARINT They interrupt task 2 or task 3 as required The response time for task 1 interrupts unit fault DIO2 touch probe or TO_overflow is dependent on the number of activated interrupts 1 interrupt lt 1ms 2
316. l danger gt A DANGER A CAUTION Signal word Meaning Consequences if disregarded Imminent danger Severe or fatal injuries Possible dangerous situation Severe or fatal injuries Possible dangerous situation Minor injuries Specific danger e g electric shock NOTICE Possible damage to property Damage to the drive system or its environ ment INFORMA Useful information or tip TION vi Simplifies the handling of the drive system Manual IPOSplus General Information Liability for defects 1 2 Liability for defects Compliance with this manual and the operating instructions of the units is prerequisite for fault free operation and fulfillment of any right to claim under warranty You should therefore read the manual and operating instructions of the units before you start work ing with the software and units Make sure that the operating instructions are available to persons responsible for the machinery and its operation as well as to persons who work independently on the units You must also ensure that the operating instructions are legible 1 3 Exclusion of liability 1 4 Copyright Manual IPOSplus 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 liabil
317. l function or another MOVIDRIVE In this way IPOSPIUS also performs these functions when the interrupt routine is active in task 1 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 Processing time for task 1 task 2 The factory setting for the task processing time is e Task 1 1 command ms P938 0 e Task 2 2 commands ms You can speed up the processing time in both tasks to include up to 9 additional com mands per ms You can assign the additional commands for task 1 using parameter P938 index 8888 and for task 2 using parameter P939 index 8962 This means that a maximum of 1 9 10 commands can be performed in task 1 and 2 9 11 in task 2 43 5 4 2 Task3 Task Management and Interrupts Tasks for MOVIDRIVE B When you assign the maximum number of additional commands ms to task 1 and task 2 the following combinations are possible Task 1 Task 2 P938 Command ms P939 Command ms 0 1 9 11 1 2 8 10 2 3 7 9 3 4 6 8 4 5 5 7 5 6 4 6 6 7 3 5 7 8 2 4 8 9 1 3 9 10 0 2 Example P938 2 P939 3 gt Task 1 processes 3 commands ms task 2 processes 5 commands ms Task 3 is available from the B series units Task 3 processes at least 1 command ms Depending on the unit configuration and on the setting of P9
318. le 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 Command structure Mxxx Label optional Mxxx CPNE X1 X2 x1 Variable result X2 Variable or constant SET HO 13 SET H1 13 CPNE HO H1 After the program has been processed HO has the value zero and H1 the value 13 SET HO 50 CPNE HO 13 After the program has been processed HO has the value one 23 357 23 Assembler Commands Comparison commands 23 10 2 Logical operations ANDL ORL NOTL ANDL LOGICAL AND Structure Example 1 Example 2 ORL LOGICAL OR Structure Example 1 Example 2 358 The ANDL command is the logical AND operation of two variables The result is written to variable X1 Variable X2 remains unchanged The result is zero when one of the two variables 0 The result is one when both variables 0 Command structure Mxxx Label optional Mxxx ANDL X1 amp amp X2 X1 Variable result X2 Variable SET H01 100 SET H02 0 ANDL H01 amp amp H02 After the program has been processed H01 has the value zero SET H01 100 SET H02 50 ANDL H01 amp amp H02 After the program has been processed H01 has the value one The ORL command i
319. les Touch probe interrupt processing 18 Main program loop while 1 if DI17 Data_Varl 222222 Data_Var2 444444 else Data_Varl 111111 Data _Var2 222222 18 8 Touch probe interrupt processing Crates are transported to a filling station on a timing belt A proximity sensor D102 de tects when the next crate arrives This triggers an interrupt and the belt moves a speci fied remaining distance The crate is then positioned directly under the filling station Once the crate has been filled a new cycle is started 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 Variable Name Description H11 TP Max Pos Maximum target position if the touch probe input is not attenuated H12 TP_Pos Remaining travel after the touch probe input has been attenuated H13 Speed Positioning speed in rpm H14 Ramp Positioning ramp in ms 258 Manual IPOSplus Compiler Examples Touch probe interrupt processing Manual IPOSplus Timing belt with proximity sensor DI10 4 PD Pulse direction DI10 1 Start PW Pulse width FS Filling station TP_Max_Pos Maximum target position FS PW E TP_Max_Pos gt 1 TP l TP_Pos
320. lt 32000 for speed control 1 increment corresponds to 0 2 min default 0 547 PID CmdAdr PID controller Setpoint address H547 and P272 are identical PID CMDADR When P270 1 IPOS variable P272 H547 contains the address of the IPOS variable with the setpoint default 0 548 PID _CmdScale PID controller Factor for scaling the setpoint H548 and P274 are identical weighted with 3 decimal places PID CMDSCA 32000 32 000 lt Kgetpoint lt 32000 32 000 default 1000 1 0 549 PID_ActAdr PID controller Address of actual value H549 and P276 are identical PID ACTADR When P275 IPOS variable P276 H549 contains the address of the IPOS variable default 0 550 PID_ActScale PID controller Scaling factor of the filtered actual value H550 and P277 are weighted identically with 3 dec PID ACTSCA imal places 32 000 lt Kactual value lt 32 000 default 1000 1 0 551 PID_ActNorm PID controller Filtered and scaled actual value diagnostics value PID ACTNOR 552 PID_ActOffset PID controller Integer permanent offset of actual value H552 and P278 are identical PID ACTOFF 32000 32000 lt Offset lt 32000 32000 default 0 553 PID_ActMin PID controller Minimum value for actual value after smoothing scaling and offset H553 and P280 are iden PID ACTMIN tical 32000 32000 lt Xe min lt 32000 32000 Default 0 554 PID_ActMax PID controller Maximum value for actual value after smoothing
321. marked with a light blue bar at the end of the process 13 12 Starting a program A program can be started once it has been downloaded to the inverter To do this select the Start menu command from the Run menu in the menu bar Alternatively you can also press the g 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 POSplus COMPILER MOVITOOLS zox File Edit Search Project Run Display Options Window Help Ea ES ES PSTOP Deg eg EA Bi Ge Er Project E Ea Sum Source modul s eum IPC En Documents RIIT Peer in per 484635147 13 13 Stopping a program Select the Stop menu command from the Run menu in the menu bar to stop the pro grams in task 1 task 2 and task 3 Alternatively you can also press the CH icon in the toolbar The display for the task status in the tool bar changes from START to PSTOP 13 14 Comparison with unit Manual IPOSplus There is a comparison function for comparing the content of the Editor window with the program in the inverter This function can be called up by selecting the Compare with inverter menu item from the Project menu in the menu bar You can also call the func tion by pressing the S icon in the toolbar 13 167 13 168 Compiler Editor Debugger 13 15 Debugger The integrat
322. mber of the variable which is to receive the result BitPosition Bit position in the result variable BitValue Polarity in the result variable NumOfCam Number of cam blocks max 4 PosL1 CCW limit value of cam block 1 PosR1 CW limit value of cam block 1 PosL2 CCW limit value of cam block 2 PosR2 CW limit value of cam block 2 PosL3 CCW limit value of cam block 3 PosR3 CW limit value of cam block 3 PosL4 CCW limit value of cam block 4 PosR4 CW limit value of cam block 4 GSCAM_EXT CamControl Bit 31 must always 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 Shifts the internal data buffer of the outputs by n digits to the left before writing to the target variable CamDestina tion Note The shifting process will delete the information of the upper outputs This means that if the shift factor is 3 the upper 3 outputs with 4 ms cycle time are no longer available and the 4 outputs with 1 ms cycle time are assigned to bits 3 6 and the output with 4 ms cycle time is assigned to bit 7 CamForceOn Mask to set mandatory outputs the mask affects the inter nal data buffer prior to
323. med for the drive H473 STAT WORD 308 Manual IPOSplus Assembler Commands Communication commands 23 5 Communication commands 23 5 1 MOVLNK Description see _MoviLink page 222 Command struc ture Instruction Standard structure Elements Brief description type _MoviLink MOVLNK BusType H 0 Possible bus types ML_BT_SO 1 RS485 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 chan nels for data transfer MoviLink Cyclic Frame Types Acyclic ML_FT_PAR1 0 PARAM 1PD ML_CFT_PAR1 128 ML_FT_1 1 1PD ML_CFT_1 129 ML_FT_PAR2 2 PARAM 2PD ML_CFT_PAR2 130 ML_FT_2 3 2PD ML_CFT_2 131 ML_FT_PAR3 4 PARAM 3PD ML_CFT_PAR3 132 ML_FT_3 5 3PD ML_CFT_3 133 ML_FT_PAR 6 Parameter without ML_CFT_PAR 134 PD 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 sign
324. ment 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 statement block in which several statements can be spec ified The expression can also be made up of several logically interlinked conditions H2 0 HE 10 while H1 gt 5 H2 H2 1 H1 16 199 16 200 do Compiler Constructions while Example Example 16 4 do while 16 4 1 Syntax The statements within the block are carried out as long as H1 is greater than 5 H2 gets the value 5 when the loop breaks off As in the for loop it is also possible to use the break and continue statements here The break statement once again causes the while loop to be exited The continue statement results in a jump to the end of the statement block followed by repeating the check of the expression to see whether the loop will be processed again H1 0 while H1 lt 20 H1 if H1 gt 10 continue H2 H2 2 As long as H1 is less than or equal to 10 H2 is increased by 2 If the value of H1 is greater than 10 processing jumps to the end of the while loop at which point the condi tion for running through the loop again is tested H2 is not changed any further during addition loop cycles If the value of H1 is 2
325. mis aile Se fe aE e Manual IPOSplus Compiler Functions Standard functions 17 SS_BRAKE Switching the brake function on off H 0 gt off H 1 gt 0n SS_RAMPTYPE Specify positioning ramp type changes P916 H 0 gt linear H 1 gt sine H 2 gt square H 3 gt bus ramp H 4 gt jerk limited H 5 gt cam disk H 6 gt internal synchronous operation SS_RESET Resets the system error with the error number in variable H H Variable with the error number SS_ACTPOS Setting the actual position H Position value SS_SPLINE Internal drive calculation of an analytical cam disk Currently the function is only available in MCH in SD ver sion OC or MDxB SD 0C 5C The spline calculation is initialized via the system function after up to 20 curve points x y value pairs x master position y slave position have been specified in a master encoder range The calculation is then started using H 0 SplineMode and either a complete cam disk or one segment of a selected cam disk is filled Currently a spline 0 procedure for optimum running and a spline 1 procedure for section by section movements and straight sections are available The calculation is complete after lt 200 ms H 0 SplineMode Value range 0 3 e 0 Interpolation not active or calculation is finished e 1 Start interpolation enter interpolated values from index 0 starting with the el
326. mment ba Directives Iw Highlight Syntax Auto Indent Iv Persistent Blocks a Tange E Show debug tooltip E Font Courier New Change OK Abbrechen 483719691 In the Editor settings you can select the colors for the background and the text In the same way settings can be made for the syntax highlighting colors for displaying the syntax of instructions and keywords in color In addition the following settings can be made Color syntax display Activate and deactivate the syntax highlighting 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 selected block to be replaced Tab size Number of characters by which the cursor is indented when the Tab key is pressed Font Select the font by clicking the Change button Show debug tooltip If the Show debug tooltip option is activated the content of variables is displayed directly in the Editor window when the cursor is placed on the required variable Manual IPOSplus Compiler Editor Settings for the IPOSplus Compiler 13 Compiler settings Settings 2x Editor Compiler
327. mp back to the line below the CALL command The following program lines will then be pro cessed Nested subroutines are possible but a maximum of 16 layers should not be ex ceeded INFORMATION Do not exit subroutines by jumping to a main program or another subroutine If a sub routine is to be exited conditionally this must be done by jumping to the end RET of the subroutine Manual IPOSplus Assembler Programming Basics 22 22 1 6 Program loops Program loops consist of a loop start LOOPB and a loop end LOOPE The number of loop cycles is determined in the argument of the LOOP command Nested loops are possible but a maximum of 16 layers should not be exceeded INFORMATION Do not exit program loops with a jump command Jump commands are allowed within a program loop 22 1 7 Positioning commands The IPOSPIus positioning enables you to perform point to point positioning with MOVIDRIVE and MOVIDRIVE compact drives 22 1 8 Binary analog inputs outputs Binary and analog inputs outputs are processed with variables Furthermore binary in puts can be evaluated directly using a jump command 22 1 9 Access to system values parameters The drive parameters listed in the section IPOSP YS 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 e Read with the GETSYS comman
328. n 50 incre ments is reached 24 2 7 Input terminals Level Terminal terminal function Meaning 0 DIOO Controller inhibit Switch power section on off 0 DI01 Enable Controlled standstill 0 DI02 Reset Reset after fault moving clear of limit switches 0 DIO3 Reference cam Switch for zero or offset value 0 DI04 Limit switch right Limit switch for stopping 0 DIO5 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 24 2 8 Output terminals Level Terminal Unit terminal function Meaning 0 DBOO MDX Brake Brake control via auxiliary relay 0 DOO1 MDX Ready Controller active power supply to electronics OK 0 DO02 MDX Fault no fault 0 DO10 DIO11B IPOS output 0 DO11 DIO11B IPOS output 0 DO12 DIO11B IPOS output 0 DO13 DIO11B IPOS output 0 DO14 DIO11B IPOS output 0 DO15 DIO11B IPOS output 0 DO16 DIO11B IPOS in position Drive in positioning window 0 DO17 DIO11B IPOS reference Reference travel successfully completed 366 Manual IPOSplus Assembler Examples Hoist sample program
329. n the setting in P904 Refe rencing to zero pulse Manual IPOSplus 67 Position Detection and Positioning Referencing If reference travel is started with the IPOSP 4S command Goo the drive is referenced to the falling edge of the reference cam or to the zero pulse after the falling edge of the reference cam depending on whether the argument ZP or CAM is set A i 31 poy BEE i i i nRef1 l l 2 Ee 1 nRef2 i i lt RefOfiCAM _ RefOfzP MZP RefZP_RefCAM LHWLS CAM RHWLS gt 476742795 6 6 3 Type 2 CW end of the reference cam The reference position 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 a CW direction P901 Reference speed 1 is used up 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 the IPOSP S command Goo the drive is referenced to the falling edge of the reference cam or to the zero pulse after the falling edge of the reference cam depending o
330. n whether the argument ZP or CAM is set A E leie nRef1 3 nRef2 j i i ReiONCAM RefOfZP RefCAM RefZP M P CAM RHWLS gt 476744331 Manual IPOSplus Position Detection and Positioning Referencing 6 6 4 Type 3 CW limit switch The reference position is the first zero pulse to the left of the CW limit switch The setting Left 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 switch and the error 29 Limit switch reached could occur sporadically once the reference travel is complete A reference cam is not required Reference travel starts ina CW direction P901 Reference speed 1 is used up to the fall ing edge of the CW limit switch then P902 Reference speed 2 is used If reference travel is started via the positive edge at the REF TRAVEL START input P904 Reference travel to zero pulse should be set to YES If the reference travel is started via the IPOSP 4S command Goo you have to set the argument ZP A nReft 3 2 k 7 j nRef2 i l MRefO ZP M t RefZP LHWLS i RHWLS gt 476758667 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 hys
331. nc Speed controller ABS absolute encoder SV System variable IPOS IPOSPS program Manual IPOSplus 55 56 Encoder combinations Position Detection and Positioning Position control with motor encoder Processing the second encoder in the IPOSP S program as master encoder 474583563 Position control is performed in IPOSP 4S using the motor encoder connected to X15 s An encoder is always required on the motor for speed feedback The high dynamic response of the inverter can be used directly for positioning s The position information of the second encoder is mapped automatically in an IPOS S variable and can be processed using program control This design is used when the inverter runs in relation to a second encoder for example synchronous angel or electronic cam Vmax maximum speed Sax Maximum acceleration PG Profile generator Pact Actual position of the motor encoder PC Position controller Nact Actual speed nc Speed controller ABS absolute encoder EXT external encoder SV System variable IPOS IPOSPS program Processing the absolute encoder position in the IPOSP 4S program Nthres 474585099 s The position information of the absolute encoder is mapped automatically in an IPOSP 4S variable and can be processed using program control The DIP11 or a HIPERFACE encoder on X14 can be us
332. nc o Identifier HO Source Va DbPreCont Bit Posit Bit Polar D SIMULATION Peer to peer 01 fi Program text modified 515353867 10 V correspond to 10000 H The variable in the GETSYS H ANALOG OUTPUTS command defines the beginning of the following variable structure H 0 Contains the voltage value of analog output 1 AO1 H 1 Contains the voltage value of analog output 1 AO2 TIMER 0 Loads the current value of timer 0 ms identical to system variable H489 TIMER 1 Loads the current value of timer 1 ms identical to system variable H488 PO DATA Reads the PO data buffer data sent from the master to the unit 3 PO or 10 PO data items are read depending on the number of PO data items H 0 Bus type 0 reserved 1 TERMINAL 2 RS 485 3 Fieldbus 4 reserved 5 SBus 8 SBus 2 only MOVIDRIVE B H 1 Number of PO data H 2 PO1 H 3 PO H 4 PO3 H 5 PO4 H 6 POS H 7 PO6 H 8 PO7 H 9 PO8 H 10 PO9 H 11 PO10 DC VOLTAGE DC link voltage V Manual IPOSplus 23 337 Assembler Commands Set commands 23 RELATED TORQUE Relative torque relative torque VFC REL TORQUE VFC The relative torque is the display value based on the rated unit current for the torque at the motor output shaft The absolute torque can be calculated from this value using the following formula Mabs Mret In My 1000 x lon Maps absolute torque Ij Rated
333. ncel OK 512416139 Overview of commands and parameters for setting resetting binary outputs Table 4 Commands for setting binary outputs Unit Output Setting 1 level Resetting 0 level Parameter at IPOS output MOvIDRME A DBoo Z SE MOVIDRIVE B fimware MOVIDRIVE A DO01 BSET H481 1 1 BCLR H481 1 0 P620 MOVIDRIVE B DO02 BSET H481 2 1 BCLR H481 2 0 P621 DO03 BSET H481 3 1 BCLR H483 1 0 P622 MOVIDRIVE B DO04 BSET H481 4 1 BCLR H481 4 0 P623 DO05 BSET H481 5 1 BCLR H481 5 0 P624 DO10 BSET H480 0 1 BCLR H480 0 0 P630 Option ei af ob 2 DO17 BSET H480 7 1 BCLR H480 7 0 P637 Manual IPOSplus Assembler Programming Binary inputs outputs 22 Setting several outputs Example Manual IPOSplus It is possible to set several binary outputs at the same time e g to output a binary coded table position number This is done by writing the decimal value of the table position number to system variables H480 or H481 Table 5 Assigning system variable H480 H481 to binary output terminals Binary outputs Binary outputs DIO11A DIP11A option H480 Binary outputs of basic unit Terminal des DO17 DO16 DO15 DO14 DO13 DO12 DO11 DO10 DOO2 DON1 DB00 Bits of the system 7 6 5 4 3 2 1 0 2 1 0 variables Significance 27 26 25 24 23 22 21 20 22 21 20 Output table position n
334. nclude lt FileName gt where FileName is the name of the header file 2 Ifthe file to be included is located in the current working folder then the command is include FileName FileName is the name of the file to be incorporated 3 The folder path must be specified if the file to be incorporated is located in a folder other than those already stated here For example the statement for incorporating a file called Test h located in the root folder would be include c Test h The best place to put header files you have written yourself is in the current working folder This allows the program to be written irrespective of the folder path There is no need to make changes if the program is to be compiled in a different folder and the di rectory structure of the program is maintained The program can be compiled immedi ately The setting for the Compiler would have to be changed in the first method whilst the in clude path would have to be edited in the program in the third method before the pro gram could be re compiled INFORMATION The system searches through the paths in the following sequence if all three methods are mixed 1 Direct path assignment in the include statement method 3 2 Path assignment relative to the source file method 2 3 Path assignment in the include directive of the settings dialog box 14 5 define Manual IPOSplus The define directive was previously used for iden
335. ncoder adjustment during initial startup the LSM commutated bit will be maintained in the IPOS status word The drive system can be enabled immediately INFORMATION If P948 is switched off and on again the IPOS referenced bit is set to 0 once you have restarted the MOVIDRIVE Reference travel is necessary to rest the IPOS referenced bit to 1 Manual IPOSplus 137 P9xx IPOS Parameters P95x absolute encoder SSI 12 12 6 P95x absolute encoder SSI The DIP parameters are described in detail in the MOVIDRIVE MDX61B Absolute En coder Card DIP11B DEH21B manual The DIP11B option cannot be used with MOVIDRIVE MDX61B size 0 12 6 1 P950 Encoder type The absolute encoder connected to the DEH21B DIP11B option X62 is selected At present encoders can be selected from the following list e VISOLUX EDM e T amp R CE65 CE58 CE100 MSSI e T amp R LE100 LE200 e T amp R LA66K e AV1Y ROQ424 e STEGMANN AG100 MSSI e SICK DME 3000 111 e STAHL WCS2 LS311 e STEGMANN AG626 e IVO GM401 GXMMW A202PA2 e STAHL WCS3 e LEUZE OMS1 OMS2 e T amp R ZE 65M e LEUZE BPS37 e SICK DME 5000 111 e POMUX KH53 e KUBLER 9081 e LEUZE AMS200 e MTS TEMPOSONICS RP e P F AVM58X 1212 e H bner HMG161 S24 H2048 e Balluf BTL5 S112B M1500 e T amp RLA41K e Elgo LIMAX2 12 6 2 P951 Counting direction Setting range NORMAL INVERTED Defines the counting direction of the absolute encode
336. ncoder resolution P944 DIP SSI encoder Encoder resolution P955 336 Manual IPOSplus Assembler Commands Set commands ANALOG INPUTS 10 V 0 10 V 10000 0 10000 H 0 H 1 Voltage value analog input 1 mV Voltage value analog input 2 mV CAM ANALOG OUTPUTS The GETSYS H CAM command simulates a cam controller Using the GETSYS command a standard cam controller with 1 output per cam can be used per drive With MOVIDRIVE units you can use an extended cam controller with 8 outputs Hxx is the first variable of a data structure CamControl The bit with the highest significance bit 31 is used in Hxx to decide which cam controller the GETSYS command refers to Bit 31 0 Standard cam controller all MOVIDRIVE units The GETSYS com mand activates the cam controller The cams are formed once when the GETSYS command is processed If the standard cam controller is to process cyclically the command must be called up cyclically Bit 31 1 Extended cam controller with technology option and CFC or SERVO mode The GETSYS 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 lol x mr Gal 4 Numerator 1 Denominator 1 Unit i
337. ncreased by 2 each time the loop runs through variable H2 is only increased by 1 H2 means pre increment If a continue statement is processed within the statement block this means the program jumps to the end of the statement block and then processes expression3 which triggers a check to determine whether the condition in the for statement is performed for a new loop cycle Manual IPOSplus Compiler Constructions while Example Example 16 3 while 16 3 1 Syntax Example Manual IPOSplus Hl 20 H2 0 for HO 0 HO lt 10 HO HIL HL 2 if H1 gt 32 continue H2 The if query with the continue statement means variable H2 is no longer incremented as soon as H1 is greater than 32 This means when the loop is finished the value of vari able H1 is 40 and that of H2 is 6 If a break statement is processed in the statement block this means the program exits the for loop at that point The loop is no longer continued Hl 20 H2 0 for HO 0 HO lt 10 HO HE H1 2 if H1 gt 32 break H2 The if query with the break statement means that the loop is exited as soon as H1 is greater than 32 This means that when the loop is exited the value of variable H1 is 34 and that of H2 is 6 while expression Statement The while statement is a conditional loop which performs the state
338. ndard functions 17 3 1 _AxisStop Syntax This chapter lists the standard functions in alphabetical order This makes it easier to find the standard function you are looking for _AxisStop typ Description The drive axis is stopped when the IPOSP4S control word is written A restart must be carried out by the enable function via the IPOSP 4S control word The argument can be used to specify the type of axis stop or the deactivation of the lock can be specified via the IPOSP 4S control word Argument type AS_RSTOP Braking with the P136 rapid stop ramp followed by the status No enable The last target position H492 to have been transmitted is retained Inhibit via control word command ASTOP IPOS ENABLE is required before the subsequent travel command The brake is applied if the brake function is activated The message In position is set AS_HCTRL Braking with the ramp of the 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 positioning mode followed by position control The last target position H492 to have been transmitted is overwritten by the stop position
339. ne DISABLE break Manual IPOSplus not inserted BitO to Bit 0 Operating mode is not possible 18 273 Compiler Examples Compiler programming frame 18 Referencing mode case HOMING if 1DriveState gt 0xA if lOpMode JOGGING 1GlobalStateMachine JOGGING if lOpMode DISABLE 1GlobalStateMachine DISABLE if lOpMode POSITIONING 1GlobalStateMachine POSITIONING else 1GlobalStateMachine DISABLE break Positioning mode case POSITIONING if 1DriveState gt 0XA amp amp MY_REFERENCED if lOpMode JOGGING 1GlobalStateMachine JOGGING if lOpMode HOMING 1GlobalStateMachine HOMING if lOpMode DISABLE 1GlobalStateMachine DISABLE else 1GlobalStateMachine DISABLE break Programming error invalid status default _AxisStop AS_PSTOP 1GlobalStateMachine 10pMode 1 break End switch 1GlobalStateMachine Regenerate process input 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 1ScalingDenominator lActPosition 1ScalingNumerator 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 other outputs are replaced by the e
340. ng a parameter via SBus The process data configuration of the inverter connected by SBus is read with the address 10 18 6 1 Reading an internal unit parameter Manual IPOSplus Type of reference travel actually entered in P903 is read in task 1 and written to variable 1RefType include lt constb h gt include lt iob h gt Definition of MOVLNK structures MOVLNK tRefType MLDATA tData Definition of Variables long 1RefType Initialization of MoviLlink for bus transfer tRefType BusType ML BT SI tRefType Address 253 own inverter tRefType Format Mi PT PAR only parameters tRefType Service ML_S RD read tRefType Index 8626 P903 RefType tRefType DPointer numof tData data buffer Main program loop while 1 Read type of reference travel _MoviLink tRefType lRefType tData ReadPar 18 253 18 254 Compiler Examples MoviLink command Variable H200 of inverter connected via SBus is written depending on DI17 in task 1 DI17 0 gt 1000 DI17 1 gt 1000 EE EE EE EE EE k d IA IPOS Source file ze EE EE EE Ee enn A d include lt constb h gt include lt iob h gt Definition of MOVLNK structures MOVLNK tBus MLDATA tBusData JEE Main program EE EE EE EE EE EE ee e eens A d main Initialization of MoviLink for bus transfer tBus BusType ML BT SBUS1 bus type SBus1 tBus Address Oy SBus address
341. ng applies Machine zero reference position reference offset The reference offset always refers to the encoder set via P941 Source actual position page 134 This encoder can be a motor encoder an external encoder or a DIP encoder The cor responding actual positions are indicated by IPOSP S variables e H509 Actual position DIP encoder e H510 Actual position external encoder e H511 Actual position motor encoder Manual IPOSplus 12 123 12 124 P9xx IPOS Parameters P90x IPOS reference travel Reference offset becomes active after reference travel has been completed success fully INFORMATION In case of a reference travel of a drive system with absolute encoder HIPERFACE or DIP P905 Hiperface offset X15 page 126 P947 Hiperface offset X14 page 136 or DIP offset P953 Position offset page 139 will be recalculated and overwritten by the reference travel depending on the actual position source 12 1 2 P901 Reference speed 1 Setting range 0 200 6000 rpm Reference speed 1 determines the travel speed for the first part of the reference travel Speed change always takes place via stop ramp t13 The search directions during ref erence travel are determined by the respective reference travel type The speed is in ef fect until the reference cam has been reached 12 1 3 P902 Reference speed 2 Setting range 0 50 6000 rpm Reference speed 2 determine
342. nge in position can be tracked in display parameter P003 s The position setpoint and actual position are displayed in the variables H492 and H511 Manual IPOSplus 361 24 362 Assembler Examples Hoist sample program 10 motor revolutions back and forth sample program IPOSplus ASSEMBLER MOVITOOLS B oO x File Edit Program Run Help starr pstor rstor HEEL ZE Numerator 4096 Denominator fi Unit ftums Identifier Valu WAIT 2000 WAIT 2000 4 REI eter 516923787 The program consists of 3 remark lines Travel relative 10 motor revolutions CW Wait 2 seconds Travel relative 10 motor revolutions CCW Wait 2 seconds End program End of program jump to start of program The RET command is not mandatory in this example as the program was not called as a subroutine The return command causes the program to jump back to the first program line which is permitted in this case 24 2 Hoist sample program 24 2 1 Characteristics 24 2 2 Settings e Reference travel e Selection of three hoist positions via binary inputs e Notification when a selected position is reached e 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 DIO2 A detailed description of the configurati
343. nical data Gear unit type KA47B Output speed rpm 19 Motor speed rpm 2000 Gear unit reduction ratio i 104 37 Motor type DY71S 477253515 Number of teeth of the additional gear chain sprocket Zag1 5 Carrier spacing in chain links Zag2 36 i additional gear 5 36 Alert Mn _Z2 Z4 Z6 Zoe Mp Z Z3 Z5 Zac My _ 1021977 Mp 1360 Modulo numerator 1021977 Modulo denominator 1360 Modulo encoder resolution 4096 Manual IPOSplus Position Detection and Positioning Modulo function Step 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 lt 231 decimal 2 147 483 648 Modulo numerator x modulo encoder resolution 1021977 x 4096 4 186 017 792 The condition has not been met the required target position cannot be represented This application would result in positioning errors The system sets the bit when a value is specified for example a target position of 180 the drive is positioned incorrectly Solution Select a gear unit with a different ratio The target position that can be represented can be increased by selecting another gear unit with different division factors for the number of teeth i e parts of the numbers of teeth would cancel one another out in the calculation 6 7 6 Frequently asked questions e Is there a complete program to u
344. ning if operating mode CFC amp SYNC is set e Dl11 0 no function e Ditz Set DRS Zero point pulse e DI12 1 Positioning operating mode CFC A IPOS e DI12 0 Synchronous operation operating mode CFC amp SYNC The operating modes can be changed using the command _SetSys SS OPMODE H In which the value of the H variable has the following meaning SS_OPMODE Sets the operating mode H 11 Operating mode CFC speed control H 12 Operating mode CFC A torque control H 13 Operating mode CFC amp IPOS positioning H 14 Operating mode CFC amp synchronous running DRS11A H 16 Operating mode SERVO speed control H 17 Operating mode SERVO amp torque control H 18 Operating mode SERVO amp IPOS positioning H 19 Operating mode SERVO amp synchronous running DRS11A Manual IPOSplus 113 114 IPOSplus and Synchronized Motion Synchronous operation with a DRS option card d Sr EE EE EE EE Ses SSS See S eS Se SSeS Se e IPOS source file EE E EE E EE EE SSS SSS SSeS SSS SSS SSS e eneen A include lt const h gt include lt io h gt Define inputs define E Free running DI10 Input DI10 define E Set zero point DI11 Input DI11 define E Switch Pos Sync DI12 Input to switch between Positioning and synchronous operation DI 12 1 Positioning DI 12 0 Synchronous operation
345. nk identifiers to one another and to statements in order to per form certain operations The IPOSPlus Compiler provides operators for performing ar ithmetical operations bit operations assignment operations or comparison operations Operators are divided into various categories and have a specified order of priority The order of priority determines the order in which the operators are executed within a state ment The following table lists all the operators supported by the IPOSP sS Compiler by order of priority 15 1 Order of priority of operators Category Operator Description 1 IW Brackets 2 Unary Logical negation e NOT bit by bit complement Unary plus Unary minus Pre or post incrementing Pre or post decrementing 3 Multiplicative i Multiplication Integer division Modulo remainder 4 Additive Binary plus Binary minus 5 Shift lt lt Shift left gt gt Shift right 6 Relational lt Less than lt Less than or equal to gt Greater than gt Greater than or equal to 7 Equality Equal to l Not equal to 8 amp Bit by bit AND 9 A Bit by bit XOR 10 i Bit by bit OR 11 amp amp Logical AND 12 de Logical OR 13 Conditional 2 Ternary operators see section Ternary Operators 14 Assignment Simple assignment Assign product Assign quotient Assign remainder Assign sum Assign difference amp Assign bit by bit AND
346. not moved onto limit switch DI04 DI05 Limit switch CW CCW then return to branch distributor If it has then unlock travel and wait until drive has moved clear of limit switch D102 input terminal function Reset Then stop drive by setting target position to current position Manual IPOSplus 24 367 Assembler Examples Jog mode sample program 24 Reference subroutine Reference travel M20 ASTOP IPOS ENABLE Travel release GOO U NW ZP Reference travel no wait start at zero pulse M22 JMP LO I0000000000000001 M21 Cancel reference travel SET H319 0 and the bit in the status word IPOS Reference BMOV H319 0 H473 20 JMP H319 0 M22 M21 ASTOP TARGET POSITION RET subroutine jog mode Option Subroutine e g jog mode SSeS SSeS Sos Sas SS a Sea asa seeSaaSeseSSses5 Jog CW M30 RET Jog CCW M40 RET See next example Main program Hoist positioning Main program Hoist positioning M50 JMP LO I0000000001000000 M51 If input DI10 is set move to position 0 mm GOA WAIT 0 mm If input DI11 is set move to position 1000 mm M51 JMP LO I0000000010000000 M52 If input DI12 is set move to position 2000 mm GOA WAIT 1000 mm M52 JMP LO 10000000100000000 M53 GOA WAIT 2000 mm M53 RET END 24 3 Jog mode sample program 24 3 1 Characteristics e Travel in two directions with binary inputs Jog Jog e Adjustable travel speeds and ramps e Endless
347. not relevant here because the position values of travel variables are always evaluated in increments 4096 increments motor revolution Manual IPOSplus 24 373 Assembler Examples Table positioning sample program 24 24 4 3 Input terminals Level Terminal terminal function Meaning 0 DIOO Controller inhibit Switch power section on off 0 DIO1 Enable Controlled standstill 0 DI02 Reset Reset after fault moving clear of limit switches 0 DIO3 Reference cam Switch for zero or offset value 0 DI04 Limit switch right Limit switch for stopping 0 DIO5 Limit switch left Limit switch for stopping 0 DI10 IPOS input Variable pointer bit 20 0 DI11 IPOS input Variable pointer bit 2 1 0 DI12 IPOS input Variable pointer bit 2 2 0 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 24 4 4 Output terminals Level Terminal Unit terminal function Meaning 0 DBOO MDX Brake Brake control via auxiliary relay 0 DOO1 MDX Ready Controller active power supply to electronics OK 0 DO02 MDX Fault no fault 0 DO10 DIO11B IPOS output Variable pointer bit 20 0 DO11 DIO11B IPOS output Variable pointer bit 2 1 0 DO12 DIO11B IPOS output Variable pointer bit 2 2 0
348. nput DIO2 ENABLE 2 Enables the touch probe input DI03 When the signal changes low high and high low the actual positions are stored DISABLE 2 Inhibits the touch probe input DIO3 ENABLE 1_HI Enables the touch probe input DIO2 When the signal changes low high the actual positions are stored ENABLE 1_LO Enables the touch probe input DIO2 When the signal changes high low the actual positions are stored ENABLE 2_HI Enables the touch probe input DIO3 When the signal changes low high the actual positions are stored ENABLE 2_LO Enables the touch probe input DIO3 When the signal changes high low the actual positions are stored The user can determine whether a touch probe input has been activated either in the program for example with a MP TP2 MO or with the SETINT TOUCHP1 MO The user can determine whether a stored position value lies in a specific position range by com paring the values with those in the following user program Manual IPOSplus 351 23 352 Example 1 Assembler Commands Special unit commands In the program the drive travels between the absolute positions 0 revs and 100 revs If there is a change of signal level at touch probe input DIO3 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 DISA
349. nsated automatically In IPOSPI4S positioning commands for example GOA are performed with reference to the actual source position here absolute encoder DIP s The dynamic response that can be achieved depends on the properties and the installation of the absolute encoder as well as the position resolution e refer to the manual Positioning with Absolute Encoder DIP11A Vmax Maximum speed Sax Maximum acceleration PG Profile generator PC Position controller Nact Actual speed nc Speed controller ABS absolute encoder IPOS IPOSP4S program Position control with incremental encoder on the motor Processing the absolute encoder position in the IPOSP 4S program 474543627 Position control is performed in IPOSP S using the motor encoder connected to X15 e An incremental encoder resolver is always required on the motor for speed feedback s The high dynamic response of the inverter can be used directly for positioning The position information of the absolute encoder is mapped automatically in an IPOSP 4S variable and can be processed using program control s Using the DIP11 in this way means that reference travel is unnecessary e refer to the manual Positioning with Absolute Encoder DIP11 Vmax Maximum speed max Maximum acceleration PG Profile generator Pact Actual position of the motor encoder PC Position controller Nact Actual speed
350. nstruction statement Rl Edit gt Insert command Calls insert tool EI File gt Print Prints a program OH Help gt user manual Open online help Manual IPOSplus 287 22 288 22 1 1 22 1 2 22 1 3 22 1 4 22 1 5 Assembler Programming Basics Assembler Programming Basics The IPOSP 4S Assembler is part of the MOVITOOLS MotionStudio program package The Assembler program is entered over a number of screens Program header For user programs in which positioning commands are used enter the user travel units in the program header Task 1 Task 2 Task 3 Comments The IPOSPIus positioning and sequence control system allows a user program to be spilt into 3 subroutines task 1 task 2 task 3 which can run in parallel and indepen dently of one another Like command lines you can insert comments anywhere in the user program Remarks can only be saved on the PC they are not transferred when the program is downloaded to the inverter 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 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 subroutine ends with a return command RET The return command causes program processing to ju
351. nt defines the type of the reference travel Reference travel is set with P903 and can only be changed there 217 17 218 Compiler Functions Standard functions Key points type Expression for setting the travel type during reference travel type can adopt one of the following values GO0_C_W_ZP GOO_U_W_ZP GOO0_C_NW_ZP GOO_U_NW_ZP GOU CW CAM GO0 UW CAM GOU C NW CAM GO0 UU NW CAM GOO_RESET The meaning of the individual letters is as follows C Conditional Reference travel only if reference travel has not yet been performed U Unconditional Always referenced 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 been referenced is now de referenced INFORMATION ZP and CAM have no effect if reference travel type P903 is set to 0 5 or 8 If reference travel type P903 is set to type 3 or 4 CAM cannot be set Example main 17 3 10 _GoAbs _Go0 GOO C W_ZP reference waiting for zero pulse INFORMATION If the modulo function is used for positioning the commands GOA and GOR cannot be used The target position
352. ntrol 0 All Varlnterrupt 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 and interrupts this task for as long as the interrupt is processed H 1 IntNum 0 3 Defines a sequential number of the VarInterrupt An interrupt with the number x which has already been activated can be reactivated during the program run time with another data structure using the command call VarInt Hxx Mxx when the same interrupt number is specified in the new data structure at the position H 1 This feature is not available for the task 1 interrupts H 2 SrcVar Number of the reference variable whose value is compared with the com parison value ScrVar is the value of the reference variable that ScrVar refers to H 3 CompVar Comparison value or mask used to compare the value of the H 2 refer ence variable 347 23 348 Example Assembler Commands Set commands Variable VARINT element structure Description H 4 Mode 0 No interrupt event This can be used to deactivate this one interrupt without deactivating them all 1 One of the bits of the reference variable masked out using the CompVar mask has changed its status SrcVar t SrcVar t T amp CompVar 0 2 As long as the value of the reference variable is equal to the comparison value SrcVar
353. ntrolWordHigh amp 0x2 virt terminal DI11 jog mode define MY JOG MINUS 1PA_ControlWordHigh amp 0x4 virt terminal DI12 jog mode Variables for setpoint actual values fieldbus control status word long 1PA_ControlWordHigh Bits 8 15 of fieldbus control word 2 DI10 DI17 of the virtual terminals bits 6 13 in InputLevel SSPOSSPEED tPosVelocities Data structure for positioning speeds long 1PE_StatusWord User status word bit 8 15 of the fieldbus status word DO10 DO17 of the virtual terminals Bit 0 7 in OptOutpIPOS long 1ActPosition Actual position in incr 1ScalingNumerator Numerator for scaling the position 1ScalingDenominator Denominator for scaling the position lActVelocity Actual speed in 1 10 rpm Manual IPOSplus 267 Compiler Examples Compiler programming frame 18 Variables for controlling operating modes long lOpMode Operating mode currently selected long 1GlobalStateMachine Status of the global state machine define DISABLE 0 global state machine Status DISABLE define JOGGING al global state machine Status JOGGING define HOMING 2 global state machine Status HOMING define POSITIONING 3 global state machine Status POSITIONING long 1SubStateHoming Substatus in main status Homing define HOMING STOPPED 0 define HOMING STARTED 1 define HOMING READY 2 long 1SubStatePositioning Substatus in main status Posit
354. number of the bit to be set Example main _BitSet H100 3 sets bit 3 in H100 17 3 6 _Copy Syntax _Copy H2 H1 no Description Copies the number no of consecutive variables as a variable block H1 specifies the name of the first 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 IPOS S 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 the system response to a unit fault As such the command must be carried out before the fault occurs The argument specifies the fault and the corresponding response if this fault occurs All fault responses in the fault list in the operating instructions or the system manual that have a dot in column P can be programmed as fault responses 210 Manual IPOSplus Compiler Functions Standard functions 17 Key points fnr Constant expression for the number of the fault see list of faults in the operating instructions r Constant expression for a fault response that can adopt the following values FR_NORESP No response error is not displayed FR_DISPLAY Error is only displayed unit continues to run FR_SWOFF_F Output stage inhibit an
355. oder P941 Source Actual position value for Ext encoder X14 Selection actual posi IPOSP 4S position con tion troller P945 Synchro Selects encoder type Depends on the encoder that is con TTL nous nected SIN COS encoder type HIPER x14 FACE P946 Synchro Inversion of the direction Set so that the counting direction of NORMAL nous of rotation of the encoder the motor encoder counting direc INVERTED encoder tion of the external encoder counting direction X14 Manual IPOSplus Position Detection and Positioning External encoder X14 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 Manual IPOSplus The following applies for position detection with an external encoder on X14 e Variable H510 shows the actual position of the position control ACTPOS EXT e Variable H506 shows the touch probe position 1 TP POS1EXT e Variable H504 shows the touch probe position 2 TP POS2EXT The variables are always evaluated with parameter P944 59 Position Detection and Positioning SSI absolute encoder DIP 6 5 SSI absolute encoder DIP 6 5 1 Startup The drive must be started up in conjunction with the MOVIDRIVE drive inverter as de scribed in the MOVIDRIVE system manual It must be pos
356. oder factor numerator CGENOMINALOL sonein aee aaaea Neat 134 P944 Encoder scaling ext encoder eeeee 135 P945 synchronous encoder type 7131 135 P946 synchronous encoder counting drechon CA 136 P947 Hiperface offset X14 cceeeceeeeeeeteeeees 136 P948 Automatic encoder replacement detection 137 P95x absolute encoder GEI 138 P950 encoder type ee eeteeeeeeeeeeeeeeeettteeeeeeeaea 138 P951 counting direction seenen 138 P952 cycle Treouency ee 139 P953 position offset ce ccessseeseeeeeeeeeeeeeeeenes 139 P954 Zero offset c cccecceceeeeeeeeeteeeseeeteaaeees 139 P955 encoder scaling eceeeeeeeeteeeeeeeettteeeeeeeee 139 P956 CAN encoder baud rate 139 P96x IPOS modulo function ssssseeseene nenene 140 P960 Modulo function sssssseneseseeeeerrnrrennenneeee 140 P961 Modulo numerator 140 P962 Modulo denominaior 140 P963 Modulo encoder resolutton 140 P97x IPOS synchronization ecceeeeeeeeeeeees 141 P970 DPRAM synchronization ceeeees 141 P971 synchronization phase 141 Q Qualified poerson 17 R R mp mode TEE 130 RAMP TEE 128 RecStatS1 GPBUSGIREC 37 HecGtatG 2 GBUISG2HREC 37 Reference offset ce esceesecceceeeeeeeeeeeeeeeeeees 123 Reference speed 1 124 Reference speed 17 124 Reference speed 2 124 Reference travel to zero pulse ns nsnennseeesne 126 Reference travel type eeeceeeeseeeneeeeeeeenereees 124 RefOf
357. ograms You can create IPOSPIUs programs using either the Assembler or the Compiler Both programming tools are included in the MOVITOOLS MotionStudio software package INFORMATION Application modules solve typical drive tasks without the user having to create a pro gram Instead of programming you only have to set the parameters for a tried and tested program application module created by SEW EURODRIVE This saves you time and you do not need the programming know how described in this manual 3 2 Manual IPOSplus IPOSP 4s _ features e In conjunction with encoder feedback IPOSPlus positioning control provides high performance point to point positioning capability s The program is run independent of encoder feedback and operating mode e The unit continues to run the user program even if the unit develops a malfunction troubleshooting is possible in the user program POSP 4S can run several user programs tasks simultaneously independent of one another Tasks can be interrupted using interrupts e The user programs can contain several 100 program lines see Technical data page 25 e Easy to use and comprehensive control options for IPOSPUS units e Access to all available options Input output card Fieldbus interfaces Synchronous operation card e Extensive communication options System bus S bus RS 485 RS 232 with USS21A UWS11A UWS21A interface adapters
358. ommand END END The END statement indicates the textual not logical end of an IPOSPUs program The END statement is not an IPOS command you cannot delete it 23 7 2 Subroutine call CALL CALL Subroutines are called up with a CALL command CALL Mxx The corresponding jump flags Mxx are inserted in front of the first command in the subroutine A subroutine ends with a RETURN command RET The RETURN command causes program pro cessing to jump back to the line below the CALL command The following program lines will then be processed It is also possible to have nested subroutine calls maximum nesting depth 32 levels INFORMATION Do not exit subroutines by jumping to a main program or another subroutine Condi tional exiting of the subroutine must be performed by jumping to the end of the sub routine Structure Example Manual IPOSplus Command structure Mxxx Label optional Mxxx CALL Myyy Myyy Label as of which subroutine begins 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 next and the GOR WAIT 10 positioning command is processed IPOSplus ASSEMBLER MOVITOOLS iol x File Edit Program Run Help E IEG Reise Foe Ba g Numerator 4096 Denominator fi Unit
359. on of inputs outputs is available in the remark section of the program source code Manual IPOSplus Assembler Examples Hoist sample program 24 24 2 3 Schematic structure Schematic structure of the hoist with IPOSP YS L 2000 y BD 516940939 BD braking distance CAM Reference cam RHWLS CW hardware limit switch MZP Machine zero RSWLS CW software limit switch LSWLS CCW software limit switch UP upper travel range LHWLS CCW hardware limit switch S travel carriage Manual IPOSplus 363 24 24 2 4 Terminal wiring PLC DIOO DIO1 DI02 DIO3 364 PLC Assembler Examples Hoist sample program Wiring diagram IPOSPlus X13 DIO DI 1 DI 2 CAM DI 3 t RHWLS DI 4 7 LHWLS DI 5 DCOM V024 DGND ST11 j ojojo NIajanj Aejvj N IA external controller Controller inhibit Enable Reset Reference cam D104 DIOS DI10 DI11 DI12 ST 0V24 24V 101 DIO 102 103 T 104 X20 TT 2 105 LI 31
360. on of the process PD and parameter PARAM channels for data transfer MoviLink Cyclic Frame Types Acyclic ML_FT_PAR1 0 PARAM 1PD ML_CFT_PAR1 128 ML_FT_1 1 1PD ML_CFT_1 129 ML_FT_PAR2 2 PARAM 2PD ML_CFT_PAR2 130 ML_FT_2 3 2PD ML_CFT_2 131 ML_FT_PAR3 4 PARAM 3PD ML_CFT_PAR3 132 ML_FT_3 5 3PD ML_CFT_3 133 ML_FT_PAR 6 Parameter without ML_CFT_PAR 134 PD 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 parameter 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 MOVILNK Index Index SubIndex lt lt 16 DPointer H 5 Number of the variable from which the read data is stored or from which the data to be written is obtained structure MLDATA Result H 6 Contains the error code after the service has been performed or contains zero if there was no error see Parameterization Return Codes in the Communication and Fieldbus Unit Profile manual with parameter list Manual IPOSplus 223 17 224 Compiler Functions Standard functions Instruction type Standard Elements Brief description structure MLDATA WritePar H 0 Parame
361. on 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 free running is reduced to zero Synchronization can also be position controlled The slave drive moves at a synchro nous angle to the master drive following a specified number of master increments startup cycle process In this type of startup the slave drive moves with a quadratic ramp 9 4 1 Requirements Synchronous operation has been designed for MOVIDRIVE and places the following requirements on the drive system e Encoder feedback e DRS option cards not supported e Operating mode not V f Manual IPOSplus 116 IPOSplus and Synchronized Motion Synchronous operation with technology option Cam IPOSPUS variables H360 to H450 are reserved for synchronous operation and should not be used in the application program see section Overview of System Variables page 29 Synchronous operation is controlled using IPOSP 4S variables within an IPOSPIUS program All states of synchronous operation can be viewed and set in the variable range for synchronous operation from H360 to H450 e ISYNC startup is supported by a graphical user interface Slave is not subject to slip only with MOVIDRIVE A For more detailed information refer to the Internal Synchronous Operation ISYNC manual Synchronous operation with technology
362. on windows for this channel 1 4 the CCW limit value must always be lower than 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 Function chart of the expanded cam control CAM CONTROL CamState 3 CamForceOff Bit 2 CamSource CAM_EXT_OUT8 CAM_EXT_OUT 1 DEAD TIME LIMITS 1 4 CamOut ShiftLeft 477814283 Hxxx INT CAM 1 Internal cam signal 1 INT OUT 1 Internal output signal 1 Hxxx Output variable defined with CamDestination 92 Manual IPOSplus Position Detection and Positioning Cam controllers Example Required parame ter settings Manual IPOSplus A modulo rotary table has two processing stations installed 180 apart from each other It is driven by a gear unit with a ratio of 1 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 360 65536 Inc 360 355 5 64626 Inc 910 Inc 180 185 175 33678 Inc 31858 Inc 1 180 32768 Inc
363. only be used with MQx modules _MovCommDef H The MovComm commands enable cyclical data exchange between MQx and usually up to 4 MOVIMOT units via the RS 485 interface with the MOVILINK profile _MovCommDef is used to set up a communication connection with MOVIMOT by set ting parameters such as the unit address for example MovCommOn is used to start cyclical communication Thereafter the cyclical communication runs in the background irrespective of the current command processing in the IPOSPlus program A copy of the exchanged process data is available in the IPOSP S variables and can be read and written there Cyclical communication stops when the IPOsPlus program is stopped Up to 8 communication links are permitted Note that the number of communication links has a very powerful influence on the bus cycle time of the RS 485 and therefore also on the response time of the MOVIMOT unit Approximately 20 ms bus cycle time must be taken into account per communication link or station The prerequisite for achieving the 20 ms bus cycle time per station is fault free cabling of the RS 485 If a timeout occurs during cyclical communication this is displayed in fault 91 Gateway Sysfault When a feedback signal is received from MOVIMOT the 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 t
364. operation is the continual comparison between master and slave positions The system determines the difference of the route information between master and slave and stores this value in the form of incremental encoder signals in an internal difference counter that cannot be accessed by the user Binary signals such as DRS SLAVE IN POS DRS LAG ERROR DRS PREWARNING and MASTER STANDSTILL are set depending on the basis of this difference This counter is evalu ated depending on the operating mode In synchronous operation the internal differ ence counter is used to correct any angular offset between the slave and master to 0 DRS is controlled using the variables H473 H476 H477 and H484 see section Over view of system variables The following section describes how the DRS can be ad dressed from the IPOSP 4S program For more detailed information refer to the DRS11 Synchronous Operation Card man ual 107 108 IPOSplus and Synchronized Motion Synchronous operation with a DRS option card 9 3 1 Activating and deactivating the free running function The system variable H476 DRS CTRL can be used to set and reset the two program mable outputs of DRS11 Free running function DRS11B IN 5 DCOM V024 OUT 1 DGND EE st Br LED Sync OFF 478829067 Requirement DRS11 can be switched to the free running mode using IPOSPI4S via
365. opped 12 4 3 P932 IPOS CTRL W Task 2 Display range START STOP IPOS CTRL W Task 2 in the DBG60B keypad only not in SHELL Display parameter cannot be set using DBG6OB START Task 2 of the IPOSPUS program is currently being processed STOP Task 2 of the IPOS S 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 note that P911 Positioning ramp 1 page 127 P912Positioning ramp 2 page 127 are of a greater or equal value P933 lt P911 amp P912 If P933 gt P911 amp P912 torque formation still has a trapezoidal shape with the set jerk time not being the time for the torque formation 12 4 5 P938 Speed task 1 Setting range 0 9 additional Assembler commands ms The standard setting for task 1 is 1 Assembler command ms The speed can be in creased by up to 9 additional Assembler commands ms with P938 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 Manual IPOSplus P9xx IPOS Parameters
366. or example 200 kBaud 500 kBaud 40 lt 70 For points 1 and 2 note that the unit firmware reserves its own object numbers automat ically e The object number entered in parameters P885 P895 for SBus synchronization e The following object numbers are used for communication via the MOVILINK profile depending on the SBus address in parameter P881 P891 and the SBus group address in parameter P882 P892 8x SBus address 3 for process output data 8x SBus address 4 for process input data 8x SBus address 5 for synchronous process output data 8x SBus address 3 512 for parameter request service 8x SBus address 4 512 for parameter response service 8x SBus group address 6 for group process data 8x SBus group 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 Manual IPOSplus 233 Compiler Functions Standard functions 17 Example See _SBusCommStat 17 3 19_ SBusCommOn Syntax _ SBusCommOn Description In MOVIDRIVE B the command has been replaced by _SBusCommState However due to downward compatibility it can still be used This statement triggers the reception of data and the cyclical transmission of previously defined data objects The data objects are initialized using the SBusCommDef function with the arguments SCD_TRCYCL and SCD_REC IN
367. ory and copies them to their original directories If a file with the same name already exists in the directory the system asks whether it should overwrite this file The creation date is entered for both files to help identify them If there is no project data available the process is canceled 165 Compiler Editor Compiling a project 13 13 10 Compiling a project To generate a program in a form that the inverter can understand the project must be compiled If a project consists of several source files all source files are compiled to an IPOSPI4S program during the compilation process Project compilation can be started by choosing Project Compile or by clicking Ri The file is also saved if the Save automatically before Compiling function has been ac tivated in the Compiler settings In the same way an IPOSPlus program file and listing file is generated when these settings are activated for the Compiler Once the compiling process is complete the following window appears Status window for compilation x Status OK Pie O MD AMBRUSMPOS Sum Sumsum IPC Line Class Code Length 29words 0 4 globals 420 420 420 449 D initials 0 0 Z 0 127 var 400 400 4 400 419 H used pragma 0 127 450 560 1023 Run Compilieren Elapsed Time 0 40 Seconds 484538891 e Status Result of the compiling process OK or ERROR e File Source file of the project in
368. ositioning 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 INFORMATION P302 Maximum speed 1 P312 Maximum speed 2 limits P913 P914 set P302 Maxi mum speed 1 P312 Maximum speed 2 to a value ca 10 greater than P913 P914 to prevent lag errors 12 2 4 P915 Velocity precontrol Setting range 199 99 0 100 199 99 When the setting is 100 the drive moves at an optimum speed with a linear speed pro file If a value less than 100 is specified a larger gap between position setpoint and actual position occurs lag distance during a positioning operation This results in a soft run in to the target position for the acceleration procedure INFORMATION Parameter P915 is only in effect with the LINEAR and JERK LIMITED ramp types The function has no effect for the ramp types SINE and SQUARED Manual IPOSplus 12 127 P9xx IPOS Parameters P91x IPOSplus parameters 12 12 2 5 P916 Ramp type Ee This parameter specifies the type of the positioning ramp This influences the speed or acceleration characteristics during positioning INFORMATION The following ramp types are no
369. ot 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 must not exceed the setting range expansion factor e g 100 000 e Travel distance factor NUMERATOR 16384 x 100000 1638400000 e Travel distance factor DENOMINATOR 314 15926 x 100000 31415926 INFORMATION Since T is not a finite number the target position specification will always contain er rors Manual IPOSplus 277 20 Assembler Introduction Setting the user travel units Example B Incre ments Example C Out put revolutions Practical informa tion 20 1 2 UNIT e Travel distance factor NUMERATOR 1 e Travel distance factor DENOMINATOR 1 e Travel distance factor NUMERATOR Increments motor revolution x gear ratio i 4096 x 4 16384 e Travel distance factor DENOMINATOR 1 Practical information for determining the travel distance factor during startup e g setting the user travel units in mm 1 Set both the travel distance factors NUMERATOR and DENOMINATOR 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 e Starting position 1000 mm e Target position 1453 mm e Distance covered 453 mm 4 Enter the travel distance factors in the program hea
370. ountered It is then identified imme diately with define CONST_H Then if the const h header file is linked elsewhere in the program the CONST_H macro identifier has already been identified and the if ndef CONST_H query is answered in the negative As a result processing immedi ately jumps to the endif statement This prevents the file from being incorporated un necessarily more than once which would lead to an error message 14 177 14 178 Compiler Programming include 14 3 include In addition to the ifndef statement there is also the ifdef ifdefined statement This statement does not have to be negated An if else construction is also possible In this case this means that the part of the statement following the else is processed if the ifdef or ifndef query is not fulfilled This results in the following possibilities ifdef identifier_1 Program text_1 else Program text_2 endif ifndef identifier_2 Program text_3 else Program text_4 endif ifdef identifier_3 Program text_5 endif Note that these preprocessor statements can also be used to good effect in the main program not just in header files As a result for example parts of a program can be con verted specifically for a machine without having to make major changes to the source text This directive makes it possible to incorporate source texts from other files header files in
371. parameter service is processed in a 5 ms time slice 8 5 Special features of communication via SBus Manual IPOSplus If you use the SBus instead of a fieldbus as the data source for control and setpoint val ues the same functionality is available as for the fieldbus but cyclical process data is read or written in a time slice of 1 ms Furthermore it is possible to receive or send additional cyclical or acyclical messages via an SBus with an IPOSPUS program For more information see MOVILINK and SCOM in the sections Compiler Functions and Assembler Commands 105 IPOSplus and Fieldbus ae Special features of communication via RS 485 8 6 Special features of communication via RS 485 With MOVIDRIVE and MOVITRAC 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 106 Manual IPOSplus IPOSplus and Synchronized Motion Introduction 9 PoOsPl4 s and Synchronized Motion 9 1 Introduction MOVIDRIVE and MOVITRAC B allow for master slave operation Further you can synchronize several MOVIDRIVE units more exactly for example for applications with the following functions e Mechanical axes run by
372. pensate the delay time of an actuator 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 inter val H 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 IPOSP 4S 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 bit set if refer ence variable H 0 outside the position window H 6 to H 13 H 5 GSCAM NumOfCam Number of the position windows defined in H 6 to H 13 the left limit value must always be smaller than the right one If a modulo axis requires a position window that exceeds the 360 0 limit then this range will have to be divided into two position windows This process lets the operator set three related ranges for this out put H 6 GSCAM PosL1 CCW limit value of the first position window H 7 GSCAM PosR1 CW limit value of the first position window H 8 GSCAM PosL2 CCW limit value of the second position window H 9 GSCAM PosR2 CW limit value of the second position window H 10 GSCAM PosL3 CCW limit value of the third position window H 11 GSCAM PosR3 CW limit value of the third position window H 12 GSCA
373. pile Compiles project RI Project gt compile download Compiles project and downloads it to inverter R Program compare with inverter Compares project with the program in the inverter 3 Run start Starts the IPOSP4S program S Run stop Stops the IPOSP4S program EN Run run to cursor Runs program to where the cursor is positioned Det Run single step Runs single step tn Run skip Skips an instruction statement Edit insert instruction Calls insert tool 8 File print Prints source file Help user manual Open online help Manual IPOSplus Compiler Programming 14 14 Compiler Programming The source text of a program written with the IPOSPlus Compiler is made up of various parts These must first be considered individually BR RR RRR KK TTT TO TO TO TOTO k k IK k ke File name Program_structure IPC Date 04 02 2002 Author Thomas Ambrus Comment with notes on the program SEW EURODRIVE Bruchsal Technical Documentation Brief description Source code program struc ture AA Program header with pre processor state EE ments and if necessary definition of the IPOS Source File variable include lt const h gt include lt io h gt Main Function IPOS Entry Function The main function contains the initializa main tion part and the endless loop for task 1 Eee eee rege Initialization
374. placed meaning H123 2000 After each macro expansion the resulting text is examined again This makes it possible to use nested macros define setpoint H10 define variablel setpoint define minimum 20 H11 variablel minimum in this line the macro definition variablel 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 ables by mistake INFORMATION The compilation process cannot detect whether a variable is defined with the same name as a structure The inverter generates the error 10 IPOS ILLOP Example define position H2VARINT position 14 6 undef This directive makes it possible to deactivate a macro that was previously created using define Syntax undef MacroIdentifier The following example illustrates this point define position 1000 position is valid H12 position meaning H12 1000 undef position position is not valid H13 position macro definition position is not replaced Compiler error occurs 180 Manual IPOSplus Compiler Programming declare 14 Compiler error due to missing definition H1Z position H13 position Compile Status ERROR File CADataiSEWNMPOS C Program_structure IPC Uw 28 Class IDENTIFIER
375. ple Customer Muller Machine Hoist station MOVIDRIVE hoist axis fork drive Complete documentation Hoist axis Documentation Source Parameters Measurements Fork drive Documentation Source Parameters Measurements A project management structure such as this permits anyone who has to familiarize themselves with the machine or the program to obtain a rapid overview Documentation 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 13 163 13 Compiler Editor Opening a project 13 8 Opening a project If the Compiler is opened the Editor is opened with the last source text to be processed in the last project that was opened as long as the pose Compiler was exited when the Editor window was open An existing project can also be opened by choosing Project Open You can search for the project file in the dialog box and open it using the Open button 13 9 Handling projects with MOVIDRIVE B INFORMATION MOVIDRIVE B allows you to store an error free compliable project with all the ac companying files in MOVIDRIVE The complete source code can be stored in MOVIDRIVE and called up at any time 13 9 1 Saving a project
376. point the received data is stored Differences in user data formats MOTOROLA and INTEL MOTOROLA format INTEL format CAN Data Byte O 1 2 3 4 5 6 7 JO 1 2 33 4 5 6 7 Variable H 1 H H SC Variables byte 3 2 11 0 3 2 1 JO JO 1 2 33 J0 1 2 3 INFORMATION In order to send or receive the data via SBus2 you have to add 0x1000000 to the ob ject number OR operation With the SCOM command even the variables that can be stored in the non volatile memory HO H127 and all the parameters are only written in the volatile memory Example 1 Cyclical transmission of two variable values H008 and H009 with the SCOM command from the sender to the receiver to variables H005 and H006 Sender settings 1POSplus ASSEMBLER MOVITOOLS e Edit Program Run Help iol x e Denominator fi TRANSMIT CYCLIC HO Unit Identifier Numerator 4036 SCcOM PECEL Ba g ftums Value SCOMON HO Objectno Hi Cycletime 10 H2 Timeoffse 0 H3 Len H4 D Pointer 8 HS Returncod 96 1025 8 0 EU anr 2 0 2 3 Program text modified yi 3 SBus address fo xl HO Objectno 1025 user defined H1 Cycletime 10 10 ms H2 Timeoffset 0 no Offset H3 Len 8 Variable length 8 bytes H4 D Pointer 8 Data pointer value at H8 H5 Returncode 96 H8 11111 sent value 514587147 Manual IPOSplus Assembler Commands Communication commands
377. points Standard structures for speed and ramp SSPOSSPEED tPosSpeed SSPOSRAMP tPosRamp 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 I the speed and ramp are not changed in the program the values in SHELL apply see the table _GoRel GO MATT 3000 Moves to position 3000 Inc _InputCall level mask function name The function is used for calling up a user defined function depending on the level pres ent at the input terminals The name of the function the required polarity of the input level and the relevant terminals are specified as arguments The event function is called up when all input terminals marked with a one in mask have a 1 level level IC_HIGH or 0 level level IC_LOW level Constant expression which specifies the signal level for which terminals are to be tested This expression can adopt one of the following values IC_HIGH HIGH level 1 level IC_LOW LOW level 0 level mask Constant binary expression which specifies the terminals to be tested The bits in the expression have the following meaning Bit 0 DIOO mask 0b1 Bit 1 DIO1 mask 0b10 Bit 2 DIO2 mask 0b100 Bit 3 DIO3 mask 0b1000 Bit 4 DI04 mask 0b10000 Bit 5 DIO5 mask 0b100000 Bit 6 DI10 mask 0b100
378. ponding index number refer to the system manual and the parameter list You can also display the index numbers 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 cannot be exchanged within one unit using the MOVILINK command Using the index access via MOVILINK user defined inverter values that cannot be ac cessed with GETSYS SETSYS can also be written read from IPOSP S In this way for example the inverter can set the parameters itself in the initialization section Before the command is called initialize the variables that the command uses command structure The beginning of this command structure is transferred to the command as an argument The data structure contains the data to be written or read Set the parameters for communication in the sender master and receiver slave The MOVILINK command is only called in the sender master Manual IPOSplus Compiler Functions Standard functions Key points H Start variable of the command structure The command structure is set up as follows H 0 Bus type communication interface H 1 Address target addr
379. py MDX gt DBG and P806 Copy DBG gt MDX 21 4 Starting stopping programs A program can be started once it has been downloaded to the inverter Choose Run Start or the icon in the toolbar Once the program has been started a green arrow program pointer is displayed in the project window to highlight the program line to be processed The display in the toolbar changes from PSTOP to START To stop the programs in task 1 task 2 and task 3 choose Run Stop or the el icon in the toolbar Once the program has been stopped the 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 comparison Use the comparison function of the IPOSPUS Assembler to compare an Assembler pro gram loaded in the Editor window with a program loaded in the inverter To call the comparison function choose Program Compare with inverter or click on the S icon in the toolbar If the programs match the dialog box on the left below will be displayed If the programs do not match the dialog box on the right will be displayed Comparing program with inv x Comparing program with invel
380. r The setting must be made so the counting direction of the motor encoder X15 and the absolute encoder X62 match 138 Manual IPOSplus P9xx IPOS Parameters P95x absolute encoder SSI 12 12 6 3 P952 Cycle frequency Setting range 1 200 Defines the cycle frequency at which absolute encoder information is transmitted from the encoder to the inverter A cycle frequency of 100 corresponds to the nominal fre quency of the encoder in relation to a 100 m cable length 12 6 4 P953 Position offset Setting range 231 1 0 231 414 The position offset P953 only needs to be set on incremental encoders it should be set to 0 for other encoders Note The position value will be recalculated and overwritten automatically after suc cessful completion of the reference travel 12 6 5 P954 Zero offset Setting range 231 1 O 23 4 Zero offset is used for assigning the value you want to a specific position The range of values can adopt positive or negative position values The maximum valid parameter must not be exceeded The limit is determined by the range of values of the numerator 231 and the range of values of the absolute encoder Move the drive to a known posi tion Read off the value of variable H509 ACT POS ABS and enter the following value in parameter P954 Zero offset P954 Variable H509 required value The required value is the display value you wish to have for the current position
381. r H511 GS_SPPOS Setpoint position H491 GS_TPOS Target position of the profile generator GS_INPUTS Binary inputs H483 MOVIDRIVE A H520 MOVIDRIVE B of the basic unit and options GS_SYSSTATE Identical to status word 1 of the fieldbus unit profile fault code and operating status GS_OUTPUTS Binary outputs H482 basic unit and options GS_IxT Unit utilization in 0 1 rated unit current GS_ACTPOS GS_SPPOS GS_TPOS Resolution depends on the encoder selected in P941 Motor encoder 4096 Inc revolution External encoder X14 Encoder resolution x P944 DIP SSI encoder Encoder resolution x P955 Manual IPOSplus 211 17 212 Compiler Functions Standard functions GS_ANINPUTS Voltage value current value of the analog inputs 1 and 2 Voltage input 10 V O 10 V 10000 0 10000 Current input 0 20 mA 0 5000 4 20 mA 1000 5000 H 0 Analog input 1 H 1 Analog input 2 Only for MOVITRAC B GS_ANINPUTS H 0 Analog input 1 H 1 Potentiometer of FBG11B GS_ANINPUTS3 H 0 Analog input 1 H 1 Potentiometer of FBG11B H 2 Analog input 2 FIO11B option The attribute GS_ANINPUTS3 of the command _GetSys generates an Error 10 IPOS ILLOP in MOVIDRIVE B GS_CAM Used to implement a cam controller With the GETSYS command a standard cam controller with 4 outputs can be used per drive For MOVIDRIVE units you can use an
382. r cyclical communication was started MOVLINK is locked by the _MovCommOn command 501 MOVLNK Number of variable 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 HO 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 505 MOVCOM _MovCommDef command was called for the 9th time Only 8 com munication relations are permitted 506 MOVCOM Bus type is invalid Only 2 RS 485 2 permitted 507 MOVCOM An invalid station address has been entered Addresses 253 and 254 are not permitted 0 252 255 508 MOVCOM An invalid PDU type was entered in format Only cyclical frames are permitted 0 6 509 MOVCOM Number of variable 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 HO H450 511 MOVCOM Station does not support the PDU type entered in format Manual IPOSplus P9xx IPOS Parameters P90x IPOS reference travel 12 P9xx IPOS Parameters A DANGER Risk of crushing if the motor starts up unintentionally Severe or fatal injuries e Ensure that the motor cannot start unintentionally s Note that modifying these parameter
383. r value P900 e P947 Encoder value P900 136 Manual IPOSplus P9xx IPOS Parameters P94x IPOSplus encoder 12 12 5 8 P948 Automatic encoder replacement detection Setting range ON OFF This parameter is only effective with Hiperface encoders e ON A replaced Hiperface encoder is detected Reference travel is required before the IPOS referenced bit is set Note the following when operating a linear motor with AL1H motor encoder If the linear motor was commutated in the dialog Encoder adjustment during initial startup the LSM commutated bit will be cleared in the IPOS status word after en coder replacement A new commutation travel must be triggered to enable the invert er Doing so will reset the LSM commutated bit Commutation travel is triggered automatically if the CONTROLLER INHIBIT 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 Hiperface encoder is always referenced The IPOS referenced bit is set Note the following when operating a linear motor with AL1H motor encoder If the linear motor was commutated in the dialog E
384. 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 setpoint source In conjunction with EtherCAT this parameter can be used to set the source for the set point in IPOSP YS The preset value is H499 130 Manual IPOSplus P9xx IPOS Parameters P92x IPOS monitoring 12 3 P92x IPOS monitoring 12 3 1 P920 P921 SW limit switch CW CCW Setting range SES 1 O 2311 The software limit switches let the user limit the range in which travel commands are ac cepted This is implemented via software The limits of the movement range are speci fied using these two parameters software limit switches If P941 Source actual position is set to motor encoder or external encoder then these do not take effect until after per formance of a reference travel If page 134 is set to absolute encoder DIP then these are effective immediately without reference travel If the software limit switches are in effect the system checks whether the target position H492 of the current travel com mand is beyond the software limit switches If the target position is beyond the range limited by the limit switches the travel command will not be executed The drive re sponds according to the fault response set in P838 If P838 error response SW limit switch is set to warning or fault then error message A1 F78 IPOS SW limit switch is generated T
385. rawing the controller inhibit the error code 39 reference travel is set The axis does not start up once the signal has been restored The IPOSPlus program stops at this command A reset must be performed binary input fieldbus SHELL The IPOsPlus program starts at the beginning of the first statement Structure Command structure Mxxx Label optional Mxxx GOO X1 X1 Type of reference travel 324 Manual IPOSplus Assembler Commands Positioning commands 23 6 2 GOA absolute positioning GOR relative positioning The argument of the travel command includes the target position INFORMATION If the target position is specified via a variable the value can only be entered in incre ments based on 4096 increments motor revolution Constants can be entered in user travel units INFORMATION If the modulo function is used for positioning the commands GOA and GOR cannot be used the target positions are written directly to H454 There are two types of positioning absolute and relative 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 scr
386. re described as standard functions in contrast to user defined functions The parameters of the IPOSPIUS 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 can de fine them using the define directive The following tables list the standard functions and the unit specific availability 17 2 1 Standard bit functions Command Function Availability Reference MOVIDRIVE PB MOVITRAC B MQx _BitClear Deletes a bit within a variable x x X page 209 _BitMove Copies a bit in one variable to a bit X X X page 209 in another variable _BitMoveNeg Copies a bit in one variable to a bit X X X page 209 in another variable and negates it _BitSet Sets a bit within a variable X X X page 210 Manual IPOSplus 17 205 17 206 Compiler Functions Overview of commands for standard functions 17 2 2 Standard communication functions Command Function Availability Reference MOVIDRIVE B MOVITRAC B_ MQx _MoviLink Process and or parameter data obs
387. rectory for list file if activated Once you have confirmed your entries by pressing the OK button the newly created project appears in the tree structure 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 IPOSP 4S program Under the Documents node you can attach any files required for documentation for example Word documents right mouse click Add document to the project All files in this node are excluded from the compilation process 158 Manual IPOSplus Compiler Editor Creating a new project 13 In the next dialog box that appears give the new source file a name If you exit the box by selecting Save another dialog box opens This dialog box can be used for defining a basic program structure which is displayed as an empty program template in the Editor window Defining the program structure x Main Function Interrupt IV Initialisation part IT Add Interrupt Source Task 2 System unit error zl dd Function Name Function Name fak finterupt Task 3 T Add Function Name ffak3 Cancel 484387339 13 5 2 Defining the program structure Select the Initialization part check box if the main program is to contain an initialization part in wh
388. red programming Different programming techniques for loops Compiler control using preprocessor commands Standard structures User defined structures Standard functions Debugger for troubleshooting Extensive options for making comments e Programming in the Assembler offers Remark lines Programming in user travel units units are entered in the program header e 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 the fieldbus interface option IPOSP 4S position setpoint Whether you need to use encoder feedback for setpoint processing depends on which operating mode is selected The setpoint that is actually active depends on the following settings Manual IPOSplus Operating mode P700 Setpoint source P100 Setting of the input terminal parameters P600 P619 Fieldbus PO data assignment monitor mode Selection of manual operation 21 22 System Description Controlling IPOSplus units 3 3 Controlling IPOSP S units IPOSP 4S units can be controlled as follows e Control via input terminals on the unit IPOSPI4S control word on System variable H484 CTRL
389. riable X2 remains unchanged Command structure Mxxx Label optional EE DI Variable result X2 Variable or constant 23 355 23 356 Assembler Commands Comparison commands Example 1 Example 2 CPGT COMPARE GREATER THAN Structure Example 1 Example 2 CPLE COMPARE LESS OR EQUAL Structure Example 1 Example 2 SET HO 13 SET H1 50 CPGE HO gt H1 After the program has been processed HO has the value zero and H1 the value 50 SET HO 3 CPGE HO gt 3 After the program has been processed HO has the value one The CPGT command compares observing the signs whether variable X1 is greater than 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 Command structure Mxxx Label optional Mxxx CPGT X1 gt X2 x1 Variable result X2 Variable or constant SET HO 3 CPGT HO gt 3 After the program has been processed HO has the value zero SET H2 CPGT HO 2 SET HO 3 gt H2 After the program has been processed HO has the value one 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
390. rror code fnBuildStatusWord _BitMove 1PE_ StatusWord 1 StatusWord 2 Inverter ready _BitMove 1PE_ StatusWord 2 StatusWord 20 IPOS referenced _BitMove 1PE_ StatusWord 3 StatusWord 19 Target position reached _BitMoveNeg 1PE StatusWord 4 StatusWord 1 Error if MY_NO ERROR if an error occurs overwrite the status bits of the operating modes with the error code 1PE StatusWord 1PE StatusWord amp lErrorCode lt lt 8 tPE PI1 1PE StatusWord end fnBuildStatusWord 274 Manual POSplus Compiler Error Messages 19 Compiler Error Messages Manual IPOSplus The source text errors that are recognized by the pre processor and the Compiler are divided into error classes and error codes CLOSE BRACKET Error class Error code Possible cause STATEMENT NOT FOUND Statements missing from body of loop SEMICOLON Semicolon missing after statement CONDITIONAL COLON Colon missing from conditional statement BLOCK END Block without closing bracket BREAK SEMICOLON Semicolon missing after break CASE ILLEGAL TYPE Case must be followed by constant COLON Case constant must be followed by colon DEFAULT Default branch contains error s or is in wrong position COMPILER Error text Internal system error contact SEW CONTINUE SEMICOLON Semicolon missing after continue DECLARE IDENTIFIER
391. rt of the communication and user data ASCOMON command is not required A SCOM TRANSMIT ACYCLIC H command is used to send several variables To do so set the variable pointer H 2 accordingly in the IPOsPlus program before calling each command 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 same for the data exchange The object numbers gt 1024 2048 should be used to avoid a data clash whenever MOVLNK com mands are also used via the SBus H 1 Number of data bytes and data format Bit 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 2 Number of variable H at which the data to be sent are to start H 3 Status of the transmission command 0 Ready 1 Sending 2 Sending successful 10 Send error INFORMATION Prior to transmitting acyclical telegrams the SBus must also be activated with SCOMON and SCOMSTATE The IPOSPUS program waits at this command until the message has been sent If no other station is connected the telegram cannot be sent The wait status can only be ended by a monitoring function for example from another task RECEIVE Manual
392. s cyclically every 10 ms via SBus Another program receives the data that is sent With the SBusCommDef command you set up a data object for cyclical data transmis sion The send object is described in the variable structure tBusTr the receive object is described in TBusRec In order to start the cyclical data transmission you have to call up the SBusCommOn function for MOVIDRIVE A and the _SBusCommState function for MOVIDRIVE B 18 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 gt 2 P816 SBus Baudrate gt 500 kBaud ze EE EE EE EE een eens A d IA IPOS Source file ze EE EE EE ees enen AS d include lt constb h gt include lt iob h gt Definition of SCOM structures SCREC tBusRec Definition of variables define Data_Varlx H305 define Data_Var2x H306 JEE Main program EE E EE EE EE k d main Initialization of SCOM transfer object tBusRec ObjectNo 1060 object number tBusRec Format 8 8 byte tBusRec Dpointer numof Data_Varlx data buffer Start SCOM _SBusCommDef SCD _REC tBusRec j _SBusCommState SCS _START1 1 Start cyclic communication MOVIDRIVE B _SBusCommOn Start cyclic communication MOVIDRIVE A Main program loop while 1 256 Manual IPOSplus Compiler
393. s 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 ModTagPos Modulo target position MOD TAGPOS If a changed value is written to the modulo target position for an enabled inverter positioning begins in output units The position setpoint for H453 1 0 is set in 16 bit resolution in the unit H454 MODTAGPOS k x 360 0 360 k x 218 0 216 1 k number of complete revolutions Once a new value has been written to the variable only the target position within a revolution is visible in vari able H454 We recommend that you also write the new value to a temporary variable for improved diagnos tics Once position 454 has been written the firmware calculates an incremental target H492 This causes H473 bit 19 In position to remain set for up to 1 ms 455 ModActPos Modulo actual position MOD ACTPOS The current modulo actual position moves in 16 bit resolution when H453 1 0 between 0 and 216 incre ments 0 and 360 456 ModCount Increments within a modulo revolution before scaling to the output MOD COUNT Display value of the internal temporary result when the incremental encoder value H509 H510 H511 IPOS encod
394. s is disabled Reserved A rapid stop is performed until the mode is in use 265 Compiler Examples Compiler programming frame 18 18 10 Compiler programming frame The following sample program can be used as the basic frame when creating an IPOSPlus program It includes a state machine with four operating modes e DISABLE No operating mode is selected e JOGGING Jog mode e HOMING Reference travel e POSITIONING Positioning mode IT Name Basic_program Version 03 07 21 Y M D Function Basic frame for an IPOS program with state machine with entry and exit functions for control via fieldbus or RS485 monitor with 3 I O process data words Settings required in SHELL P100 P101 RS485 for simulation with bus monitor comment FIELDBUS and define for constants for operation with fieldbus P6 xx no functions exception e g P602 REFERENCE CAM per reference travel type P700 xxx amp 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 lt gt OFF ActPos Mot gt ModActPos and TargetPos gt ModTagPos Drive control via PLC bus monitor process output data DI00 CONTROLLER INHIBIT 1 word Control word 2 2 word jog positioning speed 1 10 rpm 3 word target position Assignment of control word 2 15 1413121110 9 8 7 6 5 4 3 2 1 0
395. s no error 0x05000002 indicates the connection has timed out H 1 PO1 data of process data exchange H 2 DI data of process data exchange H 3 PO2 data of process data exchange H 4 PI2 data of process data exchange H 5 PO3 data of process data exchange H 6 PI3 data of process data exchange The process data is coded according to MOVILINK 314 Manual IPOSplus Assembler Commands Communication commands 23 Variable structure of the parameter data Sample program 23 5 3 MOVON Manual IPOSplus 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 No action or parameter data exchange is complete 1 Start of the parameter data exchange H 2 1 Read service 2 Write with storage in non volatile memory 3 Writing without saving H 3 Index number of parameter to be revised or read H 4 Read data after read service Data to be written in case of a write service Proceed as follows when making parameter settings 1 Entry of service index and data 2 Start the parameter setting process by setting StartPar to 1 3 Wait for the service to be performed end is indicated when StartPar is set to 0 4 Evaluate ParaResult If an error has occurred the data value is invalid If no error occurred the service was successful ZS IPOSplus ASSEMBLER
396. s 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 Command structure Mxxx Label optional Mxxx ORL X1 X2 x1 Variable result X2 Variable SET H01 100 SET H02 0 ORL HO1 H02 After the program has been processed H01 has the value one SET HO1 0 SET H02 0 ORL Hol H02 After the program has been processed H01 has the value zero Manual IPOSplus Assembler Commands Comparison commands 23 NOTL LOGICAL NOT Structure Example 1 Example 2 Manual IPOSplus The NOTL command carries out the logical negation of a variable The result is written to variable X1 Variable X2 remains unchanged The result is one when variable X2 0 The result is zero when variable X2 0 Command structure Mxxx Label optional Mec NOTE RTS Eh Lem Variable result X2 Variable SET H02 100 NOTL H01 NOT H02 After the program has been processed H01 has the value zero SET H02 0 NOTL H01 NOT H02 After the program has been processed H01 has the value one 359 24 360 Assembler Examples Flashing light sample program 24 Assembler Examples 24 1 Flashing light sample program 24 1 1 Sample Controller Quick start exam ple This sample program switc
397. s the travel speed for the second part of the reference travel Speed change always takes place via stop ramp t13 The search directions dur ing reference travel are determined by the respective reference travel type The speed is effective upon leaving the reference cam until reaching the first zero pulse 12 1 4 P903 Reference travel type Setting range 0 8 The reference travel type specifies the reference travel strategy that is used to establish 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 and enabled with the exception of reference travel type 8 There are also types available that can function without a reference cam e Type 0 CCW zero pulse First search direction is CCW Reference position Left zero pulse from current position Machine zero reference position reference offset e Type 1 CW end of the reference cam First search direction is CCW Reference position First zero pulse or falling edge to the left of the reference cam Machine zero reference position reference offset e Type 2 CW end of the reference cam Manual IPOSplus
398. s to be executed next The program can also be interrupted by pressing the F4 key Run to cursor The pro gram is stopped in the command line in which the cursor is positioned Manual IPOSplus Assembler Editor Loading the program from the inverter 21 21 7 Loading the program from the inverter In the IPOSPI4S Assembler you have the option of uploading a program stored in the inverter To do so choose Program Upload or click on the B icon in the toolbar The upload process deletes the previous Assembler program that you had open Remark lines are not saved in the inverter and as a result are lost during the upload pro cess 21 8 Overview of the icons The functions that can be called up from the tool bar are listed below Symbol Menu item Description el File gt open Opens a program File gt save Saves a program Program gt compile Compiles a Program S Program gt Compile download Compiles a program and downloads it into mi the inverter Program gt Upload Uploads a program from the inverter ay Program gt compare with unit Compares program in the editor with the program in the inverter e Run gt Start Starts the IPOSP 4S program el Run gt stop Stops the IPOSP 4S program er Run gt run to cursor Runs program to where the cursor is posi tioned be Run gt single step Runs single step T Run gt skip Skips an i
399. s without knowledge of the IPOSPlus program which may be active can cause unexpected movements and place unwanted loads on the mechanical driveline It is essential that you are familiar with the IPOSP4s manual to make the setting for these parameters 12 1 P90x IPOS reference travel Reference travel is used to establish a machine zero to which all absolute positioning commands refer It is possible to select from various strategies referred to as reference travel strategies P903 Reference travel type page 124 These strategies define appro priate travel modes for example to search for a reference cam Using the reference point determined by reference travel the machine zero point can be changed using P900 Reference offset page 123 according to the following equation Machine zero reference position reference offset The speeds of the travel movements required on the basis of the reference travel type are set using P901 Reference speed 1 page 124 and P902 Reference speed 2 page 124 Display range Number of increments between leaving the reference cam and reaching the zero pulse of the encoder set in 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 EA Reference offset zero offset is used to determine the machine zero origin The follow i
400. se with the modulo function e Yes the Modulo Positioning application module with optional control via fieldbus or hardware terminal e Why is it recommended to set P960 to SHORT e 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 e Why does positioning not start once the target position has been sent e The drive must be started in the amp IPOS operating mode e A travel strategy must be selected via SHELL P960 e Before setting the H454 ModTagPos IPOSPUS variable the drive inverter must be in the status A Technology option e Can the target position be written cyclically e For targets in the range 0 to 359 999 or 0 increments 65535 increments Yes e If target positions 2 360 are written cyclically this causes Endless positioning e Can incremental positioning be performed if the modulo function is activated e Yes but to avoid unwanted Cross effects modulo positioning should be switched off in the SHELL parameter 960 e After the reference travel only the IPOSPI4S variable H455 MOD ACTPOS is set to 0 NOT the incremental actual position ACTPOS MOT in variable H511 e What causes the error IPOS ILOOP F10 s The interpreter of the IPOS program detects a command with invalid operands Manual IPOSpl
401. several drives for example gantries multiple column hoists Note For more project planning information in this case refer to the MOVIDIRVE Multi Motor Drives manual e Speed or position of a slave axis is derived from the position of a master axis electronic shaft electronic cam MOVIDRIVE offers preconfigured hardware and software functions for both applica tions that can be activated by the IPOSPUS user program These are described in the following sections 9 2 Speed synchronization via master slave function Via parameters P750 and P751 you can activate a simple speed synchronization for MOVIDRIVE and MOVITRAC B without an IPOS S program or a technology unit A typical application example is the synchronized operation of 2 conveyor belts For more information refer to the system manual 9 3 Synchronous operation with a DRS option card INFORMATION An IPosPlus program is not required to use the synchronous operation card DRS11 Manual IPOSplus The DRS11 synchronous operation card allows 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
402. sible to move the drive using a suitable setpoint and control signal source Furthermore you must ensure that the following installations are correct and used as specified e Installation of the DIP11A DIP11B e Cabling e Terminal assignment e Safety cut outs Refer to the MOVIDRIVE MDX 61B DIP11B DEH21B absolute encoder cards man ual There is no need to activate the factory settings If you call up a factory setting the MOVIDRIVE parameters will be reset to the default values This also affects the termi nal assignment which must be altered to the required settings if necessary INFORMATION MOVITOOLS MotionStudio guides you through the startup procedure for the abso lute encoder option Various dialog boxes prompt you to make the necessary entries and take the required actions Start MOVITOOLS MotionStudio and mark the unit e Open the context menu and select the command Startup DIP startup e Follow the instructions of the startup wizard Once startup with MOVITOOLS MotionStudio has been completed you only have to specify the Actual position source parameter After the DIP startup the motor encoder and the DIP encoder are referenced during the reference travel irrespective 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
403. sition LOW Create a SCOM receive object using the SCOM receive com mand IPOSP 4S manual with the target variable SetPosBus H499 Important Position resolution via PI data assignment is 4096 increments per revolution 12 bit The position resolution of 4096 increments per revolution 12 bit expanded to 16 bit is available on IPOSP 4S variable H508 The IPOSP 4S variable ActPos_Mot H511 has a position reso lution of 4096 increments per revolution 12 bit INFORMATION Note the following for the POSITION INTERPOLATION 16 BIT ramp type e IPOS variable H508 is also used when S14 is set to ON IPOS variable H508 only provides meaningful values when DIP switch S14 ON or P916 Ramp type Position interpolation 16 bit Manual IPOSplus 12 129 P9xx IPOS Parameters P91x IPOSplus parameters 12 12 2 6 P917 Ramp mode Setting range MODE 1 MODE 2 This parameter determines the use of P912 Positioning ramp 2 with ramp type set to LINEAR e P917 MODE 1 Deceleration for travel to target position spot braking takes place with P912 Positioning ramp 2 P911 positioning ramp 1 is used for all other positioning operations If position interpolation 12 bit or 16 bit is active it runs in mode 1 without dead time compensation e P917 MODE 2 Positioning ramp 2 is always used for deceleration if the travel speed is changed during travel P911 positioning
404. source to SBus or Fieldbus Set one process output data word to position HIGH and another one to position LOW e Position specification via SBus SCOM object Set P888 Synchronization time SBus to 1 10 ms Set P100 Setpoint source to BIPOL FIXED SETPT Do not seta process output data word to position HIGH or position LOW Create a SCOM receive object using the SCOM receive command IPOS 4S manual with the target variable SetpPosBus H499 POSITION INTERPOLATION 16 BIT The position specifications sent cyclically by the external controller are interpolated Position resolution 1 revolution corresponds to 65536 increments 16 bit e Position specification using process data Set P888 Synchronization time SBus to 5 ms or 10 ms Set P100 Setpoint source to SBus 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 IPOSP4S variable H508 provides the motor position extended to 16 bits The IPOSP S variable ActPos_Mot H511 has a position reso lution of 4096 increments per revolution 12 bit e Position specification via SBus SCOM object Set P888 Synchronization time SBus to 1 10 ms Get P100 Setpoint source to BIPOL FIXED SETPT Do not set a process output data word to position HIGH or po
405. ss 253 using the Movilink command The indices of the inputs are 88444ec for DIO P608 and 833546 for DI1 P600 Two write accesses are used to transfer the value 32 to the two indices The inputs are filtered according to the factory setting with 4 ms The terminal assign ment MQX ENCODER IN switches this filter for the proximity sensor evaluation off 1O x i 60 Bindreingange G 600 Bina reingang DIOL nox GEBER IN 601 Bin reingang D102 tpos zIncanc d 602 Binareingang DIO3 1Pos EINGANG 603 Binareingang DIO4 604 Binareingang DIOS 608 Binareingang DIOO nox GEBER IN D 480483467 99 Position Detection via Binary Inputs Position detection with MQx 7 5 3 Position detection with built in encoder The binary inputs counter inputs of the MQx have the following technical data Binary inputs Encoder signals 2 tracks Track A and track B Phase position 90 20 Mark space ratio 1 1 20 Max pulse frequency 4 kHz Connection of track A DIO Connection of track B DI1 For MQx SEW EURODRIVE recommends the EI76 built in encoder Proceed as follows to use a built in encoder 1 Connect the encoder to the digital inputs of the MQx module Use inputs DIO and DI1 2 Set the following parameters indexes e P608 binary input DIO3 to MQX ENCODER IN Index 8844 to 32 e P600 binary input DI11 to MQX ENCODER IN Index 8335 to 32 The position is de
406. t Reference movement must be activated using input DI16 Reference travel before you can move the drive to table positions You can use input DI17 Start positioning to en able interrupt the travel job with Controller 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 Manual IPOSplus Assembler Examples Table positioning sample program 24 4 2 Settings A 1 signal at output D015 Table position valid indicates that the selected table posi tion has been reached This output is reset once a new table position is selected By ad ditionally evaluating output DO16 IPOS in position it is also possible to detect when the selected table position is exited even when the controller is deactivated Controller inhibit 0 The drive is moved away from a hardware limit switch by entering a 1 signal at the RESET input D102 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 HOO H15 The variables are stored in the non volatile mem ory INFORMATION The user travel units numerator and denominator in the position window header are
407. t X1 Structure Command structure Mxxx Label optional Mxxx GETSYS X1 X2 x1 Hxxx Start of the variable structure containing the result after the command 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 ACT POSITION Actual position depending on the encoder selected in P941 H509 H510 or H511 SETP POSITION Setpoint position current setpoint selection of the profile generator whilst a travel command is being carried out identical to system variable H491 TARGET POSITION Target position identical to system variable H492 INPUTS Binary inputs H483 MOVIDRIVE A H520 MOVIDRIVE B of the basic unit and options identical to system variable H483 DEVICE STATUS Identical to status word 1 of the fieldbus unit profile fault code operating status OUTPUTS Binary outputs H482 MOVIDRIVE A H521 MOVIDRIVE B of the basic unit and the option IxT Unit utilization in 0 1 rated unit current ACT POSITION SETP POSITION TARGET POSITION Resolution depends on the encoder selected in P941 Motor encoder 4096 Inc revolution External encoder X14 E
408. t be possible to exchange more process data words All words as of the 4th word are assigned the designation IPOSP 4S P DATA or IPOSP 4s PO DATA Process data assigned these designations are not interpreted di rectly by the inverter However all process data can be accessed via the data structures of the GETSYS or SETSYS command Process data assignment with 3 words WS Process data DI x 870 Setpoint description PO1 cTRL WORD 1 D 871 Setpoint description POZ PosITION HI 872 Setpoint description PO3 PosrTION LO D 673 Actual value description PI1 status WORD D 674 Actual value description FIZ POSITION HI 675 Actual value description PI PosITIpN LO 876 PO data enable fon 677 DeviceNet PD configuration PARAM 3PD 477958795 Manual IPOSplus IPOSplus and Fieldbus Binary inputs and outputs 8 2 Binary inputs and outputs If neither a DIO nor DIP is inserted in MOVIDRIVE the bits in control word 2 status word 2 can be addressed in the IPOSP YS program as follows e Directly with the symbolic names DI10 DI17 or DO10 D017 e Read indirectly with GETSYS and written with SETSYS In this case they can be described as binary inputs and outputs simulated via virtual ter minals The meaning of the terminals can be set via parameters P610 P617 or P630 P637 8 2 1 Fieldbus interface DIO and DIP If a DIO or DIP is inserted in MOVIDRIVE the organization of the
409. t output DO02 if 1DO02State _BitSet StdOutpIPOS 2 else _BitClear StdOutpIPOS 2 249 18 250 Compiler Examples Querying an edge Negative edge query include lt const h gt include lt io h gt Variables for edge generation long 1D1I02FallingEdge 1DIO2LastState 1DO002State lInputLevel main while 1 Read DI02 lInputLevel InputLevel amp 0x00000004 Generate edge DI02 1DI02FallingEdge lInputLevel amp amp 1DIO2LastState 1DIO2LastState lInputLevel if 1DI02FallingEdge 1po002State 1D002State Set output DOO02 if 1DO02State _BitSet StdOutpIPOS 2 else _BitClear StdOutpIPOS 2 INFORMATION For When querying an edge make sure to always use an auxiliary variable 1 Input Level that stores the state of the input terminal instead of using the input terminal it self to create the edge Read DI02 lInputLevel InputLevel amp 0x00000004 Generate edge DI02 Edge change at DI02 1DI02FallingEdge lInputLevel amp amp DIO2LastState 1DIO2LastState lInputLevel If the input terminal was used instead of the IInputLevel auxiliary variable the edge at the input terminal could change at the point when the IPOSPlus program is between the two program lines required for edge creation This would mean that the edge change would not be detected at the input terminal Also note that the edge
410. t 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 apply see the table _GoRel GO MATT 3000 Moves to position 3000 Inc 17 3 11 _GoRel INFORMATION If the modulo function is used for positioning the commands GOA and GOR cannot be used The target position is written directly to H454 Syntax _GoRel type pos Description Relative positioning to a distance based on the current position The message IPOS in position is updated within a GOA or GOR command that is the message can be queried directly in the next program line Key points type Expression for the type of movement command type can adopt one of the follow Manual IPOSplus ing values GO_NOWAIT No wait resumes processing of the program in the next statement line immediately after sending the movement command recommendation GO_WAIT Waits in this statement line until travel is completed pos Contains the relative distance the following can stand for pos Constant expression for distance Name of a variable containing the distance Pointer to a variable containing the distance indirect addressing 219 17 220 Compiler Functions Standard functions 17 3 12 _InputCall Syntax Description Key
411. t supported if P702 Motor category is set to Linear e SPEED INTERPOLATION e POSITION INTERPOLATION 12 BIT e POSITION INTERPOLATION 16 BIT Ramp type Positioning characteristics LINEAR Time optimal but block shaped acceleration profile SQUARED Softer acceleration and higher torque demand than LINEAR SINE Very soft acceleration profile required torque higher than with SQUARED acceleration profile BUS RAMP Setting for operation of drive inverter with master controller This control ler generates a cyclical position setpoint that is written directly to the position controller The ramp generator is deactivated The position specifications sent cyclically by the external controller are interpolated linearly For configuration one process output data word must be set to position HIGH and another one to position LOW JERK LIMITED Jerk limitation is based on the principle of the linear ramp For jerk limita tion the 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 positioning time in comparison to the linear ramp is extended by the set jerk tim
412. t that in using the sample software they do so at their own risk SEW does not guarantee any specific performance include lt const h gt Default path c program files sew movitools projects include include lt io h gt Integrate names of system variables and constants Define variable ranges pragma var H128 H149 Default range for Compiler aux variables H400 H419 pragma globals H380 H449 Default range for global long variables H420 H449 pragma initials HO H127 Default range for initials HO H127 pragma list Assembler code with comments Constants define MY PD LENGTH 3 3 Fieldbus with process data define MY _FBUS TYPE G BT FBUS GetSys to Fieldbus during operation define MY _FBUS TYPE GS_BT_SO 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 amp 0x4 Ready from H473 define MY NO ERROR StatusWord amp 0x2 1 no fault 0 fault from H473 define MY IN POSITION StatusWord amp 0x80000 IPOS drive has reached target position define MY REFERENCED StatusWord amp 0x100000 Drive referenced define MY START _HOMING 1PA_ControlWordHigh amp 0x1 virt terminal DI10 start reference travel define MY START POSITIONING pn ControlWordHigh amp 0x1 virt terminal DI10 start positioning define MY JOG PLUS 1PA_Co
413. t1 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 _BitSet 476 1 _BitClear 476 1 Manual IPOSplus IPOSplus and Synchronized Motion Synchronous operation with a DRS option card 9 3 4 Switching between positioning and synchronous operation The Free running function makes it possible for the drives to run separately at a con trolled speed However when this function is activated the drive cannot move to a spec ified position using position control To perform this function the operating mode Positioning IPOSPIUS is required In the following sample program the system can switch between the operating modes Synchronous operation and Positioning via input terminal DI12 In this context note the following condition INFORMATION The system can only change from synchronous operation to positioning in the operating modes CFC or SERVO when the drive is in operation For the VFC operating modes MOVIDRIVE must be in the status Controller inhibit The following sample program looks at a switchover between the operating modes CFC amp IPOS and CFC amp SYNC with SETSYS The following settings apply terminal function via the IPOSPlus program determines the parameter settings for all used inputs at the IPOS input e DI10 0 no free running e DIM0 1 Free run
414. tent e TEE 48 5 7 Variable interrupts with Geen 49 5 7 1 Calling up the variable Imterunpt n 49 5 7 2 IPOS access to the internal interrupt Control 50 6 Position Detection and PoSitioning ccccesseereeseeseeeeeeneeneeeeeeeeseeeeeneeeseenenes 53 6 1 Encoder evaluation ccccccccccceceeeeeeeeeeeceeneaeceeeeeeeeeeeesedsessceneeaeeeeeeeees 53 6 2 Motor encoder X15 EE 54 6 3 Encoder Combinations c ccccccceceeeeeeeeececeneeceeeeeeeeeeeeeeesessensanieeeeeeeeees 54 6 4 External encoder 714 57 6 4 1 Positioning on external encoder X14 cceseeeeeeeesteeeeeeenees 57 6 4 2 Slip compensation with external encoder sssssssessrrerren nsen 57 6 5 SSI absolute encoder DI 60 6 5 1 el ien Sepia a eae ai eae h 60 6 5 2 1 Select encoder type POD 60 6 5 3 2 Set direction of rotation of the motor PD b 61 6 5 4 3 Set counting direction P951 for the SSI absolute encoder 61 6 5 5 4 Set encoder scaling Pop 61 6 5 6 5 Set position offset Pop 61 6 5 7 6 Set Zero offset PDOp4 cece eee ceeeeeeeeeeeeeceeeeeeeeeeeeeeeneeees 62 6 5 8 7 Set encoder factors P942 and P9430 cceceeetettteeeeeeee 62 6 5 9 8 Set P941 actual position source 62 6 6 Referencing eet Ae 63 6 6 1 Type 0 Reference travel to zero pulse 67 6 6 2 Type 1 CCW end of the reference Cam 67 6 6 3 Type 2 CW end of the reference Cam 68 6 6 4 Type 3 CW limit SWitCh oo eect tere entree N 69 6 6 5 Typ
415. ter that is sent for write services ReadPar H 1 Parameter that is sent for read services PO1 H 2 Process output data 1 PO2 H 3 Process output data 2 PO3 H 4 Process output data 3 PI1 H 5 Process input data 1 PI2 H 6 Process input data 2 PI3 H 7 Process input data 3 The following table shows the elements with unit specific characteristics Element MOVIDRIVE B Unit specific characteristics MOVITRAC B MQx BusType H 0 only ML_BT_S1 RS485 at X13 ML_BT_SBUS1 SBUS at X12 ML_BT_SBUS2 via DFC11B only ML_BT_S1 RS485 at FSC FIO11B ML_BT_SBUS1 SBUS at FSC FIO21B only ML_BT_S1 RS485 to MOVIMOT 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 the communication data If this data is contained in a structure with the name bus data declaration line ML DATA bus data the initialization line within the MOVLNK structure must read as fol lows for the DPointer element DPointer numof Bus data MOVLNK is a wait command The next command is only processed
416. teresis of the limit switch and the error 29 Limit switch reached could occur sporadically once the reference travel is complete A reference cam is not required Reference travel starts in a CCW direction P901 Reference speed 1 is used up to the falling edge of the CCW limit switch then P902 Reference speed 2 is used If reference travel is started via the positive edge at the REF TRAVEL START input P904 Reference travel to zero pulse should be set to YES Manual IPOSplus 69 Position Detection and Positioning Referencing If the reference travel is started via the IPOSP 4S command Goo you have to set the argument ZP A nRef1 i 8 2 1 nRef2 3 Kee RelZP MZP gt 476760203 6 6 6 Type 5 No reference travel The reference position is the current position The arguments in the IPOSP S com mand Go0 ZP or CAM and P904 have 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 A 3 nRef1 H 1 nRef2 7 Set vr X LHWLS RHWLS 476761739 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
417. terminal assignment moves as described for the affected system variables see below and the process data can only be accessed via GETSYS and SETSYS Unit Outputs Inputs MOVIDRIVE A H481 StdOutpIPOS H483 InpLevel H480 OptOutpIPOS H482 OutpLevel read only MOVIDRIVE B H481 StdOutpIPOS H520 InpLevel H480 OptOutpIPOS H521 OutpLevel read only 8 3 Cyclical process data Cyclical process data is read and written in a time slice of 5 ms 8 3 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 SQUARED or JERK LIMITED the setpoint can be further processed in the user program or copied directly to a target position H492 TargetPos or H454 ModTagPos using one of the following commands e TargetPos SetpPosBus Compiler e SET H492 H499 Assembler INFORMATION The double word with the actual position value that is sent from the drive to the PLC in the example is always the position from H509 H511 of the encoder selected in P941 Source actual position Manual IPOSplus 103 IPOSplus and Fieldbus Cyclical process
418. termined in the IPOS variable H511 ActPos_Mot and is always 0 when the line voltage is switched on A reference travel can only be performed by an IPOSPlus program 7 5 4 Encoder monitoring The two encoder cables are checked for wire breaks The cables are only monitored when MOVIMOT is enabled If a signal in at least 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 MOVILINK command contacts address 253 the actual position can be stored at any time in a variable in the range HO H127 in a non volatile memory We recom mend you save the position each time the drive moves to a new actual position This ensures that you do not have to perform reference travel when you restart the unit Referencing is however still required if the MQx voltage is disconnected during a posi tioning operation The module is designed to cope with 10 billion write cycles 100 Manual IPOSplus Position Detection via Binary Inputs Position detection with MQx 7 5 6 Counter The MQx modules have a counter that can be connected to either DIO or DI1 The pos itive edges are counted to
419. text menu and then selecting Insert In struction You can also call up the insert tool by pressing the E icon in the toolbar Inserting an instruction Insert Instruction x C Construction System Function System Function s Arguments _AxisStop pene Target variable _BitMoveNeg _BitSet Target bit In sl _Copy _FaultReaction e S GetSys ource variable _Go0 _Godbs Source bit In J _GoRel Jerta zi Pre defined Structures GetSys GSAINPUT Please push button below for pasting initializing sequence for each GetSysf GSCAM structure variable declared in user program Please note it s possible GetSys GSPODATA3 only after running compiler GetSys GSPODATAIO GetSys GSAOUTPUT GetSys GSACTSPEEDEXT SES MoviLink MOVLNK xl Initializing Sequence _BitMove 0 O E E PO E P 485614475 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 in the right hand side of the win dow Click the Add button to insert the selected function in the text where the cursor was positioned when you called the insert tool An initialization section is added to the defined structure variable if you click Initializing
420. the program header do not have to be defined in 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 effect The following applies a function should contain as few exit points as possible SampleFunction Leave function when H1 is 5 if H1 return H2 3 INFORMATION A user defined function cannot be called from several tasks 204 Manual IPOSplus Compiler Functions Overview of commands for standard functions 17 2 Overview of commands for standard functions A large part of the IPOSP 4S machine commands that are familiar from the IPOSPUS Assembler language are reproduced in the IPOSPlus Compiler s high level language in the form of certain syntactical constructions For example arithmetic commands ADD SUB etc are created by appropriate operators etc or set commands SET are replaced by the assignment operator However there are also commands with no equivalent in the programming language These commands GOA BSET etc are re produced using functions that form part of the Compiler and are therefo
421. the variable interrupt Variable VARINT element Description structure H 0 Control 0 All Varlnterrupt OFF Reset 1 Interrupt task 2 2 Interrupt task 3 H 1 IntNum 0 3 Defines a sequential number of the VarInterrupt An interrupt with the number x which has already been activated can be reactivated during the program run time with another data structure using the command call _SetVarInterrupt H1 function name when the same interrupt number is specified in the new data structure at the position H 1 This feature is not available for the task 1 interrupts H 2 SrcVar Number of the reference variable whose value is compared with the comparison value H 3 CompVar Comparison value or mask used to compare the value of the H 2 refer ence variable Manual IPOSplus Compiler Functions Standard functions 17 Example 17 3 26 _SystemCall Syntax Description Key points Manual IPOSplus Variable VARINT element Description structure H 4 Mode 0 No interrupt event This can be used to deactivate this one interrupt without deactivating them all 1 One of the bits of the reference variable masked out using the Com pVar mask has changed its status SrcVar t SrcVar t T amp CompVar 0 2 As long as the value of the reference variable is equal to the compar ison value SrcVar CompVar 3 As long as the value of the referenc
422. tifying 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 variables etc symbolically The Compiler only supports macros without parameters The syntax is define MacroIdentifier lt SymbolSequence gt Each occurrence of a Macroldentifier in the source text following this directive is re placed by SymbolSequence which may be empty The Macroldentifier is defined if the SymbolSequence is empty it does not have any other function The symbol se quence must not exceed 75 characters In this way a symbolic notation is assigned to the system variables in the header file Therefore for example variable H474 can be addressed using the symbolic name Scope474 or variable H484 using ControlWord once the const h header file has been incorporated 14 179 Compiler Programming 14 undef Equally the define directive can be used to assign symbolic names to constant val ues As a result the line define MAX_SPEED 1500 makes it possible for MAX_SPEED to be written in the source text rather than 1500 This makes it easier to read the source text The following example illustrates this point define setpoint H123 define maximum 2000 setpoint maximum in this line the macro def setpoint and maxi mum are re
423. tion by section movements and straight sec tions are available The calculation is complete after lt 200 ms H 0 SplineMode Value range 0 3 e 0 Interpolation not active or calculation is finished e 1 Start interpolation enter interpolated values from index 0 starting 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 Hr SplineModeControl Reserved H 2 SplineDest Value range 0 5 Number of the electronic cam in which the interpolated values are to be entered H 3 SplineNUser Value range 2 10 Number of curve points to be used for interpolation and the calculation process bit 7 0 spline O bit 7 1 spline 1 H 4 SplineXOUser Only a value gt 0 can be entered here X value of the first curve point H 5 SplineYOUser Value range long 231 0 231 1 Y value position value of the first curve point H 42 Splinex19User Only a value lt 512 can be entered here X value of the 20th curve point H 43 SplineY19User Value range long 231 0 231 1 Y value of the 20th curve point SS_MULTIAXIS Total drive calculation of a trajectory
424. tion in the IPOSP 4S program e Specify setpoint position with the H454 ModTagPos variable MOD TAGPOS k x 360 0 360 k x216 0 216 1 Read off the actual position in the H455 ModActPos variable MOD ACTPOS 0 360 0 we 2 1 The system software reads the target position specified in ModActPos and then sets the high word to 0 The actual position ModuloActPos always moves between 0 and 360 6 7 5 Project planning examples Chain conveyor 80 Step 1 Defining the output unit The positions for a chain conveyor are specified in output units A 360 rotation at the gear unit output corresponds to the modulo output unit of 360 Step 2 Determining the SHELL parameters Technical data Gear unit type KA47B Output speed rpm 19 Motor speed rpm 2000 Gear unit reduction ratio i 104 37 Motor type DY71S SEW employees can read off the number of teeth in the gear unit from the SEW Tech nical Manual DriveNet or from the electronic nameplate only for Hiperface Manual IPOSplus Position Detection and Positioning Modulo function Manual IPOSplus In this example the following numbers of teeth were ascertained Z1 17 Z2 74 Z3 8 24 33 Z5 16 Z6 93 477251979 The following calculations must be performed to determine the SHELL parameters modulo numerator modulo denominator and modulo encoder resolut
425. to declare a variable as the structure variable Declare structuretable postable Now the variable PosTable has been declared as a structure variable of the structure type table The next step is to access the elements The table must be initialized to do so Initiate postable posl1 100000 postable pos2 120000 postable pos3 50000 postable pos4 200000 postable pos5 10000 The following is a general description of the procedure for setting up a user structure typedef struct Type Identifierl Type Identifier2 Type IdentifierN Structure name StructureName VariableName VariableName Identifierl Il VariableName Identifier2 VariableName IdentifierN ll 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 structure 184 Manual IPOSplus Compiler Programming User defined structures Manual IPOSplus Once you have inserted the structure a declaration line is added to the Editor window that declares the structure variables of this structure 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
426. 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 1 until the first positive edge of the reference cam is reached Then P902 reference speed 2 is used As opposed to type 1 the drive starts in CW direction and reverses at the reference cam Manual IPOSplus Position Detection and Positioning Referencing 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 Refe rencing to zero pulse If reference travel is started with the IPOSP S command Goo the drive is referenced to the falling edge of the reference cam or to the zero pulse after the falling edge of the reference cam depending on whether the argument ZP or CAM is set The reference cam must start just before or in line with the CW hardware limit switch and must project into the limit switch This ensures that no contact is made with the hardware limit switch during reference travel A nRef1 j gt nRef2 ll RefOfiCAM _ RefOfzP MZP RefZP RefCAM us d gt 476763275 6 6 8 Type 7 Reference cam flush with CCW limit switch The reference position is the right end of the reference cam or the
427. to the source text file Header files are usually used to define constants or macros that are used several times so they are available in different projects The syntax is include lt FileName gt 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 file CONST H_ is a header file define MAXIMUM SPEED 3000 The file BEISPIEL IPC contains the main program include lt CONST H gt H10 MAXIMUM SPEED The preprocessor replaces the include directive with the content of the CONST H file define MAXIMUM SPEED 3000 H10 MAXIMUM SPEED The result after macro expansion is as follows H10 3000 The include directives can also be used in nested structures i e an included file can itself contain an include directive to include another file Ensure that files do not set up an include loop they include themselves This leads to a preprocessor error We rec ommend avoiding nesting include directives to keep the structure clearer Manual IPOSplus Compiler Programming Include folders 14 4 Include folders There are various procedures depending on the folder in which the file to be included is located 1 If the path of the file to be included is set in the Folders tab in the Compiler settings then the statement is i
428. tor e Denominator e 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 Manual IPOSplus Assembler Editor Example 21 21 1 Example The encoder of a motor supplies 4096 increments per revolution There is a spindle on the motor with a slope of 10 mm revolution that moves a trolley horizontally The user wants to specify the positions to which the drive is to move in mm In this case set the numerator and denominator as follows e Numerator 4096 e Denominator 10 e Unit mm When you insert a positioning 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 e START program is running e PSTOP Program stopped e BREAK program is only processed up to the marked line e STEP program is processed line by line by pressing the F7 key 21 2 Creating programs 21 2 1 Inserting command lines Manual IPOSplus Open the insert tool by clicking the Si con by pressing the lt Ins gt key or by choosing Edit Insert command from the menu bar Edit IPOS Instruction d 2lsl Main Menu Fast Search Sub Menu Communication commands SE eebe Positioning commands AND KEE Program commands AND H HEK Set commands ASHR H
429. tories tab page are not relevant Settings of the task interpreter steps Ti 2x Editor Compiler Folders Print Execution 938 IPOS execution speed task lt 939 IPOS execution speed task2 bd Abbrechen 483839499 Manual IPOSplus Compiler Editor Search function 13 On the Run tab you can set the speed parameters for task 1 and task 2 These settings are described in detail in section Task Management and Interrupts Tasks for MOVIDRIVE B 13 4 Search function Choose Search Search for from the menu bar If you have marked a section of text this text will be used as the search string in the following screen this is H10 The fol lowing window appears Search window Suchen nach ES T Nur ganzes Wort suchen Abbrechen I Gro Kleinschreibung 484333835 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 Ersetzen I 2 x Suchen nach H10 Ersetzen durch Position Ersetzen All t 7 Nur ganzes Wort _Ales ersetzen I Grob Kleinschreibung Abbrechen 484363787 The Find Next button can be used to search for the corresponding word which can then be replaced with another word using the Replace function Click the Replace All button to repla
430. tpoint actual_value During compilation the symbolic variables setpoint and actual value are assigned an IPOSPUs 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 ong declares a variable that is then stored in the variable range from HO 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 initial long start position end position INFORMATION The legibility of the program text is significantly enhanced if all constants are written in capitals e g SECOND MAXIMUM etc and variables are written in upper lower case e g SpeedSetpoint PositionCW etc 186 Manual IPOSplus Compiler Programming pragma 14 12 pragma The pragma directive can be used to influence the variable range occupied by the key words long and initial long Syntax pragma Directive Parameterl Parameter2 The Compiler supports the following pragma directives pragma list Causes the source text lines to be included in the resulting IPOSP US program as comments pragma var Hmin Hmax Instructs the Compiler to use IPOSPS variables Hmin through Hmax as auxiliary variables for calculating expressions Hmax must be greater than Hmin An error message is output if the programmer uses the
431. travel possible e No reference travel required e Compliance with travel range limits software limit switches e Automatic movement away from hardware limit switches Endless movement is possible in two directions using two binary inputs Jog D114 and Jog DI15 No reference travel required If the drive has been referenced and the soft ware limit switches set travel only takes place within these limits Movement only takes place when there is a 1 signal at one of the jog terminals The drive is moved away from a hardware limit switch by entering a 1 signal at the RESET input D102 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 368 Manual IPOSplus Assembler Examples Jog mode sample program 24 3 3 Input terminals Level Terminal terminal function Meaning 0 DIOO Controller inhibit Switch power section on off 0 DI01 Enable Controlled standstill 0 DI02 Reset Reset after fault moving clear of limit switches 0 DIO3 Reference cam Switch for zero or offset value 0 DI04 Limit switch right Limit switch for stopping 0 DIO5 Limit switch left Limit switch for stopping 0 DI10 IPOS input 0 DI11 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 St
432. ts in the IPOSP S com mand Go0 ZP or CAM and P904 have 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 A 3 nRef1 l H 1 nRef2 i RefOfZP MZP X LHWLS RHWLS 476761739 In contrast to type 5 type 8 reference travel can also be performed when the system status is not set to A 72 Manual IPOSplus Position Detection and Positioning Modulo function 6 7 Modulo function 6 7 1 Introduction The modulo function can be activated for endless unidirectional rotary applications such as for example rotary tables or transport chains This ensures that all position data in the range 0 to modulo value 1 incr is displayed When the modulo value defined by the user for example 100 mm or 360 is exceeded the modulo position value is reset to zero It is also possible to use the incremental value of the encoder selected in P941 for posi tioning and only to activate the modulo function in the background for example for counting the revolutions of the output The modulo function has the following features Position specification in output units This can be used to specify a 360 turntable rotation directly
433. ts keep their values in between the GETSYS commands and are only deleted after a reset If the cam function is activated n times per 1 ms n cam outputs can be generated e g in a quick task such as task 3 in MOVIDRIVE B which can process several IPOSP 4S commands per 1 ms Since MOVIDRIVE generates a new position value every 1 ms all of the commands processed during the 1 ms period operate with the same position value 85 86 Position Detection and Positioning Cam controllers Startup of the cam controller Data structure of the standard cam controller Compiler _GetSys Cam1 GS_CAM initializes the cam controller and generates the status of an output with the data structure as of the variable cam Assembler GETSYS Hxx CAM initializes the cam controller and generates the status of an output with the data structure as of the variable Hxx Variable Symbolic name of the Brief description element in the SEW standard structure H 0 GSCAM SourceVar Number of the reference variable for the cam calculation typical reference variables are e H511 Actual position motor encoder e H510 Actual position SSI encoder e H509 Actual position external encoder e H455 Actual position motor encoder in modulo format e g H 0 511 for reference size H511 bit 31 of the variable must be 0 H 1 GSCAM DbPreCtrl Delay time compensation in 0 1 ms to com
434. turn RET TASK TASK2 wait WAIT NOP NO OPERA TION Structure REM REMARK Structure RET RETURN Manual IPOSplus No operation is performed This command can be used for example to achieve wait times on the basis of the command cycle time In MOVIDRIVE A for example this is 1 command ms in task 1 Command structure Mxxx Label optional Mxxx NOP 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 Command structure X1 Any string REM X1 The RET command terminates a subroutine see the CALL command and jumps back to the program from which the subroutine was called In a main program the RET com mand causes a jump back to the beginning of the main program 23 333 23 Structure TASK Structure Example TASK2 Structure Example 334 Assembler Commands Program commands Command structure Mxxx Label optional Mxxx RET This command is used to define the start address of task 2 and task 3 and to start or stop these with the argument X1 START STOP that is the control word of the task is written The control word and start address are both set to 0 when the power is switched on i e Task2 is deactivated This command is only available as of MOVIDRIVE
435. uces the amount of code and thus also has a positive effect on the program run time The following example uses the AND operation to clear DO01 and DOO2 at the same time Using the AND operation include lt const h gt include lt io h gt MOVIDRIVE A include lt iob h gt MOVIDRIVE B main StdOutpIPOS amp DO01 amp DO02 18 247 18 248 Compiler Examples Querying bits and input terminals 18 3 Querying bits and input terminals To query what level a certain input terminal has a bit must be tested with a variable The variable is either H483 InputLevel which contains the levels of the binary inputs or a variable h of your choice which contains the levels after the _GetSys function has been performed 18 3 1 Testing single bits To test a bit in a variable perform an AND operation using a constant in which the bit to be tested is set to one If the result is zero then the bit to be tested is also zero and thus the input terminal level is low If the result is not zero then the bit is one The following example sets H10 to 1 if binary input DIO3 is set to one Testing individual bit using H483 Testing individual bit using _GetSys include lt const h gt include lt io h gt MOVIDRIVE A include lt iob h gt MOVIDRIVE B main include lt const h gt define INPUTS H1 include lt io h gt MOVIDRIVE A include lt iob h gt M
436. umber 11 via DIO11 11 requires 3 outputs that is outputs DO10 DO11 und D013 SET H480 11 All binary outputs are reset by 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 295 Assembler Programming Analog inputs outputs 22 22 3 Analog inputs outputs Table 6 Overview of the analog inputs outputs Analog inputs outputs Inputs Outputs Basic unit Option DIO11 option Input output Alt Al2 AO1 AO2 Terminal designation Al11 Al12 AGND Al21 Al22 AGND AOV1 AOC1 AGND AOV2 AOC2 AGND The analog inputs are differential inputs The inputs outputs can be used optionally as either voltage or current inputs outputs Table 7 Assigning value ranges to variable values input output Value range Variable value Output 10 0 10V 10 000 0 10 000 0 10V 0 10 000 0 20mA 0 10 000 4 20mA 0 10 000 Input 10 0 10V 10000 0 10 000 0 10V 0 10 000 0 20mA 0 5000 4 20mA 1000 5 000 Assignment of value range variable value for analog outputs is only valid if the scaling factor of the paramet
437. urce set for the actual position INFORMATION If you change P350 P351 reverse direction of rotation you have to change these pa rameters prior to the reference offset or perform the reference offset again after changing the parameters because this change affects the actual position of the axis Manual IPOSplus 65 66 Position Detection and Positioning Referencing The following explains the different types of reference travel with different starting points in the drive using travel diagrams Explanation of the reference travel type diagrams e nRef1 Reference speed 1 nRef2 Reference speed 2 Starting point of the drive 1 Between the reference cam and the right hardware limit switch 2 On the reference cam 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 GOO reference travel command contains CAM RefZP Reference position zero pulse Movement to this position takes place when the argument of the GOO reference travel command contains ZP RefOffCAM Reference offset for reference travel with reference position cam CAM RefOffZP Reference Offset for reference travel with zero pulse ZP MZP Machine zero Manual IPOSplus Position Detection and Positioning Ref
438. ures particularly when a fixed sequence of variables has to be pro vided e g SETSYS GETSYS MOVLNK and so on All other variables should be declared with the keywords long or initial long as described below since this leaves the task of assigning variable numbers up to the Compiler Manual IPOSplus 181 Compiler Programming SEW standard structures 14 14 8 SEW standard structures SEW standard structures provide ready made structures for commands that are depen dent on structures The following table shows a list of the standard structures available for each specific statement For the corresponding elements refer to the description of the respective command see section Standard functions page 208 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 SSPOSRAMP SSPOSSPEED SSPIDATA3 SSPIDATA10 These standard structures are used as follows First a variable is declared as the struc ture variable in the declaration part Then the elements of the structure are addressed as explained in the following example The structure is addressed within the command by using the name of the structure variable without additions
439. us The _MovCommOn command can only be used with MQx modules _MovCommOn The command starts cyclical communication communication links set up using Mov CommDef are activated As of this point no MovCommDef command is permitted Equally no MOVILINK command to address 253 internal can be used None include lt const h gt include lt io h gt pragma initials 0 127 pragma globals 128 300 pragma var 301 400 MOVCOM mc1 control values for communication link to MOVIMOT MCPDATA mcpd1 process data exchange with MOVIMOT MCPARADATA mcpara parameter data exchange with MOVIMOT not used Main Function IPOS Entry Function Initialization 111 control structure for communication link to MOVIMOT mc1 BusType ML BT S1 communication via RS 485 to MOVIMOT mcl1 Address i ids MOVIMOT address 1 mcl1 Format ML FT 3 PDU type 3 process data words cyclic mc1 PdPointer numof mcpd1 pointer to process data block mcl ParaPointer numof mcparal pointer to parameter data block _MovCommDef mc1 _MovCommOn while _Nop No operation is performed This command can be used for example to achieve wait times on the basis of the command cycle time The command does not have an argument 229 17 Example Compiler Functions Standard functions main _Nop 17 3 18 SBusCommDef Syntax Description Key points SC
440. us 83 Position Detection and Positioning Cam controllers e How can positioning be continued once the enable has been revoked e Set the bits H453 0 ModuloCtrl variable and TargetReset_Off bit e How does the axis act when the _AxisStop AS_PSTOP command is activated during positioning s The drive waits at the positioning ramp the actual position is displayed when the axis stops To continue positioning the target position must be given a new value for example change the increment value by 1 bit Instead of using the _AxisStop AS_PSTOP command use _AxisStop AS_RSTOP In this case the target position would be stored when the H453 0 bits ModuloCtrl variable and TargetReset_Off bit were activated 6 8 Cam controllers You can use cam controllers to set or reset outputs depending on the position of a drive This function lets you control additional actuators such as pneumatic cylinders start a second axis e g for rounding the path contour in a xy portal or monitor two axes in the same operating range for collision Each MOVIDRIVE comes equipped with a standard cam controller with one output A new output is formed every time the command is processed in the IPOSPlus program 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
441. ustrates the IPOSPUS Compiler user interface provides information on how to create a new IPOSP4S project Step 3 The first IPOSP 4S program This section is to assist you in creating your first IPOSPlus program Step 4 Compiling and starting the IPOSP S 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 IPOSP 4S Compiler with MOVITOOLS MotionStudio Requirements The IPOSPUS Compiler is integrated in the MOVITOOLS MotionStudio software pack age The following conditions have to be fulfilled before you can start the IPOSPlus Compiler via MOVITOOLS MotionStudio MOVITOOLS MotionStudio 5 40 or later is installed on your PC e The device you want to create an IPOSPlus program for is connected to your PC Use a suitable interface adapter MOVITOOLS Proceed as follows to start MOVITOOLS MotionStudio and create a project Motion Studio and 1 Start the MOVITOOLS MotionStudio from the Windows start menu via creating a project Start Programs SEW MOVITOOLS MotionStudio MOVITOOLS MotionStudio 2 Create a project with a name and directory Manual IPOSplus 143 13 Compiler Editor First steps Establishing com munication and scanning the net work Startin IPOSPUS Compiler 144 Proceed as follows to establish a communication with MOVITOOLS MotionStudio and scan your n
442. valuated correctly at nominal e Select an encoder with a resolution that suits the pulse frequency of the inverter e Observe the technical data of the built in encoders in Drive Engineering Practical Implementation Encoder systems and the technical data of the binary inputs 7 2 Principle of the position detection The track signals are transmitted to 2 binary inputs of your inverter and evaluated with out encoder option Index 8845 was implemented in order to activate the Position de tection Index 8845 has the following assignment e Position detection deactivated 8845 0 e Position detection activated 8845 1 You can set index 8845 in an IPOSPIUs program with the MOVILINK command The following table illustrates the processing of the actual position in the IPOSPIUS pro gram Processing of the actual position in the IPOSP 4S program D 2211727115 The actual position of the built in encoder is mapped automatically in the IPOSP 4S variable H511 and can be processed using program control The built in encoder can be used in particular for applications in which positioning usually takes place using rapid speed creep speed by means of several proximity switches The encoder cannot be used for motor control operating mode amp n control The encoder cannot be used for direct position control operating mode amp IPOS The Simple Positioning application module in
443. value can be queried with GETSYS In this way return travel can be made at rapid speed and when under load the speed can be reduced automatically by the inverter 338 Manual IPOSplus Assembler Commands Set commands 23 8 3 Set commands variable SET fault response GEIER Indirect addressing SETI Interrupt SETINT system values SETSYS SET The SET command loads argument X1 with the content of argument X2 variable H or constant K The result is written to argument X1 argument X2 remains unchanged Structure Command structure Mxxx Label optional Mxxx SET X1 X2 X1 Hxxx Result of the statement X2 Hyyy Source SETFR SET The SETFR command defines the response to a unit fault The fault code is entered in FAULT REACTION argument X1 of the command The reaction 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 system manual Example e Fault 27 Limit switches missing no point in column P Cannot be programmed e Fault 28 Fieldbus timeout point in column P programmable SETFR 1 NO RESPONSE
444. value with the value of an IPOSPIUS variable H Name of source variable sys Constant expression that designates the system value sys can adopt one of the following values SS_N11 Internal fixed setpoint n11 SS_N12 Internal fixed setpoint n12 SS_N13 Internal fixed setpoint n13 SS_N21 Internal fixed setpoint n21 SS_N22 Internal fixed setpoint n22 SS_N23 Internal fixed setpoint n23 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 data H Number of PI data items H 1 Pldata1 H 2 Pldata2 H 3 Pldata3 SS_OPMODE Sets the operating mode H 11 CFC speed control 12 CFC amp torque control 13 CFC amp IPOS positioning 14 CFC amp synchronous operation DRS11 16 SERVO speed control 17 18 9 SERVO amp torque control SERVO amp IPOS positioning SERVO amp synchronous operation DRS11 SS_IMAX Setting the torque limit by setting parameter P304 torque limit only CFC or SERVO Scale unit 0 1 SS_POSRAMP Positioning ramps unit 1 ms H Positioning ramp 1 H 1 Positioning ramp 2 SS_POSSPEED Positioning speed unit 0 1 rpm H Speed CW H 1 Speed CCW SS_OVERRIDE Switch override on off H 0 gt off H 1 gt 0n l a
445. variable indirect GOR Relative positioning variable GOR GO RELATIVE Relative positioning constant page 325 Relative positioning variable indirect 23 2 5 Program commands Commands for program control These are e Loop commands e Subroutine calls e Task 2 control e Program branching commands e Wait commands Command Description See CALL Calls a subroutine CALL page 329 END Textual end END page 329 JMP Jump input terminal JMP JUMP Jump H lt gt 0 page 330 Jump H lt gt H Jump H lt gt K System conditioned jump LOOPB Program loop begin LOOPB LOOP BEGIN page 332 LOOPE Program loop end LOOPE LOOP END page 332 NOP No operation NOP NO OPERATION page 333 REM Comments REM REMARK page 333 RET End of a subroutine RET RETURN page 333 TASK2 Sets the start address of task 2 TASK2 page 334 WAIT Waits for a specified period WAIT page 335 23 299 23 Assembler Commands Overview of commands 23 2 6 Set commands Commands for e Setting variables e Error responses e Loading system values to variables e Writing system values to system variables e Initializing interrupt routines Command Description arguments See COPY Block by block copying of variables COPY page 336 GETSYS H System value GETSYS GET SYSTEM page 336 VALUE SET H H SET H K page 339 SETFR Set fault response SETFR SET FAULT page 339 REACTION SETI
446. vent occurs X X page 244 Manual IPOSplus Compiler Functions Overview of commands for standard functions 17 2 5 Standard setting functions Command Function Availability Reference MOVIDRIVE B MOVITRAC B_ MQx _Copy Block by block consistent copying x x X page 210 of variables _GetSys Reads an internal system value observe the unit specific command structure page 211 _SetInterrupt Defines a function as interrupt rou X x X page 235 tine and activates or deactivates it _SetVarlnterrupt Defines a function as variable rou x page 240 tine and activates or deactivates it only MOVIDRIVE B _SetSys Sets an internal system value observe the unit specific command structure page 236 17 2 6 Special standard unit functions 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 X X page 210 fault _Memorize Saves or loads variables or X X X page 221 IPOSPIUS program _TouchProbe Enables or locks a touch probe X x page 242 input _WdOn Sets the Watchdog timer to a spe x X x page 245 cific value _WdOff Turns the Watchdog off X X x page 244 Manual IPOSplus 17 207 17 208 Compiler Functions Standard functions 17 3 Sta
447. version 2 01 Definition of bitmasks for digital in and outputs Please do not modify this file C 1999 SEW EURODRIVE 52 ees d ifndef IO H define IO H define DIOO H483 amp 0b1 define Dol H483 amp 0b10 define DI02 H483 amp 0b100 define DI03 H483 amp 0b1000 define DI04 H483 amp 0b10000 define DIO5 H483 amp 0b100000 define DI10 H483 amp 0b1000000 define DI11 H483 amp 0b10000000 define DI12 H483 amp 0b100000000 define DI13 H483 amp 0b1000000000 define DI14 H483 amp 0b10000000000 define DI15 H483 amp 0b100000000000 define DI16 H483 amp 0b1000000000000 define DI17 H483 amp 0b10000000000000 define DBOO H482 amp 0b1 define DOO1 H482 amp 0b10 define DOO2 H482 amp 0b100 define DO10 H482 amp 0b1000 define DO11 H482 amp 0b10000 define DO12 H482 amp 0b100000 define DO13 H482 amp 0b1000000 define DO14 H482 amp 0b10000000 define DO15 H482 amp 0b100000000 define DO16 H482 amp 0b1000000000 define DO17 H482 amp 0b10000000000 endif Manual IPOSplus Compiler Programming Explanation of const h and io h constb h and iob h 14 The io h header file defines macros that make it easier to query terminal levels The fol lowing example illustrates this point if DIOO H1 1 execute command block if terminal DIOO has NOT level 0 else H1 0 e
448. which the error was detected e Line Program lines in which the error was detected e Class Error class of the error e 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 en tered as the number of the code words used in the Assembler code This value is used to calculate and display the memory utilization in percent Press the OK button to leave the status window In case of an error a red bar highlights those lines in which the error occurs If several errors occur in one program only the first error is displayed in the status win dow Once this error has been rectified compile the project again and the next error will be displayed in the status window 166 Manual IPOSplus Compiler Editor Compiling and downloading 13 11 Compiling and downloading Two basic steps are required to transfer the program to the inverter First the source text must be compiled Second the program must be transferred to the inverter Trigger these two steps by choosing Project Compile download The basic conditions for compiling are the same in principle as those described in the previous section However an explicit message only appears if an error occurs You can tell when the Compile Download function has been successful because the first program line of the MAIN func tion is
449. without having to convert it into IPOSP 4S encoder increments as in the past For example Turntable rotation 360 modulo value 2 increments Distance to be covered in one machine cycle modulo value 216 increments rotary table with 4 stations 1 cycle 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 IPOSP US Absolute position specification over several revolutions Specification of a travel strategy The position setpoint can be reached either via the shortest route or from CW or CCW Endless positioning in combination with absolute encoder evaluation via DIP11 is available as of firmware version 14 822 890 6 14 fault F92 DIP work area no longer occurs when the modulo function is activated INFORMATION Depending on the system the gear unit and if necessary any additional gears must be simulated via the number of teeth Ask the manufacturer of your gear unit for the exact number of teeth Do not accept the ratio from the nameplate Furthermore the maximum target position that can be represented is determined when the gear unit is selected This value must not be exceeded
450. xecute command block if terminal DIOO has level 0 The if statement queries terminal DIOO the CONTROLLER INHIBIT terminal If the ar gument of the if statement is zero then the statements in the else part are processed assuming there is an else part In this case IPOSPUS variable H1 is set to zero or one depending on the input level of terminal DIOU Note that it is impossible to query when the terminal is set to 1 DIOO0 1 because the macro supplies a binary evaluation In practical terms it is possible to query for zero DIOO 0 or not equal to zero DIO0 0 This program extract can be made clearer using the commands which have already been explained This is done by introducing additional symbolic identifiers define controller inhibit H1 define HI 1 define LO 0 if DIOO controller inhibit 1 execute command block if terminal DI00 has NOT level 0 else controller inhibit 0 execute command block if terminal DI00 has level 0 The following appears in the variable window controller inhibit 499400587 INFORMATION Note that the io h header file must be linked using the include io h command line be fore it can be used Manual IPOSplus 189 14 190 Compiler Programming Identifiers 14 14 Identifiers Although we have already used identifiers several times this section provides additional in
451. y other encoder resolutions are not permitted or resolver Maximum program length program memory 16 kByte corresponds to ca 200 250 Assembler commands Command processing time the total in Task 1 und Task 2 lt 12 Assembler commands ms Task 1 1 10 Assembler commands ms Task 2 2 11 Assembler commands ms Task 3 free computing time Interrupts 1 interrupt triggered by timer error or touch probe interrupts task 1 4 variable interrupts that interrupt task 2 and 3 Variables 1024 of which 128 0 127 can be stored in non volatile memory Value range 231 231 1 System variable area IPOS variables H453 to H560 Touch probe inputs 2 inputs processing time 200 us Sampling interval of analog inputs ims Sampling interval of binary inputs ims Binary inputs outputs MOVIDRIVE B 8 inputs 6 outputs DIO option 8 inputs 8 outputs DIP option 8 inputs 8 outputs Analog inputs outputs MOVIDRIVE B 1 input 0 10 V 10 V 0 20 mA 4 20 mA DIO option 1 input 0 10 V 10 V 0 20 mA 2 outputs 10 V 0 20 mA 4 20 mA 3 5 2 MOVITRAC B Encoder resolution MOVITRAC B has no encoder inputs but supports the position detection via binary inputs counter input For the technical data of the binary inputs refer to section Position detection via binary inputs page 96 Maximum program length program memory 8
452. you can exclude this program section using an endless loop main Program code only initialization while 1 cyclical program code 41 Task Management and Interrupts Task management for MOVIDRIVE A and B The following table gives an overview of the functions and properties of the tasks and 42 interrupts Task 1 Task 2 Task 3 only Task1 inter Variable MOVIDRIVE B rupt interrupt only MOVIDRIVE B _SetTask2 ST Start 2_START e Task2Name Not available Not available MOVIDRIVE A or TASK2 Lightning icon START Mxx With the or P931 in SetTask ST2 defined inter keypad START _SetTask ST3_S rupt event a TART With the Start Task2Name Task3Name or defined inter MOVIDRIVE B or TASK TASK TASK3 rupt event TASK START Mxx START Mxx STOP icon or _SetTask2 ST Stop 2_STOP MOVIDRIVE A Task2Name Not available Not available or TASK2 STOP icon or STOP Mxx P931 in key STOP icon or As task 1 pad SetTask ST2 STOP icon or T _SetTask ST3_S _STOP As task 1 or as Stop F TOP MOVIDRIVE B ask2Name Task3Name or assigned task or TASK TASK TASK3 2or3 TASK2 STOP R 7 STOP Mxx Mxx With other Interrupt Via Task1 Cannot be Not available task 1 interrupt Not available MOVIDRIVE A interrupt interrupted with higher pri ority With other With variable Interrupt Via Task1 With variable With variable tas
453. 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 using The encoder systems sup ported are listed in the description of P950 The connected type can be selected from the list of possible encoders You must check whether other encoders are suitable and released for use by SEW EURODRIVE Manual IPOSplus Position Detection and Positioning SSI absolute encoder DIP 6 5 3 2 Set direction of rotation of the motor P35_ Move the drive in the positive direction defined according to application at low speed If the actual position P003 or H511 counts upwards you do not have to change para meter P350 Change direction of rotation use MOVITOOLS MotionStudio or DBG11B to display the actual position Change P350 if the actual position counts downwards This adapts the counting direction of the motor encoder to suit the application 6 5 4 3 Set counting direction P951 for the SSI absolute encoder Move the drive in the positive direction defined according to application at low speed If the absolute encoder position H509 ACTPOS ABS counts upwards you do not have to change parameter P951 Counting direction If the absolute encoder position counts downwards P951 must be inverted 6 5 5 4 Set encoder scaling P955 This parameter is irrelevant unless there is a motor encoder speed

Download Pdf Manuals

image

Related Search

Related Contents

census  安全データシート  curacret transparente  ICF-T30 TV (1-3ch)•FM/AM Radio 主な特長 使用  S/M - Daewoo Electronics Service Information System  FUJINON CCTV LENS  Notice d`utilisa tion  Space Beam Set LED  Keynote `09 Manual do Usuário  Délibération 20080315  

Copyright © All rights reserved.
Failed to retrieve file