Programming Manual


Add to my manuals
125 Pages

advertisement

Programming Manual | Manualzz

Test Solutions - Programming Manual

Modular Test Systems

ZTM Series Rack-Mount Modular Test Systems

RCM Series Compact Modular Test Systems www.minicircuits.com

| PO Box 350166, Brooklyn, NY 11235-0003 | +1 718-934-4500 | [email protected]

Important Notice

This guide is owned by Mini-Circuits and is protected by copyright, trademark and other intellectual property laws.

The information in this guide is provided by Mini-Circuits as an accommodation to our customers and may be used only to promote and accompany the purchase of Mini-Circuits’ Parts. This guide may not be reproduced, modified, distributed, published, stored in an electronic database, or transmitted and the information contained herein may not be exploited in any form or by any means, electronic, mechanical recording or otherwise, without prior written permission from Mini-Circuits.

This guide is subject to change, qualifications, variations, adjustments or modifications without notice and may contain errors, omissions, inaccuracies, mistakes or deficiencies. Mini-Circuits assumes no responsibility for, and will have no liability on account of, any of the foregoing.

Accordingly, this guide should be used as a guideline only.

Trademarks

Microsoft, Windows, Visual Basic, Visual C# and Visual C++ are registered trademarks of Microsoft

Corporation. LabVIEW and CVI are registered trademarks of National Instruments Corporation.

Delphi is a registered trademark of Delphi Technologies, Inc. MATLAB is a registered trademark of

The MathWorks, Inc. Agilent VEE is a registered trademark of Agilent Technologies, Inc. Linux is a registered trademark of Linus Torvalds. Mac is a registered trademark of Apple Inc. Python is a registered trademark of Python Software Foundation Corporation.

All other trademarks cited within this guide are the property of their respective owners. Neither

Mini-Circuits nor the Mini-Circuits PTE (portable test equipment) series are affiliated with or endorsed or sponsored by the owners of the above referenced trademarks.

Mini-Circuits and the Mini-Circuits logo are registered trademarks of Scientific Components

Corporation.

Mini-Circuits

13 Neptune Avenue

Brooklyn, NY 11235, USA

Phone: +1-718-934-4500

Email: [email protected]

Web: www.minicircuits.com

1 - Overview ................................................................................................... 6

2 - Programming with Mini-Circuits' Modular Test Systems ............................ 7

2.1 - Control Options ..................................................................................................... 7

2.2 - Addressing Individual Test Components ................................................................. 7

2.3 - Example ZTM Series Configuration ......................................................................... 8

2.4 - Example RCM Series Configuration ........................................................................ 9

3 - SCPI Commands for Control of Modular Test Components ....................... 10

3.1 - ZTM Series System Operations ............................................................................. 11

3.1 (a) - Get Model Name ............................................................................................................. 12

3.1 (b) - Get Serial Number ........................................................................................................... 13

3.1 (c) - Get Configuration ............................................................................................................ 14

3.1 (d) - Get Firmware .................................................................................................................. 16

3.1 (e) - Get Internal Temperature ............................................................................................... 17

3.1 (f) - Get Heat Alarm ................................................................................................................ 18

3.1 (g) - Save Counters & States ................................................................................................... 19

3.2 - Programmable Attenuator Control ...................................................................... 20

3.2 (a) - Set Attenuation ............................................................................................................... 21

3.2 (b) - Get Attenuation .............................................................................................................. 22

3.2 (c) - Set Start-Up Attenuation Mode ...................................................................................... 23

3.2 (d) - Get Start-Up Attenuation Mode ..................................................................................... 24

3.2 (e) - Set Start-Up Attenuation Value ....................................................................................... 25

3.2 (f) - Get Start-Up Attenuation Value ....................................................................................... 26

3.2 (g) - Get Maximum Attenuation ............................................................................................. 27

3.3 - SPDT Switch Control ............................................................................................ 28

3.3 (a) - Set SPDT Switch State ...................................................................................................... 29

3.3 (b) - Get SPDT Switch State ..................................................................................................... 30

3.3 (c) - Set All SPDT Switch States ............................................................................................... 31

3.3 (d) - Get All SPDT Switch States .............................................................................................. 33

3.4 - SP4T Switch Control ............................................................................................. 35

3.4 (a) - Set SP4T Switch State ...................................................................................................... 36

3.4 (b) - Get SP4T Switch State ..................................................................................................... 37

3.4 (c) - Set All SP4T Switch States ................................................................................................ 38

3.4 (d) - Get All SP4T Switch States ............................................................................................... 40

3.5 - SP6T Switch Control ............................................................................................. 42

3.5 (a) - Set SP6T Switch State ...................................................................................................... 43

3.5 (b) - Get SP6T Switch State ..................................................................................................... 44

3.5 (c) - Set All SP6T Switch States ................................................................................................ 45

3.5 (d) - Get All SP6T Switch States ............................................................................................... 47

3.6 - Transfer Switch Control ....................................................................................... 49

3.6 (a) - Set Transfer Switch State ................................................................................................ 50

3.6 (b) - Get Transfer Switch State................................................................................................ 51

3.6 (c) - Set All Transfer Switch States .......................................................................................... 52

3.6 (d) - Get All Transfer Switch States ......................................................................................... 54

3.7 - Switch Start-Up and Counter Properties ............................................................... 56

3.7 (a) - Set Switch Start-Up Mode ............................................................................................... 57

3.7 (b) - Get Switch Start-Up Mode .............................................................................................. 58

3.7 (c) - Get Switch Counter .......................................................................................................... 59

3.8 - Component Labels ............................................................................................... 61

3.8 (a) - Set Component Label ...................................................................................................... 61

Test Solutions - Programming Manual

Modular Test Systems

Page 3

4-Apr-17 (A6)

3.8 (b) - Get Component Label ..................................................................................................... 62

4 - Operating in a Windows Environment via USB ......................................... 63

4.1 - The DLL (Dynamic Link Library) Concept ............................................................... 63

4.1 (a) - ActiveX COM Object ........................................................................................................ 64

4.1 (b) - Microsoft.NET Class Library ............................................................................................ 66

4.2 - Referencing the DLL (Dynamic Linked Library) ...................................................... 67

4.3 - Summary of DLL Functions ................................................................................... 68

4.3 (a) - USB Control Functions ..................................................................................................... 68

4.3 (b) - Ethernet Configuration Functions ................................................................................... 68

4.4 - DLL Functions for USB Control.............................................................................. 69

4.4 (a) - Connect by Serial Number ............................................................................................... 69

4.4 (b) - Connect by Address......................................................................................................... 70

4.4 (c) - Disconnect ....................................................................................................................... 71

4.4 (d) - Read Model Name ........................................................................................................... 72

4.4 (e) - Read Serial Number ......................................................................................................... 73

4.4 (f) - Set USB Address ............................................................................................................... 74

4.4 (g) - Get USB Address .............................................................................................................. 75

4.4 (h) - Get List of Connected Serial Numbers ............................................................................ 76

4.4 (i) - Get List of Available Addresses ........................................................................................ 77

4.4 (j) - Get Software Connection Status ...................................................................................... 78

4.4 (k) - Get USB Connection Status ............................................................................................. 79

4.4 (l) - Send SCPI Command ........................................................................................................ 80

4.4 (m) - Get Firmware ................................................................................................................. 81

4.4 (n) - Get Firmware Version (Antiquated) ................................................................................ 82

4.5 - DLL Functions for Ethernet Configuration ............................................................. 83

4.5 (a) - Get Ethernet Configuration ............................................................................................. 83

4.5 (b) - Get IP Address ................................................................................................................. 85

4.5 (c) - Get MAC Address ............................................................................................................. 87

4.5 (d) - Get Network Gateway ..................................................................................................... 89

4.5 (e) - Get Subnet Mask ............................................................................................................. 91

4.5 (f) - Get TCP/IP Port ................................................................................................................ 93

4.5 (g) - Get DHCP Status .............................................................................................................. 94

4.5 (h) - Get Password Status ....................................................................................................... 95

4.5 (i) - Get Password .................................................................................................................... 96

4.5 (j) - Save IP Address ................................................................................................................ 97

4.5 (k) - Save Network Gateway ................................................................................................... 98

4.5 (l) - Save Subnet Mask ............................................................................................................ 99

4.5 (m) - Save TCP/IP Port ........................................................................................................... 100

4.5 (n) - Use DHCP....................................................................................................................... 101

4.5 (o) - Use Password ................................................................................................................ 102

4.5 (p) - Set Password ................................................................................................................. 103

5 - Operating in a Linux Environment via USB .............................................. 104

5.1 - Summary of Commands ...................................................................................... 104

5.2 - Detailed Description of Commands ..................................................................... 105

5.2 (a) - Get Device Model Name ............................................................................................... 105

5.2 (b) - Get Device Serial Number ............................................................................................. 106

5.2 (c) - Send SCPI Command ...................................................................................................... 107

5.2 (d) - Get Firmware ................................................................................................................ 110

5.2 (e) - Get Internal Temperature ............................................................................................. 111

Test Solutions - Programming Manual

Modular Test Systems

Page 4

4-Apr-17 (A6)

6 - Ethernet Control over IP Networks ......................................................... 113

6.1 - Configuring Ethernet Settings ............................................................................. 113

6.2 - Ethernet Communication .................................................................................... 114

6.2 (a) - Sending SCPI Commands/Queries Using HTTP ............................................................. 114

6.2 (b) - Sending SCPI/Commands/Queries Using Telnet ........................................................... 115

6.2 (c) - Device Discovery Using UDP .......................................................................................... 116

7 - Program Examples & Tutorials ............................................................... 118

7.1 - Perl Programming ............................................................................................... 118

7.1 (a) - Ethernet HTTP Connection Using Perl's LWP Simple Interface ..................................... 118

7.1 (b) - USB Connection Using the ActiveX DLL in 32-bit Perl Distributions ............................. 118

7.1 (c) - Work-Around for 64-bit Perl Distributions Using USB Connection ............................... 119

7.2 - C# Programming ................................................................................................. 120

7.2 (a) - Creating an Executable Using the .Net DLL in C# for USB Control ................................ 120

7.3 - LabVIEW ............................................................................................................. 121

7.3 (a) - Creating a LabVIEW VI for USB Control with the ActiveX DLL ....................................... 121

Test Solutions - Programming Manual

Modular Test Systems

Page 5

4-Apr-17 (A6)

1 - Overview

This Programming Manual is intended for customers wishing to create their own interface for Mini-

Circuits' ZTM & RCM Series modular test systems. For instructions on using the supplied GUI program, or connecting the hardware, please see the User Guide at: http://www.minicircuits.com/support/software_download.html

.

Mini-Circuits offers support over a variety of operating systems, programming environments and third party applications.

Support for Windows® operating systems is provided through the Microsoft®.NET® and ActiveX® frameworks to allow the user to develop customized control applications. Support for Linux® operating systems is accomplished using the standard libhid and libusb libraries.

Mini-Circuits has experience with a wide variety of environments including (but not limited to):

 Visual Basic®, Visual C#®, Visual C++®

 Delphi®

 Borland C++®

 CVI®

 LabVIEW®

 MATLAB®

 Python®

 Agilent VEE®

The software package includes a GUI program, ActiveX and .NET DLL files, Linux support, project examples for third party software, and detailed user manuals. The latest package is available for download at: http://www.minicircuits.com/support/software_download.html

For details on individual models, application notes, GUI installation instructions and user guides please see: http://www.minicircuits.com/products/PortableTestEquipment.shtml

Files made available for download from the Mini-Circuits website are subject to Mini-Circuits’ terms of use which are available on the website.

Test Solutions - Programming Manual

Modular Test Systems

Page 6

4-Apr-17 (A6)

2 - Programming with Mini-Circuits' Modular Test Systems

The ZTM & RCM Series modular concept is a flexible test system that can be easily configured to a user’s requirements with combinations of high reliability mechanical switches and programmable attenuators.

2.1 - Control Options

Communication with the system can be accomplished in a number of ways:

1. Using the provided ActiveX or .Net API objects (DLL files) on a Windows operating system

(see Operating in a Windows Environment via USB )

2. Using the USB interrupt codes on a Linux operating system (see Operating in a Linux

Environment via USB )

3. Using HTTP or Telnet communication over an Ethernet connection (see Ethernet Control over

IP Networks ), which is largely independent of the operating system

In all cases the full functionality of the system and the constituent test components is accessible

using a command set based on SCPI (see SCPI Commands for Control of Modular Test Components ).

2.2 - Addressing Individual Test Components

The system is logically arranged with a series of component windows on the front panel, each of which being able to accommodate components in up to 2 sub-locations (labelled A and B). The ZTM

Series has 6 component windows (labelled 1 to 6) and the RCM Series has 3 (labelled 1 to 3). Each window can be specified with the following components:

 1 or 2 high reliability, mechanical SPDT switches (DC-18GHz)

 1 or 2 high reliability, mechanical transfer switches (DC-18GHz)

 1 high reliability, mechanical SP4T switch (DC-18GHz)

 1 high reliability, mechanical SP6T switch (DC-12GHz)

 1 or 2 programmable attenuators: o 0 to 120dB (0.25dB step size) covering 1MHz to 4GHz o 0 to 30, 60, 90 or 110dB (0.25dB step size) covering 1MHz to 6GHz o 0 to 30, 60 or 90dB (0.25dB step size) covering 1MHz to 8GHz

Component

SPDT Switch

Designator

SPDT

Number per Window (Windows 1 to 6)

1 or 2 (in locations A and B)

SP4T Switch

SP6T Switch

Transfer Switch

SP4T

SP6T

MTS

Programmable Attenuator RUDAT

Table 1: ZTM Series Component Designators

1 only

1 only

1 or 2 (in locations A and B)

1 or 2 (in locations A and B)

Notes:

1. Where only 1 component is present in a window, for example where a single programmable attenuator or SPDT switch is located in window 1, the “A” or “B” sub-location is not required so the location can be addressed simply as window 1

2. If the “A” or “B” sub-location is omitted when there are 2 components in a given slot, the hardware will default to controlling sub-location “A”

Test Solutions - Programming Manual

Modular Test Systems

Page 7

4-Apr-17 (A6)

3. A full window is required for SP4T and SP6T switches so the “A” and “B” sub-locations do not apply; only the integer window number is needed

4. Transfer switches and SPDT switches accept the same command arguments so an “SPDT” command addressed to an “MTS” location will still operate the switch (and vice versa)

2.3 - Example ZTM Series Configuration

Fig 1: Example ZTM Series Front Panel Configuration

2B

3

4A

4B

5A

5B

The example front panel layout of figure 1 is arranged with two SP4T switches, four SPDT switches and four programmable attenuators in the following locations:

ZTM Series

Window

Component

1

2A

SP4T Switch

SPDT Switch

6A

6B

SPDT Switch

SP4T Switch

SPDT Switch

SPDT Switch

Programmable Attenuator

Programmable Attenuator

Programmable Attenuator

Programmable Attenuator

Table 2: Example ZTM Series Configuration with Component Window Locations

Test Solutions - Programming Manual

Modular Test Systems

Page 8

4-Apr-17 (A6)

2.4 - Example RCM Series Configuration

Fig 2: Example RCM Series Configuration

The example front panel layout of figure 2 is arranged with six programmable attenuators in the following locations:

RCM Series

Window

Component

1A

1B

2A

6GHz Programmable Attenuator (0 to 30 dB)

6GHz Programmable Attenuator (0 to 30 dB)

6GHz Programmable Attenuator (0 to 60 dB)

2B 6GHz Programmable Attenuator (0 to 60 dB)

3A 6GHz Programmable Attenuator (0 to 110 dB)

3B 6GHz Programmable Attenuator (0 to 110 dB)

Table 3: Example RCM Series Configuration with Component Window Locations

Test Solutions - Programming Manual

Modular Test Systems

Page 9

4-Apr-17 (A6)

3 - SCPI Commands for Control of Modular Test Components

The main method of communication with the ZTM & RCM Series modular test systems is through a series of SCPI commands. SCPI (Standard Commands for Programmable

Instruments) is a common method for controlling instrumentation products.

The SCPI commands are sent as an ASCII text string (up to 63 characters) in the below format:

: [designator] : [location] : [command] : [value]

Where:

[designator]

= the short-name of the component to be controlled (see table 1)

[location]

= the location of the component to be controlled

[command]

= the command/query to send

[

value]

= the value (if applicable) to set

Where a SCPI command is sent to query a property of the full modular test system, rather than an individual component, the Designator and Window parameters are not used (for

example Get Internal Temperature ).

Commands can be sent in upper or lower case and the return value will be an ASCII text string.

These commands and queries can be sent using the DLL function Send SCPI Command when

the system is connected via the USB interface in a Microsoft Windows environment, or using

the USB interrupt commands on a Linux system (see Linux Send SCPI Command ). In addition,

SCPI commands can also be sent using HTTP get/post commands or Telnet over a TCP/IP

network when the system is connected via the Ethernet RJ45 port (see Ethernet

Communication ).

Test Solutions - Programming Manual

Modular Test Systems

Page 10

4-Apr-17 (A6)

3.1 - ZTM Series System Operations

: [query]

The following queries provide information regarding the modular test system rather than the individual test components, so there is no location or component designator to send with the command.

Description Command/Query a

Get Model Name

MN?

SN?

CONFIG:APP? b

Get Serial Number

c

Get Configuration

d

Get Firmware

e

Get Internal Temperature

f

Get Heat Alarm

g

Save Counters & States

FIRMWARE?

T [sensor] ?

HEATALARM?

OPERATIONDATA:SAVE

Test Solutions - Programming Manual

Modular Test Systems

Page 11

4-Apr-17 (A6)

3.1 (a) - Get Model Name

Description

Returns the full Mini-Circuits part number of the connected system.

Command Syntax

: MN?

Return String

MN= [model]

Variable

[model]

Description

Full model name of the system (for example, “ZTM-

999”)

Examples

String to Send

:MN?

DLL Implementation:

HTTP Implementation:

String Returned

MN=ZTM-999

Send_SCPI(":MN?", RetStr)

http://10.10.10.10/:MN?

See Also

Get Serial Number

Test Solutions - Programming Manual

Modular Test Systems

Page 12

4-Apr-17 (A6)

3.1 (b) - Get Serial Number

Description

Returns the serial number of the connected system.

Command Syntax

:SN?

Return String

SN= [serial]

Variable

[serial]

Description

Serial number of the system (for example,

“11401010001”)

Examples

String to Send

:SN?

See Also

DLL Implementation:

HTTP Implementation:

Get Model Name

String Returned

SN=11401010001

Send_SCPI(":SN?", RetStr)

http://10.10.10.10/:SN?

Test Solutions - Programming Manual

Modular Test Systems

Page 13

