Changing mux2.0.sel values every X time.

More
05 Feb 2013 18:39 #29632 by casetero
Andy it works great!!

As curiosity see this URL:

gnipsel.com/shop/hardinge/files/mpg.xhtml

This code shows esactly the same factor scale, 40. Really in my machine 40 is not the real factor scale, is about 40.8 and it changes if raw-val is sending 1 or 2 or 3 ( due to the angular velocity you make at the jog wheel)

But it doesn´t matter, it is super precise and you can get zeros with much precision.

If you come to Spain sometime, Alicante city for more precision you are invited to a Paella, that´s for sure!

Now i´m going to make the whole code for the buttons and velocitys and so.

But don´t forgive me, as said yesterday LCD battle is waiting us... :)

Thank you very much Andy!!

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

More
05 Feb 2013 20:00 #29638 by andypugh

Andy it works great!!


OK, that's excellent.

The clever thing to do now is probably to put that code inside your version of the shuttlexpress component, along with whatever other code is needed to turn the button raw values into individual HAL bits.

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

More
06 Feb 2013 00:34 #29650 by casetero
Andy i´ve been trying to descifrate shuttlexpress.c and i think it doesn´t manage with LCD. I have seen nothing about LCD outputs.

I´ve been reading the manpage of Hidcomp, and have added this lines to /usr/share/linuxcnc/linuxcnc.nml

P hidcomp emcCommand LOCAL localhost W 0 10.0 0 10
P hidcomp emcStatus LOCAL localhost R 0 10.0 0 10
P hidcomp emcError LOCAL localhost R 0 10.0 0 10

and to my ini file this one:

[EMC]

NML_FILE = /usr/share/linuxcnc/linuxcnc.nml

But hidcomp continues not showing outputs for the LCD.

Am i doing something wrong??

Can i use another component or code to try to enhace the LCD??

Another strange thing is that when hidcomp is runed with the device enhaced, his hidraw file disappears and shuttlexpress can´t find it.

Thank you!

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

More
06 Feb 2013 01:03 #29653 by andypugh

Am i doing something wrong??

I really have no idea, I have never used hidcomp.
However, it looks like the hidconfig application would be useful, have you tried that?
hidcomp.sourceforge.net
It might also be useful to start hidcomp in debug mode (-d switch) and see what info can be found in the dmesg output.

Can i use another component or code to try to enhance the LCD??

It would be interesting to see what hal_input does with the device.
www.linuxcnc.org/docs/html/man/man1/hal_input.1.html

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

More
06 Feb 2013 04:50 #29670 by casetero
Yes, i configure the device outputs of the device with hidconfig. But it doesn't show any input to the device.

With hal_input i cant enhace the device. I don't know why, but when i put in a terminal less / less /proc/bus/input/devices it doesn't show the device, but if i put lsusb it does show.

Maybe this can be a good symptom of what happens with hal_input.

I have seen this component created by you:

www.linuxcnc.org/docs/html/man/man9/lcd.9.html

Can be suitable for me?

Thank you!

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

More
06 Feb 2013 15:02 #29688 by andypugh
I suspect that the lcd.comp won't be any help to you, unfortunately. That sends a character every mS in a realtime thread. I don't think that would be compatible with a userspace driver like hidcomp or hal_input.
The _contents_ of the component might be usable, but as the main thing it does is create kernel-mode versions of the printf function for use with floating-point values even that is of dubious value.

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

More
09 Sep 2013 19:59 #38565 by casetero
Resqueing old posts...

Andy as now i have the comp --compile and --install available ( installing the dev-package) I tried to recompile the component you made called wheel.comp:

component wheel "pendant jogwheel thingy";

pin in signed raw-val;
pin out signed jog-counts;

function _;

author "andy pugh";
license "GPL";

;;
FUNCTION(_){
char v;
v=raw_val;
jog_counts += v;
}

I tried to make another wheel2.comp just changing this:

component wheel "pendant jogwheel thingy";

pin in signed raw-val;
pin out signed jog-counts;

function _;

author "andy pugh";
license "GPL";

;;
FUNCTION(_){
int v; <
The change
v=raw_val;
jog_counts += v;
}

And it seems to be incompatible with wheel.comp. It cant load the two components at the same time. Do you know why??

Thank you.

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

More
09 Sep 2013 20:14 #38567 by andypugh

And it seems to be incompatible with wheel.comp. It cant load the two components at the same time. Do you know why??.


The HAL name of the component is not based on the file name but on the "compoenent" line at the top of the .comp file.

In fact things break in interesting ways if the file name and the "component" name do not match. If you make sure that the component name and file name do match, and are different for the two components, then it should all be OK.
The following user(s) said Thank You: casetero

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

More
09 Sep 2013 20:18 #38568 by casetero
Ok

That was the problem.

Thank you.

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

Time to create page: 0.156 seconds
Powered by Kunena Forum