- Posts: 45
- Thank you received: 2
X-Z DRO for Lathe
- rubes
- Offline
- Senior Member
-
Less
More
10 years 7 months ago - 10 years 7 months ago #70881
by rubes
Replied by rubes on topic X-Z DRO for Lathe
Ah...now I understand your concern. I don't know about the OP, but I wasn't thinking about hiding the alternate display. I think your approach of changing the background color depending on the radius or diameter mode is great. For me, initially it was just seeing the R or D in place of the X I'm used to. I was just thinking of a simple label change and leaving everything else the same.
R(X), D(X), Z
or
X(R), X(D), Z
R(X), D(X), Z
or
X(R), X(D), Z
Last edit: 10 years 7 months ago by rubes. Reason: clarification
Please Log in or Create an account to join the conversation.
- mpvriens
- Offline
- Premium Member
-
Less
More
- Posts: 100
- Thank you received: 0
10 years 7 months ago #70892
by mpvriens
Replied by mpvriens on topic X-Z DRO for Lathe
For me changing the R into X would be sufficient , I do thing further more this screen works great to me
Marius
Marius
Please Log in or Create an account to join the conversation.
- fixer
- Offline
- Premium Member
-
Less
More
- Posts: 132
- Thank you received: 27
10 years 7 months ago #71455
by fixer
Replied by fixer on topic X-Z DRO for Lathe
Hi,
I am preparing for my lathe conversion, and one of the first thing to change was exactly that.
attached you will find my gmocapy.py. The code won't run with your glade file, because there are a lot of other changes too, but you should be able to find those wich affect DRO.
It shows X and Z when in diameter mode, and R and Z when in radius mode. I have my machine set to diameter mode in startup default G-codes in ini file.
change switch_to_g7()
and simply hide the Y DRO in init
I am preparing for my lathe conversion, and one of the first thing to change was exactly that.
attached you will find my gmocapy.py. The code won't run with your glade file, because there are a lot of other changes too, but you should be able to find those wich affect DRO.
It shows X and Z when in diameter mode, and R and Z when in radius mode. I have my machine set to diameter mode in startup default G-codes in ini file.
change switch_to_g7()
Code:
def _switch_to_g7( self, state ):
if state:
self.widgets.Combi_DRO_x.set_property( "abs_color", gtk.gdk.color_parse( "#F2F1F0" ) )
self.widgets.Combi_DRO_x.set_property( "rel_color", gtk.gdk.color_parse( "#F2F1F0" ) )
self.widgets.Combi_DRO_x.set_property( "dtg_color", gtk.gdk.color_parse( "#F2F1F0" ) )
self.widgets.Combi_DRO_y.set_property( "abs_color", gtk.gdk.color_parse( self.abs_color ) )
self.widgets.Combi_DRO_y.set_property( "rel_color", gtk.gdk.color_parse( self.rel_color ) )
self.widgets.Combi_DRO_y.set_property( "dtg_color", gtk.gdk.color_parse( self.dtg_color ) )
self.diameter_mode = True
self.widgets.Combi_DRO_x.set_to_diameter( True )
self.widgets.Combi_DRO_x.change_axisletter( "X" )
self.widgets.Combi_DRO_y.set_property( "abs_color", gtk.gdk.color_parse( "#F2F1F0" ) )
self.widgets.Combi_DRO_y.set_property( "rel_color", gtk.gdk.color_parse( "#F2F1F0" ) )
self.widgets.Combi_DRO_y.set_property( "dtg_color", gtk.gdk.color_parse( "#F2F1F0" ) )
self.widgets.Combi_DRO_x.set_property( "abs_color", gtk.gdk.color_parse( self.abs_color ) )
self.widgets.Combi_DRO_x.set_property( "rel_color", gtk.gdk.color_parse( self.rel_color ) )
self.widgets.Combi_DRO_x.set_property( "dtg_color", gtk.gdk.color_parse( self.dtg_color ) )
else:
self.widgets.Combi_DRO_y.set_property( "abs_color", gtk.gdk.color_parse( "#F2F1F0" ) )
self.widgets.Combi_DRO_y.set_property( "rel_color", gtk.gdk.color_parse( "#F2F1F0" ) )
self.widgets.Combi_DRO_y.set_property( "dtg_color", gtk.gdk.color_parse( "#F2F1F0" ) )
self.widgets.Combi_DRO_x.set_property( "abs_color", gtk.gdk.color_parse( self.abs_color ) )
self.widgets.Combi_DRO_x.set_property( "rel_color", gtk.gdk.color_parse( self.rel_color ) )
self.widgets.Combi_DRO_x.set_property( "dtg_color", gtk.gdk.color_parse( self.dtg_color ) )
self.diameter_mode = False
self.widgets.Combi_DRO_x.set_to_diameter( False )
self.widgets.Combi_DRO_x.change_axisletter( "R" )
and simply hide the Y DRO in init
Code:
# The Y DRO we make to a second X DRO to indicate the diameter
self.widgets.Combi_DRO_y.set_to_diameter( True )
self.widgets.Combi_DRO_y.set_property( "joint_number", 0 )
# we change the axis letters of the DRO's
self.widgets.Combi_DRO_x.change_axisletter( "X" ) #R
self.widgets.Combi_DRO_x.set_to_diameter( True )
self.widgets.Combi_DRO_y.change_axisletter( "D" )
self.widgets.Combi_DRO_y.hide()
Please Log in or Create an account to join the conversation.
- newbynobi
- Offline
- Moderator
-
Less
More
- Posts: 1931
- Thank you received: 394
10 years 7 months ago #71513
by newbynobi
Replied by newbynobi on topic X-Z DRO for Lathe
You did a strange change, as X is equal R, but D is X *2
Why such a strange behavior?
Norbert
Why such a strange behavior?
Norbert
Please Log in or Create an account to join the conversation.
- fixer
- Offline
- Premium Member
-
Less
More
- Posts: 132
- Thank you received: 27
10 years 7 months ago #71539
by fixer
I don't understand you, what is strange?
The default mode for me is diameter mode (G7). I want my machine to show X when in diameter mode as this is industry standard.
when in radius mode, the DRO shows R. This is only to clearly show that something is wrong (I forgot to program G7), as I will never use radius mode on a lathe, or at least very seldom.
My machine never shows D - comby_dro_y is hidden in the last line.
Replied by fixer on topic X-Z DRO for Lathe
newbynobi wrote: You did a strange change, as X is equal R, but D is X *2
Why such a strange behavior?
Norbert
I don't understand you, what is strange?
The default mode for me is diameter mode (G7). I want my machine to show X when in diameter mode as this is industry standard.
when in radius mode, the DRO shows R. This is only to clearly show that something is wrong (I forgot to program G7), as I will never use radius mode on a lathe, or at least very seldom.
My machine never shows D - comby_dro_y is hidden in the last line.
Please Log in or Create an account to join the conversation.
- newbynobi
- Offline
- Moderator
-
Less
More
- Posts: 1931
- Thank you received: 394
10 years 7 months ago #71552
by newbynobi
Replied by newbynobi on topic X-Z DRO for Lathe
If you are in Radius mode, G91 G0 X10 will move the axis 10 units
If you are in diameter mode G91 G0 X10 will move the axis 5 units
So for me it is more logic to display X being in radius mode and D being in Diameter mode.
You are doing it different to my understanding.
Norbert
If you are in diameter mode G91 G0 X10 will move the axis 5 units
So for me it is more logic to display X being in radius mode and D being in Diameter mode.
You are doing it different to my understanding.
Norbert
Please Log in or Create an account to join the conversation.
Moderators: newbynobi, HansU
Time to create page: 0.168 seconds