4-Apr-17 (A6)

3.1 (c) - Get Configuration

Description

Returns a list of integer codes (separated by semi-colons) indicating the component(s) mounted in each window of the system. The possible integer codes are:

0 = No component in this window

1 = SPDT in sub-location A only

2 = SPDT in sub-location B only

3 = SPDT in both sub-locations A and B

4 = SP4T

5 = MTS in sub-location A only

6 = MTS in sub-location B only

7 = MTS in both sub-locations A and B

8 = Attenuator in sub-location A only

9 = Attenuator in sub-location B only

10 = Attenuator in both sub-locations A and B

11 = SP6T

Command Syntax

:CONFIG:APP?

Return String

APP= [window1] ; [window2] ; [window3] ; [window4] ; [window5] ; [window6]

Variable

[window1]

[window2]

[window3]

[window4]

[window5]

[window6]

Description

Integer code indicating the component(s) in window 1

Integer code indicating the component(s) in window 2

Integer code indicating the component(s) in window 3

Integer code indicating the component(s) in window 4

Not applicable to RCM Series

Integer code indicating the component(s) in window 5

Not applicable to RCM Series

Integer code indicating the component(s) in window 6

Not applicable to RCM Series

Test Solutions - Programming Manual

Modular Test Systems

Page 14

4-Apr-17 (A6)

Examples

String to Send

:CONFIG:APP?

:CONFIG:APP?

String Returned

APP=4;3;4;3;10;10

APP=10;10;10

“APP=4;3;4;3;10;10” would be returned for the ZTM Series example in figure 1, indicating:

 Window 1 = SP4T switch

 Window 2 = Two SPDT switches

 Window 3 = SP4T switch

 Window 4 = Two SPDT switches

 Window 5 = Two attenuators

 Window 6 = Two attenuators

“APP=10;10;10” would be returned for the RCM Series example in figure 2, indicating:

 Window 1 = Two attenuators

 Window 2 = Two attenuators

 Window 3 = Two attenuators

DLL Implementation:

HTTP Implementation:

Send_SCPI(":CONFIG:APP?", RetStr)

http://10.10.10.10/:CONFIG:APP?

Test Solutions - Programming Manual

Modular Test Systems

Page 15

4-Apr-17 (A6)

3.1 (d) - Get Firmware

Description

Returns the firmware version of the system.

Command Syntax

:FIRMWARE?

Return String

FIRMWARE= [firmware]

Variable

[firmware]

Description

Firmware version name (for example, “A1”)

Examples

String to Send

:FIRMWARE?

DLL Implementation:

HTTP Implementation:

String Returned

FIRMWARE=A1

Send_SCPI(":FIRMWARE?", RetStr)

http://10.10.10.10/:FIRMWARE?

Test Solutions - Programming Manual

Modular Test Systems

Page 16

4-Apr-17 (A6)

3.1 (e) - Get Internal Temperature

Description

Returns the internal temperature of the modular test system, measured at the control board.

Command Syntax

:TS0?

Return String

[temperature]

Variable

[temperature]

Description

The temperature returned from the specified sensor in degrees Celsius

Examples

String to Send

:TS0?

DLL Implementation:

HTTP Implementation:

String Returned

25.50

Send_SCPI(":TS0?", RetStr)

http://10.10.10.10/:TS0?

See Also

Get Heat Alarm

Test Solutions - Programming Manual

Modular Test Systems

Page 17

4-Apr-17 (A6)

3.1 (f) - Get Heat Alarm

Description

Returns an alarm code relating to the internal temperature of the modular test system.

Command Syntax

:HEATALARM?

Return String

[alarm]

Variable

[alarm]

Value

0

1

Description

Internal temperature within normal limits

Internal temperature has exceeded the factory defined limit (65°C)

Examples

String to Send

:HEATALARM?

See Also

DLL Implementation:

HTTP Implementation:

Get Internal Temperature

String Returned

0

Send_SCPI(":HEATALARM?", RetStr)

http://10.10.10.10/:HEATALARM?

Test Solutions - Programming Manual

Modular Test Systems

Page 18

4-Apr-17 (A6)

3.1 (g) - Save Counters & States

Description

Transfers any operation data from temporary to permanent memory. The data includes:

1. Last switch states

2. Last attenuation values

3. Latest switch counters

This command should be sent following completion of all switch / attenuator sequences and prior to powering off the system in order to preserve the latest data. During normal operation, this data is internally stored in volatile memory but automatically updated into permanent memory every 3 minutes.

Requirements

Firmware Version

A8 to A99

B2 or later

Serial Number Range

Up to 11412319999

From 11501010000

Command Syntax

:OPERATIONDATA:SAVE

Return String

[status]

Variable

[status]

Value

0 - Failed

1 - Success

2 - Fail

Description

Command failed

Command completed successfully

Command already sent within previous 3 minutes (wait and try again)

Examples

String to Send

:OPERATIONDATA:SAVE

String Returned

1 - Success

DLL Implementation:

HTTP Implementation:

See Also

Set Start-Up Attenuation Mode

Get Start-Up Attenuation Mode

Set Switch Start-Up Mode

Get Switch Start-Up Mode

Get Switch Counter

Send_SCPI(":OPERATIONDATA:SAVE", RetStr)

http://10.10.10.10/:OPERATIONDATA:SAVE

Test Solutions - Programming Manual

Modular Test Systems

Page 19

4-Apr-17 (A6)

3.2 - Programmable Attenuator Control

:RUDAT: [location] : [command] : [value]

The following commands and queries allow control of a specific programmable attenuator within the modular test system. The component designator “RUDAT” should be used along with the location of the attenuator within the system (for example “1A” or “1B” where there are 2 attenuators in window 1, or just “1” when there is only a single attenuator in window

1).

Description Command/Query a

Set Attenuation

:ATT: [value] b

Get Attenuation

c

Set Start-Up Attenuation Mode

:ATT?

:STARTUPATT:INDICATOR: [mode] d

Get Start-Up Attenuation Mode

:STARTUPATT:INDICATOR?

e

Set Start-Up Attenuation Value

:STARTUPATT:VALUE: [value] f

Get Start-Up Attenuation Value

:STARTUPATT:VALUE?

g

Get Max Attenuation

:MAX?

Test Solutions - Programming Manual

Modular Test Systems

Page 20

4-Apr-17 (A6)

3.2 (a) - Set Attenuation

Description

Set the attenuation of a specific programmable attenuator.

Command Syntax

:ATT: [value]

Variable

[value]

Description

The attenuation to set in dB (up to 2 decimal places).

Return String

[status]

Variable

[status]

Value

0 - Failed

1 - Success

Examples

String to Send

:RUDAT:1A:ATT:70.25

:RUDAT:2:ATT:0

Description

Command failed (attenuation not set)

Command completed successfully

String Returned

1 - Success

1 - Success

DLL Implementation:

HTTP Implementation:

See Also

Get Attenuation

Get Maximum Attenuation

Send_SCPI(":RUDAT:1A:ATT:70.25", RetStr)

http://10.10.10.10/:RUDAT:1A:ATT:70.25

Test Solutions - Programming Manual

Modular Test Systems

Page 21

4-Apr-17 (A6)

3.2 (b) - Get Attenuation

Description

Read the attenuation of a specific programmable attenuator.

Command Syntax

:ATT?

Return String

[value]

Variable

[value]

Description

The attenuation setting (in dB) as a string of ASCII characters

Examples

String to Send

:RUDAT:1A:ATT?

:RUDAT:2:ATT?

String Returned

70.25

0.00

DLL Implementation:

HTTP Implementation:

See Also

Set Attenuation

Get Maximum Attenuation

Send_SCPI(":RUDAT:1A:ATT?", RetStr)

http://10.10.10.10/:RUDAT:1A:ATT?

Test Solutions - Programming Manual

Modular Test Systems

Page 22

4-Apr-17 (A6)

3.2 (c) - Set Start-Up Attenuation Mode

Description

Sets the start-up mode of a specific attenuator when the system is powered up. The attenuator can be configured to load the last remembered value, a specific fixed value or the maximum possible attenuation.

Command Syntax

:STARTUPATT:INDICATOR: [mode]

Variable

[mode]

Value

L

F

N

Description

Last Value - the attenuator will load the last remembered attenuation

See Save Counters & States for correct operation

Fixed Value - the attenuator will load a fixed value (see

Set Start-Up Attenuation Value)

Normal - the attenuator will load the maximum possible attenuation (this is the default setting)

Return String

[status]

Variable

[status]

Value

0 - Failed

1 - Success

Description

Command failed

Command completed successfully

Examples

String to Send String Returned

:RUDAT:1A:STARTUPATT:INDICATOR:L 1 - Success

:RUDAT:2:STARTUPATT:INDICATOR:N 1 - Success

DLL Implementation:

Send_SCPI(":RUDAT:1A:STARTUPATT:INDICATOR:L", RetStr)

HTTP Implementation:

http://10.10.10.10/:RUDAT:1A:STARTUPATT:INDICATOR:L

See Also

Save Counters & States

Get Start-Up Attenuation Mode

Set Start-Up Attenuation Value

Get Start-Up Attenuation Value

Test Solutions - Programming Manual

Modular Test Systems

Page 23

4-Apr-17 (A6)

3.2 (d) - Get Start-Up Attenuation Mode

Description

Returns the start-up mode of a specific attenuator when the ZTM Series system is powered up. The attenuator can be configured to load the last remembered value, a specific fixed value or the maximum possible attenuation.

Command Syntax

:STARTUPATT:INDICATOR?

Return String

[mode]

Variable Value

[mode]

L

F

N

Description

Last Value - the attenuator will load the last remembered attenuation

See Save Counters & States for correct operation

Fixed Value - the attenuator will load a fixed value (see

Set Start-Up Attenuation Value)

Normal - the attenuator will load the maximum possible attenuation (this is the default setting)

Examples

String to Send String Returned

:RUDAT:1A:STARTUPATT:INDICATOR?

L

:RUDAT:2:STARTUPATT:INDICATOR? N

DLL Implementation:

Send_SCPI(":RUDAT:1A:STARTUPATT:INDICATOR?", RetStr)

HTTP Implementation:

http://10.10.10.10/:RUDAT:1A:STARTUPATT:INDICATOR?

See Also

Save Counters & States

Set Start-Up Attenuation Mode

Set Start-Up Attenuation Value

Get Start-Up Attenuation Value

Test Solutions - Programming Manual

Modular Test Systems

Page 24

4-Apr-17 (A6)

3.2 (e) - Set Start-Up Attenuation Value

Description

Used in conjunction with Set Start-Up Attenuation Mode to set the start-up attenuation

value for a specific attenuator. This is the initial attenuation setting that will be used when the ZTM Series system is powered up.

Command Syntax

:STARTUPATT:VALUE: [att]

Variable

[att]

Description

The start-up attenuation setting to be loaded on power up (only valid when the attenuator “Start-Up

Attenuation Mode” is set to mode “F” (fixed value).

Return String

[status]

Variable

[status]

Value

0 - Failed

1 - Success

Description

Command failed

Command completed successfully

Examples

String to Send String Returned

:RUDAT:1A:STARTUPATT:VALUE:15 1 - Success

:RUDAT:2:STARTUPATT:VALUE:20.25 1 - Success

DLL Implementation:

Send_SCPI(":RUDAT:1A:STARTUPATT:VALUE:15", RetStr)

HTTP Implementation: http://10.10.10.10/:RUDAT:1A:STARTUPATT:VALUE:15

See Also

Set Start-Up Attenuation Mode

Get Start-Up Attenuation Mode

Get Start-Up Attenuation Value

Test Solutions - Programming Manual

Modular Test Systems

Page 25

4-Apr-17 (A6)

3.2 (f) - Get Start-Up Attenuation Value

Description

Returns the start-up attenuation value to be used for a specific attenuator when the ZTM

Series system is powered on. This setting only applies when the attenuator “Start-Up

Attenuation Mode” is set to mode “F” (fixed value).

Command Syntax

:STARTUPATT:VALUE?

Return String

[mode]

Variable Value

[mode]

L

F

N

Description

Last Value - the attenuator will load the last remembered attenuation

Fixed Value - the attenuator will load a fixed value (see

Set Start-Up Attenuation Value)

Normal - the attenuator will load the maximum possible attenuation (this is the default setting)

Examples

String to Send String Returned

:RUDAT:1A:STARTUPATT:VALUE?

15.00

:RUDAT:2:STARTUPATT:VALUE? 20.25

DLL Implementation:

HTTP Implementation:

Send_SCPI(":RUDAT:1A:STARTUPATT:VALUE?", RetStr)

http://10.10.10.10/:RUDAT:1A:STARTUPATT:VALUE?

See Also

Set Start-Up Attenuation Mode

Get Start-Up Attenuation Mode

Set Start-Up Attenuation Value

Test Solutions - Programming Manual

Modular Test Systems

Page 26

4-Apr-17 (A6)

3.2 (g) - Get Maximum Attenuation

Description

Read the maximum possible attenuation setting of a specific programmable attenuator.

Command Syntax

:MAX?

Return String

[value]

Variable

[value]

Description

The maximum attenuation setting (dB) as a string of

ASCII characters

Examples

String to Send

:RUDAT:1A:MAX?

:RUDAT:2:MAX?

String Returned

95.00

95.00

DLL Implementation:

HTTP Implementation:

See Also

Set Attenuation

Get Attenuation

Send_SCPI(":RUDAT:1A:MAX?", RetStr)

http://10.10.10.10/:RUDAT:1A:MAX?

Test Solutions - Programming Manual

Modular Test Systems

Page 27

4-Apr-17 (A6)

3.3 - SPDT Switch Control

:SPDT: [location] : [command] : [value]

:SPDT: [location] : [query] ?

The following commands and queries allow control of a specific SPDT switch within the modular test system. The component designator “SPDT” should be used along with the location of the switch within the system (for example “1A” or “1B” where there are 2 switches in window 1, or just “1” when there is only a single switch in window 1). The location “ALL” should be used when setting or querying the states of all switches.

Description Command/Query a

Set SPDT Switch State

SPDT: [location] :STATE: [value] b

Get SPDT Switch State

c

Set All SPDT Switch States

SPDT: [location] :STATE?

SPDT:ALL:STATE: [values] d

Get All SPDT Switch States

SPDT:ALL:STATE?

Test Solutions - Programming Manual

Modular Test Systems

Page 28

4-Apr-17 (A6)

3.3 (a) - Set SPDT Switch State

Description

Set the state of a specific SPDT switch.

Command Syntax

:STATE: [value]

Variable

[value]

Value

1

2

Description

Com port connected to port 1

Com port connected to port 2

Return String

[status]

Variable

[status]

Value

0 - Failed

1 - Success

Examples

String to Send

:SPDT:1A:STATE:2

:SPDT:2:STATE:1

Description

Command failed (switch not set)

Command completed successfully

String Returned

1 - Success

1 - Success

DLL Implementation:

HTTP Implementation:

See Also

Get SPDT Switch State

Set All SPDT Switch States

Get All SPDT Switch States

Send_SCPI(":SPDT:1A:STATE:2", RetStr)

http://10.10.10.10/:SPDT:1A:STATE:2

Test Solutions - Programming Manual

Modular Test Systems

Page 29

4-Apr-17 (A6)

3.3 (b) - Get SPDT Switch State

Description

Read the state of a specific SPDT switch.

Command Syntax

:STATE?

Return String

[value]

Variable

[value]

Examples

String to Send

:SPDT:1A:STATE?

:SPDT:2:STATE?

Value

1

2

Description

Com port connected to port 1

Com port connected to port 2

String Returned

2

1

DLL Implementation:

HTTP Implementation:

See Also

Set SPDT Switch State

Set All SPDT Switch States

Get All SPDT Switch States

Send_SCPI(":SPDT:1A:STATE?", RetStr)

http://10.10.10.10/:SPDT:1A:STATE?

Test Solutions - Programming Manual

Modular Test Systems

Page 30

4-Apr-17 (A6)

3.3 (c) - Set All SPDT Switch States

Description

Simultaneously sets the state of all SPDT switches. The switch states are represented by a string of up to 12 characters for the ZTM Series and up to 6 characters for the RCM Series, with each character corresponding to an SPDT location in the test system, from location 1A,

1B, 2A, to 6B.

Note: The SPDT and transfer switches accept the same command arguments so a “Set All

SPDT Switches” command would also set a transfer switch if a state is specified for a location containing a transfer switch.

Command Syntax

ZTM Series:

:STATE: [1A][1B][2A][2B][3A][3B][4A][4B][5A][5B][6A][6B]

RCM Series:

:STATE: [1A][1B][2A][2B][3A][3B]

Variable Value

[1A] to [6B] 1

2 x

Description

Set SPDT state in this location to “Com to port 1”

Set SPDT state in this location to “Com to port 2”

Leave SPDT in this location unchanged / No SPDT in this location

Note: The string of switch states must always be supplied starting with location 1A but digits on the right-hand side can be omitted if the respective switch states are to be left unchanged or if the location does not contain an SPDT switch.

Return String

[status]

Variable

[status]

Value

0 - Failed

1 - Success

Description

Command failed (switch not set)

Command completed successfully

Test Solutions - Programming Manual

Modular Test Systems

Page 31

4-Apr-17 (A6)

Examples

The example ZTM Series configuration of figure 3 has SPDT switches in locations 2A, 2B, 4A and 4B so their states are represented by the 3 rd

, 4 th

, 7 th

and 8 th

characters in the string of switch states. All other characters should be “x” since those locations do not contain an

SPDT switch.

Fig 3 - Example configuration with SPDT switches in locations 2A, 2B, 4A and 4B

To set the SPDT switches in locations 2A and 2B to state 2, whilst leaving the states of the

SPDT switches in locations 4A and 4B unchanged, the string to send is “xx22xxxxxxxx”.

To set all 4 SPDT switches in locations 2A, 2B, 4A and 4B to states 2, 1, 2 and 1 respectively, the string to send is “xx21xx21xxxx”.

Note: In both cases above, the trailing “x” characters (on the right-hand side of the string) can be omitted.

String to Send

:SPDT:ALL:STATE:xx22

String Returned

1 - Success

:SPDT:ALL:STATE:xx21xx21 1 - Success

DLL Implementation:

HTTP Implementation:

Send_SCPI(":SPDT:ALL:STATE:xx21xx21", RetStr)

http://10.10.10.10/:SPDT:ALL:STATE:xx21xx21

See Also

Set SPDT Switch State

Get SPDT Switch State

Get All SPDT Switch States

Test Solutions - Programming Manual

Modular Test Systems

Page 32

4-Apr-17 (A6)

3.3 (d) - Get All SPDT Switch States

Description

Returns the state of all SPDT switches. The switch states are represented by a string of 12 characters for the ZTM Series and 6 characters for the RCM Series, with each character corresponding to an SPDT location in the system, from location 1A, 1B, 2A, to 6B.

Note: The states of any transfer switches in the system will also be reported in the string.

Command Syntax

:STATE?

Return String

ZTM Series:

[1A][1B][2A][2B][3A][3B][4A][4B][5A][5B][6A][6B]

RCM Series:

[1A][1B][2A][2B][3A][3B]

Variable Value

[1A] to [6B] 1

2 x

Description

SPDT state in this location is “Com to port 1”

SPDT state in this location is “Com to port 2”

No SPDT or transfer switch in this location

Test Solutions - Programming Manual

Modular Test Systems

Page 33

4-Apr-17 (A6)

Example

The example ZTM Series configuration of figure 4 has SPDT switches in locations 2A, 2B, 4A and 4B so their states are represented by the 3 rd

, 4 th

, 7 th

and 8 th

characters in the returned string of switch states. All other characters can be disregarded.

Fig 4 - Example configuration with SPDT switches in locations 2A, 2B, 4A and 4B

String to Send

:SPDT:ALL:STATE?

String Returned

xx21xx21xxxx

A return string of “xx21xx21xxxx” indicates the following SPDT switch states:

SPDT Window State

2A 2

Description

Com connected to port 2

2B

4A

1

2

Com connected to port 1

Com connected to port 2

Com connected to port 1 4B 1

DLL Implementation:

HTTP Implementation:

See Also

Send_SCPI(":SPDT:ALL:STATE?", RetStr)

http://10.10.10.10/:SPDT:ALL:STATE?

Set SPDT Switch State

Get SPDT Switch State

Set All SPDT Switch States

Test Solutions - Programming Manual

Modular Test Systems

Page 34

4-Apr-17 (A6)

3.4 - SP4T Switch Control

:SP4T: [window] : [command] : [value]

:SP4T: [window] : [query] ?

The following commands and queries allow control of a specific SP4T switch within the modular test system. The component designator “SP4T” should be used along with the location of the switch within system (windows 1 to 6). The location “ALL” should be used when setting or querying the states of all switches.

Description Command/Query a

Set SP4T Switch State

:SP4T: [window] :STATE: [value] b

Get SP4T Switch State

c

Set All SP4T Switch States

:SP4T: [window] :STATE?

SP4T:ALL:STATE: [values] c

Get All SP4T Switch States

SP4T:ALL:STATE?

Test Solutions - Programming Manual

Modular Test Systems

Page 35

4-Apr-17 (A6)

3.4 (a) - Set SP4T Switch State

Description

Set the state of a specific SP4T switch.

Command Syntax

:STATE: [value]

Variable

[value]

Value

0

1

2

3

4

Return String

[status]

Variable

[status]

Value

0 - Failed

1 - Success

Examples

String to Send

:SP4T:1:STATE:3

:SP4T:2:STATE:0

Description

All ports disconnected

Com port connected to port 1

Com port connected to port 2

Com port connected to port 3

Com port connected to port 4

Description

Command failed (switch not set)

Command completed successfully

String Returned

1 - Success

1 - Success

DLL Implementation:

HTTP Implementation:

See Also

Get SP4T Switch State

Set All SP4T Switch States

Get All SP4T Switch States

Send_SCPI(":SP4T:1:STATE:3", RetStr)

http://10.10.10.10/:SP4T:1:STATE:3

Test Solutions - Programming Manual

Modular Test Systems

Page 36

4-Apr-17 (A6)

3.4 (b) - Get SP4T Switch State

Description

Read the state of a specific SP4T switch.

Command Syntax

:STATE?

Return String

[value]

Variable

[value]

Examples

String to Send

:SP4T:1:STATE?

:SP4T:2:STATE?

3

4

Value

0

1

2

Description

All ports disconnected

Com port connected to port 1

Com port connected to port 2

Com port connected to port 3

Com port connected to port 4

String Returned

1

0

DLL Implementation:

HTTP Implementation:

See Also

Set SP4T Switch State

Set All SP4T Switch States

Get All SP4T Switch States

Send_SCPI(":SP4T:1:STATE?", RetStr)

http://10.10.10.10/:SP4T:1:STATE?

Test Solutions - Programming Manual

Modular Test Systems

Page 37

4-Apr-17 (A6)

3.4 (c) - Set All SP4T Switch States

Description

Simultaneously sets the state of all SP4T switches. The switch states are represented by a string of up to 6 characters for the ZTM Series and up to 3 characters for the RCM Series, with each character corresponding to an SP4T location in the system.

Command Syntax

ZTM Series:

:STATE: [1][2][3][4][5][6]

RCM Series:

:STATE: [1][2][3]

Variable

[1] to [6]

Value

0

1

2

3

4

Description

Disconnect all ports for the SP4T in this location

Set SP4T state in this location to “Com to port 1”

Set SP4T state in this location to “Com to port 2”

Set SP4T state in this location to “Com to port 3”

Set SP4T state in this location to “Com to port 4” x

Leave SP4T in this location unchanged / No SP4T in this location

Note: The string of switch states must always be supplied starting with window 1 but digits on the right-hand side can be omitted if the respective switch states are to be left unchanged or if the window does not contain an SP4T switch.

Return String

[status]

Variable

[status]

Value

0 - Failed

1 - Success

Description

Command failed (switch not set)

Command completed successfully

Test Solutions - Programming Manual

Modular Test Systems

Page 38

4-Apr-17 (A6)

Examples

The example ZTM Series configuration of figure 5 has SP4T switches in locations 1 and 3 so their states are represented by the 1 st

and 3 rd

characters in the string of switch states. All other characters should be “x” since those locations do not contain an SP4T switch.

Fig 5 - Example configuration with SP4T switches in locations 1 and 3

To set the SP4T switch in location 1 to state 3, whilst leaving the state of the SP4T switch in location 3 unchanged, the string to send is “3xxxxx”.

To set both SP4T switches in to state 4, the string to send is “4x4xxx”.

Note: In both cases above, the trailing “x” characters (on the right-hand side of the string) can be omitted.

String to Send

:SP4T:ALL:STATE:3

:SP4T:ALL:STATE:4x4

String Returned

1 - Success

1 - Success

DLL Implementation:

HTTP Implementation:

Send_SCPI(":SP4T:ALL:STATE:4x4", RetStr)

http://10.10.10.10/:SP4T:ALL:STATE:4x4

See Also

Set SP4T Switch State

Get SP4T Switch State

Get All SP4T Switch States

Test Solutions - Programming Manual

Modular Test Systems

Page 39

4-Apr-17 (A6)

3.4 (d) - Get All SP4T Switch States

Description

Returns the state of all SP4T switches. The switch states are represented by a string of 6 characters for the ZTM Series and 3 characters for the RCM Series, with each character corresponding to an SP4T location in the system.

Command Syntax

:STATE?

Return String

ZTM Series:

[1][2][3][4][5][6]

RCM Series:

[1][2][3]

Variable

[1] to [6]

Value

0

1

2

3

4 x

Description

All ports for the SP4T in this location disconnected

SP4T state in this location is “Com to port 1”

SP4T state in this location is “Com to port 2”

SP4T state in this location is “Com to port 3”

SP4T state in this location is “Com to port 4”

No SP4T in this location

Test Solutions - Programming Manual

Modular Test Systems

Page 40

4-Apr-17 (A6)

Example

The example ZTM Series configuration of figure 6 has SP4T switches in windows 1 and 3 so their states are represented by the 1 st

and 3 rd

characters in the returned string of switch states. All other characters can be disregarded.

Fig 6 - Example configuration with SP4T switches in windows 1 and 3

String to Send

:SP4T:ALL:STATE?

String Returned

3x0xxx

A return string of “3x0xxx” indicates the following SP4T switch states:

SP4T Window State

1 3

Description

Com connected to port 3

All ports disconnected 3 0

DLL Implementation:

HTTP Implementation:

Send_SCPI(":SP4T:ALL:STATE?", RetStr)

http://10.10.10.10/:SP4T:ALL:STATE?

See Also

Set SP4T Switch State

Get SP4T Switch State

Set All SP4T Switch States

Test Solutions - Programming Manual

Modular Test Systems

Page 41

4-Apr-17 (A6)

3.5 - SP6T Switch Control

:SP6T: [window] : [command] : [value]

:SP6T: [window] : [query] ?

The following commands and queries allow control of a specific SP6T switch within the modular test system. The component designator “SP6T” should be used along with the location of the switch within the system. The location “ALL” should be used when setting or querying the states of all switches.

Description Command/Query a

Set SP6T Switch State

:SP6T: [window] :STATE: [value] b

Get SP6T Switch State

c

Set All SP6T Switch States

:SP6T: [window] :STATE?

SP6T:ALL:STATE: [values] c

Get All SP6T Switch States

SP6T:ALL:STATE?

Test Solutions - Programming Manual

Modular Test Systems

Page 42

4-Apr-17 (A6)

3.5 (a) - Set SP6T Switch State

Description

Set the state of a specific SP6T switch.

Command Syntax

:STATE: [value]

Variable

[value]

4

5

6

Value

0

1

2

3

Description

All ports disconnected

Com port connected to port 1

Com port connected to port 2

Com port connected to port 3

Com port connected to port 4

Com port connected to port 5

Com port connected to port 6

Return String

[status]

Variable

[status]

Value

0 - Failed

1 - Success

Examples

String to Send

:SP6T:1:STATE:3

:SP6T:2:STATE:0

Description

Command failed (switch not set)

Command completed successfully

String Returned

1 - Success

1 - Success

DLL Implementation:

HTTP Implementation:

See Also

Get SP6T Switch State

Set All SP6T Switch States

Get All SP6T Switch States

Send_SCPI(":SP6T:1:STATE:3", RetStr)

http://10.10.10.10/:SP6T:1:STATE:3

Test Solutions - Programming Manual

Modular Test Systems

Page 43

4-Apr-17 (A6)

3.5 (b) - Get SP6T Switch State

Description

Read the state of a specific SP6T switch.

Command Syntax

:STATE?

Return String

[value]

Variable

[value]

Examples

String to Send

:SP6T:1:STATE?

:SP6T:2:STATE?

3

4

5

6

Value

0

1

2

Description

All ports disconnected

Com port connected to port 1

Com port connected to port 2

Com port connected to port 3

Com port connected to port 4

Com port connected to port 5

Com port connected to port 6

String Returned

3

0

DLL Implementation:

HTTP Implementation:

See Also

Set SP6T Switch State

Set All SP6T Switch States

Get All SP6T Switch States

Send_SCPI(":SP6T:1:STATE?", RetStr)

http://10.10.10.10/:SP6T:1:STATE?

Test Solutions - Programming Manual

Modular Test Systems

Page 44

4-Apr-17 (A6)

3.5 (c) - Set All SP6T Switch States

Description

Simultaneously sets the state of all SP6T switches. The switch states are represented by a string of up to 6 characters for the ZTM Series and up to 5 characters for the RCM Series, with each character corresponding to an SP6T location in the system.

Command Syntax

ZTM Series:

:STATE: [1][2][3][4][5][6]

RCM Series:

:STATE: [1][2][3]

Variable

[1] to [6]

Value

0

1

2

3

4

5

6

Description

Disconnect all ports for the SP6T in this window

Set SP6T state in this window to “Com to port 1”

Set SP6T state in this window to “Com to port 2”

Set SP6T state in this window to “Com to port 3”

Set SP6T state in this window to “Com to port 4”

Set SP6T state in this window to “Com to port 5”

Set SP6T state in this window to “Com to port 6”

Variable

[status] x

Note: The string of switch states must always be supplied starting with window 1 but digits on the right-hand side can be omitted if the respective switch states are to be left unchanged or if the window does not contain an SP6T switch.

Return String

[status]

Value

0 - Failed

Leave SP6T in this window unchanged / No SP6T in this window

Description

Command failed (switch not set)

1 - Success Command completed successfully

Test Solutions - Programming Manual

Modular Test Systems

Page 45

4-Apr-17 (A6)

Examples

The example ZTM Series configuration of figure 7 has SP6T switches in windows 1 and 3 so their states are represented by the 1 st

and 3 rd

characters in the string of switch states. All other characters should be “x” since those windows do not contain an SP6T switch.

Fig 7 - Example configuration with SP6T switches in windows 1 and 3

To set the SP6T switch in window 1 to state 3, whilst leaving the state of the SP6T switch in window 3 unchanged, the string to send is “3xxxxx”.

To set both SP6T switches in to state 4, the string to send is “4x4xxx”.

Note: In both cases above, the trailing “x” characters (on the right-hand side of the string) can be omitted.

String to Send

:SP6T:ALL:STATE:3

:SP6T:ALL:STATE:4x4

String Returned

1 - Success

1 - Success

DLL Implementation:

HTTP Implementation:

See Also

Set SP6T Switch State

Get SP6T Switch State

Get All SP6T Switch States

Send_SCPI(":SP6T:ALL:STATE:4x4", RetStr)

http://10.10.10.10/:SP6T:ALL:STATE:4x4

Test Solutions - Programming Manual

Modular Test Systems

Page 46

4-Apr-17 (A6)

3.5 (d) - Get All SP6T Switch States

Description

Returns the state of all SP6T switches. The switch states are represented by a string of 6 characters for the ZTM Series and 3 characters for the RCM Series, with each character corresponding to an SP6T location.

Command Syntax

:STATE?

Return String

ZTM Series:

[1][2][3][4][5][6]

RCM Series:

[1][2][3]

Variable

[1] to [6]

2

3

4

5

Value

0

1

6 x

Description

All ports for the SP6T in this window disconnected

SP6T state in this window is “Com to port 1”

SP6T state in this window is “Com to port 2”

SP6T state in this window is “Com to port 3”

SP6T state in this window is “Com to port 4”

SP6T state in this window is “Com to port 5”

SP6T state in this window is “Com to port 6”

No SP6T in this window

Test Solutions - Programming Manual

Modular Test Systems

Page 47

4-Apr-17 (A6)

Example

The example ZTM Series configuration of figure 8 has SP6T switches in windows 1 and 3 so their states are represented by the 1 st

and 3 rd

characters in the returned string of switch states. All other characters can be disregarded.

Fig 8 - Example configuration with SP6T switches in windows 1 and 3

String to Send

:SP6T:ALL:STATE?

String Returned

3x0xxx

A return string of “3x0xxx” indicates the following SP6T switch states:

SP4T Window State

1 3

Description

Com connected to port 3

3 0

DLL Implementation:

HTTP Implementation:

All ports disconnected

Send_SCPI(":SP6T:ALL:STATE?", RetStr)

http://10.10.10.10/:SP6T:ALL:STATE?

See Also

Set SP6T Switch State

Get SP6T Switch State

Set All SP6T Switch States

Test Solutions - Programming Manual

Modular Test Systems

Page 48

4-Apr-17 (A6)

3.6 - Transfer Switch Control

:MTS: [location] : [command] : [value]

:MTS: [location] : [query] ?

The following commands and queries allow control of a specific transfer switch within the modular test system. The component designator “MTS” should be used along with the location of the switch within the system (for example “1A” or “1B” where there are 2 switches in location 1, or just “1” when there is only a single switch in location 1). The location “ALL” should be used when setting or querying the states of all switches.

Description Command/Query a

Set Transfer Switch State

MTS: [location] :STATE: [value] b

Get Transfer Switch State

MTS: [location] :STATE?

c

Set All Transfer Switch States

MTS:ALL:STATE: [values] d

Get All Transfer Switch States

MTS:ALL:STATE?

Test Solutions - Programming Manual

Modular Test Systems

Page 49

4-Apr-17 (A6)

3.6 (a) - Set Transfer Switch State

Description

Set the state of a specific transfer switch.

Command Syntax

:STATE: [value]

Variable Value

[value]

1

2

Description

Transfer switch in state 1:

 Port J1 connected to port J3

 Port J2 connected to port J4

Transfer switch in state 2:

 Port J1 connected to port J2

 Port J3 connected to port J4

Return String

[status]

Variable

[status]

Examples

String to Send

:MTS:1A:STATE:2

:MTS:2:STATE:1

Value

0 - Failed

1 - Success

Description

Command failed (switch not set)

Command completed successfully

String Returned

1 - Success

1 - Success

DLL Implementation:

HTTP Implementation:

See Also

Get Transfer Switch State

Set All Transfer Switch States

Get All Transfer Switch States

Send_SCPI(":MTS:1A:STATE:2", RetStr)

http://10.10.10.10/:MTS:1A:STATE:2

Test Solutions - Programming Manual

Modular Test Systems

Page 50

4-Apr-17 (A6)

3.6 (b) - Get Transfer Switch State

Description

Read the state of a specific transfer switch.

Command Syntax

:STATE?

Return String

[value]

Variable Value

[value]

1

2

Description

Transfer switch in state 1:

 Port J1 connected to port J3

 Port J2 connected to port J4

Transfer switch in state 2:

 Port J1 connected to port J2

 Port J3 connected to port J4

Examples

String to Send

:MTS:1A:STATE?

:MTS:2:STATE?

String Returned

1

0

DLL Implementation:

HTTP Implementation:

See Also

Set Transfer Switch State

Set All Transfer Switch States

Get All Transfer Switch States

Send_SCPI(":MTS:1A:STATE?", RetStr)

http://10.10.10.10/:MTS:1A:STATE?

Test Solutions - Programming Manual

Modular Test Systems

Page 51

4-Apr-17 (A6)

3.6 (c) - Set All Transfer Switch States

Description

Simultaneously sets the state of all transfer switches. The switch states are represented by a string of up to 12 characters for the ZTM Series or up to 6 characters for the RCM Series, with each character corresponding to a transfer switch location within the system.

Note: The SPDT and transfer switches accept the same command arguments so a “Set All

Transfer Switches” command would also set an SPDT switch if a state is specified for a location containing an SPDT switch.

Command Syntax

ZTM Series:

:STATE: [1A][1B][2A][2B][3A][3B][4A][4B][5A][5B][6A][6B]

RCM Series:

:STATE: [1A][1B][2A][2B][3A][3B]

Variable

[1A]

Value

to [6B] 1

2 x

Description

Set transfer switch to state 1:

 Port J1 connected to port J3

 Port J2 connected to port J4

Set transfer switch to state 2:

 Port J1 connected to port J2

 Port J3 connected to port J4

Leave transfer switch state in this location unchanged

/ No transfer switch in this location

Note: The string of switch states must always be supplied starting with location 1A but digits on the right-hand side can be omitted if the respective switch states are to be left unchanged or if the location does not contain a transfer switch.

Return String

[status]

Variable

[status]

Value

0 - Failed

1 - Success

Description

Command failed (switch not set)

Command completed successfully

Test Solutions - Programming Manual

Modular Test Systems

Page 52

4-Apr-17 (A6)

Examples

The example ZTM Series configuration of figure 9 has transfer switches in locations 2A, 2B,

4A and 4B so their states are represented by the 3 rd

, 4 th

, 7 th

and 8 th

characters in the string of switch states. All other characters should be “x” since those locations do not contain a transfer switch.

Fig 9 - Example configuration with transfer switches in locations 2A, 2B, 4A and 4B

To set the transfer switches in locations 2A and 2B to state 1, whilst leaving the states of the transfer switches in locations 4A and 4B unchanged, the string to send is “xx11xxxxxxxx”.

To set all 4 transfer switches in locations 2A, 2B, 4A and 4B to states 2, 2, 2 and 1 respectively, the string to send is “xx22xx21xxxx”.

Note: In both cases above, the trailing “x” characters (on the right-hand side of the string) can be omitted.

String to Send

:MTS:ALL:STATE:xx11

String Returned

1 - Success

:MTS:ALL:STATE:xx22xx21 1 - Success

DLL Implementation:

HTTP Implementation:

Send_SCPI(":MTS:ALL:STATE:xx22xx21", RetStr)

http://10.10.10.10/:MTS:ALL:STATE:xx22xx21

See Also

Set Transfer Switch State

Get Transfer Switch State

Get All Transfer Switch States

Test Solutions - Programming Manual

Modular Test Systems

Page 53

4-Apr-17 (A6)

3.6 (d) - Get All Transfer Switch States

Description

Returns the state of all transfer switches. The switch states are represented by a string of 12 characters for the ZTM Series or 6 characters for the RCM Series, with each character corresponding to a transfer switch slot sub-location in the system.

Note: The states of any SPDT switches in the ZTM Series system will also be reported in the string.

Command Syntax

:STATE?

Return String

ZTM Series:

[1A][1B][2A][2B][3A][3B][4A][4B][5A][5B][6A][6B]

RCM Series:

[1A][1B][2A][2B][3A][3B]

Variable

[1A]

Value

to [6B] 1

2 x

Description

Transfer switch state in this location is 1:

 Port J1 connected to port J3

 Port J2 connected to port J4

Transfer switch state in this location is 2:

 Port J1 connected to port J2

 Port J3 connected to port J4

No transfer or SPDT switch in this location

Test Solutions - Programming Manual

Modular Test Systems

Page 54

4-Apr-17 (A6)

Example

The example ZTM Series configuration of figure 10 has transfer switches in slots 2A, 2B, 4A and 4B so their states are represented by the 3 rd

, 4 th

, 7 th

and 8 th

characters in the returned string of switch states. All other characters can be disregarded.

Fig 10 - Example configuration with transfer switches in slots 2A, 2B, 4A and 4B

String to Send

:MTS:ALL:STATE?

2A

2B

4A

4B

1

2

1

1

String Returned

xx12xx11xxxx

A return string of “xx12xx11xxxx” indicates the following transfer switch states:

MTS Window State Description

 Port J1 connected to port J3

 Port J2 connected to port J4

 Port J1 connected to port J2

 Port J3 connected to port J4

 Port J1 connected to port J3

 Port J2 connected to port J4

 Port J1 connected to port J3

 Port J2 connected to port J4

DLL Implementation:

HTTP Implementation:

Send_SCPI(":MTS:ALL:STATE?", RetStr)

http://10.10.10.10/:MTS:ALL:STATE?

See Also

Set Transfer Switch State

Get Transfer Switch State

Set All Transfer Switch States

Test Solutions - Programming Manual

Modular Test Systems

Page 55

4-Apr-17 (A6)

3.7 - Switch Start-Up and Counter Properties

:SPDT: [location] : [command] : [value]

:SP4T: [location] : [command] : [value]

:SP6T: [location] : [command] : [value]

:MTS: [location] : [command] : [value]

The following commands and queries enable the user to work with the start-up settings and counter for any given switch in the modular test system. The component designator “SPDT”,

“SP4T, or “MTS” should be used along with the location of the switch within the system.

Description a

Set Switch Start-Up Mode

Command/Query

:STARTUPSW:INDICATOR: [mode] b

Get Switch Start-Up Mode

c

Get Switch Counter

:STARTUPSW:INDICATOR?

:SCOUNTER?

Test Solutions - Programming Manual

Modular Test Systems

Page 56

4-Apr-17 (A6)

3.7 (a) - Set Switch Start-Up Mode

Description

Sets the start-up state for a specific switch when the system is powered up.

Command Syntax

:STARTUPSW:INDICATOR: [mode]

Variable Value

[mode]

L

N

Description

Last Value - the switch will power up with the last remembered switch state

See Save Counters & States for correct operation

Normal - the switch will power up in the default state

(Com port connected to port 1)

Return String

[status]

Variable

[status]

Value

0 - Failed

1 - Success

Description

Command failed

Command completed successfully

Examples

String to Send String Returned

:SPDT:1A:STARTUPSW:INDICATOR:L 1 - Success

:SP4T:1:STARTUPSW:INDICATOR:L 1 - Success

:SP6T:1:STARTUPSW:INDICATOR:L 1 - Success

:MTS:1A:STARTUPSW:INDICATOR:L 1 - Success

DLL Implementation:

Send_SCPI(":SPDT:1A:STARTUPSW:INDICATOR:L", RetStr)

Send_SCPI(":SP4T:1:STARTUPSW:INDICATOR:L", RetStr)

Send_SCPI(":SP6T:1:STARTUPSW:INDICATOR:L", RetStr)

Send_SCPI(":MTS:1A:STARTUPSW:INDICATOR:L", RetStr)

HTTP Implementation: http://10.10.10.10/:SPDT:1A:STARTUPSW:INDICATOR:L http://10.10.10.10/:SP4T:1:STARTUPSW:INDICATOR:L http://10.10.10.10/:SP6T:1:STARTUPSW:INDICATOR:L http://10.10.10.10/:MTS:1A:STARTUPSW:INDICATOR:L

See Also

Save Counters & States

Get Switch Start-Up Mode

Get Switch Counter

Test Solutions - Programming Manual

Modular Test Systems

Page 57

4-Apr-17 (A6)

3.7 (b) - Get Switch Start-Up Mode

Description

Returns the start-up state that a specific switch will use when the system is powered up.

Command Syntax

:STARTUPSW:INDICATOR?

Return String

[mode]

Variable

[mode]

Value

L

N

Description

Last Value - the switch will power up with the last remembered switch state

See Save Counters & States for correct operation

Normal - the switch will power up in the default state

(Com port connected to port 1)

Examples

String to Send String Returned

:SPDT:1A:STARTUPATT:INDICATOR?

L

:SP4T:1:STARTUPATT:INDICATOR? L

:SP6T:1:STARTUPATT:INDICATOR? L

:MTS:1A:STARTUPATT:INDICATOR?

L

DLL Implementation:

Send_SCPI(":SPDT:1A:STARTUPSW:INDICATOR?", RetStr)

Send_SCPI(":SP4T:1:STARTUPSW:INDICATOR?", RetStr)

Send_SCPI(":SP6T:1:STARTUPSW:INDICATOR?", RetStr)

Send_SCPI(":MTS:1A:STARTUPSW:INDICATOR?", RetStr)

HTTP Implementation: http://10.10.10.10/:SPDT:1A:STARTUPSW:INDICATOR? http://10.10.10.10/:SP4T:1:STARTUPSW:INDICATOR? http://10.10.10.10/:SP6T:1:STARTUPSW:INDICATOR? http://10.10.10.10/:MTS:1A:STARTUPSW:INDICATOR?

See Also

Save Counters & States

Set Switch Start-Up Mode

Get Switch Counter

Test Solutions - Programming Manual

Modular Test Systems

Page 58

4-Apr-17 (A6)

3.7 (c) - Get Switch Counter

Description

Returns a counter value indicating the number of switching cycles undertaken in the lifetime of a specific switch.

Note: See Save Counters & States for correct operation.

Command Syntax

:SCOUNTER?

Return String (SPDT and MTS)

[count]

Variable

[count]

Description

The number of switch cycles undertaken in the lifetime of the specified switch

Return String (SP4T and SP6T)

[count1] ; [count2] ; [count3] ; [count4]

Variable

[count1]

[count2]

[count3]

[count4]

[count5]

[count6]

Description

The number of connections to port 1 undertaken in the lifetime of the specified switch

The number of connections to port 2 undertaken in the lifetime of the specified switch

The number of connections to port 3 undertaken in the lifetime of the specified switch

The number of connections to port 4 undertaken in the lifetime of the specified switch

SP6T only. The number of connections to port 5 undertaken in the lifetime of the specified switch

SP6T only. The number of connections to port 6 undertaken in the lifetime of the specified switch

Test Solutions - Programming Manual

Modular Test Systems

Page 59

4-Apr-17 (A6)

Examples

String to Send

:SPDT:1A:SCOUNTER?

:SP4T:1:SCOUNTER?

:SP6T:1:SCOUNTER?

:MTS:1A:SCOUNTER?

DLL Implementation:

HTTP Implementation:

See Also

Save Counters & States

Set Switch Start-Up Mode

Get Switch Start-Up Mode

String Returned

9540

2000;1253;1500;1685

195;452;300;125;850;647

9540

Send_SCPI(":SPDT:1A:SCOUNTER?", RetStr)

Send_SCPI(":SP4T:1:SCOUNTER?", RetStr)

Send_SCPI(":SP6T:1:SCOUNTER?", RetStr)

Send_SCPI(":MTS:1A:SCOUNTER?", RetStr) http://10.10.10.10/:SPDT:1A:SCOUNTER? http://10.10.10.10/:SP4T:1:SCOUNTER? http://10.10.10.10/:SP6T:1:SCOUNTER? http://10.10.10.10/:MTS:1A:SCOUNTER?

Test Solutions - Programming Manual

Modular Test Systems

Page 60

4-Apr-17 (A6)

3.8 - Component Labels

These commands enable the user to set a custom label for easy identification on any given component in the modular test system. The component designator is not needed so the full

SCPI commands are as below.

Description Command/Query a

Set Component Label

b

Get Component Label

:LABEL: [location] :” [text] ”

:LABEL: [location] ?

3.8 (a) - Set Component Label

Description

Set a custom label for easy identification of a specific component.

Command Syntax

:LABEL: [location] :” [text] ”

Variable

[text]

Description

A string of ASCII characters to be set as an easy identification label for the component. Up to 24 characters allowed.

Return String

[status]

Variable

[status]

Value

0 - Failed

1 - Success

Description

Command failed (switch not set)

Command completed successfully

Examples

String to Send String Returned

:LABEL:1A:”Input_SPDT_1” 1 - Success

:LABEL:1:”Input_SP4T_1” 1 - Success

DLL Implementation:

HTTP Implementation:

See Also

Get Component Label

Send_SCPI(":LABEL:1A:”Input_SPDT_1”", RetStr)

http://10.10.10.10/:LABEL:1A:”Input_SPDT_1”

Test Solutions - Programming Manual

Modular Test Systems

Page 61

4-Apr-17 (A6)

3.8 (b) - Get Component Label

Description

Get the custom label of a specific component (used for easy identification).

Command Syntax

:LABEL: [location] ?

Return String

LABEL=” [text] ”

Variable

[text]

Description

The component label as a string of up to 24 ASCII characters

Examples

String to Send

:LABEL:1A?

:LABEL:1?

String Returned

LABEL=”Input_SPDT_1”

LABEL=”Input_SP4T_1”

DLL Implementation:

HTTP Implementation:

See Also

Set Component Label

Send_SCPI(":LABEL:1A?", RetStr)

http://10.10.10.10/:LABEL:1A?

Test Solutions - Programming Manual

Modular Test Systems

Page 62

4-Apr-17 (A6)

4 - Operating in a Windows Environment via USB

4.1 - The DLL (Dynamic Link Library) Concept

The Dynamic Link Library concept is Microsoft's implementation of the shared library concept in the Windows environment.

DLLs provide a mechanism for shared code and data, intended to allow a developer to distribute applications without requiring code to be re-linked or recompiled.

Mini-Circuits' software package provides DLL objects designed to allow your own application to interface with the functions of the ZTM Series test system.

User’s Software Application

(3rd party software such as LabVIEW, Delphi, Visual C++,

Visual C#, Visual Basic, and Microsoft.Net)

DLL (Dynamic Link Libraries)

Mini-Circuits’

USB Portable Test Equipment

Fig 4.1-a: DLL Interface Concept

The software package provides two DLL files, the choice of which file to use is dictated by the user’s operating system:

1. ActiveX com object

Designed to be used in any programming environment that supports third party

ActiveX COM (Component Object Model) compliant applications.

The ActiveX file should be registered using RegSvr32 (see following sections for details).

2. Microsoft.NET Class Library

A logical unit of functionality that runs under the control of the Microsoft.NET system.

Test Solutions - Programming Manual

Modular Test Systems

Page 63

4-Apr-17 (A6)

4.1 (a) - ActiveX COM Object

ActiveX COM object DLL files are designed to be used with both 32-bit and 64-bit Windows operating systems. A 32-bit programming environment that is compatible with ActiveX is required. To develop 64-bit applications, the Microsoft.NET Class library should be used instead.

Supported Programming Environments

Mini-Circuits’ ZTM & RCM Series test systems have been tested in the following programming environments. This is not an exhaustive list and the DLL file is designed to operate in most environments that support ActiveX functionality. Please contact Mini-

Circuits for support.

 Visual Studio® 6 (Visual C++ and Visual Basic)

 LabVIEW 8.0 or newer

 MATLAB 7 or newer

 Delphi

 Borland C++

 Agilent VEE

 Python

Installation

1. Copy the DLL file to the correct directory:

For 32-bit Windows operating systems this is C:\WINDOWS\System32

For 64-bit Windows operating systems this is C:\WINDOWS\SysWOW64

2. Open the Command Prompt:

a. For Windows XP® (see

Fig 4.1-b

):

i. Select “All Programs” and then “Accessories” from the Start Menu ii. Click on “Command Prompt” to open b. For later versions of the Windows operating system you will need to have

Administrator privileges in order to run the Command Prompt in “Elevated”

mode (see

Fig 4.1-c

for Windows 7 and Windows 8):

i. Open the Start Menu/Start Screen and type “Command Prompt” ii. Right-click on the shortcut for the Command Prompt iii. Select “Run as Administrator” iv. You may be prompted to enter the log in details for an Administrator account if the current user does not have Administrator privileges on the local PC

3. Use regsvr32 to register the DLL:

For 32-bit Windows operating systems type (see Fig 4.1-d):

\WINDOWS\System32\Regsvr32 \WINDOWS\System32\modularzt.dll

For 64-bit Windows operating systems type (see Fig 4.1-e):

\WINDOWS\SysWOW64\Regsvr32 \WINDOWS\SysWOW64\modularzt.dll

4. Hit enter to confirm and a message box will appear to advise of successful registration.

Test Solutions - Programming Manual

Modular Test Systems

Page 64

4-Apr-17 (A6)

Fig 4.1-b: Opening the Command Prompt in Windows XP

Fig 4.1-c: Opening the Command Prompt in Windows 7 (left) and Windows 8 (right)

Fig 4.1-d: Registering the DLL in a 32-bit environment

Fig 4.1-e: Registering the DLL in a 64-bit environment

Test Solutions - Programming Manual

Modular Test Systems

Page 65

4-Apr-17 (A6)

4.1 (b) - Microsoft.NET Class Library

Microsoft.NET class libraries are designed to be used with both 32-bit and 64-bit Windows operating systems. To develop 64-bit applications the user must have both a 64-bit operating system and 64-bit programming environment. However, the Microsoft.NET class library is also compatible with 32-bit programming environments.

Supported Programming Environments

Mini-Circuits’ ZTM & RCM Series test systems have been tested in the following programming environments. This is not an exhaustive list and the DLL file is designed to operate in most environments that support Microsoft.NET functionality. Please contact

Mini-Circuits for support.

 National Instruments CVI

 Microsoft.NET (Visual C++, Visual Basic.NET, Visual C# 2003 or newer)

 LabVIEW 2009 or newer

 MATLAB 2008 or newer

 Delphi

 Borland C++

Installation

1. Copy the DLL file to the correct directory a. For 32 bit Windows operating systems this is C:\WINDOWS\System32 b. For 64 bit Windows operating systems this is C:\WINDOWS\SysWOW64

2. No registration is required

Test Solutions - Programming Manual

Modular Test Systems

Page 66

4-Apr-17 (A6)

4.2 - Referencing the DLL (Dynamic Linked Library)

In order to use the DLL functionality, some programming environments will require the user to set a reference to the relevant DLL file. Once this is done, the user just needs to declare a new instance of the USB Control class (defined within the DLL) for each modular test system to be controlled. The class is assigned to a variable which is used to call the DLL functions as needed. In the following examples, the variable names MyPTE1 and MyPTE2 have been used to represent 2 connected modular test systems.

Example Declarations using the ActiveX DLL (modularzt.dll)

Visual Basic

Public MyPTE1 As New ModularZT.USB_Control

' Declare new ZTM / RCM Series control object, assign to MyPTE1

Public MyPTE2 As New ModularZT.USB_Control

' Declare new ZTM / RCM Series control object, assign to MyPTE2

Visual C++

ModularZT::USB_Control ^MyPTE1 = gcnew ModularZT::USB_Control();

// Declare new ZTM / RCM Series control object, assign to MyPTE1

ModularZT::USB_Control ^MyPTE2 = gcnew ModularZT::USB_Control();

// Declare new ZTM / RCM Series control object, assign to MyPTE2

Visual C# public ModularZT.USB_Control MyPTE1 = new ModularZT.USB_Control();

// Declare new ZTM / RCM Series control object, assign to MyPTE1 public ModularZT.USB_Control MyPTE2 = new ModularZT.USB_Control();

// Declare new ZTM / RCM Series control object, assign to MyPTE2

Matlab

MyPTE1 = actxserver('ModularZT.USB_Control')

% Initialize new ZTM / RCM Series control object, MyPTE1

MyPTE2 = actxserver('ModularZT.USB_Control')

% Initialize new ZTM / RCM Series control object, MyPTE2

Example Declarations using the .NET DLL (modularzt64.dll)

Visual Basic

Public MyPTE1 As New ModularZT64.USB_ZT

' Declare new ZTM / RCM Series control object, assign to MyPTE1

Public MyPTE2 As New ModularZT64.USB_ZT

' Declare new ZTM / RCM Series control object, assign to MyPTE2

Visual C++

ModularZT64.USB_ZT ^MyPTE1 = gcnew ModularZT64.USB_ZT();

// Declare new ZTM / RCM Series control object, assign to MyPTE1

ModularZT64.USB_ZT ^MyPTE2 = gcnew ModularZT64.USB_ZT();

// Declare new ZTM / RCM Series control object, assign to MyPTE2

Visual C# public ModularZT64.USB_ZT MyPTE1 = new ModularZT64.USB_ZT();

// Declare new ZTM / RCM Series control object, assign to MyPTE1 public ModularZT64.USB_ZT MyPTE2 = new ModularZT64.USB_ZT();

// Declare new ZTM / RCM Series control object, assign to MyPTE2

Matlab

MCL_ATT=NET.addAssembly('C:\Windows\SysWOW64\ModularZT64.dll')

MyPTE1 = ModularZT64.USB_ZT % Initialize new ZTM / RCM object

MyPTE1 = ModularZT64.USB_ZT % Initialize new ZTM / RCM object

Test Solutions - Programming Manual

Modular Test Systems

Page 67

4-Apr-17 (A6)

4.3 - Summary of DLL Functions

The following functions are defined in both the ActiveX and .Net DLL files. Please see the following sections for a full description of their structure and implementation.

4.3 (a) - USB Control Functions

a) Short Connect (Optional String

SN )

b) Short ConnectByAddress (Optional Short

Address )

c) Void Disconnect ()

d) Short Read_ModelName (String

ModelName )

e) Short Read_SN (String

SN )

f) Short Set_Address (Short

Address )

g) Short Get_Address ()

h) Short Get_Available_SN_List (String

SN_List )

i) Short Get_Available_Address_List (String

Add_List )

j) Short GetConnectionStatus () k) Short GetUSBConnectionStatus ()

l) Short Send_SCPI (String

SndSTR , String RetSTR )

m) Short GetExtFirmware (Short

A0 , Short A1 , Short A2 , String Firmware )

n) Short GetFirmware ()

4.3 (b) - Ethernet Configuration Functions

a) Short GetEthernet_CurrentConfig (Int

IP1 , Int IP2 , Int IP3 , Int IP4 , Int Mask1 , Int Mask2 ,

Int Mask3 , Int Mask4 , Int Gateway1 , Int Gateway2 , Int Gateway3 , Int Gateway4 )

b) Short GetEthernet_IPAddress (Int

b1 , Int b2 , Int b3 , Int b4 )

c) Short GetEthernet_MACAddress (Int

MAC1 , Int MAC2 , Int MAC3 , Int MAC4 , Int MAC5 ,

Int MAC6 )

d) Short GetEthernet_NetworkGateway (Int

b1 , Int b2 , Int b3 , Int b4 )

e) Short GetEthernet_SubNetMask (Int

b1 , Int b2 , Int b3 , Int b4 )

f) Short GetEthernet_TCPIPPort (Int

port )

g) Short GetEthernet_UseDHCP ()

h) Short GetEthernet_UsePWD ()

i) Short GetEthernet_PWD (string

Pwd )

j) Short SaveEthernet_IPAddress (Int

b1 , Int b2 , Int b3 , Int b4 )

k) Short SaveEthernet_NetworkGateway (Int

b1 , Int b2 , Int b3 , Int b4 )

l) Short SaveEthernet_SubnetMask (Int

b1 , Int b2 , Int b3 , Int b4 )

m) Short SaveEthernet_TCPIPPort (Int

port )

n) Short SaveEthernet_UseDHCP (Int

UseDHCP )

o) Short SaveEthernet_UsePWD (Int

UsePwd )

p) Short SaveEthernet_PWD (String

Pwd )

Test Solutions - Programming Manual

Modular Test Systems

Page 68

4-Apr-17 (A6)

4.4 - DLL Functions for USB Control

These functions apply to all Mini-Circuits ZTM & RCM Series systems and provide a means to control the device over a USB connection.

4.4 (a) - Connect by Serial Number

Declaration

Short Connect ( Optional String SN)

Description

Initializes the USB connection. If multiple modular test systems are connected to the same host computer, then the serial number should be included, otherwise this can be omitted.

The system should be disconnected on completion of the program using the Disconnect

function.

Parameters

Data Type Variable

String SN

Description

Optional. The serial number of the test system. Can be omitted if only one modular test system is connected.

Return Values

Data Type Value

Short 0

1

2

Description

No connection was possible

Connection successfully established

Connection already established (Connect has been called more than once). The system will continue to operate normally.

Examples

Visual Basic status = MyPTE1.Connect(SN)

Visual C++ status = MyPTE1->Connect(SN);

Visual C# status = MyPTE1.Connect(SN);

Matlab status = MyPTE1.Connect(SN)

See Also

Connect by Address

Disconnect

Test Solutions - Programming Manual

Modular Test Systems

Page 69

4-Apr-17 (A6)

4.4 (b) - Connect by Address

Declaration

Short ConnectByAddress ( Optional Short Address)

Description

This function is called to initialize the USB connection to a modular test system by referring to a user defined address. The address is an integer number from 1 to 255 which can be assigned using the Set_Address function (the factory default is 255). The connection process can take a few milliseconds so it is recommended that the connection be made once at the beginning of the routine and left open until the test sequence is no completed. The system

should be disconnected on completion of the program using the Disconnect function.

Parameters

Data Type Variable

Short Address

Description

Optional. The address of the system. Can be omitted if only one modular test system is connected.

Return Values

Data Type Value

Short 0

1

2

Description

No connection was possible

Connection successfully established

Connection already established (Connect has been called more than once)

Examples

Visual Basic status = MyPTE1.ConnectByAddress(5)

Visual C++ status = MyPTE1->ConnectByAddress(5);

Visual C# status = MyPTE1.ConnectByAddress(5);

Matlab status = MyPTE1.connectByAddress(5)

See Also

Connect by Serial Number

Disconnect

Test Solutions - Programming Manual

Modular Test Systems

Page 70

4-Apr-17 (A6)

4.4 (c) - Disconnect

Declaration

Void Disconnect ()

Description

This function is called to close the connection to modular test system after completion of the test sequence. It is strongly recommended that this function is used prior to ending the program. Failure to do so may result in a connection problem with the device. Should this occur, shut down the program and unplug the system from the computer, then reconnect to start again.

Parameters

Data Type

None

Return Values

Variable Description

Data Type Value

None

Description

Examples

Visual Basic

MyPTE1.Disconnect()

Visual C++

MyPTE1->Disconnect();

Visual C#

MyPTE1.Disconnect();

Matlab

MyPTE1.Disconnect

See Also

Connect by Serial Number

Connect by Address

Test Solutions - Programming Manual

Modular Test Systems

Page 71

4-Apr-17 (A6)

4.4 (d) - Read Model Name

Declaration

Short Read_ModelName ( String ModelName)

Description

This function is called to determine the full Mini-Circuits part number of the connected modular test system. The user passes a string variable which is updated with the part number.

Parameters

Data Type Variable

String

Description

ModelName Required. A string variable that will be updated with the Mini-

Circuits part number for the modular test system.

Return Values

Data Type Value

Short 0

1

Description

Command failed

Command completed successfully

Examples

Visual Basic

If MyPTE1.Read_ModelName(ModelName) > 0 Then

End If

MsgBox ("The connected system is " & ModelName)

' Display a message stating the model name

Visual C++ if (MyPTE1->Read_ModelName(ModelName) > 0 )

{

}

MessageBox::Show("The connected system is " + ModelName);

// Display a message stating the model name

Visual C# if (MyPTE1.Read_ModelName(ref(ModelName)) > 0 )

{

}

MessageBox.Show("The connected system is " + ModelName);

// Display a message stating the model name

Matlab

[status, ModelName]=MyPTE1.Read_ModelName(ModelName)

If status > 0 then

{

} msgbox('The connected system is ', ModelName)

% Display a message stating the model name

See Also

Read Serial Number

SCPI: Get Model Name

Test Solutions - Programming Manual

Modular Test Systems

Page 72

4-Apr-17 (A6)

4.4 (e) - Read Serial Number

Declaration

Short Read_SN ( String SN)

Description

This function is called to determine the serial number of the connected modular test system.

The user passes a string variable which is updated with the serial number.

Parameters

Data Type Variable

String

Description

ModelName Required. String variable that will be updated with the Mini-

Circuits serial number for the test system.

Return Values

Data Type Value

Short 0

1

Examples

Description

Command failed

Command completed successfully

Visual Basic

If MyPTE1.Read_SN(SN) > 0 Then

End If

MsgBox (“The connected system is “ & SN)

' Display a message stating the serial number

Visual C++ if (MyPTE1->Read_SN(SN) > 0 )

{

}

MessageBox::Show("The connected system is " + SN);

// Display a message stating the serial number

Visual C# if (MyPTE1.Read_SN(ref(SN)) > 0 )

{

}

MessageBox.Show("The connected system is " + SN);

// Display a message stating the serial number

Matlab

}

[status, SN]= MyPTE1.Read_SN(SN)

If status > 0 then

{ msgbox('The connected system is ', SN)

% Display a message stating the serial number

See Also

Read Model Name

SCPI: Get Serial Number

Test Solutions - Programming Manual

Modular Test Systems

Page 73

4-Apr-17 (A6)

4.4 (f) - Set USB Address

Declaration

Short Set_Address ( Short Address)

Description

This function allows the internal address of the connected modular test system to be changed from the factory default of 255. The system can be referred to by the address

instead of the serial number (see Connect by Address ).

Parameters

Data Type Variable

Short Address

Description

Required. An integer value from 1 to 255

Return Values

Data Type Value

Short 0

1

Example

Description

Command failed

Command completed successfully

Visual Basic status = MyPTE1.Set_Address(1)

Visual C++ status = MyPTE1->Set_Address ( 1 );

Visual C# status = MyPTE1.Set_Address(1);

Matlab status = MyPTE1.Set_Address(1)

See Also

Get USB Address

Get List of Available Addresses

Test Solutions - Programming Manual

Modular Test Systems

Page 74

4-Apr-17 (A6)

4.4 (g) - Get USB Address

Declaration

Short Get_Address ()

Description

This function returns the address of the connected modular test system.

Parameters

Data Type Variable

None

Return Values

Description

Data Type Value

Short 0

Short 1-255

Description

Command failed

Address of the modular test system

Examples

Visual Basic addr = MyPTE1.Get_Address()

Visual C++ addr = MyPTE1->Get_Address ();

Visual C# addr = MyPTE1.Get_Address();

Matlab addr = MyPTE1.Get_Address

See Also

Set USB Address

Get List of Available Addresses

Test Solutions - Programming Manual

Modular Test Systems

Page 75

4-Apr-17 (A6)

4.4 (h) - Get List of Connected Serial Numbers

Declaration

Short Get_Available_SN_List ( String SN_List)

Description

This function takes a user defined variable and updates it with a list of serial numbers for all available (currently connected) modular test systems.

Parameters

Data Type Variable

String SN_List

Description

Required. String variable which will be updated with a list of all available serial numbers, separated by a single space character; for example “11301020001 11301020002

11301020003”.

Return Values

Data Type Value

Short 0

Short 1

Example

Description

Command failed

Command completed successfully

Visual Basic

If MyPTE1.Get_Available_SN_List(SN_List) > 0 Then

End If array_SN() = Split(SN_List, " ")

' Split the list into an array of serial numbers

For i As Integer = 0 To array_SN.Length - 1

' Loop through the array and use each serial number

Next

Visual C++ if (MyPTE1 ->Get_Available_SN_List(SN_List) > 0)

{

}

// split the List into array of SN's

Visual C# if (MyPTE1.Get_Available_SN_List(ref(SN_List)) > 0)

{

}

// split the List into array of SN's

Matlab

[status, SN_List]= MyPTE1.Get_Available_SN_List(SN_List)

If status > 0 then

{

}

% split the List into array of SN's

See Also

Connect by Serial Number

Get List of Available Addresses

Test Solutions - Programming Manual

Modular Test Systems

Page 76

4-Apr-17 (A6)

4.4 (i) - Get List of Available Addresses

Declaration

Short Get_Available_Address_List ( String Add_List)

Description

This function takes a user defined variable and updates it with a list of addresses of all connected modular test systems.

Parameters

Data Type Variable

String Add_List

Description

Required. String variable which the function will update with a list of addresses separated by a single space character, for example, “5 101 254 255”

Return Values

Data Type Value

Short

Short

0

1

Example

Description

Command failed

Command completed successfully

Visual Basic

If MyPTE1.Get_Available_Add_List(st_Ad_List) > 0 Then

End If

' Get list of available addresses array_Ad() = Split(st_Ad_List, " ")

' Split the list into an array of addresses

For i As Integer = 0 To array_Ad.Length - 1

' Loop through the array and use each address

Next

Visual C++ if (MyPTE1->Get_Available_Address_List(Add_List) > 0);

{

}

// split the List into array of Addresses

Visual C# if (MyPTE1.Get_Available_Address_List(ref(Add_List)) > 0)

{

}

// split the List into array of Addresses

Matlab

[status, Add_List]= MyPTE1.Get_Available_Address_List(Add_List)

If status > 0 then

{ % split the List into array of Addresses

}

See Also

Connect by Address

Get List of Connected Serial Numbers

Test Solutions - Programming Manual

Modular Test Systems

Page 77

4-Apr-17 (A6)

4.4 (j) - Get Software Connection Status

Declaration

Short GetConnectionStatus ()

Description

This function checks whether there is an open software connection to the modular test

system. This will be true if the Connect function (or similar) has previously been called.

Parameters

Data Type Variable

None

Description

Return Values

Data Type Value

Short 0

Short 1

Examples

Description

No connection

ZTM Series is connected

Visual Basic

Status = MyPTE1.GetConnectionStatus()

Visual C++

Status = MyPTE1->GetConnectionStatus();

Visual C#

Status = MyPTE1.GetConnectionStatus();

Matlab

Status = MyPTE1.GetConnectionStatus()

See Also

Get USB Connection Status

Test Solutions - Programming Manual

Modular Test Systems

Page 78

4-Apr-17 (A6)

4.4 (k) - Get USB Connection Status

Declaration

Short GetUSBConnectionStatus ()

Description

This function checks whether the USB connection to the modular test is still active.

Parameters

Data Type Variable

None

Return Values

Description

Data Type Value

Short 0

Short 1

Description

No connection

USB connection to modular test system is active

Examples

Visual Basic

If MyPTE1.GetUSBConnectionStatus = 1 Then

End If

' Modular test system is connected

Visual C++ if (MyPTE1->GetUSBConnectionStatus() == 1)

{

}

// Modular test system is connected

Visual C# if (MyPTE1.GetUSBConnectionStatus() == 1)

{

}

// Modular test system is connected

Matlab usbstatus = MyPTE1.GetUSBConnectionStatus

If usbstatus == 1 then

{

}

% Modular test system is connected

See Also

Get Software Connection Status

Test Solutions - Programming Manual

Modular Test Systems

Page 79

4-Apr-17 (A6)

4.4 (l) - Send SCPI Command

Declaration

Short Send_SCPI ( String SndSTR, String RetSTR)

Description

This function sends a SCPI command to the test system and collects the returned acknowledgement. SCPI (Standard Commands for Programmable Instruments) is a common method for communicating with and controlling instrumentation products and provides the main method for interfacing with the modular test system’s internal test components.

Parameters

Data Type

String

String

Variable

SndSTR

RetSTR

Description

Required. The SCPI command to send.

Required. User defined string which will be updated with the value returned from the test system.

Return Values

Data Type

Short

Examples

Value

0

1

Description

Command failed

Command completed successfully

Visual Basic

Status = MyPTE1.Send_SCPI("RUDAT:1A:ATT:75.75", RetStr)

' Set attenuator in slot 1A to 75.75dB

Visual C++

Status = MyPTE1->Send_SCPI("RUDAT:1A:ATT:75.75", RetStr);

// Set attenuator in slot 1A to 75.75dB

Visual C#

Status = MyPTE1.Send_SCPI("RUDAT:1A:ATT:75.75", RetStr);

// Set attenuator in slot 1A to 75.75dB

Matlab

Status = MyPTE1.Send_SCPI("RUDAT:1A:ATT:75.75", RetStr)

% Set attenuator in slot 1A to 75.75dB

See Also

SCPI Command Set for Control of ZTM-X Components

Test Solutions - Programming Manual

Modular Test Systems

Page 80

4-Apr-17 (A6)

4.4 (m) - Get Firmware

Declaration

Short GetExtFirmware ( Short A0, Short A1, Short A2, String Firmware)

Description

This function returns the internal firmware version of the modular test system along with three reserved variables (for factory use).

Parameters

Data Type Variable

Short A0

Description

Required. User defined variable for factory use only.

Short

Short

String

A1

A2

Required. User defined variable for factory use only.

Required. User defined variable for factory use only.

Firmware Required. User defined variable which will be updated with the current firmware version, for example “B3”.

Return Values

Data Type Value

Short 0

Short 1

Examples

Description

Command failed

Command completed successfully

Visual Basic

If MyPTE1.GetExtFirmware(A0, A1, A2, Firmware) > 0 Then

MsgBox ("Firmware version is " & Firmware)

End If

Visual C++ if (MyPTE1->GetExtFirmware(A0, A1, A2, Firmware) > 0 )

{

}

MessageBox::Show("Firmware version is " + Firmware);

Visual C# if (MyPTE1.GetExtFirmware(ref(A0, A1, A2, Firmware)) > 0 )

{

}

MessageBox.Show("Firmware version is " + Firmware);

Matlab

[status, A0, A1, A2, Firmware]=MyPTE1.GetExtFirmware(A0, A1, A2, Firmware)

If status > 0 then

{ msgbox('Firmware version is ', Firmware)

}

See Also

SCPI: Get Firmware

Test Solutions - Programming Manual

Modular Test Systems

Page 81

4-Apr-17 (A6)

4.4 (n) - Get Firmware Version (Antiquated)

Declaration

Short GetFirmware ()

Description

This function is antiquated, GetExtFirmware should be used instead. The function returns a

numeric value corresponding to the internal firmware version of the test system.

Parameters

Data Type Variable

None

Description

Return Values

Data Type Value

Short Firmware

Description

Version number of the firmware

Examples

Visual Basic

FW = MyPTE1.GetFirmware()

Visual C++

FW = MyPTE1->GetFirmware();

Visual C#

FW = MyPTE1.GetFirmware();

Matlab

FW = MyPTE1.GetFirmware()

See Also

Get Firmware

Test Solutions - Programming Manual

Modular Test Systems

Page 82

4-Apr-17 (A6)

4.5 - DLL Functions for Ethernet Configuration

These functions provide a means for identifying and configuring the Ethernet settings such as

IP address, TCP/IP port and network gateway. They can only be called while the system is connected via the USB interface. In order to determine the current connection status (for example the IP address of the network gateway) the test system must also be connected to the network via the RJ45 port.

4.5 (a) - Get Ethernet Configuration

Declaration

Short GetEthernet_CurrentConfig ( Int IP1, Int IP2, Int IP3, Int IP4,

Int Mask1, Int Mask2, Int Mask3, Int Mask4,

Int Gateway1, Int Gateway2, Int Gateway3, Int Gateway4)

Description

This function returns the current IP configuration of the connected modular test system in a series of user defined variables. The settings checked are IP address, subnet mask and network gateway.

Parameters

Data Type Variable

Int IP1

Int

Int

IP2

IP2

Description

Required. Integer variable which will be updated with the first (highest order) octet of the IP address.

Required. Integer variable which will be updated with the second octet of the IP address.

Required. Integer variable which will be updated with the third octet of the IP address.

Int

Int

Int

Int

Int

Int

Int

Int

Int

IP4

Mask1

Mask2

Mask3

Required. Integer variable which will be updated with the last (lowest order) octet of the IP address.

Required. Integer variable which will be updated with the first (highest order) octet of the subnet mask.

Required. Integer variable which will be updated with the second octet of the subnet mask.

Required. Integer variable which will be updated with the third octet of the subnet mask.

Mask4 Required. Integer variable which will be updated with the last (lowest order) octet of the subnet mask.

Gateway1 Required. Integer variable which will be updated with the first (highest order) octet of the subnet mask.

Gateway2 Required. Integer variable which will be updated with the second octet of the network gateway.

Gateway3 Required. Integer variable which will be updated with the third octet of the network gateway.

Gateway4 Required. Integer variable which will be updated with the last (lowest order) octet of the network gateway.

Test Solutions - Programming Manual

Modular Test Systems

Page 83

4-Apr-17 (A6)

Return Values

Data Type Value

Short 0

Short 1

Example

Description

Command failed

Command completed successfully

Visual Basic

If MyPTE1.GetEthernet_CurrentConfig(IP1, IP2, IP3, IP4, M1, M2, M3, M4,

_ GW1, GW2, GW3, GW4) > 0 Then

MsgBox ("IP address: " & IP1 & "." & IP2 & "." & IP3 & "." & IP4)

MsgBox ("Subnet Mask: " & M1 & "." & M2 & "." & M3 & "." & M4)

MsgBox ("Gateway: " & GW1 & "." & GW2 & "." & GW3 & "." & GW4)

End If

Visual C++ if (MyPTE1->GetEthernet_CurrentConfig(IP1, IP2, IP3, IP4, M1, M2, M3, M4,

_ GW1, GW2, GW3, GW4) > 0)

{

MessageBox::Show("IP address: " + IP1 + "." + IP2 + "." + IP3 + "."

_ + IP4);

MessageBox::Show("Subnet Mask: " + M1 + "." + M2 + "." + M3+ "." +

_ M4);

MessageBox::Show("Gateway: " + GW1 + "." + GW2 + "." + GW3 + "." +

_ GW4);

}

Visual C# if (MyPTE1.GetEthernet_CurrentConfig(IP1, IP2, IP3, IP4, M1, M2, M3, M4,

_ GW1, GW2, GW3, GW4) > 0)

