gmocappy clock

More
5 years 7 months ago #202976 by HansU
Replied by HansU on topic gmocappy clock
A little bug in parts counter: When switching on the machine the counter is increased.

Strange but the "interp-run" signal is emitted when the machine is switched on.
Adding the line with the if-statement in the following function in counter.py resolves this.
Code:
def on_hal_status_interp_run(self, emc_stat): if hal.get_value("halui.program.is-running"): self.parts += 1 self.lbl_parts.set_text(str(self.parts)) self.running_time_prog = 0 self.lbl_running_time_prog.set_text(self._get_label_text_time(self.running_time_prog))

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

More
5 years 7 months ago #203091 by HansU
Replied by HansU on topic gmocappy clock
What do you think of changing the counter for "Running Time" into "Time in Move"?
Because now the time where the machine is moved manually isn't captured. May that should also count in the time for maintenance?

Hans

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

More
5 years 7 months ago #203137 by newbynobi
Replied by newbynobi on topic gmocappy clock
Sound good :laugh:

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

More
5 years 7 months ago - 5 years 7 months ago #203809 by HansU
Replied by HansU on topic gmocappy clock
I played a little bit around and added some functionality for statistics.It saves now the "Time in move", the "Spindle Time" and the "Travel distance" for each day in a file.
I added a button to view the statistics because I didn't managed it to get it integrated in the VCP. Therefore I need to import gi and when I do this it says the following even if i replace the import of these statics modules. Maybe it is caused by one of the further imports, I don't know.
Code:
module 'counter' skipped - import error: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https://bugzilla.gnome.org/show_bug.cgi?id=709183
But having the display separately has the advantage that the user doesn't have to install the needed python module and the needed package. If someone like this feature, I can post this.

PS: @Norbert:
Some updates in github.com/LinuxCNC/linuxcnc/pull/1029 ;-)

Last edit: 5 years 7 months ago by HansU.

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

More
5 years 7 months ago #203945 by newbynobi
Replied by newbynobi on topic gmocappy clock
Hans, could you please post the code,.

GI pepository tells me python3 and glatevcp needs python 2 imports, could that be the reason?

Norbert

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

More
5 years 7 months ago #204181 by HansU
Replied by HansU on topic gmocappy clock

GI pepository tells me python3 and glatevcp needs python 2 imports, could that be the reason?


No that's not the point. I even call the graphics window by python 2.
If you want to have it embedded, you can test with the minimal_plot.py
However, having it in a separate window has the advantage that you can use the window from the matplotlib that has zooming and moving already integrated.
The following user(s) said Thank You: Ritterchen

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

Moderators: newbynobi, HansU
Time to create page: 0.123 seconds
Powered by Kunena Forum