for major section headings use heading 1 e · web viewcontents 1 servo 2 1.1 what do a, v and d...

49
THINGS YOU WANTED TO KNOW ABOUT LOADENC AND SCALE BUT COULDN’T ASK CONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted encoder: 2 1.1.2 Basic move with LOAD mounted encoder: 4 1.1.3 SCALEd move with motor mounted encoder: 5 1.1.4 SCALEd move with LOAD mounted encoder: 6 1.2 Is there an easy demonstration of how to set up a scaled system? 7 1.3 Is there an easy demonstration of how to set up a scaled load mounted system? 8 2 STEPPER 9 2.1 What do A, V and D refer to when working with SCALE, LOADENC, STALL and POSMAIN? 9 2.1.1 Basic move: 10 2.1.2 Basic move with LOAD mounted encoder: 11 2.1.3 Basic move with motor mounted STALL: 12 2.1.4 Basic move with LOAD mounted STALL: 14 2.1.5 Basic move with motor mounted POSMAIN: 16 2.1.6 Basic move with LOAD mounted POSMAIN: 17 2.1.7 Basic move with motor mounted POSMAIN and STALL: 19 2.1.8 Basic move with LOAD mounted POSMAIN and STALL: 21 2.1.9 SCALEd move: 23 2.1.10 SCALEd move with LOAD mounted encoder: 25 2.1.11 SCALEd move with motor mounted STALL: 26 2.1.12 SCALEd move with LOAD mounted STALL: 28 2.1.13 SCALEd move with motor mounted POSMAIN: 30 2.1.14 SCALEd move with LOAD mounted POSMAIN: 32 2.1.15 SCALEd move with motor mounted POSMAIN and STALL: 34 2.1.16 SCALEd move with LOAD mounted POSMAIN and STALL: 36 2.2 Is there an easy demonstration of how to set up a scaled system? 38 2.3 Is there an easy demonstration of how to set up a scaled encoder system? 39 document.doc Page 1 of 49 Last edit 14/04/2022

Upload: others

Post on 25-Mar-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

THINGS YOU WANTED TO KNOW ABOUT LOADENC AND SCALE BUT COULDN’T ASK

CONTENTS

1 SERVO 2

1.1 What do A, V and D refer to when working with SCALE and LOADENC? 21.1.1 Basic move with motor mounted encoder: 21.1.2 Basic move with LOAD mounted encoder: 41.1.3 SCALEd move with motor mounted encoder: 51.1.4 SCALEd move with LOAD mounted encoder: 6

1.2 Is there an easy demonstration of how to set up a scaled system? 7

1.3 Is there an easy demonstration of how to set up a scaled load mounted system? 8

2 STEPPER 9

2.1 What do A, V and D refer to when working with SCALE, LOADENC, STALL and POSMAIN? 9

2.1.1 Basic move: 102.1.2 Basic move with LOAD mounted encoder: 112.1.3 Basic move with motor mounted STALL: 122.1.4 Basic move with LOAD mounted STALL: 142.1.5 Basic move with motor mounted POSMAIN: 162.1.6 Basic move with LOAD mounted POSMAIN: 172.1.7 Basic move with motor mounted POSMAIN and STALL: 192.1.8 Basic move with LOAD mounted POSMAIN and STALL: 212.1.9 SCALEd move: 232.1.10 SCALEd move with LOAD mounted encoder: 252.1.11 SCALEd move with motor mounted STALL: 262.1.12 SCALEd move with LOAD mounted STALL: 282.1.13 SCALEd move with motor mounted POSMAIN: 302.1.14 SCALEd move with LOAD mounted POSMAIN: 322.1.15 SCALEd move with motor mounted POSMAIN and STALL: 342.1.16 SCALEd move with LOAD mounted POSMAIN and STALL: 36

2.2 Is there an easy demonstration of how to set up a scaled system? 38

2.3 Is there an easy demonstration of how to set up a scaled encoder system? 39

document.doc Page 1 of 39 Last edit 18/05/2023

Page 2: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

1 SERVO

1.1 What do A, V and D refer to when working with SCALE and LOADENC?

There are three possible resolutions available depending on which of the above commands are enabled. The best way to explain this is to define a system with all three resolutions, and show the effect of enabling and disabling each command.

SYSTEM:A servo motor is attached to a linear table as depicted below. The PIVF loop is tuned correctly, and a small integral component ensures the drive will position itself accurately.

Fig 1 Motor mounted on linear table with load mounted feedbackIn summary. 0 = disabled, 1 = enabled

SCALE LOADENC Steps0 0 MOTOR0 1 USER1 0 LOAD1 1 USER

Here’s some worked examples for each combination.

1.1.1 Basic move with motor mounted encoder:If we configure the drive using the motor command1MOTOR(type,current,4000,12000,Tt,Rm,Lm)1MI

The drive is configured to use the motor mounted encoder as the only feedback device. Hence, if we run the following programme.

Move profile:

1D40001V11A101ON1W(PT,0)1W(PA,0)

document.doc Page 2 of 39 Last edit 18/05/2023

Motor mountedEncoder4000 stepsper rev

Load mounted encoder (10um)

1m

40 motor revs gives full table travel

ViX

Page 3: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

1W(PE,0)1G

The motor will move: 4000 motor steps = 1revThe table will move: 1rev * (1./40) = 0.025m.The motor velocity will be 1rpsThe table velocity will be 1rps / 40 = 0.025ms-1

The motor accel will be: 10rps2

The table accel will be: 10rps2 / 40 = 0.25ms-2

The motor will rotate one complete revolution, which is 1/40 of full table travel = 0.025m of travel on the linear table.The motor velocity profile will be

We can check our target position, absolute position and position error by the following commands.

1R(PT)*40001R(PA)*40001R(PE)*0

So we can see that distance is defined and reported in MOTOR STEPS

document.doc Page 3 of 39 Last edit 18/05/2023

Velocity

Time

0 0.2 0.4 0.6 0.8 1.0

0.2

0

0.4

0.6

0.8

1.0

Page 4: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

1.1.2 Basic move with LOAD mounted encoder:When using a load mounted encoder, distances are in load mounted encoder steps, but velocity and acceleration is still in rps and rps2. Because the load mounted encoder has a different step resolution to the motor mounted encoder, we must let the drive know how many load mounted steps there are per motor revolution. This number MUST be an integer. It obviously takes into account any gearing in the system.

1OFF1SCALE0

The number of load mounted steps per motor revolution is defined by the variable EM. In our scenario, there are 1/10u = 100000 load mounted steps for full travel. We have a 40:1 ratio, hence we have 100000/40 = 2500 load mounted steps per motor revolution.

1W(EM,2500)1LOADENC1

Move profile:

1D50001V21A201ON1W(PT,0)1W(PA,0)1W(PE,0)1G

The motor will move: 5000 load steps = 5000*(160000/100000) motor steps = 8000 motor steps = 2revsThe table will move: 5000 load steps * 10u = 0.05m.The motor velocity will be 2rpsThe table velocity will be 2rps / 40 = 0.05ms-1

The motor accel will be: 20rps2

The table accel will be: 20rps2 / 40 = 0.5ms-2

This isn’t a hugely intuitive method to set A,D and V, so in this situation, scaling is very useful.

We can check our target position, absolute position and position error by the following commands.

1R(PT)*40001R(PA)*40001R(PE)*0

So we can see that distance is defined and reported in LOAD STEPS

