What component to use for a pushbutton ( not toggle )

More
6 years 6 months ago #163780 by Marcodi
Hi,

I need to connect an arduino to my linuxcnc installation. I programmed and built everything. The only thing missing is i need to make a putton in pyvcp ( which i made ) and to connect this button to an output pin on my mesa board.

So far this seems all logic, only problem i encounter now is that i can not use toggle, as this button needs to be used as kind of a jog button, meaning signal on when pushed and remains to be pushed, and signal off on release of the button. What component can i use for this in linuxcnc?

Toggle gives me signal ON on first push, signal OFF on next push. That is not what i need. I need a continuous signal as long as the button is pressed ( just like a jog button for an axis)



(( project idea: these buttons are arrows for up and down af a probe module that is run from an arduino board. So i need just an active output on my mesa board. ))

Thanks

Please Log in to join the conversation.

More
6 years 6 months ago #163786 by tommylight
Easiest way:
check the parallel port tester that is included with Linucnc, it has buttons that are active as long as they are pressed.
Start Linuxcnc from the menu, sample configurations>apps>parport
Chose one and click OK so it copies that to your configuration folder, close, then open with text editor from the configs folder.

Please Log in to join the conversation.

More
6 years 6 months ago #163790 by rodw

Please Log in to join the conversation.

More
6 years 6 months ago #163801 by Marcodi
Thanks rodw,

That is exactly what I want to do but it is the hal setup I don't know. Build the pyvcp i already worked out.

That pyvcp halpin needs to be connected to some HAL signal. That's the thing I don't know.

Please Log in to join the conversation.

More
6 years 6 months ago #163805 by Marcodi

tommylight wrote: Easiest way:
check the parallel port tester that is included with Linucnc, it has buttons that are active as long as they are pressed.
Start Linuxcnc from the menu, sample configurations>apps>parport
Chose one and click OK so it copies that to your configuration folder, close, then open with text editor from the configs folder.


The problem is that this app doesnt copy to the configuration folder, so i cant get into the editor. Any solution?

Thx

Please Log in to join the conversation.

More
6 years 6 months ago #163806 by tommylight
/usr/share/doc/linuxcnc/examples/sample-configs/apps/parport/

Please Log in to join the conversation.

More
6 years 6 months ago #163807 by Marcodi
thx, but that gives me the parport component.

So what does this mean that simple making a signal for example as the following will set my output on active when button gets pressed??? nothing else, no loadrt or addf?

net arrowup pyvcp.arrowupbutton => hm2_5i25.0.7i84.0.0.output-01

in combination with a pyvcp panel:

<pyvcp>
<button>
<halpin>"arrowupbutton"</halpin>
<text>"UP"</text>
</button>
</pyvcp>

Please Log in to join the conversation.

Time to create page: 0.108 seconds
Powered by Kunena Forum