gladeVCP timer error

More
14 Jan 2024 17:39 - 14 Jan 2024 17:40 #290675 by tommy
gladeVCP timer error was created by tommy
I'm migrating from 2.7 to 2.9.2, also gladeVCP and there I had two timers (cycle timer and cumulative timer).
I'm receiving error for time2 component. Did anything changed?

Here is timers code:
[code][code][code]loadrt time2
addf time2.0 servo-thread
addf not.2 servo-thread
net prog-running not.2.in <= halui.program.is-idle
net cycle-timer time2.0.start <= not.2.out
net cycle-seconds gladevcp.hal_label5 <= time2.0.seconds
net cycle-minutes gladevcp.hal_label3 <= time2.0.minutes
net cycle-hours gladevcp.hal_label1 <= time2.0.hours
net total-cycle-seconds gladevcp.hal_label10 <= time2.0.totalofseconds
net total-cycle-minutes gladevcp.hal_label8 <= time2.0.totalofminutes
net total-cycle-hours gladevcp.hal_label6 <= time2.0.totalofhours
net total-reset gladevcp.hal_button4 => time2.0.reset
[/code][/code]
[/code]
[code][code][code][code][code]And debug report:
[/code][/code][/code][/code][/code]
[code][code][code][code][code][code][code][code][code][code][code][code][code]time2: dlopen: /usr/lib/linuxcnc/modules/time2.so: cannot open shared object file: No such file or directory
gladevcp.hal:19: waitpid failed /usr/bin/rtapi_app time2
gladevcp.hal:19: /usr/bin/rtapi_app exited without becoming ready
gladevcp.hal:19: insmod for time2 failed, returned -1

(gladevcp:91390): Gdk-WARNING **: 18:15:23.804: GdkWindow 0x4000003 unexpectedly destroyed
/usr/lib/python3/dist-packages/gi/overrides/Gtk.py:1689: Warning: ../../../gobject/gsignal.c:2772: instance '0x1ebd450' has no handler with id '158'
  return _Gtk_main(*args, **kwargs)
**** GLADE VCP ERROR:    X Protocol Error: 3
[/code][/code][/code][/code][/code][/code][/code][/code][/code][/code][/code][/code]
[/code]
Last edit: 14 Jan 2024 17:40 by tommy.

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

More
15 Jan 2024 04:41 #290729 by cmorley
Replied by cmorley on topic gladeVCP timer error
linuxcnc has no component called time2 - do you use a custom component called time2?

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

More
15 Jan 2024 16:59 #290770 by tommy
Replied by tommy on topic gladeVCP timer error
This solved for custom component
sudo halcompile --install time2.comp

now this error showed up
HAL: ERROR: type mismatch 'time2.0.totalofseconds' <- 'total-cycle-seconds'
gladevcp.hal:26: link failed

(gladevcp:3228): Gdk-WARNING **: 17:48:04.752: GdkWindow 0x3c00003 unexpectedly destroyed
**** GLADE VCP ERROR:    X Protocol Error: 3

Code used for time2 component:
Warning: Spoiler!

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

More
16 Jan 2024 08:16 #290839 by pawel77
Replied by pawel77 on topic gladeVCP timer error
Hi,
in my case after installation of 2.9.2 I can not start any configuration with gladevcp as well these included with linuxcnc.
Gladevcp is not available in synoptic manager,  and do not know where to find it.
thanks beforehand for any help 
Attachments:

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

More
16 Jan 2024 17:12 #290881 by tommy
Replied by tommy on topic gladeVCP timer error
My gladeVCP works OK inside 2.9.2 (axis), so I think my error (type mismatch) might be related to time2 custom component, but my programming skills don't reach that far to find the source...

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

More
16 Jan 2024 21:23 #290909 by tommy
Replied by tommy on topic gladeVCP timer error
Could be the reason that time2 output (pin) is s32, hal_label  (pin) takes float?

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

More
23 Jan 2024 19:16 #291449 by tommy
Replied by tommy on topic gladeVCP timer error
I tested line by line, and pins (seconds, minutes, hours) from time2 component are working and showing up correctly in gladevcp
addf time2.0 servo-thread
addf not.2 servo-thread
net prog-running not.2.in <= halui.program.is-idle
net cycle-timer time2.0.start <= not.2.out
net cycle-seconds gladevcp.hal_label5 <= time2.0.seconds
net cycle-minutes gladevcp.hal_label3 <= time2.0.minutes
net cycle-hours gladevcp.hal_label1 <= time2.0.hours

pins (totalofseconds, totalofminutes and totalofhours) are still causing "type mismatch"
net total-cycle-seconds gladevcp.hal_label10 <= time2.0.totalofseconds
net total-cycle-minutes gladevcp.hal_label8 <= time2.0.totalofminutes
net total-cycle-hours gladevcp.hal_label6 <= time2.0.totalofhours

Any idea what could be wrong?

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

More
23 Jan 2024 19:22 #291450 by Aciera

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

More
23 Jan 2024 19:35 #291453 by Aciera
Replied by Aciera on topic gladeVCP timer error
also note that you might need to set the data type you need in the hal_label widget:


this is from ./docs/src/gui/gladevcp.adoc:
[[gladevcp:hal-label]]
=== Label

`hal_label` is a simple widget based on GtkLabel which represents a HAL pin value in a user-defined format.

label_pin_type::
  The pin's HAL type  (0:s32, 1:float, 2:u32), see also the tooltip on 'General→HAL pin type' (note this is different from PyVCP which has three label widgets, one for each type).
text_template::
  Determines the text displayed - a Python format string to convert the pin value to text.
  Defaults to +%s+ (values are converted by the str() function) but may contain any legit as an argument to Pythons format() method. +
  Example: +Distance: %.03f+ will display the text and the pin value with 3 fractional digits padded with zeros for a FLOAT pin.

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

More
23 Jan 2024 19:52 #291456 by tommy
Replied by tommy on topic gladeVCP timer error
From time2.comp seems that all pins are defined as u32, also checked inside Lcnc and are visible as same type.
// Output Pins
pin out u32 seconds "Seconds";
pin out u32 minutes "Minutes";
pin out u32 hours "Hours";

pin out u32 totalofseconds "total-Seconds";
pin out u32 totalofminutes "total-Minutes";
pin out u32 totalofhours "total-Hours";

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

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