document.doc Page 4 of 39 Last edit 18/05/2023

Page 5: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

1.1.3 SCALEd move with motor mounted encoder:We now wish to still use only the motor mounted feedback, but we would like to scale the motion into user units, so that we can specify A in mms-2, V in mms-1 and D in mm with regard to distance travelled on the linear table.

To perform this, we must first de-energise the drive.

1OFF

We must specify the components of the SCALE command SCLA, SCLD, SCLV and PEU

PEU is defined as the positional encoder steps per unit. The positional feedback is the motor mounted encoder. If we define a unit to be one complete travel of the linear table ie 1m, then as we have a 40 motor revolutions for full travel, there are 40 * 4000 = 160000 encoder counts for a defined unit of 1m, hence PEU = 160000.If one unit is 1m, and we wish to define A,V and D in mm, then we require 1000th of a unit, hence SCLA, SCLD and SCLV = 1000.

1SCALE1(1000,1000,1000,160000)

Move profile:

1D1001V21A101ON1W(PT,0)1W(PA,0)1W(PE,0)1G

The motor will move: 100 * (160000 / 1000) steps = 16000 steps = 4revsThe table will move: 4revs / 40 = 100mm.The motor velocity will be (160000/4000)*(2/1000) = 0.08rpsThe table velocity will be 0.08rps / 40 = 2mms-1

The motor accel will be: (160000/4000)*(10/1000) = 0.4rps2

The table accel will be: 0.4rps2 / 40 = 10mms-2

So we successfully programmed the drive in user units of mm, mms-1 and mms-2. A, D and V do not have to be in the same units, any combination of any unit is permissible. The only condition is that PEU / SCLD is and integer, else a D of 1 would demand a fractional number of encoder steps, which we cannot resolve down to.

We can check our target position, absolute position and position error by the following commands.

1R(PT)*1001R(PA)*1001R(PE)*0

So we can see that distance is defined and reported in USER STEPS

document.doc Page 5 of 39 Last edit 18/05/2023

Page 6: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

1.1.4 SCALEd move with LOAD mounted encoder:The use of scaling with the load mounted encoder means that we can net all A, D and V in terms of table accel, speed and distance, but with the added advantage of compensating for backlash and slippage in the gearing.

REMEMBER: that with LOADENC enabled, feedback is in load mounted steps, hence PEU will change from example 1.1.1.

1OFF

We must specify the components of the SCALE command SCLA, SCLD, SCLV and PEU

PEU is defined as the positional encoder steps per unit. The positional feedback is now the LOAD mounted encoder. If once again we define a unit to be one complete travel of the linear table ie 1m, then as we have a 10um load mounted encoder giving 1/10u = 100000 steps for full travel, we must set PEU = 160000.If one unit is 1m, and we wish to define A,V and D in mm, then we require 1000th of a unit, hence SCLA, SCLD and SCLV = 1000. So by adding the load mounted encoder, but setting one unit to the same distance, we have no need to change SCLA, SCLD and SCLV. Therefore, as in example 1.1.1.

1SCALE1(1000,1000,1000,100000)

Move profile:

1D1001V21A101ON1W(PT,0)1W(PA,0)1W(PE,0)1G

The motor will move: 100 * (100000 / 1000) * (160000/100000) motor steps = 16000 steps = 4revsThe table will move: 100 * (100000/1000) load steps = 10000 load steps = 100mm.The motor velocity will be 2 * (100000 / 1000) * (160000/100000) motor steps per sec = 320 motor steps per sec = 0.08rpsThe table velocity will be 2 * (100000/1000) load steps per sec = 200 load steps per sec = 2mms-1

The motor accel will be: 10 * (100000 / 1000) * (160000/100000) motor steps per sec2 = 1600 motor steps per sec2 = 0.4rps2

The table accel will be: 10 * (100000/1000) load steps per sec2 = 1000 load steps per sec2 = 10mms-2

We can check our target position, absolute position and position error by the following commands.

1R(PT)*1001R(PA)*1001R(PE)*0

So we can see that distance is defined and reported in USER STEPS

document.doc Page 6 of 39 Last edit 18/05/2023

Page 7: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

1.2 Is there an easy demonstration of how to set up a scaled system?Yes there is, and here it is.This example scales the motor motion so that a D of 1 will move the motor 1/100th of a user defined distance.In this example, it is assumed that you have tuned the servo motor correctly when not connected to any system. A small amount of integral is needed to ensure the motor is in position. Ensure motor in mode incremental.Nomenclature 1SCALEon/off(SCLA,SCLD,SCLV,Leu)

10 easy steps:

1. Connect motor to load if scaling is to be set by load movement (only needed if some form of gearing used).

2. Choose two points that represent the start and end of a unit. This may be the +ve and –ve limits on a linear table, or 100mm of travel, or one rotation of a load.

3. Energise the drive 1ON, and ensure the motor moves the load freely. While energised, move motor so that the load is in the most –ve of the two points defined in step 2.

4. Type 1R(PE) until *0 is returned, then type 1W(PA,0) to reset the internal counter.5. Move the motor in a +ve direction to the +ve point defined in step 2.6. Type 1R(PE) until *0 is returned, then type 1R(PA) and record the absolute value as Leu.7. Move the motor so that the load is roughly half way between the +ve position and the -ve position.8. De-energise the motor 1OFF9. At the command prompt, type the following to enable scaling. This splits the distance dictated by

Leu into 100 steps. For this example, Leu needs to be rounded to the nearest 100, else we could end up demanding the motor to move a fraction of a step. 1SCALE1(100,100,100,Leu)

10. At the command prompt, type the following to run the drive. Note that this will move the load 10/100ths of the distance between initial and final positions at a velocity of 2/100ths of Leu per sec and an acceleration of 5/100ths of Leu per sec2. 1D10 1V2 1A5 1ON 1G

Note:- You can now change the first 3 variables of SCALE even when energised if you require a different scaling value.Remember that the motor will move D*(Leu/SCLD) motor steps for a D of 1, so SCLD is setting how many moves are required to move one complete unit Leu. Thus (Leu/SCLD) MUST be an integer.Remember that the motor will move V/SCLV units per second, so a SCLV of 1 and a V of 1 would give a speed of 1 unit per second (Leu steps per second).Remember SCLA scaling acts on A the same as SCLV acts on V.

document.doc Page 7 of 39 Last edit 18/05/2023

Page 8: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

1.3 Is there an easy demonstration of how to set up a scaled load mounted system?Yes there is, and here it is.This example scales the motor motion so that a D of 1 will move the motor 1/100th of a user defined distance.In this example, it is assumed that you have tuned the servo motor correctly when not connected to any system. A small amount of integral is needed to ensure the motor is in position. Ensure motor in mode incremental.Nomenclature 1SCALEon/off(SCLA,SCLD,SCLV,Leu)

1LOADENCon/off1W(EM,em)

13 easy steps:1. Connect motor to load, and attach load mounted encoder.2. Choose two points that represent the start and end of a unit. This may be the +ve and –ve limits on a

linear table, or 100mm of travel, or one rotation of a load.3. Energise the drive 1ON, and ensure the motor moves the load freely. While energised, move motor

so that the load is in the most –ve of the two points defined in step 2.4. Type 1R(PE) until *0 is returned, then type 1W(PM,0) to reset the internal counter.5. Move the motor in a +ve direction one complete revolution (pole on a linear motor). ie, if

