Jump to content
OMRON Forums

Enabling "Master Pos Following" while "Master Position"-value is changing


meindert.norg
 Share

Recommended Posts

LS,

 

I have a question about what happens to a motor's setpoint when the master position is engaged (e.g. I106 is changed from 0 to 1).

 

This is my configuration:

  • 1 motor (#1) with encoder feedback
  • ADC input connected to #1 master-position
  • Master Pos Following off (I106=0)

During startup, one of the first things that happens is motor-homing. During this phase, the ADC value for the master-position can be changing, but is ignored.

After homing is complete, and the motor is moved to zero, the motor must start following the 'master position'. The ADC voltage represents the absolute motor-position, lets say 1V = 1 degree (with e.g. "Master Scale Factor" I107 = 1000), so with an ADC range of +- 10 V I have a range of +- 10 degrees. Numbers are just an example.

 

My plan was to:

  1. Set "Master Scale Factor" (I107) to 0
  2. Enable "Position Following Enable" (I106 = 1)
  3. Slowly increase "Master Scale Factor" (I107) from 0 to 1000 over e.g. 1 second.

This way I could slowly 'pull' the motor towards the position as indicated with by the ADC voltage, and the ADC voltage would be allowed to change while doing this.

 

However, when changing the "Master Scale Factor" (I107) or "Position Following Enable" (I106) the actual motor setpoint does not change (which in general is nice, because otherwise that would generate an step in setpoint, which is normally undesired), but is somehow offset with the master position value.

 

My questions:

  • What exactly is done with setpoints / master position values / offsets when I set I106 to 1 after I set I107 to 1000?
  • In other words, where is the change in "Master Position"-value compensated for?
  • And most importantly: what can I do to implement the desired behavior?

 

Regards, Meindert Norg

Link to comment
Share on other sites

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

It may help for you to observe the block diagram related to position following, taken from page 345 of the Turbo PMAC User Manual:

 

2018127023_PositionFollowingParameters(p.345ofTurboPMACUserManual).png.51604668af92673bb9862dd68aafc058.png

 

From this, one can see that the master position is measured, multiplied by Ixx07, and then added to the commanded position from the trajectory generator.

 

To slew to the commanded position, you could, rather than slewing Ixx07 manually, issue %0 for the coordinate system in which your motor currently is, enable following and set your scale factor (Ixx06=1, Ixx07=1000), and then issue %100. Your motor will then slew up to full speed at a rate set by Isx94.

Link to comment
Share on other sites

Charles,

 

Thanks for your answer. I'm afraid I did not explain clearly enough what my issue is. i don't think the %0 -> %100 command will work, because my motor is not moving at a specific speed, but is mostly moving around 0 following the value as indicated by the Master Position. Hence I don't think the FeedRate override will help here, but correct me if I'm wrong.

 

First of all, I have no coordinate system defined, because I don't think my application asks for that. I'm running one motor, and the majority of the time all that motor is doing is stand still, while continually 'listening' to the Master Position setpoint. If that value changes (representing a desired change in motor position), the motor needs to follow that setpoint. So, the Master Position is not a velocity, it is a position.

 

The problem arises when switching on Ix06, or changing Ix06 (thanks for the block diagram). Lets assume the situation where:

  • the trajectory command = 0
  • the actual load position = 0
  • Ix06 = 0
  • Ix07 = 1000
  • the FE is zero
  • and the ECT contents pointed to by Ix05 is 5. This 5 would be the same as 5 * (Ix07 = 1000) = 5000 cts.

This 5000 cts is my desired position, as indicated by the earlier mentioned Analog Input signal.

 

Problem: when I set Ix06 = 1, the motor does not move instantly. This is probably because the 5000 cts is compensated for somewhere else, with the result that FE does not change (and hence does not result in a motor move). The note: "Can be changed on the fly" indicates this.

 

Question: how do I enable the Master Position feature so that the motor will end up at the location indicated by the analog input (at HW)?

 

thanks, Meindert

Link to comment
Share on other sites

Charles,

 

Yes, tried that too, but did not get the effect I wanted.

During out phone-call you mentioned that I should actually get the desired effect when doing what I'm doing, and that I actually should get a position jump when enabling I106 to 1 with I107 set to 1000 (actually, now we're getting more into details, I must be more correct and say that I107 = 3072). Well, I attached a measurement showing that I do not.

This measurement shows what I'm doing:

Meas3_ShowMasterPosProblem.png.0784529996a92c2d4fabea99e7e4650f.png

These are the steps I performed:

  • t=0 sec: I106 = 0, analog input voltage (Vin) = 0 V
  • t=3 sec: I106 = 1
  • t=5-7 sec: change Vin from 0 -> 6 and back to 0 V again. Notice the position (b) change from 0 -> 1.4e8 -> 0. This is approx +100 degrees.
  • t=8 sec: I106 = 0
  • t=12 - 14 sec: I change Vin from 0 -> 3 V.
  • t=17 sec: I106 = 1. Notice how the actual position does NOT change!
  • t=18-24 sec: change Vin from 3 -> 6 -> 0 and back to 3 V again. Notice how the position now changes through the same 110 degrees, but shifted down.

 

Does this explain what I'm observing? Is that according to your expectations?

 

regards, Meindert

Link to comment
Share on other sites

 

I103=$3501;Motor 1 Position Address

I104=$3501;Motor 1 'Velocity' Address

I105=$3506;Motor 1 Master Position Address

I106=0;Motor 1 Master Follow Enable

I107=3072;Motor 1 Master Scale Factor

I108=96;Motor 1 Position Scale Factor

I109=96;Motor 1 Velocity Scale Factor

 

I8000=$78000;ECT Entry 0

I8001=$278005;ECT Entry 1

I8002=$C00C;ECT Entry 2

I8003=$D03503;ECT Entry 3

I8004=$91;ECT Entry 4

I8005=$200000;ECT Entry 5

I8006=$78018;ECT Entry 6

 

Or with more info:

Encoder Table Definitions.
 Executed - Fri Mar 18 16:05:58 2011

Entry    Address     Y-Word     Conversion Method  
----------------------------------------------------
  1      Y:$  3501   $078000    1/T extension of location $78000
  2      Y:$  3502   $278005    Unfiltered parallel pos of location Y:$78005
         Y:$  3503   $00C00C     Width and Offset
  3      Y:$  3504   $D03503    Exponential filter from conv. encoder 4 ($C00C)
         Y:$  3505   $000091     Maximum change in cts/cycle
         Y:$  3506   $200000     Filter gain
  4      Y:$  3507   $078018    1/T extension of location $78018
  5      Y:$  3508   $078100    1/T extension of location $78100
  6      Y:$  3509   $078108    1/T extension of location $78108
  7      Y:$  350A   $078110    1/T extension of location $78110
  8      Y:$  350B   $078118    1/T extension of location $78118

 

FYI:

I have motor 2 filter in series with motor 1 filter.

Link to comment
Share on other sites

What is strange about your plot is that the motor responds to some changes in the ADC reading, but not all of them. My colleague's theory is that maybe your Ixx08 should change to permit a different resolution on your following. Please consider this excerpt from page 346 of the Turbo PMAC User Manual:

 

"The higher the Ixx08 scale factor, the finer the resolution of the changes can be. However, the

higher Ixx08 is, the lower proportional gain Ixx30 can be before internal saturation occurs, and the lower

the maximum velocity can be before there is internal saturation of those registers. In general, Ixx08

should be kept below 1000."

 

You may consider lowering your Ixx08 value and seeing if you can get it to respond. It may be that the reason your motor does not respond to the smaller magnitude change in ADC value is because it is beneath the resolution of the following, although I do not have sufficient time to check this at the moment.

 

If you change Ixx08, however, you need to modify your servo loop gains according to slide 375 of the pdf I have attached.

 

I tested position following on a Clipper just now. I just had Motor #1 follow a scratch register (X:$10F0). If I change the master position, the motor always immediately jumps to follow. I am using Ixx06=1, Ixx07=96, Ixx08=10000.

 

