Engee documentation

Sample and Hold

Transmit or hold the value of the first input signal based on the value of the second input signal.

blockType: SubSystem

Path in the library:

/Physical Modeling/Electrical/Control/General Control/Sample and Hold

Description

Block Sample and Hold outputs input signal In as long as input signal S is true. The block holds the output when the input signal S becomes false.

Ports

Input

# In — input signal
scalar

Details

Input signal.

Data types

Float64.

Complex numbers support

No

# S — control input signal
scalar

Details

Control input signal.

Data types

Bool.

Complex numbers support

No

Output

# OUT — output signal
scalar

Details

An output signal that transmits or holds the value of the input signal depending on the value of the control signal.

Data types

Float64.

Complex numbers support

No

Parameters

Main group

# Initial condition — initial value of the output signal

Details

Specify the initial value of the output signal.

Default value

0.0

Program usage name

initial_condition

Evaluatable

Yes

# Sample time — sampling time

Details

Specify the block sampling time, in seconds.

Set 0 to realise a continuous block.

Default value

0.0

Program usage name

sample_time

Evaluatable

Yes