Resolution in MOTOR command is 8000, then use 1D8000.6. Type 1R(PE) until *0 is returned, then type 1R(PM) and record the value as em = PM.7. Move the motor to the +ve point defined in step 2.8. Type 1R(PE) until *0 is returned, then type 1R(PM) and record the absolute value as Leu.9. Move the motor so that the load is roughly half way between the +ve position and the –ve position.10. De-energise the motor 1OFF11. At the command prompt, type the following to enable LOADENC and SCALING counters, and set

the load mounted encoder. This splits the distance dictated by Leu into 100 steps. For this example, Leu needs to be rounded to the nearest 100, else we could end up demanding the motor to move a fraction of a step. 1LOADENC1 1W(EM,em) 1SCALE1(100,100,100,Leu)

12. Increase the first four gain values by approximately (Resolution /em). If this is a large scaling factor, then it may be advisable to only scale by half to begin with 1GAINS(GF,GI,GP,GV,FT).

13. At the command prompt, type the following to run the drive. Note that this will move the load 10/100ths of the distance between initial and final positions at a velocity of 2/100ths per sec and an acceleration of 5/100ths per sec2. 1D10 1V2 1A5 1ON 1G

Note:- You can now change the first 3 variables of SCALE even when energised if you require a different scaling value.Remember that the motor will move D*(Leu/SCLD) load steps for a D of 1, so SCLD is setting how many moves are required to move one complete unit Leu. Thus (Leu/SCLD) MUST be an integer.Remember that the motor will move V/SCLV units per second, so a SCLV of 1 and a V of 1 would give a speed of 1 unit per second (Leu steps per second).Remember SCLA scaling acts on A the same as SCLV acts on V.

document.doc Page 8 of 39 Last edit 18/05/2023

Page 9: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2 STEPPER

2.1 What do A, V and D refer to when working with SCALE, LOADENC, STALL and POSMAIN?There are three possible resolutions available depending on which of the above commands are enabled. The best way to explain this is to define a system with all three resolutions, and show the effect of enabling and disabling each command.

SYSTEM:A stepper motor is attached to a linear table as depicted below. The drive is in mode incremental.

Fig 1 Motor mounted on linear table with load mounted feedbackIn summary. 0 = disabled, 1 = enabledThe Steps and Feedback is unaffected by STALL and POSMAINAn X in Feedback and Steps means that you would never use this combination. See worked example for more details.

SCALE LOADENC STALL POSMAIN FeedbackSource

Steps

0 0 0 0 MOTOR MOTOR0 0 0 1 MOTOR MOTOR0 0 1 0 MOTOR MOTOR0 0 1 1 MOTOR MOTOR0 1 0 0 X X0 1 0 1 LOAD LOAD0 1 1 0 X X0 1 1 1 LOAD LOAD1 0 0 0 MOTOR USER1 0 0 1 MOTOR USER1 0 1 0 MOTOR USER1 0 1 1 MOTOR USER1 1 0 0 X X1 1 0 1 LOAD USER1 1 1 0 X X1 1 1 1 LOAD USER

Here are some worked examples for each combination.

document.doc Page 9 of 39 Last edit 18/05/2023

Motor mountedEncoder4000 countsper rev

Load mounted encoder (10um)

1m

40 motor revs gives full table travel

ViX

Page 10: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.1.1 Basic move:If we initialise the drive as follows

1OFF1MOTOR(type,current,51200,3000,%thirdharmonic,Resistance,Inductance)1SCALE01LOADENC01STALL01POSMAIN0

The drive is configured to run open loop. Hence, if we set-up the following move profile.

1D512001V11A101ON

And clear the position counters

1W(PA,0)

And finally tell the drive to move

1G

The motor will move: 51200 motor steps = 1revThe table will move: 1rev * (1/40) = 0.025m.The motor velocity will be 1rpsThe table velocity will be 1rps / 40 = 0.025ms-1

The motor accel will be: 10rps2

The table accel will be: 10rps2 / 40 = 0.25ms-2

The motor velocity profile will be

We can check our target position, absolute position and position error by the following commands.

1R(PT)*512001R(PA)*01R(PE)*-51200

So we can see that distance is defined and reported in MOTOR STEPS

document.doc Page 10 of 39 Last edit 18/05/2023

Velocity

Time

0 0.2 0.4 0.6 0.8 1.0

0.2

0

0.4

0.6

0.8

1.0

Page 11: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.1.2 Basic move with LOAD mounted encoder:There is never any need to run the stepper with purely a load mounted encoder enabled and no position maintenance. This is because we can set the motor resolution to be any value from 1 to 51200, so by setting the resolution to the correct value, we can achieve the desired step resolution on the load. An encoder would do nothing for us.

document.doc Page 11 of 39 Last edit 18/05/2023

Page 12: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.1.3 Basic move with motor mounted STALL:When using just a motor mounted stall encoder, distances are in motor steps. The resolution of the stall encoder has to be entered, but otherwise, is as example 2.1.1.

If we initialise the drive as follows

1OFF1MOTOR(type,current,51200,3000,%thirdharmonic,Resistance,Inductance)1SCALE01LOADENC01STALL01POSMAIN0

The resolution of the stall encoder is placed in variable EM. EM is defined as the number of encoder counts per motor revolution. Therefore, in this case, we have a 4000 count encoder attached to the back of the motor.

1W(EM,4000)

As mentioned above, all distances are entered in motor steps, so the stall window is also entered in motor steps. If we require a stall window of half a rev, then we enter

1STALL1(25600,0,0)

Note:- As the stall encoder is scaled up to the motor resolution internally, then it is obviously quantised according to the EM resolution, hence, if we had an inexpensive 8 step encoder, we would have a quantisation of 51200/8 = 6400 steps. Setting a stall window of 28800, would be no different therefore to 25600. Also, it would be pointless to set a window below 6400, as the motor would stall instantly.

Move profile:

1D512001V11A101ON

And clear the position counters

1W(PA,0)

And finally tell the drive to move

1G

The motor will move: 51200 motor steps = 1revThe table will move: 1rev * (1./40) = 0.025m.The motor velocity will be 1rpsThe table velocity will be 1rps / 40 = 0.025ms-1

The motor accel will be: 10rps2

The table accel will be: 10rps2 / 40 = 0.25ms-2

We can check our target position, absolute position and position error by the following commands.

1R(PT)*512001R(PA)*512001R(PE)

document.doc Page 12 of 39 Last edit 18/05/2023

Page 13: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

*0

So we can see that distance is defined and reported in MOTOR STEPS

If we performed another move, but stopped the motor from moving, then the drive would perform a controlled stop with a position error of approximately -25600 steps.

document.doc Page 13 of 39 Last edit 18/05/2023

Page 14: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.1.4 Basic move with LOAD mounted STALL:When using a load mounted stall encoder, there is no need to use the LOADENC command, which would configure the drive to work with load steps, instead, we configure as in the previous example 2.1.3. Obviously in this example though, the stall encoder resolution will be different.

If we initialise the drive as follows

1OFF1MOTOR(type,current,51200,3000,%thirdharmonic,Resistance,Inductance)1SCALE01LOADENC01STALL01POSMAIN0

The resolution of the stall encoder is placed in EM. EM is defined as the number of encoder counts per motor revolution. Therefore, in this case, we have a 10um encoder giving 100000 counts for full travel of the table. The motor rotates 40 times for full travel, so the load resolution is 100000/40 = 2500 steps per rev. 1W(EM,2500)

As mentioned above, all distances are entered in motor steps, so the stall window is also entered in motor steps. If we require a stall window of half a rev, then we enter

1STALL1(25600,0,0)

Note:- As the stall encoder is scaled up to the motor resolution internally, then it is obviously quantised according to the EM resolution, hence, if we had an inexpensive 8 step encoder, we would have a quantisation of 51200/8 = 6400 steps. Setting a stall window of 28800, would be no different therefore to 25600. Also, it would be pointless to set a window below 6400, as the motor would stall instantly.

Move profile:

1D512001V11A101ON

And clear the position counters

1W(PA,0)

And finally tell the drive to move

1G

The motor will move: 51200 motor steps = 1revsThe table will move: 1rev * (1/40) = 0.025m.The motor velocity will be 1rpsThe table velocity will be 1rps / 40 = 0.025ms-1

The motor accel will be: 10rps2

The table accel will be: 10rps2 / 40 = 0.25ms-2

We can check our target position, absolute position and position error by the following commands.

1R(PT)*512001R(PA)*51200

document.doc Page 14 of 39 Last edit 18/05/2023

Page 15: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

1R(PE)*0

So we can see that distance is defined and reported in MOTOR STEPS

If we performed another move, but stopped the motor from moving, then the drive would perform a controlled stop with a position error of approximately -25600 steps.

document.doc Page 15 of 39 Last edit 18/05/2023

Page 16: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.1.5 Basic move with motor mounted POSMAIN:When using a motor mounted encoder, distances are in motor steps. You must change the motor resolution to match that of the motor mounted encoder. In our example, that is 4000 steps per rev. Hence we must re-issue the motor command.

If we initialise the drive as follows

1OFF1MOTOR(type,current,4000,3000,%thirdharmonic,Resistance,Inductance)1SCALE01LOADENC01STALL01POSMAIN0

Position maintenance now works as to be expected in motor steps. If we define an error window of 10 motor steps, and attempt a correction every 100ms, then we have

1POSMAIN1(10,0,100)

Move profile:

1D40001V11A101ON

And clear the position counters

1W(PA,0)

And finally tell the drive to move

1G

If you back drive the motor further than 10 motor steps, then the position maintenance will correct the position every 100ms

The motor will move: 4000 motor steps = 1revThe table will move: 1rev * (1/40) = 0.025m.The motor velocity will be 1rpsThe table velocity will be 1rps / 40 = 0.025ms-1

The motor accel will be: 10rps2

The table accel will be: 10rps2 / 40 = 0.25ms-2

We can check our target position, absolute position and position error by the following commands.

1R(PT)*40001R(PA)*40001R(PE)*0

So we can see that distance is defined and reported in MOTOR STEPS

document.doc Page 16 of 39 Last edit 18/05/2023

Page 17: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.1.6 Basic move with LOAD mounted POSMAIN:When using a load mounted encoder, distances are in load mounted encoder steps, but velocity and acceleration are still in rps and rps2. Because the load mounted encoder has a different step resolution to the motor, we must let the drive know how many load mounted steps there are per motor revolution. This number MUST be an integer. It obviously takes into account any gearing in the system.

Note:- Because the step resolution of the motor can be arbitrarily set, it is advisable to choose a motor resolution such that there is a sensible scaling factor between motor resolution and load mounted encoder steps.

If we initialise the drive as follows

1OFF1SCALE01LOADENC01STALL01POSMAIN0

The number of load mounted steps per motor revolution is defined by the variable EM. In our scenario, there are 1/10u = 100000 load mounted steps for full travel. We have a 40:1 ratio, hence we have 100000/40 = 2500 load mounted steps per motor revolution. It would therefore make sense to set the motor resolution to 50,000.

1MOTOR(type,current,50000,3000,%thirdharmonic,Resistance,Inductance)

We set the number of encoder steps per motor rev

1W(EM,2500)

Position maintenance now works as to be expected in load steps. If we define an error window of 10 load steps, and attempt a correction every 100ms, then we have

1POSMAIN1(10,0,100)

And enable LOADENC

1LOADENC1

Move profile:

1D50001V21A201ON

And clear the position counters

1W(PA,0)

And finally tell the drive to move

1G

The motor will move: 5000 load steps = 5000*(2000000/100000) motor steps = 100000 motor steps = 2revsThe table will move: 2revs * (1/40) = 0.05m = 0.5/10u load steps = 5000 load steps.The motor velocity will be 2rpsThe table velocity will be 2rps / 40 = 0.05ms-1

The motor accel will be: 20rps2

document.doc Page 17 of 39 Last edit 18/05/2023

Page 18: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

The table accel will be: 20rps2 / 40 = 0.5ms-2

This isn’t a hugely intuitive method to set A,D and V, so in this situation, scaling would be very useful.

We can check our target position, absolute position and position error by the following commands.

1R(PT)*50001R(PA)*50001R(PE)*0

So we can see that distance is defined and reported in LOAD STEPS

document.doc Page 18 of 39 Last edit 18/05/2023

Page 19: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.1.7 Basic move with motor mounted POSMAIN and STALL:When using a motor mounted encoder, distances are in motor steps. You must change the motor resolution to match that of the motor mounted encoder. In our example, that is 4000 steps per rev. Hence we must re-issue the motor command.

If we initialise the drive as follows

1OFF1MOTOR(type,current,4000,3000,%thirdharmonic,Resistance,Inductance)1SCALE01LOADENC01STALL01POSMAIN0

Position maintenance now works as to be expected in motor steps. If we define an error window of 10 motor steps, and attempt a correction every 100ms, then we have

1POSMAIN1(10,0,100)

The resolution of the stall encoder is placed in EM. EM is defined as the number of encoder counts per motor revolution. Therefore, in this case, we have a 4000 count motor mounted encoder. 1W(EM,4000)

As mentioned above, all distances are entered in motor steps, so the stall window is also entered in motor steps. If we require a stall window of half a rev, then we enter

1STALL1(2000,0,0)

Move profile:

1D40001V11A101ON

And clear the position counters

1W(PA,0)

And finally tell the drive to move

1G

If you back drive the motor further than 10 motor steps, then the position maintenance will correct the position every 100ms

The motor will move: 4000 motor steps = 1revThe table will move: 1rev * (1/40) = 0.025m.The motor velocity will be 1rpsThe table velocity will be 1rps / 40 = 0.025ms-1

The motor accel will be: 10rps2

The table accel will be: 10rps2 / 40 = 0.25ms-2

We can check our target position, absolute position and position error by the following commands.

1R(PT)*4000

document.doc Page 19 of 39 Last edit 18/05/2023

Page 20: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

1R(PA)*40001R(PE)*0

So we can see that distance is defined and reported in MOTOR STEPS

If we performed another move, but stopped the motor from moving, then the drive would perform a controlled stop with a position error of approximately -2000 steps.

document.doc Page 20 of 39 Last edit 18/05/2023

Page 21: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.1.8 Basic move with LOAD mounted POSMAIN and STALL:When using a load mounted encoder, distances are in load mounted encoder steps, but velocity and acceleration are still in rps and rps2. Because the load mounted encoder has a different step resolution to the motor, we must let the drive know how many load mounted steps there are per motor revolution. This number MUST be an integer. It obviously takes into account any gearing in the system.

Note:- Because the step resolution of the motor can be arbitrarily set, it is advisable to choose a motor resolution such that there is a sensible scaling factor between motor resolution and load mounted encoder steps.

If we initialise the drive as follows

