Need help in running a simple 3 button UI using Glade

More
02 Sep 2022 07:54 - 02 Sep 2022 17:47 #250980 by vkhargwanshi
 

File Attachment:

File Name: errorlog.txt
File Size:2 KB
 

File Attachment:

File Name: errorlog.txt
File Size:2 KB
I am in need of a very simple UI which just allow user to run 3 GCode programs with help of UI. user not required to know anything about plots or anything.

I am working on Raspberry pi 4B. I plan to use Glade.
While going through available tutorial I observed that I should have Glade-gtk2, but unable to find this for raspberry pi4B, so got the glade which ever available. Currently could install 3.38.2 version. I am able to open the UI, create sample UI screen using buttons what I need. 

I came across following problem. Kindly help

1) I couldn't find any document on how should I start running the gcode file on press of button. Where can I find the doc for same?
2) I tried running sample linuxcnc configs/sim/axis/gladevcp/gladevcp_panel.ini   But it failed with errors in attached file. Is it due to glade version? if so where can I find the Glade-GTK2

 
Attachments:
Last edit: 02 Sep 2022 17:47 by vkhargwanshi.

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

More
02 Sep 2022 08:30 #250982 by HansU
Do you want to use AXIS or doesn't it matter?
For example in GMOCCAPY you can define very simple macros which execute G-code:
linuxcnc.org/docs/html/gui/gmoccapy.html#gmoccapy:macros

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

More
02 Sep 2022 09:40 #250986 by vkhargwanshi
It doesn't matter as i just want 3 buttons to be visible to user. User is not expected to know what how and so on...

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

More
02 Sep 2022 10:53 #250987 by phillc54
The Python interface would probably supply what you need.
linuxcnc.org/docs/devel/html/config/python-interface.html

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

More
02 Sep 2022 12:49 #250998 by vkhargwanshi
Looks like this will be the one helpful. But then i m not getting complete picture. I need to write python script and provide all required parameters for initialisation including ui then poll..

Any sample would be helpful.

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

More
02 Sep 2022 16:49 #251024 by cmorley
What version of linuxcnc are you using?

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

More
02 Sep 2022 16:59 #251029 by vkhargwanshi
I am using 2.9 version. Synched latest and built code 3 days back

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

More
02 Sep 2022 17:07 #251031 by cmorley
you list of errors was not attached.
Gladevcp in master uses GLADE3 and python3

I take it you want to build a completely custom ui - not a panel attached to an existing screen.
Gladevcp or Qtvcp would be capable of this.

How will the user be expected to home machine - do they need to set an origin?

Chris

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

More
02 Sep 2022 17:50 #251047 by vkhargwanshi
Sorry didn't observe that file didn't get attached.. Just added in original message.

I will provide a small GCode to bring the machine to home. So basically to move one gcode to allow movement in predefined manner. Then emergency stop and another gcode for bringing machine to home.

As you said gladevcp can be used, but I couldn't get it working as expected and I couldn't understand which command to use for running GCode.. I believe EMC Run should work.. but couldn't find details on how to pass an argument and how the HAL file is connected to this custom UI..

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

More
02 Sep 2022 18:08 #251051 by cmorley
I would use the new gladevcp libraries to do this:
linuxcnc.org/docs/devel/html/gui/gladevcp-libraries.html
Should be more straight forward.
So a gladevcp panel with a few buttons that connect to a python handler file that calls the functions such as
ACTION.OPEN_PROGRAM()
ACTION.RUN()

Surely lots of details left out.

Again if it was I, i would develop this as a side panel on AXIS untill you get it to the point that you can do everything from the panel then use the panel directly instead of AXIS.

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

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