User`s guide

Using Environment Properties and Functions
9 From the Target scope list, select either Enabled or Disabled.The
property Target scope is set by default to
Enabled.IfyousetTarget
scope to
Disabled, the target PC displays information as text. To use
all the features of the target scope, you also need to install a keyboard
on the target PC.
10 Set the Target scope property to Enabled.
Changing Environment Properties with a
Command-Line Interface for Default Targ et PCs
The xPC Target software lets you define and change different properties.
ThesepropertiesincludethepathtotheC/C++compiler,thehostCOMport,
the logging buffer size, and many others. Collectively these properties are
known as the xPC Target environment.
You can use the command-line functions to write a MATLAB code script that
accesses the environment settings accordingtoyourownneeds.Forexample,
you could write a script that switches betw een two targets.
The following procedure shows how to change the COM port property for
your host PC from COM1 to COM2:
1 In the MATLAB window, type
setxpcenv('RS232HostPort','COM2')
The up-to-date column shows the values that you have changed, but have
not updated.
HostTargetComm
RS232HostPort
RS232Baudrate
:RS232
:COM1
:115200
up to date
COM2
up to date
Making changes using the function setxpcenv does not change the current
values until you enter the update com mand.
2 In the MATLAB window, type
updatexpcenv
6-7