Products & Services Solutions Academia Support User Community Company

Learn more about xPC Target   

Network Communication

Network Communication Overview

This topic describes the establishment of communication between the host PC and target PC using network communications (TCP/IP). For serial communication, see Serial Communication.

Hardware for Network Communication

You must install the following hardware before you install the xPC Target software and configure it for network communication:

Ethernet Card Provided with the xPC Target Product

The MathWorks supplies a PCI bus Ethernet card with the xPC Target software for you to use in a desktop target PC. The following table will help to identify the card that was shipped with your software and the parameter you need to select in the xPC Target Explorer. Both cards support a data transfer rate of 100 megabits per second (Mb/s). Note that these cards are functionally the same.

Board

Identification

Setup Parameter

Intel Pro/100 M

Intel Pro/100 M or Desktop Adapter

I82559

Intel Pro/100 S

Intel Pro/100 S or Desktop Adapter

I82559

To configure xPC Target to work with the supplied card:

  1. If xPC Target Explorer is not already started, in the MATLAB Command Window, type

    xpcexplr

    The xPC Target Explorer window opens.

  2. In the xPC Target Explorer xPC Target Hierarchy pane, select the Communication node of the target PC for which you want to check the boot disk. For example, select the Communication node for TargetPC1.

  3. From the Host target communication list, select TCP/IP.

  4. From the TCP/IP target driver list, select I82559.

If you cannot use the Ethernet card provided with the xPC Target product, you can select your own Ethernet card, see

http://www.mathworks.com/products/xpctarget/xPC_Target_Supported_Ethernet_Chipsets.pdf

The following are cases where you might not be able to use the Ethernet card provided with the xPC Target product:

Ethernet Card for a PCI Bus

If your target PC has a PCI bus, The MathWorks recommends that you use an Ethernet card for the PCI bus. The PCI bus has a faster data transfer rate and requires minimal effort to configure. The MathWorks also supplies one PCI bus Ethernet card with the xPC Target software for your target PC.

To install the PCI bus Ethernet card supplied with the xPC Target software, use the following procedure:

  1. Turn off your target PC.

  2. If the target PC already has an unsupported Ethernet card, remove the card.

  3. Plug the Ethernet card from The MathWorks into a free PCI bus slot.

  4. Connect your target PC Ethernet card to your LAN using an unshielded twisted-pair cable.

Your next task is to set up the xPC Target environment for network communication. See Environment Properties for Network Communication.

Ethernet Card for an ISA Bus

Your target PC might not have an available PCI bus slot, or your target PC might not contain a PCI bus (older motherboards, passive ISA backplanes, or PC/104 computers). In these cases, you can use an Ethernet card for an ISA bus.

If you are using an ISA bus, you need to reserve, from the BIOS, an interrupt for this board.

The MathWorks does not provide an ISA bus board. For a list of known compatible network adapter chip families, see

http://www.mathworks.com/products/xpctarget/xPC_Target_Supported_Ethernet_Chipsets.pdf

To install an ISA bus Ethernet card, use the following procedure:

  1. Turn off your target PC.

  2. On your ISA bus card, assign an IRQ and I/O-port base address by moving the jumpers or switches on the card. Write down these settings, because you need to enter them in the xPC Target Explorer.

    You should set the IRQ line to 11 and the I/O-port base address to around 0x300. If one of these hardware settings would lead to a conflict in your target PC, select another IRQ or I/O-port base address.

      Note   If your ISA bus card does not contain jumpers to set the IRQ line and the base address, use the utility on the installation disk supplied with your card to manually assign the IRQ line and base address. Do not configure the card as a PnP-ISA device.

  3. If the target PC already has an unsupported Ethernet card, remove the card. Plug the compatible network card into a free ISA bus slot.

  4. Connect the target PC network card to your local area network (LAN) using a coaxial cable or an unshielded twisted-pair cable.

    If you use an Ethernet card for an ISA bus within a target PC that has a PCI bus, you must reserve the chosen IRQ line number for the Ethernet card in the PCI BIOS. Refer to your BIOS setup documentation to set up the PCI BIOS.

Your next task is to set up the xPC Target environment for network communication. See Environment Properties for Network Communication.

Environment Properties for Network Communication

The xPC Target environment is defined by a group of properties. These properties give xPC Target information about the software and hardware that it works with. You might change some of these properties often, while others you will rarely want to change.

