6. Programming. Agilent Technologies 85330A, Multiple Channel Controller 85330A, 54503A

Add to My manuals
166 Pages

advertisement

6. Programming. Agilent Technologies 85330A, Multiple Channel Controller 85330A, 54503A | Manualzz

Programming

6

Programming

In This Chapter

GPIB Addresses

Long and Short

Command Syntax

This chapter provides a general programing of the operation for the Agilent

85330A and a detailed description of the programming codes. Several scenarios and examples are given.

GPIB addresses

Definition of terms

To choose a measurement configuration

To use Direct control

To use run-time control mode

Programming examples

Using GPIB commands, the 85330A can be set up prior to run-time followed by an GPIB command to pass run-time control to the 85330A. This is called

run-time control mode. The 85330A can also directly control switch states and issue triggers using GPIB commands. This is called direct control.

BASIC is used for all examples. To address the 85330A, a secondary GPIB address is needed. In most cases the complete GPIB address would be

70918:

“7” refers to the select code of the GPIB address.

“09” is the GPIB address of the 85330A multiple channel controller.

“18” is the secondary address of the E1330A/B DIO card. This is a board that is inside the multiple channel controller.

The GPIB commands have a long and short form. The upper-case characters represent the short form and the complete set of characters represent the long form. Example, ROUTe:CLOSe is the complete or long from of the GPIB command while the abbreviated or short form is ROUT:CLOS.

85330A Multiple Channel Controller 6-1

Programming

Definition of Terms

NOTE

NOTE

Please review the following terms before reading information in this chapter.

SCU address

At the factory, each Switch Control Unit is assigned an address called an

SCU address. When commands are sent out port 1 or port 2, they only affect

SCUs with the specified SCU address. SCU addresses are set using DIP switches inside the SCU, and can be set to 0, 1, 2, or 3. In a standard system, the factory default setting is 0. For custom-designed systems, refer to the documentation that came with that system for SCU address numbers.

Daisy-chained SCUs may use the same SCU address.

Channel

Each switch module has either two or four possible switch positions, or channels. If you purchased a switching system designed by Agilent, you also have received a manual that applies specifically to that switch tree. That document shows the channel numbers for each switch. If you have purchased a “standard” system, then channels 1 through 4 are the factory default channel numbers. (Channels 3 and 4 only apply to four-throw switches.)

Ports 1 and 2 are addressed independently. Because of this, there are no addressing conflicts when using two SCUs—even if they use the same SCU address and channel numbers.

Switch address

This is the complete software address for a specific switch. It is simply a concatenation of the SCU address (0, 1, 2, or 3) with the channel number

(usually 1, 2, 3, or 4, but possibly a number up to 64 in custom systems).

Examples:

@103 = SCU address 1 and channel 3 selected.

@2 = SCU address is 0 (and need not be specified), and channel 2 is selected.

@232 = SCU address is 2 and channel 32 is selected (custom systems only).

The port number (1 or 2) is specified separately, as is explained later in this chapter.

6-2 85330A Multiple Channel Controller

To Choose a Measurement Configuration

To Choose a Measurement Configuration

Programming

The measurement configuration you use depends on the type of measurement (CW or multiple-frequency) and the type of system

(one-source or two-source system). One-source systems use the Agilent

8511A/B frequency converter, two-source systems use the Agilent 85309A frequency converter.

Refer to

Figure 6-1 .

How to Use the Figure

Follow the flow chart from the top. Determine if your measurements are made with a single frequency (CW) or multiple frequencies. Proceed down the appropriate flow chart path. Proceed in this way until you get to a box that mentions one of the following headings:

CW Measurement Configuration

Single Source Multiple-Frequency Configuration

8530A Control of Sources

Fast Source Control

Proceed to the section indicated to read about that specific configuration.

Figure 6-1 Flow Chart for Finding the Correct Configuration

85330A Multiple Channel Controller 6-3

Programming

CW Measurement Configuration

Description

To Use this

Configuration

CW Measurement Configuration

In single-frequency measurements, the Fast Source Control mode is not used. The RF source (and LO source, if used) can either be controlled by:

The 8530A (set the sources to Analyzer Language mode), or...

The system computer (set the sources to SCPI Language mode).

Refer to the programming

“Example 1” on page 6-21 .

The proper setup is shown in

Figure 1-2 on page 1-4 . Use the 8530A Fast

Autoranging Data Mode (GPIB command: FASAD ), explained in Chapter 8 of the Agilent 8530A User’s Guide.

6-4 85330A Multiple Channel Controller

Description

NOTE

To Use this

Configuration

Programming

Single Source Multiple-Frequency Configuration

Single Source Multiple-Frequency Configuration

In single-source (8511A/B based) systems, the Fast Source Control mode is

not available. The RF source is controlled by the 8530A (Analyzer

Language mode). The proper setup is shown in

Figure 1-2 on page 1-4 .

The Fast Data Acquisition modes of the 8530A cannot be used with this type of measurement. Instead, the multiple parameter display of the 8530A is used to measure each switch input.

Refer to the programming

“Example 2” on page 6-25 .

When using the multiple parameter display feature, the minimum switch settling time (RUNT:SWIT:DEL) is 50 µ s. Using shorter settling times in multiple parameter display mode can cause measurement problems

Here is an overview of how measurements are made in this configuration.

Remember, GPIB commands must be immediately followed by a semicolon when entered into an actual program. For example NUMEB1;.

8530A settings

Select multiple parameter display mode on the 8530A. The number of parameters selected should equal the number of test signals you are measuring. For example, assume you have a two-throw receive switch connected to two test signals. In this case, program the 8530A for two parameter display GPIB command TWOP.

This is the equivalent of pressing [DISPLAY] {DISPLAY MODE} {TWO PARAMETER}.

Set each parameter to measure the same input ratio. For example, set them all to measure b1/a1. The numerator and the denominator are defined below:

The numerator is the input port (of the frequency downconverter) that is connected to the common port of the receive switch. Set this using the GPIB NUMEB1, NUMEB2, NUMEA1, or NUMEA2 command. This is equivalent to pressing PARAMETER {MENU} {REDEFINE PARAMETERS}

{NUMERATOR}, then {NUMERATOR: b1}, {NUMERATOR: b2}, {NUMERATOR: a1}, or

{NUMERATOR: a2} .

The denominator is the input port that is connected to the reference signal. Use the DENOA1, DENOA2 , or DENOB1 command. This is equivalent to pressing PARAMETER {MENU} {REDEFINE PARAMETERS}

{DENOMINATOR} , then {DENOM.: a1}, {DENOM.: a2} , or {DENOM.: b1}.

85330A Multiple Channel Controller 6-5

Programming

Single Source Multiple-Frequency Configuration

This setup allows the 8530A to measure each receive switch input in sequence. Each one is measured as a separate parameter, which you can read using the system computer. Refer to the GPIB Programming chapter of the

Agilent 8530A Operating and Programming Manual for detailed information.

Select external triggering with TRGEXT . This is equivalent to pressing

STIMULUS {MENU} {MORE} {TRIGGER MODE} {TRIG SRC EXTERNAL} . This command is described in the Stimulus chapter of the Agilent 8530A

