Home
Luis Miranda AN-SERV-010 - AutomationDirect Technical Support
Contents
1. DE DI oE aalala dala 8 5 a SISI al 8 8 as gt BONA Home sensor Black NPN I e Blue YP ZIPLink Kit Terminals z AM1 AN 1A e PJ PULSE ve ECE co HE EC OO Es H H DI8 DI6 COM Home sensor FAULT STOP FORWARD LIMIT REVERSE LIMIT COM 1st Ed 07 10 Luis Miranda AN SERV 010 Ep Select and set the communication parameters for servo The servo drive the slave in the network has registers or internal memory locations with parameters whose content causes the servo work the way that the designer of the control system wants it to work These registers have addresses you specify shown in chapter 6 of the user manual of the servo drive For example if you want to read if the servo is with or without fault or read the type of fault in case there is an alarm you can read the the register 40002 that corresponds to the PO 02 parameter You can easily create a control system with a servo using a serial MODBUS network The servo communication configuration is done with the keypad of the servo driv
2. Give a project name for example Sierra project then Bi C more micro Ver2 0 0 0 Sierra project mgp 1 Screen 1 22 File Edit View Tool Object Screen Database Setup Panel Window Help DE Ga 3424 a jajaja Start a Project Simulate Project Send Project to panel a Navigation x L Screen Function lt gt OX Beg El og Object List Object Library Shape N Line O Rectangle Circle El Frame Button Pushbutton Switch a Indicator Button 1 Screen 1 Indicator O Indicator Light Graphic Indicat Numeric Disple Entry E Numeric Entry IncrementDect Meter Graph faa Real Time Gray B Parts List rm rn select the HMI the HMI type will be the one you are using The PLC protocol will be Automation Direct K M sequence and click OK The NumericDisplay1 S Ld l OI Font amp Color Display Format next screen will show up Text Size EM w Data Type Unsigned Decimal Sane TE pas Color Number of Digits The position is portrait in this eae oa gaa example a a Prefix Suffix Next we will create a im mo i x Frame Style V Line numeric display object to n LI C Comma Separator i L eme K ta Display Tag ing Spaces EH show the current position SL DET Click on the menu Object C Use tag for Decimal Point Tag and then select Indicator and nescion then Numeric display and click on it The cursor will
3. In RAM memory this is not possible and the data only stay stored if the servo drive is powered If we want to write continuously to the drive RAM memory we should set the value of P2 30 parameter as 5 but this value is not retained in memory EEPROM IstEd 07 10 Luis Miranda 1 1 AN SERV 010 12 Clearly it is not possible that the setting of this value be done by the machine operator when the servo powers on Therefore it is necessary to write a value of 5 to this memory when the drive powers ON or otherwise the servo will reach the limit of writings and the device will not be functional anymore One of several ways is to use a comparison function reading the content of P2 30 parameter and on the basis of that value it is executed a writing on that parameter That is if the reading on that parameter shows that the value is not 5 we will set a bit or flag to force a 5 into the same memory It can be created an interlock such that it is not executed this function anymore when P2 30 MODBUS address 40543 or 21E in hexadecimal format or V1036 in octall has a 5 in its content Here it is advisable the use of the bloch transfer parameters PO 09 up to P0 16 that are configurable parameters allovving to read or vvrite data in consecutive servo addresses which is better than to read data in random addresses Not consecutive For that we will configure PO 9 Modbus address 40010 with the keyboard By default with v
4. O O AN SERV 010 FF03 Luis Miranda 49 AN SERV 010 IE This document shows the concept of operation We clearly state that this is not necessarily the best programming or that the program is perfect Other actions necessary are the tuning of the system and possibly to study and fix the reset condition in case there is a power failure during the operation These actions are left for the control designer 50 Luis Miranda
5. BCD V3760 In order to do some logic we divide the value by 10 and put the result into V3700 Depending on the value of the current value we have to change the algorithm and for that purpose we use subroutines Luis Miranda eee Revoluc BCD Pulses BCD Revoluc BCD V3761 K63 V3760 K6530 V3761 K127 15 lt Revoluc BCD Revoluc BCD Pulses BCD V3761 K64 V3761 K127 V3760 K3062 gt lt Revoluc BCD V3761 K127 lt Revoluc BCD Pulses BCD Revoluc BCD V3761 K127 V3760 K3062 V3761 K190 16 l gt px Revoluc BCD Revoluc BCD Pulses BCD V3761 R128 V3761 K190 V3760 K9594 1 lt Revoluc BCD V3761 K190 lt Revoluc BCD Pulses BCD Revoluc BCD V3761 K190 V3760 K9594 V3761 K215 17 z 2 lt Revoluc BCD Revoluc BCD V3761 K191 V3761 K215 gt SBR Ki _on LDD SP1 Aux position 66 V3700 MULD FACTOR V3776 DIVD Constant 2500 V3766 OUTD Current position R V7362 Aux position ele V3700 KO 87 Ko OUTD Current position R V7362 68 rt SBR K2 _on LDD SP1 iti Aux position 70 3700 SUBD K63653 MULD FACTOR V3776 DIVD Constant 2500 V3766 ADDD K40000 OUTD Current position R V7362 a RT k2 GTS K3 GTS K4 GTS AN SERV 010 Each subroutine will put the result into V7362 The calculation is done in segments of 40 inches or the equivalent count in the se
6. Is el7 els14 3121110 The value in Start Address 1 and 2 represents which function key is activated The value is displayed in Decimal format Cer Ce The explanation of the 3 words related to the panel functions are in the figure above but for now we are interested on register V7351 Let us define the functions of the operator interface as follows F1 gt C110 Servo enable the servo enable shall be set by the operator F2 gt C100 Command trigger F3 gt C101 Alarm reset this should also be commanded by operator F4 gt spare F5 gt C102 Servo disabled it shall be commanded by the operator We will relate the word V7351 value to any of the C bits as follows If the button F1 is pressed V7351 will change to a 1 BCD If the button F2 is pressed V7351 will change to a 2 BCD f the button F3 is pressed V7351 will change to a 4 BCD If the button F4 is pressed V7351 will change to a 8 BCD If the button F5 is pressed V7351 will change to a 10 BCD Luis Miranda AN SERV 010 Defining the digital inputs to be used for commanding the servo With these considerations we will implement more ladder code on the PLC a our C146 is turned on this this case When F1 keyis pressed in screen 1 Target A is considered Recall that V7351 is HMI WORD LDD the word associated V7361 K1 Y7350 K1 to the panel key L m V4000 When the content of V7351 is 1 the key F1 OUTD has
7. OUT TRANSACT S V3770 Here we count the communication transactions in a period of 1 second SP116 CNT 6 CT100 co K999 This is the reading instruction it reads 7 consecutive words from servo SP116 i LD T al Kf202 LD g K14 LDA g 03004 RX TA4 C1 IstEd 07 10 Luis Miranda 35 AN SERV 010 C2 turns ON if the content of P2 30 is NOT 5 P2 30 C1 V3011 r K5 C2 8 2 SET This is one writing instruction when C2 is ON and it writes one word to parameter P2 30 SP116 c2 ip 9 Kf202 LD K2 LDA 03772 WX TA11 If the content of P2 30 is 5 then resets C2 and sets C3 P2 30 V3011 K5 C2 10 RST C3 OUT This is other writing instruction when C3 is ON and it writes 3 words to servo SP116 C2 C1 C3 LD 11 Kf202 LD K6 LDA 02000 WX TA13 C1 RST j Calculation of current position in inches when reading from servo LD _On SP1 Servo actual rev 12 V3004 BCD OUT Revoluc BCD g V3761 LD Servo act pulse g V3005 BCD OUT Pulses BCD g V3760 LDD Pulses BCD g V3760 DIVD Constant 10 g V3756 OUTD Aux position V3700 This rung and next ones send the execution to subrutines Revoluc BCD V3761 K63 K1 13 lt GTS Revoluc BCD Pulses BCD V3761 K63 V3760 K6530 36 Luis Miranda 14 15 16 17 18 19 20 21 22 AN SERV 010 EE Revoluc BCD Pulses BCD Revoluc BCD V3761 K63 V3760 K6530 V3761 K127 l K2 GTS Revo
8. P1 44 Electronic Gear Numerator 1 P1 45 Electronic Gear Denominator P1 46 Encoder Output Scaling Factor P1 47 Homing Mode P1 48 Homing Velocity 1 Fast Search Velocity P1 49 Homing Velocity 2 Creep Velocity P1 50 Home Position Offset Revolutions P1 51 Home Position Offset Counts a a spit gis a a a atin gi LE Luis Miranda 1 8280 oo O OC CC CC CX 12 400 Watt for our test 1 0 600 600 20 10 3000 3000 100 20 20 223 600 60 P1 52 Regenerative Resistor Value P1 53 Regenerative Resistor Capacity P1 54 In Position Window P1 55 Maximum Speed Limit P1 56 Output Overload Warning Threshold P2 00 Position Loop Proportional Gain KPP P2 01 Position Loop Gain Boost P2 02 Position Feed Forward Gain KFF P2 03 Smoothing Constant of Position Feed Forward Gain P2 04 Velocity Loop Proportional Gain KVP P2 05 Velocity Loop Gain Boost P2 06 Velocity Loop Integral Compensation RVI P2 07 Velocity Feed Forward Gain KVF P2 08 Factory Defaults and Password P2 09 Debounce Filter P2 10 Digital Input Terminal 1 D11 P2 11 Digital Input Terminal 2 DI2 P2 12 Digital Input Terminal 3 DI3 P2 13 Digital Input Terminal 4 DI4 P2 14 Digital Input Terminal 5 DI5 P2 15 Digital Input Terminal 6 DI6 P2 16 Digital Input Terminal 7 DI7 P2 17 Digital Input Terminal 8 DI8 P2 18 Digital Output Terminal 1 DO1 P2 19 Di
9. change screen button to go to screen 3 that will be called Go to instructions You can Go to Power Up Screen Forward Screen Object Style Previous Screen copy the object and then ns Ne Re change the properties For Ss 1 SCREEN 3 that select the change screen ragtameDsataee ak Carcel J Hep button by cliching into it and then go to the menu Edit and hit copy Then got other submenu Paste A copy will show up over the original set offset and showing dots on the corners Drag it to the right of the existing one Now we can right click on the bottom text object and a submenu will show up Click on the submenu Object Properties and change the necessary fields You can relocate the objects to align with the upper ones You may change the frame to other to distinguish from the previous one On the same way you may change the properties of the numeric display The result and the tags related to each object are shown on the following figure Core micro Yer2 0 0 0 ISieera project mgp 1 Screen 1 G File Edit View Tool Object Screen Database Setup Panel Window Help ODE Han go dmm Ma Start aProject Simulate Project Send Project to panel a Navigation x Screen Function lt CURRENT POSTTION OO 1 D x El 123 451 inches 1 Screen 1 ot settings Goto instructions screen 2 screen 3 2 Screen 2 3 Screen 3 24 Luis Miranda AN SERV 010 es This projec
10. enables the servo drive with DI1 the servo will make the home search after 3 seconds of servo enable When the servo finds the home position we will zero the position 0 revs and O counts and then after that we can have a reference point to the target position on P1 15 and P1 16 Recall that P4 07 is the value that contains the digital inputs The digital inputs could be real inputs or virtual inputs defined with MODBUS Repeating the explanation if any of the eight less significant bits on P3 08 is a 1 digital inputs DI1 until DI8 are used as virtual digital inputs with MODBUS we call them virtual digital inputs as opposed to real digital inputs We have arbitrarily associated to P4 07 the following definitions Bit Digital A Assigned value PLC order On odes T in P3 08 bit 0 D 101 Servo Enable 1 N A 1 DI2 104 Clear command 1 N A 2 DI3 124 Home sensor 0 N A 3 DI4 0 Disabled 0 N A 4 DI5 0 Disabled 0 N A 5 DI6 22 Reverse overtravel limit opens on overtravel 0 N A 6 DI7 23 Forward overtravel limit opens on overtravel 0 N A 7 DI8 21 External fault stop opens on fault 0 N A 8 DI9 108 Command Trigger predefined 1 C100 9 DINO 111 PCSO Bit de selection O de position predefined 1 N A 10 DI11 112 PCS1 Bit de selection 1 de position predefined 1 N A 11 DI12 113 PCS2 Bit de selection 2 de position predefined 1 N A 12 D13 1
11. example 9 revolutions P1 51 Count offset from home sensor P1 55 left as 2174 rpm P2 10 DI1 set as 101 that is servo enable P2 11 DI2 set as 104 clear command to zero the counts after home position P2 12 DI3 set as 124 defined as a home sensor normally open P2 13 DI4 set as O disabled P2 14 DI5 set as O disabled P2 15 DI6 set as 22 as reverse overtravel limit it is a normally closed contact P2 16 DIZ set as 23 as forward overtravel limit it is a normally closed contact P2 17 DI8 set as 21 as external fault stop it is a normally closed contact Note from the table on the previous page that bits 8 to 15 are predefined functions for digital inputs P2 18 DOI as 102 that is the output servo OK P2 19 DO2 as 109 that is the output Home completed P2 20 DO3 as 105 that is the output At position P2 21 DO4 as 107 that is the output Active fault P2 22 DOS as 101 that is the output servo ready P2 36 Position 1 velocity set to 2174 rpm P2 50 Clear command set to 1 P3 08 Digital input mask set as FFO3 Note that in order to store the parameter values into the servo drive parameter P2 30 shall be set as 0 and when the values have been entered you should power cycle the servo drive that is power OFF and then ON the servo drive 16 Luis Miranda AN SERV 010 The concept of absolute position control will be so that after the operator
12. of 1 thousandth of an inch At the start of the job when the servo system is enabled the machine shall go to the Home position located at some inches from the one of the sides The Home is determined by a proximity sensor There are also overtravel limit switches IstEd 07 10 Luis Miranda 1 AN SERV 010 IE The operator panel will show the current position on screen 1 and will have buttons to trigger the motion to any of the 4 given targets The second screen will allow the entering of the targets and use Jog forward and reverse as well as enable and disable the servo We have selected to use a PLC DO 05DD and an operator interface EA1 S6ML to control the positions of the saw The figure below shows the same arrangement with a C more micro of 3 1 inches instead of the 6 inch operator interface panel Control concept This application note details some of the actions for designing the control system In this example we will need to run the motor with 4 target positions given by the operator with a value given directly in thousand of an inch in the range of 0 to 134 inches variable values defined every day by the operator at the beginning of the shift and entered in the operator interface 134 inches motion lt lt Home sensor The transfer of target values and the writing of digital inputs is done though MODBUS RTU from the port 2 of the PLC DLO5 This is possible only if the servo drive has a firmware version 2 105
13. or later The operator will see in the operator panel where the saw is located at any given time The acceleration maximum speed and deceleration are fixed values The home search is done every time the servo is enabled if the home has not been found The operator can enable or disable the servo from the operator interface There is no brake in this system but one output is to be programmed to release a brake when the servo is enabled 2 Luis Miranda AN SERV 010 es In this case the motion is ideally suited to be absolute motion with internal registers The servo is defined arbitrarily as slave 2 for the PLC The operator panel is the master for the PLC They are located in different networks The Home sensor as well as the overtravel limit switches and external fault have been left directly wired to the servo drive Steps for the execution of the control This is the sequence of operations that shall be followed in this example to get the system up and running Define the control hardware to be used including the wiring Create the wiring diagram Select and set the communication parameters Read the status of the servo though MODBUS using the RX instruction Measure the communication speed in transactions per second Write data to servo Set it to write data in RAM memory only Make the details of the block transfer parameters Make the code for reading an writing interlocks Define the block transfer pa
14. project has been done If the motion has some oscillations you may need to execute some tuning Tuning is not covered in this technical note But you should document the operation for the operator to have a description of what the machine will do how to troubleshoot How to reset alarms if any etc IstEd 07 10 Luis Miranda 33 AN SERV 010 IE This concludes the programming of the PLC and basic configuration of the servo At this time we have a PLC scan time of 10 ms average with excursion to 14 ms and 8 ms The transaction second are about 42 or 43 T s that is the reading occurs every 47 6 ms This is 1000 ms 42 transactions is 23 8 ms since for every reading there is a writing we multiply that value by 2 gt 23 8x2 47 6 ms What to do if we need more updates per second A We can reduce the number of points to be read and written B If we use a faster master such as the DO DCM or the FO CP128 on the DLO5 or other PLC with more Baud rate such as the Click PLC the reading can occur faster On next pages are shown the tag database on the operator panel The ladder code and the parameters selected on the servo Tag Name Database R Device Name ALL v C Display Internal Tags C Highlight Unused Tags No Tag Name Data Type PLC Address Device Name Attribute A 1 V7351 BCD int 16 V7351 DEVO01 HAM 2 TARGET D BCD int 32 V4006 DEVO01 RZW 3 TARGET C BCD int 32 4004 DEVO01 RAM 4 TARGET B BCD int 32 4002 DEY00
15. top of the screen You should see an object similar to the following AUX 4 25 A De mi T auto s Optima v 75pt v O M 100 5 6 062 Cols 1 Opacity 100 v AY 0 CIC Be BRAMMIBOQS KEK FEE Opacity 100 s _ Style Sheets f Body Bold Body bullet A Body bold Radu B llet ETT D Switch a Indicator M Granhie le You may drag it to the desired position if necessary you can also give other size and shape then save to the disk We will create 2 buttons to jump to other screens screen 2 and 3 that arbitrarily are defined as settings and instructions Of course the client can customize the operator panel as desired More than 90 screens are possible even though this is not practical In order to to this please click on Object and then select Control and Screen change pushbutton Click again and the cursor will turn into a cross Drag it forming a rectangle somewhere under the numeric display object It will pop up a dialog box as follows IstEd 07 10 Luis Miranda 23 AN SERV 010 IE Change the field Text with the words Go to settings and in Screen Change Push Button Name General ScreenChangePushB the field Go to select other Sa screen and set it as number 2 z x Position co and you may set other properties here Align El 1 Font Frame Style Line J Theme hee Function Key Assign None v In the same way set other
16. 02 Alarm reset predefined 1 C101 13 DI14 127 Home search command predefined 1 C102 14 DI15 137 JOG Forward predefined 1 C103 15 DI16 138 JOG Reverse predefined 1 C104 We can define the PO 11 parameters and subsequent in such way than they are the values of position in P1 15 PO 11 P1 16 PO 12 and the digital inputs in P4 07 PO 13 Therefore the code of line 9 is such that it is written in 3 consecutive registers The initial associated V memory on the PLC will be the memory V2000 In this way we should set the parameters as follows with the keyboard Parameter Value MODBUS address PLC memory Description PO 04 1 40005 V3004 Current revolutions PO 05 0 40006 V3005 Current counts PO 06 6 40007 V3006 Current rpm PO 07 11 40008 V3007 Current torque P0 08 13 40009 V3010 DC Bus voltage P0 09 21E 40010 V3011 Set not as default as parameter P2 30 PO 10 409 40011 V3012 Set not as default as parameter P4 09 PO 11 10F 40012 V3013 Set as position command 1 revolutions PO 12 110 40013 V3014 Set as position command 1 counts PO 13 407 40014 V3015 Set as input status IstEd 07 10 Luis Miranda 1 7 AN SERV 010 IE PO 11 will be the desired revolutions with the value 10F4 equivalent to P1 15 PO 12 will be desired counts with the value 110444 equivalent to P1 16 PO 13 will be the word with the digital inputs with the value 407he equivalent to P
17. 1 Raw 5 TARGET A BCD int 32 4000 DEVO01 RAM 6 TARGET BCD int 16 7300 DEVO01 RAM 7 STORE BCD int 16 7200 DEVO01 RAM 8 RATE BCD int 16 1 3770 DEVO01 Raw 9 PANEL WORD BCD int 16 7350 DEVO01 RAW 10 LOOKUP TEXT BCD int 16 V7352 DEVO01 RAM 11 LOAD TARGET Discrete C140 DEVO01 RAM 12 JOG REY Discrete C200 DEVO01 RAM 13 JOG FWD Discrete Cam DEVON Baw 14 DOR Discrete C304 DEVOO1 Rew 15 DO4 Discrete C107 DEVY001 RAW 16 DO2 Discrete C302 DEVO01 Rew 7 D02 Discrete C301 DEVOO01 RAW 18 D01 Discrete C300 DEVOO01 HAJ 19 CURRENT POSITION BCD int 32 V7362 DEVOO01 RAW 20 C31 Discrete C31 DEVOO01 RAW F Add Cancel Help 34 Luis Miranda AN SERV 010 _FirstScan LD SPO 1 K5 OUT C146 Constant 5 T H V3772 LDD 3 3 A i H K2500 This rung defines some constants such as the scaling of the linear engineering units sosie OUTD into revolutions and vice versa and initialize some variables This rung turns true Constant 2500 for one scan only on power up and after the timer T33 is turned ON H V3766 LDD g K1571 OUTD FACTOR g V3776 LDD g K10 OUTD Constant 10 g V3756 LD g KO OUT P2 30 g V3011 OUT V2002 co C3 RST This rung defines the T33 timer C3 TMR 2 T33 K15 T33 C146 3 OUT This rung generates a pulse every second lasting one scan _1Second SP4 co 4 PD Here we save the CT100 counter current value just when the CO pulse is on co LD 5 CTA100
18. 100 is On the C100 T4 timer counts for 200 ms and will turn ON T4 after K2 this time Trigger bit C100 When T4 is ON the bit T4 ri h RST C100 is reset to OFF We will create a static text object with the descriptions of the functions to the operator panel in order that the operator can identify the proper button Of course other possibility is to engrave the function on the empty labels supplied with the panel We have other action on the screen 2 buttons See below When F1 key is pressed in screen 2 the servo is enabled HMI WORD S Enable bit V7351 K1 V7350 K2 C110 peel our When F2 key is pressed in screen 2 the bit C101 is turned ON HMI WORD alarm reset bit 7351 K2 V7350 K2 c101 H L ou When F3 key on HMI is pressed in scren 2 the output Y5 is turned ON spare HMI WORD V7351 K4 V7350 K2 Y5 Ll S Lk our When F4 key is pressed in scren 2 the output is turned ON Spare HMI WORD V7351 KB V7350 K2 C333 dl our When F5 key on operator interface is pressed the bitC112 is turned ON HMI WORD Servo disable 7351 K10 V7350 K2 C112 1 J our 28 Luis Miranda AN SERV 010 We are ready to create the screen 2 and screen 3 In screen 2 we will set 4 numeric entry objects to define the position targets data i i it Go to Go to Go to Go to de tae Target i Target Target I Srare to be used See the adjacent figure about p the text created We may have to add a J
19. 1Second SP4 co CO closes one scan every c rr second co LD i CTA100 Every time CO closes the current count of CT100 is OUT loaded to the accumulator TRANSACTIS The instruction OUT reads V3770 what is in the accumulator and copies to V3770 SP116 CNT Here the counter CT100 l L CT100 counts every time the bit co K999 SP116 turns on The CT100 counter current value goes to zero every time CO closes SU Here is the same rung ls EL programmed before used LD to configure the network LDA 03000 TAO You can read V3770 in Data View as in the adjacent figure and can see that the result is 60 counts every second Since there are 1000 milliseconds in a second 1000 60 ms is approximately 17 ms et ar il You can also see that the vmemory Stu Situs 1 3000 2105 V3000 has the firmware version 2 1 3001 0 V3004 has the current number of revolutions 3 1 3002 0 V3005 the current number of counts 4 3003 0 V3010 the DC bus voltage of the servo etc 5 n 2 revs a ay f 6 3005 7543 pulses This it is a good method to determine the 5 V3006 0 transmission speed 8 3007 0 9 3010 306 DC volt 10 TRANSACT S gg Second Luis Miranda AN SERV 010 l I Writing to the servo When already proven the communication link between the PLC and the servo we should see what algorithms to do in the PLC to be able to give the servo the values to be written into it Remember that we are
20. 3 124 Home sensor 0 I 3 3 DI4 0 Disabled 0 4 DIS 0 Disabled 0 5 DI6 22 Reverse overtravel limit switch opens on overtravel 0 6 DIZ 23 Forward overtravel limit switch opens on overtravel 0 0 7 DI8 21 External fault stop opens on fault 0 8 DI9 108 Command Trigger predefined 1 9 DI10 111 PCSO Bit de selection O de position predefined 1 1 1 1 1 1 1 In this case vve must set P3 08 as FF03 The default value is O Notice that Home sensor overtravel limit and external fault stop are hardvvired The inputs DIT and DI2 and DI8 to DI16 are used with MODBUS IstEd 07 10 Luis Miranda 15 AN SERV 010 B Main parameter setting P0 04 Setas 1 current revolutions PO 05 Set as O current counts P0 06 Set as 6 servo shaft speed PO 07 Set as 11 torque P0 08 Set as 13 DC bus voltage P0 09 Set as 21E corresponding to P2 30 PO 10 Set as 409 corresponding to P4 09 P1 01 Operation mode that by default is 0 set as 1 Pr mode Or 101 P1 32 Selection of the stop mode changed to 1 from value 0 P1 33 set as O absolute mode P1 34 Acceleration time it was defined as 600 ms P1 35 Deceleration time 600 ms P1 36 S curve set as 30 arbitrarily P1 47 Home search definition set as 223 P1 48 Home search fast speed set as 600 rpm arbitrarily P1 49 Home search creep speed set as 60 rpm arbitrarily P1 50 Revolutions offset from home sensor for
21. 4 By now we have the MODBUS RTU communication working but we have not set the servo parameters for position operation Use of block transfer registers Let us go back to the discussion on the reading of up to 13 registers in the memories V3004 to V3020 Why this is convenient Because the block transfer parameters PO 09 to P0 16 are configurable parameters that is the ones that could be changed to read or write any desired address in the servo drive We have done so for P0 09 We can read the 13 registers and configure the data in a convenient way for our specific purpose We have the following settings so far Parameter Value MODBUS address PLC memory Description PO 04 1 40005 V3004 Current revolutions PO 05 0 40006 V3005 Current counts PO 06 6 40007 V3006 Current rpm PO 07 11 40008 V3007 Current torque PO 08 13 40009 V3010 DC Bus voltage P0 09 21E 40010 V3011 Set not as default as parameter P2 30 P0 10 10F 40011 V3012 Default is P1 15 Target 1 revolutions PO 11 110 40012 V3013 Default is P1 16 Target 1 counts PO 12 224 40013 V3014 Default is P2 36 Target 1 velocity PO 13 111 40014 V3015 Default is P1 17 Target 2 revolutions PO 14 112 40015 V3016 Default is P1 18 Target 2 counts PO 15 225 40016 V3017 Default is P2 37 Target 2 velocity PO 16 109 40017 V3020 Default is P1 09 Velocity command 1 Parameters PO 10 to PO 16 may be changed to o
22. 4 le gl le gl When the bit 4 on the register P4 OUT 09 is ON the servo is ready This Reading from P4 09 to the word for virtual digital outputs turns ON C304 at torque limit B3012 5 C305 When the bit 5 on the register P4 OUT 09 is ON the servo is at torque limit This turns ON C305 The bit C300 can be used for resetting the logic on rung 1 to avoid that the servo communications is not well established All the bits that show the status of the servo can be used for other purposes on the ladder code For example to show the status on the screen 1 of the operator panel Testing the program You may want to be sure that the hardwired inputs are working properly Also that the speeds are the ones you want The next step is to turn on the servo and the PLC and the operator panel The current position should be O inches even though it might not be there The Home not found banner will be on the top Also the servo is Disabled and Ready The transactions s should be about 25 to 48 Transactions s If significant lower than from a value close to this please troubleshoot the problem You should press the Goto Settings button to go to screen 2 to load target values and test that the servo is moving to the corresponding position 32 Luis Miranda AN SERV 010 es Before proceeding with this it is possible to rearrange and add more functionality to the operator interface panel We have added the trans
23. 4 07 You may select other block transfer parameters if it is necessary in your application Current position math We should calculate the current position in V7362 after reading the revolutions and fractions from the servo drive See the ladder code on the figure below to implement this We know that the current revolutions are in V3004 and the current counts in V3005 We can execute a calculation to get the current position expresssed in revolutions to be displayed in thousandths of an inch The client may test that the panel communication link is working together with the servo The way to do that is to force some values because we have not done all the set up But is is possible to see the current position by rotating the shaft of the servo Notice that it could be a small error due to truncation Calculation of current position in inches when reading from servo 18 _On S Revoluc BCD 3761 K63 LD Servo actual rev V3004 Revoluc BCD 3761 LD Servo act pulse V3005 Pulses BCD V3760 Pulses BCD IDIVD Constant 10 V3756 OUTD Aux position V3700 K1 Revoluc BCD 1 K63 Pulses BCD K6530 V3760 I lt GTS The servo contains the current revs and pulses in parameters P0 04 and P0 05 that are read into v3004 and V3005 The value is transformed into a value of revolutions in a double word
24. 7366 C140 OROUT This rung is true when the F3 button is pressed on screen 2 V7351 K4 V7350 K1 LDD 30 V4004 OUTD INCHES V7366 CO OROUT This rung is true when the F4 button is pressed on screen 2 V7351 R8 V7350 K1 LDD ad V4006 OUTD INCHES V7366 C140 i OROUT 38 Luis Miranda AN SERV 010 ee This rung is true when the F5 button is pressed on screen 2 Reset alarm V7351 K2 V7350 K2 C101 33 OUT Spare 1 V7351 K4 V7350 K2 Y5 34 OUT Spare 2 V7351 KB V7350 K2 C10 35 j OUT Spare 3 V7351 K10 V7350 K2 C112 36 l OUT This rung allows to give the command servo enabled Enable servo Spare 3 Servo enable DI C110 C112 B2002 0 37 di OUT Servo enable DI Brake output B2002 0 Y4 OUT Brake output Home complet DO Y4 C301 C4 38 J L SET C4 TMR 39 T2 K25 Do home search CA TA2 K20 C102 40 OUT T2 E 41 RST Home complet DO C301 C5 42 l T SET TMR cs CLEAR position ES T3 K30 2 8 seconds after the home is completed the servo current position is set to zero This is done by writing to the digital input word P4 07 Clear command DI TA3 K28 B2002 1 44 gt OUT CLEAR position T3 C5 45 RST IstEd 07 10 Luis Miranda 39 AN SERV 010 Ip When C120 closes the servo begins the motion This is done by writing to the digital input word P4 07 Trigger DI C120 B2002 8 46 OUT W
25. AN SERV 010 eee THIS INFORMATION PROVIDED BY AUTOMATIONDIRECT COM TECHNICAL SUPPORT IS SUPPLIED AS IS WITHOUT ANY GUARANTEE OF ANY KIND These documents are provided by our technical support department to assist others We do not guarantee that the data is suitable for your particular application nor do we assume any responsibility for them in your application PRODUCT FAMILY SureServo Number AN SERV 010 Subject Sureservo linear displacement Date issued Jul 6 2010 Revision First edition This example demonstrates how to use a Sureservo to control a linear movement by selecting parts available from AutomationDirect After that it is shown how to program a PLC the servo drive and a 6 inch C more micro operator interface The machine is shown in the figure below This is a device that moves a saw horizontally installed over a movable table to any of four desired positions entered by an operator with the help of a rack and pinion mechanism through a maximum distance of 134 inches from the Home position The servomotor is mounted over the table The mechanical department has defined that the table will move 0 6284 inches when the servomotor rotates 1 revolution The acceleration and deceleration time is 0 65 Typically the operator will set the desired target position with one of the 4 buttons on the operator interface and he will need to move it on the range of 0 to 134 inches from the Home position possibly with precision
26. N the bit 14 of the word V2002 is turned ON This will give the command to JOG forward When C200 turns ON the bit 15 of the word V2002 is turned ON This will give the servo the command to JOG reverse 2000 0 Target counts 2001 12 2002 0001000000000000 Ist Ed 07 10 31 Luis Miranda AN SERV 010 Ep Using the output status data in P4 09 We need the servo digital output data for some actions on the PLC program We know that we are getting data continuously on the word V3012 The following part of the ladder program shows how this can be accomplished Reading from P4 09 to the word for virtual digital outputs Serva ON When the bit 0 on the register P4 83012 0 ini 09 is ON the servo is ON This j OUT turns ON C300 Reading from P4 09 to the word for virtual digital outputs Home found B3012 1 C301 When the bit 1 on the register P4 _ EEL OUT 09 is ON the Home search has been completed This turns ON Reading from P4 09 to the word for virtual digital outputs C301 Home found At position DO B3012 2 C301 C302 When the bit 2 on the register P4 OUT 09 is ON and home is completed Reading from P4 09 to the word for virtual digital outputs the servo is at position This turns Fault ON C302 B3012 3 C303 L OUT When the bit 3 on the register P4 09 is ON the servo is at fault This Reading from P4 09 to the word for virtual digital outputs turns ON C303 ServoReady B3012 4 C30
27. OG forward and a JOG reverse later on this project for the rare case that the tool get the overtravel limit switch activated or any need to test C more micro Ver2 0 0 0 Sieera project mgp 2 Screen 2 G File Edit View Tool Object Screen Database Setup Panel Window Help IS Han 42 0818181 Start a Project Simulate Project B Navigation x PRET A 123 451inches Screen Function DEERE TARGET k 123 451inches JOG reverse 2 Screen2 3 Screen 3 the motion This can be set with a touch screen button Finally we have to identify the buttons for screen 2 The figure above is the probable result Screen 3 can be just text as shown on the adjacent figure Of course the client should set the proper instructions for the specific machine The instructions can also be several pages with navigation buttons there _TAFRGET D 123 451inches reverse Send Project to panel nm L TARGET E Object Shape 123 451inches Line CO Recte O Circle El Fram Button Push D swite m Indice Indicator QO indice D Grapt Nume Entry IS Nume Increr JOG Forward la I Defa Samp Samn Instructions for operation he orerator Fanel will show always he screen 1 from 3 he machine can be PROGRAMMED with 4 positions Select the desired positions on screen 2 he servo shall be enabled for operation he home search is done a
28. TD Result 1 V7370 81 RT 82 NOP 44 Luis Miranda AN SERV 010 l I List of parameters on the servo drive Parameter Value P0 00 Software Version 2 105 P0 01 Drive Fault Code 0 P0 02 Drive Status Front panel display 0 P0 03 Analog Monitor Outputs P0 04 Status Monitor 1 P0 05 Status Monitor 2 P0 06 Status Monitor 3 P0 07 Status Monitor 4 P0 08 Status Monitor 5 P0 09 Block transfer parameter 1 P0 10 Block transfer parameter 2 P0 11 Block transfer parameter 3 P0 12 Block transfer parameter 4 P0 13 Block transfer parameter 5 P0 14 Block transfer parameter 6 P0 15 Block transfer parameter 7 P0 16 Block transfer parameter 8 P0 17 Output function status P1 00 External Pulse Input Type P1 01 Control Mode and Output Direction P1 02 Velocity and Torque Limit P1 03 Output Polarity Setting P1 04 Analog Monitor Output Scaling 1 CH1 P1 05 Analog Monitor Output Scaling 2 CH2 P1 06 Analog Velocity Command Low pass Filter P1 07 Analog Torque Command Low pass Filter P1 08 Position Command Low pass Filter P1 09 Preset Velocity Command Limit 1 P1 10 Preset Velocity Command Limit 2 P1 11 Preset Velocity Command Limit 3 P1 12 Preset Torque Command Limit 1 P1 13 Preset Torque Command Limit 2 P1 14 Preset Torque Command Limit 3 07 10 1 1 Current revolutions 0 Current counts 6 Current speed in rpm 11 Current torque 13 C
29. V3000 Software version PO 01 14 40002 V3001 Fault code PO 02 0 40003 V3002 Drive Status P0 03 1 40004 V3003 Analog monitor P0 04 1 40005 V3004 Current revolutions PO 05 0 40006 V3005 Current counts PO 06 6 40007 V3006 Current rpm PO 07 11 40008 V3007 Current torque PO 08 13 40009 V3010 DC Bus voltage The values in V3000 until V3010 are all signed decimal values When the parameter changes have been done you can move the shaft of the servomotor and it will be possible to observe that the content of V3005 memory shows the same number than the display on the servo when the shaft of the motor moves parameter PO 02 should be set to 0 This fact allows to check that the communication has been established IstEd 07 10 Luis Miranda 9 AN SERV 010 IE 10 Measure the communication speed in transactions per second How can we measure the PLC scan time and how many transactions are happening per second Using Data View in DirectSOFT to monitor the V memory V7775 which is the current scan time Or use the window of scan time As we know when a communication transaction begins SP116 will turn ON and then using this bit we can count how many times the SP116 contact closes in 1 second for example with a simple counter Remember that a counter counts whenever is a transition of the input from OFF to ON See the diagram of the figure below with the corresponding code ladder and the explanations in each line _
30. actions per second on screen 1 as well as the status indicators Notice that the transaction counts per second has decreased See the adjacent figures for one possible option Screen 2 Screen 1 6 891 inch 23 456 inch 87 654 inch 123 456 inch Current position 3ga 32 456 ns al JOG REVERSE JOG FORWARD ALARM ee RESET SPARE SPARE Write targets in the numeric entries by touching the object The numeric keypad will show up Clear the number that is there by touching the key CLR Press the button F1 Servo enable and the servo will move to find the Home sensor When this is done the servo will stop moving and after a short period the Current position will go back to zero 0 000 inches Press the Screen1 button to go back to the screen 1 The banner at the top has changed to Home completed It is checked that the number is not greater than 130 inches If greater or equal than 130 inches it clamps the value and forces a 130 inches on the target But this has not been transferred to the servo For that to happen we should press one of the buttons F1 to F4 on the screen 1 When this is done the logic on the PLC triggers the motion The servo will move to the corresponding number of revolutions and counts To come back to other position we can repeat the action that is after at position press other button It will move to the selected target This is the operation If everything works as described the
31. alue 407 as 21E that causes that this parameter be defined as P2 30 Then we will increase the reading of 9 registers in RX to 10 to include P0 09 Note that we have to force a value of 5 into the content of the register that corresponds p gt to P2 30 For that we have to set a V memory with a constant 5 This is done on a first scan on rung 1 and the memory is V3772 We also create other constants that are necessary for the program We should also reset the bits CO to C2 SP116 LET P2 30 C1 3011 K5 LD LDA TAQ LD Kf202 03000 C1 set c2 L set x K202 C P2 30 v3011 K5 TA11 ner By TE Y i Hi C3 L OUT Kf202 LDA 02000 In order to test this step turn off the servo and P2 30 will reset to off Then when turning the servo on you can monitor V3011 with Data View to see the value there Luis Miranda AN SERV 010 You will observe that the PLC did not took notice that the servo was powered off Then it is necessary to create an interlock in such a way that the PLC resets CO to C2 when the servo goes from servo not ready to servo ON For this we will read the data in P4 09 We added the rung 1 for constants we will need later See below _FirstScan When SPO closes Load the li constant 5 to The accumulator The instruction OUT reads what is in the accumulator al and co
32. anda 41 AN SERV 010 ET SBR K3 LDD _On SE Aux position 65 V3700 SUBD Bi K127306 MULD FACTOR N V3776 DIVD Constant 2500 H V3766 IADDD R K80000 OUTD Current position V7362 66 RT i SBR K4 LDD _On SP1 Aux position 68 V3700 SUBD g K190961 MULD FACTOR g V3776 DIVD Constant 2500 g V3766 IADDD g K120001 OUTD Current position q V7362 69 RT 42 Luis Miranda AN SERV 010 eee SBR KB LDD _On DEA INCHES 71 V7366 MULD Constant 2500 g V3766 DIVD FACTOR ry V3776 MULD Constant 10 g V3756 OUTD Result V7370 72 RT SBR K6 LDD _On SP1 INCHES 74 V7366 SUBD g K40000 MULD Constant 2500 g V3766 DIVD FACTOR g V3776 MULD Constant 10 RI V3756 ADDD g K636541 OUTD Result Il V7370 75 RT IstEd 07 10 Luis Miranda 43 AN SERV 010 Ep SBR K7 LDD _On Shi INCHES 7 1 T V7366 ISUBD g K80000 MULD Constant 2500 M V3766 DIVD FACTOR g V3776 MULD Constant 10 g V3756 ADDD g K1273074 OUTD Result V7370 78 RT SBR K8 LDD _On SP1 INCHES 80 V7366 SUBD g K120000 MULD Constant 2500 g V3766 DIVD FACTOR g V3776 IMULD Constant 10 g V3756 ADDD R K1909611 OU
33. been pressed Targetinches C140 is turned on this V7366 case Enter target C140 OROUT When F2 keyis pressed in screen 1 Target B is considered HMI WORD LDD When the content of V7351 K2 VF350 K1 V7351 is 2 the key F2 5 4002 has been pressed C140 is turned on this OUTD case Target inches V7366 Enter target c140 OROUT when F3 key is pressed in screen 1 Target C is considered HMI WORD When the content of 7361 K4 7350 ko V7351 is 4 the key F3 has been pressed V4004 S C140 is turned on this OUTD case Targetinches V7366 Enter target C140 OROUT When F4 key is pressed in screen 1 Target D is considered HMI WORD LDD 7351 K8 V7350 K1 When the content of FR V4006 V7351 is 8 the key F4 has been pressed OUTD C140 is turned on this Target inches this case V7366 Enter target C140 OROUT l eae l When the content of When F5 key is pressed in aoe spare and will activate C146 V7351 is 10 the key V1351 K10 7350 C146 Ba bae Den TE IstEd 07 10 Luis Miranda 27 AN SERV 010 In the test at AutomationDirect we used a HO ECOM to connect DirectSOFT to the PLC the Port 1 has the Panel and the Port 2 is connected to the servo drive In order to create a trigger command after one of the buttons have been pressed we created the following code Enter target Trigger bit When the bit C140 is C140 c100 activated the action i ot sets the bit C100 which is the trigger bi Trigger bit TMR When C
34. e Set P3 00 parameter to the desired slave address In this case we will use the value 2 that is to say servo drive slave 2 Then set a value 3 in P3 01 that defines the transmission rate as 38 4 kBaud This value also must be set in the configuration of PLC port 2 P3 02 defines the protocol and the configuration of the same one In this case let us select 8 Finally we set the P3 05 value according to the system of communication RS 232 with a value of 0 6 Luis Miranda AN SERV 010 ee Communication parameters for PLC The communication parameters in PLC DLO5 are configured with the software DirectSOFT5 and we show the adopted values in the adjacent figure Pott Port 2 Close Setup Communication Ports Protocol Base Timeout The configuration on the Port Re TS mb vem 2 is saved in RAM Memory DirectNET 800ms Help That is it is possible that the M MODBUS 500 ms port set up be lost after the a lar PLC has a period of 4 days without power Time out Base Timeout x 1 RTS on delay time 0 ms x In this case we can also do the port set up with ladder code which is retained in Flash Station Number memory and in this case there Baud rate is no need of power to keep the set up stored See the set up on the DLO5 user manual or in one of the application notes on the web site of AutomationDirect Let Port 2 6 Pin Modular us leave the other values as default values RTS off delay t
35. e 0 to disable the function of each input in DI6 DI7 and DI8 or wire the proper switches there In order to clear the faults press the up and down arrow keys on the keypad simultaneously clearing any error can be there or it is also possible to power cycle the servo drive to get the same function Next be sure that the value of the motor code is set in the P1 32 parameter The axis of the motor should turn freely Do not couple the servo to the machine until the tests of the programs have been done and the data that is contained in the memories P0 00 up to P0 08 can be read These memories have MODBUS addresses 40001 up to 40009 as it is in the following table and described in the user manual in chapter 6 Parameter Value MODBUS address Description PO 00 2 105 40001 Software version PO 01 14 40002 Fault code PO 02 0 40003 Display code PO 03 1 40004 Analog monitor PO 04 1 40005 Status monitor 1 PO 05 0 40006 Status monitor 2 P0 06 0 40007 Status monitor 3 PO 07 0 40008 Status monitor 4 P0 08 0 40009 Status monitor 5 This is the explanation of the operation SP116 is a bit in the PLC that turns ON when the communication is happening and itis called busy It indicates when the PLC is transmitting data through the 8 Luis Miranda AN SERV 010 communication in port 2 and turns OFF when the data transmission is completed Therefore in the first scan the instruc
36. e necessary digital input to o When the Home has been found the bit C5 is set When C5 is ON the timer T3 begins to count up to 3 seconds V2002 1 is turned ON for 200 ms to clear the current position when the timer T3 completes 3 seconds the bit C5 is reset the servo though MODBUS This is one way to implement it C100 has to be turned ON at the proper time Trigger bit C100 B2002 8 OUT Writing to the word for virtual digital inputs for P4 07 alarm reset bit c101 B2002 12 Lk our Writing to the word for virtual digital inputs for P4 07 Home search C102 B2002 13 lall o Writing to the word for virtual digital inputs for P4 07 JOG forward C201 B2002 14 kiir Writing to the word for virtual digital inputs for P4 07 JOG reverse C200 B2002 15 i L CUT ERTER At this time we can test again the program The data can be seen with Data View using the proper formatting See the adjacent figure to see Target revs how to check that the Alarm reset button C101 has been pressed Bit 12 turns ON When C100 turns ON the eighth bit of the word V2002 is turned ON This will give the command to move to the servo When C101 turns ON the bit 12 of the word V2002 is turned ON This will clear alarms on the the servo drive When C102 turns ON the bit 13 of the word V2002 is turned ON This will give the servo the command to move to search for the home sensor When C201 turns O
37. gital Output Terminal 2 DO2 P2 20 Digital Output Terminal 3 DO3 P2 21 Digital Output Terminal 4 DO4 P2 22 Digital Output Terminal 5 DO5 P2 23 Notch Filter Resonance Suppression P2 24 Notch Filter Attenuation Resonance Suppression P2 25 Low pass Filter Resonance Suppression P2 26 External Anti Interference Gain P2 27 Gain Boost Control P2 28 Gain Boost Switching Time P2 29 Gain Boost Switching Condition P2 30 Auxiliary Function P2 31 Auto and Easy Tuning Mode Response Level P2 32 Tuning Mode 07 10 AN SERV 010 ED 40 60 100 2174 120 35 100 5000 500 100 100 0 0 2 101 Servo enable 104 Clear command 124 Home sensor 0 0 22 Overtravel limit 23 Overtravel limit 21 External fault 102 Servo ON 109 Home completed 105 At position 107 Active fault 101 Servo ready 1000 0 47 Luis Miranda AN SERV 010 EEE P2 33 Reserved 0 P2 34 Overspeed Fault Threshold 5000 P2 35 Position Deviation Fault Window 30000 P2 36 Position 1 Velocity 2174 P2 37 Position 2 Velocity 1000 P2 38 Position 3 Velocity 1000 P2 39 Position 4 Velocity 1000 P2 40 Position 5 Velocity 1000 P2 41 Position 6 Velocity 1000 P2 42 Position 7 Velocity 1000 P2 43 Position 8 Velocity 1000 P2 44 Digital Output Mode P2 45 Index Mode Output Signal Delay Time P2 46 Index Mode Stations P2 47 Position Deviation Clear Delay T
38. ill turn OFF The shaft of the motor shall not be locked anymore The Home search shall begin automatically after the servo is enabled if there is no signal Home completed P2 19 shall be set as 109 We have not done this logic For now let us configure the command Home search 2 seconds after the servo is enabled One way to implement this it is as follows S Enable bit Servo disable C110 enables the servo g ctio P and turn ON the output OUT Y4 Ree coil PA L out Brake coil Home found looking Tar home When Y4 is turned ON Y4 C301 C4 and Home has not been Ui LF set found C4 turns ON looking for home TMR The timer T2 begins to T2 count the time up to 4 seconds when C4 is K40 turned ON looking for home Home search C4 TA2 K20 C102 OO re When C4 is ON AND the current value of the T2 nan timer is over 2 s C102 is S or home turned ON pst When The timer reaches 4 seconds C4 is reset as well as C102 Luis Miranda AN SERV 010 After the Home is completed there is no need to do home search again When the Home is completed we should clear the current counts And revolutions to get the O counts at this time and allow a proper indication of the current position This is shown on the following rungs of the next figure murrme IUUTIU C301 C5 S BET TMR CLEAR servo pos __ T3 La K30 TA3 K28 B2002 1 gt H our CLEAR servo pos VVe should transport th
39. ime 0 ms Stop bits Parity At this time we are only trying to connect the PLC with the servo Later we will connect the C more micro panel to the port 1of the DLO5 PLC For convenience we can use a HO ECOM to allow the connection of the panel to port 1 the servo to port 2 and the laptop with DirectSOFT to the HO ECOM module inserted on the slot available This is not a must only a convenience but for testing purposes this layout becomes very convenient Then we must connect the PLC with the servo drive Port 1 Port 2 HO ECOM 1st Ed 07 10 AN SERV 010 Read the status of the servo though MODBUS with RX instruction In order to be able to read the data from the servo drive and to check that connections are correct suggest to run the program shown in the following diagram Seta value 10 in the P2 08 parameter with the keyboard to configure all the values of the servo as default values It will appear errors ALE14 ALE15 and ALE13 on the display and this is normal The fault ALE14 in the servo display indicates that the overtravel limit switch is activated and this is true since of P2 15 default that corresponds to the DI6 input function it set as 22 P2 16 that corresponds to the DI7 input function is set as 23 and P2 17 that corresponds to the DI8 input function is set as 21 Same for ALE14 and ALE15 To make these errors disappear we may set P2 15 to P2 17 to a valu
40. ime P2 48 Backlash Compensation Index Mode P2 49 Jitter Suppression P2 50 Clear Position Mode P2 51 Servo Enable Command P2 52 Dwell Time 1 Auto Index Mode P2 53 Dwell Time 2 Auto Index Mode P2 54 Dwell Time 3 Auto Index Mode P2 55 Dwell Time 4 Auto Index Mode P2 56 Dwell Time 5 Auto Index Mode P2 57 Dwell Time 6 Auto Index Mode P2 58 Dwell Time 7 Auto Index Mode P2 59 Dwell Time 8 Auto Index Mode P2 60 Electronic Gear Numerator 2 P2 61 Electronic Gear Numerator 3 P2 62 Electronic Gear Numerator 4 P2 63 Velocity and Position Deviation Scaling Factor P2 64 Advanced Torque Limit Mixed Mode P2 65 Special Input Functions HEX 0 O OO O0 OC OC 0 0 0 0 oOo CX i DO O P3 00 Communication Address P3 01 Transmission Speed P3 02 Communication Protocol P3 03 Communication Fault Action OC N 48 Luis Miranda 1st Ed P3 04 Communication Watchdog Time Out P3 05 Communication Selection P3 06 Reserved P3 07 Communication Response Delay Time P3 08 Digital Input Software Control Mask P4 00 Fault Record Most recent N P4 01 Fault Record N 1 P4 02 Fault Record N 2 P4 03 Fault Record N 3 P4 04 Fault Record N 4 P4 05 JOG Function P4 06 Force Outputs Command P4 07 Input Status P4 08 Reserved P4 09 Output Status P4 22 Analog Velocity Input Offset P4 23 Analog Torque Input Offset 07 10
41. in segments and for that subroutines 5 tyo 8 are used in the same manner that the ones done for the calcutlaion of the current position scaling Remember that the value of target revolutions shall go to V2000 and the target counts into V2001 20 Luis Miranda AN SERV 010 Calculation of desired position in thousandth of inches into revolutions LDD C140 INCHES 19 V7366 MULD Constant 10 V3756 OUTD R Y6600 Limitation of high end range to 134 0 inches K4 K5 Ll GTS D c140 V6601 K134 C140 LDD 20 gt Ll K134000 OUTD INCHES S V7366 Limitation of low end range to 3 0 inches V6601 K3 C140 LDD 24 lt e K3000 OUTD INCHES V7366 V7367 2 l A p V7367 K4 V7367 K8 KG al FA lt Ll 6r ca V7367 Ka V7367 K12 K7 w O h S pe Et ors au V7367 K12 KB 15 L l gt ots C140 C120 27 SET C140 de LD IstEd 07 10 Luis Miranda 21 AN SERV 010 Now it is the time to do some operator panel programming C more micro programming We will describe here how to program the objects on the operator interface Recall that K to ed S t tti we want a screen 1 with the current position and 4 buttons to command the motion to any all alle cle to r EFFET of the 4 targets The second screen will have a i Z D the settings See the idea on the adjacent figure Open the C more micro program and create a new project by clicking on the button Start a project
42. le ZL SVC CBL50 Cable to link PLC to servo SVC 232RJ12 CBL 2 PLC DO 05DD Programming cable for panel and PLC EA MG PGM CBL Power supply PS24 075D Proximity sensor AM1 AN 1A Operator panel EA1 S6MLW Relay 782 2C 24D Socket 782 2C SKT Surge suppresor ASD BSDM 250 Fuses and wiring as well as an enclosure for mount the control system 4 Luis Miranda AN SERV 010 ee Definition of wiring diagram See below the initial wiring diagram DV 1000CBL SVC 232RJ12 CBL 2 Porti Port2 D0 05DD PLC eem Pe ov Orange Yellow aco TAG co x1 x3 f xa xe f c2 vi Y3 vs GOT xo x2 ci xs x7 f vo Y2 f va v 5 3 2 Relay aissesssesses Nani M QW EE Als S OO O O mil i P Es K H S Ic etfe 9 Es Power Supply a _ 4 VDC Li Lla R AC Power 5 g GNP Operator interface L2 ge ee o Li 9 Q S EA1 S6MLW ZIPLink Kit Cable connects ov to SureServo drive CN1 F1 F2 Fa Fa es ZIPLink Kit Cable connects connector to SureServo drive CN1 connector ZIPLink Kit Terminals Power cable to motor MONI VDD IT REF ES VCC DEC
43. luc BCD Revoluc BCD Pulses BCD V3761 K64 V3761 K127 V3760 K3062 1 5 Revoluc BCD V3761 K127 Revoluc BCD Pulses BCD Revoluc BCD V3761 K127 V3760 K3062 V3761 K190 K3 GTS Revoluc BCD Revoluc BCD Pulses BCD V3761 K128 V3761 K190 V3760 K9594 Revoluc BCD V3761 K190 Revoluc BCD Pulses BCD Revoluc BCD V3761 K190 V3760 K9594 V3761 K215 K4 gt GTS Revoluc BCD Revoluc BCD V3761 K191 V3761 K215 Calculation of desired position in thousandth of inches into revolutions LDD C140 INCHES V7366 MULD Constant 10 V3756 OUTD V6600 Limitation of high end range to 134 0 inches V6601 K134 C140 LDD K134000 OUTD INCHES V7366 Limitation of low end range to 3 0 inches V6601 K3 C140 LDD lt K3000 OUTD INCHES N V7366 C140 V7367 K4 KB GTS C140 V7367 K4 V7367 KB K6 ps GTS C140 V7367 K8 V7367 K12 K7 l lt lt GTS 1st Ed 07 10 Luis Miranda 37 AN SERV 010 IE C140 V7367 K12 K8 23 gt GTS C140 C120 24 SET 25 V7371 BIN OUT servo RPM R V2000 LD Result V7370 BIN OUT servo steps V2001 C120 TMR I T4 K4 T4 C120 27 RST This rung is true when the F1 button is pressed on screen 2 V7351 K1 V7350 K1 LDD 28 V4000 OUTD INCHES V7366 C140 l l OROUT This rung is true when the F2 button is pressed on screen 2 V7351 K2 V7350 K1 LDD 29 V4002 OUTD INCHES V
44. pies the value to V3772 LDD Load the constant 500 to the K500 accumulator OUTD The instruction OUTD reads V3766 what is in the accumulator and copies the value to LDD V3766 K157 Load the constant 157 to the OUTD accumulator V3776 The instruction OUTD reads what is in the accumulator LDD and copies the value to K10 V3776 Load the constant 10 to the OUTD accumulator 3756 The instruction OUTD reads LD what is in the accumulator KO and copies the value to V3756 OUT Load the constant 0 to the 3011 accumulator The instruction OUTD reads OUT what is in the accumulator oe and copies the value to co C3 V3011 sf RST CO and C2 are set to OFF The transactions statistics are in rungs that vvere explained on page 8 Test it again to be sure that the code is working as you want Notice that as an option to reduce the transactions per second figure we can eliminate parameters PO 00 to PO 03 on the reading instruction RX thus transferring less words and we will add one register for purposes to be seen later Now we have created a code that makes interlocks to allow the writing once when the value in P2 30 is a value of 5 that is the next instruction WX will be executed any given time if the value in P2 30 be 5 C3 is the flag that advices that the value in P2 30 is a 5 When C3 is ON we have permission to write to the servo over RAM memory IstEd 07 10 Luis Miranda 1 3 AN SERV 010 IE 1
45. rameters Define the values of PO 04 to PO 11 and the value of P3 08 Define the main parameters on the servo Factor of revolutions versus displacement for targets defined Current position math defined Some C more micro programming concepts defined Add the revolutions and counts of displacement and scale it to show the current displacement Read servo output data To be used the status data in P4 09 to create logic for the operation Digital inputs to be used for commanding the servo defined Reading the servo status from PLC Operator code to write the desired target positions and send to the PLC Additional code to make the operation automatic Code to use the output status on PLC and operator panel Test the program together with the servo and the operator panel Program the operator interface Test the program and correct any errors May be you need to tune the servo Prepare a copy of the ladder and the servo parameters in this document Prepare documentation to describe the operator what it is necessary to do to operate the machine May be leave as screen text data on the Operator panel IstEd 07 10 Luis Miranda 3 AN SERV 010 EET Definition of the control hardware The different hardware parts of the control system are Servo motor SVL 204B Servo drive SVA 2040 firmware 2 105 Power cable SVC PFL 020 Encoder cable SVC EFL 020 Terminal block board ZL RTB50 ZipLink cab
46. riting to the digital input word P4 07 Reset alarm Alarm reset DI c101 B2002 12 47 OUT Writing to the digital input word P4 07 Do home search Home search DI C102 B2002 13 48 OUT Writing to the digital input word P4 07 JOG Fwd DI C201 B2002 14 49 i OUT Writing to the digital input word P4 07 JOG rev DI C200 B2002 15 50 OUT Reading from P4 09 to the word V3012 for virtual digital outputs Servo ON DO B3012 0 C300 51 OUT Reading from P4 09 to the word V3012 for virtual digital outputs Home complet DO B3012 1 C301 52 OUT Reading from P4 09 to the word V3012 for virtual digital outputs Home complet DO At position DO B3012 2 C301 C302 53 OUT Reading from P4 09 to the word V3012 for virtual digital outputs Active fault DO B3012 3 C303 54 OUT Reading from P4 09 to the word V3012 for virtual digital outputs Servo ready DO B3012 4 C304 55 OUT 56 END 40 Luis Miranda AN SERV 010 eee SBR K1 _On BE Aux position 58 ja Ui V3700 MULD FACTOR El V3776 DIVD Constant 2500 M V3766 OUTD Current position R V7362 ie LDD Aux position V3700 Ko KO 59 OUTD Current position V7362 60 RT SBR K2 LDD _On SP1 Aux position 62 V3700 SUBD M K63653 MULD FACTOR g V3776 DIVD Constant 2500 g V3766 DDD P K40000 OUTD Current position V7362 63 i RT IstEd 07 10 Luis Mir
47. rvo See below the development of 2 subroutines The complete section is shown at the end of this document Subroutines 1 and 2 Note that We use the lower and upper words of 16 bits for the value of revolutions and counts and each one is converted to binary format with the instruction BIN The complete section is shown at the end of this document 1st Ed 07 10 Luis Miranda 19 AN SERV 010 IE On the same token it would be important to the operator to show the current position The servo will report the revolutions and the counts and this value will have to be scaled Factor of revolutions versus displacement As concept we will have target positions A B C and D to be defined by 4 entries on the operator panel By request of the mechanical department we will have to clamp the numbers in the range between 3inches to 134 inches Every time the operator select one target and enters the data the target value of revolutions on the servo will change accordingly We had defined that V2000 is the value of the target revolutions in P1 15 it is logical that we will have the V2001 values as the value of the target counts that is zero so far and V2002 will have the bits that go to P4 07 The PLC will have to do some math to relate the linear distance to revolutions and counts This is what we will explain now Since we know that one revolution of the servo shaft will displace 0 6284 inches we can crea
48. s example Button 4 Spare To be programmed to turn ON C333 as example Button 5 Servo disable IstEd 07 10 Luis Miranda 25 AN SERV 010 26 The C more micro panel 5 buttons has associated bits of a word that it is necessary to define We will go to the menu SETUP and then select PLC lt gt Panel The following dialog box will show up we will create a Start address in V7350 x Panel to PLC PLC to Panel Panel to PLC Start Address Word w EA PANEL WORD el he me Current Screen L Address V7350 V Enable muag Send Current Key Status EE A Address V7350 1 WORD ss Address V7350 42 WORD v Enable Description The Start Address stores the current panel screen number The Start Address 1 displays the value assigned to a panel function key F1 F5 and some of the function keys on the option bezel The Start Address 2 displays the value assigned to the numeric keys of the option bezel See the Key Assignment chart for associated key values Address Function Details Start Address Current Screen Number No 1 3E7 Hex or 1 999 BCD DEC Start Address 1W Current Key Number Address 1 lt a Key assigning is shown below Start Address 2VW Current Kye Number Address 2 Key Assignment Decimal Valuel 32768 16384 81921 4096 2048 1024 512 256 128 64 32 16 8 4 2 1 ess 1W w La P Ta ENT CR Merufescl rsr rs ro Ft Address 2w
49. short time after the servo is enable after rower On next actions you do not naed to execute the home search again ou can JOG the servo forward o You can clear the alarms that ight show ur etcretcss EH Ist Ed 07 10 29 Luis Miranda AN SERV 010 EET 30 28 29 30 Now is the time to check the connections between the PLC and the servo In order to turn the servo outputs ON we can use the parameter P4 06 P4 06 shall be set to 1 to force DO1 to ON When pressed the ENTER key the Display will show OP 01 and the XO LED of the PLC will turn ON In the same manner when set to 2 and then pressed the ENTER key the Display will show OP 02 and the X2 LED of the PLC will turn ON VA D DE 04 OB Now it is the time to turn the PLC outputs ON when ai D ev pad EX the proper input is turned ON and the effect will be seen on the servo by observing the display when set for OO C U the parameter P4 07 See the figure attached for having G UL UL LBI UL an idea of how each input that is active is seen Ta P t ti T Off On On l Off On Having this wiring test done we are at the moment to On On On On test the program as it has been set up Press F1 on the operator panel The output Y4 will turn ON The shaft of the motor shall be locked since now the servo is enabled and you will hear a typical sound of current flowing through the windings of the servomotor Press F5 on the operator panel The output Y4 w
50. still in the stage of creation of the program on the master PLC Also it is necessary to define how data is written to the servo drive We have said previously that we want to write values in the servo RX and WX should not execute at the same time otherwise the communication will fail A simple way we could do this would be the following ons C LD At the beginning the S La Kf202 closed contact SP116 and C1 allow the reading LD K18 with RX of 9 consecutive registers but imme LDA diately will turn ON C1 03000 with the SET instruction and waits for SP116 to RX be turned OFF TAQ C1 will close but SP116 C1 will be ON busy SET SP116 C1 Li When the reading LD Kf202 CRE transaction is completed LD K6 the writing begins with instruction WX it writes 3 registers LDA 02000 m TA13 C1 C1 is turned OFF with RST the Reset instruction The PLC vvould be reading and vvriting once at the time in sequence Nevertheless it is necessary to consider the follovving The servo drive has two types of memory RAM and EEPROM In RAM memory data can be written at any time but the memory EEPROM can be written a limited number of the order of 100000 times The parameters that do not change in time are written typically in EEPROM memory and with this memory it is not necessary to maintain the drive powered When powering the servo drive these values will be still stored in the memory
51. t can be downloaded to the panel for testing purposes by clicking on the button Send Project to Panel Set the panel to Setup mode You can also simulate the behavior of the panel on the PC by clicking the button Simulate panel This function provides the possibility to show what you will see on the panel For example you can click on the numeric entry object and the display will show a keypad that can be clicked to enter a number as you do on the panel ct Simulate Project Send Project to panel Object List x PoC RR EMT PUS UT LUN Object Library Shape a N Line Closotonale Screen List 2 Screen 2 3 Screen 3 El c more micro Ver2 0 0 0 Simulation DER Tag List Tag Name PLC Address Data Type Value CURRENT POSI V7632 BCD int32 103678 More instructions are found on the on line Help of the software We will create the functionality for the buttons on the operator panel We will have defined functions that are different on each screen On the screen 1 we will create the following arrangement Button 1 Go to target Button 2 Go to target B Button 3 Go to target C Button 4 Go to target D Button 5 It is spare We could also create an emergency stop here if desired by using a servo disable command On the screen 2 we will create the following arrangement Button 1 Servo enable Button 2 Alarm reset Button 3 Spare To be programmed to turn ON Y5 a
52. te the proper scale We know that the maximum displacement is 134 inches and the precision shall be close to 2 thousands of an inch That is 134 000 inches entered by the operator should be equivalent to 134 0 6284 or 213 2399 revolutions This is the math we have to implement on the PLC Notice that there are integer revolutions and fractions The revolution value should go to the parameter P1 15 The counts will go to the parameter P 16 The operator will only define the inches to be displaced from the Home position in thousand of an inch units Now recall that we have an operator interface that will write 4 numbers such as 34 250 56 789 89 1243 and 102 500 inches in the PLC in double memories V4000 to V4006 arbitrarily defined These values will be saved in the PLC and will be transferred to the target in the servo at the proper time The selected target value has to be scaled and separated into 2 numbers that are in binary format Or decimal as called in DirectSOFT software We have a small problem and it is that the PLC calculates only up to 9999 9999 in the accumulator We will have to split the calculation into sections using subroutines The value in thousandth of an inch shall be divided by 0 6284 which is the same as multiplying 10 000 6 284 or 2 500 1 571 The ladder code on next pages explains how to do this using the unique memory V7366 We will copy the selected target to V7366 in the code The calculation is done
53. tion RX is executed if the servo slave is ready to communicate See more details in the DLO5 manual Let us say that the PLC scan takes 2 ms when beginning the transmission the contact of bit SP116 closes and makes the rung true to allow the transmission to be executed When establishing the transmission SP116 turns ON when the transaction completes SP116 contact is closed again and then another transaction begins and thus it follows continuously Typically the transmission takes more than the PLC scan time In this case it is approximately 17 ms The values in the selected range go to the memories of the PLC V3000 to V3010 according to the following table Parameter Value MODBUS address PLC memory Description PO 00 2 105 40001 V3000 Software version PO 01 14 40002 V3001 Fault code PO 02 0 40003 V3002 Display code P0 03 1 40004 V3003 Analog monitor PO 04 1 40005 V3004 Status monitor 1 PO 05 0 40006 V3005 Status monitor 2 P0 06 0 40007 V3006 Status monitor 3 PO 07 0 40008 V3007 Status monitor 4 P0 08 0 40009 V3010 Status monitor 5 Also it is necessary to set some function in PO 04 until P0 08 parameters to be able to monitor what it is desired to see in the PLC and later in the operator panel We will change the values in the parameters according to the following table Parameter Value MODBUS address PLC memory Description PO 00 2 10 40001
54. ts or virtual inputs o perform a particular function P4 07 is a conduit for activating any of the 16 inputs DI1 to DI16 Turning any particular bit in P4 07 that correspond to each one of the digital inputs of the servo drive will signal each input to execute the pre programmed function Note that P4 07 takes on dual functionality It still serves as an indicator for the digital input status as seen in the servo drive display an may be used with MODBUS to write to the digital inputs that have been configured as virtual digital inputs If any of the eight less significant bits on P3 08 is a 1 digital inputs DIT until DI8 are used as virtual digital inputs with MODBUS we call them virtual digital inputs as opposed to real digital inputs We can imagine each bit of P3 08 as a permissive to use MODBUS for each one of the defined functions The 8 most significant bits have preassigned functions We will set each one of the P3 08 bits according to the following table 10 D11 112 PCS1 Bit de selection 1 de position predefined 11 DI12 113 PCS2 Bit de selection 2 de position predefined 12 DI13 102 Alarm reset predefined 13 DI14 127 Home search command predefined 14 DI15 137 JOG Forward predefined 15 DI16 138 JOG Reverse predefined pit pigi Code Description Assigned order input value 0 DIT 101 Servo Enable 1 1 DI2 104 Clear command 1 2 DI
55. turn into a cross symbol and then drag it by holding the left mouse button and form a rectangle with it When you finish the dragging the numeric display dialog box will show up and then you can fill up the data See it on the adjacent figure The main features are explained on next page 22 Luis Miranda AN SERV 010 Text Size Click on the down arrow to select the Text Size of the number to be displayed In this case we will select 32X32 Data Display Tag Click on the down arrow to select a Tag Name In this case we will select CURRENT POSITION Click on the button at the right with 3 dots and other dialog box will show up as in the adjacent figure Fill up according to the data on the figure Tag name Type shall be BCD 32 bit Number of Digits Click on the Up or Down arrows to select the number of Total and Fractional digits to be displayed set as TOTAL 6 amp FRACTIONAL 3 Suffix Click on the field to enter a Tag Name Add Tag Information common Suffix value that will always be Devis Nene DEVOOI displayed In this case we will select Tag Name CURRENT POSITION inches You can get familiar with the object properties PLC Address Other fields are not important at this time date w V v You can read more on the on line help Click on the button ADD to return to the Add Cose _ Hep main dialog box and then click OK Note that the object is displayed where you have made the rectangle Drag it to the
56. ur convenience or leave as they are We will be using the parameters PO 10 to PO 13 for other functions explained after this section In this example it is convenient to define PO 10 as P4 09 PO 11 as P1 15 PO 12 as P1 16 and PO 13 as 407 The rest can continue to be the default Or if necessary to configure to read or write other values v3004 Note that the values there are to be written only aU by the k d and this is not reported by the ee y Me Keypaca 13 1 P y current counts report that Sureservo PRO softvvare generates V3006 However when the values are written there and Current RPM the servo drive is power cycled the setting is 3007 retained in EEPROM memory torque nae v3010 The final setting is shown on the parameter DC bus voltage table at the end of the document 3011 The adjacent figure shows the content of 8 P0 03 P2 30 consecutive memories as seen with Data View in DirectSOFT This is one way to determine that we are really communicating with the servo C3 could also indicate this action but this reading of data is an assurance Luis Miranda AN SERV 010 ee Definition of P3 08 Let us define the value of parameter P3 08 the input mask The values of digital inputs are defined by the content in the P3 08 parameters and the P4 07 P3 08 is a parameter that allows us to control digital inputs with MODBUS After setting the input mask word P3 08 to define which bits in P4 07 will act as hardwired inpu
57. urrent DC bus voltage 21E Set as P2 30 409 Set as P3 08 10F Set as Pos cmd 1 revs 110 Set as Pos cmd 1 counts 407 Set as Input status 112 As default 225 As default 109 As default 0 s s 101 100 100 100 200 300 100 100 100 Luis Miranda 45 AN SERV 010 ET 46 P1 15 Position 1 Command Revolutions P1 16 Position 1 Command Counts P1 17 Position 2 Command Revolutions P1 18 Position 2 Command Counts P1 19 Position 3 Command Revolutions P1 20 Position 3 Command Counts P1 21 Position 4 Command Revolutions P1 22 Position 4 Command Counts P1 23 Position 5 Command Revolutions P1 24 Position 5 Command Counts P1 25 Position 6 Command Revolutions P1 26 Position 6 Command Counts P1 27 Position 7 Command Revolutions P1 28 Position 7 Command Counts P1 29 Position 8 Command Revolutions P1 30 Position 8 Command Counts P1 31 Motor Code P1 32 Motor Stop Mode Selection P1 33 Position Control Mode P1 34 Acceleration Time Internal Indexer P1 35 Deceleration Time Internal Indexer P1 36 Accel Decel S Curve P1 37 Inertia Mismatch Ratio P1 38 Zero Velocity Output Threshold P1 39 Target Velocity Output Threshold P1 40 Max Analog Velocity Cmd or Velocity Limit P1 41 Max Analog Torque Cmd or Torque Limit P1 42 On Delay Time of Electromagnetic Brake P1 43 Off Delay Time of Electromagnetic Brake
Download Pdf Manuals
Related Search
Related Contents
Manual de usuario acond. Mundoclima Series HF 1 - 発電設備技術検査協会 eHealthbox Clinician Web user manual Snapper 1691816 Lawn Mower User Manual Dimensions Specifications Copyright © All rights reserved.
Failed to retrieve file