Documentation Center

  • Trial Software
  • Product Updates

Simulink.architecture.set_param

Set architecture object properties

Syntax

  • Simulink.architecture.set_param(Object,ParamName,ParamValue) example

Description

example

Simulink.architecture.set_param(Object,ParamName,ParamValue) sets the specified parameter of Object to the specified value. Parameter name and value strings are case sensitive.

Examples

expand all

Set software node name

Set the software node name from CPU to MyCPUNewName.

sldemo_concurrent_execution
Simulink.architecture.set_param([bdroot  '/CPU'],'Name','MyCPUNewName');

Change Periodic

Set Periodic trigger period to .02.

sldemo_concurrent_execution
Simulink.architecture.set_param([bdroot '/MyCPUNewName/Periodic'],'Period','.02')

Input Arguments

expand all

Object — Object whose parameter value to setstring

Object whose parameter value to set, specified as a string giving the object full path name. Possible objects are:

  • Software node

  • Hardware node

  • Periodic trigger

  • Aperiodic trigger

  • Task

ParamName — Name of the parameter to setstring

Name of parameter whose value to set, specified as a string.

These are the possible parameters whose values you can set for each of the object types:

For software node:

  • 'Name' — Name of the software node (string).

For hardware node:

  • 'Name' — Name of the hardware node (string).

  • 'ClockFrequency' — Frequency of the hardware node clock (string).

  • 'Color' — Color of the trigger icon, specified as an RGB triplet (vector).

For a periodic trigger:

  • 'Name' — Name of the trigger (string).

  • 'Period' — Period of the trigger (string).

  • 'Color' — Color of the trigger icon, specified as an RGB triplet (vector).

For an aperiodic trigger:

  • 'Name' — Name of the trigger (string).

  • 'Color' — Color of the trigger icon, specified as an RGB triplet (vector).

  • 'EventHandlerType' — Trigger source for the interrupt-driven task (string). Possible values:

    • 'Event (Windows)'

    • 'Posix Signal (Linux/VxWorks 6.x)'

  • 'SignalNumber' — Signal number for the trigger (string). You can set this value only if EventHandlerType is set to Event (Windows).

  • 'EventName' — Event name for the trigger (string). You can set this value only if EventHandlerType is set to Posix Signal (Linux/VxWorks 6.x).

For task:

  • 'Name' — Name of the task (string).

  • 'Period' — Period of the task (string).

  • 'Color' — Color of the task icon, specified as an RGB triplet (vector).

Data Types: char

ParamValue — Value to set the parameter tostring | vector

Value to set the parameter to, specified as a string, scalar, or vector. The possible values depend on the parameter.

Example: 'MyCPUNewName'

See Also

| | | | | |

Was this topic helpful?