Operating and Programming Manual.

Set the 8530A so it waits for a trigger before measuring each parameter.

You can do this by issuing PAR1TON, PAR2TON, PAR3TON, and PAR4TON . This is equivalent to pressing STIMULUS {MENU} {MORE} {TRIGGER MODE} , then ensuring that {PARAM 1}, {PARAM 2}, {PARAM 3} , and {PARAM 4} are activated

(underlined). These commands are described in the Stimulus chapter of the Agilent 8530A Operating and Programming Manual.

You only have to send the PARTON commands that relate to the parameters

that are actually being measured. For example, if you are only measuring

Parameter 1 and Parameter 2, PAR1TON and PAR2TON are the only two commands that must be executed.

NOTE You can issue all four of these commands even if you are measuring only two or three parameters. The extra commands will simply be ignored.

85330A settings

When the source is under 8530A control, the multiple channel controller must be set to the IMMediate triggering mode:

RUNT:SOUR:SOURCE1:TRIG IMM;

Use GPIB address 19 for the RF source.

6-6 85330A Multiple Channel Controller

Description

To Use this

Configuration

Programming

Dual Source Multiple-Frequency Measurements

Dual Source Multiple-Frequency Measurements

When you are using multiple-frequency measurements with an 85309A frequency converter, you can choose how the sources are controlled:

You can allow the 8530A to control source frequency switching, or...

You can use the Fast Source Control configuration, where source frequency switching is controlled by the multiple channel controller.

8530A Control of Sources

If you choose to control source frequency switching with the 8530A (and you are using the dual source multiple-frequency configuration), you cannot use the Fast Data Acquisition modes of the receiver. Refer to the programming

“Example 2” on page 6-25 .

Operation in this mode is nearly identical to that described in

“Single Source

Multiple-Frequency Configuration” on page 6-5 . When the sources are

under 8530A control, the multiple channel controller must be set to the

IMMediate triggering mode:

RUNT:SOUR:SOURCE1:TRIG IMM;

RUNT:SOUR:SOURCE2:TRIG IMM;

Use GPIB address 19 for the RF source, and 18 for the LO source.

85330A Multiple Channel Controller 6-7

Programming

Fast Source Control

Description

To Use this

Configuration

6-8

Fast Source Control

Fast source control speeds up frequency switching speed in multiple-frequency measurements. It is only available in 85309A-based systems. This mode uses TTL signals to increment RF and LO source frequency, providing faster frequency switching speeds than are possible under 8530A control.

Refer to the programming

“Example 3” on page 6-29 .

In the fast source control configuration, the system’s computer must set up the sources with appropriate frequency settings, triggering mode, and so on.

When automatic run-time measurement mode is engaged, the 85330A automatically increments the RF and LO source frequencies using TTL lines. When being controlled by a computer, the SCPI language mode must be selected. This is shown in

Figure 1-3 on page 1-5 .

Fast Data Acquisition can be used in this configuration. Use the 8530A Fast

Autoranging Data Mode (GPIB command: FASAD ), as explained in Chapter 8 of the Agilent 8530A User’s Guide.

8530A settings

In the 8530A Local menu, the addresses for Source 1 and Source 2 must be set to 31. This tells the 8530A that it cannot communicate with the sources.

85330A settings

Since the 8530A does not control the sources, set the multiple channel controller to TTL triggering mode:

RUNT:SOUR:SOURCE1:TRIG TTL;

RUNT:SOUR:SOURCE2:TRIG TTL;

Source settings

Use Frequency List or Step mode.

Sweep Point Trigger must be set to EXT:

SWE:TRIG:SOUR EXT;

Start Sweep Trigger must be set to AUTO:

TRIG:SOUR IMM;

The Sweep Point Trigger and Start Sweep Trigger settings allow external triggers from the 85330A to trigger the sources.

85330A Multiple Channel Controller

Programming

To Use Direct Control

To Use Direct Control

Selecting a Channel

Direct control is where the host computer issues GPIB commands and the

85330A executes them immediately. For example, the ROUTe:CLOSe

(port number) (switch address) command causes the 85330A to immediately change switch states.

Here are examples of how to select a channel.

Example 1, for a standard system

OUTPUT 70918; “ROUT:CLOS 1,(@2);”

Switch port 1, default SCU address (0), channel 2 selected.

In this example, the BASIC OUTPUT command is used to output a command to the 85330A. The command, ROUT:CLOS 1,(@2); is sent to GPIB address

70918 (the 85330A). This command string would:

Activate switch port 1.

Address the SCU (which is set at the factory to SCU address 0). Since the default address is being used, the SCU address is not required, and is not specified in the command.

Select channel 2.

Example 2, for a typical custom system

OUTPUT 70918; “ROUT:CLOS 2,(@110);”

Switch port 2, SCU address 1, channel 10

The command ROUT:CLOS 2,(@110); is sent to GPIB address 70918 (the

85330A). This command string would:

Activate switch port 2.

Address any SCU, or SCUs, at SCU address 1.

Select channel 10. “110” is the switch address and is defined as the concatenation of the SCU address and the channel number.

85330A Multiple Channel Controller 6-9

Programming

To Use Direct Control

NOTE

6-10

Other examples:

OUTPUT 70918;”ROUT:CLOS 2,(@103);”

Switch Port 2, SCU address 1, channel 3.

OUTPUT 70918;”ROUT:CLOS 1,(@2);”

Switch Port 1, SCU address 0, channel 2.

OUTPUT 70918,”ROUT:CLOS 1,(@132);”

Switch Port 1, SCU address 1, channel 32.

Sending multiple switch addresses is possible. In the following example:

An example is provided for standard systems (SCU address 0).

An example is provided for a typical custom system, with an SCU address of 1.

Both examples select channel 1, 2 and 3 in sequence.

Because the switches are SP2Ts or SP4Ts, when a channel on a module is closed, all other channels on that module are open. For example, when 1 is closed, 2, 3 and 4 are open; when 2 is closed, 1, 3, and 4 are open.

OUTPUT 70918;”ROUT:CLOS 1,(@1,2,3);” example for standard systems

OUTPUT 70918;”ROUT:CLOS 1,(@101,102,103);”

example for custom systems

Another method of executing the above command is

OUTPUT 70918;”ROUT:CLOS 1,(@1:3);” example for standard systems

OUTPUT 70918;”ROUT:CLOS 1,(@101:103);” example for custom systems

The colon : represents 1 through 3 (or 101 through 103).

To set a delay between the closing of each switch state, the ROUTe:DELAy command is used. The input parameter is time in micro-seconds.

10 OUTPUT 70918;”*RST;”

Reset the 85330A.

20 OUTPUT 70918;”ROUT:DELA 10000;”

Set the time between switch states in micro-seconds.

30 OUTPUT 70918;”ROUT:CLOS 1,(@101:104);”

Close switch state 101 through 104.

85330A Multiple Channel Controller

To Use Direct Control

In this example:

The 85330A is reset using the *RST command.

A delay between switch states is specified.

Channels 101, 102, 103 and 104 are selected in sequence.

Programming

85330A Multiple Channel Controller 6-11

Programming

To Use Run-Time Control Mode

To Use Run-Time Control Mode

