Programming examples, Example 1, Programming examples -21 – Agilent Technologies Multiple Channel Controller 85330A User Manual

Page 95: Example 1 -21

Advertising
background image

85330A Multiple Channel Controller

6-21

Programming

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

Advertising