- Posts: 1871
- Thank you received: 0
Display of Run Time
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
in the Postgui HAL
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.
- tommylight
-
- Away
- Administrator
-
Less
More
- Posts: 22012
- Thank you received: 3
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.
Thank you.
Please Log in to join the conversation.
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.
- tommylight
-
- Away
- Administrator
-
Less
More
- Posts: 22012
- Thank you received: 3
7 years 7 months ago #128250
by tommylight
Loadrt not
addf not.1 servo-thread
for it to work.
Thank you.
Replied by tommylight on topic Display of Run Time
It works, but there have to be added: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
Loadrt not
addf not.1 servo-thread
for it to work.
Thank you.
Please Log in to join the conversation.
Time to create page: 0.082 seconds
