Jump to content
OMRON Forums

Programmed move profile


JohnR

Recommended Posts

Im trying to understand the profile from a commanded move that I have issued.

 

In CS #1 I have a single motor setup as &1#1->2048X and using lookahead as "define lookahead 10000".

 

When I issues the online command "&1 cpx inc X+100000" notice the motor start moving with a negative velocity, after the motor reached aprox 20,000 counts the velocity reverses and willl continue to move until I issue &1a ( I have not waited until the move should have stopped ).

 

I have included the captured profile.

 

The only thing that I can think of is that the motion has started without first a pmatch to establish to current position of the axis.

 

Is there something else going on here ?

 

What must I do to simple have the axis move +100,00 user units ?

 

(the command was issued at about the 2 sec mark )

 

 

Link to comment
Share on other sites

  • Replies 16
  • Created
  • Last Reply

Top Posters In This Topic

Guest DavisG

You don't need the '+' symbol - I'm not sure what the effect would be (and don't want to try it on the machine on which I am working). The command:

 

cpx inc X100000

 

should work assuming that everything else is set up correctly

Link to comment
Share on other sites

You don't need the '+' symbol - I'm not sure what the effect would be (and don't want to try it on the machine on which I am working). The command:

 

cpx inc X100000

 

should work assuming that everything else is set up correctly

 

Not using the "+" has no effect.

I have a little more information on how to create this.

1) #1hmz

2) #1J+ for > 50,000 counts

3) &1a

4) &1 cpx abs X1

5) &1a around 20,000 counts

6) &1 cpx inc X100000

 

This will cause the motor to move to about 10,000 counts and then reverse direction.

 

Even abs moves for everything will cause this. It also effects the acceleration for the moves. I think that issuing the "&1a" is messing up everything and not allowing a clean recovery.

 

 

Link to comment
Share on other sites

We have not been able to duplicate this here. Some questions:

 

What move mode are you in? Rapid? Linear?

 

Does this occur with no lookahead buffer defined?

 

Do you have a forward kinematic routine for the coordinate system?

 

Does the problem go away if you command "pmatch" before the move? (e.g. &1 cpx pmatch inc X100000)

 

Link to comment
Share on other sites

We have not been able to duplicate this here. Some questions:

 

What move mode are you in? Rapid? Linear?

 

Does this occur with no lookahead buffer defined?

 

Do you have a forward kinematic routine for the coordinate system?

 

Does the problem go away if you command "pmatch" before the move? (e.g. &1 cpx pmatch inc X100000)

 

 

I have included a snap shot of the CS status.

 

I do have a forward kinematic for the CS but I ony have #1->2048X defined in the CS, as shown in the Coord[1] Axis Definition

 

LookAhead is active

 

&1 cpx pmatch abs X10000 does exactly the same.

 

Thanks

John

 

Link to comment
Share on other sites

Is your forward kinematic routine a proper mathematical inverse of your axis definition?

 

If you eliminate the forward kinematic routine ("&1 open forward close") so that Power PMAC automatically inverts the axis definition equation to do the pmatch function, does the problem go away?

Link to comment
Share on other sites

Is your forward kinematic routine a proper mathematical inverse of your axis definition?

 

If you eliminate the forward kinematic routine ("&1 open forward close") so that Power PMAC automatically inverts the axis definition equation to do the pmatch function, does the problem go away?

 

I can't issues the command "&1 open forward close" from the terminal window, I get the following results:

 

Welcome to PowerPMAC terminal

Select device to start communication

SSH communication to PowerPMAC successful

Please wait!!! database Sync in progress

Database sync complete

&1

&1 open forward close

stdin:4:4: error #33: BUFFER IN USE: &1 open forward close

&1 open forward close

stdin:5:1: error #31: Buffer closed due to an error: &1 open forward close

p2801

P2801=2048

p2802

P2802=2048

#1->

&1#1->2048x

&1

list forward

C6=(L1-P2041)/P2801

C7=(L2-P2042)/P2802

list inverse

L1=(C6*P2801)+P2041

