Gmoccapy - A new screen for linuxcnc

More
11 years 7 months ago #56484 by franstrein
Replied by franstrein on topic Gmoccapy - A new screen for linuxcnc
Hi,

While running gmoccapy 1.5.2 I think I found a small bug... :-).
I do not yet have a virtual keyboard installed, need to configure that still.
Therefore the keyboard button on the UI is not active. That is correct.

However, I was exploring how to run my own macro from GMOCCAPY, and discovered that also the "Stop a running Macro'" button (Red cross?) on the same position in the UI is not active either.
Is this expected behavior, are should that button be active when executing the macro?

Thanks,
Frans

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

More
11 years 7 months ago #56498 by newbynobi
Replied by newbynobi on topic Gmoccapy - A new screen for linuxcnc
Good found,

it is a bug!
Will correct that as fast as possible.

Norbert

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

More
11 years 7 months ago #56506 by newbynobi
Replied by newbynobi on topic Gmoccapy - A new screen for linuxcnc
Macro Button Bug is solved, I have pushed 1.5.2.1 to 2.6 ; 2.7 and master

I also introduced a French translation!
Thanks for Francis for that beautiful work!

Norbert

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

More
11 years 7 months ago - 11 years 7 months ago #56548 by tekmobile
Replied by tekmobile on topic Gmoccapy - A new screen for linuxcnc
Just upgraded to 1.5.2 and getting this error when putting the spndle in reverse then trying to stop or go forward

Found an error!
The following information may be useful in troubleshooting:

Traceback (most recent call last):
File "/usr/bin/gmoccapy", line 2781, in on_rbt_reverse_clicked
self._set_spindle( "reverse" )
File "/usr/bin/gmoccapy", line 2819, in _set_spindle
rpm_out = rpm / self.stat.spindlerate
ZeroDivisionError: float division by zero
Last edit: 11 years 7 months ago by tekmobile. Reason: missing info

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

More
11 years 7 months ago #56554 by newbynobi
Replied by newbynobi on topic Gmoccapy - A new screen for linuxcnc
Do you get the error also if you set the spindle in forward first?
Real machine or sim?

Try to set spindle speed with S 450 first.

Please report, so I can check and catch the error.

Norbert

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

More
11 years 7 months ago #56555 by franstrein
Replied by franstrein on topic Gmoccapy - A new screen for linuxcnc
Hi Norbert (and the others..),

As shown in my last post , I started to use the macro facility for supporting small repetitive tasks, for which a CAM system is too much effort.

While configuring that, I ran into the problem that the subroutines_path in the RC274NGC sectio in the ini file, is supposed to support multiple directory definitions, separated by a colon, :. (According to the linuxcnc documentation).

The GMOCCAPY.PY program is not supporting that function, it assumes the parameter contains only a single path.
Therefore I coded, and tested (in simulation mode on a 2.8 pre version) , a small code change.

This is what I changed in gmoccapy.py, starting at line 1768:

# What to do if a macro button has been pushed
def _on_btn_macro_pressed( self, widget = None, data = None ):
o_codes = data.split()
subroutines_path = self.get_ini_info.get_subroutine_path()


if not subroutines_path:
message = _( "**** GMOCCAPY ERROR ****" )
message += _( "\n**** No subroutine folder or program prefix is given in the ini file **** \n" )
message += _( "**** so the corresponding file could not be found ****" )
dialogs.warning_dialog( self, _( "Important Warning" ), message )
self._add_alarm_entry( message )
return
# Start of modification by Franstrein to support multiple directories, separated by colons, : .
# Created on top of the 1.5.2.1 version. Done on March 8, 2015
files = subroutines_path.split(":")
macrofound = False
counter = 0
while not macrofound and counter < len(files) :
file = files[counter] + "/" + o_codes[0] + ".ngc"
if os.path.isfile(file):
macrofound = True
counter += 1
if not file:
message = _( "**** GMOCCAPY ERROR ****" )
message += _( "\n**** File %s of the macro could not be found ****\n" % [o_codes[0] + ".ngc"] )
message += _( "**** we searched in all subdirectory %s ****" % subroutines_path )
dialogs.warning_dialog( self, _( "Important Warning" ), message )
self._add_alarm_entry( message )
return
# End of modification FransTrein, March 8, 2015


Could you add this (if myy coding is acceptable :) ) to the official version?

I did this as a trial to setup a development and simulation environment (using VMWare), and might try an attempt on some more macro related improvements I would like to have.

Thanks,
Frans

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

Moderators: newbynobi, HansU
Time to create page: 0.378 seconds
Powered by Kunena Forum