Syntax

rtobj.setRTDBItemValue(itemid, itemvalue)

itemid, itemvalue are required.

Arguments

itemid
ID of the item whose value you wish to set. ID must be numeric. In order to display a list of items and their corresponding id's please use the getSharedMemRTDBVarList('items') method.
itemvalue
Value you wish to set. Item value must be numeric.

Description

setRTDBItemValue is a method of the simwb.rtobj object. The setRTDBItemValue method sets the value of the RTDB item in shared memory. During real-time execution under SIMulation Workbench, the Simulink model has access to only the CVT Value of the RTDB variables. The videos below contains scenarions that describe how setting the value of an RTDB Item in shared memory effects the test.



Figure: Animated GIF Explaining CVT and ALT Value Concept

For this function to set the value of the RTDB item, a test has to be started on the real-time host and the test RTDB should contain the RTDB items whose value needs to be set. In order to set parameter values, please refer to the setRTDBParamValue method.

See also:

     resetOperatorOverride  startTestSession   getSharedMemRTDBVarList   getRTDBItemValue   setRTDBParamValue

Example: rtobj_setRTDBItemValue.m