| xPC Target™ | ![]() |
Change target object environment collection object property values
MATLAB® command line
set(env_collection_object)
set(env_collection_object, 'property_name1',
'property_value1','property_name2', 'property_value2', . . .)
env_collection_object.set('property_name1',
'property_value1')
set(env_collection_object, property_name_vector,
property_value_vector)
env_collection_object.property_name = property_valueenv_collection_object | Name of a target environment collection object. |
'property_name' | Name of a target object environment collection property. Always use quotation marks. |
property_value | Value for a target object environment collection property. Always use quotation marks for character strings; quotation marks are optional for numbers. |
set sets the values of environment properties for a collection of target object environments. Not all properties are user writable.
Properties must be entered in pairs or, using the alternative syntax, as one-dimensional cell arrays of the same size. This means they must both be row vectors or both column vectors, and the corresponding values for properties in property_name_vector are stored in property_value_vector.
The environment properties for a target object collection are listed in the following table. This table includes a description of the properties and which properties you can change directly by assigning a value.
Property | Description | Writable |
|---|---|---|
CCompiler | Values are 'Watcom' and 'VisualC'. From the xPC Target™ Explorer window compiler list, select either Watcom or VisualC. | Yes |
CompilerPath | Value is a valid compiler root directory. Enter the path where you installed a Watcom C/C++ or Microsoft® Visual Studio® C/C++ compiler. If the path is invalid or the directory does not contain the compiler, an error message appears when you use the function updatexpcenv or build a target application. | Yes |
DefaultTarget | Contains an instance of the default target environment object (xpctarget.env). | No |
FloppyDrive | Allows you to set the 3.5-inch drive letter to the one designated by your target PC. By default, FloppyDrive is set to a:. Set this property to b: only if the target PC designates it. As necessary, set this value before creating a boot disk. Valid values are 'a:' and 'b:'. | Yes |
NumTargets | Contains the number of target objects in the xPC Target system. Note that this is not the actual number of target PCs in the system. | No |
List the values of all the target object environment property values. Assume that tgs represents the target object environment.
tgs=xpctarget.targets;
set(tgs)
ans =
CCompiler: {2x1 cell}
CompilerPath: {}
DefaultTarget: {}
NumTargets: {}Change the property CCompiler to Watcom.
tgs.set('CCompiler','VisualC') or
set(tgs, 'CCompiler','VisualC')
As an alternative to the method set, use the target object property CCompiler. In the MATLAB window, type
tgs.CCompiler ='VisualC'
xPC Target target object method get (env collection object)
Built-in MATLAB functions get and set
![]() | selectdrive | set (env object) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |