Search Results (Searched for: )
- hhscott
- hhscott
Python Probe Screen
Category: General LinuxCNC Questions
- grandixximo

LinuxCNC S-Curve Accelerations
Category: General LinuxCNC Questions
No apologies needed , I discussed this with YangYang. We agree this is a real issue on some hardware, but it should not be in the TP.The TP's job is to generate a geometrically correct path with proper dynamics. It does that. The path is correct.Transport delay compensation is a communication/hardware layer problem. Different drives, different bus cycles, different delays. Some drives have 0x60B1, some don't. Some run 250µs, some run 1ms. This varies per setup.Your HAL component is the right approach. It sits between TP output and drive input, users can tune lead_cycles and kff for their specific hardware. People who need it use it, people whose drives handle it properly don't.Keep the TP clean, keep hardware compensation in HAL. Well defined purposes.
My apologize ... sorry I can not show same speed test because I am currently weeks out of office but we can just multiply or devide values ... because it is linear dependecy during constant speed movemet ... I can just customize current images to show exact difference ... compensation off ferror = 0.125mm at 15m/min ... compensation on ferror = 0.00009028mm at 1m/min and multiply it by 15 we get 0,0013542mm which is significantly less then 0.125 .. What I remember from testing by my short eyes it whas something near 0.001mm during that 15m/min testing was done with bentch top setup without any load presented... just AX5106 with AM8xxx motor but I can go home for testing this weekend to create exact speed difference testing if it is neccessary
- Aciera

