Documentation

getxpcenv

List environment properties assigned to MATLAB variable (not recommended)

Syntax

getxpcenv
getxpcenv propertyname

Description

getxpcenv displays, in the Command Window, the property names and current property values for the Simulink® Real-Time™ environment.

getxpcenv propertyname displays the current value of property propertyname. The environment properties define communication between the development and target computers and the type of target boot kernel created during the setup process.

To access the environment properties in Simulink Real-Time Explorer:

  1. In the Targets pane, expand a target computer node.

  2. In the toolbar, click the Target Properties icon  .

  3. Expand the sections Host-to-Target communication, Target settings, or Boot configuration.

Host-to-Target Communication

Environment Property

Description

HostTargetComm

Property values are 'RS232' and 'TcpIp'.

Select RS-232 or TCP/IP from the Communication type list in the Target Properties pane of Simulink Real-Time Explorer.

If you select RS-232, you also must set the property RS232HostPort. If you select TCP/IP, then you must set the other properties that start with TcpIp.

    Note:   RS-232 communication type will be removed in a future release. Use TCP/IP instead.

RS232Baudrate

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

Select 1200, 2400, 48 00, 9600, 19200, 38400, 57600, or 115200 from the Baud rate list in the Target Properties pane of Simulink Real-Time Explorer.

RS232HostPort

Property values are 'COM1' and 'COM2'.

Select COM1 or COM2 from the Host port list in the Target Properties pane of Simulink Real-Time Explorer. The 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.

TcpIpGateway

Property value is 'xxx.xxx.xxx.xxx'.

Enter the IP address for your gateway in the Gateway box in the Target Properties pane of Simulink Real-Time Explorer. 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 development and target computers are connected through a gateway, you must 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

Property value is 'xxx.xxx.xxx.xxx'.

Enter the subnet mask of your LAN in the Subnet mask box in the Target Properties pane of Simulink Real-Time Explorer. Ask your system administrator for this value.

For example, your subnet mask could be 255.255.255.0.

TcpIpTargetAddress

Property value is 'xxx.xxx.xxx.xxx'.

Enter a valid IP address for your target computer in the IP address box in the Target Properties pane of Simulink Real-Time Explorer. Ask your system administrator for this value.

For example, 192.168.0.10.

TcpIpTargetBusType

Property values are 'PCI', 'ISA', and 'USB'.

Select PCI, ISA, or USB from the Bus type list in the Target Properties pane of Simulink Real-Time Explorer. 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 development 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

Property values are '3C90x', 'I8254x', 'I82559', 'NE2000', 'NS83815', 'R8139', 'R8168', 'Rhine', 'RTLANCE', 'SMC91C9X', 'USBAX772', 'USBAX172', and 'Auto'.

Select THREECOM_3C90x, INTEL_I8254x, INTEL_I82559, NE2000, NS83815, R8139, R8168, Rhine, RTLANCE, SMC91C9X, USBAX772, USBAX172, or Auto from the Target driver list in the Target Properties pane of Simulink Real-Time Explorer.

TcpIpTargetISAIRQ

Property value is 'n', where n is between 5 and 15 inclusive.

Select an IRQ value from the IRQ list in the Target Properties pane of Simulink Real-Time Explorer.

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 settings leads to a conflict in your target computer, choose another IRQ and make the corresponding changes to your jumper settings.

TcpIpTargetISAMemPort

Property value is '0xnnnn'.

Enter an I/O port base address in the Address box in the Target Properties pane of Simulink Real-Time Explorer.

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 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.

TcpIpTargetPort

Property value is 'xxxxx'.

Enter a port address greater than 20000 in the Port box in the Target Properties pane of Simulink Real-Time Explorer.

This property is set by default to 22222. The default value is higher than the reserved area (telnet, ftp, . . .) and is only of use on the target computer.

Target Settings

Environment Property

Description

EthernetIndex

Property 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 the Ethernet link. This option returns the index number of the card selected on the target computer upon booting.

LegacyMultiCoreConfig

Property values are 'on' (the default) and 'off'.

Set this value to 'off' only if your multicore target computer is fully compliant with the Advanced Configuration and Power Interface (ACPI) standard. Otherwise, set this value to 'on'.

MaxModelSize

Supported property values are '1MB' (the default) and '4MB'. Value '16MB' is not supported.

Select 1 MB or 4 MB from the Model size list in the Target Properties pane of Simulink Real-Time Explorer.

Setting Model size is enabled for Boot mode Stand Alone only.

Choosing the maximum model size reserves the specified amount of memory on the target computer for the real-time application. Memory not used by the application 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 real-time application and creates an error. You can approximate the size of the application by the size of the DLM file produced by the build process.

MulticoreSupport

Property values are 'on' and 'off' (the default).

Select or clear the Multicore CPU check box in the Target Properties pane of Simulink Real-Time Explorer.

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

