good morning Tom,
problem fixed: now the Spindle is full functional, but only after a modification of FACTOR value into the header MySpindleDefs.h. In particular I had to replace the declaration:
#define FACTOR (1.0/3000.0)
with the new one:
#define FACTOR 0.00033 // (1/3000 = 0.00033)
the first one #define, checked on Console, gave me always zero; can you explain me why?
Happy Easter day
Beppe
S command doesn't work properly
Moderators: TomKerekes, dynomotion
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: S command doesn't work properly
Hi Beppe,
Congratulations!
I'm not sure.
#define FACTOR (1.0/3000.0)
should work. However:
#define FACTOR (1/3000)
will not work because the first does a floating point division and the 2nd does an integer division which would be zero. Could that be what you really tried?
Congratulations!
I'm not sure.
#define FACTOR (1.0/3000.0)
should work. However:
#define FACTOR (1/3000)
will not work because the first does a floating point division and the 2nd does an integer division which would be zero. Could that be what you really tried?
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: S command doesn't work properly
hi Tom
yes you right: i tryed 1/3000 and not 1.0/3000.0, I am not a C++ user and I didn't know that difference
Many thanks
Beppe
yes you right: i tryed 1/3000 and not 1.0/3000.0, I am not a C++ user and I didn't know that difference
Many thanks
Beppe