Releases: grotius-cnc/hal-core
update ruckig first moves recorded with 2 machines.
Improvemenst
- Added ONLINE and OFFLINE mode.
- First moves of the ruckig lib working with multiple machines in ONLINE mode.
simplescreenrecorder-2021-12-04_19.08.51.mp4
update
Improvements
- Machine mode & program mode states are functional in the halmodule.c
- Machine mode feeback is displayed by the gui button colors.
- Gcode restart from line is functional, it highlights the gcode line at the correct gcode file.
- Gcode displays "M" macro numbers. It can read a macro + macro value "P"
Todo
- Gui control, add "Macro" button to set a macro on and off. Used for activating tools in manual mode.
- Button for auto executing next gcode file in order.
- Button to switch between simulation and realtime ruckig, motion. (online and offline status)
gcode preview as QLabel vector.
Improvements
- Showing the gcode in a QTextEdit has a downside. Highlighting current gcode line is annoying. So i stopped with that.
- I tried QListwidgets, QTableview, etc. Every widget had a downside for showing the gcode.
- In the end i used a QLabel vector. Every gcode line is now inserted in a QLabel.
The labels can do:
- Rich text, colors, etc. The text is setup by a QTextEdit and then exported to a html format.
- The Qlabel can read the html format.
- Setting current gcode line highlighted is easy with using the Label vector. We just colorize the background of the label with the stylesheet.
- A nice tip is to use a empty qt project, then add the Qscrollarea, labels, spacer etc. Then compile and look at the ui_mainwindow.h file.
This file contains the code template and can be inserted into the project directly. - The labels are referenced by a std::vector<QLablel*> label;
including a nice textedit
Improvements
- Applied a QTextEdit. It shows colors, it filters out gcode only for different positions. It alignes text vertically without using a "\t" tab.
- Every loaded gcode is visible in the combobox chooser, showing the gcode filename. The combobox is choosing the stackedindex nr.
and showing the selected gcode - When a gcode is removed, the combobox and textedit (stackedindex) will shrink.
It's now almost time to go on with coding the gcode-runner.
Multiple gcode loaded.
busy with gcode.
controls working.
Nice starting point with several improvements
Improvements:
Projectname : /opt/hal-core/src/hal/components/matrix
-
Can load stringvectors from the hal command line, for example :
jointposvec=J0_X,410,0,0,3,J1_Y,0,700,0,4,J2_Z,0,0,500,5,
We use a c struct to create a rtapi mp_string_array. I had to figur this out. -
Setups dynamic gui controls and auto connect signal & slots.
This saves huge ammount's off time relating to gui designing. -
Kdl kinematics matrixes and Opencascade Trsf matrixes are now connected to each other by a double[4][4] interconnecting matrix.
This results in a failsafe output, where kdl and opencascade are exact on the same output level. Before we used seperated
matrixes without checking them visa versa. When i had a error i could not retrack, i desided to setup this failsafe solution.
Edit: Added new archive. In previous archive was a tiny bug related to loading a single or multiple machines. It could be a typo.
Qt debugging for 2 hours didn't find the problem.
I had to go back one backup, and copy and paste some updated code. This was done in a few minutes.
Edit: Added new archive, found the bug and found workaround, also informed lcnc: Bug LinuxCNC/linuxcnc#1413
So far so good !
in between update.
Hi,
This is a archive where skynet has loaded a gcode file and previewed it in opencascade and a textbox.
The gcode can be moved around in 3d.
It is now almost ready to create the gcode trajectory planner cq. runner that lives in:
/opt/hal-core/src/hal/components/skynet/cpp_interface/libgcode/gcode_interface.cpp
In a nutshell:
The gcode trajectory is done by a single Dofs scurve motion planner. Then the results of the single Dofs
are interpolated into cart xyz and euler xyz TCP coordinates.
When the trajectory planner is ready:
The machine will then try to follow the TCP gcode coordinates every 1ms in AUTO mode.
If the machine is not capable of following the gcode path with current hal setup parameters like maxvel etc.
A message will be shown in the format of "follow error= .. mm". And it will record a max follow error.
including ruckig motion
Archive including the ruckig motion for jogging.
This motion can be turned on and off by a checkbox.
including a few hal output pins to connect to motors. Updated every 1ms for position and acceleration.
simplescreenrecorder-2021-11-16_14.15.30.mp4
.