There seems to be a mistake in this pinout I found.
Category: General LinuxCNC Questions
2.
Still have no clue what could be wrong. The at speed light comes on but nothing in halshow. Could someone please guide me?
We might be able to if you actually told us what your are trying to do. You maybe want to connect a encoder to your spindle and are not getting the 'spindle-at-speed' signal to work in hal? Hardware used (a MESA board maybe)? If so which one?
- meister
- meister
Solving the USB Latency Dogma for HMI/MPG: Technical Feedback Request
Category: Driver Boards
2. Closed Firmware & 'Over-engineering' I respect the Open Source philosophy, but io_decoder is a professional project that includes dedicated hardware. The 'over-engineering' you see in the HAL driver is actually optimization. While a user-space component can work, a dedicated C component ensures deterministic polling and much lower jitter. If you want a 'professional feel' on the handwheel, those milliseconds matter.
ahh, ok, This is what professional code looks like when compiling.
halcompile --compile io_decoder.c
Compiling realtime io_decoder.c
io_decoder.c: In function ‘usb_thread_function’:
io_decoder.c:1119:60: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
1119 | if (tx_buffer_size > sizeof(io->tx_packet_buffer)) {
| ^
io_decoder.c:1214:80: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
1214 | if (parsed_len == io->usb_rx_payload_len) { //
| ^~
io_decoder.c:1318:31: warning: variable ‘rx_success_delta’ set but not used [-Wunused-but-set-variable]
1318 | float rx_success_delta = 0;
| ^~~~~~~~~~~~~~~~
io_decoder.c:1316:31: warning: variable ‘tx_success_delta’ set but not used [-Wunused-but-set-variable]
1316 | float tx_success_delta = 0;
| ^~~~~~~~~~~~~~~~
io_decoder.c:1313:31: warning: variable ‘rx_success’ set but not used [-Wunused-but-set-variable]
1313 | float rx_success = 0;
| ^~~~~~~~~~
io_decoder.c:1311:31: warning: variable ‘tx_success’ set but not used [-Wunused-but-set-variable]
1311 | float tx_success = 0;
| ^~~~~~~~~~
io_decoder.c:805:13: warning: unused variable ‘serial_verify’ [-Wunused-variable]
805 | int serial_verify;
| ^~~~~~~~~~~~~
io_decoder.c:783:21: warning: unused variable ‘old_usb_loop’ [-Wunused-variable]
783 | static long old_usb_loop;
| ^~~~~~~~~~~~
io_decoder.c:776:20: warning: unused variable ‘old_pin_debug2’ [-Wunused-variable]
776 | static int old_pin_debug2 = 0;
| ^~~~~~~~~~~~~~
io_decoder.c:775:20: warning: unused variable ‘old_hand_invalid_received’ [-Wunused-variable]
775 | static int old_hand_invalid_received = 0;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:773:20: warning: unused variable ‘old_hand_invalid_send’ [-Wunused-variable]
773 | static int old_hand_invalid_send = 0;
| ^~~~~~~~~~~~~~~~~~~~~
io_decoder.c:771:20: warning: unused variable ‘old_hand_valid_received’ [-Wunused-variable]
771 | static int old_hand_valid_received = 0;
| ^~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:769:20: warning: unused variable ‘old_hand_valid_send’ [-Wunused-variable]
769 | static int old_hand_valid_send = 0;
| ^~~~~~~~~~~~~~~~~~~
io_decoder.c:755:16: warning: variable ‘comm_packet_received_and_validated’ set but not used [-Wunused-but-set-variable]
755 | static int comm_packet_received_and_validated = 0; // Per controllare il loop all'interno di COMMUNICATING
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:754:16: warning: unused variable ‘comm_packet_sent’ [-Wunused-variable]
754 | static int comm_packet_sent = 0;
| ^~~~~~~~~~~~~~~~
io_decoder.c:751:16: warning: variable ‘error_state_comm_timeout’ set but not used [-Wunused-but-set-variable]
751 | static int error_state_comm_timeout = 0;
| ^~~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:750:16: warning: variable ‘error_state_hand_serial_read’ set but not used [-Wunused-but-set-variable]
750 | static int error_state_hand_serial_read = 0;; // Per seriale in handshake errata
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:749:16: warning: variable ‘error_state_payload’ set but not used [-Wunused-but-set-variable]
749 | static int error_state_payload = 0; // Per payload in handshake errato
| ^~~~~~~~~~~~~~~~~~~
io_decoder.c:748:16: warning: variable ‘error_state_firmware_2’ set but not used [-Wunused-but-set-variable]
748 | static int error_state_firmware_2 = 0; // Per valori funzioni dentro il firmware errate
| ^~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:747:16: warning: variable ‘error_state_firmware’ set but not used [-Wunused-but-set-variable]
747 | static int error_state_firmware = 0; // Per firmware errato
| ^~~~~~~~~~~~~~~~~~~~
io_decoder.c:746:16: warning: variable ‘error_state_hand_packet’ set but not used [-Wunused-but-set-variable]
746 | static int error_state_hand_packet = 0; // Per pacchetto di handshake di lunghezza non corrispondente
| ^~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:745:16: warning: variable ‘error_state_serial_configure’ set but not used [-Wunused-but-set-variable]
745 | static int error_state_serial_configure = 0; // Per seriale non configurata
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:743:16: warning: unused variable ‘error_state_dbg_printed’ [-Wunused-variable]
743 | static int error_state_dbg_printed = 0; // Per HAL_STATE_ERROR (primo ingresso)
| ^~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:740:16: warning: unused variable ‘handshake_response_dbg_printed’ [-Wunused-variable]
740 | static int handshake_response_dbg_printed = 0; // Per HAL_STATE_HANDSHAKE_WAIT_RESPONSE
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:739:16: warning: unused variable ‘handshake_init_dbg_printed’ [-Wunused-variable]
739 | static int handshake_init_dbg_printed = 0; // Per HAL_STATE_HANDSHAKE_INIT
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:737:16: warning: unused variable ‘timer_overflow_5’ [-Wunused-variable]
737 | static int timer_overflow_5 = 0;
| ^~~~~~~~~~~~~~~~
io_decoder.c:735:16: warning: unused variable ‘timer_overflow_3’ [-Wunused-variable]
735 | static int timer_overflow_3 = 0;
| ^~~~~~~~~~~~~~~~
io_decoder.c:734:16: warning: unused variable ‘timer_overflow_2’ [-Wunused-variable]
734 | static int timer_overflow_2 = 0;
| ^~~~~~~~~~~~~~~~
io_decoder.c:733:16: warning: unused variable ‘timer_overflow_1’ [-Wunused-variable]
733 | static int timer_overflow_1 = 0;
| ^~~~~~~~~~~~~~~~
io_decoder.c:732:16: warning: unused variable ‘timer_overflow_0’ [-Wunused-variable]
732 | static int timer_overflow_0 = 0;
| ^~~~~~~~~~~~~~~~
io_decoder.c:724:17: warning: variable ‘last_read_time_ns’ set but not used [-Wunused-but-set-variable]
724 | static long last_read_time_ns; // Inizializza al tempo corrente
| ^~~~~~~~~~~~~~~~~
io_decoder.c:720:10: warning: unused variable ‘next_handshake_attempt_time_ns’ [-Wunused-variable]
720 | long next_handshake_attempt_time_ns = 0; // Tempo per il prossimo tentativo di handshake
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c: In function ‘npic_in_routine’:
io_decoder.c:1443:72: warning: unused parameter ‘length’ [-Wunused-parameter]
1443 | uint8_t npic_in_routine(hal_io_decoder_t *io, uint8_t* buffer, uint8_t length) {
| ~~~~~~~~^~~~~~
io_decoder.c: In function ‘npic_out_routine’:
io_decoder.c:1494:68: warning: unused parameter ‘length’ [-Wunused-parameter]
1494 | void npic_out_routine(hal_io_decoder_t *io, uint8_t* dato, uint8_t length) {
| ~~~~~~~~^~~~~~
io_decoder.c: In function ‘encoder_routine’:
io_decoder.c:1577:9: warning: unused variable ‘encoder_delta_from_arduino’ [-Wunused-variable]
1577 | int encoder_delta_from_arduino; // Questo sarà il valore decodificato (il "delta")
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c: In function ‘adc_routine’:
io_decoder.c:1770:57: warning: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int32_t’ {aka ‘int’} [-Wsign-compare]
1770 | if ((io->adc_raw_joy[i] <= joy_center_plus) && (io->adc_raw_joy[i] >= joy_center_minus)) {
| ^~
io_decoder.c:1770:100: warning: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int32_t’ {aka ‘int’} [-Wsign-compare]
1770 | if ((io->adc_raw_joy[i] <= joy_center_plus) && (io->adc_raw_joy[i] >= joy_center_minus)) {
| ^~
io_decoder.c:1778:48: warning: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int32_t’ {aka ‘int’} [-Wsign-compare]
1778 | if (io->adc_raw_joy[i] > (joy_center_plus)) {
| ^
io_decoder.c:1784:55: warning: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int32_t’ {aka ‘int’} [-Wsign-compare]
1784 | } else if (io->adc_raw_joy[i] < (joy_center_minus)) {
| ^
io_decoder.c:1680:17: warning: unused variable ‘joy_offset’ [-Wunused-variable]
1680 | int32_t joy_offset;
| ^~~~~~~~~~
io_decoder.c:1678:10: warning: unused variable ‘overflow_period_ns’ [-Wunused-variable]
1678 | long overflow_period_ns = 20 * 1000 * 1000; // Periodo di 20ms per resettare l'overflow
| ^~~~~~~~~~~~~~~~~~
io_decoder.c: In function ‘DAC_out_routine’:
io_decoder.c:1874:13: warning: unused variable ‘i’ [-Wunused-variable]
1874 | int i;
| ^
io_decoder.c: In function ‘in_expansion_routine’:
io_decoder.c:1918:13: warning: unused variable ‘current_value’ [-Wunused-variable]
1918 | float_t current_value = 0; // Useremo un int32_t per gestire il valore
| ^~~~~~~~~~~~~
io_decoder.c:1917:13: warning: unused variable ‘bytesWritten’ [-Wunused-variable]
1917 | uint8_t bytesWritten = 0; // Contatore dei byte letti dal buffer
| ^~~~~~~~~~~~
io_decoder.c:1916:13: warning: unused variable ‘i’ [-Wunused-variable]
1916 | int i;
| ^
io_decoder.c:1914:61: warning: unused parameter ‘buffer’ [-Wunused-parameter]
1914 | uint8_t in_expansion_routine(hal_io_decoder_t *io, uint8_t* buffer, uint8_t length) {
| ~~~~~~~~~^~~~~~
io_decoder.c:1914:77: warning: unused parameter ‘length’ [-Wunused-parameter]
1914 | uint8_t in_expansion_routine(hal_io_decoder_t *io, uint8_t* buffer, uint8_t length) {
| ~~~~~~~~^~~~~~
io_decoder.c: In function ‘out_expansion_routine’:
io_decoder.c:1951:13: warning: unused variable ‘current_value’ [-Wunused-variable]
1951 | float_t current_value = 0; // Useremo un int32_t per gestire il valore
| ^~~~~~~~~~~~~
io_decoder.c:1950:13: warning: unused variable ‘bytesWritten’ [-Wunused-variable]
1950 | uint8_t bytesWritten = 0; // Contatore dei byte letti dal buffer
| ^~~~~~~~~~~~
io_decoder.c:1949:13: warning: unused variable ‘i’ [-Wunused-variable]
1949 | int i;
| ^
io_decoder.c:1947:59: warning: unused parameter ‘dato’ [-Wunused-parameter]
1947 | void out_expansion_routine(hal_io_decoder_t *io, uint8_t* dato, uint8_t length) {
| ~~~~~~~~~^~~~
io_decoder.c:1947:73: warning: unused parameter ‘length’ [-Wunused-parameter]
1947 | void out_expansion_routine(hal_io_decoder_t *io, uint8_t* dato, uint8_t length) {
| ~~~~~~~~^~~~~~
io_decoder.c: In function ‘key_simulation_loop’:
io_decoder.c:2032:53: warning: variable ‘suppress_base_key’ set but not used [-Wunused-but-set-variable]
2032 | int suppress_base_key = 0; // 0 = false, 1 = true
| ^~~~~~~~~~~~~~~~~
io_decoder.c:2004:9: warning: unused variable ‘send_status’ [-Wunused-variable]
2004 | int send_status;
| ^~~~~~~~~~~
io_decoder.c:2001:13: warning: unused variable ‘bitValue’ [-Wunused-variable]
2001 | uint8_t bitValue;
| ^~~~~~~~
io_decoder.c: In function ‘calc_io_decoder’:
io_decoder.c:2421:45: warning: unused parameter ‘period’ [-Wunused-parameter]
2421 | static void calc_io_decoder(void *arg, long period) {
| ~~~~~^~~~~~
io_decoder.c: In function ‘rtapi_app_main’:
io_decoder.c:2484:28: warning: unused variable ‘uidev’ [-Wunused-variable]
2484 | struct uinput_user_dev uidev;
| ^~~~~
io_decoder.c:2471:20: warning: unused variable ‘i’ [-Wunused-variable]
2471 | int n, retval, i;
| ^
io_decoder.c: In function ‘npic_in_routine’:
io_decoder.c:1491:1: warning: control reaches end of non-void function [-Wreturn-type]
1491 | }
| ^
io_decoder.c: In function ‘adc_routine’:
io_decoder.c:1870:1: warning: control reaches end of non-void function [-Wreturn-type]
1870 | }
| ^
io_decoder.c: In function ‘in_expansion_routine’:
io_decoder.c:1945:1: warning: control reaches end of non-void function [-Wreturn-type]
1945 | }
| ^
io_decoder.c: At top level:
io_decoder.c:732:16: warning: ‘timer_overflow_0’ defined but not used [-Wunused-variable]
732 | static int timer_overflow_0 = 0;
| ^~~~~~~~~~~~~~~~
io_decoder.c:733:16: warning: ‘timer_overflow_1’ defined but not used [-Wunused-variable]
733 | static int timer_overflow_1 = 0;
| ^~~~~~~~~~~~~~~~
io_decoder.c:734:16: warning: ‘timer_overflow_2’ defined but not used [-Wunused-variable]
734 | static int timer_overflow_2 = 0;
| ^~~~~~~~~~~~~~~~
io_decoder.c:735:16: warning: ‘timer_overflow_3’ defined but not used [-Wunused-variable]
735 | static int timer_overflow_3 = 0;
| ^~~~~~~~~~~~~~~~
io_decoder.c:737:16: warning: ‘timer_overflow_5’ defined but not used [-Wunused-variable]
737 | static int timer_overflow_5 = 0;
| ^~~~~~~~~~~~~~~~
io_decoder.c:739:16: warning: ‘handshake_init_dbg_printed’ defined but not used [-Wunused-variable]
739 | static int handshake_init_dbg_printed = 0; // Per HAL_STATE_HANDSHAKE_INIT
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:740:16: warning: ‘handshake_response_dbg_printed’ defined but not used [-Wunused-variable]
740 | static int handshake_response_dbg_printed = 0; // Per HAL_STATE_HANDSHAKE_WAIT_RESPONSE
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:743:16: warning: ‘error_state_dbg_printed’ defined but not used [-Wunused-variable]
743 | static int error_state_dbg_printed = 0; // Per HAL_STATE_ERROR (primo ingresso)
| ^~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:754:16: warning: ‘comm_packet_sent’ defined but not used [-Wunused-variable]
754 | static int comm_packet_sent = 0;
| ^~~~~~~~~~~~~~~~
io_decoder.c:769:20: warning: ‘old_hand_valid_send’ defined but not used [-Wunused-variable]
769 | static int old_hand_valid_send = 0;
| ^~~~~~~~~~~~~~~~~~~
io_decoder.c:771:20: warning: ‘old_hand_valid_received’ defined but not used [-Wunused-variable]
771 | static int old_hand_valid_received = 0;
| ^~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:773:20: warning: ‘old_hand_invalid_send’ defined but not used [-Wunused-variable]
773 | static int old_hand_invalid_send = 0;
| ^~~~~~~~~~~~~~~~~~~~~
io_decoder.c:775:20: warning: ‘old_hand_invalid_received’ defined but not used [-Wunused-variable]
775 | static int old_hand_invalid_received = 0;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:776:20: warning: ‘old_pin_debug2’ defined but not used [-Wunused-variable]
776 | static int old_pin_debug2 = 0;
| ^~~~~~~~~~~~~~
io_decoder.c:783:21: warning: ‘old_usb_loop’ defined but not used [-Wunused-variable]
783 | static long old_usb_loop;
| ^~~~~~~~~~~~
io_decoder.c:643:14: warning: ‘format_buffer_for_debug’ defined but not used [-Wunused-function]
643 | static char* format_buffer_for_debug(const unsigned char *buffer, int len) {
| ^~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:148:12: warning: ‘printed_debug’ defined but not used [-Wunused-variable]
148 | static int printed_debug[100] = {0}; //serve a creare uno stop alle scritte di debug
| ^~~~~~~~~~~~~
io_decoder.c: In function ‘usb_thread_function’:
io_decoder.c:1297:28: warning: ‘usb2_current_time_ns’ may be used uninitialized [-Wmaybe-uninitialized]
1297 | usb_jitter_time_ns = usb_current_time_ns - usb2_current_time_ns;
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:729:10: note: ‘usb2_current_time_ns’ was declared here
729 | long usb2_current_time_ns;
| ^~~~~~~~~~~~~~~~~~~~
io_decoder.c:1297:28: warning: ‘usb_current_time_ns’ may be used uninitialized [-Wmaybe-uninitialized]
1297 | usb_jitter_time_ns = usb_current_time_ns - usb2_current_time_ns;
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:728:10: note: ‘usb_current_time_ns’ was declared here
728 | long usb_current_time_ns;
| ^~~~~~~~~~~~~~~~~~~
io_decoder.c:1308:38: warning: ‘next_parse_error_time_ns’ may be used uninitialized [-Wmaybe-uninitialized]
1308 | if ((current_time_ns - next_parse_error_time_ns) > parse_error_time_ns) {
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c:726:10: note: ‘next_parse_error_time_ns’ was declared here
726 | long next_parse_error_time_ns;
| ^~~~~~~~~~~~~~~~~~~~~~~~
io_decoder.c: In function ‘npic_out_routine’:
io_decoder.c:1550:107: warning: ‘freq_conversion’ may be used uninitialized [-Wmaybe-uninitialized]
1550 | if (current_time_ns > (io->out_blink_time_ns[current_bit] + freq_conversion)) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
io_decoder.c:1503:10: note: ‘freq_conversion’ was declared here
1503 | long freq_conversion;
| ^~~~~~~~~~~~~~~
Linking io_decoder.so“Bare-Metal” Firmware (No Bootloader)
We have removed the Arduino bootloader for two critical reasons:
Safety: No random pin state changes during startup (typical of bootloaders).
Speed: The board is operational within a few milliseconds.
what about updates ?
- unknown
- unknown
Experimental raspios Linuxcnc Trixie images.
Category: Installing LinuxCNC
- NWE
- NWE
Experimental raspios Linuxcnc Trixie images.
Category: Installing LinuxCNC
of=/path/to/my/hardDiskBackup.img
first make sure your directory has enough free space to hold a file as large as your source disk.
writing that img file to a new empty drive then instead change the if= bit:
if=/path/to/hardDiskBackup.img
- NWE
- NWE
Experimental raspios Linuxcnc Trixie images.
Category: Installing LinuxCNC
There are various ways clone hard drives, I tend to use dd and make a bit-for-bit clone of the entire drive. Empty space and deleted files included. Takes longer but is the most reliable solution I've found.How do I create an image of the contents of one hard drive to install it on another? This is to avoid having to reinstall the additional applications I use with LCN.
The first time I did this was on a test machine containing no valuable data so I don't inadvertently destroy it. A little mistake in the following instructions could wipe your hard drive empty.
Important: the pc doing the cloning must not be booted from either drive; also, do not try booting the original or the clone while BOTH are connected to the pc. I learned that the hard way. Both drives' partitions will have identical UUID's which can be changed but it works as long as you don't boot one while both are connected to the same pc. I wouldn't even try mounting a partition while both are connected. Don't bother trying to clone nvme -> sata or sata -> nvme. I think it can be done, but I will not cover that complication. It is also possible to clone to a different sized drive, but I will not get into that here.
First make backups of everything in case this goes awry. You have been warned.
1: The linuxcnc pc is powered off. I connect an empty drive to it (same size as the original) and also a live-boot USB stick. The linuxcnc installer works great for this.
2: Boot the pc from the live-boot USB stick into the live-boot/testing. Do not launch the installer.
3: Find out which drive is which. One way to do that is to open Gparted and inspect the drives. On my system I might see that /dev/sda contains the installed linux os and /dev/sdb is the new empty drive. Your pc might be completely different. This is the most important detail.
4: Using the information gathered in step 3, I formulate the following terminal command:
be very careful of not copying the empty drive to the linuxcnc drive! You will then have two empty drives and no linuxcnc!
# dd if=/dev/sda of=/dev/sdb status=progress bs=1M conv=sync
I will not explain the very important "#" bit. If anyone reading this does not know what that is for, I would suggest to practice your terminal skills in less destructive ways before trying to do this.
if=/dev/sda is telling dd the "input file" is the sda disk
of=/dev/sdb tells it which is the "output file"
status=progress gives you some feedback what it is doing while it is busy
bs=1M sets the block size for copying I think default block size is 512B which copies insanely slowly. You can use block sizes larger than 1M, you might gain some speed, but if block size is set larger than the drive's internal cache space, your resulting copy will be botched. 1M seems to be a safe number that always works for me.
Depending what versions you're running, the status=progress bit will not work and will not display the progress. Just let it do its thing or find other ways to figure out if the hard drives are actively copying. Back when all I had was spinning rust, we didn't have status=progress, but I could HEAR it was doing its thing.
Depending on the size of your drives and their speed, this cloning can can take anywhere from a few minutes to a few weeks to complete. I've had 4GB spinning rust drives take a couple days. A 1TB ssd is usually way quicker than that.
graon
I just discovered there was already an answer to this question after I typed this up. If anyone has a problem with this I can remove it.
- endian

LinuxCNC S-Curve Accelerations
Category: General LinuxCNC Questions
My apologize ...
I tested it with Nidec N753(it has 0x60B1 avaible - but i did not implement the offset yet), Kollmorgen S343, Kollmorgen S7xx, Pilz pmcTendo, Beckhoff AX5106 hw2(https://codeberg.org/endian/Beckhoff_AX5ZYZZ_lcec_driver - here is working driver for AX5YZZ drivers with sercos.comp which is very similar to dominik cia's but only for AX with external trapeziodal homing based of high speed probing hw-input outside of master[lower cycle time at fpga]), Beckhoff el7221 and I will test it with @zmrdko's Delta ASDA drivers too ... pictures shows like that solution synchronize of timing lag of position mode of ethercat Can you show the same test at same velocity with compensation on and off? The two pictures are at very different speeds so it's hard to see what the compensation is actually doing.
sorry I can not show same speed test because I am currently weeks out of office but we can just multiply or devide values ... because it is linear dependecy during constant speed movemet ...
I can just customize current images to show exact difference ... compensation off ferror = 0.125mm at 15m/min ... compensation on ferror = 0.00009028mm at 1m/min and multiply it by 15 we get 0,0013542mm which is significantly less then 0.125 ..
What I remember from testing by my short eyes it whas something near 0.001mm during that 15m/min testing was done with bentch top setup without any load presented... just AX5106 with AM8xxx motor
but I can go home for testing this weekend to create exact speed difference testing if it is neccessary
- grandixximo

LinuxCNC S-Curve Accelerations
Category: General LinuxCNC Questions
Can you show the same test at same velocity with compensation on and off? The two pictures are at very different speeds so it's hard to see what the compensation is actually doing.
I tested it with Nidec N753(it has 0x60B1 avaible - but i did not implement the offset yet), Kollmorgen S343, Kollmorgen S7xx, Pilz pmcTendo, Beckhoff AX5106 hw2(https://codeberg.org/endian/Beckhoff_AX5ZYZZ_lcec_driver - here is working driver for AX5YZZ drivers with sercos.comp which is very similar to dominik cia's but only for AX with external trapeziodal homing based of high speed probing hw-input outside of master[lower cycle time at fpga]), Beckhoff el7221 and I will test it with @zmrdko's Delta ASDA drivers too ... pictures shows like that solution synchronize of timing lag of position mode of ethercat
- meister
- meister
LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Category: Computers and Hardware
the camjog plugin:
youtube.com/shorts/pnibjyDy1ZI
- NWE
- NWE
Mini PC for LinuxCNC/CPU Realtime Performance
Category: Computers and Hardware
- NWE
- NWE
Mini PC for LinuxCNC/CPU Realtime Performance
Category: Computers and Hardware
- NWE
- NWE
Mini PC for LinuxCNC/CPU Realtime Performance
Category: Computers and Hardware
Oh No! now I remember, a bit ago I was running this thing on a power tool battery+inverter , so I had changed the power limit in bios as low as it can be set! I will try one more time.
- endian

LinuxCNC S-Curve Accelerations
Category: General LinuxCNC Questions
I tested it with Nidec N753(it has 0x60B1 avaible - but i did not implement the offset yet), Kollmorgen S343, Kollmorgen S7xx, Pilz pmcTendo, Beckhoff AX5106 hw2(codeberg.org/endian/Beckhoff_AX5ZYZZ_lcec_driver - here is working driver for AX5YZZ drivers with sercos.comp which is very similar to dominik cia's but only for AX with external trapeziodal homing based of high speed probing hw-input outside of master[lower cycle time at fpga]), Beckhoff el7221 and I will test it with @zmrdko's Delta ASDA drivers too ...@endian I discussed this with YangYang who attends the EtherCAT consortium meetings. AitalMAC is part of the consortium and we design I/O for EtherCAT, so we're not guessing here.
The standard already solves this problem. You don't need pos(t+1).
The 1 cycle delay is real, but it's identical for all axes. With Distributed Clocks everything executes on the same SYNC edge, synchronized to ~100ns. Every axis is "late" by the same amount, so the path shape is correct. Calculate it last week, execute it this week, the part is the same.
The CiA 402 standard provides feedforward objects exactly for this: 0x60B1 (velocity offset) and 0x60B2 (torque offset). The master can send position plus velocity feedforward so the drive can anticipate acceleration. This is the standard's solution, it just needs to be mapped in lcec.
Also, good drives interpolate internally. The servo loop runs faster than the bus cycle (Maxon runs 0.4ms internal vs 1ms bus). The drive doesn't jump between positions, it interpolates. That's what 0x60C2 configures.
If you're seeing ferror correlate with velocity in halscope, that's likely a display artifact. The ferror compares "commanded from 1 cycle ago" with "actual now", so it shows an offset proportional to velocity. It's not a real machining error.
What does your actual part surface look like? Any real deviation you can measure?
I think not every hardware has 0x60B1:01 in the accessible PDOs and not everyone can use unsynchronized SDO to change during OP ... therefore I am high-lighing it before job is done ... I have working with 16 different brands of servodrivers based on ethercat and just one it has(nidec control techniques) ... What I know from TC3 this is solved by NC stuff computing for the each single axis ...
I do not want to talk about ethercat here .. we have separate space, but in reality it is lagging 2cycles because at hardare layer it writes command first and then it reads the slave status... then next cycle it write command by last status and then cycle it reach real status datas ... (Martin Rostan (Chairman ETG group) - when I was with him at last time at conference in Bratislava)
SDO 0x60C2 is configuring the timing of internal stuff of interpolationn of synchronized movement by subindex 01 and 02 .. most drivers it has to have it at same time of master command tick but we knows some which do not as Beckhoff AX5 series
I am at second computer and I will update picture later this weel but during movement in 15m/s it can produce lag of 0.2mm with timing 250us ... which sound terrible 0
I did compensation component which add posCmd = position command + compensation during vcommand != 0 and every lag was gone ... it was purely for testing but solution is clear
positionOutputCompensated = positionOutput; if(fabs(vel_cmd) > 0.001) { double leadCycleLocal = lead_cycles; const double Ts = periodTime; const int L = (leadCycleLocal < 1) ? 1 : leadCycleLocal; const double LTs = (double)L * Ts; double lead = (vel_cmd * LTs) + (0.5 * acc_cmd * LTs * LTs); double ferr; ferr = (positionOutput - pos_fb_from_incremental); double comp = (kff * lead) + (k_err * ferr); posCompensation = comp; if(fabs(ferr) > fabs(fErrorOld) || fTopError == 0.0) { fErrorOld = ferr; fTopError = fErrorOld; } } else { posCompensation = 0; } positionOutputCompensated = positionOutput + posCompensation; if(ui_delayFinal > 0) { positionOutputCompensated = positionOutput; ui_delayFinal--; } //drv_target_position_incremental = (int32_t)(positionOutput * pos_scale * incremental_pos_scale); drv_target_position_incremental = (int32_t)(positionOutputCompensated * pos_scale * incremental_pos_scale); I think I understand better now, good to know this issue exists. When I get to Phase 5 testing at 250µs, I might see this show up as following error that isn't the planner's fault.I will bookmark this for later, is you compensation component available to test with?
pictures shows like that solution synchronize of timing lag of position mode of ethercat
- NWE
- NWE
Mini PC for LinuxCNC/CPU Realtime Performance
Category: Computers and Hardware
Wow, I just noticed the load average numbers in btop. I was noticing how glxgears is not showing a lot of cpu usage, now I notice it showing up in the load average. I will go back and find out what it takes to bump that load average over 16! I will post it.
When I'm building something like LinuxCNC from source I make sure I have the build terminal and btop open so I can watch it rip! Especially on the 10yr old server with two Xeon 14 core CPU's = 56 threads.