Iam utilizing the cantext feature in MP to allow output of a canned text stringwithin the toolpath editor and I have the string for my canned text built andget the output I want (which is to change the spindle speed at a certain pointin the tool path) I am coupling a Misc. Int (mi9$) to my cantext string so theoutput of the new spindle speed can be variable when I choose to implement thisoption when needed.
My issue is that when I use the toolpath editor to place this cantext at a givenlocation or section in the toolpath I would like to have the spindle speedto revert back to the initial speed following the edited zone of the toolpaththat I edited within the toolpath editor.
I have tried several things and you can see I have remed out (#) some things Ihave tried but still cannot the initial spindle speed to output.
This is in the pcant_out post block <build text string section> I amusing the number 5 cantext$ register. It would be nice ifspindle speed was an available option in the tool path editor whereas currentlyfederate is only option along with several others but not spindle speed. Thecanned text looked like my only avenue to do this. I looked into thechange at point for the chained geometry but it’s greyed out and not selectablemaybe because it is an open chain or this is only available for WIRE and notmill IDK.
pcant_out #Canned text - build the string for output
#Assign string select type outputs
if cant_pos < three, #cant_pos indicates canned text output
[
ifcantext$= three, bld = one
ifcantext$= four, bld = zero
#Build the cantext string
ifcantext$= one, strcantext = strcantext + sm00
ifcantext$= two, strcantext = strcantext + sm01
ifcantext$= five, #strcantext= strcantext + strs + ss$ dpdppdpdpdppdpdppdpp
[
#prv_speed = ss$
#ss$ = mi9$
strtextno = no2str(mi9$)
strcantext = strcantext + strs+ strtextno
#if speed <>prv_speed, speed = prv_speed
#speed = prv_speed
#!speed #, *speed
]
else,
ifcantext$> five,
[
strtextno = no2str(cantext$)
strcantext = strcantext + strm +strtextno
]
]
else, #cant_pos indicates coolant output
[
coolant_bin = flook (two, cantext$) #Create binary value for each coolant usinglookup table
iffrac(cantext$/two), # coolant off
[
if all_cool_off,
[
if coolant_on, pbld, n$, sall_cool_off, e$
coolant_on = zero
]
else,
[
if coolant_on > 0,
[
coolant_on = coolant_on -coolant_bin/2 #Odd= off command, subtract appropriate binary value.
coolantx = cantext$ - 50 #Create a coolantx value for string select
pbld, n$, *scoolantx, e$
]
]
]
else, #Even = on command
[ #Determine if this coolant is already on
local_int = zero
coolantx = zero
suppress = zero
while local_int < 20 & coolant_on > 0,
[
result2 = and(2^local_int, coolant_on)
local_int = local_int + one
if result2 = coolant_bin, suppress = one
]
if suppress <> 1, #Don't output an on code for a coolant thatis already on
[
coolant_on = coolant_on +coolant_bin #Maintainbinary sum of all coolants currently on
coolantx = cantext$ - 50 #Create a coolantx value for string select
if cant_pos = four, *scoolantx #Coolant "With"
else, pbld, n$, *scoolantx, e$#Coolant "Before" or "After"
]
]
]