Watch out for missing [EMCIO] LUBE_WRITE_INDEX



EMC users,

Recently we added a new .ini file parameter,

[EMCIO]
LUBE_WRITE_INDEX = <digital out bit for lube pump motor>

and code for this in bridgeporttask and bridgeportio that turns the lube
pump motor on when the axes are enabled. If you don't have a lube motor
hooked up, this new code is harmless enough. It just toggles a bit
that's not hooked up.

Or so I thought.

The default value for this index is 9, as set in
emc/src/emcnml/emccfg.h:

#define DEFAULT_SPINDLE_FORWARD_INDEX      0
#define DEFAULT_SPINDLE_REVERSE_INDEX      1
#define DEFAULT_SPINDLE_BRAKE_INDEX        2
#define DEFAULT_SPINDLE_DECREASE_INDEX     3
#define DEFAULT_SPINDLE_INCREASE_INDEX     4
#define DEFAULT_MIST_COOLANT_INDEX         5	
#define DEFAULT_FLOOD_COOLANT_INDEX        6	
#define DEFAULT_ESTOP_WRITE_INDEX          7
#define DEFAULT_SPINDLE_ENABLE_INDEX       8
#define DEFAULT_LUBE_WRITE_INDEX           9

We set these as the defaults that you can override if you want to set
them to something else.

However, you very likely could have selected 9 for something, like
SPINDLE_INCREASE_INDEX, and then when you turned the machine on, the
spindle speed would increase since the default value for lube coincides
with your explicitly set value for spindle increase. This happened to me
and let me tell you I was confused.

The near term workaround if you're having problems with something on bit
9 and no value for the lube index is to explicitly point
LUBE_WRITE_INDEX to an unused digital output.

The longer term fix is for us to set the defaults to an invalid -1
value, and change the code to suppress bit writes for -1 indices. This
means that you'll have to explicitly set the indices for all your IO and
not rely on these sequential defaults. I think forcing them to be
explicit is a better idea anyway.

--Fred



Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact