TrigerredClock

Parent Previous Next

Full Library / Source / Clock / TriggeredClock
Block Name: TriggeredClock

Code File Location: VisualSim/actor/lib/TriggeredClock

Block Overview

o       It produces a periodic signal, a generalized square wave that sequences through N output values with arbitrary duty cycles and period. This block differs from the Clock block, in that, it has a start and stop input. 

Description

This actor is an extension of Clock with a start and stop input. A token at the start input will start the clock. A token at the stop input will stop the clock, if it is still running. If both start and stop are received simultaneously, then the clock will be stopped.

So that this start and stop ports can be used meaningfully in the CT domain, they are declared DISCRETE, and they should be connected to an event generator. Other simulators ignore this declaration.

Refer TriggeredClock Demo Model.

Parameter

Explanation

Type

Example

stopTime

The stop time of the model. 

Integer

Infinity

period

The period of the output waveform. 

Double

2.0

offsets

The offsets at which the specified values will be produced. 

Array

{0.0, 1.0}

values

The values that will be produced at the specified offsets. 

Array

{1, 0}

numberOfCycles

The number of cycles to produce, or -1 to specify no limit. 

Integer

-1

Port

Explanation

Type

Output

At every rising and trailing edge a value is output on this port for example 1 or 0;

Integer

Period

This input port is used to define the period of the output waveform. This is an optional port and the block can be used without the period value.

Double

trigger

This input port is used to start the generation of events from this block.  This is an optional port and the block can be used without the input trigger.

Any value

start

A port that, if connected, is used to specify when the clock starts. 

Any type

stop

A port that, if connected, is used to specify when the clock stops. 

Any type

Created with the Personal Edition of HelpNDoc: Easy CHM and documentation editor