Advanced Search

Search Results (Searched for: )

  • rodw
  • rodw's Avatar
Today 12:14
Replied by rodw on topic Again about HOME_INDEX in step/dir mode

Again about HOME_INDEX in step/dir mode

Category: StepConf Wizard

forgot to mention granite devices have a good article about feedback systems and even mentions Linuxcnc
granitedevices.com/wiki/Dual-loop_feedback_position_control 
  • grandixximo
  • grandixximo's Avatar
Today 12:14 - Today 12:14
Replied by grandixximo on topic Ethercat random jitter fix

Ethercat random jitter fix

Category: EtherCAT

@atsu

Your servo drivers support a period of 1250000

????
  • rodw
  • rodw's Avatar
Today 12:08 - Today 12:08
Replied by rodw on topic Again about HOME_INDEX in step/dir mode

Again about HOME_INDEX in step/dir mode

Category: StepConf Wizard

Do not fight the paradigm to avoid a world of pain.
To say you have open loop is not correct. your encoder output should be fully wired in so you do have a feedback loop. Some machines have a dual feedback loop with the motor encoder configured in velocity mode inner loop and optional linear scales configured in position mode as the outer loop.

There are many closed loop stepper motors with encoders and a few also have an index signal. Usually the dual feedback system connects the motor encoder velocity feedback to the drive and the position feedback to linuxcnc.

I have never had drives with index marks but my uderstanding  is that linuxcnc can search for a home switch, then move to the nearest index pulse before completing homing. Ethercat drives that home internally are different animal altogether
  • grandixximo
  • grandixximo's Avatar
Today 12:08
Replied by grandixximo on topic LinuxCNC S-Curve Accelerations

LinuxCNC S-Curve Accelerations

Category: General LinuxCNC Questions

The new PR with comp kinematics support for TP2 will have artifact debs at the end of this link

github.com/LinuxCNC/linuxcnc/actions/runs/23087605170?pr=3807

github is building the debs at the time of writing
  • rodw
  • rodw's Avatar
Today 11:42

Rufus found problem with linuxcnc_2.9.8-amd64.hybrid.iso -- missing files

Category: General LinuxCNC Questions

Yes, this is one of the reasons why I ditched Rufus and now exclusively use and recommend  balena etcher on all platforms
  • andrax
  • andrax's Avatar
Today 11:38
Replied by andrax on topic Again about HOME_INDEX in step/dir mode

Again about HOME_INDEX in step/dir mode

Category: StepConf Wizard

If your 7i92 doesn't have a free input for the Z signal, that's too bad. I'd recommend upgrading so you have more inputs. Alternatively, you can set HOME_USE_INDEX = No, and then LinuxCNC will use the home switch for reference. However, this is less accurate.
  • grandixximo
  • grandixximo's Avatar
Today 11:30 - Today 12:05
Replied by grandixximo on topic LinuxCNC S-Curve Accelerations

LinuxCNC S-Curve Accelerations

Category: General LinuxCNC Questions

