Digital Clock

Hi.

The inbuild “DigitalClock.vcmx” component is nice to have in your simulations for when exporting .AVI files. However the digital clock starts at the same time, when the simulations starts.

Is there a way to “trigger start of Digital Clock” by some properties, or would it include some Python editing of the component?

Because, what I want is to show the exact cycletime in the simulation. I am using the Timers, that the robot has, but that is only printed in the Console. That is not part of the .AVI export video.

So any idea on how to show the cycle time in the .AVI file, with e.g. the “Digital Clock” component, but with the command to decide when the “Digital Clock” component should start running.

Timers_CycleTime

Send true signal to set start time.
Send false signal to freeze timer.

Timers_CycleTime.vcmx (805.9 KB)

3 Likes

Thanks @chungmin. That worked perfectly! :pray:

1 Like

Hi Chungmin.

Is it possible to invert the timer to count down?

I.E. Set a user defined cycle time value, trigger the boolean, and the clock would count backwards from set cycle time to zero?

Thanks.

Good idea, modified component has been pushed to 4.8 eCat.

  1. Countdown: It becomes a countdown timer when the value is greater than 0.0, or it remains a stopwatch timer
  2. SignalControl: Check to activate, triggered by BooleanSignal, Start/Reset timer when True, Stop timer when False.
  3. Countdown feature can work with signal control feature.

Hi Chungmin,

This is great, thank you!

I have a PM Global Variables component with many different cycle time variables/properties. I would like to have the Digital Clock’s Countdown to reference a given cycle time variable.

I.E. Any idea how I could reference a property of another component for the Countdown? Perhaps with a Signal Node property? Or reference a variable in a PM node?

Thanks,

Ben

PM

  1. Use GetProperty statement to set variable (DigitalClock’s countdown property)
  2. Use Assign statement to set variable value