Changing mux2.0.sel values every X time.

More
05 Feb 2013 00:43 - 05 Feb 2013 00:49 #29575 by casetero
It works.

Now show me an error while starting linuxcnc.

Signal name "wheel.0.raw-val" must not be the same as a pin. Did you omit the signal name?

With this comp i have to put this, haven´t i? :

net x-jog wheel.0.jog-counts halui.jog0.counts

EDIT---> Sorry was an error code!


Thank you!
Last edit: 05 Feb 2013 00:49 by casetero.

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

More
05 Feb 2013 00:55 #29578 by andypugh
Does it have anything like the intended effect?

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

More
05 Feb 2013 01:04 #29579 by casetero
The wheel.0.jog-counts PIN doesn´t get excited and it stays in 0.

The wheel.0.raw-val PIN gets the information of my hidcomp PIN and gets excited when i move the wheel, but the wheel.0.jog-counts stays in 0.

After fix that, in which PIN do i have to link the wheel.0.jog-counts, to axis.0.jog-counts??

Then how can i make the code to make positive and negative counts??

Thank you!!

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

More
05 Feb 2013 01:24 #29582 by andypugh

The wheel.0.jog-counts PIN doesn´t get excited and it stays in 0.

Did you add the component to a thread?

The wheel.0.raw-val PIN gets the information of my hidcomp PIN and gets excited when i move the wheel, but the wheel.0.jog-counts stays in 0.

Exactly what values do you see on that pin?

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

More
05 Feb 2013 01:33 #29584 by casetero
I hadn´t add it to a thread, now it works!!

Esactly what am i´m doing adding it to a thread?? i have added to servo-thread.

Now the values that gets wheel.0.raw-val are 0,1,2,3,4,5,6,7 in clock-wise

and gets out each number of in are translated in 40 out. Dont know i explain nice... If i get in (wheel.0.raw-val) 1===> it gets out (wheel.0.jog-counts) 40

It makes correctly the positive and the negative.

In what pin do i have to link .jog-counts to make it move?

I have linked to axis.0.jog-counts and it gets excited nicely but the axis don´t move.

Thank you!!

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

More
05 Feb 2013 01:43 #29586 by casetero
I have prefixed the distance and velocity with this lines:

setp halui.0.jog-speed 500
setp hlaui.0.increment 0.1

maybe i have to prefix the distance and the velocity with another comand of axis.0.*

Thank you!

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

More
05 Feb 2013 01:48 #29587 by andypugh

If i get in (wheel.0.raw-val) 1===> it gets out (wheel.0.jog-counts) 40


That sounds like it might not be working then.

The jog-counts pin should count upwards for wheel movement one way, and downwards for wheel movements in the reverse direction.

So, you should be able to set wheel.0.jog-counts to absolutely any number at all.

If all you ever get is 40 then something is wrong, possibly my understanding of what the raw-value pin does.

Please can you describe in detail what the raw-value pin does when you move the wheel. Also, describe how the wheel moves. I don't even know if it is a continuous rotation device or a spring-return device.

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

More
05 Feb 2013 01:59 #29589 by casetero
It counts that way. It counts nice, but for each 1 in it gives 40 out. I think just puting a /40 in the .comp file will work nice.

If i move one "click" it shows 40, another 80, 120... if i move it quickly it makes 2x40, quicker 3x40.... I think it is perfect, instead of the scale that is 1:40.

It descounts nice too.

Another solution maybe put 0.1/40 in the distance for each count to get a real 0.1 move.

What i don´t know is where do i have to link the wheel.0.jog-count, i have linked to axis.0.jog-counts.

If it is the right PIN, what else pin do i have to setp or excite to make it move??

Thank you!!

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

More
05 Feb 2013 04:05 #29595 by andypugh

It counts that way. It counts nice, but for each 1 in it gives 40 out. I think just puting a /40 in the .comp file will work nice.

It's easy to try.
jog_counts += v / 40;
is valid C.

What i don´t know is where do i have to link the wheel.0.jog-count, i have linked to axis.0.jog-counts.

You need to also connect the jog-enable pin.
www.linuxcnc.org/docs/html/man/man9/motion.9.html
This should be linked in HAL to the selector switch on the pendant. (assuming you have worked out what that sets, and how to read it)
The following user(s) said Thank You: casetero

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

More
05 Feb 2013 05:01 #29606 by casetero
Ok, i´ll try tomorrow.

Yes i think i will manage with the other buttons with the comp hal component.

The LCD battle is coming...

Thank you!

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

Time to create page: 0.092 seconds
Powered by Kunena Forum