Machsupport Forum

Mach Discussion => Brains Development => Topic started by: SSPW on May 19, 2015, 12:10:56 PM

Title: Brain based home switching
Post by: SSPW on May 19, 2015, 12:10:56 PM
I am testing some ideas in MACH3 in a off line installation (simulation).

I have configured modbus tcp input that has bits 0-2 for to setting home x, home y, home z inputs (soft switches).

I made a brain that sets each home input and then stops all actions when each bit is set.
So its fast, home is set be one shot timer, stop action is set be second delayed timer.

Diagnostics shows modbus and brain are working. I see the M1Home, M2Home and M3Home LEDs flash on the diagnostic page.

When i ref each axis, or all axis, the brain stops the homing travel as expected, but the machine DRO is not zeroed.
I have auto zero set in the homing and limits setup.

Home do i get the machine to zero?



Title: Re: Brain based home switching
Post by: SSPW on May 19, 2015, 03:13:20 PM
Ok i look in the button script for REF ALL HOME, it refs each axis, then it zeros each encoder.

So, i need to zero the encoders, but buttons 131,132,133 are not in brain PressButton list.

Also, when i am on my setting screen, and i press the zero button beside the encoders, nothing happens.

So anybody know how to zero encoder (zero a machine axis) from a brain?
Title: Re: Brain based home switching
Post by: TPS on May 19, 2015, 04:06:10 PM
Hi SSPW,

ok i have read Your pots twice.
maybe, depending  on my bad bavrian english, i have no real idea
what you are realy trying to do.

Thomas
Title: Re: Brain based home switching
Post by: BR549 on May 19, 2015, 06:12:23 PM
The brain is fast internally BUT it only reads the inputs @10 times per sec. That is very slow for a home switch read.

Why try to reinvent the wheel when Mach3 already has an internal home function which runs at kernal speed?

Just a thought, (;-) TP