Expanding G55 with remap help!
04 Oct 2024 14:29 - 04 Oct 2024 15:12 #311286
by bhcfarkas
Expanding G55 with remap help! was created by bhcfarkas
Good morning- long time reader, first time caller!
I'm working on a project for my Tormach PathPilot using a rotary, very similar to how DWO on Haas controllers works. I'm using G54 as my center of rotation and G55 is where all my work is done. Essentially my subroutine is looking at the difference of G55 relative to center of rotation and calculating the cos/sin location after a rotation and applying the new "DWO" to G55. However, writing to G55 presents an issue should the subroutine be called a second time. SO, in order to rectify this issue I plan to setup a checksum of sorts using an if,else statement comparing G55 and what would be G55.1. G55 would be the updated DWO WCS and G55.1 would be the constant to do checksum against.
Now, reading this forum, all the documents, and digging through PP, I'm trying to put 2 and 2 together but I simply cannot follow how the remaps work. I see the various remaps in the .py and .ini files on PP but it's simply not clicking.
What I'd like to do is:
Establish #G55.1 and assign XnYnZn with numbered variables similar to the rest of the work coordinates. I'd like to write coordinates using a G10 L2 P# XnYnZn in the subroutine, or a similar fashion
Thanks in advance for any help!
I'm working on a project for my Tormach PathPilot using a rotary, very similar to how DWO on Haas controllers works. I'm using G54 as my center of rotation and G55 is where all my work is done. Essentially my subroutine is looking at the difference of G55 relative to center of rotation and calculating the cos/sin location after a rotation and applying the new "DWO" to G55. However, writing to G55 presents an issue should the subroutine be called a second time. SO, in order to rectify this issue I plan to setup a checksum of sorts using an if,else statement comparing G55 and what would be G55.1. G55 would be the updated DWO WCS and G55.1 would be the constant to do checksum against.
Now, reading this forum, all the documents, and digging through PP, I'm trying to put 2 and 2 together but I simply cannot follow how the remaps work. I see the various remaps in the .py and .ini files on PP but it's simply not clicking.
What I'd like to do is:
Establish #G55.1 and assign XnYnZn with numbered variables similar to the rest of the work coordinates. I'd like to write coordinates using a G10 L2 P# XnYnZn in the subroutine, or a similar fashion
Thanks in advance for any help!
Last edit: 04 Oct 2024 15:12 by bhcfarkas.
Please Log in or Create an account to join the conversation.
04 Oct 2024 15:14 - 04 Oct 2024 15:15 #311290
by Aciera
Replied by Aciera on topic Expanding G55 with remap help!
This example should create the 'G55.1' code that requires the operator to input X,Y and Z words and saves those values to numbered parameters #1,#2 and #3 respectively.
1. save the ngc code below as 'g551remap.ngc' to a folder in a path defined in your ini '[RS274NGC]' - 'SUBROUTINE_PATH':
2. Add this to the [RS274NGC] section of your ini file:
1. save the ngc code below as 'g551remap.ngc' to a folder in a path defined in your ini '[RS274NGC]' - 'SUBROUTINE_PATH':
o<g551remap>sub
M66 L0 E0 ;force sync, stop read ahead
#1 = #<X> ;save X value to parameter #1
#2 = #<Y> ;save Y value to parameter #2
#3 = #<Z> ;save Z value to parameter #3
M66 L0 E0
o<g551remap>endsub
m2
2. Add this to the [RS274NGC] section of your ini file:
REMAP = G55.1 modalgroup=1 argspec=XYZ ngc=g551remap
Last edit: 04 Oct 2024 15:15 by Aciera.
Please Log in or Create an account to join the conversation.
Time to create page: 0.094 seconds