1OFF1SCALE01LOADENC01STALL01POSMAIN0

The number of load mounted steps per motor revolution is defined by the variable EM. In our scenario, there are 1/10u = 100000 load mounted steps for full travel. We have a 40:1 ratio, hence we have 100000/40 = 2500 load mounted steps per motor revolution. It would therefore make sense to set the motor resolution to 50,000.

1MOTOR(type,current,50000,3000,%thirdharmonic,Resistance,Inductance)

We set the number of encoder steps per motor rev

1W(EM,2500)

And enable LOADENC

1LOADENC1

Position maintenance now works as to be expected in load steps. If we define an error window of 10 load steps, and attempt a correction every 100ms, then we have

1POSMAIN1(10,0,100)

As mentioned above, all distances are entered in load steps, so the stall window is also entered in load steps. If we require a stall window of half a rev, then we enter

1STALL1(1250,0,0)

Move profile:

1D50001V21A201ON1ON

And clear the position counters

1W(PA,0)

And finally tell the drive to move

1G

document.doc Page 21 of 39 Last edit 18/05/2023

Page 22: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

If you back drive the motor further than 10 load steps, then the position maintenance will correct the position every 100ms

The motor will move: 5000 load steps = 5000*(2000000/100000) motor steps = 100000 motor steps = 2revsThe table will move: 2 revs * (1/40) = 0.05m = 0.5/10u load steps = 5000 load stepsThe motor velocity will be 2rpsThe table velocity will be 2rps / 40 = 0.05ms-1

The motor accel will be: 20rps2

The table accel will be: 20rps2 / 40 = 0.5ms-2

This isn’t a hugely intuitive method to set A,D and V, so in this situation, scaling would be very useful.

We can check our target position, absolute position and position error by the following commands.

1R(PT)*50001R(PA)*50001R(PE)*0

So we can see that distance is defined and reported in LOAD STEPS

If we performed another move, but stopped the motor from moving, then the drive would perform a controlled stop with a position error of approximately -1250 steps.

document.doc Page 22 of 39 Last edit 18/05/2023

Page 23: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.1.9 SCALEd move:We now wish to run open loop, but we would like to scale the motion into user units, so that we can specify A in mms-2, V in mms-1 and D in mm with regard to distance travelled on the linear table.

If we initialise the drive as follows

1OFF1MOTOR(type,current,51200,3000,%thirdharmonic,Resistance,Inductance)1SCALE01LOADENC01STALL01POSMAIN0

The drive is configured to run open loop.

We must now specify the components of the SCALE command SCLA, SCLD, SCLV and PEU

PEU is defined as the positional encoder steps per unit. As the drive is running open loop, the number of steps are determined by the Resolution which is 51200. If we define a unit to be one complete travel of the linear table ie 1m, then as we have 40 motor revolutions for full travel, there are 40 * 51200 = 2048000 steps for a defined unit of 1m, hence PEU = 2048000.If one unit is 1m, and we wish to define A,V and D in mm, then we require 1000th of a unit, hence SCLA, SCLD and SCLV = 1000.

1SCALE1(1000,1000,1000,2048000)

Move profile:

1D1001V251A1001ON

And clear the position counters

1W(PA,0)

And finally tell the drive to move

1G

The motor will move: D*(Peu/SCLD) steps = 100 * (2048000 / 1000) steps = 204800 steps = 4revsThe table will move: 4revs / 40 = 100mm.The motor velocity will be V*(Peu/SCLV)*(1/MR) = 25 * (2048000/1000)*(1/51200) = 1rpsThe table velocity will be 1rps / 40 = 0.025ms-1 = 25mms-1

The motor accel will be: A*(Peu/SCLA)*(1/MR) = 100 * (2048000/1000)*(1/51200) = 4rps2

The table accel will be: 4rps2 / 40 = 0.1ms-2 = 100mms-2

So we successfully programmed the drive in user units of mm, mms-1 and mms-2. A, D and V do not have to be in the same units, any combination of any unit is permissible. The only condition is that PEU / SCLD is and integer, else a D of 1 would demand a fractional number of encoder steps, which we cannot resolve down to.

We can check our target position, absolute position and position error by the following commands.

1R(PT)*1001R(PA)

document.doc Page 23 of 39 Last edit 18/05/2023

Page 24: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

*01R(PE)*-100

So we can see that distance is defined and reported in USER STEPS

document.doc Page 24 of 39 Last edit 18/05/2023

Page 25: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.1.10 SCALEd move with LOAD mounted encoder:There is never any need to run the stepper with scaling, a load mounted encoder enabled and no position maintenance. This is because we can set the motor resolution to be any value from 1 to 51200, so by setting the resolution to the correct value, we can achieve the desired step resolution on the load. Scaling would then allow us to enter our chosen scaled values. An encoder would do nothing for us.

document.doc Page 25 of 39 Last edit 18/05/2023

Page 26: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.1.11 SCALEd move with motor mounted STALL:When using scaling with a motor mounted stall encoder, distances are in user steps. This means that we can set all A, D and V in terms of table acceleration, speed and distance. In this example, the resolution of the stall encoder has to be entered, but otherwise, is as example 2.1.10.

If we initialise the drive as follows

1OFF1MOTOR(type,current,51200,3000,%thirdharmonic,Resistance,Inductance)1SCALE01LOADENC01STALL01POSMAIN0

The drive is configured to run open loop..

We must now specify the components of the SCALE command SCLA, SCLD, SCLV and PEU

PEU is defined as the positional encoder steps per unit. As the drive is running open loop, the number of steps are determined by the Resolution which is 51200. If we define a unit to be one complete travel of the linear table ie 1m, then as we have a 40 motor revolutions for full travel, there are 40 * 51200 = 2048000 steps for a defined unit of 1m, hence PEU = 2048000.If one unit is 1m, and we wish to define A,V and D in mm, then we require 1000th of a unit, hence SCLA, SCLD and SCLV = 1000.

1SCALE1(1000,1000,1000,2048000)

The resolution of the stall encoder is placed in EM. EM is defined as the number of encoder counts per motor revolution. Therefore, in this case, we have a 4000 count encoder attached to the back of the motor.

1W(EM,4000)

As mentioned above, all distances are entered in user steps, so the stall window is also entered in user steps. If we require a stall window of 50mm, then we enter

1STALL1(50,0,0)

Note:- As the stall encoder is scaled up to the motor resolution internally, then it is obviously quantised according to the EM resolution, hence, if we had an inexpensive 8 step encoder, we would have a quantisation of 51200/8 = 6400 motor steps giving a quantisation of 6400/(2048000/1000) = 3.125 user steps. Setting a stall window of 53, would be no different therefore to 50. Also, it would be pointless to set a window below 3, as the motor would stall instantly.

Move profile:

1D1001V251A1001ON

And clear the position counters

1W(PA,0)

And finally tell the drive to move

1G

document.doc Page 26 of 39 Last edit 18/05/2023

Page 27: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

The motor will move: D*(Peu/SCLD) steps = 100 * (2048000 / 1000) steps = 204800 steps = 4revsThe table will move: 4revs / 40 = 100mm.The motor velocity will be V*(Peu/SCLV)*(1/MR) = 25 * (2048000/1000)*(1/51200) = 1rpsThe table velocity will be 1rps / 40 = 0.025ms-1 = 25mms-1

The motor accel will be: A*(Peu/SCLA)*(1/MR) = 100 * (2048000/1000)*(1/51200) = 4rps2

