gmocappy clock

More
19 Mar 2021 17:38 #202863 by newbynobi
Replied by newbynobi on topic gmocappy clock
@Hans,

you fixed the minutes calculation, that's fine, I did not test the calculation with 4000 Seconds, so I did not note that bug, shame on me. But whx did you correct the error only in one python file? :P

IMHO we Don not need any more the handler files for PAUSED or IDLE, so why not delete them?

Norbert

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

More
19 Mar 2021 20:04 - 19 Mar 2021 20:07 #202888 by HansU
Replied by HansU on topic gmocappy clock


you fixed the minutes calculation, that's fine, I did not test the calculation with 4000 Seconds, so I did not note that bug, shame on me. But whx did you correct the error only in one python file? :P

That there is something left for you to fix ;-)


IMHO we Don not need any more the handler files for PAUSED or IDLE, so why not delete them?

Just for debugging, of course they can be removed.
Last edit: 19 Mar 2021 20:07 by HansU.

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

More
19 Mar 2021 22:53 #202906 by newbynobi
Replied by newbynobi on topic gmocappy clock
@hansu

Wo kommst du her? Ich wohne in der Nähe von Hildesheim

Norbert

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

More
20 Mar 2021 09:23 #202953 by HansU
Replied by HansU on topic gmocappy clock
@Norbert
Ich wohne aktuell in Berlin...

Hans

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

More
20 Mar 2021 13:32 #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.
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
21 Mar 2021 09:33 #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
21 Mar 2021 17:40 #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
27 Mar 2021 15:32 - 28 Mar 2021 18:33 #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.
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 ;-)

Attachments:
Last edit: 28 Mar 2021 18:33 by HansU.

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

More
28 Mar 2021 20:47 #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
31 Mar 2021 07:24 #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: newbynobiHansU
Time to create page: 0.126 seconds
Powered by Kunena Forum