Optimum setup for this hardware?

More
18 Jan 2013 06:19 - 18 Jan 2013 06:33 #28790 by birchy
This is my first CNC build, though I have used Linux on my desktop machines for about 5 or 6 years now. Currently using Mint Debian Edition with Xfce desktop.

My CNC machine is an AMD Athlon 64 3000+ on a MSI K8T Neo Motherboard with 2GB of RAM and 128MB Radeon PCI graphics. The O.S. is the standard 10.04 ISO from here: www.linuxcnc.org/iso/ubuntu-10.04-linuxcnc3-i386.iso. There is a wireless card installed for which there are no native drivers, so I am using ndiswrapper and the WinXP driver.

The max jitter is a pretty stable 31K with 10 x glxgears running and browsing with firefox for a few hours, HOWEVER if I then launch LibreCAD, I sometimes get a crazy figure around the 500K mark. In reality, I'm not likely to use LibreCAD on this machine as I will be developing on my desktop machine and then uploading via flash drive or SSH over the internal wifi...but the spike does concern me. Another member is reporting sub-5K latency on almost identical hardware HERE . The main difference is that my mobo is a K8T and his is a K8N, which supports PCI-E. My graphics are currently on standard PCI as the only AGP card I have (256MB ATI) gave worse results. I have tried running with the "vesa" driver but it didn't have any improvement over the "radeon" driver.

I have disabled all unused startup services such as bluetooth and cups. I have disabled power management in BIOS and a couple of other things (please see attached photos for current BIOS settings).

Also attached is the output of lspci -vv.

Is there anything else I can do to improve latency, and in particular get rid of that spike?
Last edit: 18 Jan 2013 06:33 by birchy. Reason: attachments too big

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

More
18 Jan 2013 15:39 #28798 by ArcEye
Hi

I'm pressed for time but a couple of quick things.

1) Get rid of the WiFi card and try again, they are flakey and potential problems both latency wise and just where running near machines are concerned, wired ethernet is much better.

2) If multi core, try the isolcpus parameter (haven't had time to look up your chip to see if it was or not)
wiki.linuxcnc.org/cgi-bin/wiki.pl?Troubl...lcpus_Boot_parameter

10x glxgears and Firefox is pretty brutal, LibreCAD as well is off the scale.

At the end of the day your computer is replacing a box with Fanuc or Anilam on it, not controlling a machine in its spare time between surfing and CAD sessions.
If you treat it as such it will probably be OK

regards

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

More
20 Jan 2013 04:03 - 20 Jan 2013 04:07 #28843 by birchy

1) Get rid of the WiFi card and try again, they are flakey and potential problems both latency wise and just where running near machines are concerned, wired ethernet is much better.

Thanks for this advice. I removed the wifi card and uninstalled ndiswrapper. I also setup the RAM in BIOS to use the Corsair recommended settings of 3-3-3-8 at 2.7V rather than using the "Auto" values. These two things improved jitter from 31K to around 18K. Ethernet isn't really an option unless I run a 50M cable through the house. Plus my CNC desktop mill is going to be mounted on a custom trolley with wheels for portability. Wireless is the easiest option and I've now found that I can leave the wifi card plugged in but enable/disable it by modprobing ndiswrapper. The latency remains at 18K with ndiswrapper disabled and goes back up to 31K when enabled. What i'll do now is automate that process with a Python script so I can disable wifi whenever Axis is running.