Setup of the

85330A Multiple

Channel Controller

The setup for run-time operation includes setting:

The event triggering method

The number of frequency points

The number of angular increments

List of switch states

Switch settling time

TTL trigger and ready timeouts

Using more than one controller

Once the 85330A is set up, send the RUNT:INIT:IMM command to begin run-time operation.

Figure 6-2 on page 6-16 is a flow chart that illustrates the

run-time measurement sequence. Commands are described in

Chapter 7,

“Remote Programming Command Reference.”

Event Triggering

During run-time operation, the 85330A may use two different types of event triggering, TTL or IMM. Most angle scan measurements will be set up for

TTL triggering, while TTL triggering can be suppressed for a frequency response measurement, typically at a single angle. Also, this IMM mode combined with the *OPC?

command is useful for determining timing information of a multiple-frequency, multi-parameter measurement.

Applicable command: RUNTime:EVENte:TRIGger

Number of Frequency

Points

The 85330A does not require a start, stop, or frequency step size. In fact, it does not require any frequency values. It only needs to know the number of frequency points so it can issue the correct number of triggers.

Applicable command: RUNTime:SOURce:COUNt

Number of Angular

Increments (Events)

The 85330A does not require any angular values. It only requires the number of angular increments so it can issue the correct number of triggers.

Applicable command: RUNTime:EVENt:COUNt

List of Switch States

One must set up the list of channel addresses for the measurement. For each event trigger received by the 85330A, each channel address entry will be asserted and a subsequent trigger issued to begin a measurement of each data point.

Applicable command: RUNTime:SWITch:SCAN

6-12 85330A Multiple Channel Controller

Switch Settling Time

NOTE

TTL Trigger and

Ready Timeouts

Programming

To Use Run-Time Control Mode

You must specify switch settling time before starting run-time mode. The default setting is 2 µ s.

If your configuration requires you to use the multiple-parameter display features of the 8530A, as described in

“Single Source Multiple-Frequency

Configuration” on page 6-5 , set settling time to 50

µ s. This applies to:

The single source multiple-frequency configuration.

The dual source multiple-frequency configuration, but only when the

8530A controls the sources.

Applicable command: RUNTime:SWITch:DELay

Timeout conditions are used for:

Event triggering (EVENT TRIG)

Receiver ready (RCVR READY)

Source ready lines (SRC 1 READY and SRC 2 READY)

Timeouts enable the 85330A to recover from possible error conditions.

The timeout for the event trigger input has two separate timeout settings:

One timeout is for the first trigger being issued.

The other timeout is for subsequent triggers.

If the expected signal is not received before the specified time, the 85330A will exit from run-time operation and issue an error.

Applicable commands:

RUNTime:TIMEout:EVENt

RUNTime:TIMEout:RECeiver

RUNTime:TIMEout:SOURce

85330A Multiple Channel Controller 6-13

Programming

To Use Run-Time Control Mode

Using More than One

Controller

Starting Run-Time

Mode

Run-Time

Measurement

Sequence

More than one multiple channel controller may be used in a system.

Multiple controllers are usually used when the distance to a switch control unit exceeds the maximum length allowed. The REMOTE 1 and REMOTE 2 connectors on the rear panel allow connections to multiple controllers. See

Chapter 9, “Service” for more information on these connectors.

To set up and control the remote controller, use these commands:

RUNTime:CONTroller

RUNTime:TIMEout:REMote

RUNTime:SWITch:TRIGger

The remote controllers can be triggered using the commands:

RUNTime:SOURce:SOURCE1:TRIGger

RUNTime:SOURce:SOURCE2:TRIGger

Issue the RUNT:INIT:IMM command to initiate the run-time operation. This command passes the hardware control to the 85330A and allows it to accept and issue triggers.

OUTPUT 70918;"RUNT:INIT:IMM;”

Once the sequence is initiated the 85330A either:

Waits for an event trigger before issuing a trigger to the receiver,

OR:

Immediately issues a trigger to the receiver.

This is set using the RUNT:EVEN:TRIG command.

Refer to

Figure 6-2, “Run-Time Flow Chart with Programming Command

References,” on page 6-16 . The chart shows the sequence of a run-time

measurement. Programming commands applicable to each function are shown. All programming commands must be executed before run-time is initiated. Here is a description of the run-time measurement sequence:

Idle

This is the idle state of the 85330A. This also the state the unit enters if an error occurs during run-time. Run-time mode is started when RUNT:INIT:IMM is executed.

Select Switch State

The first switch state is selected for Port 1 or Port 2, as defined with the

RUNT:SWIT:SCAN command. A delay now occurs to allow the switch to settle, defined with RUNT:SWIT:DEL .

6-14 85330A Multiple Channel Controller

Programming

To Use Run-Time Control Mode

Event Trigger

If TTL triggering has been selected, the 85330A waits for an Event Trigger pulse before sending a measurement trigger to the receiver. If IMM triggering has been selected, the measurement trigger is sent to the receiver immediately. The trigger mode is selected using RUNT:EVEN:TRIG . If a timeout occurs while waiting for Event Trigger, run-time is aborted and an error message is issued. The timeout duration can be set using the RUNT:TIME:EVEN command.

Receiver Ready

The 85330A now waits for the Receiver Ready signal (from the receiver), indicating that the 8530A is ready to take another measurement. If a timeout occurs while waiting for Receiver Ready, run-time is aborted and an error message is issued. The timeout duration can be set using the RUNT:TIME:REC command.

Switch List Loop

If all switch settings defined in RUNT:SWIT:SCAN have not been measured, the next switch state is asserted and the settling time delay occurs. Another measurement trigger is sent to the receiver, and the 85330A waits for

Receiver Ready again. This loop continues until all defined switch states have been measured.

85330A Multiple Channel Controller 6-15

Programming

To Use Run-Time Control Mode

Figure 6-2 Run-Time Flow Chart with Programming Command References

6-16 85330A Multiple Channel Controller

Programming

To Use Run-Time Control Mode

Frequency Loop

After all switch states have been measured at the first frequency, the measurements can now be repeated at the next frequency. Here are the steps that occur during the frequency change:

The first switch state is asserted once more, and the settling time delay occurs.

If source 1 triggering is set to TTL (applicable for fast source control mode), a frequency-incrementing trigger is sent to source 1, and the

85330A waits for the TTL Ready signal before continuing. If a timeout occurs while waiting for TTL Ready, run-time is aborted and an error message is issued. The timeout duration can be set using the

RUNT:TIME:SOUR command. When TTL Ready is received, the 85330A checks the triggering mode of source 2.

If source 1 triggering is set to IMM (applicable for measurements where the sources are controlled by the 8530A), the 85330A immediately checks the triggering mode of source 2.

If source 2 triggering is set to TTL (applicable for fast source control mode), a frequency-incrementing trigger is sent to source 2, and the

85330A waits for the TTL Ready signal before continuing. If a timeout occurs while waiting for TTL Ready, run-time is aborted and an error message is issued. The timeout duration can be set using the 85330A

RUNT:TIME:SOUR command. When TTL Ready is received, the 85330A re-enters the Switch List Loop so all switch states will be measured at the new frequency.