L2=(C7*P2802)+P2042

p2041

P2041=0

p2042

P2042=0

 

Link to comment
Share on other sites

John,

 

I just noticed a few things:

 

1. make sure you're not using &1p anywhere since it will call the forward kinematics routine and it won't allow you erasing it while it's being used. Then you should be able to use "&1 open forward close". Also, try deleting both forward and inverse kinematics. "&1 open inverse close"

 

2. In Power PMAC forward kinematics routine, you HAVE TO set KinAxisUsed or D0 to specify which axis are calculated using forward kinematics. If you don't then PMAC gets confused, since you have a definition for X axis both in kinematics and axis definition.

 

 

Link to comment
Share on other sites

John,

 

I just noticed a few things:

 

1. make sure you're not using &1p anywhere since it will call the forward kinematics routine and it won't allow you erasing it while it's being used. Then you should be able to use "&1 open forward close". Also, try deleting both forward and inverse kinematics. "&1 open inverse close"

 

2. In Power PMAC forward kinematics routine, you HAVE TO set KinAxisUsed or D0 to specify which axis are calculated using forward kinematics. If you don't then PMAC gets confused, since you have a definition for X axis both in kinematics and axis definition.

 

 

 

Thanks for the info Sina,

 

I changed my kinematic file to clear both the forward and the inverse routines and downloaded the project

( as a side is there a way I can download a single file to the PPMAC ? )

 

The "&1 cpx inc X10000" now seems to be working correctly.

 

I will set them back and try your idea of setting D0 to 0

 

John

Link to comment
Share on other sites

John,

 

I just noticed a few things:

 

1. make sure you're not using &1p anywhere since it will call the forward kinematics routine and it won't allow you erasing it while it's being used. Then you should be able to use "&1 open forward close". Also, try deleting both forward and inverse kinematics. "&1 open inverse close"

 

2. In Power PMAC forward kinematics routine, you HAVE TO set KinAxisUsed or D0 to specify which axis are calculated using forward kinematics. If you don't then PMAC gets confused, since you have a definition for X axis both in kinematics and axis definition.

 

 

 

Thanks for the info Sina,

 

I changed my kinematic file to clear both the forward and the inverse routines and downloaded the project

( as a side is there a way I can download a single file to the PPMAC ? )

 

The "&1 cpx inc X10000" now seems to be working correctly.

 

I will set them back and try your idea of setting D0 to 0

 

John

 

Additional Info....

 

After disabling all of my PLCs I can now open then forward kinematic buffer.

 

If I set up the buffer such that "D0=0" is the only line in the buffer I still have my motion issue. If I delete all lines in the buffer the motoin works correctly.

 

Two thing going on I don't understand...

 

1) Why I can't open the buffer with the PLCs running ( I will attemp to narrow down exactly which PLC is the problem ).

 

2) Why does D0 = 0 cause my motoin issues ?

 

Thanks

John

Link to comment
Share on other sites

John,

 

I just noticed a few things:

 

1. make sure you're not using &1p anywhere since it will call the forward kinematics routine and it won't allow you erasing it while it's being used. Then you should be able to use "&1 open forward close". Also, try deleting both forward and inverse kinematics. "&1 open inverse close"

 

2. In Power PMAC forward kinematics routine, you HAVE TO set KinAxisUsed or D0 to specify which axis are calculated using forward kinematics. If you don't then PMAC gets confused, since you have a definition for X axis both in kinematics and axis definition.

 

 

 

Thanks for the info Sina,

 

I changed my kinematic file to clear both the forward and the inverse routines and downloaded the project

( as a side is there a way I can download a single file to the PPMAC ? )

 

The "&1 cpx inc X10000" now seems to be working correctly.

 

I will set them back and try your idea of setting D0 to 0

 

John

 

Additional Info....

 

After disabling all of my PLCs I can now open then forward kinematic buffer.

 

If I set up the buffer such that "D0=0" is the only line in the buffer I still have my motion issue. If I delete all lines in the buffer the motoin works correctly.

 

Two thing going on I don't understand...

 

1) Why I can't open the buffer with the PLCs running ( I will attemp to narrow down exactly which PLC is the problem ).

 

2) Why does D0 = 0 cause my motoin issues ?

 

Thanks

John

 

The following snippet from the terminal window shows PLC 8 is causing the open forward buffer problem...

 

open forward

D0=0

close

list forward

D0=0

enable plc 8

open forward

stdin:129:1: error #33: BUFFER IN USE: open forward

close

list plc 8

P1201=(Motor[1].ActPos-Motor[1].HomePos-Motor[1].MasterPos*((Motor[1].MacroCtrl&2)>>1))/(P2801)-P2041/P2801

P1202=(Motor[2].ActPos-Motor[2].HomePos-Motor[2].MasterPos*((Motor[2].MacroCtrl&2)>>1))/(P2802)-P2042/P2802

P1203=(Motor[3].ActPos-Motor[3].HomePos-Motor[3].MasterPos*((Motor[3].MacroCtrl&2)>>1))/(P2803)-P2043/P2803

P1204=(Motor[4].ActPos-Motor[4].HomePos-Motor[4].MasterPos*((Motor[4].MacroCtrl&2)>>1))/(P2804)-P2044/P2804

P1205=(Motor[5].ActPos-Motor[5].HomePos-Motor[5].MasterPos*((Motor[5].MacroCtrl&2)>>1))/(P2805)-P2045/P2805

P1206=(Motor[6].ActPos-Motor[6].HomePos-Motor[6].MasterPos*((Motor[6].MacroCtrl&2)>>1))/(P2806)-P2046/P2806

P1211=-sin(P1204)*cos(P1205)

P1212=cos(P1204)*cos(P1205)

P1213=sin(P1205)

P1214=P1201-sin(P1204)*(M291*cos(P1205)+M290)+M294*cos(P1204)

P1215=P1202+cos(P1204)*(M291*cos(P1205)+M290)+M294*sin(P1204)

P1216=P1203+M291*sin(P1205)

P2201=(Motor[9].ActPos-Motor[9].HomePos-Motor[9].MasterPos*((Motor[9].MacroCtrl&2)>>1))/(P2809)-P2049/P2809

P2202=(Motor[10].ActPos-Motor[10].HomePos-Motor[10].MasterPos*((Motor[10].MacroCtrl&2)>>1))/(P2810)-P2050/P2810

P2203=(Motor[11].ActPos-Motor[11].HomePos-Motor[11].MasterPos*((Motor[11].MacroCtrl&2)>>1))/(P2811)-P2051/P2811

P2204=(Motor[12].ActPos-Motor[12].HomePos-Motor[12].MasterPos*((Motor[12].MacroCtrl&2)>>1))/(P2812)-P2052/P2812

P2205=(Motor[13].ActPos-Motor[13].HomePos-Motor[13].MasterPos*((Motor[13].MacroCtrl&2)>>1))/(P2813)-P2053/P2813

P2206=(Motor[14].ActPos-Motor[14].HomePos-Motor[14].MasterPos*((Motor[14].MacroCtrl&2)>>1))/(P2814)-P2054/P2814

P2211=-sin(P2204)*cos(P2205)

P2212=cos(P2204)*cos(P2205)

P2213=sin(P2205)

P2214=P2201-sin(P2204)*(M293*cos(P2205)+M292)+M295*cos(P2204)

P2215=P2202+cos(P2204)*(M293*cos(P2205)+M292)+M295*sin(P2204)

P2216=P2203+M293*sin(P2205)

 

I don't see why this plc should be causing the buffer to be locked ?

 

John

Link to comment
Share on other sites

John:

 

D0 (for which the variable name macro is "KinAxisUsed") tells Power PMAC which axis positions you have computed in your forward kinematic routine. It will pick up the axis value(s) you have computed from the appropriate variable(s) and use them as the axis starting position(s) for the first move. By setting D0 to 0, you are telling Power PMAC not to pick up any positions, thus rendering your routine completely useless, so its intended "position matching" function is not performed, and the first move will used the wrong starting position. This looks like the source of your problem.

 

