??? how to load a custom gui file ???
08 Oct 2021 14:37 #222556
by Roguish
Replied by Roguish on topic ??? how to load a custom gui file ???
ok, so could ya add that to the class _GStat in hal_glib.py?
is the joint dictionary brought in with the 'import linuxcnc' ??
add another line in hal_glib.py, probably next to 'current-position' line 153, and I think one of those 'self.emit' lines......
then I'm lost.
i'd try, but I am not a coder at all. I do have a VM setup to try stuff. that's where I'm working on my crude Qtvcp.
is the joint dictionary brought in with the 'import linuxcnc' ??
add another line in hal_glib.py, probably next to 'current-position' line 153, and I think one of those 'self.emit' lines......
then I'm lost.
i'd try, but I am not a coder at all. I do have a VM setup to try stuff. that's where I'm working on my crude Qtvcp.
Please Log in or Create an account to join the conversation.
08 Oct 2021 21:27 #222587
by cmorley
Replied by cmorley on topic ??? how to load a custom gui file ???
ok 'follow-error' gives a list of all joints current following error
The following user(s) said Thank You: Roguish
Please Log in or Create an account to join the conversation.
08 Oct 2021 23:25 #222610
by Roguish
Replied by Roguish on topic ??? how to load a custom gui file ???
COOL, I see what you did in the hal_glib.py file.
ah, and I see you added to the GStat docs.
anything else? just curious.
will that get committed and included in the builds? or do I need to do an RIP?
so, somehow that has to get into the gui _handler.py file, right???
ah, and I see you added to the GStat docs.
anything else? just curious.
will that get committed and included in the builds? or do I need to do an RIP?
so, somehow that has to get into the gui _handler.py file, right???
Please Log in or Create an account to join the conversation.
09 Oct 2021 00:15 #222613
by cmorley
Replied by cmorley on topic ??? how to load a custom gui file ???
looks like buildbot had already built it.
add something like this:
STATUS.connect('following-error', lambda w, data: self.update_ferrer(data))
def update_ferrer(self, data):
print (data)
add something like this:
STATUS.connect('following-error', lambda w, data: self.update_ferrer(data))
def update_ferrer(self, data):
print (data)
Please Log in or Create an account to join the conversation.
06 Nov 2021 23:31 - 06 Nov 2021 23:41 #225540
by Roguish
Replied by Roguish on topic ??? how to load a custom gui file ???
cmorley,
I'm back... had to do some work for a few weeks, and waited to get a touch screen.
27" Elo touchscreen just delivered and setup on the mill machine.On to the screen mods.
Ok, so I have a qtdragon stretchable, and just added a small section to display vel and ferror of x,y,z.and I've been going through the handler file. added your suggestion (def update....) in the general function section.
But I do not get how to connect the LCDNumber widgets to the python.....
Here I'm also assuming (hoping) that the axes velocities are available.
they certainly are via hal pins....
So, a little help please.
If you would be so kind and to show how to do one, I can probably work out the others.....
Please....
Thanks.
I'm back... had to do some work for a few weeks, and waited to get a touch screen.
27" Elo touchscreen just delivered and setup on the mill machine.On to the screen mods.
Ok, so I have a qtdragon stretchable, and just added a small section to display vel and ferror of x,y,z.and I've been going through the handler file. added your suggestion (def update....) in the general function section.
But I do not get how to connect the LCDNumber widgets to the python.....
Here I'm also assuming (hoping) that the axes velocities are available.
they certainly are via hal pins....
So, a little help please.
If you would be so kind and to show how to do one, I can probably work out the others.....
Please....
Thanks.
Attachments:
Last edit: 06 Nov 2021 23:41 by Roguish.
Please Log in or Create an account to join the conversation.
07 Nov 2021 00:06 - 07 Nov 2021 00:10 #225542
by cmorley
Replied by cmorley on topic ??? how to load a custom gui file ???
You would use a regular QLCD widget.
you use the name set in designer to reference the widget (ie. xFerrorLCD)
I also forgot you could use a statusLabel that watches a HAL pin - then there is no code to add,
and also covers the axes velocities you want.
double click the statusLabel and select misc/hal pin status then set the HAL pin name to watch.
You can use stylesheets or richtext to modify the look of the text.
Chris
STATUS.connect('following-error', lambda w, data: self.updateFerrerDisplay(data))
you use the name set in designer to reference the widget (ie. xFerrorLCD)
def updateFerrorDisplay(self, data):
self.w.xFerroreLCD.display('{:.2f}'.format(data[0]))
self.w.yFerroreLCD.display('{:.2f}'.format(data[1]))
self.w.zFerroreLCD.display('{:.2f}'.format(data[2]))
I also forgot you could use a statusLabel that watches a HAL pin - then there is no code to add,
and also covers the axes velocities you want.
double click the statusLabel and select misc/hal pin status then set the HAL pin name to watch.
You can use stylesheets or richtext to modify the look of the text.
Chris
Last edit: 07 Nov 2021 00:10 by cmorley.
Please Log in or Create an account to join the conversation.
07 Nov 2021 00:36 - 07 Nov 2021 00:43 #225544
by Roguish
Replied by Roguish on topic ??? how to load a custom gui file ???
wow, quick reply. THANKS.
OK, going through as many docs as I can find....
(and i see that the joint velocities are also in the jointdictionary)
I just noticed there is an LCDnumber in both the 'Display Widgets; and the 'Linuxcnc-HAL' sections. are they the same? which one is proper for this application?
Add your above to the handler, and change the LCDNumber name matches the xFerrorLCD.... yes?
for StatusLablel...
so, double click, go to misc... and in 'HalPin Name' put in the actual halpin, like 'joint.0.f-error' ???
and make sure the name of the statuaLabel 'statuslabel' is changed to xFerror
I'll give both a shot.. thanks.
also, how do I attach an image file, rather than embedding it?
are you ever on the IRC ?
OK, going through as many docs as I can find....
(and i see that the joint velocities are also in the jointdictionary)
I just noticed there is an LCDnumber in both the 'Display Widgets; and the 'Linuxcnc-HAL' sections. are they the same? which one is proper for this application?
Add your above to the handler, and change the LCDNumber name matches the xFerrorLCD.... yes?
for StatusLablel...
so, double click, go to misc... and in 'HalPin Name' put in the actual halpin, like 'joint.0.f-error' ???
and make sure the name of the statuaLabel 'statuslabel' is changed to xFerror
I'll give both a shot.. thanks.
also, how do I attach an image file, rather than embedding it?
are you ever on the IRC ?
Attachments:
Last edit: 07 Nov 2021 00:43 by Roguish.
Please Log in or Create an account to join the conversation.
07 Nov 2021 01:07 #225545
by cmorley
Replied by cmorley on topic ??? how to load a custom gui file ???
use the display widget LCD one - that is the plain qt widget, that can be set with handler code.
the HAL widget LCD is controlled by a HAL pin that you must connect in a HAL file so not as convenient.
status label name doesn't matter.
If using status label, you don't use the handler code, so the name just needs to be unique
yes like hal name like joint.0.ferror
I very seldom use irc though I try to read it from time to time.
I'm on the dev mailist.
the HAL widget LCD is controlled by a HAL pin that you must connect in a HAL file so not as convenient.
status label name doesn't matter.
If using status label, you don't use the handler code, so the name just needs to be unique
yes like hal name like joint.0.ferror
I very seldom use irc though I try to read it from time to time.
I'm on the dev mailist.
Please Log in or Create an account to join the conversation.
07 Nov 2021 21:17 #225585
by Roguish
Replied by Roguish on topic ??? how to load a custom gui file ???
OK, still at it. trying to use both the LCDNumber and StatusLabel.
still seems to be trouble with the LCDNumber.
I have added the code you suggested to the handler.py file. I just don't get how it connects to the hal_glib.py file. If that's not where it connects, what file does it connect with?
I can post snippets of any of the files if it helps. not sure.
Ah, I also am running master on buster. updated regularly, including today.
still seems to be trouble with the LCDNumber.
I have added the code you suggested to the handler.py file. I just don't get how it connects to the hal_glib.py file. If that's not where it connects, what file does it connect with?
I can post snippets of any of the files if it helps. not sure.
Ah, I also am running master on buster. updated regularly, including today.
Attachments:
Please Log in or Create an account to join the conversation.
- tommylight
-
- Offline
- Moderator
-
Less
More
- Posts: 18562
- Thank you received: 6218
07 Nov 2021 21:49 #225587
by tommylight
Replied by tommylight on topic ??? how to load a custom gui file ???
Not my forte, but, there is a "follow-error" in your files, most probably should be "following-error".
The following user(s) said Thank You: Roguish
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.231 seconds