Hello Guest it is March 28, 2024, 07:03:03 PM

Author Topic: Brain to trigger home or probe input  (Read 7867 times)

0 Members and 1 Guest are viewing this topic.

Brain to trigger home or probe input
« on: October 13, 2014, 11:51:59 AM »
Hello,
For a large 3D machine using 4 Z motors in "parallel" (same step/Dir, but each motor can be individually disabled upon accurate homing), I'd like to make a brain to OR all my 4 Z home inputs and create a HomeZ signal that is compatible with the homing procedure (Z ref).
I made a brain which output is actually the homeZ input, and it works in the diagnostic screen (Home motor Z gets activated), but the reference procedure cannot be started as Mach considers that the Home Z input is not defined.
-Same problem using probe input instead.
-I could hardwire my OR function, but this is not easy with the optocouplers I have now.
-I could probably activate an output using the brain, and connect it to a physical input pin, configured for Z home. But I have no more outputs (except on modbus, too slow)
-I fear a vb code reading directly the inputs to stop the homing will be too slow.

There may be a way to activate an internal register using the brain, which could be read as a port input for home Z definition ? I know that writing a parallel port data register does not mean I can read it and get the same value afterwards..
Possibly I could let Mach3 think the homeZ pin is configured when it is not (if I configure it to another port pin, then the brain will not change its state).

Any idea ? I would really want to avoid making a board just to OR my 4 signals... - even using diodes I find it not so cool when there should be a clean soft way.

Pierre
Re: Brain to trigger home or probe input
« Reply #1 on: October 14, 2014, 09:19:13 AM »
I forgot to mention that I am using a smoothstepper. (I did'nt find a solution using parallel port either).

Well triggering inputs might be beyond possibilities, even for brains. Too bad.

Pierre.

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Brain to trigger home or probe input
« Reply #2 on: October 15, 2014, 08:02:48 AM »
Hi Pierre,

If you want to look at your 4 Z head home inputs in an OR'd config to a master Z home then try this in Brians.
(ONE caviot, in an "OR" condition, once ONE of your heads hits its Home switch, then this will activate your Home input)
Did you mean you want to "AND" your 4 z head homes, and then once all 4 are homed, then turn on the master home?, if so change the below from an "OR" to "And" block.

We will call OEMTRIGGERS 1-4, as your the homes for your 4 Z homes, and your master home = Z home input).
                
(OEMTRIGGER1)---->(NO OP)--->|------------|---\
(OEMTRIGGER2)---->(NO OP)--->|---(OR)---|--------->Terminate block (Z Home Input)
(OEMTRIGGER3)---->(NO OP)--->|--BLOCK--|---/
(OEMTRIGGER4)---->(NO OP)--->|------------|-/

sorry for the ascii art, but the 4 OEMTRIGGERS go to an "OR" block (or "AND" block if correction above), then the output of the "OR" block terminates to
the Z Home Input (enable this in ports and pins, but do not assign a Port or Pin number).
I have NOT tested this, and if this does not work, you may have to do it in your external electronic hardware, perhaps an Arduino interface.

Just a side note for you, Brians runs in Machs update loop so its fastest scan time is going to be 1/10th of a second.

Brain is attached,

Scott
« Last Edit: October 15, 2014, 08:05:35 AM by poppabear »
fun times
Re: Brain to trigger home or probe input
« Reply #3 on: October 15, 2014, 08:21:10 AM »
Hi Scott,
Thks for your reply. I like the Ascii art.

I have implemented the brain as described and it works only for the Home DRO in the diagnostic screen, but it will not stop the motor while homing. Too bad.

I thought brains were much faster than 1/10th of a second, so or'ing the signals in brains seem useless anyway.
In the meantime, I had contact with smoothstepper tech support and they told me that general input and outputs were updated only at 10Hz, while homing input is controlled internally (in the smoothstepper if I understood well) so as to stop motor quickly when homing.
I think I am left with the hardware solution - back to the old 74xx TTL logic series..  hum, glorious times.

Thanks again,
Pierre

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Brain to trigger home or probe input
« Reply #4 on: October 15, 2014, 09:31:57 AM »
Hi Pierre,

had the same problem with a Y axis driven by two motors.
i put a relay to each home limit switch.

a NC contact of the relay disabled the pulse signal off the motor driver.

i put also a relay to the direction signal of the axis , NO contacts of this relay
linked the NC contact of the limit switch relay.

then i put a NO contact of each limit switch relay in a row to the limit switch input.

worked perfect, i hope you can onderstood what i mean in my bad english.

Thomas
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Brain to trigger home or probe input
« Reply #5 on: October 15, 2014, 09:56:09 AM »
Hi Thomas,
Thks for your input. I must admit the Ascii art is somewhat easier to understand than plain text, especially when describing elec schemes...
I also disable step inputs of some motors when I want to make individual motor homing procedure. But I cannot replicate your signal relaying because my machine goes beyond home switches in some occasion (home is not limit switch here).
In present case, I mostly wanted to avoid extra hardware, since the machine is to be delivered soon and software changes are always preferable then...
Tchuess,
Pierre

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Brain to trigger home or probe input
« Reply #6 on: October 16, 2014, 04:02:51 AM »
Hi Pierre,

for my mind, if can not choose the hardware solution to stop the particular motors,
all other ways (brains VB or what ever) will be to slow for a homing sequence.

to use A B C and Z axis might be a way, because they have their own reference switch input,
but to talk about this i know too less of your machine.

a simple or logic might be not the wright way if you want too 'allign' the 4 motors with the
4 limit switches.

in my hardware solution the individual motor was stopped by his own limit switch and after all
limit switches are hit the homing continues with the slow move to go off the switches.

if you whish i can do a drawing and post.


Regards Thomas
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Brain to trigger home or probe input
« Reply #7 on: October 16, 2014, 06:25:28 AM »
Hi Thomas,
We can align the motors because we have individual outputs to enable each motor separately, so we can home all, then home one by one. This works with a Or function of home switches (we had switches in series and validated the procedure. Now we use optocouplers, and it is just more difficult to "or" their output..)
Pierre