gmocappy clock

More
5 years 7 months ago - 5 years 7 months ago #201026 by newbynobi
Replied by newbynobi on topic gmocappy clock
The timer.py file can easily be adapted to set a pin high if a lubrication of the spindle is needed or if a machine maintenance is needed. That would only require:

a hal pin to indicate lube needed for spindle and ore machine
a hal pin to indicate machine needs maintenance
a Pin for the time limit to lube
a pin for the time limit for maintenance
a pin to indicate "maintenance done"
a pin to indicate "lube done"

The last two are only needed to ensure the message is not only displayed once and just closed by the operator.

The rest can be done in timer.hal and to display messages use custom messages.

Like the ones I did in sim / gmoccapy / gmoccapy_messages.ini
Code:
[DISPLAY] # set up 3 user popup message dialogs # the messages support pango markup language # detailed information about the markup language can be found at # https://developer.gnome.org/pango/stable/PangoMarkupFormat.html # MESSAGE_TEXT = The text to be displayed, may be pango markup formatted # MESSAGE_TYPE = one of "status" , "okdialog" , "yesnodialog" # status : Will just display a message as popup window, using the messsaging system of gmoccapy # okdialog : Will hold focus on the message dialog and will activate a "-waiting" Hal_Pin OUT. # Closing the message will reset the waiting pin # yesnodialog : Will hold focus on the message dialog and will activate a "-waiting" Hal_Pin bit OUT # it will also give access to an "-responce" Hal_Pin Bit Out, this pin will hold 1 if the # user klicks OK, and in all other states it will be 0 # Closing the message will reset the waiting pin # The responce Hal Pin will remain 1 until the dialog is called again # MESSAGE_PINNAME = is the name of the hal pin group to be created MESSAGE_TEXT = This is a <span background="#ff0000" foreground="#ffffff">info message</span> test MESSAGE_TYPE = status MESSAGE_PINNAME = statustest MESSAGE_TEXT = This is a yes no dialog test MESSAGE_TYPE = yesnodialog MESSAGE_PINNAME = yesnodialog MESSAGE_TEXT = Text can be <small>small</small>, <big>big</big>, <b>bold</b>, <i>italic</i> and even be <span color="red">colored</span>. MESSAGE_TYPE = okdialog MESSAGE_PINNAME = okdialog

Norbert
Last edit: 5 years 7 months ago by newbynobi.

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

More
5 years 7 months ago #201029 by biqut2
Replied by biqut2 on topic gmocappy clock
Yes that's exactly what I had in mind. Currently I keep a log with good ole paper and pencil of the hour meter and when the way lube is refilled and how much is added. This helps me calculate average oil usage. Armed with this information I can easily detect a broken line or a failing pump, both of which I have had happen in the past and it's supprising how long it takes someone to notice.

Ideally I'd set up an interval and usage amount and if the two don't correlate within a reasonable margin of error, something is wrong. Same thing I'm doing now with paper and pencil, just a whole lot more convenient.

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

More
5 years 7 months ago #201471 by HansU
Replied by HansU on topic gmocappy clock
Hmm if you use box_custom_4 there is exactly one field left - maybe for the total accumulated travel distance.
I thought about adding it like this:
forum.linuxcnc.org/38-general-linuxcnc-q...nce-for-axes?start=0
but it would perfect fit into the timer.
Instead of
Code:
a Pin for the time limit to lube
we could also lubricate by travel distance.

And I think I'll add the elapsed time for the current part. To be resetted on pressing start.

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

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

jasen wrote: Great , thats what was needed. Many thanks Norbert.
BTW , I notice that the speed controls dont work under touch screen displays , I mean the sliders , still need to use the + and _ buttons , and in many cases you need fast acction. Is there a way to make the sliders working with mouse or touch , not only the + and -


If you don't want to use expensive hardware for reading analog signals, I can make an offer to you.
I wrote a very basic modus client running on a PIC microcontroller that has analog and digital inputs. You can use it with the MB2HAL component for example connected by a serial to USB converter.

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

More
5 years 7 months ago #201485 by newbynobi
Replied by newbynobi on topic gmocappy clock
@hans23,

I am working on timer.py to add Hal pins to set an alarm if limits are reached. First pin would be total run time to give a message machine needs maintenance, if that one works, it would be easy to add more alarm pin.

I was thinking about using the spare space for a part counter, but I do like also your idea of travel distance?

What to do?

Norbert

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

More
5 years 7 months ago - 5 years 7 months ago #201490 by HansU
Replied by HansU on topic gmocappy clock
The accumulated distance for one axis can be calculated in this way.
Simply integrate the absolute velocity:
Code:
loadrt abs names=abs.x,abs.y,abs.z loadrt integ names=integ.x,integ.y,integ.z addf abs.x servo-thread addf integ.x servo-thread net vel-in-x abs.x.in <= joint.0.vel-cmd net vel-abs-x abs.x.out => integ.x.in net acc-dist-x integ.x.out

To get the real distance, the absolut value of the velocity vector has to be calculated first (sqrt(v_x² + v_y² + v_z²)), then integrated.
As you always have that value for displaying, you may could use this.
A use case for that would be to estimate the wear of the mill.
But for lubrication intervals I think it is also useful to have the separate travel distances for each axis.

If it is displayed in the ntb_setup area, there will be enough space for all that.



A value for "Time/travel since last lubrication" could also be useful.
Last edit: 5 years 7 months ago by HansU.

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

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