If source 2 triggering is set to IMM (applicable to measurements where the sources are controlled by the 8530A), the 85330A immediately re-enters the Switch List Loop so all switch states will be measured at the new frequency.

Event Loop

Once all switch states have been measured at all frequencies, the next

“event” can be measured. This would be the next angle in an antenna measurement system. Stated generically, this is a full repetition of measurements at all switch states and frequencies for the next “event.” An

“event” being whatever has occurred that caused another Event Trigger signal. The number of events in the measurement is defined using the

RUNT:EVEN:COUN command.

The sequence now loops back to START EVENT, which is at the beginning of the event loop. The event loop repeats, measuring all switch states at each frequency until the number of event loops is completed. When finished, the

85330A exits run-time mode and goes into the idle state.

85330A Multiple Channel Controller 6-17

Programming

To Use Run-Time Control Mode

Run-Time

Measurement

Sequence for Multiple

Controllers

The run-time measurement sequence for multiple controllers is similar to a single controller shown earlier. See

“Starting Run-Time Mode” on page 6-14

for more information on this sequence. The sequence for multiple controllers has additional steps to allow communications between the controllers. Refer to

Figure 6-3 on page 6-19 and

Figure 6-4 on page 6-20

for the actual run-time measurement sequence.

Using IMM vs. TTL

Trigger for Source 1

Refer to “Source 1 IMM, TTL or REM1 trigger diamond in

Figure 6-3 .

When using multi frequencies:

The RF Source controlled by the master 85330A should use the TTL trigger.

The other RF Source (not controlled by the master 85330A) should use the IMM trigger.

6-18 85330A Multiple Channel Controller

To Use Run-Time Control Mode

Programming

Figure 6-3 Run-Time Flow Chart for Multiple Controller, Control Mode controlling

REMote1

85330A Multiple Channel Controller 6-19

Programming

To Use Run-Time Control Mode

Figure 6-4 Run-Time Flow Chart for Multiple Controller, Remote Mode being controlled by CONToller

6-20 85330A Multiple Channel Controller

Programming Examples

Programming Examples

Example 1

Example 1 is applicable to CW measurements.

1001 !

1002 ! RE-SAVE “EX1”

1003 !

1004 Example_1:!

1005 !

1006 ! This example shows how to make single-frequency, multi-channel

1007 ! measurements using the HP 85330A and the FAST DATA modes of the HP 8530A

1008 ! Microwave Receiver.

1009 !

1010 ! It uses the HP BASIC/WS TRANSFER command to read data from the receiver

1011 ! The HP BASIC command ENTER may also be used.

1012 !

1013 INTEGER Data_f1(1:32000,0:2) BUFFER ! DATA FROM RECEIVER IN FORMAT FORM1.

1014 DIM Err_str$[128]

1015 !

1016 Build_table:!

1017 !

1018 ALLOCATE REAL Exp_tbl(0:255)

1019 !

1020 ! Build the FORM1 to FORM3 coversion table. During the FAST DATA

1021 ! aquisition from the HP 8530A data translation is need to conver the

1022 ! 6 bytes read from the receiver to a data point consiting of a

1023 ! real and imaginary pair.

1024 !

1025 Exp_tbl(0)=2^(-15)

1026 FOR N=0 TO 126

1027 Exp_tbl(N+1)=Exp_tbl(N)+Exp_tbl(N)

1028 NEXT N

1029 Exp_tbl(128)=2^(-143)

1030 FOR N=128 TO 254

1031 Exp_tbl(N+1)=Exp_tbl(N)+Exp_tbl(N)

1032 NEXT N

1033 !

1034 Set_vars:!

1035 !

1036 ! Set variables

1037 !

1038 Scu_addr=0 ! SCU address

85330A Multiple Channel Controller

Programming

6-21

Programming

Programming Examples

1039 Chan_start=1 ! First Channel

1040 Chan_stop=4 ! Last Channel

1041 Chan_pts=(Chan_stop-Chan_start)+1 ! Number of channels

1042 Switch_start=Scu_addr*100+Chan_start ! Starting SWITCH ADDRESS

1043 Switch_stop=Scu_addr*100+Chan_stop ! Ending SWITCH ADDRESS

1044 !

1045 Angle_start=-90

1046 Angle_stop=90

1047 Angle_incr=10

1048 Angle_pts=((Angle_stop-Angle_start)/Angle_incr)+1

1049 !

1050 Freq_cw=2 ! GHz

1051 !

1052 Rec_averages=1

1053 !

1054 Points=Angle_pts*Chan_pts ! Total points to be taken.

1055 !

1056 REDIM Data_f1(1:Points,0:2) ! Re-dimension array to the number of points.

1057 ALLOCATE Data_f3(1:Points,1:2) ! Converted data in FORM3 (REAL AND IMAGINARY

1058 ! ! PAIRS).

1059 !

1060 ! Set HP-IB addresses

1061 !

1062 ASSIGN @Rec TO 716 ! ASSIGN 8530A HP-IB.

1063 ASSIGN @Rec_data TO 716;FORMAT OFF ! ASSIGN 8530A DATA HP-IB.

1064 ASSIGN @Hp85330a TO 70918 ! ASSIGN 85330A HP-IB

1065 ASSIGN @Buffer TO BUFFER Data_f1(*) ! ASSIGN input BUFFER for TRANFER

1066 ! ! statement.

1067 Set_receiver:!

1068 !

1069 OUTPUT @Rec;”FREQ;” ! Set to frequency domain

1070 OUTPUT @Rec;”SINC;” ! Set to single channel

1071 OUTPUT @Rec;”SINP;” ! Set to single point

1072 OUTPUT @Rec;”CENT “;Freq_cw;”GZ;” ! Set to single point

1073 OUTPUT @Rec;”PARA1;” ! select b1/a1 ratio

1074 !

1075 IF Rec_averages>1 THEN

1076 OUTPUT @Rec;”AVERON”;Rec_averages;”;” ! Turn averaging on.

1077 ELSE

1078 OUTPUT @Rec;”AVEROFF;” ! Turn averaging off.

1079 END IF

1080 !

1081 !

1082 Set_85330a:!

1083 !

6-22 85330A Multiple Channel Controller

Programming Examples

1084 OUTPUT @Hp85330a;”*RST;” ! Reset

1085 OUTPUT @Hp85330a;”RUNT:EVEN:TRIG TTL;” ! Set the triggering.

1086 OUTPUT @Hp85330a;”RUNT:EVEN:COUN “;Angle_pts;”;” ! Angle increments

1087 !

1088 OUTPUT @Hp85330a;”RUNT:TIME:EVEN 0,15000000;” ! timeout 1st point: 15 sec.

1089 OUTPUT @Hp85330a;”RUNT:TIME:EVEN 1,5000000;” ! timeout 2nd - last: 5 sec.

1090 OUTPUT @Hp85330a;”RUNT:TIME:REC 1000000;” ! timeout receiver: 1 sec.

1091 !

1092 OUTPUT @Hp85330a;”RUNT:SWIT:DEL 2;” ! Switch settling is 2 uS.

1093 OUTPUT @Hp85330a;”RUNT:SWIT:SCAN 1,(@”;Switch_start;”:”;Switch_stop;”);”

