Home

xPC TargetBox™

image

Contents

1. 0 0 00 e eens 1 2 PC Compatibility j 4 sie Mees Gia oe ee tes a Me eas 1 2 Hardware nc ca 88 oe Ra a Oh et secs ot oe Bake hae 1 3 Software ssn Ghee she aie a ae Ba we aaa 1 4 xPC Target Embedded Option 0 0 0c ee eee 1 5 Communication sande ae thes eee eR Se PEO 1 5 VO Options errea bcos nh tA ee e Red a a 1 6 System Requirements 0 0 0 0 c eee ne eens 1 7 Software Requirements for the Host PC 1 7 Hardware Requirements for the Host PC 1 8 xPC TargetBox Software 000s 1 9 xPC TargetBox System Hardware 000 ce euae 1 9 xPC TargetBox I O Options 0 0 cee eee ee 1 11 Initial Loop Back Test 2 xPC TargetBox Installation for Loop Back Testing 2 2 Unpacking the Shipping Box 0 0 0 c cece eens 2 2 Running the Self Test Without a Monitor 2 4 Running the Self Test with a Monitor 2 9 Troubleshooting the Loop Back Self Test 2 12 xPC TargetBox Installation for Regular Use 2 15 Removing Test Dongles 0 0 cece eee eens 2 15 Connecting Additional Peripherals 2 16 Connecting the External Floppy Disk Drive 2 18 Connecting Hardware to the xPC TargetBox 2 20 Tntroduction ari ssc eee a a we dd cegs bn bare gob ai 2 20 Configuration Label for I O Options 000 2 21 Planning I O Hardwar
2. 5 Using the I O option number locate the connector number on the configuration label and then locate the corresponding I O connector on the front or rear panel of the xPC TargetBox The connectors are marked on the front and rear panels of an xPC TargetBox I O 1 through I O 6 and CAN1 through CAN3 2 initial Loop Back Test 6 Press the two latches on the test dongle connected to the corresponding I O connector remove it from the I O connector and then connect it again ZN The Markiworks Removing and reattaching a test dongle ensures that the dongle is not loose 7 Repeat the above step for each test dongle with a corresponding self test that failed 8 Power up the system again and let the system self test run another time If some numerical values in the target screen still show values of 0 unplug the system and contact Technical Support at The MathWorks for help 2 14 xPC TargetBox Installation for Regular Use xPC TargetBox Installation for Regular Use If you completed the self test successfully you will have already connected a monitor to the xPC TargetBox To further use your xPC TargetBox you need to attach an external floppy disk drive keyboard and optionally a mouse This section includes the following topics e Removing Test Dongles Remove and save test dongles for later troubleshooting of I O boards e Connecting Additional Peripherals Connect a mouse and keyboard to directly interact with
3. 5 5 5 Using xPC TargetBox 5 6 From the TargetBoot list choose DOSLoader Click Update xPC Target updates the environment properties and grays the Update button Click BootDisk A message box opens with the following message Insert a formatted floppy disk into your host PC disk drive and click OK to continue Insert a floppy disk and then click OK The files checksum dat xpcsgo1 rtb xpcboot com and autoexec bat are copied to the disk Copying the Kernel to Flash Memory Boot the xPC TargetBox without a floppy disk xPC TargetBox starts running FreeDOS from flash memory C gt Since the process of setting up the xPC TargetBox for DOSLoader mode overwrites the current autoexec bat file you might want to save a copy with a different name For example c gt copy autoexec bat autoex01 bat Insert the boot floppy disk with the xPC Target kernel into the external floppy disk drive Type copy a xpcsgo1 rtb c copy a xpcboot com c copy a autoexec bat c DOSLoader Mode 5 Remove the floppy disk and then on the xPC TargetBox press the Reset button The file autoexec bat includes the command xpcboot com to start the xPC Target kernel running Note If you get the error message Cannot boot RTTarget 32 from Virtual 8086 mode edit the config sys file to comment out or remove the line that loads the high memory driver REM DEVICE C DROS EMM386 EXE DPMI OFF FRAME NO Creating a Targe
4. Click No Click the Update button and then click the BootDisk button again After you update the current properties and click the BootDisk button the following message box opens Bootdisk Xx ED Insert a formatted floppy disk into your host PC s disk drive and press OK f tocontinue OK Cancel 3 Insert a formatted 3 5 inch floppy disk into the host PC disk drive and then click OK Note All data on the disk is erased xPC Target displays the following dialog box while creating the boot disk The process takes about 1 to 2 minutes Creating xPC Target boot disk B m x Please wait Rs SSEtttti sCSC d 4 Close the xPC Target Setup window 5 Remove the target boot disk from the host PC disk drive and insert it into the external disk drive connected to your xPC TargetBox Your next task is to test your installation See Testing xPC Target Installation on page 3 13 3 Installation and Configuration Creating a Target Boot Disk with Command Line Interface You use the target boot disk to load and run the xPC Target kernel After you make changes to the xPC Target environment properties you need to create or update a boot disk To create a target boot disk for the current xPC Target environment use the following procedure 1 In the MATLAB Command Window type xpcbootdisk xPC Target displays the following message Insert a formatted floppy disk into your host PC s disk drive and pres
5. Dout 2 Clr0 Out Dout 0 Extgate Din 2 Clk 0 Din 2 Clk 0 Din 0 Dgnd 4 9 4 c TargetBox I O Options Pin Layout IO 301 2 of 2 connectors The following figure is the pin layout for the IO 301 option connector This is the J4 connector in the manufacturer s data sheet at http www diamondsystems com files binaries DMM32v2 61 pdf The terminals on the screw terminal boards are numbered sequentially while the pin numbers on the connectors are numbered alternately left and right However the numbers printed on each screw terminal board correspond directly to the pin numbers provided in the figure below Digital YO f A7 Port A A5 A3 A1 Digital I O B7 Port B B5 B3 Bl Digital I O G7 Port C c5 5V A6 Digital I O A4 Port A A2 AO B6 Digital I O B4 Port B B2 BO c6 gt Digital I O CA Port C C2 CO Ack NC NC NC Dgnd Note This connector does not use pins 35 to 50 4 10 xPC TargetBox IO 301 Testing Model IO 301 This model tests the analog channels A constant value is written to an A D driver block and then read from the D A driver block The values are compared with an error defined in a second constant block 1 In the MATLAB Command Window type 10301 The Simulink model for testing the IO 301 option opens Jio301ad MM32AD w _ ol x File Edit View Simulation Format Tools Help MM 32 Diamond Analog Input Logical Operator 2 MM 32 D
6. xPC Target ping 3 19 W watchdog driver block 5 4 X xPC Target communication ping 3 19 installing 3 2 installing for regular use 2 15 xPC Target Embedded Option and host PC 1 7 booting without 1 5 installing 3 2 xPC TargetBox and xPC Target 1 8 BIOS 1 9 certification xvi connecting hardware 2 20 CPU 1 9 description of I O options 1 11 DOSLoader mode 5 6 external AC adapter 1 3 external connectors 1 9 external floppy disk drive 1 9 external power supply 1 9 files and directories 5 14 FTP server 1 9 hardware 1 3 1 9 LED driver block 5 3 library drivers 5 2 operating system FreeDOS 1 9 PC compatibility 1 2 peripherals 1 9 powering up 3 13 RAM 1 9 software 1 4 1 9 temperature range 1 3 watchdog driver block 5 4 xPC TargetBox model 106 1 10 xPC TargetBox model 107 1 10 xPC TargetBox model 108 1 10 xPC TargetBox model 206 1 11 xPC TargetBox model 207 1 11 xPC TargetBox model 208 1 11
7. The performance of these systems is sufficient for 75 of all xPC Target applications found in office laboratory and mobile field environments System memory A FlashRAM chip is mounted directly on the IDE connector allowing you to boot the system without a floppy disk drive This configuration requires no additional mechanical parts However you do need the external floppy drive or a network connection to transfer files to the flash disk PC 104 expansion bus I O options are standard PC 104 boards Features of xPC TargetBox Hardware The xPC TargetBox hardware was carefully selected and designed to handle a wide range of applications and environments Small size The overall design makes xPC TargetBox ideal for its use in mobile and field applications Physical dimensions are the same for all units 270 mm x 162 mm x 82 mm 6 8 in x 4 in x 2 in Rugged system The xPC TargetBox has a fully aluminum enclosure that is anodized on the inside equipped with all necessary I O connectors and has the ability to operate under normal or harsh conditions without the need for cooling fans or other moving parts Temperature range A low power design allows fanless operation with no mechanically rotating parts Cooling holes in the enclosure are not necessary The standard temperature range is 0 C to 60 C For harsh conditions the xPC TargetBox is available with an extended temperature range that can run from 40 C
8. boot disk and rebuild the target application from the Simulink model For more information on the xPC Target environment see Chapter 8 Software Environment in the xPC Target User s documentation Your next task is to create a target boot disk See Target Boot Disk on page 3 10 3 5 3 Installation and Configuration 3 6 Network Communication Before you can create and run a target application you need to set up the connection between the host and target computers You can use either serial or network communication This section includes the following topics e Hardware for Network Communication Connect to a LAN or use a crossover cable e Environment Properties for Network Communication Enter the IP address and network information for the xPC TargetBox This manual does not include information for installing network cards or the TCP IP protocol on your host computer For correct installation and setup of your network cards and the TCP IP protocol contact your system administrator Hardware for Network Communication You must install the following hardware before you install the xPC Target software and configure it for network communication 1 When using the xPC TargetBox with TCP IP you must have a network adapter card correctly installed on the host PC On the other hand the xPC TargetBox has an Intel 82559ER Ethernet controller onboard 2 Connect the host and target computers with an unshielde
9. conditioning circuits Pin Layout and Screw Terminal Boards The pin layout for each I O option is provided in a table The numbers printed on each screw terminal board correspond directly to the pin numbers provided in the table Each screw terminal board is provided with rubber feet and distance spacers for easy placement on a workbench A nice feature of the screw terminal boards is that you can stack two or more together to reduce space requirements on your workbench Making Your Own Terminal Boards You might want to make your own connector boards with signal conditioning circuitry that is specific for your application The 50 pin connectors on the PC TargetBox and the screw terminal boards are from the AMPLIMIT 050 series III from Tyco Electronics The part number is Tyco Electronics P N 787082 5 If you want more information see http www amp com and the TERM50 hardware manual included in the xPC TargetBox shipping case 4 2 Loop Back Testing of I O Options Loop Back Testing of O Options Use a loop back test to initially determine if your xPC TargetBox is working correctly determine if your xPC TargetBox is continuing to work correctly and to learn more about an I O option This section includes the following topics e Loop Back Testing Process Connect a test dongle to an xPC TargetBox connector and run a target application specific for that connector and I O option Determining the Success of a Loop Ba
10. 0 10 V e C5 0 5 V e C6 0 2 5 V The third character second number in the code indicates the configuration of the second 8 channels The default configuration is C11 2 23 2 initial Loop Back Test Table 2 1 Jumper Codes for I O Options 1 O Option Number of Jumper Codes Continued Connectors IO 303 1 Analog output D A jumper codes for Ruby MM 416 first channel e C1 10 V e C2 5 V e C3 0 10 V The third fourth and fifth characters in the code indicate the configuration for the second third and fourth D A channels The default configuration is C1111 IO 304 2 None Onyx MM IO 305 1 None Quartz MM 10 IO 306 2 None DM6814 IO 308 Special None CAN connectors If you have identified all I O options and associated I O connectors on your xPC TargetBox you are ready to connect the xPC TargetBox through its I O connectors to your hardware under test See Planning I O Hardware Connections on page 2 25 2 24 Connecting Hardware to the xPC TargetBox Planning I O Hardware Connections To ensure correct operation the shipping case includes an I O board user s manual from the original manufacturer for each particular I O option in the lower compartment of the xPC TargetBox shipping case Make sure to consult these manuals to verify that your I O connections comply with the manufacturers specifications 1 Make a drawing of the I O connections you want to e
11. 16 copying files with MATLAB 5 19 included with xPC TargetBox 1 4 with DOS shell 5 17 H hardware connecting 2 20 network communication 3 6 planning connections 2 25 requirement host PC 1 8 Index hardware continued screw terminal boards 2 26 xPC TargetBox features 1 3 xPC TargetBox summary 1 9 host PC hardware 3 3 hardware requirements 1 8 software requirements 1 7 l T O board options 4 1 T O expansion slots 1 9 T O option 301 connector pin layout analog 4 9 connector pin layout digital 4 10 wiring test dongles 4 8 T O option 302 connector pin layout 4 14 wiring test dongles 4 13 T O option 303 connector pin layout 4 17 wiring test dongles 4 16 T O option 304 connector pin layout 4 20 wiring test dongles 4 19 T O option 305 connector pin layout 4 23 wiring test dongles 4 22 T O option 306 connector pin layout 4 26 wiring test dongles 4 25 T O option 308 connector pin layout 4 29 wiring test dongles 4 29 T O options configuration label 2 21 description 1 11 driver library 5 2 driver support 1 6 expandability 1 6 expansion slots 1 6 external connectors 1 6 features 1 6 T O 301 A D D A DIN 1 12 TVO 302 D A 1 13 T O 303 D A 1 13 T O 304 DIO 1 13 T O 305 counters 1 14 T O 306 encoders 1 14 T O 308 CAN field bus 1 14 pin layout 4 2 installation testing 3 16 unpacking shipping case 2 2 installing hardware 3 3 xPC Target Embedded Option 3 2 installing xPC TargetBox additional pe
12. COM1 COM2 with a 9 pin D sub connector and network connection with an Ethernet J45 connector CPU Pentium Peripherals You need to supply a VGA monitor PS 2 keyboard and PS 2 mouse RAM 128 MB 1 9 1 Introduction Hardware Description Nonvolatile 32 MB FlashRAM module memory I O expansion slots External connectors External power source External floppy disk drive Room for three PC 104 expansion boards The xPC TargetBox is not expandable beyond adding I O boards Front and back panels with shielded I O connectors for I O board options CAN bus interface for CAN specification 2 0 Connectors for standard PC peripherals monitor mouse keyboard two RS 232 ports one parallel port and RJ 45 Ethernet External AC adaptor with an output voltage of 19 volts DC for worldwide operation The type of power cord provided with an xPC TargetBox is dependent on the shipping location One external 3 5 inch floppy disk drive with a dedicated parallel port connector The following table lists available xPC TargetBox base systems Standard Unit Product Description Name xPC TargetBox 106 xPC TargetBox 107 xPC TargetBox 108 266 MHz Pentium II 128 MB RAM 32 MB FlashRAM Standard temperature from 0 C to 60 C 400 MHz Pentium III 128 MB RAM 32 MB FlashRAM with QuickBoot capability Standard temperature from 0 C to 60 C 700 MHz Pentium III 128 MB RAM 32 MB FlashRAM with Qui
13. Connected to 192 168 0 1 220 XPC PC FTP server v2 55 at 192 168 0 1 User 192 168 0 1 none Log in to the server by pressing Enter The host PC logs into the directory c work and displays the messages 230 User logged in ftp gt Set the host FTP to binary transfer On the host PC type binary Copy files from the host PC to the xPC TargetBox For example if you created a stand alone application from the Simulink model xpcosc md1l in your MATLAB working directory c mwd type put c mwd xpcosc_xpc_emb xpcosc rtb 5 Using xPC TargetBox 5 18 The host PC displays the following 200 Selected data port 150 Trasferring binary file xpcosc com 226 Transfer complete ftp 16536 bytes sent in 0 00 Seconds ftp gt Repeat step 2 for the boot loader and the autoexe bat file that loads the kernel and application put c mwd xpcosc_xpc_emb_xpcboot com c put c mwd xpcosc_xpc_emb autoexec bat c Quit the FTP server On the xPC TargetBox type quit The directory changes to c xpe Unload the FTP server Type unldftp Run the target application For example type autoexec This file was created by the build process for a stand alone application and includes the command xpcboot xpcosc rtb First the kernel is loaded then the target application and finally the target application is started If you want your stand alone application to run when you press the Reset button on your xPC TargetBox you need to edit
14. EVENT THE BUYER S EXCLUSIVE REMEDY HEREUNDER IS LIMITED TO THE FURNISHING OF REPLACEMENT PARTS ON AN EXCHANGE BASIS OR AT THE OPTION OF MPL TO THE REPAIR OR REPLACEMENT OF DEFECTIVE PRODUCTS OR COMPONENT PARTS AT ITS PLANT BUT IN EITHER CASE ONLY SO LONG AS AN EXAMINATION WITHIN THE PERIOD OF WARRANTY REVEALS THE PARTS TO BE DEFECTIVE AND IN ALL CASES ALL COSTS OF SHIPPING AND PACKAGING SHALL BE BORNE BY THE BUYER IN ADDITION AND NOTWITHSTANDING ANYTHING HEREIN TO THE CONTRARY NEITHER MATHWORKS NOR MPL SHALL INCUR ANY OBLIGATION HEREUNDER WITH RESPECT TO PRODUCTS WHICH ARE MODIFIED IN ANY WAY BY THE BUYER WITHOUT THE PRIOR WRITTEN CONSENT OF MPL AND IN NO EVENT SHALL MATHWORKS OR MPL INCUR ANY OBLIGATION TO REPAIR OR REPLACE PRODUCTS OR COMPONENT PARTS WHICH ARE DETERMINED BY MPL OR SELLER IN ITS SOLE DISCRETION TO BE DEFECTIVE DUE TO BUYER MPL Warranty For xPC TargetBox MISUSE USE OF UNAUTHORIZED REPAIR PARTS OR UNAUTHORIZED THIRD PARTY SERVICE OR BECAUSE OF A USE NOT IN ACCORDANCE WITH SPECIFIC MPL OR SELLER PRODUCT OPERATION AND MAINTENANCE INSTRUCTIONS CUSTOMER ACCEPTS AND ACKNOWLEDGES THAT THE FOREGOING ALLOCATION OF RISK IS REFLECTED IN THE PURCHASE PRICE LIMITATION OF LIABILITY IN NO EVENT SHALL MATHWORKS OR MPL BE LIABLE FOR SPECIAL EXEMPLARY INDIRECT PUNITIVE CONSEQUENTIAL OR INCIDENTAL DAMAGES INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS LOSS OF BUSINESS OR GOODWILL OR LOSS OF USE FOR ANY BREACH OF THE
15. be extremely careful that you do not damage an I O option or even the entire xPC TargetBox You can damage an I O option by making a wrong connection or by not connecting hardware according to the specifications of the I O option Because the physical connections depend on your application you must make sure on your own that the electrical and mechanical connections are within the boundaries of the I O options External connectors for I O options Each I O option installed in your xPC TargetBox is accessible through one or two external I O connectors on the front and rear panels of the xPC TargetBox These connectors are clearly marked TO 1 through I O 6 and CAN1 through CANS The first six connectors are of type SCSI II with 50 pins while the three CAN connectors have 9 pins The 2 20 Connecting Hardware to the xPC TargetBox layout of the 50 pins depends on which I O option is internally connected to which I O connector on the outside of the xPC TargetBox Configuration Label for I O Options The layout of the I O connectors on the xPC TargetBox is the same for all models and is independent of the I O options installed in your xPC TargetBox The mapping of which I O option is connected to which I O connector is listed on the xPC TargetBox configuration label on the bottom of the xPC TargetBox Warning Always unplug the xPC TargetBox when locating the label Three additional copies of these labels are in the Read First env
16. dostst exe xpcboot com xpctbtst rtb autoexec bat WORK lt DIR gt xpcboot com application rtb autoexec bat ftpbin exe telpass exe config tel password tel unldftp bat bootxpc exe loadxpc bat reboot exe Copy one of the autoexec files to autoexec bat to boot into DOS autoexec dos start the FTP server autoexec ftp or run the xPC Target kernel and self test autoexec tst FreeDOS Backup files for the FTP server Drivers for the Ethernet connection Files to run a self test for the xPC TargetBox and I O boards Do not confuse c work autoexec bat with c autoexec bat c work autoexec bat loads and runs the target application or self test Files created from building a stand alone application on the host PC and copied to the xPC TargetBox Files to start the FTP server ftpbin exe set IP address config tel and change password telpass exe Unload FTP server unldftp bat and unload FTP server with Ethernet drivers bootxpc exe loadxpc bat Reboot the xPC TargetBox FTP File Transfer Booting xPC TargetBox with FTP Server When you first receive your xPC TargetBox the system is configured to run a self test If you set up a network connection to xPC Target you can use an FTP server to copy files from a host PC to the xPC TargetBox After you set up your host PC for network communication you can connect to an xPC TargetBox using FTP For information on connecting your host PC toa netw
17. gateway to connect to your xPC TargetBox If you communicate with the xPC TargetBox 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 xPC TargetBox you need to define a gateway and enter its IP address Network Communication This is especially true if you want to work over the Internet Ask your system administrator for the IP address of the appropriate gateway The following properties are specific for the Ethernet card on your xPC TargetBox TcpIpTargetDriver Because the xPC TargetBox includes an Intel 82559ER Ethernet controller from the list select 182559 TepIpTargetBusType Select PCI TcpIpISAMemPort and TcpIpISAIRQ Because the xPC TargetBox uses a PCI Ethernet card you do not need to enter values for these properties 5 When you finish changing the properties click the Update button xPC Target updates the environment with the new properties You do not have to exit and restart MATLAB after making changes to the xPC Target environment even if you change the communication between the host and target from RS 232 to TCP IP However you have to recreate the target boot disk and rebuild the target application from the Simulink model For more information on the xPC Target Environment see Software Environment on page 8 1 in the xPC Target User s documentation Your next task is to create
18. groups with 8 bits each xPC Target does not support the external trigger on this board Analog output D A 4 16 bit channels with a 10 us settling time Output range for each channel set independently to 0 10 V 10 V or 5 V with jumpers on the board If you do not specify a range when purchasing an xPC TargetBox the range is set to 10 V Digital I O 24 TTL digital I O lines divided into three groups with 8 bits each xPC Target does not support the external trigger on this board Digital I O 48 TTL digital I O lines divided into six groups with 8 bits each Each group set to either input or output xPC TargetBox does not support the counter timers and external interrupts on this board 1 Introduction 1 O Board Product Name Description Continued xPC TargetBox IO 305 Diamond Quartz MM 10 Standard temperature 0 to 60 C xPC TargetBox IO 306 RealTime Devices DM6814 Standard temperature 0 to 70 C xPC TargetBox IO 308 Softing CAN AC2 104 Extended temperature 40 to 85 C Counters 10 16 bit general purpose counters for pulse train generation and pulse width measurements Maximum clock frequency 4 MHz Digital I O 8 TTL digital input lines and 8 TTL digital output lines Interrupt 1 digital interrupt line Encoders 3 up down 16 bit counters with a maximum input rate of 1 MHz Digital I O 18 TTL digital input only lines and 6 TTL input o
19. is support for standard peripherals accessible through standard connectors SVGA interface up to 1280 x 1024 PS 2 mouse PS 2 keyboard four RS 232 ports and a standard parallel port With the addition of standard peripherals you can use the xPC Target kernel command line interface to enter commands for control signal acquisition and parameter tuning directly from the xPC TargetBox without the need of a host PC Network or serial connection to the host PC Connect your xPC TargetBox to your host computer using either an RS 232 port or the onboard Ethernet controller LOBASE T 100BASE TX Intel 82559ER You use the connection to the host PC to download a target application or to FTP files to the flash disk 1 5 1 Introduction 1 6 1 O Options You can add up to three I O options to an xPC TargetBox TO expandability The xPC TargetBox provides the ability to expand I O connections through a standard PC 104 ISA and PC 104 PCI expansion bus The MathWorks currently offers a set of seven I O options you can purchase with your system If needed you can add your own PC 104 I O boards but The MathWorks and MPL will not provide repair service for a system with your boards inside If your system requires service you must return it for repair in the same configuration in which it was shipped to you For more information about the available I O options see xPC TargetBox I O Options on page 1 11 T O driver sup
20. results sent to an Outport block 1 In the MATLAB Command Window type 10305 The Simulink model for testing the IO 305 option opens Jio305 QUARTZDIO File Edit View Simulation Format Tools Help Quart MM 10 Quart MM 10 3 Diamond Diamond Digital Output Digital Input Constant Constanti 1 Constant2 4 24 xPC TargetBox IO 306 xPC TargetBox IO 306 The RealTime Devices DM6814 board has 3 encoders 12 digital I O lines and 2 interrupts This section includes the following topics e Wiring for IO 306 Test Dongle e Pin Layout IO 306 1 of 2 Connectors e Pin Layout IO 306 2 of 2 Connectors e Testing Model IO 306 Note xPC TargetBox does not support the counter timers on this board Wiring for IO 306 Test Dongle xPC Target communicates with this board using two connectors Some of the pins in the test dongle are connected together to allow for loop back testing of this board Header P2 Dongle connect pins 5 13 7 15 21 29 23 31 37 45 39 47 Note Header P3 While this header is connected to an I O connector and shipped with a terminal board and cable the xPC TargetBox is not shipped with a dongle attached to this I O connector 4 25 4 c TargetBox I O Options Pin Layout IO 306 1 of 2 Connectors The following figure is the pin layout for the IO 306 option connector This is the P2 connector on the manufacturer s data sheet http www rt
21. seem to be missing contact your MathWorks representative Running the Self Test Without a Monitor Aself test is preinstalled on the xPC TargetBox flash disk This test is a custom xPC Target application to exercise the I O options in your system Run this application to initially test your system and run this application any time you are not sure about the performance of your xPC TargetBox 1 From the upper layer remove the xPC TargetBox Check visually for any physical damage xPC TargetBox Installation for Loop Back Testing Turn the box over and on the bottom find the configuration label Check for the correct xPC TargetBox model and I O options that you ordered Also notice for which industrial standards your xPC TargetBox is certified 2 5 2 initial Loop Back Test 3 Turn the box back over and place on a desk with the top label up Make sure the test dongles are tightly plugged in 4 If your xPC TargetBox includes the I O option 308 CAN AC2 104 remove the CAN dongle from the upper compartment and attach to the CAN 1 and CAN 2 connectors 5 From the top layer of the case remove the external AC power adapter Check visually for any physical damage 6 Place the AC power adapter near the xPC TargetBox Connect the loose end with the green connector block to the power input on the xPC TargetBox 2 6 xPC TargetBox Installation for Loop Back Testing 7 From the top compartment remove the AC po
22. the file c autoexec bat to include the lines cd c work autoexec FTP File Transfer Copying Files with MATLAB and FTP As an alternative to transferring files to an xPC TargetBox using a DOS shell and FTP you can use MATLAB After you build a stand along application you can transfer the application and utility files xpcboot com autoexec bat to an xPC TargetBox Boot the xPC TargetBox with the FTP server See Booting xPC TargetBox with FTP Server on page 5 15 The system boots the FTP server In the MATLAB Command Window type xpcsetup The xPC Target Setup dialog box opens Enter information for a network connection See Network Communication on page 3 6 For example if your application is xpcosc rtb type xpctgboxdl xpcosc An FTP connection is established between the host PC and the xPC TargetBox The application and the required bat file autoexec bat are downloaded to the directory c work If the download was successful MATLAB displays a confirming message Otherwise MATLAB displays an error message 5 19 5 Using xPC TargetBox 5 20 Booting xPC TargetBox to DOS When you first receive your xPC TargetBox the system boots the xPC Target kernel and runs a self test If you want your system to boot into DOS you need to edit the file autoexec bat 1 On the xPC TargetBox press the Reset button 2 You need to cancel the DOS LED test and loading the xPC Target kernel
23. the target application running on the xPC TargetBox e Connecting the External Floppy Disk Drive Connect the external floppy drive and copy files from the host PC to the xPC TargetBox Removing Test Dongles After successfully running the self test you can remove the test dongles from the xPC TargetBox 1 Unplug the AC power cord 2 Press the two latches on the sides of each dongle at the same time and remove the dongle from the connector 2 15 2 initial Loop Back Test 2 16 3 Store the test dongles you removed in the lower compartment of the shipping case for later use If you encounter a problem with an I O option in the future you will need these test dongles to narrow down the problem Connecting Additional Peripherals When using Boot Floppy and DOSLoader mode the xPC TargetBox is connected to a host PC From this host PC you can control and interact with the target application running on the xPC TargetBox However when using StandAlone mode there is no connection to the host PC In this case interaction is only by using a mouse and keyboard connected to the xPC TargetBox 1 Use a mouse with a PS 2 connection and attach to the back panel of your xPC TargetBox 2 USea keyboard with a PS 2 connection and attach to the back panel of your xPC TargetBox xPC TargetBox Installation for Regular Use With a mouse and keyboard attached to your xPC TargetBox you can use the target command line interfac
24. the test dongle are connected together to allow for loop back testing of this board Header J3 Dongle connect pins 4 46 and 8 44 xPC TargetBox IO 303 Pin Layout IO 303 The following figure is the pin layout for the IO 303 option connector This is the J3 connector in the manufacturer s data sheet at http www diamondsystems com files binaries RMM416v11 pdf The terminals on the screw terminal boards are numbered sequentially while the pin numbers on the connectors are numbered alternately left and right However the numbers printed on each screw terminal board correspond directly to the pin numbers provided in the figure below Agnd Agnd Agnd Agnd NC NC NC Agnd 15V Dgnd Digital I O DIO Port A DIO DIO DIO Digital I O DIO Port C DIO DIO DIO Digital I O DIO Port B DIO DIO DIO A7 A5 A3 A1 C7 C C3 ef B7 B5 B3 Bl 5V Vout Vout Vout Vout NC NC NC NC NC 15V Agnd Ext DIO DIO 0 Analog output Trig a6 N Digital I O A4 Port A DIO A2 DIO DIO DIO DIO DIO DIO DIO DIO DIO AO C6 Digital I O C4 Port C C2 CO B6 Digital I O B4 Port B B2 BO Dgnd 4 wc TargetBox I O Options Testing Model IO 303 A constant value is written to the A D driver block and then read from the digital input driver block The values are compared with an error defined in a second constant block and the results sent to an Outport block 1
25. to 75 C models 206 and 207 or from 40 C to 65 C model 208 Internal power supply Onboard power supply with DC power input for voltages between 8 and 28 volts External AC adapter The external AC power adapter supplied with the xPC TargetBox allows worldwide AC operation with an input of 110 to 230 volts 50 Hz to 60 Hz xPC TargetBox has capabilities that allow you to use it in a stand alone mode of operation Since the unit is powered by a DC voltage you can power it with a number of battery types that range from 8 to 28 volts DC External floppy disk drive An external floppy disk drive is provided and can be connected to the xPC TargetBox using a standard 25 pin shielded cable additional 25 pin port on the back panel The external floppy disk drive does not need additional power Instead the xPC TargetBox provides power to the disk drive With this configuration you can use the external floppy disk drive to Boot the xPC Target kernel from a boot floppy disk using the standard setup for xPC Target When using the xPC TargetBox for mobile applications you can load the kernel application onto the flash disk and then remove the external disk drive e Restore files to flash memory and recover from a system failure 1 3 1 Introduction 1 4 Software The xPC TargetBox is shipped with the following software on the flash disk FreeDOS The xPC TargetBox uses FreeDOS to transfer stand alone kernel tar
26. xPC Target Getting Started documentation Installing xPC Target Embedded Option If you have an xPC Target Embedded Option license you can use the features of the embedded option to Boot the kernel from the FlashRAM module e Create stand alone applications and deploy then on an xPC TargetBox For information on installing software on the host computer see the section Installation on the Host PC in the xPC Target Getting Started documentation Serial Communication Serial Communication Before you can create and run a target application you need to set up the connection between your host PC and xPC TargetBox You can use either serial or network communication This section includes the following topics e Hardware for Serial Communication Connect a null modem cable e Environment Properties for Serial Communication Select the host PC COM port and baud rate Hardware for Serial Communication Before you install the xPC Target software and configure it for serial communication you must install the following hardware Null modem cable Connect the host and target computers with the null modem cable supplied by The MathWorks with the xPC Target software You can use either the COM1 or COM2 port Environment Properties for Serial Communication The xPC Target environment is defined by a group of properties These properties give xPC Target information about the software and hardware products that it works wi
27. xPC TargetBox 1 You can find the screw terminal boards in the shipping case at the front of the top compartment COCGEETIECR CEE ECIE COECECILECEC CIE 2 You can find the I O cables in the lower compartment of the shipping case 3 Plug one end of the I O cable into an I O connector Press both latches at the plug at the same time and insert the plug Check that the plug is properly connected to the I O connector 4 Connect the screw terminal board to the other side of the I O cable in the same way Make sure that the screw terminal does not have any wires connected to it and especially make sure that no physical connections exist between the screw terminal board and the hardware under test which could possibly be powered up and therefore immediately damage I O options or the xPC TargetBox Connecting Hardware to the xPC TargetBox It is good practice to do some loop back testing of an I O option before connecting it to your real hardware under test See Chapter 4 xPC TargetBox T O Options The pin layout for each I O option is provided in tables found in Chapter 4 xPC TargetBox I O Options 2 27 2 initial Loop Back Test 2 28 Installation and Configuration The software environment for xPC Target uses two separate computers Because of this added complexity installation and configuration are more involved This chapter includes the following sections xPC Target Installation p
28. 27 7202 3 DFARS Part 252 227 7013 and DFARS Part 252 227 7014 The terms and conditions of The MathWorks Inc Software License Agreement shall pertain to the government s use and disclosure of the Program and Documentation and shall supersede any conflicting contractual terms or conditions If this license fails to meet the government s minimum needs or is inconsistent in any respect with federal procurement law the government agrees to return the Program and Documentation unused to MathWorks MATLAB Simulink Stateflow Handle Graphics and Real Time Workshop are registered trademarks and TargetBox is a trademark of The MathWorks Inc Other product or brand names are trademarks or registered trademarks of their respective holders Printing History November 2002 First printing New for Version 2 Release 13 Contents Preface What Is xPC TargetBox 0 0 0 0 viii Quick Start Guide for xPC TargetBox 05 ix Using This Guide 20 xi Expected Background 0 cece eee eens xi Organization serao i Senshi hehe aa ae ee E xii MPL Warranty For xPC TargetBox xiii Repairing an xPC TargetBox Under Warranty xiii Limited Warranty from MPL 0 0000s xiv Contacting The MathWorks for Technical Support xvi xPC TargetBox Certification 0 0 0 c eee eee xvi Introduction Features of xPC TargetBox
29. 3 2 Serial Communication p 3 3 Network Communication p 3 6 Target Boot Disk p 3 10 Testing xPC Target Installation p 3 13 Install the xPC Target and xPC Target Embedded Option software Select RS 232 communication for an easy and inexpensive installation Select TCP IP communication for faster data transfer rates and longer connections Boot the xPC Target kernel on the xPC TargetBox and establish a connection with the host PC Test connections and communication between the host PC and xPC TargetBox Build download and run a simple target application 3 Installation and Configuration 3 2 xPC Target Installation Before you can build and download a target application from the host PC to the xPC TargetBox you need to properly install any MathWorks software This section includes the following topics e Installing xPC Target Install MATLAB Simulink Stateflow and Stateflow Coder optional Real Time Workshop xPC Target and a third party C C compiler on the host PC e Installing xPC Target Embedded Option Install xPC Target Embedded Option on the host PC Installing xPC Target You need to have an xPC Target license for each xPC TargetBox you purchase The xPC Target software is installed entirely on the host PC Installing software on the xPC TargetBox is not necessary For information on installing software on the host computer see the section Installation on the Host PC in the
30. 305 1 14 IO option 305 1 14 CPU xPC TargetBox 1 9 creating application with DOSLoader mode 5 7 application with StandAlone mode 5 10 loop back test model 4 5 target boot disk 3 12 D digital I O T O option 301 1 12 I O option 302 1 13 I O option 304 1 13 I 1 Index IT 2 directories and files on flash disk 5 14 dongles T O option 301 wiring 4 8 I O option 302 wiring 4 13 I O option 303 wiring 4 16 I O option 304 wiring 4 19 I O option 305 wiring 4 22 I O option 306 wiring 4 25 I O option 308 wiring 4 29 removing 2 15 DOS booting instead of kernel 5 7 on host PC with FTP 5 17 DOSLoader mode copying kernel 5 6 creating target application 5 7 feature 1 5 driver support I O options library 5 2 introduction to I O options 1 6 LED 5 3 watchdog 5 4 E Embedded option DOSLoader mode 1 5 StandAlone mode 1 5 encoders I O option 306 1 14 environment network communication 3 6 serial communication 3 3 environment properties and StandAlone mode 5 9 network communication 3 6 serial communication 3 3 external connectors system hardware 1 9 with I O options 1 6 external floppy disk drive connecting 2 18 xPC TargetBox 1 9 F files copying with FTP server 5 19 on flash disk 5 14 flash disk directories 5 14 nonvolatile memory 1 10 floppy disk drive connecting 2 18 FreeDOS booting 5 7 copying kernel 5 6 copying kernel application 5 10 included with xPC TargetBox 1 4 FTP server booting 5 15 commands 5
31. BootFloppy SA Update Revert BootDisk Close 3 Installation and Configuration 3 8 The xPC Target Setup window has two sections xPC Target xPC Target Embedded Option The xPC Target Embedded Option gives you the additional TargetBoot choices of DOSLoader and StandAlone mode From the CCompiler list select either VisualC or Watcom In the CompilerPath box enter the path to where you installed your C C compiler From the HostTargetComm list select TCP IP The TCP IP text boxes become active You must enter the following properties with the correct values according to your LAN environment Ask your LAN system administrator for values for the following settings TcepIpTargetAddress This is the IP address for your xPC TargetBox An example of an IP address is 192 168 0 1 TcepIpSubNetMask This is the Subnet Mask address of your LAN An example of a Subnet Mask address is 255 255 0 0 You enter the following properties depending on your specific circumstances TepIpTargetPort 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 of relevance on the xPC TargetBox If necessary this property value can be changed to any value higher than 20000 and less than 65536 TcepIpGateway This property is set by default to 255 255 255 255 This means that you do not use a
32. Box IO 305 10 0 ce ees 4 22 Wiring for IO 305 Test Dongle 0 0 00 eee eee 4 22 Pin Layout 1O 305 2 62 toed Oh oe eee 4 23 Testing Model IO 805 0 0 ens 4 24 xPC TargetBox IO 306 01 ns 4 25 Wiring for IO 306 Test Dongle 00 0000 eee 4 25 Pin Layout IO 306 1 of 2 Connectors 4 4 26 Pin Layout IO 306 2 of 2 Connectors 24 4 27 Testing Model IO 306 0 0 0 ccc eens 4 28 xPC TargetBox IO 308 0 0 es 4 29 Wiring for IO 308 Test Dongle 0 0 00 eee eee 4 29 Pin Layout IO 808 2 0 eens 4 29 Testing Model IO 808 0 0 ccc cece nes 4 30 Using xPC TargetBox xPC TargetBox Library 0 0 0 0 c eee 5 2 Drivers in the xPC TargetBox Library 5 2 Using the Panel LEDs 0 00 e cee eens 5 3 Using the Watchdog Timer 0 0 0 cece eee eee 5 4 DOSLoader Mode 0 0 5 5 Updating Environment Properties and Creating a Boot Disk 5 5 Copying the Kernel to Flash Memory 0045 5 6 iv Contents Creating a Target Application 0 0 00 eee neces 5 7 Booting DOS Instead of the xPC Target Kernel 5 7 StandAlone Mode 0 c cece eens 5 9 Updating Environment Properties 0000 0c eee 5 9 Creating a Kernel Target Application 5 10 Copying the Kernel Target Application to Flash Memory 5 10 Booting
33. CP IP Ethernet Test 1 Ping target system using standard ping OK Test 2 Ping target system using xpctargetping OK 3 16 Testing xPC Target Installation Test 3 Reboot target using direct call OK Test 4 Build and download xPC Target application OK Test 5 Check host target communication for commands OK Test 6 Download xPC Target application using OOP OK Test 7 Execute xPC Target application for 0 2s OK Test 8 Upload logged data and compare with simulation OK Test Suite successfully finished If any of the tests fails see the appropriate test section Test 1 Ping Target System Standard Ping on page 3 17 Test 2 Ping Target System xPC Target Ping on page 3 19 Test 3 Reboot Target Using Direct Call on page 3 19 Test 4 Build and Download Application on page 3 20 If all of the subtests are successful the host computer and xPC TargetBox are properly set up for regular use Your next steps are to Connect the xPC TargetBox to the hardware you are testing through the I O connector ports See Connecting Hardware to the xPC TargetBox on page 2 20 e Build and download a target application to the xPC TargetBox See Chapter 3 Basic Tutorial in the xPC Target Getting Started documentation Test 1 Ping Target System Standard Ping If you are using a network connection this is a standard system ping to your target c
34. DOS Instead of the xPC Target Kernel 5 12 FTP File Transfer 0 00 c cece eens 5 13 Directories and Files on the xPC TargetBox 5 14 Booting xPC TargetBox with FTP Server 5 15 Using FTP Commands 0 00 cece eects 5 16 Copying Files with DOS and FTP 0 0005 5 17 Copying Files with MATLAB and FTP 5 19 Booting xPC TargetBox to DOS 0 0 0 0 e eee 5 20 Index vi Contents Preface xPC TargetBox is a hardware product you use with xPC Target software to build test validate and deploy real time systems This chapter includes the following sections What Is xPC TargetBox p viii A PC compatible target computer with optional I O options Quick Start Guide for xPC TargetBox Process for getting your xPC TargetBox up and running p ix quickly Using This Guide p xi Suggestions for learning how to use xPC TargetBox and a description of the chapters in this guide MPL Warranty For xPC TargetBox One year warranty from the manufacturer p xiii Preface What Is xPC TargetBox Viii xPC Target is a solution for prototyping testing and deploying real time systems using standard PC hardware It is an environment that uses a target PC separate from a host PC for running real time applications xPC TargetBox is an industrial target PC optimized for executing real time code generated with xPC Target Real
35. HAA The next step is to connect the xPC TargetBox to a host computer using either a serial or network connection See Serial Communication on page 3 3 or Network Communication on page 3 6 2 19 2 initial Loop Back Test Connecting Hardware to the xPC TargetBox Every practical xPC Target and xPC TargetBox application consists of several physical connections to your hardware under test plant for rapid control prototyping or controller for hardware in the loop simulation These connections are between the xPC TargetBox I O options I O boards and the hardware under test This section describes how to make these connections e Introduction Determine the electrical and mechanical limitations of your hardware and xPC TargetBox I O options before making any connections e Configuration Label for I O Options Identify all I O options and associated I O connectors e Planning I O Hardware Connections Read hardware manuals and draw a diagram of the connections e Connecting Hardware to Screw Terminal Boards Attach cables between the xPC TargetBox and screw terminal boards Introduction Your xPC TargetBox is shipped with external cables and screw terminal boards You use these boards to connect your equipment to the I O boards in your system The label on the bottom of the xPC TargetBox indicates the I O options in the system and the connector ports these options are connected to Caution You have to
36. In the MATLAB Command Window type 10303 The Simulink model for testing the IO 303 option opens Jio303 RUBYMM1612DI10 Eoix Fie Edit View Simulation Format Tools Help 2 Ruby MM 416 Ruby MM 416 3 Diamond Diamond Constanti 4 Analog Output Digital Input 5 Logical Operator Relational Operator Relational Operatori 1 4 18 xPC TargetBox IO 304 xPC TargetBox IO 304 The Diamond Onyx MM board has 48 digital I O lines They can be programmed for input or output in groups of 8 lines This section includes the following topics e Wiring for IO 304 Test Dongle e Pin Layout IO 304 Both Connectors e Testing Model IO 304 Note xPC TargetBox does not support the counter timers and external interrupts on this board Wiring for IO 304 Test Dongle xPC TargetBox communicates with this board using two connectors Some of the pins in the test dongles are connected together to allow for loop back testing of this board e Header J3 Dongle connect pins 23 39 and 31 47 e Header J4 Dongle connect pins 23 39 and 31 47 4 c TargetBox I O Options Pin Layout IO 304 Both Connectors The following figure is the pin layout for both of the IO 304 option connectors These are the J3 and J4 connectors in the manufacturer s data sheet at http www diamondsystems com files binaries OMMv14 pdf The terminals on the screw terminal boards are numbered sequentially while the pin numbers on
37. Pin Layout and Screw Terminal Boards 4 4 2 Making Your Own Terminal Boards 0065 4 2 Loop Back Testing of I O Options 4 3 Loop Back Testing Process 00 e cece eee ees 4 3 Determining the Success of a Loop Back Test 4 4 Uses for Loop Back Testing 0 0 0 0 cece cece eens 4 4 Creating a Simulink Model for Loop Back Testing 4 5 Running the Target Application for Specific I O Option Testing 4 6 xPC TargetBox IO 301 0 cc ene 4 8 Wiring for IO 301 Test Dongles 0 0000 e eee 4 8 Pin Numbering for Connectors and Screw Terminal Boards 4 8 Pin Layout IO 301 1 of 2 Connectors 4 9 Pin Layout IO 301 2 of 2 connectors 240 4 10 Testing Model IO 801 0 0 0c cc nes 4 11 xPC TargetBox IO 302 00 ns 4 13 Wiring for IO 302 Test Dongle 0 0 00 eee 4 13 Pin Layout IO 302 araea eens 4 14 Testing Model IO 802 0 0 0 annuae cee 4 15 iii xPC TargetBox IO 303 0 es 4 16 Wiring for IO 303 Test Dongle 0 00 2 ceca 4 16 Pin Layout IO 3038 oar kena nea eens 4 17 Testing Model IO 808 0 0 ccc ens 4 18 xPC TargetBox IO 304 01 nes 4 19 Wiring for IO 304 Test Dongle 00 0000 ee 4 19 Pin Layout IO 304 Both Connectors 000 4 20 Testing Model IO 304 0 0 ccc eens 4 21 xPC Target
38. Press the Ctrl C keys repeatedly until you see the message Terminate batch file C AUTOEXEC BAT Yes No A11 3 Type Y The system boots into the self test directory c tests 4 Copy the autoexec file configured for booting into DOC Type copy c autoexec dos c autoexec bat 5 On the xPC TargetBox press the Reset button The screen displays Loading FreeDOS C gt A analog input I O option 301 1 12 analog output T O option 301 1 12 I O option 302 1 13 T O option 303 1 13 application downloading loop back test 3 20 with DOSLoader mode 5 7 with StandAlone mode 5 10 B BIOS QuickBOOT capability 1 4 BootFloppy mode 1 5 booting DOS instead of application 5 20 DOS instead of kernel 5 12 FTP server 5 15 C C compiler setup dialog box 3 3 CAN controller T O option 308 1 14 onboard 1 6 commands FTP server 5 16 communication network 1 5 serial 1 5 standard PC peripherals 1 5 with host PC 1 5 xPC TargetBox connectors 1 9 configuration label I O options 2 21 connecting external floppy disk drive 2 18 peripherals 2 16 screw terminal boards 2 26 connectors pin layout I O option 301 analog 4 9 pin layout I O option 301 digital 4 10 pin layout I O option 302 4 14 pin layout I O option 303 4 17 pin layout I O option 304 4 20 pin layout I O option 305 4 23 pin layout I O option 306 4 26 pin layout I O option 308 4 29 xPC TargetBox 4 2 contacting The MathWorks for technical support 3 20 counters I O option
39. SE TERMS AND CONDITIONS OR ARISING UNDER CONTRACT TORT INCLUDING NEGLIGENCE STRICT LIABILITY WARRANTY OR ANY OTHER THEORY OF LIABILITY OR ANY LIABILITY CLAIM OF ANY THIRD PARTY EVEN IF MATHWORKS OR MPL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES FOR ANY BREACH OF THESE TERMS AND CONDITIONS MATHWORKS AND MPL S MAXIMUM LIABILITY SHALL NOT IN ANY EVENT EXCEED THE TOTAL PRICE OF THE PRODUCTS ORDERED BY CUSTOMER NEITHER MATHWORKS NOR MPL SHALL BE LIABLE IF IT IS UNABLE TO PERFORM ANY OF ITS OBLIGATIONS CONTAINED IN THESE TERMS AND CONDITIONS DUE TO ANY INDUSTRIAL DISPUTE WAR FLOOD EXPLOSION ACT OF GOD OR ANY OTHER EVENT BEYOND THE REASONABLE CONTROL OF MATHWORKS OR MPL XV Preface xvi Contacting The MathWorks for Technical Support If you are having a problem with your xPC TargetBox that you cannot solve contact The MathWorks directly for help Internet http www mathworks com support E mail mailto support mathworks com Telephone 508 647 7000 Ask for Technical Support xPC TargetBox Certification The xPC TargetBox has received the following certifications e FCC Part 15 Class A Emissions Testing US e EN 55022 Europe e VCCI Japan e ICES 033 Canada e AS NZS 3548 Australia New Zealand Introduction This chapter is an overview of the functions and features of xPC TargetBox An introduction to these features and the xPC Target software environment will help you develop a model f
40. Terminal Boards The screw terminals on the screw terminal boards are numbered sequentially but the pin numbers on the connectors are numbered alternately left and right However the numbers printed on each screw terminal board correspond directly to the pin numbers provided in the figure below xPC TargetBox IO 301 Pin Layout IO 301 1 of 2 Connectors The following figure is the pin layout for the IO 301 option connector This is the J3 connector in the manufacturer s data sheet at http www diamondsystems com files binaries DMM32v2 61 pdf The terminals on the screw terminal boards are numbered sequentially while the pin numbers on the connectors are numbered alternately left and right However the numbers printed on each screw terminal board correspond directly to the pin numbers provided in the figure below Analog input Analog output Vin 0 O Vin 1 1 Vin 2 2 Vin 3 3 Vin 4 44 Vin 5 5 Vin 6 6 Vin 7 7 Vin 8 8 Vin 9 9 Vin 10 10 Van El a ee Vin 12 12 Vin 13 13 Vin 14 14 Vin 15 15 Vout 3 L Vout 1 Vref Out A D Convert Dout 1 Extclk Din 3 Gate 0 Din 1 5V Agnd Vin 16 0 Analog Vin 17 1 input Vin 18 2 Vin 19 3 Vin 20 4 Vint21 5 Vin 22 6 Vin 23 J Vin 24 8 Vin 25 9 Vin 26 10 Vine 27 Ti Vin 28 12 Vin 29 13 Vin 30 14 Vin 31 15 Vout 2 Analog Vout 0 J output Clr2 Out
41. The MathWorks will also inform MPL of your problem 2 Using the shipping instructions provided by The MathWorks package and return your xPC TargetBox to MPL For information on correct packaging refer to Unpacking the Shipping Box on page 2 2 3 MPL will repair your xPC TargetBox and return it to you within the shortest possible time xiii Preface xiv Limited Warranty from MPL WARRANTY MPL WARRANTS THAT THE PRODUCTS DELIVERED HEREUNDER SHALL BE FREE FROM DEFECTS IN WORKMANSHIP AND MATERIAL FOR A PERIOD OF TWELVE 12 MONTHS FROM DATE OF DELIVERY TO THE BUYER INCLUDING COMPONENT PARTS OF PRODUCTS SOLD AS SPARE REPLACEMENT MAINTENANCE OR STORAGE PARTS WHICH ARE ALSO WARRANTED FOR TWELVE 12 MONTHS FROM DATE OF DELIVERY PROVIDED HOWEVER IN EITHER CASE THAT NOTICE OF ANY SUCH DEFECT IS PROVIDED TO MATHWORKS OR MPL WITHIN THIRTY 30 DAYS OF ITS DISCOVERY BY THE BUYER NEITHER MATHWORKS NOR MPL MAKE ANY OTHER WARRANTY OF ANY KIND TO BUYER AND HEREBY EXPRESSLY DISCLAIMS ANY SUCH OTHER WARRANTY WHETHER EXPRESS OR IMPLIED IN FACT OR BY LAW INCLUDING WITHOUT LIMITATION ANY WARRANTY OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE NON INFRINGEMENT OR WARRANTY OF ANY KIND INCORPORATED OR REFERENCED IN BUYER S SPECIFICATIONS OR PURCHASE ORDER OR ANY OTHER WARRANTY ARISING BY STATUTE OR OTHERWISE IN LAW OR FROM A COURSE OF DEALINGS OR USE OF TRADE ALL OF WHICH ARE HEREBY DISCLAIMED EXCLUSIVE REMEDY IN ANY
42. Time Workshop and a C C compiler With additional I O options you can connect to a hardware environment using analog input A D analog output D A digital I O counter timers interrupts and connecting to a CAN field bus This product allows e Rapid prototyping Prototype a controller running on an xPC TargetBox and validate your design without the need for custom target hardware e Hardware in the loop simulation Test a real controller with a simulated plant running on an xPC TargetBox e Limited deployment Using the stand alone mode connect an xPC TargetBox to your plant and run the controller software On a host PC using xPC Target Real Time Workshop and a C C compiler you can generate executable code from your Simulink and Stateflow models With the xPC Target Embedded Option you can use an external floppy disk drive or network connection to Boot from flash disk Transfer the xPC Target kernel to a flash disk boot the xPC TargetBox with the kernel and then from the host PC download and run a real time application e Run stand alone applications Transfer the xPC Target kernel and a stand alone application to a flash disk disconnect the host PC and then boot and run the real time application These key features and more make the xPC TargetBox the ideal solution for applications requiring strong processing capability low power consumption flexibility small size wide range of temperatures and
43. User s Guide Version 2 xPC TargetBox For Use with Real Time Workshop Modeling Simulation Implementation The MathWorks X C o How to Contact The MathWorks www mathworks com comp soft sys matlab support mathworks com suggest mathworks com bugs mathworks com doc mathworks com service mathworks com info mathworks com 508 647 7000 508 647 7001 The MathWorks Inc Web Newsgroup Technical support Product enhancement suggestions Bug reports Documentation error reports Order status license renewals passcodes Sales pricing and general information Phone Fax Mail 3 Apple Hill Drive Natick MA 01760 2098 For contact information about worldwide offices see the MathWorks Web site Getting Started with xPC TargetBox COPYRIGHT 2002 by The MathWorks Inc The software described in this document is furnished under a license agreement The software may be used or copied only under the terms of the license agreement No part of this manual may be photocopied or repro duced in any form without prior written consent from The MathWorks Inc FEDERAL ACQUISITION This provision applies to all acquisitions of the Program and Documentation by or for the federal government of the United States By accepting delivery of the Program the government hereby agrees that this software qualifies as commercial computer software within the meaning of FAR Part 12 212 DFARS Part 227 7202 1 DFARS Part 2
44. You can then run the self test program again to see the results using scope displays See Running the Self Test with a Monitor on page 2 9 ix Preface 6 Set up xPC TargetBox for use with xPC Target See xPC TargetBox Installation for Regular Use on page 2 15 See xPC Target Installation on page 3 2 See Serial Communication on page 3 3 or Network Communication on page 3 6 7 Create an xPC Target boot disk for BootFloppy mode See Target Boot Disk on page 3 10 8 Boot the xPC TargetBox and test the connections to the host PC See Testing xPC Target Installation on page 3 13 Using This Guide Using This Guide To help you read and use this guide effectively this section provides a brief description of the chapters and a suggested reading path This section includes the following topics e Expected Background Proficiency with using MATLAB and Simulink and familiarity with Real Time Workshop e Organization Table with a list of chapters in the xPC TargetBox Getting Started documentation Expected Background Users who read this book should be familiar with e Using Simulink and Stateflow to create models as block diagrams and simulating those models in Simulink e The concepts and use of Real Time Workshop to generate executable code When using Real Time Workshop and xPC Target you do not need to program in C or other programming languages to create test
45. a target boot disk See Target Boot Disk following 3 9 3 Installation and Configuration 3 10 Target Boot Disk The target boot disk includes the xPC Target kernel specific for either serial or network communication If you select StandAlone mode the target boot disk also includes the target application This section includes the following topics e Creating a Target Boot Disk with a Graphical User Interface Use the xpcsetup command to open a dialog box and create a boot disk e Creating a Target Boot Disk with Command Line Interface Use the xpcbootdisk command to create a boot disk from the MATLAB Command Window Creating a Target Boot Disk with a Graphical User Interface You use the target boot disk to load and run the xPC Target kernel After you make changes to the xPC Target environment properties you need to create or update a target boot disk To create a target boot disk for the current xPC Target environment use the following procedure Alternatively see Creating a Target Boot Disk with Command Line Interface on page 3 12 1 In the MATLAB Command Window type xpcsetup The xPC Target Setup window opens 2 Click the BootDisk button If you didn t update the current settings the following message box opens Environment not updated x xPC Target environment has not been updated with the current settings Do you want to create a Boot Floppy Disk Yes No Target Boot Disk
46. and deploy real time systems If you are a new xPC Target user Read Getting Started with xPC TargetBox and Getting Started with xPC Target Begin in this manual with Chapter 1 Introduction and then read Chapter 1 Introduction in the xPC Target Getting Started documentation These chapters will give you an overview of the xPC TargetBox features and xPC Target environment Next read and complete the installation and testing tasks in Chapter 3 Installation and Configuration If you are an experienced xPC Target user Read and complete the installation and testing tasks in Chapter 3 Installation and Configuration xi Preface xii Chapter 1 Introduction Chapter 2 Initial Loop Back Test Chapter 3 Installation and Configuration Chapter 4 xPC TargetBox T O Options Chapter 5 Using xPC TargetBox Organization The following table lists the organization of the xPC TargetBox Getting Started documentation Chapter Description Preface List of required products and organization of this book Overview of the functions and features of xPC TargetBox Installing and testing the xPC TargetBox Connecting the xPC TargetBox to a host computer and configuring the host computer for communication Reference information for the xPC TargetBox I O options and a description of the loop back testing procedures Using the DOSLoader and StandAlone modes w
47. ary This is the mode you need to transfer target applications to the xPC TargetBox Set a new default directory on the xPC TargetBox Show directories and files in the xPC TargetBox default directory Show current xPC TargetBox directory name Get a file from the xPC TargetBox and send it to the host PC Send a file from the host PC to the xPC TargetBox For stand alone applications you need to transfer the files xpcboot com autoexec bat and lt application_name gt rtb Exit the FTP server on the host computer If you need more information about the File Transfer Protocol you can find a wealth of information on the internet One Web site is http archive ncsa uiuc edu SDG Software PCTelnet 5 16 FTP File Transfer Copying Files with DOS and FTP You do not need a floppy disk drive attached to an xPC TargetBox to copy stand alone applications from the host PC Instead you can connect your xPC TargetBox to a network and use FTP to transfer files to the flash disk After you create a xPC Target stand alone application you can copy the files to the xPC TargetBox flash disk To create the needed stand alone files see StandAlone Mode on page 5 9 Boot the xPC TargetBox with the FTP server See Booting xPC TargetBox with FTP Server on page 5 15 On the host computer open a DOS shell Start the FTP server with the IP address for your box For example type ftp 192 168 0 1 The host PC displays
48. ation On the host PC create a stand alone application e Copying the Kernel Target Application to Flash Memory Copy the combined xPC Target kernel and target application to the flash disk on an xPC TargetBox e Booting DOS Instead of the xPC Target Kernel Boot an xPC TargetBox into DOS instead of starting the target application Note To use StandAlone mode you need the xPC Target Embedded Option Updating Environment Properties xPC Target uses the environment properties to determine what files to create for the various target boot modes This procedure assumes you have serial or network communication working correctly between your host computer and the xPC TargetBox with TargetBoot in the Setup dialog box set to BootFloppy 1 On the host computer start MATLAB 2 In the MATLAB Command Window type xpcsetup The xPC Target Setup window opens 3 From the TargetBoot list choose StandAlone 5 9 5 Using xPC TargetBox 5 10 4 Click Update xPC Target updates the environment properties and the build process is ready to create a stand alone kernel target application Note For StandAlone mode you do not create an xPC Target boot disk Instead you copy files created from the build process onto a formatted floppy disk Creating a Kernel Target Application Using the xPC Target Embedded Option create a boot disk with the xPC Target kernel and target application 1 Inthe MATLAB Command Window ty
49. ck Test Observe a scope on the xPC TargetBox monitor that displays the results from a loop back test Uses for Loop Back Testing Test your xPC TargetBox when you first unpack the box during use and to learn about an I O option e Creating a Simulink Model for Loop Back Testing Recreate the Simulink model to test all or some of the I O options in your xPC TargetBox e Running the Target Application for Specific I O Option Testing Create and run a target application to test I O options Loop Back Testing Process Loop back testing is a technique to make sure that the xPC TargetBox is working properly with a certain I O option or all I O options working together The technique consists of 1 A simple Simulink model with appropriate I O driver blocks and analysis blocks 2 A target application built from a Simulink model using Real Time Workshop xPC Target and a C C compiler 3 Running the target application on the xPC TargetBox where the corresponding I O option is exercised Signals generated at the outputs are looped back through physical connectors to the inputs of the same I O option 4 The analysis part of the target application compares the generated signal with the looped back signal Depending on the result of the comparison a scope displays success 1 or failure 0 4 3 4 c TargetBox I O Options 4 4 Determining the Success of a Loop Back Test A successful loop back test for an I O option ens
50. ckBoot capability Standard temperature from 0 C to 60 C System Requirements The following table lists available xPC TargetBox base systems with extended temperature ranges Extended Temperature Unit Description Product Name xPC TargetBox 206 266 MHz Pentium II 128 MB RAM 32 MB FlashRAM Extended temperature from 40 C to 75 C xPC TargetBox 207 400 MHz Pentium III 128 MB RAM 32 MB FlashRAM with QuickBoot capability Extended temperature from 40 C to 75 C xPC TargetBox 208 700 MHz Pentium III 128 MB RAM 32 MB FlashRAM with QuickBoot capability Extended temperature from 40 C to 65 C xPC TargetBox I O Options The following table lists the available I O options for the xPC TargetBox You can use up to three I O options in a single xPC TargetBox Each I O option includes an installed PC 104 board one or two internal cables connected to either the front or back panels one or two external SCSI II cables one or two screw terminal boards except for the CAN I O option one or two test dongles and I O board reference documentation 1 Introduction The label on the bottom of the xPC TargetBox indicates the I O boards in your system their base addresses and the ports they are connected to 1 O Board Product Description Name xPC TargetBox IO 301 Analog input A D 32 single ended 16 Diamond MM 32 AT differential or 16 single ended 8 differential 16 bit channels with a maximu
51. click Build Real Time Workshop xPC Target and a C C compiler build and download a target application to the xPC TargetBox If the build and download process was successful type tg The target application starts running Check the numerical values on the scopes Ifthe scopes show numerical values of 1 then the loop back test was successful and the problem with your application might lie somewhere else If one of the displayed values is 0 then either the board or the test dongle might be damaged In this case contact your MathWorks representative for help 4 7 4 c TargetBox I O Options xPC TargetBox IO 301 The Diamond MM 32 AT is an analog and digital board with 32 analog input A D channels 4 analog output D A channels and 24 digital I O lines This section includes the following topics e Wiring for IO 301 Test Dongles e Pin Layout IO 301 1 of 2 Connectors e Pin Layout IO 301 2 of 2 connectors e Testing Model IO 301 Note xPC TargetBox does not support the counters on this board Wiring for IO 301 Test Dongles xPC Target communicates with this board using two connectors Some of the pins in the test dongles are connected together to allow for loop back testing of this board e Analog Header J3 Dongle connect pins 3 38 7 37 11 35 15 36 and 2 4 8 12 16 e Digital Header J4 Dongle connect pins 12 20 and 16 24 Pin Numbering for Connectors and Screw
52. creen The sequence of LEDs turning on and off should follow the sequence described in Running the Self Test Without a Monitor on page 2 4 and you should see a display on the monitor for the first time The initial content you see on the screen depends on the model of your xPC TargetBox xPC TargetBox 106 206 The monitor shows the typical system BIOS boot messages Detecting RAM finding media devices floppy flash and displaying found PCI devices This takes about 10 seconds After this DOS is loaded from the internal flash disk and the stand alone xPC Target self test application which has been loaded on the flash disk begins xPC TargetBox 107 207 108 208 Because these boxes are equipped with a QuickBoot BIOS that boots in a very short time any output to the monitor VGA is suppressed The first message that you can see on the monitor is when FreeDOS is loaded After FreeDOS loads from the internal flash disk the stand alone xPC Target self test application which has been loaded on the flash disk begins Observe the monitor screen The monitor should show a simple graphical interface for the self test Confirm that the self test is running by observing in the upper left window that the running time is increasing A running self test is the first major sign that the xPC TargetBox is operating properly xPC TargetBox Installation for Lloop Back Testing xpethtst i TET 0 000168 at time 5468G60 124MB e
53. d twisted pair UTP cable to your local area network LAN On the front panel of the xPC TargetBox locate the 10 100 MB s Ethernet connector clearly marked Plug the target side of the Ethernet cable into the Ethernet plug of the xPC TargetBox You can also directly connect your computers Use a crossover UTP cable with RJ45 connectors 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 Network Communication After you have installed xPC Target you can set the specific environment properties for your host and target computers You must change these environment properties before you can build and download a target application 1 In the MATLAB Command Window type xpcsetup The xPC Target Setup window opens i i cx File xPC Target Version 20 RS232HostPort CCompiler visac x RS232Baudrate 115200 CompilerPath d vapplications micre TeplpTargetAddress 19216801 TargetRAMSizeMl Auto TeplpTargetPort zzz MaxModelSize fms xl ToplpSubNetMask 255 255 2550 SystemFontSize Small v TcplpGateway 192 168 0 1 CANLibrary Noes TeplpTargetDriver js z HostTargetComm rPe TcplpTargetBusType PCI v TargetScope Enabled v TcplpTargetSAMemPort fxs TargetMouse None hi TcplpTargetlSAIRQ bE xPC Target Embedded Option TargetBoot
54. d with the I O option number for example IO 301 and its port number For example IO 301 has two ports labeled IO 301 1 analog and IO 301 2 digital On the bottom panel of the xPC TargetBox check the xPC TargetBox configuration label This label lists the I O connector to connect the test dongle to Also write down the base address for the I O option I O board you want to exercise Warning Make sure that you connect the selected test dongles to the corresponding I O connectors otherwise you can damage an I O option or the entire xPC TargetBox when powering it up again Boot the xPC TargetBox so that the xPC Target kernel starts running using either Boot Floppy mode from a floppy disk DOSLoader mode from the flash disk Loop Back Testing of O Options From the MATLAB Command Window type xpctargetping This command checks for a proper connection between your xPC TargetBox and host PC and if successful responds with ans success Enter the command to create the I O option Simulink model For example if you want a model to exercise I O option 301 with the I O board base address 0x300 with the analog input jumper set for differential mode and the analog output jumper set to 10 volts type xpctgboxtest 10301 0x300 C21 The corresponding Simulink test model is created Save the Simulink model In the Simulink window and from the Tools menu point to Real Time Workshop and then
55. dusa com manuals DM dm5810 pdf The terminals on the screw terminal boards are numbered sequentially while the pin numbers on the connectors are numbered alternately left and right However the numbers printed on each screw terminal board correspond directly to the pin numbers provided in the figure below Encoder Inc Enc 3 IRQin Ext intl Overflow 3 Out Dgnd Inc Enc 3 ChB 5 6 Dgnd Inc Enc 3 ChA AES Dgnd D In P4 3 9 10 Dogna P4 2 Dgnd P4 1 Dgnd P4 0 Dgnd Encoder Inc Enc 2 IRQin Dgnd Overflow 3 Out Dgnd Inc Enc 3 ChB Dgnd Inc Enc 3 ChA Dgnd Din P2 3 Dgnd P22 Dgnd P2 1 Dgnd P2 0 Dgnd Encoder Inc Enc 1 IRQin Dgnd Overflow 3 Out Dgnd Inc Enc 3 ChB Dgnd Inc Enc 3 ChA Dgnd D In P0 3 Dgnd PO 2 Dgnd PO 1 Dgnd PO 0 Dgnd 5V Dgnd 4 26 xPC TargetBox IO 306 Pin Layout IO 306 2 of 2 Connectors The following figure is the pin layout for the IO 306 option connector This is the P3 connector on the manufacturer s data sheet http www rtdusa com manuals DM dm5810 pdf The terminals on the screw terminal boards are numbered sequentially while the pin numbers on the connectors are numbered alternately left and right However the numbers printed on each screw terminal board correspond directly to the pin numbers provided in the figure below NC Ext int2 NC Dgnd NC Dgnd NC Dgnd D In P5 3 Dgnd Ea Dgnd D In Out P5 1 Dgnd ee Dgnd NC Dgnd NC Dgnd NC Dgnd NC Dgnd D In P3 3 Dgnd
56. e Connections 000 2 25 Connecting Hardware to Screw Terminal Boards 2 26 Installation and Configuration 3 xPC Target Installation 00 0 0 0 3 2 Installing xPO Target 0 cece ene 3 2 Installing xPC Target Embedded Option 3 2 Serial Communication 0 0 0 0 e eens 3 3 Hardware for Serial Communication 3 3 Environment Properties for Serial Communication 3 3 Network Communication 0 000 eee eeee 3 6 Hardware for Network Communication 3 6 Environment Properties for Network Communication 3 6 Target Boot Disk 4 0363 o sleek ee 8 OB RA OES Os 3 10 Creating a Target Boot Disk with a Graphical User Interface 3 10 ii Contents Creating a Target Boot Disk with Command Line Interface 3 12 Testing xPC Target Installation 3 13 Powering Up the xPC TargetBox 20 000 cease 3 13 Testing the Installation 0 0 0 0 cece eee nes 3 16 Test 1 Ping Target System Standard Ping 3 17 Test 2 Ping Target System xPC Target Ping 3 19 Test 3 Reboot Target Using Direct Call 3 19 Test 4 Build and Download Application 3 20 If You Still Need More Help 0 0 0 0 cece eens 3 20 xPC TargetBox I O Options 4 Introduction to I O Options 0 00 00 ce eee 4 2
57. e to interact with target applications See Target PC Command Line Interface in Chapter 1 of the xPC Target Getting Started documentation E UHADHHHHAHHH HEIHE ia ta a Pe De eee ee bet NEA ff JJ Jn BPE Eyi Dia a ie ie ie ie ee ee a i fs bs bs bs fe fe J S 3 8 It att a 2 initial Loop Back Test 2 18 Connecting the External Floppy Disk Drive You use the external floppy disk drive to boot the xPC Target kernel and with DOSLoader and StandAlone modes copy the xPC Target kernel and target application to the flash disk With DOSLoader and StandAlone mode you can copy the files and then remove the disk drive 1 In the shipping case and from the upper layer remove the external floppy disk drive Check it visually for physical damage 2 From the compartment below the disk drive remove the external disk drive cable 3 Connect the correct end of the cable to the connector on the back end of the external floppy disk drive Tighten the security screws 4 On the back plate of the xPC TargetBox locate the external floppy disk drive connector This special 25 pin port connector is clearly marked Connect the other end of the external floppy disk drive cable to this connector and tighten the security screws xPC TargetBox Installation for Regular Use P PPPRP iad ed Sad afd Jd Jd al STDC ALATULALILILILILILD LI EM CARDEM A a 5 yy tan RIPPER fa js os ja iA A p pA p mG yayaya a3 B p3 p3 fe pa pa ee ey Te A
58. ee Dgnd D In Out P3 1 Dgnd b Dgnd NC Dgnd NC Dgnd NC Dgnd NC Dgnd D In P1 3 Dgnd bo Dgnd D In Out Pl 1 Dgnd exe Dgnd 5V 4 27 4 wc TargetBox I O Options Testing Model IO 306 1 In the MATLAB Command Window type 10306 The Simulink model for testing the IO 306 option opens Jio306 RTDEB14 majki Fie Edit View Simulation Format Tools Help 1 DMG814 DM6814 RTD RTD 4 Pulse 2 Digital Output Incremental Encoder Generator Logical Operator Pulse Generator Constant2 Triggered Subsystem 4 28 xPC TargetBox IO 308 xPC TargetBox IO 308 The Softing CAN AC2 104 board has two CAN channels This section includes the following topics e Wiring for IO 308 Test Dongle e Pin Layout IO 308 e Testing Model IO 308 Wiring for IO 308 Test Dongle xPC Target communicates with this board using two CAN serial connectors The test dongle is a CAN serial cable with termination resistors connected between the two CAN 9 pin connectors Note The IO 308 option is shipped with terminal resistors enabled When you connect this option to a CAN field bus you need to add terminal resistors to your cable Pin Layout IO 308 The following figure is the pin layout for both of the IO 308 option connectors The pin layout for the D Sub 9 connector is the same for both CAN channels The numbers printed on each screw terminal board correspond directly to the pin numbers provided in the figure below H
59. elope found in the upper compartment of the shipping case These additional labels are for your reference You can either use them for your documentation materials or attach them to your application setup at a convenient location MPL xPC TargetBox lt J The MathWorks Designed and manufactured exclusively by MPL AG for The MathWorks Inc Product xPC TargetBox 107 Serial Number 1004 Date of Test Aug 26 2002 CPU Class Intel Pentium III 400MHz Temp Range Standard 0 C to 60 C Rating 8 to 28VDC 3 15A max I O Options IO 306 port 2 0x280 IO 301 port 1 0x300 C21 1O 301 port 2 0x300 C21 10 305 0x340 1O 306 port 1 0x280 CAN Options CAN1 O 308 0x240 CAN2 0 308 0x240 CAN3 Standard built in CAN Certficatons FCC Part 15 Class A EN 55022 VCCI ICES 003 and AS NZS 3548 TargetBox is a trademark of The MathWorks Inc 2 21 2 initial Loop Back Test 2 22 Product Product name xPC TargetBox and model number 106 107 108 206 207 208 Serial Number Serial number with date of system test CPU class CPU name Pentium II Pentium III and speed 266 MHz 400 MHz 700 MHz Temp Range Standard 0 C to 60 C Extended models 206 and 207 40 C to 75 C or Extended model 208 40 C to 65 C Rating Always 8 to 28 VDC 3 15 A max T O Options Each line on the label corresponds to a connector on the xPC TargetBox I O 1 through I O 6 with the following f
60. ext step is to test the installation See Testing the Installation following 3 15 3 Installation and Configuration Testing the Installation xPC Target uses a test script to test the entire installation This test checks both the host computer xPC Target setup and the xPC TargetBox by building downloading and running a simple test Simulink model After you install the xPC Target software set the environment settings and create a target boot disk you can test your installation 1 Insert your target boot disk into the external disk drive 2 Press the Reset button on the xPC TargetBox After loading the BIOS xPC Target boots the kernel and displays the following screen on the target PC monitor 1MB free System Host Target Interface is RS232 COM1 2 System COM2 detected Baudrate 115266 3 In the MATLAB Current Directory window select a current directory outside the MATLAB root directory Note During the build process Real Time Workshop does not allow files to be saved within the MATLAB tree root If you select a current directory within the MATLAB tree the xPC Target test procedure will fail when trying to build a target application 4 In the MATLAB Command Window type xpctest MATLAB runs the test script and displays messages indicating the success or failure of a test If you use RS 232 communication the first test is skipped xPC Target Test Suite 2 0 Host Target interface is T
61. g a network connection and File Transfer Protocol FTP Another application for FTP transfer is when the xPC TargetBox is in a rugged environment where you do not want to use a mechanical disk drive In this case you can remove the floppy disk drive and attach a crossover Ethernet cable from an xPC TargetBox to a host PC This section includes the following topics e Directories and Files on the xPC TargetBox Description of the directories and files on the flash disk Booting xPC TargetBox with FTP Server Edit the file autoexec bat to boot the xPC TargetBox with the FTP server running e Using FTP Commands List of common FTP commands you enter from the host PC e Copying Files with DOS and FTP Use FTP to copy stand alone applications from a host PC to an xPC TargetBox Copying Files with MATLAB and FTP Use an xPC Target function from MATLAB to establish an FTP connection and copy stand alone applications from a host PC to an xPC TargetBox e Booting xPC TargetBox to DOS Edit the file autoexec bat to boot the xPC TargetBox into DOS 5 13 5 Using xPC TargetBox Directories and Files on the xPC TargetBox You need these files to run the FTP server with the network card in the xPC TargetBox Directory or Filename Description kernel sys FreeDOS command com FreeDOS autoexec bat autoexec tst autoexec dos autoexec ftp FDOS lt DIR gt FTP lt DIR gt INTEL lt DIR gt TESTS lt DIR gt
62. get application files to the flash disk and to boot the kernel for downloading target applications from a host PC xPC TargetBox does not include Microsoft Windows FTP server If you have a target application that is larger than 1 MByte xPC Target allows applications up to 16 MB you cannot use the external floppy disk drive to transfer stand alone applications to an xPC TargetBox Or if your application requires a rugged environment using a mechanical drive would not be suitable In these cases you can connect an xPC TargetBox to a LAN or directly to a host PC with an Ethernet crossover cable and use the FTP server on the flash disk to transfer files Quick booting the xPC TargetBox Normally the BIOS of an xPC TargetBox takes about 20 to 30 seconds to boot With the QuickBoot capability the BIOS boot time is reduced to about 2 seconds The QuickBoot capability provides a BIOS optimized for a particular system configuration The optimized BIOS QuickBoot binary is preinstalled in the xPC TargetBox EPROM Note The QuickBoot capability is available only with an xPC TargetBox using a Pentium III CPU xPC TargetBox models 107 108 207 and 208 Target application for system testing The flash disk in the xPC TargetBox contains an xPC Target stand alone application that self tests the hardware and all I O options installed in the xPC TargetBox One of your first tasks is to run this self test application and verify tha
63. gles that you attach to the external connectors in order to run a loop back test This chapter includes the following sections Introduction to I O Options p 4 2 Loop Back Testing of I O Options p 4 3 xPC TargetBox IO 301 p 4 8 xPC TargetBox IO 302 p 4 13 xPC TargetBox IO 303 p 4 16 xPC TargetBox IO 304 p 4 19 xPC TargetBox IO 305 p 4 22 xPC TargetBox IO 306 p 4 25 xPC TargetBox IO 308 p 4 29 Connect your hardware using screw terminal boards and cables included with xPC TargetBox Create your own Simulink models for testing individual T O options Diamond MM 32 AT is an analog input A D analog output D A and digital I O board Diamond Ruby MM 1612 is an analog output D A and digital I O board Diamond Ruby MM 416 is an analog output D A and digital I O board Diamond Onyx MM is a digital I O board Diamond Quartz MM 10 is a counter and digital I O board RealTime Devices DM6814 is an encoder digital I O and interrupt board Softing CAN AC2 104 is a CAN field bus board 4 c TargetBox I O Options Introduction to I O Options xPC TargetBox includes screw terminal boards and cables to connect the I O options to your hardware This section includes the following topics e Pin Layout and Screw Terminal Boards Pin numbers on a screw terminal board match the pin numbers on an xPC TargetBox connector e Making Your Own Terminal Boards Add application specific signal
64. hWorks representative for help If the self test fails USER 1 LED does not turn on then try to isolate the problem using a monitor connected to the xPC TargetBox See Running the Self Test with a Monitor on page 2 9 xPC TargetBox Installation for Loop Back Testing Running the Self Test with a Monitor A self test is preinstalled on the xPC TargetBox flash disk This test is a custom xPC Target application to exercise the I O options in your system Run this application to test your system initially and run this application any time you are not sure about the performance of your xPC TargetBox After you run the self test without a monitor you can try running the self test with a monitor 1 Set up the xPC TargetBox as described in Running the Self Test Without a Monitor on page 2 4 The AC power cord should be unplugged Find a monitor with a resolution of at least 640x480 pixels 16 colors and an SVGA 15 pin 3 rows connector Connect the VGA cable of the monitor to the VGA connector on the back panel of the xPC TargetBox Plug in the monitor power cable and turn on the monitor You are now ready to start the xPC TargetBox for self testing Because the xPC TargetBox does not have a power switch the system starts to operate as soon as you plug the AC power cord into a wall outlet 2 9 2 initial Loop Back Test 2 10 2 Plug in the AC power cord and observe the LEDs on the top of the box and the monitor s
65. he xPC TargetBox I O options LEDs and watchdog circuitry This section includes the following topics e Drivers in the xPC TargetBox Library Drivers from the xPC Target library are conveniently grouped into an xPC TargetBox library Using the Panel LEDs Control the two LEDs on the xPC TargetBox using driver blocks from the xPC TargetBox library Using the Watchdog Timer Perform a system reset when a programmable timeout occurs Drivers in the xPC TargetBox Library The drivers in the xPC TargetBox library are links to drivers from the various function groups in the xPC Target driver library Use these blocks in the same way as you would use the original driver blocks 1 In the MATLAB Command Window type xpctgboxlib The xPC TargetBox Library window opens Pubraryixectgbot o File Edit View Format Help xPC TargetBox Block Library e pB p e Reep Digital Digital Counter Incremental Watchdo Input Output Encoder Version 2 0 1 Copyright 1996 2002 The MathWorks Inc xPC TargetBox Library 2 Drag and drop a driver block into your Simulink model Except for the LED and Watchdog blocks the driver blocks in the xPC TargetBox library are aliases to drivers in the xPC Target library For information about a driver block e Click the Help button in the Block Parameters dialog box e For recently added drivers use the updated xPC Target I O Reference documentation on the xPC Target Product News page
66. http www mathworks com support author xpc index shtml Using the Panel LEDs Each xPC TargetBox has two LEDs that you can control These LEDs are labeled USER 1 and USER 2 on the xPC TargetBox From the xPC TargetBox library xpctgbox 1lib drag an LED block into your Simulink model You can have only one block of this type in any model Driver Block Parameters LED vector Enter numbers between 1 and 2 This driver allows the selection of individual LEDs in any order The number of elements defines the number of LEDs used For example to control the USER 1 and USER 2 LEDs enter 1 2 Reset vector Enter 0 or 1 for each LED This parameter controls the behavior at model termination A value of 1 causes the corresponding LED to be reset to the value specified in Initial value vector A value of 0 causes the corresponding LED to be left at the most recent value set while the model was running The Reset vector should either be a scalar value or the same length as the LED vector For scalar values the block performs a scalar expansion and assumes the same Reset vector value for each element in the vector Initial value vector Enter 0 or 1 for each LED This parameter specifies the initial value 0 or 1 to which the LED should be set between the time the model is downloaded and the time it is started The Initial vector value should be the same length as the LED vector If you do not have the same vector length the block perf
67. iamond Relational 3 Analog Output Operator Relational Operator Relational Operator Relational Operators Constant2 4 wc TargetBox I O Options Ji0301 dio RUBYMM1612DI0 File Edit View Simulation Format Tools Help Ruby MM 416 3 Diamond Diamond 4 Analog Output Digital Input 6 Logical Operator Relational Operator Relational Operatori Out2 Constant3 4 12 xPC TargetBox IO 302 xPC TargetBox IO 302 The Diamond Ruby MM 1612 is an analog and digital board with 16 analog output D A channels and 24 digital I O lines This section includes the following topics e Wiring for IO 302 Test Dongle e Pin Layout IO 302 e Testing Model IO 302 Note xPC TargetBox does not support the external trigger on this board Wiring for IO 302 Test Dongle xPC TargetBox communicates with this board using one connector Some of the pins in the test dongle are connected together to allow for loop back testing of this board Header J3 Dongle connect pins 4 46 and 8 44 4 c TargetBox I O Options Pin Layout IO 302 The following figure is the pin layout for the IO 302 option connector This is the J3 connector in the manufacturer s data sheet at http www diamondsystems com files binaries RMM1612v11 pdf The terminals on the screw terminal boards are numbered sequentially while the pin numbers on the connectors are numbered alternately left and right However the numbe
68. ields e The I O option associated with the connector IO 301 IO 302 IO 303 IO 304 IO 305 IO 306 e For options with more than one connector a distinction between connectors port 1 port 2 e The base address of the I O option 0x220 0x240 0x280 0x300 e If an I O option I O board includes jumper settings the label includes a unique code to identify in which position the hardware jumpers are inserted See table below CAN Options Each line on the label corresponds to a CAN connector on the xPC TargetBox CAN1 through CAN3 e The I O option associated with the connector IO 308 e The base address of the I O option 0x220 0x240 0x280 0x300 The following table lists all I O options with the number of associated I O connectors and possible jumper codes Connecting Hardware to the xPC TargetBox Table 2 1 Jumper Codes for I O Options I O Option Number of Connectors Jumper Codes IO 301 Diamond MM 32 AT IO 302 Ruby MM 1612 2 Analog input A D jumper codes first number after the C e C1 32 single ended e C2 16 differential e C3 16 single ended 8 differential Analog output D A jumper codes second number after the C e C 1 10 V e C 2 5 V e C 3 0 10 V e C 4 0 5 V Default configuration is C21 Analog output D A jumper codes first number after the C for the first 8 channels e C1 10 V e C2 5 V e C3 2 5 V e C4
69. ies 3 3 feature 1 5 hardware 3 3 setting up 3 3 setting parameters network communication 3 6 serial communication 3 3 setup dialog box C compiler 3 3 shipping case picture 2 2 unpacking 2 2 Simulink model loop back test 4 5 loop back test I O option 302 4 15 loop back test I O option 303 4 18 loop back test I O option 304 4 21 loop back test I O option 305 4 24 loop back test I O option 306 4 28 loop back test I O option 308 4 30 software FreeDOS 1 4 FTP server 1 4 host PC 1 7 QuickBOOT 1 4 self test 1 4 xPC TargetBox 1 4 StandAlone mode copying kernel target application 5 10 creating kernel application 5 10 updating environment properties 5 9 with Embedded Option 1 5 standard PC peripherals 1 5 system ping troubleshooting 3 17 system requirements hardware host PC 1 8 software host PC 1 7 T target application copying with StandAlone mode 5 10 downloading loop back test 3 20 running loop back test 4 6 with DOSLoader mode 5 7 target boot disk creating with command line 3 12 creating with GUI 3 10 target PC creating boot disk 3 12 hardware 3 3 terminal boards making your own 4 2 numbering 4 2 testing T O option 302 4 15 T O option 303 4 18 T O option 304 4 21 T O option 305 4 24 T O option 306 4 28 T O option 308 4 30 installation 3 16 I 5 Index 1 6 testing continued loop back test 4 3 troubleshooting downloading application test 3 20 reboot test 3 19 self test 2 12 system ping 3 17
70. ists the minimum resources xPC Target requires on the host PC Hardware Description Communication One free serial port COM1 or COM2 with a 9 pin or 25 pin D sub connector or an Ethernet card connected to a network CPU Pentium Athlon or higher Peripherals Hard disk drive with 50 MB of free space 23 MB for xPC Target 20 MB for xPC Target Embedded Option and 7 MB for HTML documentation One 3 5 inch floppy disk drive CD ROM drive RAM 128 MB or more System Requirements xPC TargetBox Software The following table lists the software included with your xPC TargetBox Software Description BIOS PC compatible Standard BIOS with Pentium II systems models 106 and 206 QuickBoot BIOS with Pentium III systems models 107 108 207 208 Operating xPC TargetBox includes a copy of FreeDOS on the flash system disk FTP server Copy stand alone kernel target applications to an xPC TargetBox using a network connection You do not need a floppy disk drive Self test target Customized target application for testing the specific application I O options installed in your xPC TargetBox xPC TargetBox System Hardware xPC TargetBox is designed and manufactured by MPL exclusively for The MathWorks For a detailed hardware specification refer to the xPC TargetBox Reference Guide provided in the shipping case from MPL The following table summarizes the hardware Hardware Description Communication Serial ports
71. ith xPC TargetBox and transferring files from a host PC to an xPC TargetBox with FTP MPL Warranty For xPC TargetBox MPL Warranty For xPC TargetBox xPC TargetBox comes with a one year warranty provided by MPL xPC TargetBox is designed by MPL for The MathWorks exclusively During this time MPL will repair defects in material and workmanship under the terms of the MPL warranty This section includes the following topics e Repairing an xPC TargetBox Under Warranty Contact The MathWorks for instructions to ship your xPC TargetBox directly to MPL e Limited Warranty from MPL Statement of warranty exclusive remedy and limitation of liability e Contacting The MathWorks for Technical Support Use e mail the Internet or telephone to get help with your problem e xPC TargetBox Certification The xPC TargetBox has been certified by passing emission tests required for use in the US Europe Japan Canada and Australia New Zealand Repairing an xPC TargetBox Under Warranty Your first point of contact for all xPC Target and xPC TargetBox questions is The MathWorks See Contacting The MathWorks for Technical Support If a MathWorks Technical Support Representative determines that your xPC TargetBox hardware needs repair follow the steps below 1 A MathWorks Customer Service Representative will give you a Return Material Authorization RMA number and provide you with shipping documentation and instructions
72. m sample rate Extended temperature of 200 kHz 5 us Channel coupling selected 40 to 85 C with jumpers on board If you do not specify a channel coupling when purchasing an xPC TargetBox the coupling is set to 16 differential channels Unipolar and bipolar input ranges of 0 10 V 0 5 V 0 2 5 V 0 1 25 V 0 0 625 V 10 V 5 V 2 5 V 1 25 V and 0 625 V selected by software Analog output D A 4 12 bit channels with a 6 us settling time Output range set to 0 10 V 0 5 V 10 V or 5 V with jumpers on the board If you do not specify an output range when purchasing an xPC TargetBox the range is set to 10 V Digital I O 24 digital I O lines divided into three groups with 8 bits each xPC Target does not support the counters on this board System Requirements 1 O Board Product Name Description Continued xPC TargetBox IO 302 Diamond Ruby MM 1612 Extended temperature 40 to 85 C xPC TargetBox IO 303 Diamond Ruby MM 416 Standard temperature 0 to 70 C xPC TargetBox IO 304 Diamond Onyx MM Extended temperature 40 to 85 C Analog output D A 16 12 bit channels with a 6 us settling time Output range for each group of 8 channels set to 0 10 V 0 5 V 0 2 5 V 10 V 5 V or 2 5 V with jumpers on the board If you do not specify a range when purchasing an xPC TargetBox the range is set to 10 V Digital I O 24 TTL digital I O lines divided into three
73. ng Note If you get the error message Cannot boot RTTarget 32 from Virtual 8086 mode edit the config sys file to comment out or remove the line that loads the high memory driver REM DEVICE C DROS EMM386 EXE DPMI OFF FRAME NO 5 On the xPC TargetBox keyboard press the spacebar A command line opens on the xPC TargetBox screen For a complete list of target PC commands see the xPC Target user documentation 5 Using xPC TargetBox 5 12 Booting DOS Instead of the xPC Target Kernel After you copy the file autoexec bat for DOSLoader or StandAlone mode to the flash disk the xPC TargetBox will always start DOS and then immediately boot the xPC Target kernel and with stand alone mode start the target application You might want to return your system to boot into DOS Use one of the following methods e Stop the xPC Target kernel from booting using Ctrl C and then copy the backup file autoexec01 bat with DOS on the flash disk to autoexec bat e Create the DOS system on floppy disk boot DOS from the floppy disk and then copy the backup file autoexec01 bat with DOS on disk to autoexec bat FTP File Transfer FTP File Transfer You can create larger target applications up to 16 MB that do not fit on a floppy disk For these applications you can boot the xPC TargetBox in DOSLoader mode and transfer the target application from the host PC serial or network communication or you can copy files to the xPC TargetBox usin
74. ng for IO 305 Test Dongle xPC TargetBox communicates with this board using one connector Some of the pins in the test dongles are connected together to allow for loop back testing of this board Header J3 Dongle connect pins 6 17 12 18 and 43 48 4 22 xPC TargetBox IO 305 Pin Layout IO 305 The following figure is the pin layout for the IO 305 option connector These are the J3 and J4 connectors in the manufacturer s data sheet at http www diamondsystems com files binaries QMMv15 pdf The terminals on the screw terminal boards are numbered sequentially while the pin numbers on the connectors are numbered alternately left and right However the numbers printed on each screw terminal board correspond directly to the pin numbers provided in the figure below m Counter In In 2 Timers Gate 1 Gate 2 Counen Timers Out 1 Out 2 In 3 In 4 Gate 3 Gate 4 Out 3 Out 4 In lt 5 Out 5 Gate 5 Fout In 6 In 7 Counter Gate 6 Gate 7 Timers Out 6 Out 7 In 8 In 9 Gate 8 Gate 9 Out 8 Out 9 In 10 Out 10 Gatel0 Interrupt in Digital Dout 7 Din 7 Digital output Dout 6 Din 6 input Dout 5 Din 5 Dout 4 Din 4 Dout 3 Dan 3 Dout 2 Din 2 Dout 1 Din 1 Dout 0 Din 0 5V Gnd 4 23 4 wc TargetBox I O Options Testing Model IO 305 A constant value is written to a digital output driver block and then read from a digital input block The values are compared with an error defined in a second constant block and the
75. ning the Self Test Without a Monitor Connect the AC power adaptor and run the custom target application e Running the Self Test with a Monitor Connect a monitor to the xPC TargetBox and use the self test to isolate problems e Troubleshooting the Loop Back Self Test Use information from the self test to solve problems identified with this test e Removing Test Dongles Remove the test dongles for normal use with xPC Target Unpacking the Shipping Box The xPC TargetBox is delivered in a plastic shipping case This shipping case includes everything you need to power up the xPC TargetBox and run the self test 1 Place the shipping case on a flat surface so you can read the labels on either side of the shipping case handle 2 2 xPC TargetBox Installation for Loop Back Testing 2 Press the bottom of both latches and open the top lid xPC TargetBox Contents of the top layer xPC TargetBox with attached test dongles Read First document external floppy drive external AC power adaptor AC power cord and screw terminal boards 3 Remove the external floppy drive to uncover the floppy drive cable Contents of floppy drive compartment External floppy drive cable 2 initial Loop Back Test 2 4 4 Remove the upper layer by its handles Contents of the lower layer I O cables Getting Started with xPC TargetBox manual MPL hardware reference manual and I O reference manuals 5 If any parts
76. omputer If this test fails try troubleshooting with the following procedure 1 Open a DOS shell and type the IP address of the xPC TargetBox ping XXX XXX XXX XXX DOS should display a message similar to the following Pinging XXX XXX XXX XXX with 32 bytes of data Replay from xxx XxXx XxxX XxXx bytes 32 time lt 10 ms TTL 59 2 Check the messages on your screen Ping command fails If the DOS shell displays the following message 3 Installation and Configuration Pinging XXX XXX XXX XXX with 32 byte of data Request timed out The ping command failed and the problem might be with your network cables To solve this problem check your network cables You might have a faulty network cable or if you are using a coaxial cable the terminators might be missing Ping command fails but cables are okay If the cables are okay the problem might be that you entered an incorrect property in the Setup window To solve this problem in the MATLAB Command Window type xpcsetup Check that TepIpTargetAddress TepIpSubNetMask and TcpIpGateway have the correct values On the host PC open the xPC Target Setup dialog box change the TCP IP options click the Update button and update create anew boot floppy disk On the xPC TargetBox reboot with the corrected boot floppy disk The xPC TargetBox uses a PCI bus Check that TepIpTargetBusType is set to PCI instead of ISA Ping succeeds but test 1 with the command xpctest fail
77. or working with the xPC TargetBox This chapter includes the following sections Features of xPC TargetBox p 1 2 A flexible design to prototype test and deploy real time systems System Requirements p 1 7 System requirements for the host PC and a description of the system for xPC TargetBox 1 Introduction Features of xPC TargetBox 1 2 xPC TargetBox includes many features to help you prototype test and deploy real time systems using xPC Target software This section includes the following topics e PC Compatibility Test your prototype controllers on a fully PC compatible computer e Hardware Designed for a wide range of applications and environments e Software QuickBoot BIOS Pentium III based xPC TargetBox FreeDOS FTP server and a target application for system testing preinstalled on the flash disk e xPC Target Embedded Option Create stand alone target applications and GUI application that interface to the target application e Communication Communicate with the xPC TargetBox through standard peripherals serial ports and a network connection e I O Options Add I O options to the xPC TargetBox that satisfy the needs of most xPC Target applications PC Compatibility xPC TargetBox is a 100 PC compatible all in one embedded computer with the following characteristics CPU performance Available systems include a Pentium II 266 MHz Pentium III 400 MHz or Pentium III 700 MHz processor
78. ork see your system administrator 2 On the xPC TargetBox press the Reset button You need to cancel the DOS LED test and stop the xPC Target kernel from loading Press the Ctrl C keys repeatedly until you see the message Terminate batch file C AUTOEXEC BAT Yes No Al1l1 Type Y The system boots into the self test directory c work Copy the autoexec file configured for running the FTP server Type copy c autoexec ftp c autoexec bat Open the FTP configuration file Type cd c work edit config tel Change the IP address to your xPC TargetBox For example enter myip 192 168 0 1 Save and close the file Press Alt F to open the File menu use the down arrows to select Exit and then press Enter On the xPC TargetBox press the Reset button The system boots the FTP server ftp gt 5 15 5 Using xPC TargetBox Using FTP Commands After you start the FTP server on the host PC and passwords are checked you are prompted for individual FTP commands These commands are documented in the manuals for the host computer but most FTP implementations have similar commands because they are modeled after the Berkeley UNIX version of FTP The following table lists FTP commands that are common to most implementations Command Action ascii binary cd lt path gt dir pwd get lt filename gt put lt filename gt quit Set transfer mode to ASCII default Set transfer mode to bin
79. orms a scalar expansion and assumes the same Initial vector value value for each element in the vector 5 3 5 Using xPC TargetBox 5 4 Sample time Enter a base sample time or a multiple of the base sample time Using the Watchdog Timer The xPC TargetBox provides a watchdog that you can program to perform a system reset when a programmable timeout occurs The timeout interval can range from 1 to 255 seconds with one second resolution or from 1 to 255 minutes with one minute resolution When the timeout expires an IRQ15 interrupt is asserted With the Reboot upon expiration of watchdog parameter you can specify that the system reboot at this time At most one block of this type can be included in any model Driver Block Parameters Timeout units From the list select either seconds or minutes These are the units for the time Timeout interval Enter a number between 1 and 255 Show reset port R Select this check box to display an input port labeled R A signal connected to this port resets the watchdog whenever its value exceeds 0 5 Reset upon keyboard activity Select this check box to reset the watchdog whenever there is keyboard activity Reset upon mouse activity Select this check box to reset the watchdog whenever there is mouse activity Reboot upon expiration of watchdog Select this check box to reboot the system when the watchdog timer expires and asserts IRQ15 Sample time Ente
80. ou are working with a more complex real world model application and it is not working to your satisfaction You can then use loop back testing of a particular I O option as a unit test for a certain feature of the xPC TargetBox and narrow down the possible causes of the overall failure e Getting familiar with a certain I O option and its features Loop Back Testing of I O Options Creating a Simulink Model for Loop Back Testing During the final system test at the manufacturer a Simulink model was created that does a loop back test of all I O options installed on your system This Simulink model was built into a stand alone target application and put onto the flash disk of your xPC TargetBox The stand alone application is called xpctgtst rtb and is located in the directory c work It is good practice to back up this file for later use in case the flash disk is corrupted Nevertheless you can create the same Simulink model on which xpctgtst rtb is based at any time You can then build and download that target application and redo the entire system test if the original test stand alone application no longer exists 1 Check the configuration label for the I O options installed in your xPC TargetBox and the base addresses 2 Enter the command to create the I O option Simulink model For example if you want a model to test I O option 301 and I O option 305 with base addresses 0x300 and 0x280 in the MATLAB Command Window type xpctgb
81. owever the pin numbers on the terminal board are numbered sequentially 4 29 4 wc TargetBox I O Options Testing Model IO 308 A sine wave signal is written to a CAN output driver block and then read from a CAN input block After delaying the input signal the values are compared with an error defined in a second constant block and the results sent to an Outport block 1 In the MATLAB Command Window type 4 30 10308 File Edit View Simulation Format Sine Wave The Simulink model for testing the IO 308 option opens Jio308 CANPC104 Tools Help CAN AC2 104 B1 50 CAN 1 Send Standard 11bit CAN AC2 104 B1 CAN 2 Receive 50 Standard 11bit Receive Relational Operator CAN AC2 104 B1 CAN 1 CAN2 Standard Extended Constant Using xPC TargetBox This chapter includes the following sections xPC TargetBox Library p 5 2 Group of Simulink blocks that represent drivers for the xPC TargetBox I O options DOSLoader Mode p 5 5 Use the DOSLoader mode to boot the kernel from flash memory StandAlone Mode p 5 9 Use the StandAlone mode to boot the kernel and the target application from flash memory without a connection to a host PC FTP File Transfer p 5 13 Copy files from a host PC to an xPC TargetBox using an Ethernet connection 5 Using xPC TargetBox xPC TargetBox Library 5 2 The xPC TargetBox library is a group of Simulink blocks that represent the drivers for t
82. oxtest I0301 0x300 C21 10305 0x280 For I O options with jumpers on the boards enter the jumper codes See Configuration Label for I O Options on page 2 21 3 On the bottom of the xPC TargetBox find the jumper codes for your I O options Use the table in Configuration Label for I O Options on page 2 21 to determine the jumper settings from the jumper codes 4 From the list of jumper options enter the number corresponding to the jumper settings for your box A Simulink test model is created This model is the system test model that was used to create the target application initially delivered on the flash disk as a stand alone application You can use this model to build and run a target application on the xPC TargetBox 5 Save the Simulink test model in a directory outside the MATLAB root directory 4 5 4 c TargetBox I O Options Caution Make sure that you have connected the correct dongles to the correct I O connectors otherwise you can damage an TO option or even the entire xPC TargetBox Running the Target Application for Specific 1 O Option Testing If you want to exercise a loop back test of a certain I O option take the following steps 2 4 6 Power down the xPC TargetBox Never plug or unplug any connectors while the xPC TargetBox is powered up Select the correct test dongle or dongles Some I O options come with two dongles Each test dongle is labele
83. p xPC Target and xPC Target Embedded Option This section includes the following topics e Software Requirements for the Host PC MATLAB Simulink Real Time Workshop xPC Target and xPC Target Embedded Option e Hardware Requirements for the Host PC Desktop or notebook computer e xPC TargetBox Software FreeDOS QuickBoot capability for Pentium II based xPC TargetBox systems and a custom target application to test your system e xPC TargetBox System Hardware Pentium CPU flash disk standard PC connections I O slots for three boards and an external floppy drive e xPC TargetBox I O Options Analog input analog output digital I O encoders counter timers and interrupt inputs Software Requirements for the Host PC The following table lists the minimum software xPC Target requires on your host PC Software Description Operating system MATLAB Simulink Real Time Workshop C language compiler A Microsoft Windows platform supported by The MathWorks Version 6 5 Version 5 0 Version 5 0 Microsoft Visual C C Version 5 0 6 0 or 7 0 Watcom C C Version 10 6 or 11 0 1 7 1 Introduction Software Description xPC Target Version 2 0 with most recent xPC Target library update Each xPC TargetBox requires an active software license for xPC Target xPC Target Version 2 0 optional Embedded Option Hardware Requirements for the Host PC The following table l
84. pe the name ofa Simulink model For example type xpc_osc3 A Simulink window opens with the model 2 From the Tools menu point to Real Time Workshop and then click Build Model Real Time Workshop and xPC Target create a directory xpc_osc3_xpc_emb with the following files xpc_osc3 rtb xpcboot com autoexec bat 3 Copy the above files to a formatted floppy disk Copying the Kernel Target Application to Flash Memory You build a target application on a host PC using Real Time Workshop xPC Target and a C C compiler One method for transferring the files from the host PC to an xPC TargetBox is to use an external floppy disk drive StandAlone Mode After you set up your xPC TargetBox to boot into DOS and build a stand alone application on a host PC you can copy files from a floppy disk to the flash disk See Booting DOS Instead of the xPC Target Kernel on page 5 7 and Creating a Kernel Target Application on page 5 10 1 Boot the xPC TargetBox without a floppy disk into DOS The system starts running FreeDOS from flash memory C gt 2 Insert the boot floppy disk with the xPC Target kernel into the external floppy disk drive 3 Type copy a xpc_osc3 rtb c copy a xpcboot com c copy a autoexec bat c 4 Remove the floppy disk and then on the xPC TargetBox press the Reset button The file autoexec bat includes the command xpcboot com to start the xPC Target kernel and the target application runni
85. port The xPC Target software contains driver blocks for all of the seven I O options currently available for the xPC TargetBox These options satisfy typical rapid prototyping requirements with A D D A digital T O CAN counters timers encoders and PWM The drivers are represented by Simulink blocks in the xPC Target driver library In addition the library contains driver blocks for the user LEDs and the watchdog circuitry Your interaction with the drivers is through these Simulink blocks and their parameter dialog boxes You drag and drop blocks from the I O library and connect I O drivers to your Simulink model the same way as you would connect any standard Simulink block Internal connectors and cables Shielded connectors and internal cables bring the PC 104 I O board signals to the outside of the box External connectors and cables Shielded connectors are mounted onto the front and rear panels The connection layout is the same for all configurations TO options include shielded cables with screw terminal boards Onboard CAN controller The Intel 82527 CAN controller on the CPU board is not officially supported by the xPC TargetBox driver library For applications that need CAN connections add I O option 308 to the xPC TargetBox System Requirements System Requirements The host PC is your desktop or notebook computer where you install MATLAB Simulink Stateflow and Stateflow Coder optional Real Time Worksho
86. power up the xPC TargetBox again but this is a good time to check the xPC TargetBox setup 1 Check that the external AC power supply adapter is properly connected to the xPC TargetBox the external floppy drive is properly connected the monitor is connected and powered up an Ethernet or RS 232 cable is properly connected and the xPC TargetBox is still unpowered 3 13 3 Installation and Configuration PPPI rr Sid PPY 2th ERENS Pppp Bis Bane 9 VS eh Hrs Disab ca ad ayargeyyt 2 Insert the xPC Target boot disk into the external floppy drive 3 Plug in the AC power cord 3 14 On the top of the xPC TargetBox check that the Reset LED and then the Power LED turn on Testing xPC Target Installation 4 After the BIOS loads time varies with xPC TargetBox model the floppy disk drive is accessed verify by observing the green LED on the front of the external floppy disk drive and listening for an audible sound from the drive The xPC TargetBox loads the xPC Target kernel on the disk and as soon as the entire image has been loaded the xPC Target kernel starts executing 1MB free 124MB loader xPC Target 2 Cc 1996 2002 The MathWorks Inc System Host Target Interface is RS232 COM1 2 gt System COM2 detected Baudrate 115200 The xPC TargetBox and the loaded xPC Target kernel are now ready to accept commands from the host computer through either the RS 232 or Ethernet connection Your n
87. r a base sample time or a multiple of the base sample time DOSLoader Mode DOSLoader Mode DOSLoader mode allows you to copy the xPC Target kernel to the flash disk remove the floppy disk drive and then boot the xPC Target kernel The target application is still downloaded from the host PC Use this mode for applications where the xPC TargetBox is not easily accessible This section includes the following topics e Updating Environment Properties and Creating a Boot Disk Select DOSLoader mode in the Setup dialog box Copying the Kernel to Flash Memory Copy the xPC Target kernel to the flash disk on an xPC TargetBox and then start the kernel running e Creating a Target Application Create download and run a target application from a host PC e Booting DOS Instead of the xPC Target Kernel Boot an xPC TargetBox into DOS instead of starting the xPC Target kernel Note To use DOSLoader mode you need the xPC Target Embedded Option Upeanng Environment Properties and Creating a Boot Dis xPC Target uses the environment properties to determine what files to create for the various target boot modes This procedure assumes you have serial or network communication working correctly between your host computer and the xPC TargetBox with TargetBoot in the Setup dialog box set to BootFloppy 1 On the host computer start MATLAB 2 In the MATLAB Command Window type xpcsetup The xPC Target Setup window opens
88. r output lines Interrupts 2 digital interrupt lines xPC TargetBox does not support the counter timers on this board CAN field bus 2 CAN channels SJA 1000 controller for CAN 2 0A 11 bit standard frames and CAN 2 0B 29 bit extended frames Both CAN channels are set to be nonterminated If you locate one or both of the CAN channels at the end of a CAN bus you must provide termination by placing the correct resistor directly at the connector pins Initial Loop Back Test The software environment for xPC Target uses two separate computers Because of this added complexity installation and configuration are more involved This chapter includes the following sections xPC TargetBox Installation for Connect an AC power adapter and monitor to the Loop Back Testing p 2 2 xPC TargetBox xPC TargetBox Installation for Regular Connect a keyboard mouse and floppy drive to the Use p 2 15 xPC TargetBox Connecting Hardware to the xPC Use screw terminal blocks to interface your hardware TargetBox p 2 20 with the xPC TargetBox I O options 2 initial Loop Back Test xPC TargetBox Installation for Loop Back Testing When you receive your xPC TargetBox your first task is to run a self test target application to test your particular box with your selected I O options This section includes the following topics e Unpacking the Shipping Box Remove the xPC TargetBox from the plastic shipping case Run
89. ripherals 2 16 external floppy disk drive 2 18 J jumper codes I O options 2 21 K kernel copying to flash memory 5 6 with DOSLoader mode 5 6 with StandAlone mode 5 10 1 3 Index L LED driver blocks 5 3 loop back test determining success 4 4 running target application 4 6 Simulink model 4 5 Simulink model I O option 302 4 15 Simulink model I O option 303 4 18 Simulink model I O option 304 4 21 Simulink model I O option 305 4 24 Simulink model I O option 306 4 28 Simulink model I O option 308 4 30 testing process 4 3 troubleshooting 2 12 uses for 4 4 M MATLAB using with FTP server 5 19 N network communication environment properties 3 6 feature 1 5 hardware 3 6 host PC 3 6 setting up 3 6 target PC 3 6 I 4 P PC compatibility 1 2 peripherals connecting 2 16 xPC TargetBox 1 9 pin layouts T O option 301 analog 4 9 T O option 301 digital 4 10 T O option 302 4 14 T O option 303 4 17 T O option 304 4 20 T O option 305 4 23 T O option 306 4 26 T O option 308 4 29 T O options 4 2 terminal boards 4 2 pin numbering connectors 4 8 screw terminal boards 4 8 planning hardware connections 2 25 Q QuickBOOT capability 1 4 R RAM xPC TargetBox 1 9 reboot test 3 19 Index S screw terminal boards connecting 2 26 pin layout 4 2 self test on flash disk 1 9 running 2 9 running with monitor 2 9 running without monitor 2 4 troubleshooting 2 12 serial communication environment propert
90. rs printed on each screw terminal board correspond directly to the pin numbers provided in the figure below Analog output Analog Vout 8 output Vout 10 Digital I O Port A Digital I O Port A Digital I O Port B Digital I O Port C Digital I O Port C Digital I O DIO B7 Port B DIO B5 Ext Trig 5V xPC TargetBox IO 302 Testing Model IO 302 A constant value is written to the A D driver block and then read from the D A driver block The values are compared with an error defined in a second constant block and the results sent to an Outport block 1 In the MATLAB Command Window type 10302 The Simulink model for testing the IO 302 option opens Jio302 RUBYMM1612DI0 wy _ ol x File Edit View Simulation Format Tools Help 2 Ruby MM 1612 Ruby MM 1612 3 Diamond Diamond 4 Analog Output Digital Input 5 Logical Operator Relational Operator Relational Operatori Constant4 4 15 4 c TargetBox I O Options 4 16 xPC TargetBox IO 303 The Diamond Ruby MM 416 is an analog and digital board with 4 analog output D A channels and 24 digital I O lines This section includes the following topics e Wiring for IO 303 Test Dongle e Pin Layout IO 303 e Testing Model IO 303 Note xPC TargetBox does not support the external trigger on this board Wiring for IO 303 Test Dongle xPC TargetBox communicates with this board using one connector Some of the pins in
91. ruggedness What Is xPC TargetBox Quick Start Guide for xPC TargetBox xPC TargetBox is an industrial PC that lets you run target applications generated by Real Time Workshop and xPC Target Use the following process to get your xPC TargetBox up and running quickly 1 Unpack the xPC TargetBox When you receive your xPC TargetBox it is delivered in a rugged shipping case Place the case on a table with the top of the box up and push the lower end of the latches to open the case You will see the xPC TargetBox a floppy disk drive screw terminal boards the AC adapter and an AC power cord See Unpacking the Shipping Box on page 2 2 2 Remove the xPC TargetBox from the shipping case Depending on the I O options you selected test dongles are shipped already attached to the xPC TargetBox I O connectors 1 through 6 The CAN dongle for I O option 308 is packed with the power cord 3 Attach the AC adapter and the AC power cord If your xPC TargetBox includes I O option 308 attach the CAN dongle to the CAN 1 and CAN 2 connectors 4 Plugin the AC power cord When you do this the internal self test program for your xPC TargetBox will start The two USER LEDs will turn on turn off and then if the self test program is successful turn back on See Running the Self Test Without a Monitor on page 2 4 5 After you have tried the self test program you can connect a keyboard and SVGA video monitor to the xPC TargetBox
92. s The problem might be that you have incorrect IP and gateway addresses entered in the Setup window To solve this problem in the MATLAB Command Window type xpcsetup Enter the correct addresses Click the Update button Recreate the target boot disk by inserting a floppy disk into the host disk drive and then clicking the BootDisk button If you still cannot solve your problem see If You Still Need More Help on page 3 20 3 18 Testing xPC Target Installation Test 2 Ping Target System xPC Target Ping This test is an xPC Target ping to your xPC TargetBox If this test fails try troubleshooting with the following procedure 1 In the MATLAB Command Window type tg xpc 2 Check the messages in the MATLAB window MATLAB should respond with the following messages xPC Object Connected Yes Application loader Target object does not connect If you do not get these messages the problem might be that you have a bad target boot disk To solve this problem create another target boot disk with a new floppy disk See Target Boot Disk on page 3 10 If you still cannot solve your problem see If You Still Need More Help on page 3 20 Test 3 Reboot Target Using Direct Call This test tries to boot your xPC TargetBox using an xPC Target command If this test fails try troubleshooting with the following procedure 1 In the MATLAB Command Window type xpctest noreboot This command rerun
93. s any key to continue 2 Insert a formatted floppy disk into the host PC disk drive and then press any key The write procedure starts and while creating the boot disk the MATLAB Command Window displays the following status information On Windows NT systems the status information is displayed only at the end of the write process Creating xPC Target boot disk Please wait xPC Target boot disk successfully created Your next task is to test your installation See Testing xPC Target Installation on page 3 13 Testing xPC Target Installation Testing xPC Target Installation Use this section to troubleshoot connection and communication problems between your host PC and the xPC TargetBox This section includes the following topics e Powering Up the xPC TargetBox Check xPC TargetBox connections to peripherals and power supply e Testing the Installation Run the xpctest command e Test 1 Ping Target System Standard Ping Test network communication with a standard ping command e Test 2 Ping Target System xPC Target Ping Test either network or serial communication with the host PC e Test 3 Reboot Target Using Direct Call Test rebooting the xPC TargetBox from the host PC e Test 4 Build and Download Application Test downloading and running a target application on the xPC TargetBox Powering Up the xPC TargetBox After you create a boot disk in the xPC Target Setup dialog box you are ready to
94. s the test without using the reboot command and displays the message Test 3 Reboot target using direct call SKIPPED 2 Observe the messages in the MATLAB Command Window during the build process If you still cannot solve your problem see If You Still Need More Help 3 19 3 Installation and Configuration 3 20 Test 4 Build and Download Application This test tries to build and download the model xpcosc md1 If this test fails try troubleshooting with the following procedure 1 In the MATLAB Command Window check the error messages These messages help you locate where there is a problem 2 Ifyou get the error message xPC Target loader not ready reboot your xPC TargetBox This error message is sometimes displayed even if the target screen shows the loader is ready 3 Open the xPC Target setup dialog box Type xpcsetup 4 Check the path to the C compiler A common error when creating a target application is setting the path to the C compiler incorrectly If you still cannot solve your problem see If You Still Need More Help If You Still Need More Help If you cannot solve your problem contact The MathWorks directly for help Internet http www mathworks com support E mail mailto support mathworks com Telephone 508 647 7000 Ask for Technical Support xPC TargetBox I O Options xPC TargetBox is available with seven I O board options Each option includes one or two test don
95. stablish 2 Verify that the voltage levels current loads and so forth are in accordance with the specification of a particular I O option Note Neither The MathWorks nor MPL will be liable for any damage resulting from connecting hardware to the xPC TargetBox in any way that is not in compliance with the I O board specification from the original manufacturer 3 From the following list determine the hardware manuals for your particular I O options IO 301 Diamond Systems DIAMOND MM 32 AT User Manual V2 61 IO 302 Diamond Systems RUBY MM 1612 User Manual V1 1 IO 303 Diamond Systems RUBY MM 416 User Manual V1 1 IO 304 Diamond Systems ONYX MM XT User Manual V1 4 IO 305 Diamond Systems QUARTZ MM User Manual V1 5 IO 306 DM5814 DM6814 User s Manual from Real Time Devices IO 308 Softing CAN AC2 104 User Manual Version 4 0 2 25 2 initial Loop Back Test 2 26 Connecting Hardware to Screw Terminal Boards Be extremely careful when making connections to the terminal boards For your convenience the shipping case includes one or two I O cables and one or two screw terminal boards depending on the I O option for each I O option installed in your xPC TargetBox You can use these parts to quickly and conveniently make the connections between your xPC TargetBox and your hardware under test Note Unplug the xPC TargetBox when connecting any I O cables and screw terminal boards to the an
96. t Application 1 Inthe MATLAB Command Window type the name of a Simulink model For example type xpc_osc3 A Simulink window opens with the model 2 From the Tools menu point to Real Time Workshop and then click Build Model 3 Real Time Workshop and xPC Target create a target application and download it to the xPC TargetBox Booting DOS Instead of the xPC Target Kernel After you copy the file autoexec bat for DOSLoader mode to the flash disk the xPC TargetBox will always start DOS and then immediately boot the xPC Target kernel You might want to return your system to boot into DOS 1 On the xPC TargetBox press the Reset button 2 When you see the message for loading DOS press Ctrl C The xPC Target kernel boot process is stopped and the DOS prompt is displayed 5 7 5 Using xPC TargetBox 3 Copy the backup autoexec file For example if you saved a previous version of the autoexec file as autoex01 bat type DR DOS c gt copy autoex01 bat autoexec bat 4 Press the Reset button The xPC TargetBox boots into DOS 5 8 StandAlone Mode StandAlone Mode StandAlone mode combines the target application with the kernel and boots them together on the xPC TargetBox from flash memory The host PC does not have to be connected to the xPC TargetBox This section includes the following topics e Updating Environment Properties Select StandAlone mode in the Setup dialog box e Creating a Kernel Target Applic
97. t the system is functioning correctly Features of xPC TargetBox xPC Target Embedded Option The xPC Target Embedded Option is an extension to xPC Target The xPC TargetBox currently includes a promotional copy of the xPC Target Embedded Option BootFloppy mode Without the xPC Target Embedded Option you can boot the xPC TargetBox from a boot floppy disk created by xPC Target When you boot the xPC TargetBox from that disk the xPC Target kernel uses the resources on the target PC CPU RAM and serial port or network adapter without changing the files already stored on the flash disk DOSLoader mode With the xPC Target Embedded Option and DOSLoader mode you can copy the xPC Target kernel to the flash disk using a a floppy disk or FTP After transferring the files boot the kernel from the flash disk and then download a target application from the host PC DOSLoader StandAlone mode With xPC Target Embedded Option and StandAlone mode you can copy the xPC Target kernel with a self contained target application using a floppy disk or FTP After transferring the files you can remove the floppy drive and reset the xPC TargetBox The xPC TargetBox automatically boots the kernel and executes your target application without the need to communicate with the host PC Communication You can communicate with the xPC TargetBox through standard peripherals serial ports and a network connection Standard PC peripherals There
98. tBox and identifies problems With information from the self test you can than locate where the problems occurred 1 On the target screen find the window or windows where a value of 0 is shown For example the screen below shows that IO option 301 analog 301 10000 failed 0 000000 the test xpetbtst i TET 000168 at time 2 004000 124MB execution started sample time 0 001000 execution stopped at 4 600000 er ahs TET 0 000145 at time 1 208000 Inf a TET 168 at time 1 510000 i execution started sample time O 0 1000 6 001 execution stopped at 4 880600 0001492 ini TET 000145 at time 363000 i TET 0 000169 at time 2 620000 301 100000 215 13 301 200000 1 600668 2 Write down the board names that show a numerical value of 0 3 Unplug the AC power cord 2 12 xPC TargetBox Installation for Loop Back Testing 4 Turn the xPC TargetBox over and find the configuration label on the bottom Look for a listing of I O options for this box The I O options are attached to the connectors labeled I O 1 through I O 6 CAN1 and CAN2 Using the following table and the board name you wrote down determine the corresponding I O option and connector for this board Board Name 10 Option Diamond MM 32 AT IO 301 Diamond Ruby MM 1612 IO 302 Diamond Ruby MM 416 IO 303 Diamond Onyx MM IO 304 Diamond Quartz MM 10 IO 305 RealTime Devices DM6814 IO 306 Softing CAN AC2 104 IO 308
99. th After you install xPC Target you can set the environment properties for the host and target computers You need to change these properties before you can build and download a target application 3 3 3 Installation and Configuration 1 In the MATLAB Command Window type xpcsetup The xPC Target Setup window opens xPC Target Setup OM1 d applications micre 192 168 0 1 255 255 255 0 192 168 0 1 NE2000 ha Enabled 5 r 0x300 BootFloppy EZ fos Ess O The xPC Target Setup window has two sections xPC Target xPC Target Embedded Option The xPC Target Embedded Option gives you the additional TargetBoot choices of DOSLoader and StandAlone mode 2 From the CCompiler list select either VisualC or Watcom 3 4 Serial Communication 3 In the CompilerPath box enter the root path where you installed your C C compiler 4 From the HostTargetComm list select RS232 5 From the RS232HostPort list select either COM1 or COM2 for the connection on the host PC xPC Target automatically determines the COM port you use on the xPC TargetBox 6 When you finish changing the properties click the Update button xPC Target updates the environment with the new properties You do not have to exit and restart MATLAB after making changes to the xPC Target environment even if you change the communication between the host and target from RS232 to TCP IP However you have to recreate the target
100. the connectors are numbered alternately left and right However the numbers printed on each screw terminal board correspond directly to the pin numbers provided in the figure below Gnd Gnd Gnd Gnd BO Digital YO A7 Gnd Port A A6 Gnd as 5 6 Gna a4 7 8 Gna a3 9 10 Gna a2 11 12 cna Al 13 14 Gna ao 15 16 Gna Digital VO c7 17 18 Gna Port C c6 19 20 Gna c5 21 22 Gna c4 23 24 Gna c3 25 26 Gna c2 27 28 Gna eu Gnd co Gnd Digital I O B7 Gnd Port B B6 Gnd B5 Gnd B4 Gnd B3 Gnd 4 20 xPC TargetBox IO 304 Testing Model IO 304 A constant value is written to a digital output driver block and then read from a digital input block The values are compared with an error defined in a second constant block and the results sent to an Outport block 1 In the MATLAB Command Window type 10304 The Simulink model for testing the IO 304 option opens Jio304 RUBYMM1612D10 File Edit View Simulation Format Tools Help 1 Onyx Mh Diamond Diamond Constanti Digital Output Digital Input Logical Operator Relational Operator Relational Operatori 4 4 21 4 c TargetBox I O Options xPC TargetBox IO 305 The Diamond Quartz MM 10 board has 10 counters 8 digital I O lines and one interrupt line This section includes the following topics e Wiring for IO 305 Test Dongle e Pin Layout IO 305 e Testing Model IO 305 Wiri
101. ures that the following are functioning properly e xPC TargetBox is running properly It can execute a target application The I O option I O board is accessed through its base address This address was set by the manufacturer when you purchased your xPC TargetBox This is the address you enter in the xpctgboxtest command to create a Simulink model for loop back testing e The I O option consisting of the I O board I O connector test dongle I O cable and screw terminal board is fully functional both mechanically and electrically A failed loop back test of an I O option signifies that one of the parts has a failure that makes additional testing necessary Uses for Loop Back Testing You can use loop back testing of an I O option to accomplish various testing tasks at different stages of using the xPC TargetBox e Initial full system test of the xPC TargetBox and all I O options when unpacking the system for the first time after delivery At the time you unpack the xPC Target box you can attach test dongles and a monitor power up the system and immediately observe the proper functioning of the xPC TargetBox and all installed I O options e Testing a particular I O option during xPC TargetBox operation This task is useful if you are working with xPC Target and the xPC TargetBox and you believe that something might be wrong with an I O option For example you could have a damaged I O board This may also be useful when y
102. wer cord 8 Plug the socket end of the cable into the external AC power adapter You are now ready to start the xPC TargetBox for self testing Because the xPC TargetBox does not have a power switch the system starts to operate as soon as you plug the AC power cord into a wall outlet 2 7 2 initial Loop Back Test 9 Plugin the power cord and observe the LEDs on the top of the box The LEDs light with the following sequence Power on Red Reset LED turns on momentarily and then the yellow Power LED turns on and stays on If you have a network connection the green LAN and LAN100 LEDs turn on The green HDD LED turns on when the BIOS accesses the FlashRAM disk DOS test Both USER 1 and USER 2 LEDs turn on xPC Target self test Kernel loads both USER LEDs off self test starts USER 1 on self test is successful both USER LEDs on or self test is unsuccessful USER 2 on USER 1 USER 2 O 1 Initial LED test O LED turned on O 1 Self test not running O O O 2 Self test starts O O 3a Self test finishes successfully 3b Self test finishes unsuccessfully 10 Observe the sequence of LEDs turning on and off Ifnone of the LEDs turns on immediately unplug the power cord Check for loose connectors AC power adapter to xPC TargetBox connector AC adapter power cord Plug in the power cable again If the system does not boot up as described above unplug and contact a Mat
103. xecution started sample time 0 001000 RT single execution stopped at 4 880000 tat TET 0 000145 at time 142668 Inf a TET 0 000168 at time 1 008000 execution started sample time G 601 68 0 001 execution stopped at 4 066000 0 0001489 ini TET 0 000145 at time B 7880B stopped i TET 0 000168 at time 1 615000 C1 14 12 301 100000 1 666660 15 13 301 20000 1 680000 4 Observe the lower section of the monitor screen The monitor screen displays a window for each connector attached to an I O option The first value is the I O option number and connector For example 301 1 is the analog connector for the IO 301 option and 301 2 is the digital connector for the same I O option Below the I O option number is a numerical value A numerical value of 1 indicates that the loop back self test was successful for that particular I O option If all numerical values are 1 the self test is running successfully and your xPC TargetBox is fully functional Unplug the power cord and proceed to the next section Removing Test Dongles on page 2 15 If one of the numerical values is 0 a failure was detected when exercising a particular I O option in the loop back mode Unplug the power cord and proceed to Troubleshooting the Loop Back Self Test following 2 initial Loop Back Test Troubleshooting the Loop Back Self Test The self test exercises the I O options in your xPC Targe

Download Pdf Manuals

image

Related Search

Related Contents

Mode d`emploi et instructions de montage Four à vapeur  gra - Fichier PDF  Flash Power Grip Blitzgriff Poignée d  K7S8X K7S8XE User Manual    MEM-4660 User Manual (Revision 03)  

Copyright © All rights reserved.
Failed to retrieve file