Products & Services Solutions Academia Support User Community Company

Learn more about xPC Target   

setxpcenv - Change xPC Target environment properties

Syntax

MATLAB command line

setxpcenv('property_name', 'property_value')
setxpcenv('prop_name1', 'prop_val1', 'prop_name2', 
'prop_val2')
setxpcenv

Arguments

property_name

Not case sensitive. Property names can be shortened as long as they can be differentiated from the other property names.

property_value

Character string. Type setxpcenv without arguments to get a listing of allowed values. Property values are not case sensitive.

Description

Function to enter new values for environment properties. If the new value is different from the current value, the property is marked as having a new value. Use the function updatexpcenv to change the current properties to the new properties.

The environment properties define communication between the host PC and target PC, the type of C compiler and its location, and the type of target boot floppy created during the setup process. With the exception of the Version property, you can set these properties using the xpcexplr function or the xPC Target Explorer window. An understanding of the environment properties will help you to correctly configure the xPC Target environment.

Environment Property

Description

Version

xPC Target version number. Read only.

CCompiler

Values are 'Watcom' and 'VisualC'. From the xPC Target Explorer window compiler list, select either Watcom or VisualC.

CompilerPath

Value is a valid compiler root folder. Enter the path where you installed a Watcom C/C++ or Microsoft Visual Studio C/C++ compiler.

If the path is invalid or the folder does not contain the compiler, an error message appears when you use the function updatexpcenv or build a target application.

TargetRAMSizeMB

Values are 'Auto' and 'Manual'.

From the xPC Target Explorer window Target RAM size list, select either Auto or Manual. If you select Manual, enter the amount of RAM, in megabytes, installed on the target PC. This property is set by default to Auto.

Target RAM size defines the total amount of installed RAM in the target PC. This RAM is used for the kernel, target application, data logging, and other functions that use the heap.

If Target RAM size is set to Auto, the target application automatically determines the amount of memory up to 64 MB. If the target PC does not contain more than 64 MB of RAM, or you do not want to use more than 64 MB, select Auto. If the target PC has more than 64 MB of RAM, and you want to use more than 64 MB, select Manual, and enter the amount of RAM installed in the target PC.

MaxModelSize

BootFloppy and DOSLoader modes ignore this value.

Values are '1MB', '4MB', and '16MB'.

From the xPC Target Explorer window Maximum model size list, select either 1 MB, 4 MB, or 16 MB. This value is unavailable for BootFloppy or DOSLoader modes.

Choosing the maximum model size reserves the specified amount of memory on the target PC for the target application. The remaining memory is used by the kernel and by the heap for data logging.

Selecting too high a value leaves less memory for data logging. Selecting too low a value does not reserve enough memory for the target application and creates an error.

MulticoreSupport

Values are 'off' and 'on'. If your target PC has multicore processors, set this value to 'on' to take advantage of these processors for background tasks. Otherwise, set this value to 'off'.

SecondaryIDE

Values are 'off' and 'on'. Set this value to 'on' only if you want to use the disks connected to a secondary IDE controller. If you do not have disks connected to the secondary IDE controller, leave this value set to 'off'.

NonPentiumSupport

Values are 'off' (default) and 'on'. Set this value to 'off' if your target PC has a 386 or 486 compatible processor. Otherwise, set it to 'on'. If your target PC has a Pentium or higher compatible processor, selecting this check box will slow the performance of your target PC.

HostTargetComm

Values are 'RS232' and 'TcpIp'.

From the xPC Target Explorer window Host target communication list, select either RS232 or TCP/IP.

If you select RS232, you also need to set the property RS232HostPort. If you select TCP/IP, then you also need to set all properties that start with TcpIp.

RS232HostPort

Values are 'COM1' and 'COM2'.

From the xPC Target Explorer window Host port list, select either COM1 or COM2 for the connection on the host computer. The xPC Target software automatically determines the COM port on the target PC.

Before you can select an RS-232 port, you need to set the HostTargetComm property to RS232.

RS232Baudrate

Values are '115200', '57600', '38400', '19200', '9600', '4800', '2400', and '1200'.

From the Baud rate list, select 115200, 57600, 38400, 19200, 9600, 4800, 2400, or 1200.

TcpIpTargetAddress

Value is 'xxx.xxx.xxx.xxx'.

In the xPC Target Explorer window Target PC IP address box, enter a valid IP address for your target PC. Ask your system administrator for this value.

For example, 192.168.0.10.

TcpIpTargetPort

Value is 'xxxxx'.

In the xPC Target Explorer window TcpIp target port box, enter a value greater than 20000.

This property is set by default to 22222 and should not cause any problems. The number is higher than the reserved area (telnet, ftp, ...) and it is only of use on the target PC.

TcpIpSubNetMask

