PMDX-126 Extended Input Mode - Hal help
11 Sep 2015 19:02 - 11 Sep 2015 19:03 #62448
by andypugh
In that case, the neatest way to do this would be using www.linuxcnc.org/docs/html/hal/comp.html
And a file something like
Replied by andypugh on topic PMDX-126 Extended Input Mode - Hal help
In truth I would much rather be shown what to look for over how to do it.
In that case, the neatest way to do this would be using www.linuxcnc.org/docs/html/hal/comp.html
And a file something like
component pmdx_demux "demultiplex PMD extended mode"
pin in bit charge-pump;
pin in bit in-# [4];
pin out bit out-# [8];
pin out bit out-#-not [8];
function _;
license "GPL";
author "andy pugh";
;;
FUNCTION(_) {
int offset = 0;
int i;
if (charge_pump) offset = 4;
for (i = 3, i > 0, i--){
out(i + offset) = in(i);
out_not(i + offset) = ! in(i);
}
}
Last edit: 11 Sep 2015 19:03 by andypugh.
Please Log in or Create an account to join the conversation.
- racedirector
- Offline
- Elite Member
-
Less
More
- Posts: 267
- Thank you received: 42
12 Sep 2015 06:42 #62485
by racedirector
Replied by racedirector on topic PMDX-126 Extended Input Mode - Hal help
Oh cool, another language to learn
I'll check out halcomp and see if I can decipher C code, that has always eluded me.
Thanks again Andy
Cheers
![:) :)](/media/kunena/emoticons/smile.png)
Thanks again Andy
Cheers
Please Log in or Create an account to join the conversation.
Time to create page: 0.135 seconds