Broke Gmoccapy trying to enable Tool Measurement

More
03 Apr 2016 16:21 #72630 by Quasirobo
Greetings!

I'm new to CNC, LinuxCNC, and Gmoccapy, and loving it. Really impressive stuff! My background is mainly in electronics, though I have experience in making mechanical prototypes for R&D as well.

To my darling new Taig mill I've added a PWM/Tachometer spindle (tach hooked to controller, open loop to LinuxCNC), and 2 limit switches per X, Y, and Z axis. I also have a 4th axis in my configuration, though I haven't used it because of a motor controller issue, soon to be resolved.

Gmoccapy (great interface, by the way) had seemed to be working well; the limit/home switches and spindle were working properly, I was able to jog the axes and it was accepting G code commands.

I added a touch-off sensor for the z-axis tool measurement, and attempted to enable the Tool Measurement functionality of Gmoccapy. Now, when I try to start LinuxCNC, the LinuxCNC logo is displayed, the Gmoccapy screen without any buttons is displayed for several seconds, then a LinuxCNC Errors report is generated.

I have gone through the documentation at length and read through many posts, but no luck. I'm learning a lot which is partly the point, but I'm also about ready to have a working machine! I've been staring at it too long so it's time to ask for help, and thanks in advance to anyone who will oblige. Please refer to the attached LinuxCNC file (with Configs, etc), and Error Report.

I realize that the orientation of my Z axis should be reversed (the DRO goes positive as it travels down, it should go negative), but the machine was functional and I'm hesitant to change it until I can verify that it's been done correctly.

Oliver

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

More
03 Apr 2016 17:23 #72633 by newbynobi
Hallo Oliver,

we will not be able to help you to solve the error, as we do not know what error is reported.
It is very probably, that there is a misconfiguration.

Please report the exact error command, there should be error files in your config dir.

Norbert

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

More
03 Apr 2016 19:17 #72642 by Quasirobo
Hello,

Sorry, I guess the files didn't get included! I'm not familiar with this forum, seems that maybe after selecting attachments I need to click "Insert". I'll give that a try:

File Attachment:

File Name: LinuxCNC_Errors2.txt
File Size:54 KB


File Attachment:

File Name: linuxcnc2.zip
File Size:66 KB


Just in case, here's the gist of it...
...
Starting TASK program: milltask
Starting DISPLAY program: gmoccapy
emc/task/emctask.cc 389: interp_error: File not open
File not open
emc/task/emctaskmain.cc 3011: can't initialize interpreter
**** GMOCCAPY GETINIINFO ****
Preference file path: gmoccapy_preferences
[]
**** GMOCCAPY INFO ****
**** gmoccapy screen 2 found ****
**** GMOCCAPY INFO ****
**** Invalid embeded tab configuration ****
**** No tabs will be added! ****
**** GMOCCAPY INFO ****
**** audio available! ****
**** GMOCCAPY INFO ****
**** No virtual keyboard installed, we checked for <onboard> and <matchbox-keyboard>.
**** GMOCCAPY INFO ****
**** replaced btn_zero_g92 to btn_block_height ****
**** GMOCCAPY INFO: Gcode.lang found ****
**** GMOCCAPY INFO : inifile = /home/oliver/linuxcnc/configs/Taig-01/Taig-01.ini ****:
**** GMOCCAPY INFO : postgui halfile = custom_postgui.hal ****:
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=8556
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
cant resolve path to 'python/toplevel.py'
Interp ctor: cant instantiate Python plugin
cant resolve path to 'python/toplevel.py'
Python plugin configure() failed, status = -5
Python plugin required for prolog=, but not available: 50:REMAP = M6 modalgroup=6 prolog=change_prolog ngc=change epilog=change_epilog
NGC file not found: ngc=change - 50:REMAP = M6 modalgroup=6 prolog=change_prolog ngc=change epilog=change_epilog
Python plugin required for epilog=, but not available: 50:REMAP = M6 modalgroup=6 prolog=change_prolog ngc=change epilog=change_epilog
/usr/bin/gmoccapy:153: RuntimeWarning: missing handler 'on_btn_load_state_changed'
self.builder.connect_signals( self )
/usr/bin/gmoccapy:238: GtkWarning: Invalid icon size 48

