Advanced Search

Search Results (Searched for: )

  • rodw
  • rodw's Avatar
Yesterday 12:44
Replied by rodw on topic LinuxCNC S-Curve Accelerations

LinuxCNC S-Curve Accelerations

Category: General LinuxCNC Questions

Yes Rod .. it is solution but it is creating constant delay between control position -> DFIR -> current position of tool ....
 

It will not add any delay as it should be applied as the acceleration is calculated or read per servo cycle. Just not sure how you need to use it. 
the size of the buffer is configurable.
Any other published moving average solution wanted to use loops which are a source of delay so I devised this..
One of the cleverest algorithms I have ever coded...
  • andypugh
  • andypugh's Avatar
Yesterday 12:13

Bay Area consultant familiar with ProBotix/LinuxCNC

Category: User Exchange

I don't think they do consultancy, but you are very close to the Mesa Electronics HQ.
  • andypugh
  • andypugh's Avatar
Yesterday 11:48

probe basic lath to define a net spindle-index-en spindle.0.index-enable

Category: HAL

You don't say what the inputs to and2.2 are. That is probably important.

A problem you will have is that spindle.0.index-enable is a bidirectional HAL pin, so can't be directly connected to the output of an and2 block.

You can probably work around this with linuxcnc.org/docs/stable/html/man/man9/tristate_bit.9.html

But, are you sure that your spindle encoder driver doesn't offer e direct, bidirectional, index-enable pin?

There is an example of an index-simulator HAL component here:
forum.linuxcnc.org/24-hal-components/388...ation?start=0#223508

It's written for a stepper spindle, but should work just as well (or just as badly) for an absolute encoder assuming that the encoder has an integer "counts" output.


I was going to suggest watching one bit of the binary counts value and tristate-bit. But that wouldn't zero the counts on index.

There _is_ a way to do it with a sample-hold to capture the counts at index, then subtracting that from the raw counts, that would need a bitslice, mux_generic (set up for signed int), edge, and tristate-bit HAL component.
It's do-able but at that point the custom HAL component makes more sense.
  • TAKUYA
  • TAKUYA
Yesterday 11:35
Replied by TAKUYA on topic Ethercat random jitter fix

Ethercat random jitter fix

Category: EtherCAT

@grandixximo 
Do you have any idea what might be causing the delay in the DRO? 
It seems like the drives arent going into OP right away. The delay is always different. Sometimes the DRO is instantly filled with the encoder read (but converted to axis position) values, sometimes it takes up to 10 seconds. 

Could this also be part of the whole issue? The drives PRE-OP to OP delay. 
  • Ameone
  • Ameone
Yesterday 07:49
Bitfile for rcservo - MESA 7i95t was created by Ameone

Bitfile for rcservo - MESA 7i95t

Category: Driver Boards

Hi all,I'm using a Mesa 7i95T and I need a bitfile with the following configuration:
  • sserial on P1 (to read a MESA 7i87 for analog sensors)
  • 1x rcpwmgen for RC servo control (MG995, 50Hz, 1-2ms pulse width)
  • as many stepgens as possible with the remaining pins (ideally 5)
Currently I'm using
7i95t_1pwmd.bin
which has a standard pwmgen, but rcpwmgen would be much cleaner for direct RC servo control without needing external offset/scale calculations. Is there an existing bitfile that covers this, or could you compile one?Thanks in advance!
  • Spezidrohne
  • Spezidrohne
Yesterday 07:03
Replied by Spezidrohne on topic Ethercat Setup help needed for beginner

Ethercat Setup help needed for beginner

Category: EtherCAT

It is an older 15kw Tosvert that i repaired some time ago, dont think its in the modbus era. So traditional i/o it is. The servo drives only have 2-3inputs for internal use, like fault reset, homing switch and e-stop.
  • endian
  • endian's Avatar
Yesterday 04:27
Replied by endian on topic LinuxCNC S-Curve Accelerations

LinuxCNC S-Curve Accelerations

Category: General LinuxCNC Questions

Yes Rod .. it is solution but it is creating constant delay between control position -> DFIR -> current position of tool ....

next stuff what Gemini tells me at Cloud of points topic is - 

* Look-Ahead Buffer CompressionConventional S-curves fail when the "Look-ahead" buffer is too small. If the planner only sees 10 points ahead, it doesn't know it can maintain $F500$ through the next 100 points.The Fix: Use a Compressor or Point Filter.In your trajectory planner settings, ensure the look-ahead is set to at least 100–200 segments.The Approximation: If three points are almost in a straight line, the planner should "ignore" the middle point. This turns a "Cloud of Points" back into a "Set of Vectors," which is much easier for S-curve math to handle.

(before noticed DRIF)
* The "Look-up Table" (LUT) Approximation
If the analytical math (solving cubic equations) is too slow for your CPU, you can use a pre-computed trapezoidal acceleration profile and apply a Finite Impulse Response (FIR) Filter.

The Method: Calculate a standard, "harsh" Trapezoidal move first. Then, run that velocity profile through a "Moving Average" filter.

The Result: The "sharp corners" of the trapezoid become smooth "S" shapes.

* Constraint Decoupling (Axis vs. Path)Latency often spikes when the planner tries to synchronize 3+ axes using 3rd-order math.The Fix: Instead of calculating a full 3D vector S-curve, calculate the S-curve for the Master Path (the total distance) and then linearly project that to X, Y, and Z.The Trade-off: This is slightly less "optimal" for machine time, but it reduces the math complexity by $66\%$, significantly dropping your latency.

* Frequency Domain Filtering (Advanced)
If you are writing the code for the planner, you can use a Low-pass filter on the commanded acceleration.
Generate the "rough" motion.
Pass it through a 2nd order low-pass filter (Butterworth or similar).
This effectively "limits jerk" by removing the high-frequency components (the "thumps") of the motion.

what I can see aproximation or longer thread timing are the only known solutions... but I am not expert in this topic 
  • hmnijp
  • hmnijp
30 Mar 2026 00:57
Replied by hmnijp on topic LinuxCNC S-Curve Accelerations

LinuxCNC S-Curve Accelerations

Category: General LinuxCNC Questions

In professional controllers (Fanuc/Siemens), this is solved by having a dedicated DSP (Digital Signal Processor) or an FPGA that does nothing but the motion math, leaving the main CPU to handle the G-code.


As far as I know, that’s not entirely right.
For the nano-smoothing function (NURBS interpolation for cloud of points), Fanuc uses non-realtime buffered calculations on the CPU to prepare the trajectory (look-ahead buffer). Then, data from the interpolator is sent to the DSP, where the planner calculates the speeds in real time.
  • Marcos DC
  • Marcos DC's Avatar
30 Mar 2026 00:47

CiA402 framework for LinuxCNC (follow-up: runnable + simulation + easier debuggi

Category: EtherCAT

Hi,
Some time ago I opened a topic about separating CiA402 logic from EtherCAT and validating it in a more modular way.

forum.linuxcnc.org/ethercat/58434-separa...ter-drive-stub-valid

Since then I kept working on that idea and turned it into something more complete that is now actually runnable and easier to test.

What problem I was trying to solve:
While studying and experimenting with CiA402 setups (and reading quite a few forum threads), I kept running into the same kind of issues:
often ending up debugging everything at once (motion + HAL + EtherCAT + drive)
not knowing if a problem comes from logic, wiring or hardware
drive-internal homing causing unexpected behavior or following errors
difficulty understanding what the controlword / statusword is really doing at runtime


So the goal here is not to replace anything, but to make those problems easier to isolate and understand.

What this does differently
The main idea is to separate things a bit more clearly:
keep LinuxCNC motion as-is
isolate CiA402 semantics (state machine, CSP, homing, etc.)
keep hardware/backend separate (EtherCAT, etc.)
This way it's possible to:
test CiA402 behavior without hardware first
see what's happening internally instead of guessing
debug logic without mixing it with transport issues

You can run it directly (no EtherCAT required):
git clone github.com/MarcosDuqueCesar/linuxcnc-cia402-layer
cd linuxcnc-cia402-layer
find comp -name "*.comp" -exec halcompile --install {} \;
linuxcnc ini/examples/runtime_validate_xyz.ini
scripts/diag.sh

This runs a full CiA402 pipeline using a stub backend.
You can observe things like:
controlword behavior
statusword transitions
mode switching (CSP / HOMING)
basic sequencing / watchdog behavior

Debugging focus:
One thing I tried to improve is visibility.
Instead of guessing, you can see internal state and get a better idea if the issue is:
logic / sequencing
HAL wiring
or backend / hardware

About homing:
This is one area that motivated the work.
In some setups, using drive-internal homing can lead to following errors if the LinuxCNC side is not kept consistent with what the drive is doing.
Here, homing is treated as a separate semantic part instead of being embedded inside the driver logic, so it's easier to observe and reason about.

Current status:
simulation: working
CiA402 logic: validated in runtime
hardware integration: not yet tested
This is intentional so far — the focus was to understand and validate the CiA402 behavior first without requiring hardware.

Scope:
This does not replace:
real-time tuning
EtherCAT setup complexity
Those are still necessary.
This is mainly about structuring and understanding CiA402 behavior.

Feedback:
If anyone is working with CiA402 in LinuxCNC, I’d really appreciate feedback.
Especially from real hardware setups, to validate the adapter/binding side.
Thanks
  • Marcos DC
  • Marcos DC's Avatar
30 Mar 2026 00:42 - 30 Mar 2026 00:49

CiA402 framework for LinuxCNC (follow-up: runnable + simulation + easier debuggi

Category: EtherCAT

 was struggling with the forum editor formatting, so the first post didn’t come out right.
  • rodw
  • rodw's Avatar
30 Mar 2026 00:31
Replied by rodw on topic LinuxCNC S-Curve Accelerations

LinuxCNC S-Curve Accelerations

Category: General LinuxCNC Questions

by way of explanation the moving average uses a simple circular buffer and calculates the sum of readings. Once the buffer is filled, the next reading overwrites the first reading in the buffer. So by deducting that value before it is overwritten and adding the new value as its written, the sum is maintained without any loops. The moving average is simply the sum / buffer size. There is no reason why it could not be called again recursively to calculate the second moving average.
  • PCW
  • PCW's Avatar
30 Mar 2026 00:15
Replied by PCW on topic What's the opposite of skipping steps?

What's the opposite of skipping steps?

Category: Driver Boards

C73 on a 7I96 (there is no C73 on a 7I96S)  is 22 uF 10V or 16V size 1210
  • rodw
  • rodw's Avatar
29 Mar 2026 23:43 - 29 Mar 2026 23:43
Replied by rodw on topic LinuxCNC S-Curve Accelerations

LinuxCNC S-Curve Accelerations

Category: General LinuxCNC Questions

Interesting. If it helps, I have a well tested non-looping moving average function in a component for torch voltage here github.com/rodw-au/showstopper/blob/mast...ents/ohmic3.comp#L92
If I wrote it today I would malloc the storage in the component's startup function instead of using fixed arrays.

Why can't you use more than one thread instead of a FGPA?

 
  • eraserhd
  • eraserhd
29 Mar 2026 23:31
Replied by eraserhd on topic Remora for RP2040

Remora for RP2040

Category: Computers and Hardware

@3404gerber

What I've found is that the existing firmware needs to be configured for debug build. There's a naive spinlock var not marked volatile and the compiler optimizes the loop to an infinite hang. I tried to mark it as volatile, but then I got to ~300 packets instead of ~7. Debug builds do work.

I've refactored to remove the need for the spinlock entirely, and will contribute back whatever Scott will take. My current repo is github.com/eraserhd/Remora-RP2040-W5500/tree/scratch . Optimized builds run great from this branch, and there's a Nix flake with a reproducible build environment.

I'm zeroing in on doing stepgen with the Pico's PIO. It's now properly separated out to do it.
  • frankomatic
  • frankomatic
29 Mar 2026 21:42 - 29 Mar 2026 21:43
Replied by frankomatic on topic What's the opposite of skipping steps?

What's the opposite of skipping steps?

Category: Driver Boards

I was finally able to try out your suggestion this weekend and of course stepgen produces exactly the number of pulses it's supposed to.
So I also connected the motor encoder to the 7i96s and used it to calibrate the number of steps/mm and it turned out to be 456, which is exactly 5% fewer than expected. Since my small pulley has 20 teeth, this led me to inspect the mechanics again and it turns out I have T5 pulleys with an AT5 belt, which resulted in it skipping one tooth forward once per motor rotation. Then I guess occasionally it wouldn't skip and my machine would lose it's position.

Thanks for your help, I learned a lot more about hal. I just have one more sort of related question: can you tell me the capacitance and voltage of the C73 capacitor on a 7i96?
Displaying 46 - 60 out of 17562 results.
Time to create page: 0.260 seconds
Powered by Kunena Forum