- Posts: 486
- Thank you received: 0
Java UI for linuxcnc
5 years 3 months ago #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
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 to join the conversation.
5 years 3 months ago #214762
by vmihalca
Replied by vmihalca on topic Java UI for linuxcnc
I think I have called ./configure without using
Thanks to you, I have managed to install python-tk, I was not finding the package...
Now when I run again using
, it ends up with the following error:
I have boost installed but I think its not the right version...
Code:
--with-realtime=uspace
Now when I run again using
Code:
--with-realtime=uspace
Code:
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 to join the conversation.
5 years 3 months ago #214767
by Reinhard
Replied by Reinhard on topic Java UI for linuxcnc
Hi Dewey,
thank you very much for your attention!
.
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).
.
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.
.
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
thank you very much for your attention!
.
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 ...in the status nml message but this provision
may be deleted in the future
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).
.
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.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
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.
.
Sorry, but I can't believe, that you already compiled linuxcnc on your machine.configure: error: boost::python is required to build LinuxCNC
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 to join the conversation.
5 years 3 months ago #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]
And it worked like this. However it didn't ran when I was specifiying
[/code]
Now I am trying to have boost for python 2.7 installed as the error I get now is:
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:
[code]> cd linuxcnc-dev/src
> ./autogen.sh
> ./configure
> make
And it worked like this. However it didn't ran when I was specifiying
Code:
[code]./configure --with-realtime=uspace
Now I am trying to have boost for python 2.7 installed as the error I get now is:
Code:
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 to join the conversation.
5 years 3 months ago #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:
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]
Please Log in to join the conversation.
5 years 3 months ago #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
Now when I try to run make, I get the following error...can't figure out yet how to fix it.
Code:
[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.
Please Log in to join the conversation.
5 years 3 months ago #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:
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.
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:
Code:
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 to join the conversation.
5 years 3 months ago #214993
by vmihalca
Replied by vmihalca on topic Java UI for linuxcnc
To me it appears that its python2.7
Code:
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 to join the conversation.
5 years 3 months ago #214994
by phillc54
Replied by phillc54 on topic Java UI for linuxcnc
You can configure master branch for python3 with:
An alterntive is to use master-gtk3 branch which I think defaults to python3
Code:
./configure --with-realtime=uspace --with-python=python3 --with-boost-python=boost_python3-py37
Please Log in to join the conversation.
5 years 3 months ago #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 to join the conversation.
Time to create page: 0.107 seconds