self.widgets.window1.show()

(gmoccapy:8609): GtkSourceView-CRITICAL **: gtk_source_language_manager_set_search_path: assertion `lm->priv->ids == NULL' failed
custom_postgui.hal:7: Pin 'pyvcp.spindle-speed' does not exist
8556
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
Attachments:

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

More
03 Apr 2016 22:03 - 03 Apr 2016 22:48 #72658 by cncnoob1979
custom_postgui.hal:7: Pin 'pyvcp.spindle-speed' does not exist

Here is your error. You have pyvcp.spindle-speed linked in your postgui_hal file. You need to comment that out or fix the issue you are having.
# **** force spindle at speed indicator true because we have no feedback ****

net spindle-at-speed => pyvcp.spindle-at-speed-led
sets spindle-at-speed true


The actual at speed LED is named this:
gmoccapy.spindle_at_speed_led

Here is how mine is linked:
net gmo-spindle-at-speed <= spindle-vfd.spindle-at-speed => gmoccapy.spindle_at_speed_led

The spindle RPM bar is called this:
gmoccapy.spindle_feedback_bar

Here is how mine is linked:
net hy-RPM <= spindle-vfd.Rott => vfd.spindle-speed => gmoccapy.spindle_feedback_bar

EDIT: Here is it listed in the Documentation under Gmoccapy [pdf pg 126] or linuxcnc.org/docs/2.7/html/gui/gmoccapy....pindle_feedback_pins
2.2.5.9
Spindle Feedback Pins
There are two pins for spindle feedback
• gmoccapy.spindle_feedback_bar
• gmoccapy.spindle_at_speed_led
gmoccapy.spindle_feedback_bar will accept an float input to show the spindle speed. gmoccapy.spindle_at_speed_led is an bit-pin to lit the GUI led if spindle is at speed.

I also noticed your tool change has a typo... should be:
net tool-change 	gmoccapy.toolchange-change  <= 	iocontrol.0.tool-change
net tool-changed 	gmoccapy.toolchange-changed <= 	iocontrol.0.tool-changed
net tool-prep-number 	gmoccapy.toolchange-number  <= 	iocontrol.0.tool-prep-number
net tool-prep-loop 	iocontrol.0.tool-prepare    <= 	iocontrol.0.tool-prepared

You have two of these: gmoccapy.toolchange-change
Last edit: 03 Apr 2016 22:48 by cncnoob1979.

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

More
04 Apr 2016 01:21 #72667 by Quasirobo
Thanks '79, that's awesome. I commented out the spindle pins in the postgui.hal file, and that got rid of half of the errors! I'll work on getting my custom fancy VCR motor tachometer to talk to Gmoccapy at a later date, right now it's a closed loop just to the motor controller (gets good torque at low speeds).

At first I still wasn't able to get the program to run, but I eventually figured out that the "macros" and "python" folders had to be in the specific folder under "Configs" (in my case "Taig-01"), not in the folder named "Configs" itself! Duh. Now at least I'm up and running.

Once I got Gmoccapy going again, while trying a small tool-change script I got an error that the Z value I selected for my tool change location was undefined, probably because it was positive. As I noted in my first post, I needed to invert the direction on that axis so down would be negative, I just got that done but had to quit for a while before I could test it. I also still need to correct that typo! Good catch.

One more strange thing has cropped up; when trying to load a gcode file, the folders all look empty! Don't think the typo would have anything to do with that... Ideas?

Thanks again!

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

More
04 Apr 2016 06:17 #72678 by newbynobi
@Quasirobo,

from Dokumentation:

The Change Position Section

This is not named TOOL_CHANGE_POSITION on purpose - canon uses that name and will interfere otherwise. The position to move the machine before giving the change tool command. All values are in absolute coordinates.

[CHANGE_POSITION]
X = 10
Y = 10
Z = -2


Is this information in your INI?

It does not matter if the value is positiv or negativ. But i strongly recommend to set up your machine according to standard, being Z down = negativ!

Norbert

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

More
04 Apr 2016 06:31 #72680 by Quasirobo
By changing the folder and sub-files permissions to Read & Write I was able to view the gcode files once (sorry, I'm new to Linux as well). Later though, when I looked for them using the "Load a new program" button, they were again invisible to Gmoccapy. I gave the gcode files .ngc extensions, then it could see them again. Very strange (to me, at least).

cncnoob1979, I wasn't able to find the typo that you mentioned; When you say "your tool change has a typo", does that means in my custom_postgui.hal file additions? One line has "change" in it where the next has "changed", which seems to be correct. If that's not what you meant, then I'm just not seeing it.

The Latest on Tool Measurement:
When I try to run a Tool Change using the automatic tool measurement (T1 M6, for example), the macro "change.ngc" is shown in the code window, but I get the error:
"! Named parameter # <ini_[change_position]z> not defined."

I did add [CHANGE_POSITION] etc. to the .ini file...

I was also getting an additional "Operator Message: Important Warning":
"G-Code error in change.ngc Near line 76 of /home/oliver/linuxcnc/configs/taig-01/macros/change.ngc File ended with no percent sign or program end."

The last line of the change.ngc macro had read "o<change> endsub [1]". For kicks, I moved the [1] to the next line and commented it out, then wrote M2 on the following line and the "Operator Message" went away (the above Error still happened), but that [1] was probably supposed to be there, seeing how it's in the original file I copied!

In advance, thank you for any assistance you may be able to offer, and thank you very much for your patience. This is my current file set:

File Attachment:

File Name: linuxcnc3.zip
File Size:78 KB
Attachments:

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

More
04 Apr 2016 06:35 #72681 by Quasirobo
Norbert, just missed your post, thank you. I have inverted my Z axis and reconfigured my limit switches, down is now the negative Z-axis direction. And yes, I had added the [CHANGE_POSITION] with the coordinates as instructed.

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

More
04 Apr 2016 07:13 - 04 Apr 2016 07:14 #72683 by newbynobi

By changing the folder and sub-files permissions to Read & Write I was able to view the gcode files once (sorry, I'm new to Linux as well). Later though, when I looked for them using the "Load a new program" button, they were again invisible to Gmoccapy. I gave the gcode files .ngc extensions, then it could see them again. Very strange (to me, at least).


not at all ;-)

You should see all files with *.ngc, *. png, *.gif, *.jpg and *.py as that is what is in your [FILTER] section of your INI, so if you want to see i.e. *.txt files, you need to add a line for that in the FILTER section.

The Latest on Tool Measurement:
When I try to run a Tool Change using the automatic tool measurement (T1 M6, for example), the macro "change.ngc" is shown in the code window, but I get the error:
"! Named parameter # <ini_[change_position]z> not defined."

I did add [CHANGE_POSITION] etc. to the .ini file...

I was also getting an additional "Operator Message: Important Warning":
"G-Code error in change.ngc Near line 76 of /home/oliver/linuxcnc/configs/taig-01/macros/change.ngc File ended with no percent sign or program end."

The last line of the change.ngc macro had read "o<change> endsub [1]". For kicks, I moved the [1] to the next line and commented it out, then wrote M2 on the following line and the "Operator Message" went away (the above Error still happened), but that [1] was probably supposed to be there, seeing how it's in the original file I copied!

In advance, thank you for any assistance you may be able to offer, and thank you very much for your patience. This is my current file set:


Please redo the changes on the change.ngc, as it must return a positive value to work!
Also do erase the M2, you will get the warning error, but otherwise it the main program may be interrupted.

I can not see an error in your config regarding the python stuff, so what release do you use?

Norbert
Last edit: 04 Apr 2016 07:14 by newbynobi.

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

More
04 Apr 2016 15:48 #72724 by Quasirobo
Ah ha! So that's what [FILTER] does. Excellent. I'm running an install from the Live/Install image of Debian Wheezy with LinuxCNC 2.7.4.
I'm starting to think that I might have accidentally deleted something important in an early effort to clean up my Configs folder, or that I mistakenly corrupted another file or folder along the way. Any simple way to check or fix this? I'm okay to reinstall LinuxCNC if necessary, though being brand-new to this whole Linux thing, I actually have no idea how to do that. Of course, less drastic measures to attempt first would be welcome!

Regards,

Oliver

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

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