Display of Run Time

More
09 Mar 2019 08:19 #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
<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
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
The following user(s) said Thank You: chimeno

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

More
10 Mar 2019 00:29 #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 or Create an account to join the conversation.

More
10 Mar 2019 08:24 #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 or Create an account to join the conversation.

More
10 Mar 2019 17:17 #128250 by tommylight
Replied by tommylight on topic Display of Run Time

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 or Create an account to join the conversation.

More
11 Mar 2019 07:18 #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 or Create an account to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum