cycle timer not working

More
27 Nov 2012 09:10 - 27 Nov 2012 09:11 #26970 by jlviloria
copying the cycle timer John (hardinge),

displayed but does not work stays at zero when I run the program?

that can be bad.

in HAL:

loadrt time


addf time.0 servo-thread


in post-gui.hal

net run-status => time.0.start
net cycle-seconds pyvcp.time-seconds <= time.0.seconds
net cycle-minutes pyvcp.time-minutes <= time.0.minutes
net cycle-hours pyvcp.time-hours <= time.0.hours


in xml file

-<hbox>
-<label>
<text>"Cycle Time"</text>
<font>("Helvetica",14)</font>
</label>
-<u32> <halpin>"time-hours"</halpin>
<font>("Helvetica",14)</font>
<format>"2d"</format>
</u32>
-<label>
<text>":"</text>
<font>("Helvetica",14)</font>
</label>
-<u32>
<halpin>"time-minutes"</halpin>
<font>("Helvetica",14)</font>
<format>"2d"</format>
</u32>
-<label>
<text>":"</text>
<font>("Helvetica",14)</font>
</label>
-<u32>
<halpin>"time-seconds"</halpin>
<font>("Helvetica",14)</font>
<format>"2d"</format>
</u32>
</hbox>
Last edit: 27 Nov 2012 09:11 by jlviloria.

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

More
27 Nov 2012 11:17 #26972 by cmorley
Replied by cmorley on topic cycle timer not working
You must connect run-status signal to something.
Is it connected to something?

In these cases running halmeter to do your own investigating helps a lot.
You can narrow the problrm down that way - and it makes it easier for us to help you.

Chris M

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

More
27 Nov 2012 13:52 #26973 by awallin
Replied by awallin on topic cycle timer not working
the documentation over here could be improved
linuxcnc.org/docs/2.5/html/man/man9/time.9.html
the correct pin name is halui.program.is-running

"net run-status halui.program.is-running"

I'm not sure how one is supposed to reset the "time" component. Or is it just meant to count the sum total hours the machine has been running (since the start of linuxcnc). I would guess it resets when you restart linuxcnc or reboot the machine.

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

More
27 Nov 2012 19:54 - 27 Nov 2012 20:04 #26984 by BigJohnT
Replied by BigJohnT on topic cycle timer not working
It resets each time you start it. It times how long the part took to make.

I thought the documentation was 1000 times better than most man pages as it actually has some :) what needs to be improved?

Have you tested it with halui.program.is-running?

I did fix an error in the description from an early assumption of how it should be used but after testing on a live machine found the error in my assumption.

John
Last edit: 27 Nov 2012 20:04 by BigJohnT.

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

More
27 Nov 2012 19:55 - 27 Nov 2012 20:07 #26985 by BigJohnT
Replied by BigJohnT on topic cycle timer not working
Have you examined the run-status signal to see that it is on when you expect it to be on?

Did you add time.0 to the servo thread?

John
Last edit: 27 Nov 2012 20:07 by BigJohnT.

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

More
28 Nov 2012 00:58 #27003 by awallin
Replied by awallin on topic cycle timer not working

I thought the documentation was 1000 times better than most man pages as it actually has some :) what needs to be improved?

this page
linuxcnc.org/docs/2.5/html/man/man9/time.9.html
says "halui.is-running", but the correct pin name is "halui.program.is-running"

I'm not sure what "Time Converter" refers to. What is converted to what? "Timer" is perhaps better.

Does the time component run forever once it has seen true on the start-pin? Or does it stop when the start-pin goes false?
If the latter, I suggest "enable" as a better name for the pin that is now named "start"

Also the man-page is somewhat inconsistent in that at the top it suggests "halui.program.is-running" as a source for start.
But further down what is actually used in the example is halui.program.is-idle followed by a not-component.

I would be happy to contribute to the manuals/man-pages, but I would need clear and simple instructions how it's done (e.g. on the wiki). Last time I tried I apparently patched the wrong branch and my patch got lost.

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

More
28 Nov 2012 01:22 #27006 by BigJohnT
Replied by BigJohnT on topic cycle timer not working
Read the man page again, I edited it this morning to fix the is-running error.

Time Converter converts seconds to minutes, hours, seconds. It is not just a timer.

Can't change names now...

When it is on it times, on the rising edge it resets the timer.

John

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

More
28 Nov 2012 04:11 #27014 by jlviloria
Replied by jlviloria on topic cycle timer not working
John,

works perfect.

only one detail in loadrt not.0 think should go loadrt not count = N

Thanks John my machine is producing parts I will upload videos and photos so you can see how it looks

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

More
28 Nov 2012 05:10 #27019 by BigJohnT
Replied by BigJohnT on topic cycle timer not working
Sweet! I love it when a plan come together.

John

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

More
28 Nov 2012 09:39 #27030 by andypugh
Replied by andypugh on topic cycle timer not working

my machine is producing parts

Great! I have occasionally been worried that it never would. I am really quite relieved that we didn't encourage you into a too-hard project.
The following user(s) said Thank You: jlviloria

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

Time to create page: 0.099 seconds
Powered by Kunena Forum