The table accel will be: 4rps2 / 40 = 0.1ms-2 = 100mms-2

So we successfully programmed the drive in user units of mm, mms-1 and mms-2. A, D and V do not have to be in the same units, any combination of any unit is permissible. The only condition is that PEU / SCLD is and integer, else a D of 1 would demand a fractional number of encoder steps, which we cannot resolve down to.

We can check our target position, absolute position and position error by the following commands.

1R(PT)*1001R(PA)*1001R(PE)*0

So we can see that distance is defined and reported in USER STEPS

If we performed another move, but stopped the motor from moving, then the drive would perform a controlled stop with a position error of approximately -50 steps.

document.doc Page 27 of 39 Last edit 18/05/2023

Page 28: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.1.12 SCALEd move with LOAD mounted STALL:When using scaling with a load mounted stall encoder, there is no need to use the LOADENC command, which would configure the drive to work with load steps, instead, we configure as in the previous example 2.1.11. Obviously in this example though, the stall encoder resolution will be different.

If we initialise the drive as follows

1OFF1MOTOR(type,current,51200,3000,%thirdharmonic,Resistance,Inductance)1SCALE01LOADENC01STALL01POSMAIN0

The drive is configured to run open loop..

We must now specify the components of the SCALE command SCLA, SCLD, SCLV and PEU

PEU is defined as the positional encoder steps per unit. As the drive is running open loop, the number of steps are determined by the Resolution which is 51200. If we define a unit to be one complete travel of the linear table ie 1m, then as we have a 40 motor revolutions for full travel, there are 40 * 51200 = 2048000 steps for a defined unit of 1m, hence PEU = 2048000.If one unit is 1m, and we wish to define A,V and D in mm, then we require 1000th of a unit, hence SCLA, SCLD and SCLV = 1000.

1SCALE1(1000,1000,1000,2048000)

The resolution of the stall encoder is placed in EM. EM is defined as the number of encoder counts per motor revolution. Therefore, in this case, we have a 10um encoder giving 100000 counts for full travel of the table. The motor rotates 40 times for full travel, so the load resolution is 100000/40 = 2500 steps per rev. 1W(EM,2500)

As mentioned above, all distances are entered in user steps, so the stall window is also entered in user steps. If we require a stall window of 50mm, then we enter

1STALL1(50,0,0)

Note:- As the stall encoder is scaled up to the motor resolution internally, then it is obviously quantised according to the EM resolution, hence, if we had an inexpensive 8 step encoder, we would have a quantisation of 51200/8 = 6400 motor steps giving a quantisation of 6400/(2048000/1000) = 3.125 user steps. Setting a stall window of 53, would be no different therefore to 50. Also, it would be pointless to set a window below 3, as the motor would stall instantly.

And enable LOADENC

1LOADENC1

Move profile:

1D1001V251A1001ON

And clear the position counters

1W(PA,0)

document.doc Page 28 of 39 Last edit 18/05/2023

Page 29: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

And finally tell the drive to move

1G

The motor will move: D*(Peu/SCLD) steps = 100 * (2048000 / 1000) steps = 204800 steps = 4revsThe table will move: 4revs / 40 = 100mm.The motor velocity will be V*(Peu/SCLV)*(1/MR) = 25 * (2048000/1000)*(1/51200) = 1rpsThe table velocity will be 1rps / 40 = 0.025ms-1 = 25mms-1

The motor accel will be: A*(Peu/SCLA)*(1/MR) = 100 * (2048000/1000)*(1/51200) = 4rps2

The table accel will be: 4rps2 / 40 = 0.1ms-2 = 100mms-2

So we successfully programmed the drive in user units of mm, mms-1 and mms-2. A, D and V do not have to be in the same units, any combination of any unit is permissible. The only condition is that PEU / SCLD is and integer, else a D of 1 would demand a fractional number of encoder steps, which we cannot resolve down to.

We can check our target position, absolute position and position error by the following commands.

1R(PT)*1001R(PA)*1001R(PE)*0

So we can see that distance is defined and reported in USER STEPS

If we performed another move, but stopped the motor from moving, then the drive would perform a controlled stop with a position error of approximately -50 steps.

document.doc Page 29 of 39 Last edit 18/05/2023

Page 30: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.1.13 SCALEd move with motor mounted POSMAIN:The use of scaling with position maintenance means that we can perform posmain moves, but allowing us to set all A, D and V in terms of table accel, speed and distance, but with the added advantage of compensating for backlash and slippage in the gearing. It is advisable to change the motor resolution to match that of the motor mounted encoder. In our example, that is 4000 steps per rev.

If we initialise the drive as follows

1OFF1MOTOR(type,current,4000,3000,%thirdharmonic,Resistance,Inductance)1SCALE01LOADENC01STALL01POSMAIN0

The drive is configured to run open loop..

We must now specify the components of the SCALE command SCLA, SCLD, SCLV and PEU

PEU is defined as the positional encoder steps per unit. As the drive is running open loop, the number of steps are determined by the Resolution which is 4000. If we define a unit to be one complete travel of the linear table ie 1m, then as we have a 40 motor revolutions for full travel, there are 40 * 4000 = 160000 steps for a defined unit of 1m, hence PEU = 160000.If one unit is 1m, and we wish to define A,V and D in mm, then we require 1000th of a unit, hence SCLA, SCLD and SCLV = 1000.

1SCALE1(1000,1000,1000,160000)

Position maintenance error window is now defined in user steps, hence if we require a position maintenance window of 10mm checked every 100ms, we would enter the following

1POSMAIN1(10,0,100)

Move profile:

1D1001V251A1001ON

And clear the position counters

1W(PA,0)

And finally tell the drive to move

1G

The motor will move: D*(Peu/SCLD) steps = 100 * (160000 / 1000) steps = 16000 steps = 4revsThe table will move: 4revs / 40 = 100mm.The motor velocity will be V*(Peu/SCLV)*(1/MR) = 25 * (160000/1000)*(1/4000) = 1rpsThe table velocity will be 1rps / 40 = 0.025ms-1 = 25mms-1

The motor accel will be: A*(Peu/SCLA)*(1/MR) = 100 * (160000/1000)*(1/4000) = 4rps2

The table accel will be: 4rps2 / 40 = 0.1ms-2 = 100mms-2

We can check our target position, absolute position and position error by the following commands.

1R(PT)

document.doc Page 30 of 39 Last edit 18/05/2023

Page 31: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

*1001R(PA)*1001R(PE)*0

So we can see that distance is defined and reported in USER STEPS

document.doc Page 31 of 39 Last edit 18/05/2023

Page 32: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.1.14 SCALEd move with LOAD mounted POSMAIN:The use of scaling with the load mounted encoder means that we can set all A, D and V in terms of table accel, speed and distance, but with the added advantage of compensating for backlash and slippage in the gearing.

REMEMBER: that with LOADENC enabled, feedback is in load mounted steps, hence PEU will change from example 2.1.13.

Note:- Because the step resolution of the motor can be arbitrarily set, it is advisable to choose a motor resolution such that there is a sensible scaling factor between motor resolution and load mounted encoder steps.

If we initialise the drive as follows

1OFF1SCALE01LOADENC01STALL01POSMAIN0

The number of load mounted steps per motor revolution is defined by the variable EM. In our scenario, there are 1/10u = 100000 load mounted steps for full travel. We have a 40:1 ratio, hence we have 100000/40 = 2500 load mounted steps per motor revolution. It would therefore make sense to set the motor resolution to 50,000.

