Mokogwu Chiedu
Mokogwu Chiedu

Reputation: 23

Store value of a signal and store as constant value in simulink

Is it possible to get the value of a signal at a particular instant and store as a constant value for use somewhere else in the model?

Upvotes: 0

Views: 2641

Answers (1)

tmpearce
tmpearce

Reputation: 12693

One way I like to do this is to use a Triggered Subsystem. The actual subsytem can consist simply of the inport connected directly to the outport. Connect the signal you're interested in to the inport; and use whatever signal you want as the trigger. When you've triggered the subsystem, the input at that time becomes the output, and is held there until you trigger the subsystem again.

Upvotes: 3

Related Questions