New GUI for embedded systems

More
13 Sep 2018 13:34 #117456 by UnfinishedBusiness
Thanks for the link! The C++ code on that forum compiles and works!

The CC line they pointed to was for compiling it inside the linuxcnc source package. I used "g++ -o test test.cpp -lnml -llinuxcnc" and changed the includes from "emc.hh" and "emc_nml.h" to <linuxcnc/emc.hh> and <linuxcnc/emc_nml.hh> so it will compile against the linuxcnc that is already installed on the system. Also the nml file is at /usr/share/linuxcnc.nml

Hopefully, this information is useful for others as well!

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

More
14 Sep 2018 16:00 - 14 Sep 2018 16:25 #117536 by Grotius
Hi,

Nice, i think when you are ready, you have to do changes to the makefile. During compiling it would follow your modified makefile file i think. I would be interested if you have succes with separating the halui commands. Then your hmi interface can be separeted from python code and be written full in C or C++ (i have only used c so far). I like that. Feel free to show your example.

Later on it is usefull to implement fpga connections. This is the future of embedded cnc systems.
Last edit: 14 Sep 2018 16:25 by Grotius.

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

More
15 Sep 2018 16:02 #117579 by Grotius
@Travis,

Peronal mail contact is not working at this forum.
You can do it by : michelwijnja
Add @
Add gmail.com
And you are ready.

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

More
15 Sep 2018 16:10 #117580 by UnfinishedBusiness
Grotius - Thanks for letting me know. I'll re-send to that address.

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

More
15 Sep 2018 18:37 #117583 by Grotius
Hi Travis,

Thanks for your invitation.
I tried to install your version.

-compiling go's good, i saw 2 warning's, can be c language warning's during compiling. not important right now.
-installing make and make clean go's good.
-./launch works, but then it stopped.
-rename a working ini startup icon into your name got following error,
for example : startup icon : /usr/bin/linuxcnc '/home/grotius/xmotion/configs/Gen2/Gen2.ini'



Maybe i missed something?
If the application will start i can make time for investegate your code.
Attachments:

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

More
15 Sep 2018 19:28 #117584 by UnfinishedBusiness
Grotius - Do you already have a LinuxCNC config that is running on an actual machine? If so, do a make install and edit the INI for that machine and set "display = Xmotion". Then from a TTY without X running, type linuxcnc /path/to/your/ini

Let me know how that works!

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

More
17 Sep 2018 13:32 #117655 by Grotius
Hi Travis,

I started a working axis config first.
Then i started the grotius gui to try.

I typed : linuxcnc path to ini, and i changed the display name into Xmotion.

See pic's



Can you solve this issue? I like to start up your application.
Attachments:

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

More
17 Sep 2018 15:02 #117660 by UnfinishedBusiness
Hey Grotius,

Do a git pull, make clean, then make. I made some changes over the weekend. Where it's complaining about the thcud pin is because I somewhat had it hardwired into my plasma configuration. I disabled the linuxcnc interactions while I develop the viewer, but you can still open the GUI and have a look around.

I notice you are trying to launch this with X open. You need to fallback to a TTY (Like Alt-F1) and kill X before launching this.

Also I noticed it's complaining about your keyboard and mouse devices. Make sure you copy the config_example.ini to /etc/Xmotion/config.ini and set the mouse and keyboard variables in the ini to the respective devices otherwise when the GUI opens you won't have keyboard or mouse input and the system will feel 'frozen' beacuse it's in KGRAPHICS mode and won't respond to a Ctrl-C or anything.

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

More
17 Sep 2018 19:32 #117665 by Grotius
Hi Travis,

It starts.

I did a git clone, compiled the code and make a Xmotion directory, copied the config.ini file :

mkdir /etc/Xmotion and then
cp config_example.ini /etc/Xmotion/config.ini

To start the application :

I did keyboard function : Cntr + Alt + F1.
Then i got a kind of TTY1 terminal and typed : cd xmotion (my git clone was called xmotion)
Then i did : ./launch
It started up.

To close the terminal i did Cntr + Alt + F7.


After reboot i copied this :
[system]
mouse_device=/dev/input/mice
keyboard_device=/dev/input/event0

[motion]
max_jog_speed=600
default_jog_speed=600
into the top of the file /etc/Xmotion/config.ini

This was not enough to make the keyboard and mouse working. I looked for mice. But that is a good choice.

Wow. Can you explain how this works? It's completely different from what i am programming for 2 years now.

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

More
17 Sep 2018 19:50 - 17 Sep 2018 19:51 #117666 by UnfinishedBusiness
Hey Grotius,

Figure out what /dev/input/eventX device is your keyboard and which is your mouse, this will vary from system to system. I'll probably figure out a way to solve this automatically later. Use "cat /dev/input/event[0-watever]" then move mouse/type on keyboard to figure out which is for mouse and which is for the keyboard. Also, I should note that the old way of reading the mouse /dev/input/mice is not compatible, I had to switch to the new event way in order to capture the scroll events.

It works by dealing directly with the framebuffer and input/output devices. It's being developed for use on embedded systems with fairly limited resources, but also compatible with any linux system in general. We also like the idea of getting away from the "Desktopish Looking" CNC control. The idea is that the user will never leave this machine interface and every action that needs to be performed will be available inside this UI.

Once you have the GUI open with keyboard and mouse working, hit Alt-F1 on your keyboard to open a "terminal like" window.

input "kill" followed by enter to kill the GUI
input "sim=true" followed by enter to simulate motion on the DRO and Indicators

See src/utils/terminal.c for a full list of commands. If it's not in the list, the command executes as an MDI.

In about a week I should have the linuxcnc communication sorted out and this UI will be capible of Homing, touching off, jogging, mdi, and auto mode

If you wan't to try and use the linuxcnc functionality that currently exists, take a look at src/linuxcnc.cpp, the basis functionality is currently commented out in the repo so I can develop the gcode viewer without having to launch the RTAPI every iteration.

Thanks,
Travis
Last edit: 17 Sep 2018 19:51 by UnfinishedBusiness.

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

Time to create page: 0.118 seconds
Powered by Kunena Forum