Following errors at fairly low speeds with mesa 5i25? Also bad latency (120k)

More
09 Jun 2020 23:16 #170889 by nick-parker
Hi all, I have a Shizuoka ST-N knee mill with a Summit-Dana Quickdraw ATC that was generously gifted to me around 6 years ago. I half-renovated it and half-converted it to LinuxCNC back when I got it, but then moved away and left it sitting in my dad's garage until today.

I've got it running now with a 5i25 board I bought back then and everything's great, I can do cuts, but I get joint following errors at pretty wimpy speeds. XY are limited to ~25 IPM and Z to ~15 IPM, which is odd because the three drives are identical. The original Bandit controller can run all three axes at 100 IPM and that's only a software limit, so something's wrong.

I have a handful of questions:

1. My latency occasionally spikes to 120k but for the most part it's happy down around 25-30. Can latency spikes cause following errors even though my 5i25 is handling the stepgen? And, are there any safe bets to upgrade hardware this old latency wise? EG stick an SSD in to replace the spinny disk, add more/faster RAM?

2. Does the 5i25 have DPLL clocks on it, or is that only a feature for ethernet daughter cards? I read those clocks help a lot with following errors. Enabling it in my HAL file didn't add any pins and trying to set the timer-us caused an error so I'm guessing not, but if there's a way for me to use this I want it.

3. More generally, am I doing something obviously wrong with my configuration so the mesa card isn't doing the high speed work it should be doing?

4. My steppers are weird four phase behemoths so I have to drive them in table mode, could that be screwing me? Modifying steplen and stepspacing had no effect, except to disable "stepgen.XX.maxvel is too big for current step timings & position-scale, clipping to max possible" errors at startup.

5. Should I have separate acceleration and velocity limits for the mesa stepgens vs the EMCMOT values? I see some examples online recommending the stepgen values be 25-100% larger than the EMCMOT values.

6. Should I adjust my base period or servo period? Neither seemed to have any effect when I fiddled with them.

7. Is there any modern hardware that's known-good for LinuxCNC, with or without a 5i25 stuck in it? I would just use a beaglebone black but I like the interactive graphics in Axis. Viewing your jog history is nice for some setups.


Hardware details:
HP Compaq DC7100 CMT
Intel Pentium 4 3Ghz
1 GiB DIMM DDR 400 MHz RAM
Intel GMA900 graphics

Thanks!
-Nick
Attachments:

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

More
10 Jun 2020 00:01 - 10 Jun 2020 00:02 #170890 by PCW
Unfortunately, the built in position mode stepgen control in the driver
does not deal with jitter very well. This (and the 120 usec latency spikes)
are the most likely cause of the following errors.

That said, you can improve performance by setting the stepgen maxaccel
to 25% more than the per axis (or Joint for 2..8 and >) limits

Other options are using the PID control method that most newer hal files
use for stepgen control, you can get a good template for this by creating a
dummy pncconf configuration for any stepgen hardware.

Yet another option is to use the DPLL. This is not usually present in PCI/PCIE
firmware but can be added to any interface type.

Using both PID and DPLL together can get the stepgen position deviation
controlled to a very small fraction of a step even with a 300 usec or so occasional
latency spikes.
Last edit: 10 Jun 2020 00:02 by PCW.

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

More
10 Jun 2020 00:25 #170893 by nick-parker
Thanks for the info! I'll try to add DPLL and switch to PID.

One more quick question: Would a fresh install of the latest LinuxCNC hurt performance on this old system?

It's showing its age pretty badly - the kernel's no longer supported, all my apt repositories needed changing, I need to upgrade SSL if I want git to work, etc.

Thanks,
-Nick

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

More
10 Jun 2020 00:34 - 10 Jun 2020 00:40 #170895 by PCW
What firmware/breakout are you using?
With that information,I can cobble up a matching
5i25 bitfile with DPLL module included.

Not sure about upgrading the OS, LinuxCNC has had issues
with newer RTAI kernels so there's no official updated image.
I think there's a forum thread on a Mint19/RTAI image that
might be worth a try
Last edit: 10 Jun 2020 00:40 by PCW.

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

More
10 Jun 2020 00:59 - 10 Jun 2020 01:08 #170897 by nick-parker
I'm digging through the system to figure out what firmware I'm using - that'd be a question for me from 6 years ago but maybe I can find it on here.

I'm not using any actual breakout board, just a couple of breadboards which I'll convert to custom stuff once this thing's all done.

The 5i25 is just running one pwm gen that I convert to a 0-10V signal for my spindle speed, and three stepgens which are each stepping through an 8 state table which IIRC performs half-stepping on these weird four phase motors. This machine's "motor drivers" just have a 5V input to turn on each of the phases, so I hook up to those directly on the breadboard.

The only other part of my config is a little bit of logic to drive a buffer chip to drive the bank of 24V relays that turn the spindle's stator winding on/off and control its polarity, and that's done on the other parallel port.

Hunting for firmware info now, let me get back to you. Thanks a bunch for the help, I was not looking forward to figuring out how to modify the firmware myself!

Edit: Judging by when files were modified, the 5i25 is either running whatever its default firmware is, or a file I found on here called tablemode3.bit, which I probably wrote myself back in March 2014. It's in here with tablemode1 and tablemode0 made over the course of an afternoon.
Attachments:
Last edit: 10 Jun 2020 01:08 by nick-parker. Reason: Found my firmware

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

