On 03/08/2016 01:02 PM, Len Shelton wrote:
> Well that sucks. Any ideas on how to write a module that would make it
> available?

The easiest way is probably to add a ".tolerance" hal pin to Motion, and 
have Motion copy the data there.

Look in src/emc/motion/mot_priv.h for the emcmot_hal_data_t struct, 
which contains Motions HAL interface.  Then look in motion.c, in the 
init_hal_io() function that connects those variables to hal.

You could add another float pin to the emcmot_hal_data_t, initialize it 
in that function, and set it whenver Motion's command.c gets an 
EMCMOT_SET_TERM_COND command.

Then you could read the pin as motion.tolerance in HAL.

Don't forget to add the new pin to the motion manpage, and extra credit 
for including a new test to verify the correct behavior.


-- 
Sebastian Kuzminsky

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to