Java UI for linuxcnc

More
14 Jul 2021 15:19 #214755 by dgarrett
Replied by dgarrett on topic Java UI for linuxcnc
> you can omit the second line. It bloats the nml-status

yes -- in the master branch: --enable-toolnml" enables legacy
inclusion of the entire tool table (currently 1001
entries) in the status nml message but this provision
may be deleted in the future:

Ref:
github.com/LinuxCNC/linuxcnc/commit/2dbb2f640

> area, but I didn't found out yet, how to access live
> tooltable without that parameter.

> Any way - I consider my app as master in
> cnc-control-area, so I can process tooltable-file by
> myself (already implemented) and keep track of ongoing
> changes (not implemented yet).

You can access tool info using api commands provided in
src/emc/tooldata but as you mention, obtaining tool
info outside of LinuxCNC is surely the preferred
strategy.

In addition, in the master branch, an external
application can manage a tool database that can be
synchronized to changes made by gcode commands executed
in LinuxCNC:

Ref:
linuxcnc.org/docs/master/html/tooldatabase/tooldatabase.html

 

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

More
14 Jul 2021 16:24 #214762 by vmihalca
Replied by vmihalca on topic Java UI for linuxcnc
I think I have called ./configure without using
--with-realtime=uspace
Thanks to you, I have managed to install python-tk, I was not finding the package...

Now when I run again using
--with-realtime=uspace
, it ends up with the following error:
checking python version... OK
checking version of python libraries... python2.7
checking match between tk and Tkinter versions... 8.6
checking location of Python header files... /usr/include/python2.7
checking for Python headers... -I/usr/include/python2.7
checking for Python libraries... -lpthread -ldl  -lutil
checking whether the Boost::Python headers are available... yes
checking for boost::python shared library... 
configure: error: boost::python is required to build LinuxCNC

I have boost installed but I think its not the right version...

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

More
14 Jul 2021 18:14 #214767 by Reinhard
Replied by Reinhard on topic Java UI for linuxcnc
Hi Dewey,

thank you very much for your attention!
.

in the status nml message but this provision
may be deleted in the future

Well, I believe, that tooltable does not need to be part of status area, but I do believe, that linuxcnc backend should be able to serve tooltable on request. Don't know whether current nml-channels offer support for such data transfer ...

I studied your tooldata stuff and its api - and I think, that tool_database allows only a 1:1 connection, so if backend connects to tool_database, then no other process can connect tool_database. Therefore I consider current api as suboptimal or incomplete. As tool-settings can be changed by gcode, its obvious, that a client likes to get notified about changes in tooldata.
It would be ok, have just a boolean in status-area, that reflects, whether tooldata has been changed. Then a client could request tooltable, which in turn clears the tooldata-changed flag (just as an raw idea).
.

In addition, in the master branch, an external
application can manage a tool database that can be
synchronized to changes made by gcode commands executed

Compare tool_db api with a real database. Standard databases allow multiple clients and for so need read/write operations granted by access restrictions. I think, that linuxcnc backend should support multiple clients at the same time too.

A fast and simple alternative could be a tooltable-file in ramdisk. If the backend opens the file in write mode, no other process can get write access to the file. But any other process may open the file in read mode. That way no need for acl or any special handling like shared memory, but same speed with a lot simpler interface, that is supported by default by any programming language.
.

configure: error: boost::python is required to build LinuxCNC

Sorry, but I can't believe, that you already compiled linuxcnc on your machine.
You should read linuxcnc documentation on how to build linuxcnc from git repository.

If you already have installed boost python, then may be you only installed python 3 support? If so, you'll need to additionally install all python stuff for python 2

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

More
15 Jul 2021 06:41 #214811 by vmihalca
Replied by vmihalca on topic Java UI for linuxcnc
Hi, 

My first instalation of linuxcnc was with the purpose of contributing to migration of qtpyvcp library from python 2 to python 3, so the branch I've pulled initially was master-gtk3. The libs installed were for python3.
When I've tried using your lib, in the first place I did not realized that was an issue.
Then after discussions with you, I've pulled the master branch, and ran: 
[code]> cd linuxcnc-dev/src
> ./autogen.sh
> ./configure 
> make
[/code]
And it worked like this. However it didn't ran when I was specifiying 
 [code]./configure --with-realtime=uspace
[/code] 
Now I am trying to have boost for python 2.7 installed as the error I get now is: 
checking python version... OK
checking version of python libraries... python2.7
checking match between tk and Tkinter versions... 8.6
checking location of Python header files... /usr/include/python2.7
checking for Python headers... -I/usr/include/python2.7
checking for Python libraries... -lpthread -ldl  -lutil
checking whether the Boost::Python headers are available... yes
checking for boost::python shared library... 
configure: error: boost::python is required to build LinuxCNC
 

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

