7I92 read and write latency spikes

More
14 Mar 2021 04:43 #202188 by silden
Hi All,
I’m trying to figure out what is causing the read and write spikes of my 7i92, 7i76 and 7i85 setup.
The machine doesn’t throw errors, but feels sluggish at times.
the “baseline” read time is like 280000 and the write time is 9000. The consistent spikes are 2-3 times higher on read and 5-10 higher on write.
I added the read request and tx/rx-usec 0 without much of a change to n spikes.
I tried this on two machines with similar results.
one is a NUC10 i3 the other a intel G4620.

What is causing these spikes?
Attachments:

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

More
14 Mar 2021 14:08 - 14 Mar 2021 14:11 #202210 by PCW
Probably LinuxCNC GUI Graphic updates (since they seem to happen at 10 Hz)
You may be able to reduce the spikes by disabling any video power saving

Also, as long as you don't overrun the servo thread time these spikes
are basically harmless (especially if you use the DPLL to sample
critical feedback values like encoder and step generator positions)
Last edit: 14 Mar 2021 14:11 by PCW.

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

More
14 Mar 2021 17:52 #202233 by silden
I will check the GFX settings.

I compared the baseline read and write times of both machines and found that the only reason they are different is the different clock speeds. They take about 1000,000 clock cycles on both CPUs. Thats odd to me because the two CPU should take about the same time to crunch the numbers and output the data to LinuxCNC, due the raw speed of the CPUs.

What would be the read and write times of a PCIe solution?

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

More
14 Mar 2021 17:58 #202235 by PCW
The difference is because the times are in CPU clock cycles


PCI/PCIE typically have shorter latency since they don't use as much OS code and memory (perhaps resulting in cache misses), but unless you need better than a 1 KHz servo thread or you have real time issues (can't meet a 1 KHz deadline), the latency spikes are harmless

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

More
14 Mar 2021 18:21 #202239 by silden
My current installation is on a test bed prototype machine to be used to produce parts and as a proof of concept.
I would like to run the Servo Thread as fast as possible to confirm that I can go without an external motion controller on my prototype and production machines. modern motion controller usually have a PID duty cycle of 2-4kHz. this is needed to hold tight tolerances with an acceleration of 0.5 g and above, and a feedrate of 30m/min.

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

More
14 Mar 2021 18:32 #202241 by PCW
If you need 2-4 KHz this is possible on Ethernet but need careful host hardware selection 8--10 KHz is possible with PCI/PCIE

If you are running the step generator you will not need more than 1 KHz
even up to a G or so unless you need chord errors < 20 uinch or so

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

More
14 Mar 2021 20:27 #202255 by silden
What PC and other hardware you would suggest to get to the servo tread speed you mentioned?

I’m using Step Gen right now, but would rather use Analog or Bus control for a more consistent speed control. EtherCat would be another option but not with DMM. Sending the real set point is always better even with the aged +-10V as pinging the position or speed out.
I know that the StepGen works in general but still it isn’t the pinnacle of speed control.
I would love to use ProfiNet, ProfiBus or Fanuc serial control is perfect but pricy and as far as known not compatible with LinuxCNC.

I read about the thread function to spread the workload. Can the Linuxcnc code also threaded in to fast and slow cycles. this would help with correct scheduling of tasks with their important’s. slow update cycle for screen inputs, med update cycle for PID/ trajectory, and fast for important I/O like e-stop, limits and probing.

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

More
14 Mar 2021 21:55 #202270 by PCW
If you are using DMM, step/dir is probably you best option

(The DMM analog has significant delays so makes velocity control iffy)

If you use a bus interfaced device like EtherCAT
the drive is going to do at least linear interpolation
so there is little need for higher than 1 KHz speed

2-8KHz makes sense if LinuxCNC is doing something like
torque control

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

More
14 Mar 2021 22:13 - 14 Mar 2021 22:21 #202272 by silden
I know that the DYN2 drives are iffy at best with Analog input and heard that the DYN4 are way better. I am not “married” to idea of Analog voltage control. EtherCat is an option but not well implemented in LinuxCNC.

I still would like to increase to 4kHz and above even when the improvement of motion control would be not that big.

Would it be possible to interface to Fanuc or Siemens drives utilizing the Mesa Serial cards?
Of course with motion control speeds.

LinuxCNC could read the absolute scales and PID control the loop through the bus.
Last edit: 14 Mar 2021 22:21 by silden. Reason: clarification and typos

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

More
15 Mar 2021 01:34 #202290 by Michael
The DYN4 in analog is not any better. I had a 5ms delay between analog outputs and encoder signal back to the mesa card. Same timing issues with DYN4 in position mode with quadrature input. I have equated them to being overpriced hybrid step systems at best.

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

Moderators: PCWjmelson
Time to create page: 0.289 seconds
Powered by Kunena Forum