More
10 Jun 2020 01:27 #170899 by nick-parker
Alright I'm fairly confident I modified the default hostmot2 firmware to support table mode in some capacity - I'm not sure why when that's a default feature, but I'll have access to the old hard drive that would have my modified source on it next week, so I'll report back then.

Thanks again!

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

More
10 Jun 2020 01:34 #170902 by PCW
You could also just run

sudo mesaflash --device 5i25 --readhmid > mypinout.txt

and post mypinout.txt here

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

More
10 Jun 2020 01:59 #170905 by nick-parker
Ooh thanks! I just gave that a shot:

First it complained that --readhmid was an unrecognized option. The help text says `--hm2 write all hostmot2 info in PIN file format` which sounded like what you wanted.

That complained `Error: Selected board 5I25 not found.` so I checked scanpci and turns out I have a 6i25.

I tried it with 6i25 and I got a ton of duplicates of this:
```
Module: (unknown-gtag-72)
There are 191 of (unknown-gtag-72) in configuration
Version: 22
Registers: 4
BaseAddress: AD10
ClockFrequency: 22
ClockFrequency: 2.146 MHz
```

Then
```
Configuration pin-out:
Segmentation Fault
```

I'm really wondering if I shouldn't just start fresh. I know what all the signals coming out need to look like quite well, so I'm going to do some reading on hostmot2 table mode with an unmodified 6i25 and see if I can sort out what I did back then.

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

More
10 Jun 2020 02:10 #170906 by PCW
Might be an ancient copy of mesaflash
current is here:
github.com/LinuxCNC/mesaflash

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

More
10 Jun 2020 04:29 - 10 Jun 2020 04:29 #170909 by nick-parker
Ah yep that worked! I had the mistaken notion that upgrading mesaflash would mean losing whatever archaic version I had - which I might want next week when I find my source - but obviously I was able to just build the new one in a separate folder.

Here's the output:
```
Configuration Name: HOSTMOT2

General configuration information:

BoardName : MESA6I25
FPGA Size: 9 KGates
FPGA Pins: 144
Number of IO Ports: 2
Width of one I/O port: 17
Clock Low frequency: 66.6667 MHz
Clock High frequency: 200.0000 MHz
IDROM Type: 3
Instance Stride 0: 4
Instance Stride 1: 64
Register Stride 0: 256
Register Stride 1: 256

Modules in configuration:

Module: WatchDog
There are 1 of WatchDog in configuration
Version: 0
Registers: 3
BaseAddress: 0C00
ClockFrequency: 66.667 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Module: IOPort
There are 2 of IOPort in configuration
Version: 0
Registers: 5
BaseAddress: 1000
ClockFrequency: 66.667 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Module: QCount
There are 1 of QCount in configuration
Version: 2
Registers: 5
BaseAddress: 3000
ClockFrequency: 66.667 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Module: StepGen
There are 7 of StepGen in configuration
Version: 2
Registers: 10
BaseAddress: 2000
ClockFrequency: 66.667 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Module: PWM
There are 2 of PWM in configuration
Version: 0
Registers: 5
BaseAddress: 4000
ClockFrequency: 200.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Module: LED
There are 1 of LED in configuration
Version: 0
Registers: 1
BaseAddress: 0200
ClockFrequency: 66.667 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Configuration pin-out:

IO Connections for P3
Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir

1 0 IOPort None
14 1 IOPort PWM 0 PWM (Out)
2 2 IOPort StepGen 0 Step/Table1 (Out)
15 3 IOPort None
3 4 IOPort StepGen 0 Dir/Table2 (Out)
16 5 IOPort PWM 0 Dir (Out)
4 6 IOPort StepGen 0 Table3 (Out)
17 7 IOPort None
5 8 IOPort StepGen 0 Table4 (Out)
6 9 IOPort StepGen 1 Step/Table1 (Out)
7 10 IOPort StepGen 1 Dir/Table2 (Out)
8 11 IOPort StepGen 1 Table3 (Out)
9 12 IOPort StepGen 1 Table4 (Out)
10 13 IOPort StepGen 2 Step/Table1 (Out)
11 14 IOPort StepGen 2 Dir/Table2 (Out)
12 15 IOPort StepGen 2 Table3 (Out)
13 16 IOPort StepGen 2 Table4 (Out)

IO Connections for P2
Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir

1 17 IOPort None
14 18 IOPort PWM 1 PWM (Out)
2 19 IOPort StepGen 3 Step/Table1 (Out)
15 20 IOPort None
3 21 IOPort StepGen 3 Dir/Table2 (Out)
16 22 IOPort PWM 1 Dir (Out)
4 23 IOPort StepGen 4 Step/Table1 (Out)
17 24 IOPort None
5 25 IOPort StepGen 4 Dir/Table2 (Out)
6 26 IOPort StepGen 5 Step/Table1 (Out)
7 27 IOPort StepGen 5 Dir/Table2 (Out)
8 28 IOPort StepGen 6 Step/Table1 (Out)
9 29 IOPort StepGen 6 Dir/Table2 (Out)
10 30 IOPort None
11 31 IOPort QCount 0 Quad-A (In)
12 32 IOPort QCount 0 Quad-B (In)
13 33 IOPort QCount 0 Quad-IDX (In)
```
Last edit: 10 Jun 2020 04:29 by nick-parker. Reason: Put output in code block

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

Time to create page: 0.362 seconds
Powered by Kunena Forum