Perhaps your problem is in the ECT filter? You could try removing your ECT filters and trying again.

 

Also, I am not sure why your ECT entries for the Unfiltered Parallel Pos Y Word are set as they are. When I read ADCIN1, I set

 

I8004=$2F8005

I8005=$C00C

 

Give me a call or email Monday and we can try a few more things.

PMAC Position Following.pdf

Link to comment
Share on other sites

Hi Charles,

 

To respond to a few of your questions:

 

What is strange about your plot is that the motor responds to some changes in the ADC reading, but not all of them. My colleague's theory is that maybe your Ixx08 should change to permit a different resolution on your following. Please consider this excerpt from page 346 of the Turbo PMAC User Manual:

 

"The higher the Ixx08 scale factor, the finer the resolution of the changes can be. However, the

higher Ixx08 is, the lower proportional gain Ixx30 can be before internal saturation occurs, and the lower

the maximum velocity can be before there is internal saturation of those registers. In general, Ixx08

should be kept below 1000."

 

You may consider lowering your Ixx08 value and seeing if you can get it to respond. It may be that the reason your motor does not respond to the smaller magnitude change in ADC value is because it is beneath the resolution of the following, although I do not have sufficient time to check this at the moment.

 

I don't think it is a resolution issue, because my motor follows the analog input properly, IF I106 is set to 1. It does not follow if I106 is set to 0, as expected.

 

I tested position following on a Clipper just now. I just had Motor #1 follow a scratch register (X:$10F0). If I change the master position, the motor always immediately jumps to follow. I am using Ixx06=1, Ixx07=96, Ixx08=10000.

 

I have the same behavior. After I106 is set to 1, the motor properly follows the analog input, it just does not take the initial ADC value into account AT THE MOMENT I106 is switched to 1....

 

Perhaps your problem is in the ECT filter? You could try removing your ECT filters and trying again.

 

Also, I am not sure why your ECT entries for the Unfiltered Parallel Pos Y Word are set as they are. When I read ADCIN1, I set

 

I8004=$2F8005

I8005=$C00C

 

I'm using entry 2 to copy the ADC result (which resides in Y-memory) into the table, because the exp.-filter (entry3) can not access Y-memory. It can only access X-memory, or earlier ECT results. Please correct me here if I'm making things more complex than they should.

 

Give me a call or email Monday and we can try a few more things.

 

To be continued next week.

 

regards, Meindert

 

Link to comment
Share on other sites

Hi Charles,

 

During our phone conversation you mentioned that what really happens when the Master Position is used to calculate the Following Error FE is that per servo sample, each Master Position CHANGE is used to calculate FE. What does not happen is that (as the schematics above might make one believe) the Master Position (scaled with I107) is added to the FE.

 

The fact that only changes propagate now gives a perfect explanation for my problem:

  • When I106 (Master Position Enable) is switched on...
  • ...the initial Master Position value (from my ECT) is ignored...
  • ... and only consecutive changes to the Master Position propagate to the Following Error.

That is exactly what I measured and showed in the plot above.

 

I found an implementation that gives me the result I was looking for: I'm making sure the ECT contents that is linked to the Master Position is zero when I switch Master Position following on (I106=1). Then, I link the analog input to the Exponential Filter that feeds into the Master Position, and make sure the max rate of change is low enough:

  • Disable I106 = 0
  • Point first element of ECT entry 3 (which is an Exponential-Filter) to ‘0’ (e.g. I8003 = $D035C0). Make sure to use $D in order not to change the "method".
  • Then slow down max . rate of change for exp. filter (I8004) from $91 (=145) to $1: I8004 = $1
  • Then enable I106 = 1
  • Then point ECT entry 3 (I8003) to ECT result of entry 2 ($D03503): I8003 = $D03503, which was the original address.
  • After delay reset max rate of change: I8004 = $91

 

Voila!

 

Please let me know if my understanding of how Master Position is used is incorrect or if you find an easier way to do this.

 

regards, Meindert

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...