After you have installed the xPC Target software, you can specify the environment properties for the host and target computers. Note that you must specify these properties before you can build and download a target application.

  1. If xPC Target Explorer is not already started, in the MATLAB Command Window, type

    xpcexplr

    The xPC Target Explorer window opens.

    xPC Target Explorer associates network communication environment properties with the target PC.

  2. In the xPC Target Explorer, right-click the Host PC node.

  3. Select Add Target.

    A target PC node named TargetPC1 appears in the xPC Target Hierarchy, at the same level as the Host PC node. It appears with the icon (note the X to denote that the host PC is not connected to the target PC).

  4. As necessary, repeat Environment Properties for Serial Communication and Environment Properties for Serial Communication for each additional target PC you want to add to your system.

    Additional target PC nodes appear in the xPC Target Hierarchy. As you add other target PCs, the PC number is incremented. The following figure illustrates two target PC nodes.

  5. In the xPC Target Explorer, expand a target PC node.

    A Configuration node appears. Under this are nodes for Communication, Settings, and Appearance. The parameters for the target PC node are grouped in these categories.

  6. Select Communication.

    The Communication Component pane appears to the right.

  7. From the Host target communication list, select TcpIp.

    The pane changes to one that contains only those parameters pertinent to network communication.

  8. You must enter the network properties with the correct values according to your LAN environment. Ask your system administrator for values for these settings.

    • Target PC IP address — This is the IP address for your target PC. An example of an IP address is 192.168.0.10.

    • LAN subnet mask address — This is the subnet mask address of your LAN. An example of a subnet mask address is 255.255.255.0.

      Alternatively, you can obtain the LAN subnet mask address from the Network Connections dialog box on your host PC. Depending on your Windows platform, you can access this dialog box in a number of ways. For example, on a Windows XP Professional system, you can use this sequence:

      1. Select Start > Settings > Control Panel, then double-click Network Connections.

      2. Right-click Local Area Connection, then select Properties.

      3. Select Internet Protocol (TCP/IP), then click Properties.

      If your computers connect with a crossover cable, you might have a dialog box like the following. You can obtain your subnet mask address and TCP/IP gateway address from this dialog box.

        Note   The TCP/IP address is for your host PC, not your target PC. You still need to get the target PC TCP/IP address for your target PC from your system administrator.

        The default gateway address is blank in this dialog box. However, in the xPC Target Explorer, you must enter 255.255.255.255 for the gateway value in the TCP/IP gateway address property.

  9. Optionally, enter the following properties, depending on your specific circumstances:

    • TCP/IP target port — This property is set by default to 22222. This value should not cause any problems, because this number is higher than the reserved area (telnet, ftp, ...) and it is only relevant on the target PC. If necessary, you can change this property value to any value higher than 20000 and less than 65536.

    • TCP/IP gateway address — This property is set by default to 255.255.255.255. This means that you do not use a gateway to connect to your target PC. If you connect your computers with a crossover cable, leave this property as 255.255.255.255.

      If you communicate with the target PC from within your LAN, you might not need to define a gateway and change this setting.

      If you communicate from a host PC located in a LAN different from your target PC, you need to define a gateway and enter its IP address. This is especially true if you want to work over the Internet. Ask your system administrator for the IP address of the appropriate gateway.

  10. Enter the following properties specific to the Ethernet card on your target PC:

    • TCP/IP target driver — From the list, select NE2000, SMC91C9X, I82559, RTLANCE, R8139, 3C90x, NS83815, or I8254x. This property is set by default to NE2000. For a crossover cable connection, select I82559.

      • Note   To allow the software to determine your TCP/IP target driver, select Auto.

      TCP/IP target bus type — This property is set by default to PCI. If TCP/IP target bus type is set to PCI, then the properties TCP/IP target ISA memory port and TCP/IP target ISA IRQ number have no effect on TCP/IP communication and are disabled (grayed out). If you are using an ISA bus Ethernet card, set TCP/IP target bus type to ISA and enter values for TCP/IP ISA memory port and TCP/IP target ISA IRQ number.

    • TCP/IP target ISA memory port and TCP/IP target ISA IRQ number — If you are using an ISA bus Ethernet card, you must enter values for the properties TCP/IP target ISA memory port and TCP/IP target ISA IRQ number. The values of these properties must correspond to the jumper settings or ROM settings on your ISA bus Ethernet card.

  11. Repeat step 5 to 10 for any target PC for which you have a network connection between the host PC and target PC.

    The xPC Target software updates the environment with new properties as you enter them.

    The following figure illustrates the Communication Component pane for a network connection.

For more information on the xPC Target environment, see Software Environment and Demos in the xPC Target User's Guide.

Your next task is to create a target boot disk. See Booting Target PCs from Boot Floppy Disk.

  


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