Value is 'xxx.xxx.xxx.xxx'.

In the xPC Target Explorer window LAN subnet mask address text box, enter the subnet mask of your LAN. Ask your system administrator for this value.

For example, your subnet mask could be 255.255.255.0.

TcpIpGateway

Value is 'xxx.xxx.xxx.xxx'.

In the xPC Target Explorer window TcpIp gateway address box, enter the IP address for your gateway. This property is set by default to 255.255.255.255, which means that a gateway is not used to connect to the target PC.

If you communicate with your target PC from within a LAN that uses gateways, and your host and target computers are connected through a gateway, then you need to enter a value for this property. If your LAN does not use gateways, you do not need to change this property. Ask your system administrator.

TcpIpTargetDriver

Values are 'NE2000', 'SMC91C9X', 'I82559', 'RTLANCE', 'R8139', '3C90x', and 'NS83815'.

From the xPC Target Explorer window TcpIp target driver list, select NE2000, SMC91C9X, I82559, RTLANCE, R8139, 3C90x, or NS83815. The Ethernet card provided with the system uses the NE2000 driver.

TcpIpTargetBusType

Values are 'PCI' and 'ISA'.

From the xPC Target Explorer window TcpIp target bus type list, select either PCI or ISA. This property is set by default to PCI, and determines the bus type of your target PC. You do not need to define a bus type for your host PC, which can be the same or different from the bus type in your target PC.

If TcpIpTargetBusType is set to PCI, then the properties TcpIpISAMemPort and TcpIpISAIRQ have no effect on TCP/IP communication.

If you are using an ISA bus card, set TcpIpTargetBusType to ISA and enter values for TcpIpISAMemPort and TcpIpISAIRQ.

TcpIpTargetISAMemPort

Value is '0xnnnn'.

If you are using an ISA bus Ethernet card, you must enter values for the properties TcpIpISAMemPort and TcpIpISAIRQ. The values of these properties must correspond to the jumper settings or ROM settings on your ISA bus Ethernet card.

On your ISA bus card, assign an IRQ and I/O port base address by moving the jumpers on the card.

Set the I/O port base address to around 0x300. If one of these hardware settings leads to a conflict in your target PC, choose another I/O port base address and make the corresponding changes to your jumper settings.

TcpIpTargetISAIRQ

Value is 'n', where n is between 4 and 15.

If you are using an ISA bus Ethernet card, you must enter values for the properties TcpIpISAMemPort and TcpIpISAIRQ. The values of these properties must correspond to the jumper settings or ROM settings on the ISA-bus Ethernet card.

On your ISA bus card, assign an IRQ and I/O-port base address by moving the jumpers on the card.

The MathWorks recommends setting the IRQ to 5, 10, or 11. If one of these hardware settings leads to a conflict in your target PC, choose another IRQ and make the corresponding changes to your jumper settings.

TargetScope

Values are 'Disabled' and 'Enabled'.

From the xPC Target Explorer window Enable target scope list, select either Enabled or Disabled.

The property TargetScope is set by default to Enabled. If you set TargetScope 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.

BootFloppyLocation

Drive name for creation of 3.5-inch target boot disk.

TargetMACAddress

Physical target PC MAC address when booting within a dedicated network.

CDBootImageLocation

Location of cdboot.iso file for creation of CD target boot disk.

DOSLoaderLocation

Location of DOSLoader files to boot target PCs from devices other than 3.5–inch disk or CD.

TargetBoot

Values are 'BootFloppy', 'CDBoot', 'DOSLoader', 'NetworkBoot', and 'StandAlone'.

From the xPC Target Explorer window target PC configuration pane, select one of the following tabs: Boot Floppy, CD Boot, DOS Loader, Network Boot, or Standalone.

If your license file does not include the license for the xPC Target Embedded Option product, your only options are BootFloppy, CDBoot, DOSLoader, and NetworkBoot. With the xPC Target Embedded Option product licensed and installed, you have the additional choice of Standalone.

EmbeddedOption

Values are 'Disabled' and 'Enabled'. This property is read only.

Note that the xPC Target Embedded Option product is enabled only if you purchase an additional license.

The function setxpcenv works similarly to the set function of the MATLAB Handle Graphics® system. Call the function setxpcenv with an even number of arguments. The first argument of a pair is the property name, and the second argument is the new property value for this property.

Using the function setxpcenv without arguments returns a list of allowed property values in the MATLAB window.

Examples

List the current environment properties.

setxpcenv

Change the serial communication port of the host PC to COM2.

setxpcenv('RS232HostPort','COM2') 

See Also

The xPC Target functions getxpcenv, updatexpcenv, and xpcbootdisk. The procedures Changing Environment Properties with xPC Target Explorer and Changing Environment Properties with a Command-Line Interface for Default Target PCs.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS