Gmoccapy - A new screen for linuxcnc

More
09 Mar 2015 04:51 #56554 by newbynobi
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
09 Mar 2015 05:15 #56555 by franstrein
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.

More
09 Mar 2015 05:16 #56556 by franstrein
Oeps,

I see my code is not being properly indented in the forum...
Don't know how to do that. Can always send it in a PM if needed.

Frans

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

More
09 Mar 2015 05:21 #56557 by tekmobile

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


If i set the speed first in MDI etc it is OK

Normal machine happens if you just enable the machine then trying to run spindle in reverse

if you go forward its all fine but as soon as you try to go reverse you get that error when going back to stop or forward


Been using with Mach3 for a while but making the switch to linuxcnc so still learning how it all works.

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

More
09 Mar 2015 22:40 #56574 by Tom_R2E3
Hi Norbert, thanks for getting back to me.

In my local documentation for 2.6.7 it still quotes "gmoccapy.feed-override-counts"

If I change my postGUI.hal to "gmoccapy.feed-override.counts" then linuxCNC launches fine.

If I watch that hal pin (using HAL show) whilst turning my encoder, then the counter increases and decreases (as it should). However, this no longer has any effect on the feed override %. Has something else changed in the update?

Also is there a gmoccapy change log somewhere which I should be reading?

Many thanks

Tom

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

More
10 Mar 2015 02:14 - 10 Mar 2015 02:38 #56594 by newbynobi

If i set the speed first in MDI etc it is OK

Normal machine happens if you just enable the machine then trying to run spindle in reverse

if you go forward its all fine but as soon as you try to go reverse you get that error when going back to stop or forward


I just tested on sim with gmoccapy 1.5.2 and I am not able to reproduce that.
What version do you use?

I can produce that error only if I set MIN_SPINDLE_OVERRIDE = 0.0 in my INI and after starting the GUI set the spindle override slider to 0.0 and then switch the spindel on.

So I am pretty sure, you will just have to check your config.

But nevertheless, I did change the code to avoid that division by zero error (gmoccapy 1.5.2.2).

Norbert
Last edit: 10 Mar 2015 02:38 by newbynobi.

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

More
10 Mar 2015 02:17 - 10 Mar 2015 02:18 #56595 by newbynobi
@franstrein,

I will check on your patch and introduce it. I will check if it should be introduced in gmoccapy or getiniinfo.
But please give me some time.

Norbert
Last edit: 10 Mar 2015 02:18 by newbynobi.

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

More
10 Mar 2015 02:26 - 10 Mar 2015 02:28 #56597 by newbynobi
@tom,

n my local documentation for 2.6.7 it still quotes "gmoccapy.feed-override-counts"

If I change my postGUI.hal to "gmoccapy.feed-override.counts" then linuxCNC launches fine.

If I watch that hal pin (using HAL show) whilst turning my encoder, then the counter increases and decreases (as it should). However, this no longer has any effect on the feed override %. Has something else changed in the update?

Also is there a gmoccapy change log somewhere which I should be reading?


Sorry, my mistake, I did not update all documentation.
you will have to set the hal pin "feed-override.count-enable" to True or 1 like
setp   feed-override.count-enable   1

or better connect that pin to a enable button, so an accidentally movement of the encoder will not cause any damage.

I will correct the docu as fast as possible.

I did name the new pins here

With every change I do update the release_notes.txt , but you will only find it on git releases in /linuxcnc-dev/src/emc/usr_intf/gmoccapy/

Norbert
Last edit: 10 Mar 2015 02:28 by newbynobi.
The following user(s) said Thank You: Tom_R2E3

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

More
10 Mar 2015 03:37 #56601 by tekmobile

If i set the speed first in MDI etc it is OK

Normal machine happens if you just enable the machine then trying to run spindle in reverse

if you go forward its all fine but as soon as you try to go reverse you get that error when going back to stop or forward


I just tested on sim with gmoccapy 1.5.2 and I am not able to reproduce that.
What version do you use?

I can produce that error only if I set MIN_SPINDLE_OVERRIDE = 0.0 in my INI and after starting the GUI set the spindle override slider to 0.0 and then switch the spindel on.

So I am pretty sure, you will just have to check your config.

But nevertheless, I did change the code to avoid that division by zero error (gmoccapy 1.5.2.2).

Norbert


I think its version 1.5.2 that's what it says on the settings page its the latest version that was installed by doing a update from apt on the latest binary iso

I will check see what I have in the INI file and change I'm not a new Linux user I have good knowledge but new to linuxcnc so still have lots to learn just trying to get everything set up the way I like it as a ex mach3 user I am very happy to make the switch your GUI is simply amazing

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

More
10 Mar 2015 23:09 #56637 by Clive S
Where is the correct place to ask questions re gmocappy :unsure: >>Clive

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

Moderators: newbynobiHansU
Time to create page: 0.335 seconds
Powered by Kunena Forum