Re: [Emc-developers] fabs function in real time process

2010-09-26 Thread Federico Manzan
On x86 kernel is not allow using FPU or floating point. You can utilise floating point emulation. Here you can find some example http://www.linuxsmiths.com/blog/?p=253 Ciao Fede On 09/26/10 00:41, Jon Elson wrote: > I'm trying to correct a bug in the hal_ppmc.c driver. There is a place > where a

Re: [Emc-developers] fabs function in real time process

2010-09-26 Thread Jeff Epler
A subset of standard C math functions are available when you #include "rtapi_math.h". This includes fabs(), which is currently used by other realtime components such as stepgen. Jeff -- Start uncovering the many advantag

Re: [Emc-developers] fabs function in real time process

2010-09-26 Thread Jon Elson
Jeff Epler wrote: > A subset of standard C math functions are available when you #include > "rtapi_math.h". This includes fabs(), which is currently used by other > realtime components such as stepgen. > > OK, I grep'ed hal/drivers, but didn't think to grep hal/components to see if they used a

Re: [Emc-developers] fabs function in real time process

2010-09-26 Thread Jon Elson
Federico Manzan wrote: > On x86 kernel is not allow using FPU or floating point. > You can utilise floating point emulation. > Here you can find some example > http://www.linuxsmiths.com/blog/?p=253 > I'm sorry if this appears rude, but if you know so little about EMC, you should not be comment

[Emc-developers] [PATCH 3/3] Handle interrupted O-calls issued in MDI mode

2010-09-26 Thread Pavel Shramov
From: Pavel Shramov When call returns INERP_EXECUTE_FINISH value check if call depth was changed and if so issue execute(0) commands until it returns to pre-call value. Uses 0xff to mark command as NULL since it's not possible to set char[256] to NULL value. Signed-off-by: Pavel Shramov --- s

[Emc-developers] MDI O-call interrupt handling

2010-09-26 Thread Pavel Shramov
I've played a bit with EMC and found that it's impossible to call function with some M66 or probing instructions in MDI mode. To be correct it's possible but stops at first instruction returing INTERP_EXECUTE_FINISH. So I'm sending for review patch set fixing this problem. It is split into 3 pat

[Emc-developers] [PATCH 2/3] Added emcTaskPlanLevel function

2010-09-26 Thread Pavel Shramov
From: Pavel Shramov Returns call_level value from interpreter Signed-off-by: Pavel Shramov --- src/emc/nml_intf/emc.hh |1 + src/emc/task/emctask.cc | 11 +++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/emc/nml_intf/emc.hh b/src/emc/nml_intf/emc.hh index 4

[Emc-developers] [PATCH 1/3] Handle interrupts in O-calls

2010-09-26 Thread Pavel Shramov
From: Pavel Shramov When instruction iterpreted with INTERP_EXECUTE_FINISH return value is found in O-call set mdi_interrupt flag so subsequent calls to Interp::execute(0) will continue execution. Also don't reset on such errors. Also added call_level function to get current call stack depth. S

Re: [Emc-developers] MDI O-call interrupt handling

2010-09-26 Thread Jeff Epler
Thanks for your submission--the patches applied without trouble. Unfortunately, I ran into some problems when testing it. I modified smartprobe.ngc to be a gcode subroutine, used the servo_sim.ini sample configuration (but modified to use the AXIS GUI) and then called smartprobe from mdi: o ca

Re: [Emc-developers] MDI O-call interrupt handling

2010-09-26 Thread Pavel Shramov
On Sun, Sep 26, 2010 at 03:58:24PM -0500, Jeff Epler wrote: > I found that trying to interrupt the gcode, for instance by hitting ESC > to abort, or F3 to switch to manual mode, the GUI would become > unresponsive and the terminal would still show lines like > LOG(G1 X0.30 Y-0.66 Z0.907

[Emc-developers] [PATCH] Fix long MDI commands wait and abort

2010-09-26 Thread Pavel Shramov
Split mdi flag to wait and next for waiting and feeding respectively. Abort on all conditions where emcTaskAbort is called. Signed-off-by: Pavel Shramov --- src/emc/task/emctaskmain.cc | 37 - 1 files changed, 28 insertions(+), 9 deletions(-) diff --git a/s