[Timing diagram] Improve clock pulse management

0 votes
asked Oct 5, 2021 in Wanted features by The-Lu (63,920 points)

Hello PlantUML team,

On timing diagram:

clock C with period 10 pulse 5
  • Could you control pulse value accordingly period value?

Here are some example, during tests:

CodeOutput
(PNG output)
clock C with period 10

clock C with period 10 pulse 7

OK if pulse < period
clock C with period 10 pulse 11

KO if pulse > period
clock C with period 10 pulse 100
Even: java.lang.IllegalArgumentException
→ http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuKhEoK_ELd1MACyioL0eI2tAp4zHC3HGA2ZDAKu5CWou75BpKe0A0G00
 

Thanks for the improvement,
Regards,
Th.

commented Nov 2, 2021 by awschult (360 points)
you cant have a pulse longer than the defined period... this doesnt really make sense at all. The pulse width is defined as the with within the period. To have a pulse width longer than a period would result in a duty of over 100%, which can't happen.

If you are asking for anything here, i would assume that you are asking for a better warning/error message.
commented Nov 4, 2021 by The-Lu (63,920 points)

Exactly that (at least: no  java.lang.IllegalArgumentException)
And FYI that is now corrected on V1.2021.13.

2 Answers

+1 vote
answered Nov 4, 2021 by The-Lu (63,920 points)
 
Best answer

This is corrected on V1.2021.13 (1rst Nov, 2021).

@startuml
clock C with period 10 pulse 100
@enduml

Thank to PlantUML team,
Regards.

0 votes
answered Feb 19, 2022 by ivan-igorevich
Hello, team, it also would be nice to set sometime to stop the clock and/or resume it, to show some more "user defined" clocks on the top of a "system" one. thank you
...