latency 2.7.2 install on Raspberry Pi

More
15 Jan 2016 18:13 - 17 Jan 2016 10:08 #68479 by tjmarch
I have installed 2.7.3 on Raspberry PI 2 trying to understand the different latency test
First results screen shot of latency-test
Second results screen shot latenct-plot
Third results screen shot latency-histogram
I would like to use a Mesa 7i92 everything I/O Ethernet card
Results seem to very allot between programs are these programs each using a different scale?
Also I have observed that when a latency test is started there is a spike then thing settle down I was able to capture this spike in screen shot provided in latency-plot. Latency-plot shows good results just not sure what to believe with such a difference in each test.

If someone could please take a look at these result and explain, it would be appreciated

Tim March








Attachments:
Last edit: 17 Jan 2016 10:08 by tjmarch.

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

More
15 Jan 2016 18:55 #68484 by PCW
I would run the latency histogram without the base thread or with a much slower base thread
(the RPI2 looks like it is having big troubles running the 40 KHz base thread)

Also the RPI2 Ethernet is not suited to real time since its conveyed over a USB interface

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

More
15 Jan 2016 23:23 #68501 by tjmarch
PCW
Thanks for the quick reply. After studying pic's in my previous post more, I see last intervals base thread in latenct-test was 11667us. which makes more sense to me now for what I was seeing in latency-histogram which was around 1E4 (10000us). But I still can not wrap my head around latency-plot which shows base thread max less than 100us.
The site where I downloaded Sd card image,

docs.emlid.com/navio/Downloads/Real-time-Linux-RPi2/

claims latency readings of around 100us and has graph at above link.
If anyone is reading this only problem is image has no desktop but is easy to add, I used xfce.
I did not know about problem with Ethernet on Rpi thank-you for pointing that out. Will not waste much more time on Rpi am thinking of buying a different board I have some Amozon x-mass gift money to spend. I like this board, your thoughts PCW.

www.amazon.com/dp/B012RLN51A/ref=wl_it_d...oliid=I1SBHFKXIUKA4F

Should be able to run same image file, if kernel in image used is not set up to use 1000Mbps Ethernet should fall back to 10/100, that will work correct?
Also was wondering PCW said,

I would run the latency histogram without the base thread or with a much slower base thread
(the RPI2 looks like it is having big troubles running the 40 KHz base thread)


I plain on using Mesa 7i92 with a 5 axis BOB and stepping, so am only interested in base thread. But why did think Rpi was having trouble with base thread, it is because of multiple peaks in latency-histograph? Plus what would the syntax be to start latency-histogram from command line at slower KHz and what Khz would you recommend.

I know lots of questions, sorry, thanks in advance

Tim March

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

More
15 Jan 2016 23:28 #68502 by PCW
You only need a (say 1 KHz) servo thread to run a 7I92 (a base thread is not of any use)

You can get all the latency-histogram command line options with:
latency-histogram --help
The following user(s) said Thank You: tjmarch

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

More
15 Jan 2016 23:40 #68504 by tjmarch
PCW
Ok looks like I need to do some more reading I thought base thread was important for running stepper motors.

Thanks
Tim march

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

More
16 Jan 2016 00:11 #68506 by PCW
The base thread is only used for software step generation (and software encoder reading etc)
These are done in hardware on the 7I92, effectively the basethread is the 7I92s low speed clock
(100 MHz)

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

More
16 Jan 2016 01:13 #68511 by jepler
Please note that on the RPi, the ethernet adapter is connected to the USB bus. This is not likely to yield acceptable RT performance. Source: en.wikipedia.org/wiki/Raspberry_Pi#Specifications, see row for USB which states "4 (via the on-board 5-port USB hub; one USB port internally connected to the Ethernet port)[40][49]". However, I will still be interested to hear the results of your testing.

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

More
16 Jan 2016 02:31 #68512 by tjmarch
PCW
I am currently at work will not pull trigger on buying new board until I see how servo thread works out on Rpi
but was able to run
latency-histogram --help
In Vm on my work laptop so syntax is

latency-histogram --nobase
To run without Base Thread
I do not see option to lower or change Khz in help screen

Usage:
latency-histogram --help | -?
or
latency-histogram [Options]

Options:
--base nS (base thread interval, default: 25000, min: 5000)
--servo nS (servo thread interval, default: 1000000, min: 25000)
--bbinsize nS (base bin size, default: 100
--sbinsize nS (servo bin size, default: 100
--bbins n (base bins, default: 200
--sbins n (servo bins, default: 200
--logscale 0|1 (y axis log scale, default: 1)
--text note (additional note, default: "" )
--show (show count of undisplayed bins)
--nobase (servo thread only)
--verbose (progress and debug)

Notes:
Linuxcnc and Hal should not be running, stop with halrun -U.
Large number of bins and/or small binsizes will slow updates.
For single thread, specify --nobase (and options for servo thread).
Measured latencies outside of the +/- bin range are reported
with special end bars. Use --show to show count for
the off-chart [pos|neg] bin

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

More
16 Jan 2016 07:04 - 16 Jan 2016 07:18 #68517 by tjmarch
PCW
Thank-you for help
Got out of work and tried latency test I am happy with results going to purchase other board below are screen shots of test.
Worth noting a little message box pops up about memory usage during latency-plot if you close it , latency-plot will also shut down. Must be because base thread is being used. Also tried isolcpus=1,2,3 in /boot/cmdline.txt latency was a little better but system bogged way down.

Tim




Attachments:
Last edit: 16 Jan 2016 07:18 by tjmarch.

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

More
15 Feb 2016 13:50 - 15 Feb 2016 14:44 #70162 by tjmarch
I purchased a Banana Pi M2 board from here:

www.amazon.com/gp/product/B0121A5Q5U?psc...i_detailpage_o07_s00

Have it setup with Debian Wheezy, XFCE and linuxcnc 2.7.4 the Raspberry PI image would not work with this board. I have compiled latest stable kernel from kernel.org, (4.4.1) with RT PREEMPT patch and installed system to sdcard. Test are very promising, I have a little more work to do with it here are some screen shots, Latency-histogram without base running for just over a hour plus latency plot. Banana board acks the same as Raspberry seems to have trouble running base thread. But banana board has no warnig message about memory usage.





Attachments:
Last edit: 15 Feb 2016 14:44 by tjmarch.

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

Time to create page: 0.164 seconds
Powered by Kunena Forum