1MOTOR(type,current,50000,3000,%thirdharmonic,Resistance,Inductance)

We must specify the components of the SCALE command SCLA, SCLD, SCLV and PEU

PEU is defined as the positional encoder steps per unit. The positional feedback is now the LOAD mounted encoder. If once again we define a unit to be one complete travel of the linear table ie 1m, then as we have a 10um load mounted encoder giving 1/10u = 100000 steps for full travel, we must set PEU = 100000.If one unit is 1m, and we wish to define A,V and D in mm, then we require 1000th of a unit, hence SCLA, SCLD and SCLV = 1000. So by adding the load mounted encoder, but setting one unit to the same distance, we have no need to change SCLA, SCLD and SCLV. Therefore, as in example 2.1.13.

1SCALE1(1000,1000,1000,100000)

The resolution of the posmain encoder is placed in EM. EM is defined as the number of encoder counts per motor revolution. Therefore, in this case, we have a 10um encoder giving 100000 counts for full travel of the table. The motor rotates 40 times for full travel, so the load resolution is 100000/40 = 2500 steps per rev. 1W(EM,2500)

Position maintenance error window is now defined in user steps, hence if we require a position maintenance window of 10mm checked every 100ms, we would enter the following

1POSMAIN1(10,0,100)

And enable LOADENC

1LOADENC1

Move profile:

1D1001V251A100

document.doc Page 32 of 39 Last edit 18/05/2023

Page 33: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

1ON

And clear the position counters

1W(PA,0)

And finally tell the drive to move

1G

The motor will move: D*(Peu/SCLD) load steps = 100 * (100000 / 1000) load steps = 10000 load steps load steps * (MR/EM) = motor steps = 10000 * (50000/2500) = 200000 = 4revs

The table will move: 4revs / 40 = 0.1m = 100mm.The motor velocity will be V*(Peu/SCLV) load steps sec-1 = 25 * (100000/1000) load steps sec-1 = 2500 load steps per sec-1

load steps per sec-1 / EM = motor rps = 2500/2500 rps = 1rpsThe table velocity will be 1rps / 40 = 0.025ms-1 = 25mms-1

The motor accel will be: A*(Peu/SCLA) load steps sec-2 = 100 * (2048000/1000) load steps sec-2 = 10000 ) load steps sec-2

load steps per sec-2 / EM = motor rps2 = 10000/2500 rps2 = 4rps2

The table accel will be: 4rps2 / 40 = 0.1ms-2 = 100mms-2

We can check our target position, absolute position and position error by the following commands.

1R(PT)*1001R(PA)*1001R(PE)*0

So we can see that distance is defined and reported in USER STEPS

document.doc Page 33 of 39 Last edit 18/05/2023

Page 34: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.1.15 SCALEd move with motor mounted POSMAIN and STALL:The use of scaling with the motor mounted encoder means that we can set all A, D and V in terms of table accel, speed and distance. It is advisable to change the motor resolution to match that of the motor mounted encoder. In our example, that is 4000 steps per rev.

If we initialise the drive as follows

1OFF1MOTOR(type,current,4000,3000,%thirdharmonic,Resistance,Inductance)1SCALE01LOADENC01STALL01POSMAIN0

The drive is configured to run open loop..

We must now specify the components of the SCALE command SCLA, SCLD, SCLV and PEU

PEU is defined as the positional encoder steps per unit. As the drive is running open loop, the number of steps are determined by the Resolution which is 4000. If we define a unit to be one complete travel of the linear table ie 1m, then as we have a 40 motor revolutions for full travel, there are 40 * 40000 = 160000 steps for a defined unit of 1m, hence PEU = 160000.If one unit is 1m, and we wish to define A,V and D in mm, then we require 1000th of a unit, hence SCLA, SCLD and SCLV = 1000.

1SCALE1(1000,1000,1000,160000)

The resolution of the stall encoder is placed in EM. EM is defined as the number of encoder counts per motor revolution. In this case, we have a 4000 count encoder attached to the back of the motor.

1W(EM,4000)

As mentioned above, all distances are entered in user steps, so the stall window is also entered in user steps. If we require a stall window of 50mm, then we enter

1STALL1(50,0,0)

Note:- As the stall encoder is scaled up to the motor resolution internally, then it is obviously quantised according to the EM resolution, hence, if we had an inexpensive 8 step encoder, we would have a quantisation of 4000/8 = 500 motor steps giving a quantisation of 500/(160000/1000) = 3.125 user steps. Setting a stall window of 53, would be no different therefore to 50. Also, it would be pointless to set a window below 3, as the motor would stall instantly.

Position maintenance error window is now defined in user steps, hence if we require a position maintenance window of 10mm checked every 100ms, we would enter the following

1POSMAIN1(10,0,100)

Move profile:

1D1001V251A1001ON

And clear the position counters

1W(PA,0)

document.doc Page 34 of 39 Last edit 18/05/2023

Page 35: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

And finally tell the drive to move

1G

The motor will move: D*(Peu/SCLD) steps = 100 * (160000 / 1000) steps = 16000 steps = 4revsThe table will move: 4revs / 40 = 100mm.The motor velocity will be V*(Peu/SCLV)*(1/MR) = 25 * (160000/1000)*(1/4000) = 1rpsThe table velocity will be 1rps / 40 = 0.025ms-1 = 25mms-1

The motor accel will be: A*(Peu/SCLA)*(1/MR) = 100 * (160000/1000)*(1/4000) = 4rps2

The table accel will be: 4rps2 / 40 = 0.1ms-2 = 100mms-2

We can check our target position, absolute position and position error by the following commands.

1R(PT)*1001R(PA)*1001R(PE)*0

So we can see that distance is defined and reported in USER STEPS

If we performed another move, but stopped the motor from moving, then the drive would perform a controlled stop with a position error of approximately -50 steps.

document.doc Page 35 of 39 Last edit 18/05/2023

Page 36: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.1.16 SCALEd move with LOAD mounted POSMAIN and STALL:The use of scaling with the load mounted encoder means that we can set all A, D and V in terms of table accel, speed and distance, but with the added advantage of compensating for backlash and slippage in the gearing.

REMEMBER: that with LOADENC enabled, feedback is in load mounted steps, hence PEU will change from example 2.1.15.

Note:- Because the step resolution of the motor can be arbitrarily set, it is advisable to choose a motor resolution such that there is a sensible scaling factor between motor resolution and load mounted encoder steps.

If we initialise the drive as follows

1OFF1SCALE01LOADENC01STALL01POSMAIN0

The number of load mounted steps per motor revolution is defined by the variable EM. In our scenario, there are 1/10u = 100000 load mounted steps for full travel. We have a 40:1 ratio, hence we have 100000/40 = 2500 load mounted steps per motor revolution. It would therefore make sense to set the motor resolution to 50,000.

1MOTOR(type,current,50000,3000,%thirdharmonic,Resistance,Inductance)

We must now specify the components of the SCALE command SCLA, SCLD, SCLV and PEU

PEU is defined as the positional encoder steps per unit. The positional feedback is now the LOAD mounted encoder. If once again we define a unit to be one complete travel of the linear table ie 1m, then as we have a 10um load mounted encoder giving 1/10u = 100000 steps for full travel, we must set PEU = 160000.If one unit is 1m, and we wish to define A,V and D in mm, then we require 1000th of a unit, hence SCLA, SCLD and SCLV = 1000. So by adding the load mounted encoder, but setting one unit to the same distance, we have no need to change SCLA, SCLD and SCLV. Therefore, as in example 2.1.15.

