NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 

Welcome, Guest
Username: Password: Remember me

TOPIC: Creating a GUI

Re:Creating a GUI 06 Aug 2012 07:29 #22910

  • BigJohnT
  • BigJohnT's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 5083
  • Thank you received: 102
  • Karma: 136
This is fantastic stuff.

Cradek also added that from python

import linuxcnc
x = linuxcnc.stat()
x.poll()
dir(x)

and that popped up a list of all the things in stat too. Then I could print type(x.dtg) and see what type it is and guess how to handle it...

Thanks so much for the help.

I can all ready see that I need to redesign my screen some but it sure is fun when it works...

Also I sorted out what gobject.timeout_add was all about with some help from mhaberler so that is cool too how that works.

John
The administrator has disabled public write access.

Re:Creating a GUI 06 Aug 2012 09:13 #22914

  • BigJohnT
  • BigJohnT's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 5083
  • Thank you received: 102
  • Karma: 136
Just wanted to let you know that I got the DRO to update using linuxcnc.stat()!

Taking notes now like a mad man...

Thanks
John
The administrator has disabled public write access.

Re:Creating a GUI 06 Aug 2012 09:30 #22915

  • cmorley
  • cmorley's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1520
  • Thank you received: 41
  • Karma: 89
oh great John!

a few things to remember:
you probably want to be able to switch from relative to absolute. (how about commanded vrs actual)
not sure if you use metric and imperial but that needs some careful conversions especially if you plan to be able to set the origin from your DRO.
Though setting the origin to zero is safe and easy and maybe enough.

Glad your having fun - and can't wait to see your tutorial on it.
Chris
The administrator has disabled public write access.

Re:Creating a GUI 07 Aug 2012 09:32 #22952

  • mhaberler
  • mhaberler's Avatar
  • OFFLINE
  • Moderator
  • Posts: 203
  • Thank you received: 9
  • Karma: 54
I've written up some documentation for the linuxcnc Python module.

www.linuxcnc.org/docs/2.5/html/common/python-interface.html

this is 'raw hide' - suggestions & improvements welcome.

- Michael
The administrator has disabled public write access.

Re:Creating a GUI 07 Aug 2012 13:35 #22958

  • BigJohnT
  • BigJohnT's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 5083
  • Thank you received: 102
  • Karma: 136
That was is a huge part of the puzzle when writing your own GUI's thanks for that mhaberler.

John
The administrator has disabled public write access.

Re:Creating a GUI 07 Aug 2012 20:48 #22963

  • cmorley
  • cmorley's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1520
  • Thank you received: 41
  • Karma: 89
hey John I looked at your tutorial..

couple things I noticed maybe you already know...
in 3b the python code...
This is not needed:

# language stuff I think
import gettext
LOCALEDIR = os.path.join(BASE, "share", "locale")
gettext.install("linuxcnc", localedir=LOCALEDIR, unicode=True)
gtk.glade.bindtextdomain("linuxcnc", LOCALEDIR)
gtk.glade.textdomain("linuxcnc")
TCLPATH = os.environ

Also when putting the new screen in /bin you don't need to remove the .py part.
DISPLAY=gui3.py
will work.
The reason I mention this is if someone is testing it is nice if the editor knows the file is python.

great work though! is your plan to add it to the official docs ?
The administrator has disabled public write access.
Time to create page: 2.047 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.