More help required

More
4 years 7 months ago #237778 by Willheg
More help required was created by Willheg
Hello again knowledgeable ones.

I have asked a few questions in the past for a panel I am building and have managed from some research trial and error, and like i said questions an information from here to get almost everything working.

I will start by saying i'm running AXIS with a GladeVCP if this makes sense as I do not feel the need to make a full screen set for my application, and am not sure if I want to get that far into as I feel I have already gone to far as it is. But anyway, just after i started this panel I found Linuxcnc was being upgraded and I was to far in to even think about rewriting to the latest version that everything is on at the moment. Also don't know if my PC this machine runs on would handle the upgrade, might have a look one day soon but for now I would just like to get the panel I'm working on to work how I would like then see where I go from there.

Where I am stuck now is I have created a individual custom full screen error message window which works great with most errors, but I have found one that did not work, which is if the requested tool is not found in the database it would error the normal way but if I click the ok button it would quit linuxcnc out with a message as attached next:

The program 'axis' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 37213 error_code 3 request_code 15 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
/usr/bin/gladevcp:295: GtkWarning: GdkWindow 0x400001f unexpectedly destroyed
  gtk.main()
Shutting down and cleaning up LinuxCNC...
/usr/bin/gladevcp:295: GtkWarning: GdkWindow 0x4000003 unexpectedly destroyed
  gtk.main()
**** GLADE VCP ERROR:    X Protocol Error: 3
/usr/bin/linuxcnc: line 550:  4527 Killed                  $EMCTASK -ini "$INIFILE"

I have tried using a hidden gremlin viewer in my glade file and taking gcode_error to point to a scrip in my python file which works ok and brings up my custom window but it still brings up athe standard AXIS one as well and when I close the standard one it crashes Linuxcnc like before.

Any help on stopping the standard AXIS gcode error window appearing and make it use my new window that would be great.

Thanks for any help, pointers or anything.

William.

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

More
4 years 7 months ago #238116 by andypugh
Replied by andypugh on topic More help required
Maybe you can use a .axisrc file to modify Axis to not pop up error windows?

I have had a quick play around, but couldn't actually find the bit of axis.py that creates the error messages (overriding that would be the next part of the plan)

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

More
4 years 7 months ago #238192 by cmorley
Replied by cmorley on topic More help required
Do you have an embedded gladevcp panel?
X error seems to indicate it crashed for some reason.
Are you using it to pop an error window?
X errors are not in displayed in sync of the actual problem.

But you have a bigger problem.
linuxcnc can not reliably deliver error messages to more then one UI.
Errors are consumed by the reader so having more then one reader creates a race condition.
You would need to stop AXIS from reading linuxcnc's error status or piggyback the data off of it.

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

More
4 years 7 months ago #238276 by andypugh
Replied by andypugh on topic More help required

You would need to stop AXIS from reading linuxcnc's error status or piggyback the data off of it.
This was what I was trying to do, but I failed to find the bit of Axis that handles errors. (Or, possibly, I didn't edit the right axis.py file, I do have several on the dev machine) 
 

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

More
4 years 7 months ago #238703 by Willheg
Replied by Willheg on topic More help required
Hello again everyone,

Thanks for the replies, I will reread these when I get a better chance to look over them as I am currently on my phone and will see if I can find something in your replies.

If needs be I could zip up what I have so far and see if someone can make sence of what I have, but it is not clearly coded and a bit here and there.
hoping not to have to do this as like I say I have not tested it all in the real world to feel comfortable in releasing it to the wrong people.

To answer cmorley's question on it being an embeded panel, the answer is I think so, I am using the glavevcp command in the ini file and it shows on the right after axis loads.

I feel I am not far enough into it to make it all stand alone nor do I feel lije it will ever get far enough to be stand alone.

After posting my question I have been playing with remapping the T command and inserting my new window in it with external tool table checks everytime a T command is called, and just using INTERP_OK in place of INTERP_ERROR. This has sloved some of the issue but it now still loads all the gcode but advises about any errors in full screen.

The next bit I would like to try and  sort is if it errors to load a blank gcode so as the operator cannot run an error riden file, just trying to work out if this is possible.

Will keep playing round to see what i can find out there and what i can make happen from trile and error.

But as always if anyone has any pointers or info or abything please fire back at me.

Thank you all.

 

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

More
4 years 6 months ago - 4 years 6 months ago #241779 by Willheg
Replied by Willheg on topic More help required
Hello again all,

So upon some more tinkering and trying I am at wits end with this.

I have now managed to get some more errors to be caught by my python script but I have noticed I still don't manage to catch all of them if to many are sent at one, ie if I create a gcode file with 6 (msg, text) it sometimes catches 2, sometimes it will catch all 6, but very random. I am also trying to get it so that linuxcnc also pauses when it hits an error ar a msg or debug command but am still trying to get my head around how to achieve this. But this might be a matter for another day or topic.

Anyway back to my original issues, I managed to fix some of the axis error closing linuxcnc by remapping the "T" command to just run a INTERP_OK on everything. Probably not the best idea but trying to work round my issues.

So what I am wondering now is, would it be easier or better to save my frustrations that I am having by making a full panel (more work than I was hoping to have to do, but have used a lot of time already to get where I am and would love to just make this all work, although I'm almost ready to give up, not that that is what I will do yet as that's not me normally.) or keep trying to use just a "side bar" like I am currently trying to do.

Hope someone can enlighten me or inspire me on what I should do.

Thanks for reading.
Last edit: 4 years 6 months ago by Willheg. Reason: Added reply check box tick

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

Moderators: HansU
Time to create page: 0.101 seconds
Powered by Kunena Forum