| Contents | Index |
MATLAB command line
getxpcenv
Function to list environment properties. This function displays, in the MATLAB Command Window, the property names, the current property values, and the new property values set for the xPC Target™ environment.
The environment properties define communication between the host computer and target computer, the type of C compiler and its location, and the type of target boot floppy created during the setup process. You can view these properties using the getxpcenv function or the xPC Target Explorer. An understanding of the environment properties will help you configure the xPC Target environment.
Environment Property | Description | |
|---|---|---|
BootFloppyLocation | Drive name for creation of 3.5-inch target boot disk. | |
CCompiler |
Values are 'Watcom' and 'VisualC'. From the xPC Target Explorer window compiler list, select either Watcom or VisualC. | |
CDBootImageLocation | Location of cdboot.iso file for creation of CD target boot disk. | |
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 build a target application. | |
DOSLoaderLocation | Location of DOSLoader files to boot target computers from devices other than 3.5-inch disk or CD. | |
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. | |
| EthernetIndex | Value is 'n', where n indicates the index number for the Ethernet card on a target computer. Note that the (n-1)th Ethernet card on the target computer has an index number 'n'. The default index number is 0. If the target computer has multiple Ethernet cards, you must select one of the cards for host-target communication. This option returns the index number of the card selected on the target computer upon booting. | |
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. | |
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 computer 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. Note, you cannot build a 16 MB target application to run in StandAlone mode. | |
MulticoreSupport | Values are 'off' and 'on'. If your target computer has multicore processors, set this value to 'on' to take advantage of these processors for background tasks. Otherwise, set this value to 'off'. | |
Name | Target computer name. | |
NonPentiumSupport | Values are 'off' (default) and 'on'. Set this value to 'off' if your target computer has a 386 or 486 compatible processor. Otherwise, set it to 'on'. If your target computer has a Pentium or higher compatible processor, selecting this check box will slow the performance of your target computer. | |
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. | |
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 computer. Before you can select an RS-232 port, you need to set the HostTargetComm property to RS232. | |
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'. | |
TargetBoot | Values are 'BootFloppy', 'CDBoot', 'DOSLoader', 'NetworkBoot', and 'StandAlone'. From the xPC Target Explorer window target computer 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. | |
TargetMACAddress | Physical target computer MAC address from which to accept boot requests when booting within a dedicated network. Enter the address as six pairs of hexadecimal numbers, separated by colons (:). | |
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 computer. This property is set by default to Auto. Target RAM size defines the total amount of installed RAM in the target computer. 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 computer 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 computer 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 computer. | |
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 computer displays information as text. To use all the features of the target scope, you also need to install a keyboard on the target computer. | |
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 computer. If you communicate with your target computer 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. | |
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. | |
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 computer. Ask your system administrator for this value. For example, 192.168.0.10. | |
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 computer. You do not need to define a bus type for your host computer, which can be the same or different from the bus type in your target computer. 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. | |
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. | |
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 computer. | |
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. Set the IRQ to 5, 10, or 11. If one of these hardware settings leads to a conflict in your target computer, choose another IRQ and make the corresponding changes to your jumper settings. | |
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 computer, choose another I/O port base address and make the corresponding changes to your jumper settings. | |
Version | xPC Target version number. Read only. |
Return the xPC Target environment in the structure shown below. The output in the MATLAB window is suppressed. The structure contains three fields for property names, current property values, and new property values.
env = getxpcenv
env =
propname: {1x25 cell}
actpropval: {1x25 cell}
newpropval: {1x25 cell}Display a list of the environment property names, current values, and new values.
env = getxpcenv

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |