Hello Guest it is May 20, 2025, 07:41:41 AM

Author Topic: Mach 4 ABC axis zero buttons greyed out  (Read 2993 times)

0 Members and 2 Guests are viewing this topic.

Re: Mach 4 ABC axis zero buttons greyed out
« Reply #10 on: February 24, 2025, 09:48:40 PM »
Hi,
just to flesh the idea out a bit.

Imagine that every 15 seconds, or 4 times a minute Mach records the coordinates. I would suggest for completeness you would want to record
the current work offsets, all six axes.

One possibility is to record these data sets in a file. Only downside to that idea is that if Mach crashes, which is exactly when you really need this whole strategy to work
then its possible the file will be left open and therefore subject to corruption, it would however allow a large volume of data to be stored.

Another alternative is to store the data in registers.  If half an hours worth of data is stored that would require 6 x 4 x 30=720 registers, which is quite a few, but probably not impossible.
I would want to check with smurph about the advisability of using that number of registers.

Second thought is that what I would not want to do is use a FIFO buffer, as at each instant where another six data items are stored, all the remaining registers would have to be shuffled six places
closer to the end of the buffer. Seems like a waste of processing power.

The alternative I like is to use a 'barrel register' where there are 720 registers in a ring. When a six item data set is to be recorded it is written into the first six available slots. At the next
save interval the pointer would advance by six and the data be written into those six slots and so on. Thus the pointer is pointing to the current data set, whereas (pointer-1) points
to the penultimate data set and (pointer+1) points to a data set recored hale an hour ago.

I think that would work.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'