1SCALE1(1000,1000,1000,100000)

The resolution of the stall encoder is placed in EM. EM is defined as the number of encoder counts per motor revolution. Therefore, in this case, we have a 10um encoder giving 100000 counts for full travel of the table. The motor rotates 40 times for full travel, so the load resolution is 100000/40 = 2500 steps per rev. 1W(EM,2500)

As mentioned above, all distances are entered in user steps, so the stall window is also entered in user steps. If we require a stall window of 50mm, then we enter

1STALL1(50,0,0)

Note:- As the stall encoder is scaled up to the motor resolution internally, then it is obviously quantised according to the EM resolution, hence, if we had an inexpensive 8 step encoder, we would have a quantisation of 51200/8 = 6400 motor steps giving a quantisation of 6400/(2048000/1000) = 3.125 user steps. Setting a stall window of 53, would be no different therefore to 50. Also, it would be pointless to set a window below 3, as the motor would stall instantly

Position maintenance error window is now defined in user steps, hence if we require a position maintenance window of 10mm checked every 100ms, we would enter the following

document.doc Page 36 of 39 Last edit 18/05/2023

Page 37: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

1POSMAIN1(10,0,100)

And enable LOADENC

1LOADENC1

Move profile:

1D1001V251A1001ON

And clear the position counters

1W(PA,0)

And finally tell the drive to move

1G

If you back drive the motor further than 10 motor steps, then the position maintenance will correct the position every 100ms

The motor will move: D*(Peu/SCLD) load steps = 100 * (100000 / 1000) load steps = 10000 load steps load steps * (MR/EM) = motor steps = 10000 * (50000/2500) = 200000 = 4revs

The table will move: 4revs / 40 = 0.1m = 100mm.The motor velocity will be V*(Peu/SCLV) load steps sec-1 = 25 * (100000/1000) load steps sec-1 = 2500 load steps per sec-1

load steps per sec-1 / EM = motor rps = 2500/2500 rps = 1rpsThe table velocity will be 1rps / 40 = 0.025ms-1 = 25mms-1

The motor accel will be: A*(Peu/SCLA) load steps sec-2 = 100 * (2048000/1000) load steps sec-2 = 10000 ) load steps sec-2

load steps per sec-2 / EM = motor rps2 = 10000/2500 rps2 = 4rps2

The table accel will be: 4rps2 / 40 = 0.1ms-2 = 100mms-2

We can check our target position, absolute position and position error by the following commands.

1R(PT)*1001R(PA)*1001R(PE)*0

So we can see that distance is defined and reported in USER STEPS

If we performed another move, but stopped the motor from moving, then the drive would perform a controlled stop with a position error of approximately -50 steps.

document.doc Page 37 of 39 Last edit 18/05/2023

Page 38: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.2 Is there an easy demonstration of how to set up a scaled system?Yes there is, and here it is.This example scales the motor motion so that a D of 1 will move the motor 1/100th of a user defined distance.Ensure motor in mode incremental.Nomenclature 1SCALEon/off(SCLA,SCLD,SCLV,Peu)

10 easy steps:

1. Connect motor to load if scaling is to be set by load movement (only needed if some form of gearing used).

2. Choose two points that represent the start and end of a unit. This may be the +ve and –ve limits on a linear table, or 100mm of travel, or one rotation of a load.

3. Energise the drive 1ON, and ensure the motor moves the load freely. While energised, move motor so that the load is in the most –ve of the two points defined in step 2.

4. Type 1W(PT,0) to reset the internal counter.5. Move the motor in a +ve direction to the +ve point defined in step 2.6. Type 1R(PT) and record the absolute value as Peu.7. Move the motor so that the load is roughly half way between the +ve position and the -ve position.8. De-energise the motor 1OFF9. At the command prompt, type the following to enable scaling. This splits the distance dictated by

Peu into 100 steps. For this example, Peu needs to be rounded to the nearest 100, else we could end up demanding the motor to move a fraction of a step.

1SCALE1(100,100,100,Peu)1. At the command prompt, type the following to run the drive. Note that this will move the load

10/100ths of the distance between initial and final positions at a velocity of 2/100ths of Peu per sec and an acceleration of 5/100ths of Peu per sec2. 1D10 1V2 1A5 1ON 1G

Note:- You can now change the first 3 variables of SCALE even when energised if you require a different scaling value.Remember that the motor will move D*(Peu/SCLD) motor steps for a D of 1, so SCLD is setting how many moves are required to move one complete unit Peu. Thus (Peu/SCLD) MUST be an integer.Remember that the motor will move V/SCLV units per second, so a SCLV of 1 and a V of 1 would give a speed of 1 unit per second (Peu steps per second).Remember SCLA scaling acts on A the same as SCLV acts on V.

document.doc Page 38 of 39 Last edit 18/05/2023

Page 39: For major section headings use Heading 1 e · Web viewCONTENTS 1 SERVO 2 1.1 What do A, V and D refer to when working with SCALE and LOADENC? 2 1.1.1 Basic move with motor mounted

2.3 Is there an easy demonstration of how to set up a scaled encoder system?Yes there is, and here it is.This example scales the motor motion so that a D of 1 will move the motor 1/100th of a user defined distance.Ensure motor in mode incremental.Nomenclature 1SCALEon/off(SCLA,SCLD,SCLV,Peu)

1LOADENCon/off1W(EM,em)

12 easy steps:1. Connect motor to load, and attach load mounted encoder.2. Choose two points that represent the start and end of a unit. This may be the +ve and –ve limits on a

linear table, or 100mm of travel, or one rotation of a load.3. Energise the drive 1ON, and ensure the motor moves the load freely. While energised, move motor

so that the load is in the most –ve of the two points defined in step 2.4. Type 1W(PA,0) to reset the internal counter.5. Move the motor in a +ve direction one complete revolution (pole on a linear motor). ie, if

Resolution in MOTOR command is 51200, then use 1D51200.6. Type 1R(PA) and record the value as em = PA.7. Move the motor to the +ve point defined in step 2.8. Type 1R(PA) and record the absolute value as Peu.9. Move the motor so that the load is roughly half way between the +ve position and the –ve position.10. De-energise the motor 1OFF11. At the command prompt, type the following to enable LOADENC and SCALING counters, and set

the load mounted encoder. This splits the distance dictated by Peu into 100 steps. For this example, Peu needs to be rounded to the nearest 100, else we could end up demanding the motor to move a fraction of a step. 1LOADENC1 1W(EM,em) 1SCALE1(100,100,100,Peu)

1. At the command prompt, type the following to run the drive. Note that this will move the load 10/100ths of the distance between initial and final positions at a velocity of 2/100ths per sec and an acceleration of 5/100ths per sec2. 1D10 1V2 1A5 1ON 1G

Note:- You can now change the first 3 variables of SCALE even when energised if you require a different scaling value.Remember that the motor will move D*(Peu/SCLD) load steps for a D of 1, so SCLD is setting how many moves are required to move one complete unit Peu. Thus (Peu/SCLD) MUST be an integer.Remember that the motor will move V/SCLV units per second, so a SCLV of 1 and a V of 1 would give a speed of 1 unit per second (Peu steps per second).Remember SCLA scaling acts on A the same as SCLV acts on V.

document.doc Page 39 of 39 Last edit 18/05/2023