blockHold
Samples a signal and holds the value for a period T.
Extends from ModelicaDEVS.Templates.DDBlock (Discrete single input - discrete single output block).
Information
The Hold BlockParameters:
| period | sample period |
| start | start time |
Description:
The Hold block (called "SampleHold" in PowerDEVS) samples an input signal at periodical time instants which are defined by the parameters period and start: tsample=start+period*i, where i=non-negative numbers. It holds the sampled value until the next sampling instant.
The picture below shows a sine signal (blue) that is sampled (red) at a frequency of T=0.25.

Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | method (from DDBlock) | world.qss | Use QSS1, QSS2 or QSS3 |
| Real | period | 1 | Sample period |
| Real | start | 0 | Start time |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| ModelicaDEVS.Templates.DiscreteInPort | inPort (from DDBlock) | ||
| ModelicaDEVS.Templates.DiscreteOutPort | outPort (from DDBlock) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| ModelicaDEVS.Miscellaneous.worldModel | world (from DDBlock) | ||
| Real[3] | yVal (from DDBlock) | ||
| Boolean | yEvent (from DDBlock) |