Display of Run Time
- pl7i92
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 1890
- Thank you received: 356
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
in the Postgui HAL
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.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19408
- Thank you received: 6507
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.
Thank you.
Please Log in or Create an account to join the conversation.
- pl7i92
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 1890
- Thank you received: 356
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.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19408
- Thank you received: 6507
10 Mar 2019 17:17 #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:
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 or Create an account to join the conversation.
- pl7i92
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 1890
- Thank you received: 356
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.147 seconds