More
15 Jul 2021 14:35 #214877 by Reinhard
Replied by Reinhard on topic Java UI for linuxcnc
Hi,

as said, you have to ask you package-system for python2 packages. I can't help on that task. I've no idea of slack - never tried it.

I'm running debian - the least modern linux, but *imho* the most stable linux :)

linuxcnc installation is far from trivial. When I startet with linuxcnc i wrote an installation protokol, in case I have to do it again.
My steps where:
  • install base for development, with these packages:
    • build-essential
    • vim-gtk3
    • git
    • autoconf
    • autotools-dev
    • debhelper
    • pbuilder
    • bwidget
    • tclx
    • python-gtk2
    • libtk-img
    • libpci-dev
    • pkg-config
  • install glade: libglade2-0 libgladeui-2-6 python-glade2
  • clone github.com/LinuxCNC/linuxcnc.git
  • change into directory debian and run ./configure uspace noauto
  • check dependencies with dpkg-checkbuilddeps (from root of linuxcnc). This leaded to the following package list:
    • dh-python
    • libudev-dev
    • python-yapps
    • tcl8.6-dev
    • tk8.6-dev
    • libreadline-gplv2-dev
    • asciidoc
    • dblatex
    • docbook-xsl
    • dvipng
    • ghostscript
    • graphviz
    • groff
    • imagemagick
    • inkscape
    • python-lxml
    • source-highlight
    • texlive-extra-utils
    • texlive-font-utils
    • texlive-fonts-recommended
    • texlive-lang-cyrillic
    • texlive-lang-french
    • texlive-lang-german
    • texlive-lang-polish
    • texlive-lang-spanish
    • texlive-latex-recommended
    • w3c-linkchecker
    • xsltproc
    • asciidoc-dblatex
    • python-dev
    • python-tk
    • libxmu-dev
    • libglu1-mesa-dev
    • libgl1-mesa-dev
    • libglx-mesa0
    • libgtk2.0-dev
    • intltool
    • libboost-python-dev
    • libmodbus-dev
    • libusb-1.0-0-dev
    • psmisc
    • yapps2
    • libtirpc-dev
  • change into directory src and run ./configure --with-realtime=uspace
  • call make and [/b]make setuid[/b]
The following user(s) said Thank You: vmihalca

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

More
15 Jul 2021 21:11 #214934 by vmihalca
Replied by vmihalca on topic Java UI for linuxcnc
Finally I won the battle with version libraries and I have managed to successfully run
[b]./configure --with-realtime=uspace[/b]

Now when I try to run make, I get the following error...can't figure out yet how to fix it.
Attachments:

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

More
16 Jul 2021 02:26 #214981 by Reinhard
Replied by Reinhard on topic Java UI for linuxcnc
Just entering py_decodelocale in duckduckgo shows, that you are using python3 but compiled linuxcnc for python2.

So checkout your python installation.

On my system python --version says something like Python 2.7.xx, which is the same output like python2 --version - whereas python3 --version tells Python 3.7.xx.
looking at /usr/bin shows:
ls -l /usr/bin/python*
lrwxrwxrwx 1 root root       7 Mär  4  2019 /usr/bin/python -> python2
lrwxrwxrwx 1 root root       9 Mär  4  2019 /usr/bin/python2 -> python2.7
lrwxrwxrwx 1 root root       9 Mär 26  2019 /usr/bin/python3 -> python3.7

If on your system /usr/bin/python points to python3, you might want to write a wrapper for linuxcnc/scripts/rip-environment, where you add a directory to the system path variable, which contains a link to python2 called python.

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

More
16 Jul 2021 07:06 #214993 by vmihalca
Replied by vmihalca on topic Java UI for linuxcnc
To me it appears that its python2.7
vasilemihalca@INV1047:~/Geeking/linuxcnc/src$ python --version
Python 2.7.18
vasilemihalca@INV1047:~/Geeking/linuxcnc/src$ python2 --version
Python 2.7.18
vasilemihalca@IN

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

More
16 Jul 2021 07:10 #214994 by phillc54
Replied by phillc54 on topic Java UI for linuxcnc
You can configure master branch for python3 with:
./configure --with-realtime=uspace --with-python=python3 --with-boost-python=boost_python3-py37
An alterntive is to use master-gtk3 branch which I think defaults to python3
 

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

More
16 Jul 2021 07:13 #214995 by vmihalca
Replied by vmihalca on topic Java UI for linuxcnc
That is what I had initially, but I thought that JCNCScreen only works with master & python2.7

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

Time to create page: 0.173 seconds
Powered by Kunena Forum