How to change glade "speed control" widget to negative value

More
8 years 9 months ago #104705 by Grotius
Hi i want to change the standard speed control input to negative value.
This because the speed control widget looks nicer then a horizontal scroll barr with extern value and button's.

Attachment not found



Is is possible to change some code somewhere that this is possible?

Please Log in to join the conversation.

More
8 years 9 months ago #104713 by rodw
I would have thought that putting a negative value in the Min Value box would have allowed this. I would also check the python screen handler and maybe the ini file to make sure they are not overriding the values in glade. I think Gmocappy keeps a preference file that may need deleting.

Please Log in to join the conversation.

More
8 years 9 months ago #104724 by Grotius
@Hi Rodw,

The problem is in the glade program itself i think.
The glade designer works independent. For linuxcnc there are special hal connected things adapted, like a led or halbutton
to the glade designer studio.

Attachment not found



So in this section, i need to see the source code or code that is be ready to be changed.
Then i can change some value's. Finding this file and directory place is in Linux a big job.

Please Log in to join the conversation.

More
8 years 9 months ago #104729 by rodw
I'm not sure if you are on the right track (or indeed if you are using Gmocappy. I've circled the min value I was referring to in your earlier screen dump

Attachment not found



Having a value of 0 here limits the range to a positive value

But the Gmocappy python screen handler overwrites these values as this small snippet shows:
Code:
class PlasmaClass: def __init__(self, halcomp, builder, useropts): self.builder = builder self.halcomp = halcomp self.defaults = { IniFile.vars : { "thcspeedval" : 100 , "thcspeedmax" : 150 , "thcspeedmin" : 50 , "thcspeedincr" : 5 ,

and if you look at the Gmocappy plasma sim which I am more familiar with, you will see that these values are also stored in a .var file (plasma.var)
Code:
# generated by gladevcp.persistence.create_default_ini() on Sun Jul 30 15:06:09 2017 [ini] version = 1 signature = 41e519529d06885683da34f0f6da60585d0d3676 [vars] cutgapval = 1.5 thcdelaymax = 20.9 thcspeedincr = 5 chlthresholdmax = 100.0 thcspeedmin = 50 g0gapincr = 0.5 thcspeedmax = 150 piercegapmin = 2.0 enableheightlock = True g0gapmin = 0.5 thctargetvoltval = 100.0 thctargetvoltmax = 255.0 thctargetvoltincr = 5.0 piercegapval = 5.0 g0gapmax = 55.0 piercedelaymax = 10.0 piercedelayval = 0.5 thctargetvoltmin = 5.0 thcspeedval = 100 cutgapmin = 0.5 enablekerfcross = True piercedelayincr = 0.01 thcdelayincr = 0.1 chlthresholdmin = 10.0 piercedelaymin = 0.01 thcdelayval = 0.5 thcdelaymin = 0.1 cutgapincr = 0.01 chlthresholdincr = 10.0 piercegapmax = 12.0 g0gapval = 45.0 piercegapincr = 0.5 pierceutostart = True chlthresholdval = 80.0 cutgapmax = 5.0 [widgets] hal-btn-THC = False # last update by gladevcp.persistence.save_state() on Sun Nov 12 07:13:20 2017

So for this screen, there is plasma.glade, plasma.py and plasma.var to take into account. In this case, I found you needed to change the plasma.py defaults and delete the plasma.var file before changes in glade actually stuck. I can't see why negative values are not allowed.

Please Log in to join the conversation.

More
8 years 9 months ago #104815 by Grotius
@Rodw,

Interesting information. I will try to do a example as you have described and will post the screen results later this week.

Please Log in to join the conversation.

More
8 years 9 months ago #104955 by Grotius
@Rodw,

The negative value is now working in the speedcontrol widget. I had to do some research.
Problem is solved. I mentioned that the glade program is not very well suported with examples.

In the Gmocappy python code you can do a negative "min" value for example jogging, this works perfect.
Also i have here a update for. The keybord function has to date up during hold and changing / updating jogging value in 0.1 sec.
This should be perfect if it was so.

So i can write some code that will be updated the jog value every 0.1 seconde i think.
This option makes the machine more industrial. It's safe, you need 2 hands to do that.

You have also in the lib directory a glade directory with all the glade widget's in python code.
The program is reacting to all changes you made. But also confusing, because wich program or python code is leader.....

So in program override of speed override you can add -110% speed, but that is not good programmed. You see the program is stacking. It must be a dependent negative speed control widget specially for the negative speed adaption. That's the best way.
And also i think mentioned by this way. The adaptive speed is not the program override. It must have a separate widget to
work properly.

Please Log in to join the conversation.

More
8 years 9 months ago #104984 by newbynobi
Leader of the widget is the top level gui that includes the widget.
So gmoccapy overwrites some settings from speedcontrol.py
But speedcontrol.py does have limits hard coded. That limits can not be passed by the main gui.

So in your case you need to check the limits in lib/python/gladevcp/speedcontrol.py
And /usr/bin/gmoccapy

I just pushed a bugfix to speedcontrol a few days ago, related to misbehavior at very low values.

Norbert

Please Log in to join the conversation.

Time to create page: 0.089 seconds
Powered by Kunena Forum