How to connect an IO pin to an OUT pin

More
14 Oct 2013 07:12 #39817 by mayo
Hello to all!!
Any idea to do it or to create a component that allows to connect an IO pin to an OUT pin? :whistle:

Thanks in advance!

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

More
14 Oct 2013 08:33 #39819 by cmorley
Use comp to create a component

www.linuxcnc.org/docs/2.5/html/hal/comp.html
component io_connect;
pin io float out;
pin in float in;
function _;
license "GPLv2 or later";
;;
FUNCTION(_) { out = in; }

This is untested...

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

More
14 Oct 2013 18:35 #39828 by andypugh
The license statement will taint the kernel, you need to use only very specific strings there. "GPL" is apparently the one to use.
I think he wanted the "bit" data type. (I don't think I have ever seen a float IO pin, actually)

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

More
15 Oct 2013 02:05 #39837 by cmorley
I guess we need to update the examples in the manual then.
It was copy and pasted and then adapted.
Thought 'tainting' the kernel only produces a whiny message AFAIK.

Yes it was just an example - he didn't specify what he was wanting to do :)

Chris M

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

Time to create page: 0.505 seconds
Powered by Kunena Forum