bassplaya69er
Electrical
- Dec 28, 2011
- 11
Hi,
i am in the process of working the kinks out of a DIY post i've made for a BOSCH cc120 used to control a router.
i use G54 - G57 as references for the 4 corners of the machines bed, and regularly use 54 and 55 when flipping a sheet over to machine on both sides.
i have a custom command in my post to output the fixture offset +53 and to stop the machine and move to a position for easy loading.
the custom command is placed in start of operation.
problem is this outputs the reference in between every operation, which is quite annoying when on G55 !
i have tried puting the whole thing in to something like: "if {$workoffset != [expr $mom_fixture_offset_value +53]} type s
#Set work offset & stop machine to alow for part repositioning at G55 and above
#
global mom_fixture_offset_value
global workoffset
global workoffsetchange
set workoffset [expr $mom_fixture_offset_value +53]
if {$workoffset >= 55} {
MOM_output_literal "M05"
#Stop spindle
MOM_output_literal "M09"
#Raise Head
MOM_output_literal "G53"
#Switch to MCS
MOM_output_literal "G0X1220Y1220Z0"
#move to loading postion
MOM_output_literal "M55"
#UnClamp Right
MOM_output_literal "M57"
#UnClamp Left
#MOM_output_literal "M51"
#VacPump 1 off
#MOM_output_literal "M53"
#VacPump 2 off
MOM_output_literal "M00"
#Stop program
MOM_output_literal "(FLIP/REPOSITION STOCK TO G$workoffset)"
#Operator message
}
MOM_output_literal "G$workoffset"
i have tried puting the whole thing in to something like:
"if {$workoffset != [expr $mom_fixture_offset_value +53]}
but im guessing the global variables are only global to the custom command, not the whole post?
anyone have a good idea of another way around this?
i would also like to change stop conditions, so rather than being >= g55, it will stop on the first offset change, allowing me to use G55 as the first side and G54 as the second side, purly for flexibility realy.
any help very appreciated.
i am in the process of working the kinks out of a DIY post i've made for a BOSCH cc120 used to control a router.
i use G54 - G57 as references for the 4 corners of the machines bed, and regularly use 54 and 55 when flipping a sheet over to machine on both sides.
i have a custom command in my post to output the fixture offset +53 and to stop the machine and move to a position for easy loading.
the custom command is placed in start of operation.
problem is this outputs the reference in between every operation, which is quite annoying when on G55 !
i have tried puting the whole thing in to something like: "if {$workoffset != [expr $mom_fixture_offset_value +53]} type s
#Set work offset & stop machine to alow for part repositioning at G55 and above
#
global mom_fixture_offset_value
global workoffset
global workoffsetchange
set workoffset [expr $mom_fixture_offset_value +53]
if {$workoffset >= 55} {
MOM_output_literal "M05"
#Stop spindle
MOM_output_literal "M09"
#Raise Head
MOM_output_literal "G53"
#Switch to MCS
MOM_output_literal "G0X1220Y1220Z0"
#move to loading postion
MOM_output_literal "M55"
#UnClamp Right
MOM_output_literal "M57"
#UnClamp Left
#MOM_output_literal "M51"
#VacPump 1 off
#MOM_output_literal "M53"
#VacPump 2 off
MOM_output_literal "M00"
#Stop program
MOM_output_literal "(FLIP/REPOSITION STOCK TO G$workoffset)"
#Operator message
}
MOM_output_literal "G$workoffset"
i have tried puting the whole thing in to something like:
"if {$workoffset != [expr $mom_fixture_offset_value +53]}
but im guessing the global variables are only global to the custom command, not the whole post?
anyone have a good idea of another way around this?
i would also like to change stop conditions, so rather than being >= g55, it will stop on the first offset change, allowing me to use G55 as the first side and G54 as the second side, purly for flexibility realy.
any help very appreciated.