How hard is it to build a completely new standalone GUI?

More
28 Jan 2019 03:20 #125012 by KevKim
that was corrected when you first replied,
when led didnt work i tried many things and that was one of those tries.

So, I think you nailed this:

Finally unrelated to this problem - setting a signal in the GLADE file requires a handler file to be present.


to make something called <handler> what do I need?

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

More
28 Jan 2019 03:25 #125013 by cmorley
Those warnings are unrelated to your problem but i will try to explain.

Gladevcp has three ways to control things: built in widget functions, HAL pins, and external python code.

your button is using the first two; builtin function to set linuxcnc's power on and off, and HAL pins that you connect to the LED.

The third way is setting signals in the GLADE file that call functions in a python file (usually refereed to a 'handler' file) The warnings you see means you set signal names in the GLADE editor that Gladevcp couldn't find in the python handler file. It didn't find it because there isn't one.

So for builtin widget functions you just add the widget to the GLADE file.
For HAL pins you must add the widget and connect the HAL pins in a separate file.
For external python code you must add the widget and supply a python handle file and optionally add signal names in the GLADE editor.
You can also do combinations of all options.

Chris M

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

More
28 Jan 2019 03:28 #125014 by cmorley

that was corrected when you first replied,
when led didnt work i tried many things and that was one of those tries.

So, I think you nailed this:

Finally unrelated to this problem - setting a signal in the GLADE file requires a handler file to be present.


to make something called <handler> what do I need?


No it's unrelated to the LED not working.
It's not working because the pins are not getting connected. I would now guess that the postgui file is not getting called

Chris M

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

More
28 Jan 2019 03:31 #125015 by cmorley
in your INI this line under the [HAL} looks wrong:
(depends where you are running this test from)

POSTGUI_HALFILE = ./postgui.hal

Chris M

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

More
28 Jan 2019 03:31 #125016 by KevKim
real-time chatting, tyvm for your precious time!!!

my_gui.ini file has this line,
and I suspect same thing.
syntax wrong? I am using a seperate postgui.hal to be used for this test purpose

[HAL]
HALUI = halui
HALFILE = LIB:basic_sim.tcl -no_use_hal_manualtoolchange

POSTGUI_HALFILE = ./postgui.hal

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

More
28 Jan 2019 03:32 #125017 by KevKim
that's in the same folder with .ini file that I am calling at the moment

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

More
28 Jan 2019 03:36 #125018 by cmorley
Yes and I believe the ./ means the folder before the one the INI launched from.

before you change anything, launch your gui the way you did originally (as a stand aone GUI) then use halcmd to see it the pins are actually connected.
halcmd show pin my_gui should do that in a separate terminal.

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

More
28 Jan 2019 03:40 #125019 by cmorley
I'm guessing that it won't be.
So then add this line to your post gui file.

show pin


then change your postgui file path in the INI to the right one.
If you did it right your LED should work and in the terminal your will see the pins print out.

The idea of the show pin command is just so you can easily see that the file was called, you can remove it as soon as it works.

Chris M

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

More
28 Jan 2019 03:41 #125020 by KevKim
independent pins are showing up, I assume they are not connected..

====================

kch@debian:~$ halcmd show pin my_gui
Component Pins:
Owner Type Dir Value Name
24 bit OUT FALSE my_gui.hal_button1
24 bit OUT FALSE my_gui.hal_button10
24 bit OUT FALSE my_gui.hal_button11
24 bit OUT FALSE my_gui.hal_button12
24 bit OUT FALSE my_gui.hal_button13
24 bit OUT FALSE my_gui.hal_button14
24 bit OUT FALSE my_gui.hal_button15
24 bit OUT FALSE my_gui.hal_button16
24 bit OUT FALSE my_gui.hal_button17
24 bit OUT FALSE my_gui.hal_button2
24 bit OUT FALSE my_gui.hal_button3
24 bit OUT FALSE my_gui.hal_button4
24 bit OUT FALSE my_gui.hal_button5
24 bit OUT FALSE my_gui.hal_button6
24 bit OUT FALSE my_gui.hal_button7
24 bit OUT FALSE my_gui.hal_button8
24 bit OUT FALSE my_gui.hal_button9
24 bit OUT FALSE my_gui.hal_hold
24 bit OUT TRUE my_gui.hal_hold-not
24 bit IN FALSE my_gui.hal_led1
24 bit IN FALSE my_gui.hal_led2
24 bit IN FALSE my_gui.hal_led3
24 bit IN FALSE my_gui.hal_led5
24 bit IN FALSE my_gui.hal_led_power
24 bit OUT TRUE my_gui.hal_power
24 bit OUT FALSE my_gui.hal_power-not
24 bit OUT FALSE my_gui.hal_start
24 bit OUT FALSE my_gui.hal_stop
24 bit OUT FALSE my_gui.hal_togglebutton3
24 bit OUT TRUE my_gui.hal_togglebutton3-not

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

More
28 Jan 2019 03:44 #125021 by cmorley
I would try:
POSTGUI_HALFILE = postgui.hal

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

Moderators: HansU
Time to create page: 0.096 seconds
Powered by Kunena Forum