Property values are 'on' and 'off' (the default).

Select or clear the Target is a 386/486 check box in the Target Properties pane of Simulink Real-Time Explorer.

Set this value to 'on' if your target computer has a 386 or 486 compatible processor. Otherwise, set it to 'off'. If your target computer has a Pentium or higher compatible processor, selecting this check box slows the performance of your target computer.

SecondaryIDE

Property values are 'on' and 'off' (the default).

Select or clear the Secondary IDE check box in the Target Properties pane of Simulink Real-Time Explorer.

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'.

ShowHardware

Property values are 'on' and 'off' (the default).

If you create a target boot kernel when ShowHardware is 'on' and boot the target computer with it, the kernel displays the index, bus, slot, function, and target driver for each Ethernet card on the target monitor.

The development computer cannot communicate with the target computer after the kernel boots with ShowHardware set.

TargetRAMSizeMB

Property values are 'Auto' (the default) and 'xxx', where xxx is a positive value specifying the amount of RAM, in megabytes, installed on the target computer.

Under RAM size, click the Auto or Manual button in the Target Properties pane of Simulink Real-Time Explorer. If you click Manual, enter the amount of RAM, in megabytes, installed on the target computer in the Size(MB) box.

TargetRAMSizeMB defines the total amount of installed RAM in the target computer. This RAM is used for the kernel, real-time application, data logging, and other functions that use the heap.

If TargetRAMSizeMB is assigned 'Auto', the real-time application reads the target computer BIOS and determines the amount of memory up to a maximum of 4 GB. If the application cannot read the BIOS, you must select Manual mode and enter the amount of memory, in megabytes, up to a maximum of 4 GB.

The Simulink Real-Time kernel can use only 4 GB of memory.

TargetScope

Property values are 'Disabled' and 'Enabled' (the default).

Select or clear the Graphics mode check box in the Target Properties pane of Simulink Real-Time Explorer.

If you set TargetScope to Disabled, the target computer displays information as text.

To use the full features of a target scope, install a keyboard on the target computer.

USBSupport

Property values are 'on' (the default) and 'off'.

Select or clear the USB Support check box in the Target Properties pane of Simulink Real-Time Explorer.

Set this value to 'on' if you want to use a USB port on the target computer; for example, to connect a USB mouse. Otherwise, set it to 'off'.

Boot Configuration

Environment Property

Description

BootFloppyLocation

Drive name for creation of target boot disk.

DOSLoaderLocation

Location of DOSLoader files to boot target computers from devices other than floppy disk or CD.

TargetBoot

Property values are 'BootFloppy', 'CDBoot', 'DOSLoader', 'NetworkBoot', and 'StandAlone'.

Select Removable Disk, CD, DOS Loader, Network, or Stand Alone from the Boot mode list in the Target Properties pane of Simulink Real-Time Explorer.

    Tip   In the Target Properties pane of Simulink Real-Time Explorer, click the Create boot disk button to create a bootable image in the specified boot mode.

TargetMACAddress

Physical target computer MAC address from which to accept boot requests when booting within a dedicated network. Format the MAC address as six pairs of hexadecimal numbers, separated by colons:

xx:xx:xx:xx:xx:xx

To update the MAC address in Simulink Real-Time Explorer, first click the Reset button in the Target Properties pane. You can then click the Specify new MAC address button to enter a MAC address manually in the MAC address box. If you do not enter a MAC address manually, the software will obtain the MAC address automatically the next time you restart the target computer.

Development Computer Configuration

Environment Property

Description

Version

Simulink Real-Time version number. Displayed only from getxpcenv when called without arguments.

Examples

Display the Simulink Real-Time environment in the format shown below.

getxpcenv
Simulink Real-Time Target Settings

    Name                     : TargetPC1

    TargetRAMSizeMB          : Auto
    MaxModelSize             : 1MB
    SecondaryIDE             : off
    NonPentiumSupport        : off
    MulticoreSupport         : on
    LegacyMultiCoreConfig    : on
    USBSupport               : on
    ShowHardware             : off
    EthernetIndex            : 0

    HostTargetComm           : TcpIp
    TcpIpTargetAddress       : 10.10.10.15
    TcpIpTargetPort          : 22222
    TcpIpSubNetMask          : 255.255.255.0
    TcpIpGateway             : 10.10.10.100
    RS232HostPort            : COM1
    RS232Baudrate            : 115200
    TcpIpTargetDriver        : Auto
    TcpIpTargetBusType       : PCI
    TcpIpTargetISAMemPort    : 0x300
    TcpIpTargetISAIRQ        : 5

    TargetScope              : Enabled

    TargetBoot               : NetworkBoot
    TargetMACAddress         : 90:e2:ba:17:5d:15

Return specific environment property value.

env = getxpcenv('HostTargetComm')
env = 

    'TcpIp'
Was this topic helpful?