[Emc-developers] Restoring state after abort during remap

2017-03-30 Thread John Morris
During execution, remap functions may alter machine state such as interp 
modal states or HAL pins (via M62-M68).  These functions may then 
restore previous state before returning.

If a remap is aborted mid-execution, any cleanup code is also aborted. 
There is currently no way to ensure that the machine is not left in an 
unexpected or inconsistent state.

A first idea to address this is, alongside the current `prolog`, `body` 
and `epilog` functions, to add an additional `cleanup` or `except` remap 
function, guaranteed to always execute, even after an abort.  How this 
would work in the context of the running interpreter, I can't yet say.

Have others noticed this problem before, and think it's important to 
address?  It would be great to hear of examples others have encountered 
and ideas for solutions.  If there's interest, I would be happy to 
collaborate on and share a solution in this forum.

John

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] jog wheel problem

2017-03-30 Thread Jon Elson
On 03/30/2017 04:04 AM, andy pugh wrote:
> On 30 March 2017 at 04:11, Jon Elson  wrote:
>> Now, I am using ilowpass on a 2.6 install, possibly
>> something has changed.
> Nothing has changed since 2014
> https://github.com/LinuxCNC/linuxcnc/commits/master/src/hal/components/ilowpass.comp
>
> The whole component is only 2 lines of code:
>
> ;;
> value += (in - value) * gain;
> out = (int)(rtapi_s64)(value * scale);
>
>
>
Right.  Jeff Epler wrote that for me at one of the CNC 
Workshops at Roland Freistad's place.  It is so SIMPLE, I am 
having some trouble seeing how it could be the culprit, 
unless maybe given very wrong parameters.

Anyway, comparing the input and output from ilowpass should 
confirm that it is (or is not) causing the problem.
I'm thinking there is a combination of a weak encoder output 
drive, electrical noise, maybe A<-> B crosstalk and the PPMC 
encoder counter is counting somewhat erratically.  I think 
putting Halmeter on the encoder count output and then 
cranking the encoder known distances at varying speeds might 
quickly show this is happening. (or not...)

Jon

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] jog wheel problem

2017-03-30 Thread andy pugh
On 30 March 2017 at 04:11, Jon Elson  wrote:
> Now, I am using ilowpass on a 2.6 install, possibly
> something has changed.

Nothing has changed since 2014
https://github.com/LinuxCNC/linuxcnc/commits/master/src/hal/components/ilowpass.comp

The whole component is only 2 lines of code:

;;
value += (in - value) * gain;
out = (int)(rtapi_s64)(value * scale);



-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers