7i76e: MPG and Analog inputs with pncconf?

More
12 Jan 2019 10:05 #124022 by cmorley
I confirmed the error in pncconf and just pushed a fix - it will take a bit of time for it to cycle through - unless you are compiling source code.
Thanks for the information.

Chris M
The following user(s) said Thank You: trilobyte

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

More
12 Jan 2019 10:44 - 12 Jan 2019 10:46 #124024 by trilobyte
@cmorley: Tnx! I'll try it tomorrow.

@rodw: tnx for the code. i use two mpg and 4 potentiometers and a joystick with 4 tact switches.

at the moment im searching for a solution to connect the potentiometer to the jog speed.

this is my control panel:


peter

ps: a picture of the machine (schaublin 125cnc)
Last edit: 12 Jan 2019 10:46 by trilobyte.

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

More
12 Jan 2019 11:57 #124025 by rodw
We don't change jog speed with linuxcnc. We change the jog scale which sets how far you move per MPG click. eg. 1mm, 0.1mm, 0.01mm. Therefore, we need to set specific values with a switch or some other discrete input.

I didn't create the system I described. I just followed the example in the docs. linuxcnc.org/docs/html/examples/mpg.html

Personally, I think the potentiometer is a poor choice and suggest you replace it with a binary coded switch (or a multi pole rotary switch but it will use more inputs).

If you do persist with your potentiometer, I would have a look at the lincurve component, it should let you to map to an appropriate scale value as the voltage exceeds a specific voltage threshold but I have not used it.

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

More
12 Jan 2019 12:58 #124030 by Mike_Eitel
Hi
You have an example in the config i've send you in file mpg.hal.
Mike

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

More
12 Jan 2019 13:00 #124031 by trilobyte
Rod: i'd like to change the value of this slider in axis:



i would like to move this slider with the potentiometer. the step with of the mpgs is another thing.

sorry if I have written unclear

Peter

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

More
12 Jan 2019 17:43 #124036 by trilobyte
i'd like adjust the speed of continous jogging not jog with a given step with.
is this possible with a potentiometer via analog in?

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

More
12 Jan 2019 21:40 #124045 by rodw
There are .ini file variables used by the axis gui under the [DISPLAY] section to set the jog parameters. Your modified GUI needs to work with these or use an alternative method from .ini file variables to configure the GUI.

DEFAULT_LINEAR_VELOCITY sets the default jog speed.

For hardware, have a look at the halui component as it has a number of pins dealing with jogging which I understand are designed for hardware control.

However, if you have the MPG dials, I found you don't use continuous jogging as you'll just use the MPG with a scale of 1mm.

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

More
12 Jan 2019 21:42 #124046 by rodw
This pin might do what you want
halui.jog−speed

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

More
12 Jan 2019 23:47 #124055 by phillc54
You can access that slider from python via a .axisrc file in your home directory or by a file pointed to by USER_COMMAND_FILE in the [DISPLAY] section of your ini file.

Defaults are:
lower value = 0.06
upper value = 1.0
resolution = 0.02

To change some/all of these: (upper value should not be > 1)
root_window.tk.call('.pane.top.jogspeed.s','configure','-from','0.01','to','1.0','-resolution','.010')

To read the current value:
value = float(root_window.tk.call('.pane.top.jogspeed.s','get'))
print 'value =', value

To set a new value:
value = 0.75
root_window.tk.call('.pane.top.jogspeed.s','set',value)

You can also define a function that is called every time Axis updates itself:
def user_live_update():
    print float(root_window.tk.call('.pane.top.jogspeed.s','get'))

Cheers, Phill.
The following user(s) said Thank You: trilobyte

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

More
13 Jan 2019 09:20 #124064 by trilobyte
@cmorley: it works now!

i made a working setup with the fixed pncconf. the mpgs for x and z are working, i can set the step width via two inputs.

i also have now the joystick wired to 4 inputs. pncconf made a setup with a fixed value for jog speed:

"net jog-speed halui.axis.jog-speed"
"sets jog-speed 100.000000"

this jog function is different to the arrow keys on the keyboard.
that's not what I expected, but it is no problem.

the question is: can i set this value für jog-speed with the analog input?

@phillc54: tnx for this explanation. maybe i can use this function to move the slider to the same value as the jog-speed has

peter

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

Moderators: cmorley
Time to create page: 0.120 seconds
Powered by Kunena Forum