Hi grandixximo,
Congratulations on a viable solution to this long standing gap in Linuxcnc implementation.
I was going through how you have taken into account the kinematics in userspace for planning which is needed for kinematics bounds checking.
I also see that you have made the relevant changes in the kinematics defined in src/emc/kinematics/* files.
There is another set of switchable kinematics defined in the src/hal/components/*.comp files (method made viable by David Muller / aciera on this forum). For example xyzab_tdr_kins.comp, xyzacb_trsrn.comp etc.,
I somehow find the idea of implementing the kinematics as a loadable .comp module compiled by halcompile very fascinating and useful ;-)
Is there a guideline on how to transition those kinematics also to this new setup?
-automata

Hi automata,

Good question — the .comp-based kinematics (like xyzab_tdr_kins.comp, xyzacb_trsrn.comp, etc.) were missing planner type 2 support because halcompile doesn't generate the nonrt_attach() entry point or the shared-memory parameter bridge that the userspace planner needs.
I've added a glue header (comp_kins_uspace.h) that makes the conversion straightforward without having to rewrite the .comp as a hand-written .c file. The idea: HAL pin values are mirrored into shared memory by the RT module each servo cycle, and the userspace planner reads a consistent snapshot from there instead of touching HAL pins.
The conversion is 5 mechanical steps:

#include "comp_kins_uspace.h"

Call comp_kins_uspace_setup(comp_id, "mykins", num_joints, "XYZAB") in your setup function after hal_ready()

Replace each *(haldata->pin) with KINS_READ(haldata->pin, N) where N is a unique index per parameter

Bracket kinematicsForward/kinematicsInverse with COMP_KINS_BEGIN(haldata) / COMP_KINS_END()

Add COMP_KINS_NONRT_ATTACH("mykins") at the end of the file

For switchable kins, also sync the switch type with COMP_KINS_SET_SWITCH_TYPE() in kinematicsSwitch().
xyzab_tdr_kins.comp has been converted as a reference example — look for the lines marked with +++ comments. The kinematics docs (docs/src/motion/kinematics.adoc) now have a full section on this with annotated code examples.
  • TAKUYA
  • TAKUYA
Today 11:19
Replied by TAKUYA on topic Ethercat random jitter fix

Ethercat random jitter fix

Category: EtherCAT

Hello
Please see the attached Files.

Thanks for looking through them.

~Takuya
  • Atsu
  • Atsu
Today 11:17 - Today 11:19
Replied by Atsu on topic Ethercat random jitter fix

Ethercat random jitter fix

Category: EtherCAT

Thank you for taking the time to go through the messages from the last few days. I suspected as much, the AI's "fix" wasn't really anything useful.

Regarding the first slave lacking DC, you are correct. I actually changed the order of slaves in the chain yesterday so that the A6 servos are now defined first. They do have assignActivate defined. However, that change didn't make any difference to the dc-phased pin or the pll-*** pins.

I have attached my ethercat-conf.xml along with HAL and INI files if they are of any help.

ethercat master command after LinuxCNC has started:

Master0
  Phase: Operation
  Active: yes
  Slaves: 6
  Ethernet devices:
    Main: 10:60:4b:5b:58:34 (attached)
      Link: UP
      Tx frames:   146273
      Tx bytes:    9824436
      Rx frames:   146272
      Rx bytes:    9824318
      Tx errors:   0
      Tx frame rate [1/s]:    800    709    308
      Tx rate [KByte/s]:     93.7   84.1   32.2
      Rx frame rate [1/s]:    800    709    308
      Rx rate [KByte/s]:     93.7   84.1   32.2
    Common:
      Tx frames:   146273
      Tx bytes:    9824436
      Rx frames:   146272
      Rx bytes:    9824318
      Lost frames: 0
      Tx frame rate [1/s]:    800    709    308
      Tx rate [KByte/s]:     93.7   84.1   32.2
      Rx frame rate [1/s]:    800    709    308
      Rx rate [KByte/s]:     93.7   84.1   32.2
      Loss rate [1/s]:          0     -0      0
      Frame loss [%]:         0.0   -0.0    0.0
  Distributed clocks:
    Reference clock:   Slave 0
    DC reference time: 826802114159640000
    Application time:  826802133398422723
                       2026-03-14 11:15:33.398422723
  • grandixximo
  • grandixximo's Avatar
Today 10:58 - Today 11:05
Replied by grandixximo on topic Ethercat random jitter fix

Ethercat random jitter fix

Category: EtherCAT

@TAKUYA
@Atsu

Please share your full XML
and the output of ethercat master command after you have started linuxcnc
  • grandixximo
  • grandixximo's Avatar
Today 10:56
Replied by grandixximo on topic Ethercat random jitter fix

Ethercat random jitter fix

Category: EtherCAT

Experienced some jitter as well today while running grandixximo's fork. I doubt there is any synchronization being done while the dc-phased pin is false and all pll-*** pins are 0. Ran sudo dmesg to see what is happening in the background. Maybe someone can notice something clear in the log:

During startup:
[  801.691210] EtherCAT: Requesting master 0...
[  801.691215] EtherCAT: Successfully requested master 0.
[  801.691915] EtherCAT 0: Domain0: Logical address 0x00000000, 74 byte, expected working counter 12.
[  801.691918] EtherCAT 0:   Datagram domain0-0-main: Logical offset 0x00000000, 74 byte, type LRW.
[  801.691932] EtherCAT 0: Master thread exited.
[  801.691933] EtherCAT 0: Starting EtherCAT-OP thread.
[  801.691970] EtherCAT WARNING 0: 1 datagram UNMATCHED!

During operation:
[  807.424674] EtherCAT WARNING 0-1: Slave did not sync after 5000 ms.
[  808.944250] EtherCAT 0: Slave states on main device: OP.

During shutdown:
[  841.183382] EtherCAT 0: Master thread exited.
[  841.183401] EtherCAT 0: Starting EtherCAT-IDLE thread.
[  841.183449] EtherCAT ERROR 0-0: Failed to receive AL state datagram: Datagram initialized.
[  841.183462] EtherCAT 0: Releasing master...
[  841.183464] EtherCAT 0: Released.
[  841.188247] EtherCAT 0: Slave states on main device: SAFEOP, OP + ERROR.
[  841.196539] EtherCAT ERROR 0-0: AL status message 0x001A: "Synchronization error".
[  841.197317] EtherCAT 0-0: Acknowledged state SAFEOP.
[  841.208612] EtherCAT ERROR 0-1: AL status message 0x001A: "Synchronization error".
[  841.209116] EtherCAT 0-1: Acknowledged state SAFEOP.
[  841.220587] EtherCAT ERROR 0-2: AL status message 0x001A: "Synchronization error".
[  841.221590] EtherCAT 0-2: Acknowledged state SAFEOP.
[  841.256274] EtherCAT 0: Slave states on main device: PREOP.
[  841.828318] EtherCAT WARNING: Datagram 0000000031def7fe (master-fsm) was SKIPPED 1 time.

 

This seems a similar issue, please share your XML file
also send this command 

ethercat master

and share the output
the output should look something like

Master0
  Phase: Operation
  Active: yes
  Slaves: 12
  Ethernet devices:
    Main: 88:03:8f:28:ca:33 (attached)
      Link: UP
      Tx frames:   78788870
      Tx bytes:    65756113151
      Rx frames:   78788869
      Rx bytes:    65756112300
      Tx errors:   0
      Tx frame rate [1/s]:   1000   1000   1000
      Tx rate [KByte/s]:    822.0  822.0  821.9
      Rx frame rate [1/s]:   1000   1000   1000
      Rx rate [KByte/s]:    822.0  822.0  821.9
    Common:
      Tx frames:   78788870
      Tx bytes:    65756113151
      Rx frames:   78788869
      Rx bytes:    65756112300
      Lost frames: 0
      Tx frame rate [1/s]:   1000   1000   1000
      Tx rate [KByte/s]:    822.0  822.0  821.9
      Rx frame rate [1/s]:   1000   1000   1000
      Rx rate [KByte/s]:    822.0  822.0  821.9
      Loss rate [1/s]:          0     -0      0
      Frame loss [%]:         0.0   -0.0    0.0
  Distributed clocks:
    Reference clock:   Slave 0
    DC reference time: 826799805203739108
    Application time:  826800839056809695
                       2026-03-14 10:53:59.056809695

 
  • Taichi
  • Taichi's Avatar
Today 10:34

Again about HOME_INDEX in step/dir mode

Category: StepConf Wizard

Hello everyone. I haven't been to the forum for a long time.
Need help and complete clarity in using HOME_INDEX = YES and STEP/DIR
When I upgraded old machines that used analog control and encoder feedback, this issue was not there. In the topic Homing index andypugh writes and gives a link to the source file homing.c. I asked chatGPT to analyze this file. And the chat says that indeed to reset the HOME_INDEX search flag you need a signal from encoder.n.index-enable. That is, linuxcnc does not support the function of searching for 0 labels in step/dir mode.
Most of the new hobby machines that I and my friends are currently assembling use servos in step/dir mode and without a closed loop. Since for a hobby, the driver <-> motor with encoder connection is enough. But home_switch gives a small but noticeable error. Therefore, such a request will appear more and more often.
On my 7i92 there are no free 9 pins for 3 x A B Z encoders. And almost all servo drivers have a simple transistor output that duplicates the 0 encoder mark.
Are there any "macros" or "tricks" to get around this problem?
Is it possible to add this functionality to the homing.c source?
Thx for help.
  • grandixximo
  • grandixximo's Avatar
Today 09:49 - Today 10:50
Replied by grandixximo on topic Ethercat random jitter fix

Ethercat random jitter fix

Category: EtherCAT

I have the same issue as TAKUYA, the dc-phased pin never goes high. I managed to fix this using Claude AI and now the dc-phased pin goes high. I have attached a detailed notes of what was changed in the code as well as some screenshots from before and after.

NOTE: this was done entirely with the help of AI and I am not qualified enough to say whether it is correct or not! Grandixximo, could you please review the notes and share your thoughts? Opening the attached HTML file in a browser, you can view the notes which were generated. It is too long to copy-paste here.

EDIT: After testing the code more thoroughly, I'm getting jitter again. It's very likely that the AI's "fix" only addressed the dc-phased pin but broke something else... I've reverted back to the master branch ( github.com/grandixximo/linuxcnc-ethercat), and everything is working again except for the dc-phased pin.
 

 

The issues the AI found are not issues,
  1. Same-cycle read — No, 
    reference_clock_time
     reads from the previous cycle's response, already received in 
    lcec_read_master
  2. Missing 
    sync_monitor_queue
     — Not needed; DC ref clock time comes from the normal sync datagrams
  3. sync_reference_clock
     guard — Intentionally skipped in M2R mode (correct behavior)
And not something related to my changes, the behaviors were already present from upstream, can you share your xml file? Your app time seems good, but the pll-err is suspiciously to 0
which tells me you probably do not have DC, is assignActivate set to 300 on your DC capable devices?
Your first device lacks DC, I would advise to keep the first device on your network to be DC active, or you may need to set which slave does the DC timing reference in the XML, I always keep first device DC, have not tested differently, can't say for sure.
  • EK1100 — coupler, no DC
  • EL1008 — digital input, no DC
  • EL2008 — digital output, no DC
  • 3× StepperOnline A6 — these should have DC, but only if 
    assignActivate
     is set in the XML config
In your XML you will need something like

    <master idx="0" appTimePeriod="1000000" refClockSyncCycles="-1">
        <slave idx="xx" type="devicewith DC" >
        <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="250000"/>
        </slave>Or you share your XML here, I will take a look, I think you do not have DC at all at the moment, you never even used any of my code changes at all.
  • grandixximo
  • grandixximo's Avatar
Today 08:46 - Today 08:47
Replied by grandixximo on topic LinuxCNC S-Curve Accelerations

LinuxCNC S-Curve Accelerations

Category: General LinuxCNC Questions

Hello, 

I can see merge of your progress to master? Am I right ?

Regards e.
 


No, we will make another PR for merging into master, this is more of a testing version, it was shared as a draft, it is good to get feedback on it, as it will be the base for the future work.
Displaying 1 - 15 out of 18202 results.
Time to create page: 0.307 seconds
Powered by Kunena Forum