Jump to content
OMRON Forums

Jogging Kinematic axes


paddax

Recommended Posts

PMAC Jog is implemented as a Jog of an axis, is it possible to Jog a kinematic axis rather that a physical axis?

 

Same as the above but using a handwheel?

 

I'm pretty certain the answer is no so the next question is how can this be simulated?

Link to comment
Share on other sites

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...

Yes, this can be done by executing small incremental moves in an indefinite motion program while loop. This motion program can be launched from a PLC which is monitoring your input. Once the "jogging" input is released, the program is aborted.

 

Incremental jog works well using the cpx command however continuous jog presents a different problem. If you set the increments too low the TS value will inhibit feed rate and if its too high it will inevitably quantise the jog requests and therefore not feel natural.

 

At the moment I'm issuing a very large cpx command to move the axis which works fine but my new problem is the only way to stop the cpx is to issue an "abort" which causes the coordinate system to leave the kinematic path.

 

Is there a way to stop a cpx command other than abort?

Link to comment
Share on other sites

issue a feedhold and once you stop issue abort and undo the feedhold.

 

This is where my current development is going, I'm having a bit of trouble with timing as its common for a user to jab the Jog button repeatedly and expect the machine to react.

 

What is the best variable to monitor to know when to issue the abort?

Link to comment
Share on other sites

When the jog button is pressed: Issue a flag once to run the motion program while loop. But only if Coord[].ProgActive = 0, and motors in closed loop. PMAC will reject anyway if the coordinate system is already running a program or any of the motors killed. Otherwise, pass through with no action.

 

When the jog button is released: Issue an abort once, optionally check that the program was running using the same bit Coord[].ProgActive. Insert a small delay to allow motors to abort. Make your abort decelerations as small as possible (what they normally should be without killing or jerking the machine too much).

Now, you can have a while statement looking for Coord[].ProgActive to go to zero. And you're done, waiting for the next "jog" command.

 

Let me know if you are still having issues, I will send you an explicit example.

Link to comment
Share on other sites

When the jog button is pressed: Issue a flag once to run the motion program while loop. But only if Coord[].ProgActive = 0, and motors in closed loop. PMAC will reject anyway if the coordinate system is already running a program or any of the motors killed. Otherwise, pass through with no action.

 

When the jog button is released: Issue an abort once, optionally check that the program was running using the same bit Coord[].ProgActive. Insert a small delay to allow motors to abort. Make your abort decelerations as small as possible (what they normally should be without killing or jerking the machine too much).

Now, you can have a while statement looking for Coord[].ProgActive to go to zero. And you're done, waiting for the next "jog" command.

 

Let me know if you are still having issues, I will send you an explicit example.

 

I think you missed the point, we're agreed the technology

 

Jog Start=cpx xxxx

Jog Stop=[Feedhold] -> Wait for condition -> Abort

 

The question is now what is the best "Wait for condition" so that the following is true.

 

1. The machine desired position does not deviate from the kinematic path

2. The duration of "wait for condition" is minimised.

 

[FeedHold] May be "%0", "H", "Coord[x].SegOverride=0", this decision has not been taken but my preference is "%0" unless you can give a better reason.

Link to comment
Share on other sites

I can not test at the moment but I think when the feedhold has slewed to 0% you will see motor[] and coord[] desvelzero=1. If it is not that status bit then there is another which you can find by looking in the status page after giving the %0.

 

If you want to make this a little more complicated (from the initial setup point of view) but most likely better then Richards method would be very good. You need a motion program running in a loop always incrementing towards variable position. If it reaches that position it just stops and waits for a new position. If the position is changed during the motion it just runs towards the new position. Then you never need an abort. You can feedhold for a stop and run for moving and change the destination whenever you want. You can also have slow accelerations that take more time than the small segments in which you react.

 

Here is some code you can use as a start point if this is what you want.

 

//p0..7 = target position

//p10..17 = maximum delta position per spline time (velocity)

//p20..27 = maximum delta position change per spline time (acceleration)

//p30..37 = present position

//p40..47 = present delta position

 

p0,8=0

p10,8=10

p20,8=0.1

p30,8=0

p40,8=0

 

open prog 1

n10:

r0=p0,p10,p20,p30,p40 call1 p30=r3 p40=r4

r0=p1,p11,p21,p31,p41 call1 p31=r3 p41=r4

r0=p2,p12,p22,p32,p42 call1 p32=r3 p42=r4

r0=p3,p13,p23,p33,p43 call1 p33=r3 p43=r4

r0=p4,p14,p24,p34,p44 call1 p34=r3 p44=r4

r0=p5,p15,p25,p35,p45 call1 p35=r3 p45=r4

r0=p6,p16,p26,p36,p46 call1 p36=r3 p46=r4

r0=p7,p17,p27,p37,p47 call1 p37=r3 p47=r4

spline1u(p30)v(p31)x(p32)y(p33)uu(p34)vv(p35)xx(p36)yy(p37)

goto 10

close

 

open prog 2

n10:

r0=p0,p10,p20,p30,p40 call1 p30=r3 p40=r4

r0=p1,p11,p21,p31,p41 call1 p31=r3 p41=r4

r0=p2,p12,p22,p32,p42 call1 p32=r3 p42=r4

r0=p3,p13,p23,p33,p43 call1 p33=r3 p43=r4

r0=p4,p14,p24,p34,p44 call1 p34=r3 p44=r4

r0=p5,p15,p25,p35,p45 call1 p35=r3 p45=r4

r0=p6,p16,p26,p36,p46 call1 p36=r3 p46=r4

r0=p7,p17,p27,p37,p47 call1 p37=r3 p47=r4

pvt1u(p30):(p40)v(p31):(p41)x(p32):(p42)y(p33):(p43)uu(p34):(p44)vv(p35):(p45)xx(p36):(p46)yy(p37):(p47)

goto 10

close

 

open subprog 1

if (l0 > l3)

{ // forward direction

if (l3 + 0.5 * l4 * abs(l4 / l2) <= l0)

{ // can move forward some more

if (l4 < l1)

{ // acceleration ok

l5 = l4 + l2

if (l5 > l1) l5 = l1 // form new max delta position

}

else

{ // must slow down

l5 = l4 - l2

if (l5 < l1) l5 = l1 // form new max delta position

}

if (l3 + l5 + 0.5 * l5 * abs(l5 / l2) <= l0)

{ // can move foward at new max delta position

l4 = l5

}

else

{ // calculate new delta position

l4 = sqrt(l2 * l2 + 2 *l2 * (l0 - l3)) - l2

}

}

else

{ // must slow down

l4 = l4 - l2

if (l4 < 0) l4 = 0

}

}

else

{ // backward direction

if (l3 + 0.5 * l4 * abs(l4 / l2) >= l0)

{ // can move backward some more

if (l4 > -l1)

{ // acceleration ok

l5 = l4 - l2

if (l5 < -l1) l5 = -l1 // form new max delta position

}

else

{ // must slow down

l5 = l4 + l2

if (l5 > -l1) l5 = -l1 // form new max delta position

}

if (l3 + l5 + 0.5 * l5 * abs(l5 / l2) >= l0)

{ // can move foward at new max delta position

l4 = l5

}

else

{ // calculate new delta position

l4 = l2 - sqrt(l2 * l2 + 2 *l2 * (l3 - l0))

}

}

else

{ // must slow down

l4 = l4 + l2

if (l4 > 0) l4 = 0

}

}

l3 += l4

close

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...