How can I pass a string argument as a parameter through my masked subsystem? In Simulink, I want to use a block within a subystem that has a string argument.
This includes blocks such as the Fcn, MATLAB Fcn, Goto, From, To Workspace, From Workspace, To File, From File, S-function blocks.
As an example, let us refer to the From block. I wanted to have the signal that this block refers to entered into the Mask. I tried creating a variable in the mask workspace named from_signal and assign its value to literal.
Then, in the From block in my subsystem, I entered from_signal.
In the mask dialog, I enter the actual name of the signal as signal1. Therefore, the assignment, should be in the mask workspace from_signal = 'signal1'.
When I run the model, the From block is looking for a signal named from_signal, and not signal1. Why is it not recognizing this assignment?
Best Answer