remap issues - pycall(remap.cycle-prolog)failed

More
13 Oct 2021 10:01 #223015 by Henk
HI
I would like to play with a couple of lathe cycles, but getting stuck when trying out the example. 

When i try out the remap sim in Axis, cycle.ini,   in 2.7.14 and also on 2.8.1 i get the error: pycall(remap.cycle-prolog)failed when i try to run G84.3 ....

I have tried to look for the fix/problem on the forum and mailing lists but couldnt come up with anything

Any advice will be apreceated.

Thanks
Henk

Please Log in or Create an account to join the conversation.

More
14 Oct 2021 11:45 #223074 by andypugh
Are these remaps that you have written yourself, or from someone else?

Please Log in or Create an account to join the conversation.

More
14 Oct 2021 11:55 #223078 by Henk
HI Andy
I am yet to write them, but couldnt get the example to work.

After re-reading the docs on remap, i realised it checks for a couple of things. If i start the spindle, set a feed rate and specify x,z,r p and q it works.....

no i want to figure out how to remove some of these checks, like R for instance....

Will ask again if i get stuck...

Please Log in or Create an account to join the conversation.

More
14 Oct 2021 19:00 - 14 Oct 2021 19:02 #223106 by Henk
Ok, so i got my own g code to run, a very basic thing right now, and I'm getting some unexpected results....

I assume it is because im using the cycle standard remap.py and stdglue.py that i copied from the sim config, which looks like it is intended for a typical drilling type cycle....

My knowledge of python and the interpreter lets me down here....

What i want to achieve is a simple turning cycle , say G77 X Z P Q r with R being optional. First test with X,Z  only looked something like this.... 

State before calling is  Spindle running, feed rate set, G90, G7 G21  G40....
G0 X100 Z200
G77 X90 Z150 

The o code subroutine looks like this...

o<g77> sub

#1=#<_x>   ;current position x, Maybe rather use #5420??
#2=#<_z>  ;current position z, Maybe rather use #5422??

G0 X#<X>   
G1 Z#<Z>   ;rapid to X position set in G77 line and feed to Z position 
G1 X#1   ;feed back to starting position
G0 Z#2   ;rapid back to starting Z position

o<g77> endsub

(excuse syntax errors, this was typed from memory, the actual is back at the shop on the machine)

When i call G77 as above, the x rapids to diameter 45 ( half of what it should be??) then feeds to Z150, feeds to diameter 50, then rapids to z200. 

cannot recall exactly now, but basically the X positions as a result of G77 is not what is expected. 

Im finding the remap doc a bit high level when it comes to the python part. Is there another reference i can use to make sense out of what is actually happening in the python part of this remap? remap.py and stdglue.py, assuming that it is what is causing this

The end result im aiming for is to create simple roughing cycles where from the current position, the material to the point X,Z specified in G77 will be removed with P as depth of cut and Q the end chamfer. ( P and Q being equal will result in a 45 degree end and later R if you want a radius in the corner)

Similar code later for facing...




 
Last edit: 14 Oct 2021 19:02 by Henk. Reason: added line for clarity...

Please Log in or Create an account to join the conversation.

More
15 Oct 2021 22:29 #223244 by andypugh
I think that maybe your X issue is radius / diameter mode.

Please Log in or Create an account to join the conversation.

More
16 Oct 2021 03:47 #223274 by Henk
I also thought so so I added a g7 before and after the sub. Still unexpected results.

I will post more detail about what exactly happens.

Please Log in or Create an account to join the conversation.

More
17 Oct 2021 05:20 #223361 by Henk
Ok, so I found my problem. 

Irrespective of G7 or G8 mode prior to calling G77 remapped code, the x position is exported as a radius value for use in the o code sub. If the sub is programmed in diameter mode, the x word value must be multiplied by 2…

​​​​​for example, G7 is active before calling G77 x100..... In the sub, parameter #<x> =50. 

Working now. 

Thanks

Please Log in or Create an account to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum