External interface for high speed data transfer pcie, external interface for high speed data transfer usb3.0 (34 pages)
Summary of Contents for Anritsu MD1230A-06
Page 1
Tcl Interface Operation Manual Eighth Edition • This is an operation manual of MD1230A-06, MD1230B-06, MD1231A-06, MD1231A1-06, MX123001A-06. • Read this manual before using the equipment. • To ensure that the equipment is used safely, read the “For Safety” in the Operation Manual for each main unit first.
Page 2
Insure that you clearly understand the meanings of the sym- bols BEFORE using the equipment. Some or all of the following five symbols may not be used on all Anritsu equipment. In addition, there may be other labels attached to products which are not shown in the diagrams in this manual.
Page 3
Anritsu guarantees that this equipment was inspected at shipment and meets the published specifications. Anritsu Warranty • During the warranty period, Anritsu will repair or exchange this soft- ware free-of-charge at the company’s own discretion if it proves defec- tive when used as described in the operation manual.
Page 4
Notes On Export Management This product and its manuals may require an Export License/Approval by the Government of the product's country of origin for re-export from your country. Before re-exporting the product or manuals, please contact us to confirm whether they are export-controlled items or not. When you dispose of export-controlled items, the products/manuals are needed to be broken/shredded so as not to be unlawfully used for military purpose.
Page 5
2. Copyright (1) Although you are licensed to use this software, Anritsu retains the copyright. (2) Although you have purchased this software, rights other than those specified in this License are not transferred to you.
Page 6
CE Conformity marking Anritsu affixes the CE Conformity marking on the following product (s) in accordance with the Council Directive 93/68/EEC to indicate that they conform to the EMC and LVD directive of the European Union (EU). CE marking 1. Product Model...
Page 7
C-tick Conformity marking Anritsu affixes the C-tick marking on the following product (s) in accor- dance with the regulation to indicate that they conform to the EMC framework of Australia/New Zealand. C-tick marking 1. Product Model Option: MD1230A-06 Tcl interface,...
About This Manual MD1230 family operation manual consists of the main unit, control soft- ware, modules, remote control and options shown below. Note: MD1230 family is the generic name of MD1230A/B Data Quality Analyzer, MD1231A/A1 IP Network Analyzer and MT7407A Multislot Chassis.
Page 10
Decode Module Operation Manual Explains basic operations for Decode Module. Tcl Interface Operation Manual Explains basic operation for Tcl Interface. Expert Analysis Module Operation Manual Explains basic operation for the Expert Analysis Module. Application Traffic Monitor Operation Manual Explains operation for the software that monitors traffics on Ethernet.
Page 11
This operation manual covers the following products: Model Name Product Name MD1230A-06 Tcl Interface MD1230B-06 MD1231A-06 MD1231A1-06 MX123001A-06 Description in this manual shows the case of using the MD1230A-06.
Table of Contents About This Manual........Section 1 Introducing the Tcl Interface ... Introducing the Tcl Interface ......... Concepts............... Operations Guidelines ..........Appendix A SCPI Commands by Macro Category ......
Section 1 Introducing the Tcl Interface If you do not agree to these terms, return the unopened software package to Anritsu Corporation (hereafter Anritsu). This section provides an overview of the Tcl Interface features and func- tions. “Tcl” is the acronym for Tool Command Language and is pro- nounced “tickle”.
Courier type. 1.1 Introduction to the Tcl Interface The Anritsu MD1230A Tcl interface is an optional user interface which provides automation for the configuration and execution of MD1230A op- erations. The Tcl API provides a generic socket-based interface to the MD1230A SCPI remote commands.
Concepts 1.1.1 References Tool Command Language (Tcl) interpreter + SCRIPTING language was crafted by John Ousterout in 1988 (U of C Berkley, Sun, Scriptic). • http://www.tcl.tk/ • http://www.SCPIconsortium.org/ • http://www.activestate.com/ 1.2 Concepts 1.2.1 Where to Start Implementing an automated command sequence in a Tcl script still re- quires all of the preliminary connection and configuration stages that are necessary with the GUI and SCPI interfaces.
Page 18
Section 1 Introducing the Tcl Interface The MD1230A Tcl scripting interface strives to provide a platform for de- veloping vertical and horizontal programming setup and control of these single-event oriented instructions. Vertical programming consistency de- fines program commands/requests within a functional class. An example of vertical consistency is to use the same Tcl programmatic looping con- structs to initialize common data parameters with a pre-defined data ma- trix.
Operations Guidelines 1.3 Operations Guidelines 1.3.1 MD1230A Tcl Server Startup • Selecting the Tcl Application button from the Selector Application on the MD1230A launches the Tcl Server. Figure 1.3-1 shows the Selector Application. Fig. 1.3-1 Selector Application on the MD1230A Once launched, the Tcl Server will not allow other local GUI and single Remote Control interface users to connect to the MD1230A.
The command syntax of SCPI commands is as per the SCPI standard. Macro Commands Macro commands are provided by Anritsu Company to provide more user-friendly programming commands that are separate from the basic SCPI commands. The macro commands are made on top of the basic SCPI commands and each macro command may contain one or more than one SCPI command.
Page 21
Operations Guidelines An example of a response to a macro command is as follows: M_COMMANDNAME :< VariableName> <ErrorStatus>, <VariableName> <ErrorStatus>… M_COMMANDNAME? :< VariableName> <Value/ErrorStatus>, <VariableName> <Value/ErrorStatus>… For list of SCPI commands grouped by macro category, refer to the Appendix “SCPI Commands by Macro Category”. M_PORTSETTING Group (Use to configure the port setting) M_PORTSETTING: <VARIABLE1 NAME>...
Page 22
Section 1 Introducing the Tcl Interface M_TXSTREAM Group (Use to stop/start the transmit the stream) M_TXSTREAM:<VARIABLE1 NAME> = <VARIABLE1 VALUE>, <VARIABLE2 NAME> = <VARIABLE2 VALUE>… M_TXSTREAM?:<VARIABLE1 NAME>, <VARIABLE2 NAME>… M_ TXSTFRAMESETTING (Use to configure the frame to be transmitted) M_TXSTFRAMESETTING: <VARIABLE1 NAME> = <VARIABLE1 VALUE>, <VARIABLE2 NAME> = <VARIABLE2 VALUE>,…...
Operations Guidelines 1.3.2.2 An Example of a Connect and Command Sequence Operations Guidelines: To effectively utilize the Tcl server, the following guidelines should be fol- lowed when communicating from the client environment. All of the basic operation guidelines for unit connection, module selection, and port re- servation still stringently apply when controlling the MD1230A via the Tcl interface.
Page 24
Section 1 Introducing the Tcl Interface Before execution of any command/request, the client must set the unit, module, and port ids in order to execute any further com- mands/requests. To set unit, module, and port, use the following com- mands (in any sequence). :UENTry:ID <Id no>...
Page 25
Operations Guidelines There are some commands which take input in hex format. To do this, the client has to provide data in hex preceded by “#H”’. For every command received, the Tcl server sends a response. An example of the command/request response is shown: Result <Success/Failure>[Data] A client can execute many commands at once, but the server sends responses in the same sequence as it receives.
Page 26
Section 1 Introducing the Tcl Interface In addition to the SCPI commands, there are macro commands such as M_TXSTREAM, M_PORTSETTING, etc. The macro commands are made on top of the basic SCPI commands and each macro command may contain one or more than one SCPI command. Macro commands may be used wherever SCPI commands can be used.
Page 27
Operations Guidelines NOTE: *RST Command: When multiple clients are connected to a Tcl Server and one client sends the “*RST” command, the resulting initialization will affect all of the con- nected clients. If each client is operating independently, this may cause unexpected results so please use caution when using the “*RST”...
Section 1 Introducing the Tcl Interface 1.3.2.3 Developers Guidelines An annotated sample script is provided below to help you get started. Refer to the table following the script for an explanation of the script en- tries. Sample Tcl Script This script shows sample test code used to reserve the port and set some port settings of different modules in the MD1230A.
Page 32
Section 1 Introducing the Tcl Interface Sample Tcl Script Annotations Line # Explanation 1-19 Comments. proc tclModuleTypeToNoOfPort { moduleType lngMaxPort } { Declare procedure name with parameters tclModuleTypeToNoOfPort moduleType lngMaxPort upvar $lngMaxPort ret Create link to variable in a different stack frame. Comments.
Page 33
Operations Guidelines proc tclSelfTestOccupiesPort { moduleId moduleType sock } { Declare procedure with parameters tclSelfTestOccupiesPort moduleId, mod- uleType, sock set lngMaxPort 0; Set global ‘upvar’ to 0. lngMaxPort TclModuleTypeToNoOfPort $moduleType lngMaxPort; Call procedure passing parameters $ tclModuleTypeToNoOfPort moduleType lngMaxPort puts $sock ":Module:ID $moduleId" Outputs the “...
Page 34
Section 1 Introducing the Tcl Interface flush $sock; Sends the string. gets $sock cmdResponse; Reads the response. puts $sock "M_PortSetting: PORTETHernetMADDress=#H010203040506, PORTIPIADDress=#HC0A80103, PORTIPNETMask=#HFFFFFF00, PORTIPGATe- way=#HC0A8010" Outputs the “ “ string to the socket. This is the macro command to set the port setting for MAC Address, IP Address, Net Mask, and Gateway IP Ad- dress (IP notation is in Hex).
Page 35
Operations Guidelines flush $sock Sends the string. gets $sock cmdResponse; Reads the response. Closing of if { $lngPCnt == 1 || $lngPCnt == 2 } { Comments. puts $sock "M_PortSetting:PORTETHernetMIIANEGotiationENABle=OFF, PORTETHernetMIIANEGotiationDMODe=FULL, PORTETHernetMIIANEGotiationLSPeed=S100M, PORTETHernetMIILBACkENABle=ON" Outputs the “ “ string to the socket. This is the macro command to set the port setting for detailed configuration.
Page 36
Section 1 Introducing the Tcl Interface puts $sock "M_PortSetting:PORTETHernetMIIANEGotiationENABle=OFF, PORTETHernetMIIANEGotiationDMODe=FULL,PORTETHernetMIILBACkENABle=ON" Outputs the “ “ string to the socket. This is the macro command to set the port setting. flush $sock Sends the data. gets $sock cmdResponse; Reads the response. Closing of 2{ .
Page 37
Operations Guidelines flush $sock Sends the data. gets $sock cmdResponse; Reads the response. puts $sock ":PORT:SDH:MAPPing PPP" Outputs the “ “ string to the socket. Flush $sock Sends the data. gets $sock cmdResponse; Reads the response. puts $sock "M_PortSetting: PORTETHernetARPREPLyMODE=OFF, PORTICMPEReplyMODE=ON"...
Page 38
Section 1 Introducing the Tcl Interface set sock [ socket 192.168.0.1 35001 ] ; This begins the MAIN program section. Tcl client connect to server at 192.168.0.1 port 35001. gets $sock line TclSelfTestOccupiesPort 1 1 $sock; Occupies the ports on module 1 and type 1. TclSelfTestOccupiesPort 2 2 $sock;...
Page 39
Appendix Appendix A SCPI Commands by Macro Category... A-1 App.-I...
Need help?
Do you have a question about the MD1230A-06 and is the answer not in the manual?
Questions and answers