{

MessageBox.Show("IP address: " + IP1 + "." + IP2 + "." + IP3 + "."

_ + IP4);

MessageBox.Show("Subnet Mask: " + M1 + "." + M2 + "." + M3+ "." +

_ M4);

MessageBox.Show("Gateway: " + GW1 + "." + GW2 + "." + GW3 + "." +

_ GW4);

}

Matlab

[status, IP1, IP2, IP3, IP4, M1, M2, M3, M4, GW1, GW2, GW3, GW4] =

MyPTE1.GetEthernet_CurrentConfig(IP1, IP2, IP3, IP4, M1, M2, M3, M4, GW1,

GW2, GW3, GW4)

If status > 0 then

{

MsgBox ("IP address: ", IP1, ".", IP2, ".", IP3, ".", IP4)

MsgBox ("Subnet Mask: ", M1, "." & M2, "." & M3, ".", M4)

MsgBox ("Gateway: ", GW1, ".", GW2, ".", GW3, ".", GW4)

}

See Also

Get MAC Address

Get TCP/IP Port

Test Solutions - Programming Manual

Modular Test Systems

Page 84

4-Apr-17 (A6)

4.5 (b) - Get IP Address

Declaration

Short GetEthernet_IPAddress ( Int b1, Int b2, Int b3, Int b4)

Description

This function returns the current IP address of the connected system in a series of user defined variables (one per octet).

Parameters

Data Type Variable

Int IP1

Description

Required. Integer variable which will be updated with the first (highest order) octet of the IP address (for example “192” for the IP address “192.168.1.0”).

Int IP2

Int

Int

IP2

IP4

Required. Integer variable which will be updated with the second octet of the IP address (for example “168” for the IP address “192.168.1.0”).

Required. Integer variable which will be updated with the third octet of the IP address (for example “1” for the IP address “192.168.1.0”).

Required. Integer variable which will be updated with the last

(lowest order) octet of the IP address (for example “0” for the

IP address “192.168.1.0”).

Return Values

Data Type Value

Short 0

Short 1

Description

Command failed

Command completed successfully

Test Solutions - Programming Manual

Modular Test Systems

Page 85

4-Apr-17 (A6)

Example

Visual Basic

If MyPTE1.GetEthernet_CurrentConfig(IP1, IP2, IP3, IP4) > 0 Then

MsgBox ("IP address: " & IP1 & "." & IP2 & "." & IP3 & "." & IP4)

End If

Visual C++ if (MyPTE1->GetEthernet_CurrentConfig(IP1, IP2, IP3, IP4) > 0)

{

MessageBox::Show("IP address: " + IP1 + "." + IP2 + "." + IP3 + "."

_ + IP4);

}

Visual C# if (MyPTE1.GetEthernet_CurrentConfig(IP1, IP2, IP3, IP4) > 0)

{

MessageBox.Show("IP address: " + IP1 + "." + IP2 + "." + IP3 + "."

_ + IP4);

}

Matlab

[status, IP1, IP2, IP3, IP4] = MyPTE1.GetEthernet_CurrentConfig(IP1, IP2,

IP3, IP4)

If status > 0 then

{

MsgBox ("IP address: ", IP1, ".", IP2, ".", IP3, ".", IP4)

}

See Also

Get Ethernet Configuration

Get TCP/IP Port

Save IP Address

Save TCP/IP Port

Test Solutions - Programming Manual

Modular Test Systems

Page 86

4-Apr-17 (A6)

4.5 (c) - Get MAC Address

Declaration

Short GetEthernet_MACAddress ( Int MAC1, Int MAC2, Int MAC3, Int MAC4,

Int MAC5, Int MAC6)

Description

This function returns the MAC (media access control) address, the physical address, of the connected system as a series of decimal values (one for each of the 6 numeric groups).

Parameters

Data Type Variable Description

Int MAC1 Required. Integer variable which will be updated with the decimal value of the first numeric group of the MAC address.

For example:

MAC address =11:47:165:103:137:171

MAC1=11

Int MAC2

Int MAC3

Required. Integer variable which will be updated with the decimal value of the second numeric group of the MAC address.

For example:

MAC address =11:47:165:103:137:171

MAC2=47

Required. Integer variable which will be updated with the

Int

Int

Int

MAC4

MAC5

MAC6 decimal value of the third numeric group of the MAC address.

For example:

MAC address =11:47:165:103:137:171

MAC3=165

Required. Integer variable which will be updated with the decimal value of the fourth numeric group of the MAC address.

For example:

MAC address =11:47:165:103:137:171

MAC4=103

Required. Integer variable which will be updated with the decimal value of the fifth numeric group of the MAC address.

For example:

MAC address =11:47:165:103:137:171

MAC5=137

Required. Integer variable which will be updated with the decimal value of the last numeric group of the MAC address.

For example:

MAC address =11:47:165:103:137:171

MAC6=171

Test Solutions - Programming Manual

Modular Test Systems

Page 87

4-Apr-17 (A6)

Return Values

Data Type Value

Short 0

Short 1

Example

Description

Command failed

Command completed successfully

Visual Basic

If MyPTE1.GetEthernet_MACAddess(M1, M2, M3, M4, M5, M6) > 0 Then

MsgBox ("MAC address: " & M1 & ":" & M2 & ":" & M3 & ":" & M4 & ":"

_ & M5 & ":" & M6)

End If

Visual C++ if (MyPTE1->GetEthernet_MACAddess(M1, M2, M3, M4, M5, M6) > 0)

{

MessageBox::Show("MAC address: " + M1 + "." + M2 + "." + M3 + "."

_ + M4 + "." + M5 + "." + M6);

}

Visual C# if (MyPTE1.GetEthernet_MACAddess(M1, M2, M3, M4, M5, M6) > 0)

{

MessageBox.Show("MAC address: " + M1 + "." + M2 + "." + M3 + "."

_ + M4 + "." + M5 + "." + M6);

}

Matlab

[status, M1, M2, M3, M4, M5, M6] = MyPTE1.GetEthernet_MACAddess(M1, M2, M3,

M4, M5, M6)

If status > 0 then

{

MsgBox ("MAC address: ", M1, ".", M2, ".", M3, ".", M4, ".", M5, ".",

M6)

}

See Also

Get Ethernet Configuration

Test Solutions - Programming Manual

Modular Test Systems

Page 88

4-Apr-17 (A6)

4.5 (d) - Get Network Gateway

Declaration

Short GetEthernet_NetworkGateway ( Int b1, Int b2, Int b3, Int b4)

Description

This function returns the IP address of the network gateway to which the system is currently connected. A series of user defined variables are passed to the function to be updated with the IP address (one per octet).

Parameters

Data Type Variable

Int IP1

Description

Required. Integer variable which will be updated with the first (highest order) octet of the IP address (for example “192” for the IP address “192.168.1.0”).

Int IP2

Int

Int

IP2

IP4

Required. Integer variable which will be updated with the second octet of the IP address (for example “168” for the IP address “192.168.1.0”).

Required. Integer variable which will be updated with the third octet of the IP address (for example “1” for the IP address “192.168.1.0”).

Required. Integer variable which will be updated with the last

(lowest order) octet of the IP address (for example “0” for the

IP address “192.168.1.0”).

Return Values

Data Type Value

Short 0

Short 1

Description

Command failed

Command completed successfully

Test Solutions - Programming Manual

Modular Test Systems

Page 89

4-Apr-17 (A6)

Example

Visual Basic

If MyPTE1.GetEthernet_NetworkGateway(IP1, IP2, IP3, IP4) > 0 Then

MsgBox ("Gateway: " & IP1 & "." & IP2 & "." & IP3 & "." & IP4)

End If

Visual C++ if (MyPTE1->GetEthernet_NetworkGateway(IP1, IP2, IP3, IP4) > 0)

{

MessageBox::Show("Gateway: " + IP1 + "." + IP2 + "." + IP3 + "."

_ + IP4);

}

Visual C# if (MyPTE1.GetEthernet_NetworkGateway(IP1, IP2, IP3, IP4) > 0)

{

MessageBox.Show("Gateway: " + IP1 + "." + IP2 + "." + IP3 + "."

_ + IP4);

}

Matlab

[status, IP1, IP2, IP3, IP4] = MyPTE1.GetEthernet_NetworkGateway(IP1, IP2,

IP3, IP4)

If status > 0 then

{

MsgBox ("Gateway: ", IP1, ".", IP2, ".", IP3, ".", IP4)

}

See Also

Get Ethernet Configuration

Save Network Gateway

Test Solutions - Programming Manual

Modular Test Systems

Page 90

4-Apr-17 (A6)

4.5 (e) - Get Subnet Mask

Declaration

Short GetEthernet_SubNetMask ( Int b1, Int b2, Int b3, Int b4)

Description

This function returns the subnet mask used by the network gateway to which the system is currently connected. A series of user defined variables are passed to the function to be updated with the subnet mask (one per octet).

Parameters

Data Type Variable

Int b1

Description

Required. Integer variable which will be updated with the first (highest order) octet of the subnet mask (for example

“255” for the subnet mask “255.255.255.0”).

Int b2

Int

Int b2 b4

Required. Integer variable which will be updated with the second octet of the subnet mask (for example “255” for the subnet mask “255.255.255.0”).

Required. Integer variable which will be updated with the third octet of the subnet mask (for example “255” for the subnet mask “255.255.255.0”).

Required. Integer variable which will be updated with the last

(lowest order) octet of the subnet mask (for example “0” for the subnet mask “255.255.255.0”).

Return Values

Data Type Value

Short 0

Short 1

Description

Command failed

Command completed successfully

Test Solutions - Programming Manual

Modular Test Systems

Page 91

4-Apr-17 (A6)

Example

Visual Basic

If MyPTE1.GetEthernet_SubNetMask(b1, b2, b3, b4) > 0 Then

MsgBox ("Subnet mask: " & b1 & "." & b2 & "." & b3 & "." & b4)

End If

Visual C++ if (MyPTE1->GetEthernet_SubNetMask(b1, b2, b3, b4) > 0)

{

MessageBox::Show("Subnet mask: " + b1 + "." + b2 + "." + b3 + "."

_ + b4);

}

Visual C# if (MyPTE1.GetEthernet_SubNetMask(b1, b2, b3, b4) > 0)

{

MessageBox.Show("Subnet mask: " + b1 + "." + b2 + "." + b3 + "."

_ + b4);

}

Matlab

[status, b1, b2, b3, b4] = MyPTE1.GetEthernet_SubNetMask(b1, b2, b3, b4)

If status > 0 then

{

MsgBox ("Subnet mask: ", b1, ".", b2, ".", b3, ".", b4)

}

See Also

Get Ethernet Configuration

Save Subnet Mask

Test Solutions - Programming Manual

Modular Test Systems

Page 92

4-Apr-17 (A6)

4.5 (f) - Get TCP/IP Port

Declaration

Short GetEthernet_TCPIPPort ( Int port)

Description

This function returns the TCP/IP port used by the test system for HTTP communication. The default is port 80.

Note: Port 23 is reserved for Telnet communication and cannot be set as the HTTP port.

Parameters

Data Type Variable

Int port

Description

Required. Integer variable which will be updated with the

TCP/IP port.

Return Values

Data Type Value

Short 0

Short 1

Example

Description

Command failed

Command completed successfully

Visual Basic

If MyPTE1.GetEthernet_SubNetMask(port) > 0 Then

MsgBox ("Port: " & port)

End If

Visual C++ if (MyPTE1->GetEthernet_SubNetMask(port) > 0)

{

MessageBox::Show("Port: " + port);

}

Visual C# if (MyPTE1.GetEthernet_SubNetMask(port) > 0)

{

MessageBox.Show("Port: " + port);

}

Matlab

[status, port] = MyPTE1.GetEthernet_SubNetMask(port)

If status > 0 then

{

MsgBox ("Port: ", port)

}

See Also

Get Ethernet Configuration

Save TCP/IP Port

Test Solutions - Programming Manual

Modular Test Systems

Page 93

4-Apr-17 (A6)

4.5 (g) - Get DHCP Status

Declaration

Short GetEthernet_UseDHCP ()

Description

This function indicates whether the test system is using DHCP (dynamic host control protocol), in which case the IP configuration is derived from a network server; or user defined “static” IP settings.

Parameters

Data Type Variable

None

Description

Return Values

Data Type Value

Short 0

Short 1

Description

DHCP not in use (IP settings are static and manually configured)

DHCP in use (IP settings are assigned automatically by the network)

Example

Visual Basic

DHCPstatus = MyPTE1.GetEthernet_UseDHCP()

Visual C++

DHCPstatus = MyPTE1->GetEthernet_UseDHCP();

Visual C#

DHCPstatus = MyPTE1.GetEthernet_UseDHCP();

Matlab

[DHCPstatus] = MyPTE1.GetEthernet_UseDHCP

See Also

Get Ethernet Configuration

Use DHCP

Test Solutions - Programming Manual

Modular Test Systems

Page 94

4-Apr-17 (A6)

4.5 (h) - Get Password Status

Declaration

Short GetEthernet_UsePWD ()

Description

This function indicates whether the modular test system is currently configured to require a password for HTTP/Telnet communication.

Parameters

Data Type Variable

None

Description

Return Values

Data Type Value

Short 0

Short 1

Example

Description

Password not required

Password required

Visual Basic

PWDstatus = MyPTE1.GetEthernet_UsePWD()

Visual C++

PWDstatus = MyPTE1->GetEthernet_UsePWD();

Visual C#

PWDstatus = MyPTE1.GetEthernet_UsePWD();

Matlab

[PWDstatus] = MyPTE1.GetEthernet_UsePWD

See Also

Get Password

Use Password

Set Password

Test Solutions - Programming Manual

Modular Test Systems

Page 95

4-Apr-17 (A6)

4.5 (i) - Get Password

Declaration

Short GetEthernet_PWD ( String Pwd)

Description

This function returns the current password used by the modular test system for HTTP/Telnet communication. The password will be returned even if the device is not currently configured to require a password.

Parameters

Data Type Variable

String Pwd

Description

Required. String variable which will be updated with the password.

Return Values

Data Type Value

Short

Short

0

1

Example

Description

Command failed

Command completed successfully

Visual Basic

If MyPTE1.GetEthernet_PWD(pwd) > 0 Then

MsgBox ("Password: " & pwd)

End If

Visual C++ if (MyPTE1->GetEthernet_PWD(pwd) > 0)

{

MessageBox::Show("Password: " + pwd);

}

Visual C# if (MyPTE1.GetEthernet_PWD(pwd) > 0)

{

MessageBox.Show("Password: " + pwd);

}

Matlab

[status, pwd] = MyPTE1.GetEthernet_PWD(pwd)

If status > 0 then

{

MsgBox ("Password: ", pwd)

}

See Also

Get Password Status

Use Password

Set Password

Test Solutions - Programming Manual

Modular Test Systems

Page 96

4-Apr-17 (A6)

4.5 (j) - Save IP Address

Declaration

Short SaveEthernet_IPAddress ( Int b1, Int b2, Int b3, Int b4)

Description

This function sets a static IP address to be used by the connected test system.

Note: this could subsequently be overwritten automatically if DHCP is enabled (see Use

DHCP ).

Parameters

Data Type Variable

Int IP1

Int

Int

Int

IP2

IP2

IP4

Description

Required. First (highest order) octet of the IP address to set

(for example “192” for the IP address “192.168.1.0”).

Required. Second octet of the IP address to set (for example

“168” for the IP address “192.168.1.0”).

Required. Third octet of the IP address to set (for example

“1” for the IP address “192.168.1.0”).

Required. Last (lowest order) octet of the IP address to set

(for example “0” for the IP address “192.168.1.0”).

Return Values

Data Type Value

Short 0

Short 1

Example

Description

Command failed

Command completed successfully

