xPC Target | ![]() ![]() |
Get a parameter index or property name from the parameter list
Syntax
getparamid(target_object
, 'block_name
', 'parameter_name
') getparamid(target_object
, 'block_name
', 'parameter_name
', 'flag')
Arguments
Description
Method of a target object. 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.
Examples
Get the property name for the parameter Gain in the Simulink block Gain1, incrementally increase gain, and pause to observe signal trace.
Get the property name (P0, P1, . . .) of a single block.
Get the property index (0, 1, . . .) of a single block.
P5 is a property of the target object. For example, you could assign a value to the gain with tg.p5 = 1000
.
See Also
The xPC Target scope object method getsignalid
. The xPC target M-file demo scripts listed in xPC Target Demos.
![]() | getlog | getscope | ![]() |