1094 !

1095 OUTPUT @Hp85330a;”RUNT:SOUR:COUN 1;” ! Frequency points = 1 for CW

1096 OUTPUT @Hp85330a;”RUNT:SOUR:SOURCE1:TRIG IMM;” ! No External triggering.

1097 OUTPUT @Hp85330a;”RUNT:SOUR:SOURCE2:TRIG IMM;” ! No External triggering.

1098 !

1099 OUTPUT @Hp85330a;”SYST:ERR?;” ! Check error status

1100 ENTER @Hp85330a;Err_num,Err_str$ !

1101 !

1102 Set_positioner:!

1103 !

1104 ! Set positioner to start angle.

1105 ! Set velocity, acceleration.

1106 ! Set start, stop and increment angles.

1107 !

1108 Start_meas:!

1109 !

1110 ! Set the HP 8530A in FAST AUTO-RANGING data mode.

1111 !

1112 OUTPUT @Rec;”FASAD;” ! SET THE RECEIVER TO FAST DATA w/ AUTO-RANGE.

1113 REPEAT ! WAIT UNTIL THE RECEIVER IS READY TO

1114 WAIT .001 ! TO TAKE DATA.

1115 UNTIL BIT(SPOLL(@Rec),2) !

1116 TRIGGER @Rec ! ISSUE HPIB TRIGGER TO BEGIN FAST DATA MODE.

1117 !

1118 ! Set the HP 85330A to intitiate the run time control.

1119 !

1120 OUTPUT @Hp85330a;”RUNT:INIT:IMM;” ! Initiate the HP 85330A run time mode.

1121 !

1122 ! Set the positioner to take an angle scan.

1123 !

1124 REM Start the positioner.

1125 !

1126 ! This starts the data tranfer from the receiver to the computer. When

1127 ! a trigger is issued to the receiver the data is placed into the receiver’s

1128 ! buffer and then read from the reciever using the following TRANSFER

Programming

85330A Multiple Channel Controller 6-23

Programming

Programming Examples

1129 ! statement.

1130 !

1131 TRANSFER @Rec TO @Buffer;RECORDS Points,EOR (COUNT 6)

1132 !

1133 N=1 ! N IS THE CURRENT POINT.

1134 REPEAT

1135 !

1136 ! The TRANFER statement is a background process that allows the

1137 ! computer BUFFER to be filled while the other commands are executed.