Visual Basic status = MyPTE1.SaveEthernet_IPAddress(192, 168, 1, 0)

Visual C++ status = MyPTE1->SaveEthernet_IPAddress(192, 168, 1, 0);

Visual C# status = MyPTE1.SaveEthernet_IPAddress(192, 168, 1, 0);

Matlab

[status] = MyPTE1.SaveEthernet_IPAddress(192, 168, 1, 0)

See Also

Get Ethernet Configuration

Get IP Address

Test Solutions - Programming Manual

Modular Test Systems

Page 97

4-Apr-17 (A6)

4.5 (k) - Save Network Gateway

Declaration

Short SaveEthernet_NetworkGateway ( Int b1, Int b2, Int b3, Int b4)

Description

This function sets the IP address of the network gateway to which the system should connect.

Note: this could subsequently be overwritten automatically if DHCP is enabled (see Use

DHCP ).

Parameters

Data Type Variable

Int IP1

Description

Required. First (highest order) octet of the network gateway

IP address (for example “192” for the IP address

“192.168.1.0”).

Int

Int

Int

IP2

IP2

IP4

Required. Second octet of the network gateway IP address

(for example “168” for the IP address “192.168.1.0”).

Required. Third octet of the network gateway IP address (for example “1” for the IP address “192.168.1.0”).

Required. Last (lowest order) octet of the network gateway

IP address (for example “0” for the IP address “192.168.1.0”).

Return Values

Data Type Value

Short 0

Short 1

Example

Description

Command failed

Command completed successfully

Visual Basic status = MyPTE1.SaveEthernet_NetworkGateway(192, 168, 1, 0)

Visual C++ status = MyPTE1->SaveEthernet_NetworkGateway(192, 168, 1, 0);

Visual C# status = MyPTE1.SaveEthernet_NetworkGateway(192, 168, 1, 0);

Matlab

[status] = MyPTE1.SaveEthernet_NetworkGateway(192, 168, 1, 0)

See Also

Get Ethernet Configuration

Get Network Gateway

Test Solutions - Programming Manual

Modular Test Systems

Page 98

4-Apr-17 (A6)

4.5 (l) - Save Subnet Mask

Declaration

Short SaveEthernet_SubnetMask ( Int b1, Int b2, Int b3, Int b4)

Description

This function sets the subnet mask of the network to which the system should connect.

Note: this could subsequently be overwritten automatically if DHCP is enabled (see Use

DHCP ).

Parameters

Data Type Variable

Int IP1

Int

Int

Int

IP2

IP2

IP4

Description

Required. First (highest order) octet of the subnet mask (for example “255” for the subnet mask “255.255.255.0”).

Required. Second octet of the subnet mask (for example

“255” for the subnet mask “255.255.255.0”).

Required. Third octet of the subnet mask (for example “255” for the subnet mask “255.255.255.0”).

Required. Last (lowest order) octet of the subnet mask (for example “0” for the subnet mask “255.255.255.0”).

Return Values

Data Type Value

Short 0

Short 1

Example

Description

Command failed

Command completed successfully

Visual Basic status = MyPTE1.SaveEthernet_SubnetMask(255, 255, 255, 0)

Visual C++ status = MyPTE1->SaveEthernet_SubnetMask(255, 255, 255, 0);

Visual C# status = MyPTE1.SaveEthernet_SubnetMask(255, 255, 255, 0);

Matlab

[status] = MyPTE1.SaveEthernet_SubnetMask(255, 255, 255, 0)

See Also

Get Ethernet Configuration

Get Subnet Mask

Test Solutions - Programming Manual

Modular Test Systems

Page 99

4-Apr-17 (A6)

4.5 (m) - Save TCP/IP Port

Declaration

Short SaveEthernet_TCPIPPort ( Int port)

Description

This function sets the TCP/IP port used by the system for HTTP communication. The default is port 80.

Note: Port 23 is reserved for Telnet communication and cannot be set as the HTTP port.

Parameters

Data Type

Int

Return Values

Variable

port

Description

Required. Numeric value of the TCP/IP port.

Data Type Value

Short

Short

0

1

Description

Command failed

Command completed successfully

Example

Visual Basic status = MyPTE1.SaveEthernet_TCPIPPort(70)

Visual C++ status = MyPTE1->SaveEthernet_TCPIPPort(70);

Visual C# status = MyPTE1.SaveEthernet_TCPIPPort(70);

Matlab

[status] = MyPTE1.SaveEthernet_TCPIPPort(70)

See Also

Get TCP/IP Port

Test Solutions - Programming Manual

Modular Test Systems

Page 100

4-Apr-17 (A6)

4.5 (n) - Use DHCP

Declaration

Short SaveEthernet_UseDHCP ( Int UseDHCP)

Description

This function enables or disables DHCP (dynamic host control protocol). When enabled the

IP configuration of the system is assigned automatically by the network server; when disabled the user defined “static” IP settings apply.

Parameters

Data Type Variable

Int UseDHCP

Description

Required. Integer value to set the DHCP mode:

0 - DHCP disabled (static IP settings used)

1 - DHCP enabled (IP setting assigned by network)

Return Values

Data Type Value

Short 0

Short 1

Example

Description

Command failed

Command completed successfully

Visual Basic status = MyPTE1.SaveEthernet_UseDHCP(1)

Visual C++ status = MyPTE1->SaveEthernet_UseDHCP(1);

Visual C# status = MyPTE1.SaveEthernet_UseDHCP(1);

Matlab

[status] = MyPTE1.SaveEthernet_UseDHCP(1)

See Also

Get DHCP Status

Test Solutions - Programming Manual

Modular Test Systems

Page 101

4-Apr-17 (A6)

4.5 (o) - Use Password

Declaration

Short SaveEthernet_UsePWD ( Int UsePwd)

Description

This function enables or disables the password requirement for HTTP/Telnet communication with the system.

Parameters

Data Type Variable

Int UseDHCP

Description

Required. Integer value to set the password mode:

0 – Password not required

1 – Password required

Return Values

Data Type Value

Short

Short

0

1

Example

Description

Command failed

Command completed successfully

Visual Basic status = MyPTE1.SaveEthernet_UsePWD(1)

Visual C++ status = MyPTE1->SaveEthernet_UsePWD(1);

Visual C# status = MyPTE1.SaveEthernet_UsePWD(1);

Matlab

[status] = MyPTE1.SaveEthernet_UsePWD(1)

See Also

Get Password Status

Get Password

Set Password

Test Solutions - Programming Manual

Modular Test Systems

Page 102

4-Apr-17 (A6)

4.5 (p) - Set Password

Declaration

Short SaveEthernet_PWD ( String Pwd)

Description

This function sets the password used by the system for HTTP/Telnet communication. The

password will not affect switch operation unless Use Password is also enabled.

Parameters

Data Type Variable

String Pwd

Description

Required. The password to set (20 characters maximum).

Return Values

Data Type Value

Short 0

Short 1

Example

Description

Command failed

Command completed successfully

Visual Basic status = MyPTE1.SaveEthernet_PWD("123")

Visual C++ status = MyPTE1->SaveEthernet_PWD("123");

Visual C# status = MyPTE1.SaveEthernet_PWD("123");

Matlab

[status] = MyPTE1.SaveEthernet_PWD("123")

See Also

Get Password Status

Get Password

Use Password

Test Solutions - Programming Manual

Modular Test Systems

Page 103

4-Apr-17 (A6)

5 - Operating in a Linux Environment via USB

To open a USB connection to Mini-Circuits ZTM & RCM Series modular test systems, the

Vendor ID and Product ID are required:

 Mini-Circuits Vendor ID: 0x20CE

 ZTM Series Product ID: 0x22

Communication with the test system is carried out by way of USB Interrupt. The transmitted and received buffer sizes are 64 Bytes each:

 Transmit Array = [Byte 0][Byte1][Byte2]…[Byte 63]

 Returned Array = [Byte 0][Byte1][Byte2]…[Byte 63]

In most cases, the full 64 byte buffer size is not needed so any unused bytes become “don’t care” bytes; they can take on any value without affecting the operation of the system.

5.1 - Summary of Commands

The commands that can be sent to the ZTM Series are summarized in the table below and detailed on the following pages.

Description

Command Code

(Byte 0)

Comments a

Get Device Model Name

40

41

b

Get Device Serial Number

c

Send SCPI Command

d

Get Firmware

1

e

Get Internal Temperature

99

114

115

118

Sensor 1

Sensor 2

Sensor 3

Test Solutions - Programming Manual

Modular Test Systems

Page 104

4-Apr-17 (A6)

5.2 - Detailed Description of Commands

5.2 (a) - Get Device Model Name

Description

Returns the Mini-Circuits part number of the connected modular test system.

Transmit Array

Byte

0

Data

40

Description

Interrupt code for Get Device Model Name

1- 63

Not significant “Don’t care” bytes, can be any value

Returned Array

Byte

0

1 to

(n-1) n

(n+1) to 63

Data

40

Description

Interrupt code for Get Device Model Name

Model Name Series of bytes containing the ASCII code for each character in the model name

0 Zero value byte to indicate the end of the model name

Not significant “Don’t care” bytes, can be any value

Example

The following array would be returned for ZTM-999 (see Appendix A for conversions between decimal, binary and ASCII characters):

Byte

0

Data

40

Description

Interrupt code for Get Device Model Name

4

5

6

7

1

2

3

90

84

77

45

57

57

57

8

0

See Also

Get Device Serial Number

SCPI: Get Model Name

ASCII character code for Z

ASCII character code for T

ASCII character code for M

ASCII character code for -

ASCII character code for 9

ASCII character code for 9

ASCII character code for 9

Zero value byte to indicate end of string

Test Solutions - Programming Manual

Modular Test Systems

Page 105

4-Apr-17 (A6)

5.2 (b) - Get Device Serial Number

Description

Returns the serial number of the connected modular test system.

Transmit Array

Byte

0

Data

41

Description

Interrupt code for Get Device Serial Number

1 - 63

Not significant “Don’t care” bytes, can be any value

Returned Array

Byte Data Description

0

1 to

(n-1)

41 Interrupt code for Get Device Serial Number

Serial Number Series of bytes containing the ASCII code for each character in the serial number

n

(n+1) to 63

0

Not significant

Zero value byte to indicate the end of the serial number

“Don’t care” bytes, can be any value

Example

The following example indicates that the connected ZTM Series system has serial number

1130922011 (see Appendix A for conversions between decimal, binary and ASCII characters):

Byte

0

1

2

3

4

5

Data

41

49

49

51

48

57

Description

Interrupt code for Get Device Serial Number

ASCII character code for 1

ASCII character code for 1

ASCII character code for 3

ASCII character code for 0

ASCII character code for 9

6

7

8

9

50

50

48

49

10

11

49

0

See Also

Get Device Model Name

SCPI: Get Serial Number

ASCII character code for 2

ASCII character code for 2

ASCII character code for 0

ASCII character code for 1

ASCII character code for 1

Zero value byte to indicate end of string

Test Solutions - Programming Manual

Modular Test Systems

Page 106

4-Apr-17 (A6)

5.2 (c) - Send SCPI Command

Description

This function sends an SCPI command to the modular test system and collects the returned acknowledgement. SCPI (Standard Commands for Programmable Instruments) is a common method for communicating with and controlling instrumentation products and provides the main method for interfacing with the ZTM Series system’s internal test components.

Transmit Array

Byte

0

Returned Array

Data

1

1 - 63

SCPI Transmit

String

Description

Interrupt code for Send SCPI Command

The SCPI command to send represented as a series of ASCII character codes, one character code per byte

Byte

0

1 to

(n-1) n

(n+1) to 63

Data

1

SCPI Return

String

Description

Interrupt code for Send SCPI Command

The SCPI return string, one character per byte, represented as ASCII character codes

0 Zero value byte to indicate the end of the SCPI return string

Not significant “Don’t care” bytes, can be any value

Test Solutions - Programming Manual

Modular Test Systems

Page 107

4-Apr-17 (A6)

Example 1 (Get Model Name)

The SCPI command to request the model name is :MN?

(see Get Model Name )

The ASCII character codes representing the 4 characters in this command should be sent in bytes 1 to 4 of the transmit array as follows (see Appendix A for conversions between decimal, binary and ASCII characters):

Byte

0

1

2

3

Data

1

49

77

78

Description

Interrupt code for Send SCPI Command

ASCII character code for :

ASCII character code for M

ASCII character code for N

4

63 ASCII character code for ?

The returned array for ZTM-999 would be as follows:

Byte

0

1

2

Data

1

90

84

Description

Interrupt code for Send SCPI Command

ASCII character code for Z

ASCII character code for T

3

4

5

6

7

8

77

45

57

57

57

0

ASCII character code for M

ASCII character code for -

ASCII character code for 9

ASCII character code for 9

ASCII character code for 9

Zero value byte to indicate end of string

Test Solutions - Programming Manual

Modular Test Systems

Page 108

4-Apr-17 (A6)

Example 2 (Set Attenuator)

The SCPI command to set an attenuator in slot 1A to 70.25dB is :RUDAT:1A:ATT:70.25

(see Set Attenuation ). The ASCII character codes representing the 19 characters in this

command should be sent in bytes 1 to 19 of the transmit array as follows:

Byte

0

Data

1

Description

Interrupt code for Send SCPI Command

1

2

3

4

5

6

7

58

82

85

68

65

84

58

ASCII character code for :

ASCII character code for R

ASCII character code for U

ASCII character code for D

ASCII character code for A

ASCII character code for T

ASCII character code for :

12

13

14

15

16

17

8

9

10

11

49

65

58

65

84

84

58

55

48

46

ASCII character code for 1

ASCII character code for A

ASCII character code for :

ASCII character code for A

ASCII character code for T

ASCII character code for T

ASCII character code for :

ASCII character code for 7

ASCII character code for 0

ASCII character code for .

18

19

50

53

ASCII character code for 2

ASCII character code for 5

The returned array to indicate success would be:

Byte

0

1

2

Data

1

49

32

Description

Interrupt code for Send SCPI Command

ASCII character code for 1

ASCII character code for space character

3

4

5

6

7

45

32

83

85

67

ASCII character code for -

ASCII character code for space character

ASCII character code for S

ASCII character code for U

ASCII character code for C

8

9

10

11

67

69

83

83

ASCII character code for C

ASCII character code for E

ASCII character code for S

ASCII character code for S

12

0 Zero value byte to indicate end of string

See Also

SCPI Command Set for Control of ZTM-X Components

Test Solutions - Programming Manual

Modular Test Systems

Page 109

4-Apr-17 (A6)

5.2 (d) - Get Firmware

Description

This function returns the internal firmware version of the modular test system.

Transmit Array

Byte

0

Data

99

Description

Interrupt code for Get Firmware

1- 63

Not significant “Don’t care” bytes, can be any value

Returned Array

Byte Data Description

0

1

99

Reserved

Interrupt code for Get Firmware

Internal code for factory use only

2

3

Reserved

Reserved

Reserved

Internal code for factory use only

Internal code for factory use only

Internal code for factory use only

4

5

6

Firmware

Letter

Firmware

Number

ASCII code for the first character in the firmware revision identifier

ASCII code for the second character in the firmware revision identifier

7-63

Not significant “Don’t care” bytes, could be any value

Example

The below returned array indicates that the system has firmware version “C3” (see Appendix

A for conversions between decimal, binary and ASCII characters):

Byte Data Description

0

1

2

3

99

49

77

78

Interrupt code for Get Firmware

Not significant

Not significant

Not significant

4

5

63

67

6

See Also

SCPI: Get Firmware

51

Not significant

ASCII character code for C

ASCII character code for 3

Test Solutions - Programming Manual

Modular Test Systems

Page 110

4-Apr-17 (A6)

5.2 (e) - Get Internal Temperature

Description

Returns the internal temperature of the modular test system in degrees Celsius to 2 decimal places.

Transmit Array

Byte

0

Data Description

114, 115 or 118 Interrupt code for Get Internal Temperature:

114 = Check temperature sensor 1

115 = Check temperature sensor 2 (if available)

118 = Check temperature sensor 3 (if available)

163

Not significant “Don’t care” bytes, can be any value

Returned Array

Byte

0

Data Description

114, 115 or 118 Interrupt code for Get Internal Temperature:

114 = Check temperature sensor 1

1

43 or 45

115 = Check temperature sensor 2 (if available)

118 = Check temperature sensor 3 (if available)

ASCII code for the first character of the temperature:

43 = positive (+)

45 = negative (-)

2

3

Temperature

Digit 1

Temperature

Digit 2

46

ASCII character code for the first digit of the temperature reading

ASCII character code for the second digit of the temperature reading

ASCII character code for the decimal point symbol (“.”)

4

5

6

Temperature

Decimal Place 1

Temperature

Decimal Place 2

ASCII character code for the first decimal place of the temperature reading

ASCII character code for the second decimal place of the temperature reading

7-63

Not significant “Don’t care” bytes, can be any value

Test Solutions - Programming Manual

Modular Test Systems

Page 111

4-Apr-17 (A6)

Example

To check the internal temperature measured by sensor 2, send the following transmit array:

Byte

0

Data

115

Description

Interrupt code for Get Internal Temperature @ Sensor 2

The below returned array would indicate a temperature of +28.43°C (see Appendix A for conversions between decimal, binary and ASCII characters):

Byte

0

1

2

Data

115

43

50

Description

Interrupt code for Get Internal Temperature @ Sensor 2

ASCII character code for +

ASCII character code for 2

3

4

5

6

56

46

52

51

See Also

SCPI: Get Internal Temperature

ASCII character code for 8

ASCII character code for .

ASCII character code for 4

ASCII character code for 3

Test Solutions - Programming Manual

Modular Test Systems

Page 112

4-Apr-17 (A6)

6 - Ethernet Control over IP Networks

Mini-Circuits’ ZTM & RCM Series modular test systems have an RJ45 connector option for remote control over Ethernet TCP/IP networks. HTTP (Get/Post commands) and Telnet communication are supported. UDP transmission is also supported for discovering available

ZTM Series systems on the network.

The system can be configured manually with a static IP address or automatically by the network using DHCP (Dynamic Host Control Protocol):

 Dynamic IP (factory default setting) o Subnet Mask, Network Gateway and local IP Address are assigned by the network server on each connection o The only user controllable parameters are:

 TCP/IP Port (the port used for HTTP communication with the network; default is port 80)

 Password (up to 20 characters; default is no password)

 Static IP o All parameters must be specified by the user:

 IP Address (must be a legal and unique address on the local network)

 Subnet Mask (subnet mask of the local network)

 Network gateway (the IP address of the network gateway/router)

 TCP/IP port (the port used for HTTP communication with the network; default is port 80)

 Password (up to 20 characters; default is no password)

Notes:

