| xPC Target™ | ![]() |
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 PC and target PC, 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 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 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. |
Name | Target PC name. |
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. Note, you cannot build a 16 MB target application to run in StandAlone mode. |
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'. |
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. |
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. |
TargetBoot | Values are 'BootFloppy', 'DOSLoader', and 'StandAlone'. From the xPC Target Explorer window Target boot mode list, select BootFloppy, DOSLoader, or StandAlone. If your license file does not include the license for the xPC Target Embedded Option product, the Target boot mode box is disabled, with BootFloppy and DOSLoader as your options. With the xPC Target Embedded Option product licensed and installed, you have the additional choice of StandAlone. |
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
xPC Target functions setxpcenv, updatexpcenv, and xpcbootdisk
![]() | getTargetNames (env collection object) | getxpcpci | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |