Connecting buttons

More
25 Jun 2019 11:52 #137793 by phoenix
Connecting buttons was created by phoenix
I created a button in pyvcp with signal torch. On now i want to connect it to pin 16
How can i do that

Please Log in or Create an account to join the conversation.

More
25 Jun 2019 12:34 - 25 Jun 2019 20:35 #137797 by rodw
Replied by rodw on topic Connecting buttons

I created a button in pyvcp with signal torch. On now i want to connect it to pin 16
How can i do that


Assuming a Mesa 7i76e, something like:
net torch-enable  <= my-pyvcp-pin
net torch-enable => hm2_7i76e.0.7i76.0.0.output-16
Last edit: 25 Jun 2019 20:35 by rodw.

Please Log in or Create an account to join the conversation.

More
25 Jun 2019 14:06 #137802 by phoenix
Replied by phoenix on topic Connecting buttons
i just want to connect a button to output how can i do that
net signal pin
is this right ??

Please Log in or Create an account to join the conversation.

More
25 Jun 2019 20:40 #137826 by rodw
Replied by rodw on topic Connecting buttons
Yes, think of the signal (torch-enable in this case) as being a wire. So the first line connects one end of the wire to your PYVCP pin and the second connects the other end to your output pin.

It is possible to do this on one line but I like to do it on two lines as have done becasue its easier to read and now you can connect the signal to many other pins if required. the => have no meaning (eg. an inline comment), they are just used to make it easier to understand what is going on.

Please Log in or Create an account to join the conversation.

More
27 Jun 2019 16:33 #138008 by phoenix
Replied by phoenix on topic Connecting buttons
sir i finally get it :) thanks ...... soo much
the all i need to do is assume components as electrical components with io pins connected acordingly to form a logic ....

can i just connect torch on signal directly to pyvcp button ??
did it override thc setting and start the torch ..... i guess not in that case does i need to make another comp for torch on

Please Log in or Create an account to join the conversation.

More
27 Jun 2019 21:37 #138035 by rodw
Replied by rodw on topic Connecting buttons
Well, to actually make it work, you would need to use real wire to connect a relay so it is triggered by output-16.
So then you press your GUI button, pin-16 would change state, the relay will close and your torch would fire... and you will smile!

When I first started, I put a LED across the relay so it turned on in place of the torch. I made sure it fired if I jumpered field power to the relay terminal and I did smile when I could do it from HAL.

Please Log in or Create an account to join the conversation.

Time to create page: 0.297 seconds
Powered by Kunena Forum