1. The TCP/IP port must be included in every HTTP command to the ZTM Series system unless the default port 80 is used

2. Port 23 is reserved for Telnet communication

6.1 - Configuring Ethernet Settings

The modular test system must be connected via the USB interface in order to configure the

Ethernet settings. Following initial configuration, the device can be controlled via the

Ethernet interface with no further need for a USB connection. The API DLLs provide a full set of functions for configuring the Ethernet settings.

Test Solutions - Programming Manual

Modular Test Systems

Page 113

4-Apr-17 (A6)

6.2 - Ethernet Communication

Communication over Ethernet can be accomplished using HTTP Get/Post commands or

Telnet communication to send the SCPI commands outlined in SCPI Commands for Control of

Modular Test Components . These communication protocols are both commonly supported

and simple to implement in most programming languages. Any Internet browser can be used as a console/tester for HTTP control by typing the commands/queries directly into the address bar.

6.2 (a) - Sending SCPI Commands/Queries Using HTTP

The basic format of the HTTP command to send to the modular test system is: http://ADDRESS:PORT/PWD;COMMAND

Where

 http:// is required

 ADDRESS = IP address (required)

 PORT = TCP/IP port (can be omitted if port 80 is used)

 PWD = Password (can be omitted if password security is not enabled)

 COMMAND = Command to send to the switch

Example 1: http://192.168.100.100:800/PWD=123;:SPDT:1A:STATE:2

Explanation:

 The ZTM Series has IP address 192.168.100.100 and uses port 800

 Password security is enabled and set to “123”

 The command is to set an SPDT in location 1A to state 2

Example 2: http://10.10.10.10/:SP4T:1:STATE?

Explanation:

 The switch has IP address 10.10.10.10 and uses the default port 80

 Password security is disabled

 The command is to query the switch state of an SP4T in location 1

The system will return the result of the command/query as a string of ASCII characters.

Test Solutions - Programming Manual

Modular Test Systems

Page 114

4-Apr-17 (A6)

6.2 (b) - Sending SCPI/Commands/Queries Using Telnet

Communication is started by creating a Telnet connection to the system’s IP address. On successful connection the “line feed” character will be returned. If the system has a password enabled then this must be sent as the first command after connection.

The full list of all commands and queries is detailed in the following sections. A basic example of the Telnet communication structure using the Windows Telnet Client is summarized below:

1) Set up Telnet connection to a modular test system with IP address 10.0.6.46:

2) The “line feed” character is returned indicating the connection was successful:

3) The password (if enabled) must be sent as the first command in the format “PWD=x;”. A return value of “1 - Success” indicates success:

4) Any number of commands and queries can be sent as needed:

Test Solutions - Programming Manual

Modular Test Systems

Page 115

4-Apr-17 (A6)

6.2 (c) - Device Discovery Using UDP

In addition to HTTP and Telnet, ZTM & RCM Series test systems also provide limited support of the UDP protocol for the purpose of “device discovery.” This allows a user to request the IP address and configuration of all Mini-Circuits modular test systems connected on the network; full control of those units is then accomplished using HTTP or Telnet, as detailed previously.

Alternatively, the IP configuration can be identified or changed by connecting the system with

the USB interface (see Configuring Ethernet Settings ).

Note: UDP is a simple transmission protocol that provides no method for error correction or guarantee of receipt.

UDP Ports

Mini-Circuits’ modular test systems are configured to listen on UDP port 4950 and answer on

UDP port 4951. Communication on these ports must be allowed through the computer’s firewall in order to use UDP for device discovery. If the test system’s IP address is already known it is not necessary to use UDP.

Transmission

The command

MODULAR-ZT?

should be broadcast to the local network using UDP protocol on port 4950.

Receipt

All Mini-Circuits ZTM & RCM Series systems that receive the request will respond with the following information (each field separated by CrLf) on port 4951:

 Model Name

 Serial Number

 IP Address/Port

 Subnet Mask

 Network Gateway

 MAC Address

Test Solutions - Programming Manual

Modular Test Systems

Page 116

4-Apr-17 (A6)

Example

Sent Data:

MODULAR-ZT?

Received Data:

Model Name: ZTM-999

Serial Number: 11302120001

IP Address=192.168.9.101 Port: 80

Subnet Mask=255.255.0.0

Network Gateway=192.168.9.0

Mac Address=D0-73-7F-82-D8-01

Model Name: ZTM-999

Serial Number: 11302120002

IP Address=192.168.9.102 Port: 80

Subnet Mask=255.255.0.0

Network Gateway=192.168.9.0

Mac Address=D0-73-7F-82-D8-02

Model Name: ZTM-999

Serial Number: 11302120003

IP Address=192.168.9.103 Port: 80

Subnet Mask=255.255.0.0

Network Gateway=192.168.9.0

Mac Address=D0-73-7F-82-D8-03

Test Solutions - Programming Manual

Modular Test Systems

Page 117

4-Apr-17 (A6)

7 - Program Examples & Tutorials

These examples are intended to demonstrate the basics or programming with Mini-Circuits' ZTM &

RCM Series test systems. If support is required for a specific programming example which isn't covered below then please contact Mini-Circuits for support ( [email protected]

).

7.1 - Perl Programming

7.1 (a) - Ethernet HTTP Connection Using Perl's LWP Simple Interface

Perl's LWP Simple interface can be used to send HTTP commands to the ZTM or RCM Series when programming with Perl. The below code example demonstrates the process.

#!/usr/bin/perl

use

strict;

use

warnings;

use

LWP::Simple;

my

$value = 40 ;

my

$ip_address = "192.168.9.74";

# Use the LWP::Simple interface for HTTP

# IP address of the ZTM Series to control

my

$att_list = "1A,2A,3A,4A"; # The list of attenuator locations in the ZTM

my

@att_location =

split

/,/ , $att_list ;

foreach my

$att_location ( @att_location ) {

# Loop for each attenuator location

# Set attenuator in this location

my

$return_value = get("http://$ip_address/:RUDAT:$att_location:ATT:$value");

print

"ZTM Series response: $return_value\n";

# Confirm attenuation setting for this attenuator

$return_value = get("http://$ip_address/:RUDAT:$att_location:ATT?");

print

"Attenuator $att_location set to $return_value\n";

}

7.1 (b) - USB Connection Using the ActiveX DLL in 32-bit Perl Distributions

The majority of 32-bit Perl distributions for Windows operating systems provide support for ActiveX, meaning Mini-Circuits' ActiveX DLL can be used to control the modular test system in these environments. The below simple code segment demonstrates the process for this; any number of commands can be sent between the Connect and Disconnect functions.

use

feature ':5.10';

use

Win32::OLE;

use

Win32::OLE::Const 'Microsoft ActiveX Data Objects';

my

$ztm = Win32::OLE->new('ModularZT.USB_Control');

$ztm ->Connect();

$ztm ->Send_SCPI(":RUDAT:1A:ATT:70.25", ztm_return )

$ztm ->Send_SCPI(":SP4T:1A:STATE:3", ztm_return )

$ztm ->Disconnect;

Test Solutions - Programming Manual

Modular Test Systems

Page 118

4-Apr-17 (A6)

7.1 (c) - Work-Around for 64-bit Perl Distributions Using USB Connection

The majority of 64-bit Perl distributions do not provide support for either ActiveX or .Net so in these cases Mini-Circuits' DLLs cannot be used directly. The work-around when a USB connection is required is to create a separate executable program in another programming environment which can sit in the middle. The function of the executable is to use the .Net DLL to connect to the ZTM or RCM

Series, send a single user specified command, return the response to the user, and disconnect from the DLL. This executable can then be easily called from Perl script to send the required commands to the system, without Perl having to directly interface with the DLL.

Mini-Circuits can supply on request an executable to interface with the DLL. See Creating an

Executable Using the .Net DLL in C# for USB Control for the example source code for such an

executable (developed using C#). The below script demonstrates use of this executable in Perl script to send a SCPI command to a ZTM Series test system (specified by serial number or address) and read the response.

#!/usr/bin/perl

use strict;

use

warnings;

my

$serial_number = 11404280010 ; # The ZTM Series serial number

my

$att_list = "1A,2A,3A,4A"; # The list of attenuator locations in the ZTM

my

@att_location =

split

/,/ , $att_list ;

my

$value = 40 ;

my

$exe = "ZTM.exe"; # The .exe providing an interface to the ZTM DLL

my

@cmd ;

foreach my

$att_location ( @att_location ) {

# Loop for each attenuator location

# Set attenuator in this location

@cmd = ( $exe , "-s $serial_number :RUDAT:$att_location:ATT:$value");

my

$return_value = qx{@cmd};

print

"ZTM Series response: $return_value\n";

# Confirm attenuation setting for this attenuator

@cmd = ( $exe , "-s $serial_number :RUDAT:$att_location:ATT?");

$return_value = qx{@cmd};

print

"Attenuator $att_location set to $return_value\n";

}

Test Solutions - Programming Manual

Modular Test Systems

Page 119

4-Apr-17 (A6)

7.2 - C# Programming

7.2 (a) - Creating an Executable Using the .Net DLL in C# for USB Control

The below example is a simple executable program that connects to the .Net DLL, sends a user specified SCPI command to the test system, returns the response, then disconnects from the DLL and terminates. It requires the .Net DLL to be installed on the host operating system and the ZTM or

RCM Series test system to be connected to the PC via USB. namespace ZTM

{ class Program

{ static int Main( string [] args)

{ int x = 0; string SN = null ; string SCPI = null ; string RESULT = null ; int Add = 0;

ModularZT64.

USB_ZT ZT; // Reference the DLL if (args.Length == 0) return 0;

ZT = new ModularZT64.

USB_ZT (); // Declare a class (defined in the DLL)

SCPI = args[2]; if (args[0].ToString().Contains( "-help" )) // Print a help file

{

Console .WriteLine( "Help ZTM.exe" );

Console .WriteLine( "-------------------------------------------" );

Console .WriteLine( "ZTM.exe -s SN command :Send SCPI command to S/N" );

Console .WriteLine( "ZTM.exe -a add SCPI :Send SCPI command to Address" );

Console .WriteLine( "-------------------------------------------" );

} if (args[0].ToString().Contains( "-s" )) // User want to connect by S/N

{

SN = args[1];

x = ZT.Connect( ref SN); // Call DLL connect function

x = ZT.Send_SCPI( ref SCPI, ref RESULT); // Send SCPI command

Console .WriteLine(RESULT); // Return the result

} if (args[0].ToString().Contains( "-a" )) // User wants to connect by address

{

Add = Int16 .Parse(args[1]);

x = ZT.ConnectByAddress( ref Add);

x = ZT.Send_SCPI( ref SCPI, ref RESULT);

Console .WriteLine(RESULT);

}

ZT.Disconnect

return x;

();

}

}

}

// Call DLL disconnect function to finish

This executable can be called from a command line prompt or within a script. The following command line calls demonstrate use of the executable (compiled as ZTM.exe), connecting by serial number or address, to set and read attenuation:

ZTM.exe -s 11401250027 :RUDAT:1A:ATT:35.75

(serial number 11401250027)

ZTM.exe -a 255 :RUDAT:1A:ATT?

(USB address 255)

Test Solutions - Programming Manual

Modular Test Systems

Page 120

4-Apr-17 (A6)

7.3 - LabVIEW

7.3 (a) - Creating a LabVIEW VI for USB Control with the ActiveX DLL

These instructions demonstrate how to set up a LabVIEW VI for control of Mini-Circuits' ZTM and

RCM Series test systems using the ActiveX DLL file when connected by USB.

1. Create a New VI (Virtual Instrument) and Reference the DLL

a. Open LabVIEW with a new, blank VI. b. In the Block Diagram window (accessible by pressing Ctrl+E), select Functions Palette from the “View” menu at the top of the screen. c. Click through the Connectivity palette to the ActiveX sub-palette. Select the Automation

Open function and place it on the block diagram. d. Right click on the Automation Refnum terminal on the left of the Automation Open function and create a control.

Test Solutions - Programming Manual

Modular Test Systems

Page 121

4-Apr-17 (A6)

e. Right click on the new control, choose the ‘Select ActiveX Class’ option and browse to the location of the ModularZT.dll file. f. After selecting the DLL file, choose “USB_Control” from the list of objects presented. g. Right click on the Error In terminal of the Automation Open function and create a new control. h. To save space on the block diagram, right-click the Error In icon and uncheck the “View

As Icon” option.

2. Identifying the Serial Numbers of all Connected ZTM Series Systems

This section makes use of the Get_Available_SN_List DLL function to provide a drop-down list of all connected serial numbers, allowing the user to choose which system to connect. If the serial numbers are already known or only a single system is connected then this process can be omitted. a. From the ActiveX sub-palette, choose Invoke Node and place the node on the block diagram. b. Connect the right Automation Refnum terminal of the Automation Open function to the

Reference terminal on the Invoke Node. c. Connect the Error Out terminal of the Automation Open function to the Error In terminal of the Invoke Node. d. Click on the Method of the Invoke Node to display a list of all available functions (defined in the ModularZT.dll file), select “Get_Available_SN_List”. e. Right-click the Input terminal of the SN_List parameter and create a blank constant. The constant will provide the SN_List parameter to the Get_Available_SN_List function. f. From the Programming palette, go to the Comparison sub-palette. Select the Not Equal

To 0 function and place it on the block diagram. g. Connect the Get_Available_SN_List terminal of the Invoke Node to the input of the Not

Equal To 0 function.

Test Solutions - Programming Manual

Modular Test Systems

Page 122

4-Apr-17 (A6)

h. Create an Indicator at the Output terminal of the Not Equal To 0 function. The output of the Get_Available_SN_List function will be 0 (failure to connect) or 1 (successfully connected) so the indicator should light up when the retrieval of the serial numbers is successful. i. Right-click on the Indicator and rename to “Get SN List Success?”. j. Place a While Loop (found in the Programming palette, Structures sub-palette) on the block diagram, external to the previous objects. k. Delete the stop button if it was included automatically but not the loop condition (the red dot). l. Place a Match Pattern function (found in the Programming palette, String sub-palette) inside the While Loop. m. Connect the output of the “SN_List” parameter (from the Get_Available_SN_List node) to the String input terminal of the Match Pattern function. n. Create another empty string constant outside the While Loop, connected to the Regular

Expression terminal of the Match Pattern function. This is because each SN that the

Node outputs will be separated by a blank space. o. Connect the Before Substring terminal of the Match Pattern function to the right-hand edge of the While Loop. p. Right-click on the Loop Tunnel between the “SN_List” parameter and the String input terminal of the Match Pattern, select ‘Replace with Shift Register’. The mouse cursor will automatically change to signify the other end of the Shift Register, click on the Loop

Tunnel at the right-hand edge of the While Loop to place it.

Test Solutions - Programming Manual

Modular Test Systems

Page 123

4-Apr-17 (A6)

q. Place a Trim Whitespace.vi from the String sub-palette inside the While Loop. r. Connect the After Substring terminal of the Match Pattern function to the input of the

VI. s. Place a Build Array function (found in the Programming palette, Array sub-palette) in the

While Loop and expand it to have two inputs by dragging the bottom edge down t. An empty String Array constant is needed for the Build Array function. Select Array constant from the Array sub-palette and place it outside the While Loop. u. Place another String constant on the block diagram and drag it into the Array constant box to create the empty String Array. v. Connect the String Array constant to the first Input terminal of the Build Array function. w. Connect the Trimmed String terminal of the Trim Whitespace VI to the second terminal of the Build Array function. x. Connect the output of the Build Array function to the edge of the While Loop and create another Shift Register, with the other end at the empty String Array Loop Tunnel. y. Place a String Length function (from the String sub-palette) inside the While Loop. z. Connect the Input terminal of the function to the After Substring terminal of the Match

Pattern function. This will form a junction since the After Substring terminal is also connected to the Trim Whitespace VI. aa. Connect the Length output terminal of the String Length function to the input of a new

Equal to 0 function (found in the Comparison sub-palette). bb. Connect the output of the Equal to 0 function to the loop condition. If the output of the

String Length function is 0 it will indicate that there are no more serial numbers and the

Equal to 0 operator will cause the loop to stop. cc. On the Front Panel of this VI, create a drop-down menu by placing a System Combo Box function (found in the Systems palette, String & Path sub-palette). dd. On the Block Diagram, right click the corresponding System Combo Box function, create a Strings[] Property Node by selection “Create”, “Property Node”, then “Strings[]”.

Place the Strings[] Property Node outside the While Loop. ee. Right click the Strings[] Property Node and select “Change to Write”. ff. Rename the System Combo Box function to “SN_List”. Right-click and un-tick “View As

Icon” to save space on the block diagram. gg. Connect the output from the Shift Register that follows the Build Array function to the input of the Strings[] Property Node. hh. Connect the Error Out terminal of the _USB_Control Node to the Error In terminal of the

Strings[] Node. ii. Create another While Loop and arrange it so that it encompasses everything from the

Automation Open function onwards. jj. If a Stop Button was not created automatically then right-click on the loop condition and select “Create Control” to place the button in the loop.

Test Solutions - Programming Manual

Modular Test Systems

Page 124

4-Apr-17 (A6)

kk. On the Front Panel, change the Stop Button text from “Stop” to “Connect”.

3. Connecting to a ZTM Series Test System

a. Create a new Invoke Node outside the While Loop. b. Connect the Reference Out terminal of the Get_Available_SN_List Node to the Reference terminal of the new Invoke Node. c. Select “Connect” as the method for the new node. d. Connect the Error Out terminal of the Strings[] node to the Error In terminal of the

Connect node. e. Connect the output terminal of the SN_List combo box to the SN input terminal of the

Connect Node. f. During execution, the program will not get to this stage until the While Loop has exited, the result being that the program will populate the drop-down box with all serial numbers and wait for a user input. The program will continue when the user selects the desired serial number and clicks the Connect button. If the process of identifying serial numbers is not required (see step 3 above) then the “Connect” function can be used in place of the “Get_Available_SN_List” function and everything that followed. g. Following the Connect Node, the user can place any number of additional nodes in sequence to perform all operations required of the ZTM-X system. The Reference In and

Error In terminals of each new node should be connected to the Reference Out and Error

Out terminals of the previous nodes. h. The final Invoke Node in the program should be set with the “Disconnect” function in order to properly close the connection to the ZTM-X system. i. The final step in the LabVIEW sequence is to create a Close Reference function from the

Connectivity palette to terminate the reference to the DLL file. The Reference In and

Error In terminals of the Close Reference function should be connected to the respective terminals of the Disconnect function. j. An Error Out indicator should be added by right clicking on the Error Out terminal of the

Close Reference function and creating an indicator to show the result.

Test Solutions - Programming Manual

Modular Test Systems

Page 125

4-Apr-17 (A6)

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals