User`s guide

getparamid
Purpose Parameter index from parameter list
Syntax MATLAB command line
getparamid(target_object, 'block_name', 'parameter_name')
Arguments
target_object
Name of a target object. The default name
is
tg.
'block_name'
Simulink block path without model name.
'parameter_name'
Name of a parameter within a Simulink
block.
Description getparamid returns the index of a parameter in the parameter list
based on the path to the parameter name. The names must be entered
in full and are case sensitive. Note, enter for
block_name the mangled
name that Real-Time Workshop uses for code generation.
Examples Get the parameter property for the parameter Gain in th e Simulink
block
Gain1, incrementally increase the gain, and pause to observe
the signal trace.
id = getparamid(tg, 'Subsystem/Gain1', 'Gain')
for i = 1 : 3
set(tg, id, i*2000);
pause(1);
end
Get the property index of a single block.
getparamid(tg, 'Gain1', 'Gain') ans = 5
See Also The xPC Target scope object method g etsignalid.
The xPC Target demo scripts listed in “xP C Target Demos” on page 6-9.
18-59