Hello Guest it is March 29, 2024, 12:53:35 AM

Author Topic: Brain writing on/off relay  (Read 4001 times)

0 Members and 2 Guests are viewing this topic.

Brain writing on/off relay
« on: November 18, 2018, 09:41:51 AM »
Hello,
I could use some help writing a brain.
I need to output a signal to a relay.
On when Z moves down and off when it moves up.
Any suggestions would be very helpful.
Thank you.
Mario

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Brain writing on/off relay
« Reply #1 on: November 19, 2018, 03:30:51 AM »
something like this might work
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Brain writing on/off relay
« Reply #2 on: November 28, 2018, 02:12:41 PM »
Sorry I missed your reply. My email isn't forwarding replies.
Thank you for your interest in my problem (which is mine as you say).
How do I install this brain into the brain folder?
It is a PNG file.
It looks more complicated than I first thought but would love to try it.
Thank you again,
Mario

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Brain writing on/off relay
« Reply #3 on: November 28, 2018, 02:27:48 PM »
ok, i am sorry to have this brain file thrown away.

you have to rebuild it of the screenshot.

it you have Trouble, let me know, then i will do a new brain file
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline ZASto

*
  •  423 423
    • View Profile
Re: Brain writing on/off relay
« Reply #4 on: November 28, 2018, 05:28:06 PM »
Here is, recreated :)
Make no mistake between my personality and my attitude.
My personality is who I am.
My attitude depends on who you are.
Re: Brain writing on/off relay
« Reply #5 on: November 28, 2018, 10:13:08 PM »
Hello,
I tried to write it in the brain editor but just do not have enough experience at this time. Your help would be very much appreciated.
(Love your cars!)
Re: Brain writing on/off relay
« Reply #6 on: November 28, 2018, 11:06:00 PM »
Okay, getting close.
The Z down movement turns on the relay.
But when the z reverses upwards, it stays on.
Could you please take a look,
Thank you again,
Mario

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Brain writing on/off relay
« Reply #7 on: November 29, 2018, 02:18:01 AM »
i have tested the brain here, it works fine.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Brain writing on/off relay
« Reply #8 on: November 29, 2018, 05:15:03 AM »
Another possibility you may wish to consider…

The Z axis Direction Pin state is modal, it will have one state when (and after) the Z axis has moved in one direction and the opposite state when (and after) the Z axis has moved in the other direction. The Z axis Direction Pin could then be used to switch an Output# ON or OFF without using Brains.

Tweakie.
PEACE
Re: Brain writing on/off relay
« Reply #9 on: November 29, 2018, 07:56:32 AM »
Of course, you tested it before sending. It was late and I didn't see I had another brain enabled that kept the relay on.
So I was a man with 2 brains!  >:D
Thank you for all your help.
Also, I would like to try the Tweekie approach.
If I use pin 3 for Z direction and have pin 3 OUTPUT # 1, pressing Z down should turn on the relay.
But it doesn't so I must have missed something.