Question: P value with MESA Setup without encoders

More
3 years 6 months ago - 3 years 6 months ago #268151 by 5G-antry
Sorry for my long time to answer.
Thank you, now I get it and understand the behavior! 

One further question.With ~ 1 – 2 ms End-to-End latency and basically no Jitter, I can let the machine tool run “stable”.
For this, the watchdog of the Mesa and the servo thread are set higher than default. 
However, if I want to initialize the connection with the mesa card with higher latency, I run into a timeout and LinuxCNC will not start at all.

In my opinion, it is due to the firmware. To be precise: “hm2_eth.c” of the firmware triggers the error. The error codes are attached (console_output.txt and the debug.txt)  My idea is to adapt the code of “hm2_eth.c”.
I am no C Expert, but it It should have something to do with line 452 – 454 in the code (source: github.com/LinuxCNC/linuxcnc/blob/master...a-hostmot2/hm2_eth.c )

Is this correct? And is my approach purposeful? I know that this is not good regarding safety, but that is currently not a problem.If I want to change the C code of the firmware, how can I build/make the matching .bit-file?If my issue is “deeper”, you can feel yourself free to correct me :)
If I should open a new thread, I can do that too.

Best regards and thank you!
Last edit: 3 years 6 months ago by 5G-antry.

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

More
3 years 6 months ago #268163 by tommylight
What are you trying to achieve?
What is the end goal?
I know for sure Mesa ethernet boards work with a servo period from 250000 up to 4000000, what period are you trying to use?
The error attached is usually due to ethernet on the host PC not being set up correctly.

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

More
3 years 6 months ago #268177 by 5G-antry
The setup is part of a research project at my university.

The goal is to have a wireless connection between LCNC and the MESA card based on a wireless token system for time-deterministic communication.
Currently, the machine works with 2ms latency and 0.2ms Jitter (Servothread 4ms; MESA Watchdog 10 or 15 ms). However, the hostmot2 firmware just loads up to a latency of 1ms and Jitter of 0.1ms due to an internal (I think hard coded (?)) "fail safe". My understanding is that the error occur when the inital time out of the packets (time between packets) is too long.

I know that this behaviour is totaly fine and correct. However, I want to "deactivate" or set this time out higher.

Just for understanding: I tested the described behaviour with the "netem" function ( man7.org/linux/man-pages/man8/tc-netem.8.html ). I added this to the real time kernel. It is not part of the kernel of the current stable LCNC version.

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

More
3 years 6 months ago - 3 years 6 months ago #268179 by PCW
There is no hardware latency setting in the hostmot2 firmware. The hm2_eth driver does
time-out RX packets when the delay is more than a given percentage of the servo thread period.
The driver will also give up if timeouts occur at higher than a certain rate relative to
good transactions. This behaviour is all programmable with hm2_eth setup parameter and pins.

man hm2_eth
Last edit: 3 years 6 months ago by PCW.
The following user(s) said Thank You: 5G-antry

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

More
3 years 6 months ago #268180 by 5G-antry
Thank you. Will look into it :)

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

More
3 years 6 months ago #268350 by 5G-antry
Currently I can't get LinuxCNC to start yet, with the communication delayed by 1.5ms. If I set the delay when LinuxCNC already started, the machine runs and works (so far tested for 1h).

One brief question. The influential parameters after reading hm2_eth manual and hostmot2 manual are the following?

HAL:
  • hm2_7i76e.0.packet-read-timeout  xx % or XXX.XXX ns (dependent on Servo Period)
  • hm2_7i76e.0.watchdog.timeout_ns X.XXX.XXX ns
INI:
  • SERVO_PERIOD = X.XXX.XXX ns
Or do other adjusting factors exist?

Thank you in advance, always appreciate your help!

 

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

Time to create page: 0.070 seconds
Powered by Kunena Forum