1138 ! Therefore, other code (i.e. drawing data to the display data can go

1139 ! here without hindering the measurement process.

1140 !

1141 ! The ENTER statement can also be used to read part or all of the trace

1142 ! instead of using the TRANFER statement.

1143 !

1144 ! Remember that in FORM 1 data, which the HP 8530A uses in the FAST DATA

1145 ! modes each data point is 6 bytes. The 6 bytes must be converted to

1146 ! a real and imaginary pair.

1147 !

1148 ! --

1149 !

1150 STATUS @Buffer,4;R4 ! Check the number of bytes in the buffer

1151 IF R4>=6*N THEN ! Is there another point (6 bytes) in the buffer?

1152 !

1153 ! If yes THEN converte the data from FORM 1.

1154 !

1155 Exp=Exp_tbl(BINAND(Data_f1(N,2),255))! CONVERT FORM1 TO FORM3.

1156 Data_f3(N,1)=Data_f1(N,1)*Exp ! REAL DATA.

1157 Data_f3(N,2)=Data_f1(N,0)*Exp ! IMAGINARY DATA.

1158 N=N+1

1159 END IF

1160 !

1161 UNTIL N>Points

1162 !

1163 CONTROL @Buffer,8;0 ! TERMINATE TRANSFER

1164 OUTPUT @Rec;”SINP;” ! TAKE RECEIVER OUT OF FAST-CW MODE

1165 END

6-24 85330A Multiple Channel Controller

Programming

Programming Examples

Example 2

Example 2 applies to measurements where the sources are controlled by the

8530A

1001 !

1002 ! RE-SAVE “EX2”

1003 !

1004 Example_2:!

1005 !

1006 ! This example shows how to use the HP 85330A and HP 8530A’s Multi-parameter

1007 ! Display mode. This is used for multi-frequency measurements when the

1008 ! microwave sources are under HP 8530A HP-IB control.

1009 !

1010 ASSIGN @Rec TO 716 ! ASSIGN 8530A HP-IB.

1011 ASSIGN @Rec_data TO 716;FORMAT OFF ! ASSIGN 8530A DATA HP-IB.

1012 ASSIGN @Hp85330a TO 70918 ! Assign 85330A HP-IB

1013 !

1014 DIM Outstr$[128]

1015 DIM Err_str$[128]

1016 !

1017 Scu_addr=0 ! SCU address

1018 Chan_start=1 ! First Channel

1019 Chan_stop=4 ! Last Channel

1020 Chan_pts=(Chan_stop-Chan_start)+1 ! Number of channels

1021 Switch_start=Scu_addr*100+Chan_start ! Starting SWITCH ADDRESS

1022 Switch_stop=Scu_addr*100+Chan_stop ! STOPPING SWITCH ADDRESS

1023 !

1024 Angle_start=-90

1025 Angle_stop=90

1026 Angle_incr=10

1027 Angle_pts=((Angle_stop-Angle_start)/Angle_incr)+1

1028 !

1029 Freq_start=2

1030 Freq_stop=20

1031 Freq_pts=5

1032 !

1033 Rec_averages=1

1034 !

1035 Set_receiver: !

1036 !

1037 INTEGER Preamble,Data_bytes

1038 ALLOCATE REAL Data_freq(1:Freq_pts,1:2)

1039 !

1040 OUTPUT @Rec;”FREQ;” ! FREQUENCY DOMAIN.

1041 OUTPUT @Rec;”EDITLIST;CLEL;SADD;” ! Edit FREQ LIST.

1042 OUTPUT @Rec;”STAR”;Freq_start;” GHZ;STOP”;Freq_stop;”GHZ;”! Set Start, stop.

1043 OUTPUT @Rec;”POIN”;Freq_pts;”;SDON;EDITDONE;” ! Set points.

85330A Multiple Channel Controller 6-25

Programming

Programming Examples

1044 OUTPUT @Rec;”LISFREQ;” ! Turn on FREQ LIST.

1045 !

1046 IF Rec_averages>1 THEN

1047 OUTPUT @Rec;”AVERON”;Rec_averages;”;” ! Turn averaging on.

1048 ELSE

1049 OUTPUT @Rec;”AVEROFF;” ! Turn averaging off.

1050 END IF

1051 !

1052 ! MULTI-PARAMETER display only uses trigger if parameter is active.

1053 !

1054 OUTPUT @Rec;”STITOFF;”! STIMULUS TRIGGER OFF

1055 OUTPUT @Rec;”PAR1TON;”! PARAMETER 1 TRIGGER ON

1056 OUTPUT @Rec;”PAR2TON;”! PARAMETER 2 TRIGGER ON

1057 OUTPUT @Rec;”PAR3TON;”! PARAMETER 3 TRIGGER ON

1058 OUTPUT @Rec;”PAR4TON;”! PARAMETER 4 TRIGGER ON

1059 !

1060 ! Set all ratios for each displayed parameter to a common channel

1061 !

1062 OUTPUT @Rec;”PARA1;NUMEB1;DENOA1;LOCKNONE;DRIVNONE;REDD;” ! b1/a1 ratio

1063 OUTPUT @Rec;”PARA2;NUMEB1;DENOA1;LOCKNONE;DRIVNONE;REDD;” ! b1/a1 ratio

1064 OUTPUT @Rec;”PARA3;NUMEB1;DENOA1;LOCKNONE;DRIVNONE;REDD;” ! b1/a1 ratio

1065 OUTPUT @Rec;”PARA4;NUMEB1;DENOA1;LOCKNONE;DRIVNONE;REDD;” ! b1/a1 ratio

1066 !

1067 ! Set the active channels using the MULTI-PARAMETER display.

1068 !

1069 IF Chan_pts=1 THEN OUTPUT @Rec;”SINC;”

1070 IF Chan_pts=2 THEN OUTPUT @Rec;”TWOP;”

1071 IF Chan_pts=3 THEN OUTPUT @Rec;”THREEP;”

1072 IF Chan_pts=4 THEN OUTPUT @Rec;”FOURP;”

1073 !

1074 ! The first pass of a frequency sweep for the HP 8360A source is slower than

1075 ! subsequent sweeps, since the source is in learn mode. Take one slow one,

1076 ! then one fast one.

1077 !

1078 FOR Passes=1 TO 2 ! Take two passes: one slow, one fast.

1079 OUTPUT @Rec;”TRGSFRE;HOLD;” ! Use internal triggering for these sweeps.

1080 OUTPUT @Rec;”SING;” ! take a single sweep.

1081 FOR N=1 TO Chan_pts

1082 OUTPUT @Rec;”PARA”&VAL$(N)&”;”

1083 OUTPUT @Rec;”FORM3;OUTPDATA;”

1084 ENTER @Rec_data;Preamble,Data_bytes

1085 ENTER @Rec_data;Data_freq(*)

1086 NEXT N

1087 NEXT Passes

1088 !

6-26 85330A Multiple Channel Controller

Programming Examples

1089 OUTPUT @Rec;”TRGSEXT;HOLD;” ! SET TO EXTERNAL TRIGGER FOR CONTROLLED

1090 !

1091 !

1092 Set_85330a:!

1093 !

1094 OUTPUT @Hp85330a;”*RST;” ! SOFT RESET

1095 !

1097 OUTPUT @Hp85330a;”RUNT:EVEN:TRIG TTL;” ! Set the triggering.

1098 OUTPUT @Hp85330a;”RUNT:EVEN:COUN “;Angle_pts;”;” ! Angle increments

1099 !

1100 OUTPUT @Hp85330a;”RUNT:TIME:EVEN 0,15000000;” ! timeout 1st point: 15 sec.

1101 OUTPUT @Hp85330a;”RUNT:TIME:EVEN 1,5000000;” ! timeout 2nd - last: 5 sec.

1102 OUTPUT @Hp85330a;”RUNT:TIME:REC 1000000;” ! timeout receiver: 1 sec.

1103 !

1104 OUTPUT @Hp85330a;”RUNT:SWIT:DEL 50;” ! Switch settling is 50 uS

1105 ! ! when using multi-parameter

1106 ! ! display.

1107 OUTPUT @Hp85330a;”RUNT:SWIT:SCAN 1,(@”;Switch_start;”:”;Switch_stop;”);”

1108 !

1109 OUTPUT @Hp85330a;”RUNT:SOUR:COUN “;Freq_pts;”;” ! Frequency points.

1110 OUTPUT @Hp85330a;”RUNT:SOUR:SOURCE1:TRIG IMM;” ! No External triggering.

1111 OUTPUT @Hp85330a;”RUNT:SOUR:SOURCE2:TRIG IMM;” ! No External triggering.

1112 !

1113 !

1114 Set_positioner:!

1115 !

1116 ! Set positioner to start angle.

1117 ! Set velocity, acceleration.

1118 ! Set start, stop and increment angles.

1119 ! Set positioner to issue TTL triggers at increment angles.

1120 !

1121 !

1122 Start_meas:!

1123 !

1124 OUTPUT @Rec;”CLES;SING;” ! Start receiver single sweep.

1125 OUTPUT @Hp85330a;”RUNT:INIT:IMM;” ! Start measurement process

1126 REM Set the positioner to take an angle scan. ! Start the positioner.

1127 !

1128 FOR Passes=1 TO Angle_pts

1129 REPEAT

1130 ! Wait for SING sweep to complete

1131 UNTIL BIT(SPOLL(@Rec),4)

1132 FOR N=1 TO Chan_pts

1133 OUTPUT @Rec;”PARA”&VAL$(N)&”;”

1134 OUTPUT @Rec;”FORM3;OUTPDATA;”

Programming

85330A Multiple Channel Controller 6-27

Programming

Programming Examples

1135 ENTER @Rec_data;Preamble,Data_bytes

1136 ENTER @Rec_data;Data_freq(*)

1137 NEXT N

1138 IF Passes<>Angle_pts THEN

1139 OUTPUT @Rec;”CLES;SING;” ! Have the receiver take another sweep.

1140 END IF

1141 NEXT Passes

1142 !

1143 END

6-28 85330A Multiple Channel Controller

Example 3

Programming

Programming Examples

Example 3 applies to measurements where the 85330A controls the sources, using Fast Source Control mode .

1001 !

1002 ! RE-SAVE “EX3”

1003 !

1004 Example_3:!

1005 !

1006 ! This example shows how to make multi-frequency, multi-channel

1007 ! measurements using the HP 85330A and the FAST DATA modes of the HP 8530A

1008 ! Microwave Receiver. In this mode the sources are setup by the computer

1009 ! rather than under control of the HP 8530A microwave receiver.

1010 !

1011 ! It uses the HP BASIC/WS TRANSFER command to read data from the receiver

1012 ! The HP BASIC command ENTER may also be used.

1013 !

1014 DIM Err_str$[128]

1015 INTEGER Data_f1(1:32000,0:2) BUFFER ! DATA FROM RECEIVER IN FORMAT FORM1.

1016 !

1017 Build_table:!

1018 !

1019 ALLOCATE REAL Exp_tbl(0:255)

1020 !

1021 ! Build the FORM1 to FORM3 coversion table. During the FAST DATA

1022 ! aquisition from the HP 8530A data translation is need to conver the

1023 ! 6 bytes read from the receiver to a data point consiting of a

1024 ! real and imaginary pair.

1025 !

1026 Exp_tbl(0)=2^(-15)

1027 FOR N=0 TO 126

1028 Exp_tbl(N+1)=Exp_tbl(N)+Exp_tbl(N)

1029 NEXT N

1030 Exp_tbl(128)=2^(-143)

1031 FOR N=128 TO 254

1032 Exp_tbl(N+1)=Exp_tbl(N)+Exp_tbl(N)

1033 NEXT N

1034 !

1035 Set_vars:!

1036 !

1037 ! Set variables

1038 !

1039 Scu_addr=0 ! SCU address

1040 Chan_start=1 ! First Channel

1041 Chan_stop=4 ! Last Channel

1042 Chan_pts=(Chan_stop-Chan_start)+1 ! Number of channels

1043 Switch_start=Scu_addr*100+Chan_start ! Starting SWITCH ADDRESS

1044 Switch_stop=Scu_addr*100+Chan_stop ! Ending SWITCH ADDRESS

85330A Multiple Channel Controller 6-29

Programming

Programming Examples

1045 !

1046 Angle_start=-90

1047 Angle_stop=90

1048 Angle_incr=10

1049 Angle_pts=((Angle_stop-Angle_start)/Angle_incr)+1

1050 !

1051 Freq_start=3 ! GHz

1052 Freq_stop=5 ! GHz

1053 Freq_pts=11 ! Points

1054 Freq_offset=.020 ! Ghz

1055 Freq_step=(Freq_stop-Freq_start)/(Freq_pts-1)

1056 !

1057 Points=Angle_pts*Chan_pts*Freq_pts ! Total points to be measured for

1058 ! ! a singe angle scan.

1059 !

1060 REDIM Data_f1(1:Points,0:2) ! 6 byte format.

1061 ALLOCATE REAL Data_f3(1:Points,1:2) ! Real and imaginary pairs

1062 !

1063 Rec_averages=1

1064 !

1065 ! Set HP-IB addresses

1066 !

1067 ASSIGN @Rec TO 716 ! ASSIGN HP 8530A HP-IB.

1068 ASSIGN @Rec_data TO 716;FORMAT OFF ! ASSIGN HP 8530A DATA HP-IB.

1069 ASSIGN @Rf TO 719 ! ASSIGN HP 8360 RF SOURCE HP-IB.

1070 ASSIGN @Lo TO 718 ! ASSIGN HP 8360 LO SOURCE HP-IB.

1071 ASSIGN @Hp85330a TO 70918 ! Assign HP 85330A HP-IB

1072 ASSIGN @Buffer TO BUFFER Data_f1(*)! ASSIGN INPUT BUFFER.

1073 !

1074 Set_receiver: !

1075 !

1076 OUTPUT @Rec;”ADDRSOUR 31;” ! Since the HP 8530A does NOT have control of the

1077 OUTPUT @Rec;”ADDRSOU2 31;” ! sources, set the source address on the

1078 ! ! HP 8530A to 31.

1079 !

1080 OUTPUT @Rec;”FREQ;” ! Set to frequency domain

1081 OUTPUT @Rec;”SINC;” ! Set to single channel

1082 OUTPUT @Rec;”SINP;” ! Set to single point

1083 OUTPUT @Rec;”PARA1;” ! select b1/a1 ratio

1084 !

1085 IF Rec_averages>1 THEN

1086 OUTPUT @Rec;”AVERON”;Rec_averages;”;” ! Turn averaging on.

1087 ELSE

1088 OUTPUT @Rec;”AVEROFF;” ! Turn averaging off.

1089 END IF

1090 !

1091 Set_8360:!

1092 !

1093 ! Place the source in SCPI language

6-30 85330A Multiple Channel Controller

Programming Examples

1094 !

1095 OUTPUT @Rf;”SYST:LANG SCPI;”

1096 OUTPUT @Lo;”SYST:LANG SCPI;”

1097 !

1098 ! Place the source in STEP mode (or LIST mode).

1099 !

1100 OUTPUT @Rf;”FREQ:MODE SWE;”

1101 OUTPUT @Rf;”SWE:GEN STEP;”

1102 OUTPUT @Lo;”FREQ:MODE SWE;”

1103 OUTPUT @Lo;”SWE:GEN STEP;”

1104 !

1105 ! Set the Start, Stop, and number of points. Ths LO source must be offset

1106 ! by 20 MHz from the RF source.

1107 !

1108 OUTPUT @Rf;”FREQ:STAR “;Freq_start;” GHZ;”

1109 OUTPUT @Rf;”FREQ:STOP “;Freq_stop;” GHZ;”

1110 OUTPUT @Rf;”SWE:POIN “;Freq_pts;”;”

1111 OUTPUT @Lo;”FREQ:STAR “;Freq_start+Freq_offset;” GHZ;” ! The LO source is

1112 OUTPUT @Lo;”FREQ:STOP “;Freq_stop+Freq_offset;” GHZ;” ! offset by 20 MHz.

1113 OUTPUT @Lo;”SWE:POIN “;Freq_pts;”;”

1114 !

1115 ! The step sweep points triggering is external so that the HP 85330A can

1116 ! trigger the sources.

1117 !

1118 OUTPUT @Rf;”SWE:TRIG:SOUR EXT;”

1119 OUTPUT @Lo;”SWE:TRIG:SOUR EXT;”

1120 !

1121 ! The start sweep trigger is AUTO.

1122 !

1123 OUTPUT @Rf;”TRIG:SOUR IMM;”

1124 OUTPUT @Lo;”TRIG:SOUR IMM;”

1125 !

1126 ! Set the power level and turn the power on.

1127 !

1128 OUTPUT @Rf;”POW:LEV -5;”

1129 OUTPUT @Lo;”POW:LEV 10;”

1130 OUTPUT @Rf;”POW:STAT ON;”

1131 OUTPUT @Lo;”POW:STAT ON;”

1132 !

1133 ! Don’t initiate the sweep yet...

1134 !

1135 !

1136 Set_85330a:!

1137 !

1138 OUTPUT @Hp85330a;”*RST;” ! SOFT RESET

1139 !

1140 OUTPUT @Hp85330a;”RUNT:EVEN:TRIG TTL;” ! Set the triggering.

1141 OUTPUT @Hp85330a;”RUNT:EVEN:COUN “;Angle_pts;”;” ! No of angle increments

1142 !

85330A Multiple Channel Controller

Programming

6-31

Programming

Programming Examples

1143 OUTPUT @Hp85330a;”RUNT:TIME:EVEN 0,15000000;” ! 15 sec, 1st point.

1144 OUTPUT @Hp85330a;”RUNT:TIME:EVEN 1,5000000;” ! 5 sec, 2nd - last point.

1145 OUTPUT @Hp85330a;”RUNT:TIME:REC 1000000;” ! timeout receiver.

1146 !

1147 OUTPUT @Hp85330a;”RUNT:SWIT:DEL 2;” ! Switch settling is 2 uS.

1148 OUTPUT @Hp85330a;”RUNT:SWIT:SCAN 1,(@”;Switch_start;”:”;Switch_stop;”);”

1149 !

1150 OUTPUT @Hp85330a;”RUNT:SOUR:COUN “;Freq_pts;”;” ! No of frequency points.

1151 OUTPUT @Hp85330a;”RUNT:SOUR:SOURCE1:TRIG TTL;” ! Set source to ext trig.

1152 OUTPUT @Hp85330a;”RUNT:SOUR:SOURCE2:TRIG TTL;” ! Set source to ext trig.

1153 !

1154 REPEAT

1156 OUTPUT @Hp85330a;”SYST:ERR?;” ! Check error status

1157 ENTER @Hp85330a;Err_num,Err_str$ ! until error is 0.

1158 UNTIL Err_num=0

1160 !

1161 Set_positioner:!

1162 !

1163 ! Set positioner to start angle.

1164 ! Set velocity, acceleration.

1165 ! Set start, stop and increment angles.

1166 !

1167 Start_meas:!

1168 !

1169 ! Set the HP 8530A in FAST AUTO-RANGING data mode.

1170 !

1171 OUTPUT @Rec;”FASAD;” ! SET THE RECEIVER TO FAST DATA w/ AUTO-RANGE.

1172 REPEAT ! WAIT UNTIL THE RECEIVER IS READY TO

1173 WAIT .001 ! TO TAKE DATA.

1174 UNTIL BIT(SPOLL(@Rec),2) !

1175 TRIGGER @Rec ! ISSUE HPIB TRIGGER TO BEGIN FAST DATA MODE.

1176 !

1177 ! Set the HP 85330A to intitiate the run time control.

1178 !

1179 OUTPUT @Rf;”INIT:CONT ON;” ! Initiate the rf source.

1180 OUTPUT @Lo;”INIT:CONT ON;” ! Initiate the lo source.

1181 OUTPUT @Hp85330a;”RUNT:INIT:IMM;” ! Initiate the HP 85330A run time mode.

1182 !

1183 ! Set the positioner to take an angle scan.

1184 !

1185 REM Start the positioner.

1186 !

1187 ! This starts the data tranfer from the receiver to the computer. When

1188 ! a trigger is issued to the receiver the data is placed into the receiver’s

1189 ! buffer and then read from the reciever using the following TRANSFER

1190 ! statement.

1191 !

1192 TRANSFER @Rec TO @Buffer;RECORDS Points,EOR (COUNT 6)

1193 !

6-32 85330A Multiple Channel Controller

Programming Examples

1194 N=1 ! N IS THE CURRENT POINT.

1195 REPEAT

1196 !

1197 ! The TRANFER statement is a background process that allows the

1198 ! computer BUFFER to be filled while the other commands are executed.

1199 ! Therefore, other code (i.e. drawing data to the display data can go

1200 ! here without hindering the measurement process.

1201 !

1202 ! The ENTER statement can also be used to read part or all of the trace

1203 ! instead of using the TRANFER statement.

1204 !

1205 ! Remember that in FORM 1 data, which the HP 8530A uses in the FAST DATA

1206 ! modes each data point is 6 bytes. The 6 bytes must be converted to

1207 ! a real and imaginary pair.

1208 !

1209 ! --

1210 !

1211 STATUS @Buffer,4;R4 ! Check the number of bytes in the buffer

1212 IF R4>=6*N THEN ! Is there another point (6 bytes) in the buffer?

1213 !

1214 ! If yes THEN converte the data from FORM 1.

1215 !

1216 Exp=Exp_tbl(BINAND(Data_f1(N,2),255))! CONVERT FORM1 TO FORM3.

1217 Data_f3(N,1)=Data_f1(N,1)*Exp ! REAL DATA.

1218 Data_f3(N,2)=Data_f1(N,0)*Exp ! IMAGINARY DATA.

1219 N=N+1

1220 END IF

1221 !

1222 UNTIL N>Points

1223 !

1224 CONTROL @Buffer,8;0 ! TERMINATE TRANSFER

1225 OUTPUT @Rec;”SINP;” ! TAKE RECEIVER OUT OF FAST-CW MODE

1226 !

1227 END

Programming

85330A Multiple Channel Controller 6-33

Programming

85330A Error Messages

85330A Error Messages

6-34

150

151

158

161

131

138

141

148

168

170

171

178

181

121

123

124

128

108

109

112

113

Error Number

+

0

100

101

102

103

104

105

Error Message

“No error”

“Command error”

“Invalid character”

“Syntax error”

“Invalid separator”

“Data type error”

“GET not allowed”

“Parameter not allowed”

“Missing parameter”

“Program mnemonic too long”

“Undefined header”

“Invalid character in number”

““Numeric overflow”

“Too many digits”

“Numeric data not allowed”

“Invalid suffix”

“Suffix not allowed”

“Invalid character data”

“Character data not allowed”

“String data error”

“Invalid string data”

“String data not allowed”

“Invalid block data”

“Block data not allowed”

“Expression error”

“Invalid expression”

“Expression data not allowed”

“Invalid outside macro definition”

85330A Multiple Channel Controller

1000

1100

1301

1302

1303

1304

1305

Error Number

241

270

272

273

222

223

224

240

213

214

215

221

183

200

210

211

350

400

410

420

430

276

277

310

330

440

Programming

85330A Error Messages

Error Message

“Invalid inside macro definition”

“Execution error”

“Trigger error”

“Trigger ignored”

“Init ignored”

“Trigger deadlock”

“Arm deadlock”

“Settings conflict”

“Data out of range”

“Too much data”

“Illegal parameter value”

“Hardware error”

“Hardware missing”

“Macro error”

“Macro execution error”

“Illegal macro label”

“Macro recursion error”

“Macro redefinition not allowed”

“System error”

“Self-test failed”

“Too many errors”

“Query error”

“Query INTERRUPTED”

“Query UNTERMINATED”

“Query DEADLOCKED”

“Query UNTERMINATED after indefinite response”

“Out of memory”

“Time/date memory lost”

“Bad driver format”

“Incorrect driver checksum”

“LOAD command cannot understand driver format”

“Instrument ROM revision not compatible with this driver”

“Not enough driver RAM for this driver”

85330A Multiple Channel Controller 6-35

Programming

85330A Error Messages

2010

2011

2012

2021

2145

2601

2006

2007

2008

2009

2002

2003

2004

2005

Error Number

1306

1500

1501

1510

2000

2001

Error Message

“Not enough header entries for this driver”

“Trigger source already allocated”

“Instrument in use”

“Trigger source non-existent”

“Invalid card number”

“Invalid channel number”

“Invalid logical address”

“Invalid word address”

“Invalid address for 32-bit access”

“No card at logical address”

“Command not supported on this card”

“Bus error”

“Scan list not intiialized”

“Too many channels in channel list”

“Scan mode not allowed on this card”

“Empty channel list”

“Invalid channel range”

“Trigger line not supported by extender”

“Config warning, Non-volatile RAM contents lost”

“Channel list required for this function”

6-36 85330A Multiple Channel Controller

advertisement

Key Features

  • Single-channel, 20-MHz arbitrary waveform generator
  • Built-in function generator with 13 standard waveforms
  • Arbitrary waveform storage and recall
  • Built-in counter/timer
  • GPIB and RS-232 interfaces
  • Easy-to-use front panel and software
  • Compact and portable
  • Affordable

Related manuals

Frequently Answers and Questions

What is the frequency range of the 54503A?
The frequency range of the 54503A is 0 to 20 MHz.
What is the maximum output voltage of the 54503A?
The maximum output voltage of the 54503A is 5 Vpp.
What types of waveforms can the 54503A generate?
The 54503A can generate sine, square, triangle, and arbitrary waveforms.
How many channels does the 54503A have?
The 54503A has one channel.
What is the maximum sample rate of the 54503A?
The maximum sample rate of the 54503A is 100 MS/s.

advertisement

Table of contents