You need to set the appropriate bits of D0 to 1 for each axis in the coordinate system. For instance, if you have calculated X, Y, and Z positions, you should set bits 6, 7, and 8 to 1 for a value of $1C0.

Link to comment
Share on other sites

John:

 

D0 (for which the variable name macro is "KinAxisUsed") tells Power PMAC which axis positions you have computed in your forward kinematic routine. It will pick up the axis value(s) you have computed from the appropriate variable(s) and use them as the axis starting position(s) for the first move. By setting D0 to 0, you are telling Power PMAC not to pick up any positions, thus rendering your routine completely useless, so its intended "position matching" function is not performed, and the first move will used the wrong starting position. This looks like the source of your problem.

 

You need to set the appropriate bits of D0 to 1 for each axis in the coordinate system. For instance, if you have calculated X, Y, and Z positions, you should set bits 6, 7, and 8 to 1 for a value of $1C0.

 

Hi Curt,

 

I only am using a signle axis definition statement of

&1#1->2048X

I did not intend for the position matching to be done in the forward kinementic routine. I believed that setting D0 = 0 would instruct PPMAC to not assume any position calculation in to forward function and thus calculate all axis psotion from the inverse of the axis definition statement.

 

I agree that this looks like the cause of my motion problem. Why would a forward kinematic routine of D0=0 cause the profile to change ?

 

Thanks

John

Link to comment
Share on other sites

John:

 

If there is a forward kinematic routine for a coordinate system, Power PMAC will automatically use it for the position matching (pmatch) functionality that computes the starting axis position(s) from the motor positions. This is true even if the motors are assigned to axes with axis definition statements instead of being declared as inverse kinematic axes.

 

By setting the "KinAxisUsed" variable (D0) to 0, you are telling Power PMAC not to pick up any axis positions from the routine. In doing this, you are effectively completely disabling the "pmatch" function, so the motion program has absolutely no idea what the starting axis position for the move is, rendering its motion calculations nonsensical.

Link to comment
Share on other sites

John:

 

If there is a forward kinematic routine for a coordinate system, Power PMAC will automatically use it for the position matching (pmatch) functionality that computes the starting axis position(s) from the motor positions. This is true even if the motors are assigned to axes with axis definition statements instead of being declared as inverse kinematic axes.

 

By setting the "KinAxisUsed" variable (D0) to 0, you are telling Power PMAC not to pick up any axis positions from the routine. In doing this, you are effectively completely disabling the "pmatch" function, so the motion program has absolutely no idea what the starting axis position for the move is, rendering its motion calculations nonsensical.

 

Thanks Curt,

 

So, if I have a forward kinematic routine in a CS I must solve for all (relevant) axes and I must also set the appropriate axis bit in the “KinAxisUsed” (D0 ) variable.

 

I must be missing something, because I don’t see why the “KinAxisUsed” var is relevant. PPMAC is assuming that forward kinematics for all axes are to be handled within the kinematic routine, if one exists, regardless of how they are defined.

 

This does explain my strange programmed profile that I see.

 

John

 

Link to comment
Share on other sites

John:

 

The forward kinematic routine is really useful only when at least some motors in the coordinate system are defined as inverse kinematic axes (#x->I). Otherwise, Power PMAC can just mathematically invert the axis-definition equations.

 

With inverse kinematic equations, Power PMAC has no automatic way of knowing which axes are being used. This is what the "KinAxisUsed" (D0) variable is for.

Link to comment
Share on other sites

John:

 

The forward kinematic routine is really useful only when at least some motors in the coordinate system are defined as inverse kinematic axes (#x->I). Otherwise, Power PMAC can just mathematically invert the axis-definition equations.

 

With inverse kinematic equations, Power PMAC has no automatic way of knowing which axes are being used. This is what the "KinAxisUsed" (D0) variable is for.

 

After Setting "KinAxisUsed" (D0) correctly, the motion profile is working as expected.

 

Thanks for walking me through it.

 

John

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...