2) If multi core, try the isolcpus parameter (haven't had time to look up your chip to see if it was or not)

I've read about this on the wiki and other forum posts, however mine is an AMD64 single core processor.


10x glxgears and Firefox is pretty brutal, LibreCAD as well is off the scale.

I thought the idea was to REALLY stress the PC and to get the best results? What I've noticed is that I only get the spike the first time I open LibreCAD after a reboot. If I launch and close LibreCAD before running the latency test, then open it during the test, I no longer get the spike.


At the end of the day your computer is replacing a box with Fanuc or Anilam on it, not controlling a machine in its spare time between surfing and CAD sessions. If you treat it as such it will probably be OK

Absolutely. The computer is going to be dedicated to my CNC milling machine, so I won't be using it for browsing the net or doing anything none-CNC related. I have this desktop machine for that.


Looking through the pics attached in my opening post, is there anything else in the BIOS settings that might help reduce latency? I disabled USB but that made no difference, so I have re-enabled it now. Also, as stated above, I've now set the RAM timings and voltage to the manufacturers settings rather than using Auto.

Out of interest, what latency figures will be OK with a DC stepper setup using M542 microstepping drives like THESE ?
Last edit: 20 Jan 2013 04:07 by birchy.

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

More
20 Jan 2013 19:41 #28863 by ArcEye

The latency remains at 18K with ndiswrapper disabled and goes back up to 31K when enabled. What i'll do now is automate that process with a Python script so I can disable wifi whenever Axis is running.


That sounds a better solution, WiFi cards are nothing but trouble very often and it certainly was hitting your latency.

I thought the idea was to REALLY stress the PC and to get the best results? What I've noticed is that I only get the spike the first time I open LibreCAD after a reboot. If I launch and close LibreCAD before running the latency test, then open it during the test, I no longer get the spike.


Well within reason, the glxgears specifically test the video system regards OpenGL as well as general display and repaints.
Firefox is such a bloated application these days, it always has a detrimental effect on latency. Quite often the one time spike when opening a large application is to do with disk access. If your HDD has a decent cache and you have a reasonable amount of RAM, any subsequent re-openings or accesses to files in the same directory, are going to be reading largely from cache and will not have the same impact

Looking through the pics attached in my opening post, is there anything else in the BIOS settings that might help reduce latency?


From what I can see you have covered what you can, you seem to have put a lot of thought into it.
The big one is power management, but each BIOS is different. Some you can disable variable fan speeds and set at full speed the whole time, which stops the need for checks of temperature and that kind of thing.
You seem to have covered it and disabling unused daemons in the linux system, such as bluetooth will do no harm at all.
You might want to look at cron and disable the big find database rebuilds if scheduled, they normally happen 10 - 60 minutes or so after boot up on Ubuntu and consume a lot of HDD access.

Out of interest, what latency figures will be OK with a DC stepper setup using M542 microstepping drives like THESE?


Those Leadshine drivers and their bigger brothers are the only ones I use now.
Gary at Zapp is pretty good, just check his prices against www.motioncontrolproducts.co.uk/index.php?cPath=22
He used to work for them and gets a lot of his stock from them, sometimes he is cheaper, sometimes they have an offer on and they are, but remember to factor in P&P, unless you live nearby as I do.

Get the highest voltage supply you can to power them (48v in this case), it really does make a difference to the running.
I have my larger Leadshines running Nema34 steppers at 76V and they sing along happily. I tested them when installing, using a 24v supply and the contrast was incredible.

The Leadshine driver timings are now in the chart, so you can do the calculations as to precise base thread rate. As a rough guide, start with about 40K for an 18K max jitter in tests, and then you can gradually reduce it until you start getting errors and back off
wiki.linuxcnc.org/cgi-bin/wiki.pl?Stepper_Drive_Timing

good luck
The following user(s) said Thank You: birchy

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

More
21 Jan 2013 08:22 #28898 by birchy
Thank you ArcEye! I've now posted my Python script for enabling/disabling the wifi driver so that others may benefit. With the FSB overclocked a little, I'm now getting max jitter of just under 16K, so I'm happy with that considering I started out with 41K at default bios settings and a default O.S.

My CNC control gear was purchased from Zapp about 18 months ago as a 3-axis kit which included the 542 drivers and a 42V PSU. In hindsight, I should of looked at the 752 drivers and a bigger PSU but I was a complete novice at the time.

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

More
23 Jan 2013 07:15 - 23 Jan 2013 07:15 #28991 by andypugh

Ethernet isn't really an option unless I run a 50M cable through the house.

My workshop gets Internet via a pair of Homeplug adaptors.
I have this actual set, which allows me to connect both CNC machines and an IP camera:
www.currys.co.uk/gbuk/cisco-linksys-plsk...er-13927476-pdt.html
Last edit: 23 Jan 2013 07:15 by andypugh.

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

Time to create page: 0.082 seconds
Powered by Kunena Forum