Ocean Blue
Ocean Blue

Reputation: 33

Read Value of Display Block in Simulink using get_param

I need to read the value of Display block in Simulink model through m-file command using get_param function.

What should be the command syntax i.e. get_param ('mymodel/BockName', ???)

Appreciate your support.

Many Thanks

Upvotes: 0

Views: 5738

Answers (1)

Navan
Navan

Reputation: 4477

You cannot get the value displayed on Display block using get_param for dialog parameters. This is run-time data and is not stored as a dialog parameter in the block. While the model is running you can use the "RunTimeObject" parameter to get the values. For example, if your model is paused in the middle of the simulation, you can use the following commands to get the input values.

rto = get_param(gcbh,'RuntimeObject')
rto.InputPort(1).Data

RunTimeObject will be empty if the model is not running.

Upvotes: 3

Related Questions