How to connect buttons and files.

More
15 Apr 2011 11:56 #8928 by Mike_Eitel
Yes Andy

Problem is that the phyton progarm is strting as soon as I press abutton.
Everithing is fine.... BUT the transfer to Axis button is missing, you just see a QUIT button.

I looked into the code and found an "If statement"

I replaced the line for quit by the same command as it would treat normaly...
But no reaction . Nothing is transfered into Axis.

I hope somebody can tell me how to get the python into Axis, when it's called via the M1xx statements.

MIKE

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

More
15 Apr 2011 12:00 #8929 by BigJohnT
Have you looked at the simple g code generators on the wiki site? They send g-code to Axis.

John

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

More
15 Apr 2011 12:00 #8930 by BigJohnT
Just looked at your M101 and yes you have...

John

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

More
15 Apr 2011 12:10 #8932 by Mike_Eitel
Yes John for sure

Very nide programs.... And I seached the web, but could not find more than those in the wiki pages.

They run fine and transfer to axis, as long as not started via M1xx

I fear that it's some kind of "environment" problem that can not be soved.
To be honest, I can modify the code, but do not understand who a phyton program is "embeddet" into Axis....

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

More
15 Apr 2011 12:10 #8933 by BigJohnT
This line determines if Axis it running:

IN_AXIS = os.environ.has_key("AXIS_PROGRESS_BAR")

I wonder if something is broken with that as I just ran face.py on my 10.04 with Axis sim up and running and I get Write to File instead of Send to Axis...

John

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

More
15 Apr 2011 12:12 #8934 by Mike_Eitel
Did you start by calling via pvycp button and renamed to a M1xx file in nc_files directory.
Thr effect is only occuring when started that way.

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

More
15 Apr 2011 12:16 #8935 by BigJohnT
No, I started it in a terminal so I could do a little debugging.

John

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

More
15 Apr 2011 12:24 #8936 by Mike_Eitel
Hi John
I did similar all time when modifiing the codes

And I started also via axis and file button .. works perfect

I started to workout how to solve with pyvcp, hal, ini, python. etc.
Did my prof of concepts. Tested all the -py you find in the tools directoy. Than I did all the pyvcp finish.
Last was copiyng to nc_files and renamimg to M1xx.
Started all of them via button. Super... Then I saw that transfer to Axis button was missing AT ALL programs.

Grrrr I'm frustrated... My stomache feeling is that there is a basic problem.... hope somebody can show me that I'm wrong.

Mike

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

More
15 Apr 2011 12:36 #8937 by BigJohnT
Seems like if you open the python with Axis the environment variable is there for the program... I'm guessing that executing the M101 is the same as running the program from a terminal so it is not spawned as a child process or something like that. I don't know off hand how to fix this. I think at one time I used the .axisrc file to add one to the Axis menu or something like that.

On another subject I have found that Deweys ngcgui to be much more powerful than the simple g code generators as you can string together several subroutines into a complete program. Something you can't do with the simple g code generators as they overwrite what is in Axis.

Hopefully someone that knows more than me can help you to get this up and going.

John

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

More
15 Apr 2011 12:54 #8940 by Mike_Eitel
Yes John I also hope there is somebody who van help me out of that hole.

I'm not a real programmer., have only some vague ideas about coding.
And I do not want to go the mgcgui way, seems to much effort for me.
Mike

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

Time to create page: 0.129 seconds
Powered by Kunena Forum