Products & Services Solutions Academia Support User Community Company

Learn more about xPC Target   

Tcl/Tk Scripts

Introduction

The Tcl/Tk demos are scripts that illustrate how to directly access xPC Target COM API functions through a command-line interpreter like Tcl/Tk. With Tcl/Tk

The files for this scripts are located in

C:\matlabroot\toolbox\rtw\targets\xpc\api\tcltk

Required Tcl/Tk Software

To use these Tcl/Tk scripts, or to write your own Tcl/Tk scripts, you need

Using the Demo Scripts

The top of each Tcl/Tk script file contains directions on how to use each Tcl/Tk scripts. In general:

  1. Copy the contents of the tcltk directory to a writable directory of your choice.

  2. Change directory to the one that contains your copy of the Tcl/Tk script files.

  3. Start your Tcl/Tk interpreter.

  4. Load the Tcl/Tk script with the source command. For example,

    source xpctargetping.tcl
  5. Run the loaded script. For example,

    xpctargetping 192.168.0.10 22222

    The selected script executes. In this example, xpctargetping.tcl tests the communication between the host and target PC and returns a success or failure message.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS