Display of Run Time

More
7 years 7 months ago #128136 by pl7i92
Display of Run Time was created by pl7i92
Here is a Code to be enterd to display the Runtime
in the panel XML
Code:
<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>

in the Postgui HAL
Code:
loadrt time addf time.0 servo-thread ## net prog-running not.1.in <= halui.program.is-idle net cycle-timer time.0.start <= not.1.out 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

Please Log in to join the conversation.

More
7 years 7 months ago #128189 by tommylight
Replied by tommylight on topic Display of Run Time
I will test this tomorrow and report back.
Thank you.

Please Log in to join the conversation.

More
7 years 7 months ago #128211 by pl7i92
Replied by pl7i92 on topic Display of Run Time
you are welcome to report back it is working here in Education class room

Please Log in to join the conversation.

More
7 years 7 months ago #128250 by tommylight
Replied by tommylight on topic Display of Run Time

pl7i92 wrote:

Code:
loadrt time addf time.0 servo-thread ## net prog-running not.1.in <= halui.program.is-idle net cycle-timer time.0.start <= not.1.out 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

It works, but there have to be added:
Loadrt not
addf not.1 servo-thread
for it to work.
Thank you.

Please Log in to join the conversation.

More
7 years 7 months ago #128298 by pl7i92
Replied by pl7i92 on topic Display of Run Time
Thank you i missed that as i coped from a real machine setup

Please Log in to join the conversation.

Time to create page: 0.082 seconds
Powered by Kunena Forum