how to auto-set widget?

More
29 Dec 2011 21:59 #16094 by dab77
..not in an elegant way, but solved..

into the file: ../emc2-dev/src/emc/usr_intf/axis/scripts/axis.py , i changed the line 3051 in this way:

cmd = "halcmd loadusr -Wn tgvcp gladevcp".split()

in this way it creates the hal pin i need, also if loaded inside emc2 windows.
into the .ini file the Gladevcp line looks like that:

GLADEVCP = -c tgvcp -u tgvcp.py -H tgvcp.hal tgvcp.ui


obviously i needed to run: make , into my src directory.

If i did something wrong please correct me.
Thanks!

p.s. I still need an hint on the previous question about the inifile.
Ciao, Davide.

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

More
30 Dec 2011 08:09 #16114 by mhaberler
I am unable to run your configuration since essential parts are missing. Please make it a self-contained configuration which runs in simulator mode. Also, I do not see where gladevcp is started from the ini file. Please see www.linuxcnc.org/docs/devel/html/gui/gla...into_axis_like_pyvcp how to set this up.


Re: "pin not created":

The issue could be sequencing. Note that when using a tab inside Axis, gladevcp is started by Axis, which means that the pins created by gladevcp are only accessible after Axis startup. Therefore these pins can be referenced only by HAL commands which are executed through HAL/POSTGUI_HALFILE. Those are executed post gladevcp setup when running inside Axis in the right-hand panel.

-Michael


dab77 wrote:

That's why i'm asking help here, 'cause it seems strange that it didn't create the pin!

now i'll post my files, which work now, but only if i run them after emc2:

File Attachment:

File Name: tgvcp_files.zip
File Size:6 KB


then i try again to set them to work inside the emc2 window, and call all the pins gladevcp.xxx...

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

More
30 Dec 2011 11:58 #16115 by mhaberler
dab77 wrote:


p.s. another question for you, in the .py file instead of this line:

inifile = emc.ini(os.getenv("INI_FILE_NAME"))

how can i write directly the name of the file? ..i couldn't..


try

inifile = emc.ini("/path/to/inifile")


-Michael

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

More
30 Dec 2011 22:25 #16140 by dab77
Replied by dab77 on topic Re:how to auto-set widget?
mhaberler wrote:

...
Re: "pin not created":

The issue could be sequencing. Note that when using a tab inside Axis, gladevcp is started by Axis, which means that the pins created by gladevcp are only accessible after Axis startup. Therefore these pins can be referenced only by HAL commands which are executed through HAL/POSTGUI_HALFILE. Those are executed post gladevcp setup when running inside Axis in the right-hand panel.

-Michael

Yes it should be like that, but if the pins and glade hal file have the standard name 'gladevcp' the pin is not created. I can say that because i tried to disable all the references to that pins, so that emc2 runs without errors and i can see the pins.
gladevcp.max-value is not there.
then i have tried, as i wrote in my last post, to change the default name to something else, and it worked.
but i really can't understand definitely where the bug is.

I thought i sent you all the necessary files, i'll send you tomorrow all that you may need to try that your self (except you should have a thrustmaster joystick...)

try

inifile = emc.ini("/path/to/inifile")

-Michael

The only thing i didn't try was to put the file name inside ""... sorry.
I'll try that tomorrow.
Thanks, Davide.

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

More
30 Dec 2011 22:31 #16141 by dab77
Replied by dab77 on topic Re:how to auto-set widget?
I checked and i think here: www.linuxcnc.org/index.php/english/compo...imit=6&start=6#16087 into tgvcp.zip there are all the needed files. What is missing?
Ah, maybe it's because this configuration is intended to be run on emc2.4 JA3 branch? so axis and joint configuration into the .ini file is different from standard emc2.

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

More
31 Dec 2011 02:12 #16146 by mhaberler
dab77 wrote:

I checked ...
What is missing?


Your homebrew kins module, and the fact that you are running some none-standard branch?

Look, this is the deal:

You ask for help, so please do your part of the work first. That is: isolating the problem so it can reproduced without somebody else fiddling for hours on end. This is not a manufacturer support hotline with handholding for a fee.

Your kins stuff, JA3 etc etc is obviously irrelevant to the problem you claim exists.

Please take the time to take master or v2.5_branch, and modify configs/sim/axis.ini it until it shows the problem. Then file it on the bugtracker so it isnt forgotten in the mists of forum posts.

There are some really good Python tutorials online, and this site isnt one of them.

- Michael

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

More
31 Dec 2011 11:25 #16150 by dab77
Replied by dab77 on topic Re:how to auto-set widget?
mmm yes, you're right. I forgot to mention about JA3 branch.

I have this machine ready also on emc2.5, so i'll try my config there and report results, as i have possibility.
Thank you again for helping me.

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

Moderators: mhaberlerHansU
Time to create page: 0.144 seconds
Powered by Kunena Forum