-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mclim-rsa25545
committed
Jul 8, 2024
1 parent
9e03a79
commit 7b040ee
Showing
40 changed files
with
918 additions
and
1,087 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
######################################################################## | ||
### Rohde & Schwarz Automation for demonstration use. | ||
# ## Rohde & Schwarz Automation for demonstration use. | ||
### | ||
### Purpose: OSP Switch Matrix Example | ||
### Author: mclim | ||
### Date: 2018.09.09 | ||
### | ||
### Rack3 Switch Configuration | ||
### ================================================================ | ||
### K10:A11-01:A11-P0 K50:A11-55:A11-P10-K1 K70:A11-49:A11-P09-K1 | ||
### K11:A11-14:A11-P0 K51:A11-56:A11-P10-K2 K71:A11-67:A11-P12 | ||
### K12:A11-26:A11-P0 K52:A11-43:A11-P08-K1 K72:A11-50:A11-P09-K2 | ||
### K13:A11-15:A11-P0 K53:A11-44:A11-P08-K2 K73:A11-61:A11-P11 | ||
### K14:A11-27:A11-P0 K74:A12-49:A12-P09 | ||
### K15:A11-13:A11-P0 K75:A12-37:A12-P07-K1 | ||
### K16:A11-25:A11-P0 K76:A12-67:A12-P12 | ||
### K17:A11-02:A11-P0 K77:A12-55:A12-P10 | ||
### K18:A11-03:A11-P0 K78:A12-61:A12-P11 | ||
# ## Purpose: OSP Switch Matrix Example | ||
# ## Author: mclim | ||
# ## Date: 2018.09.09 | ||
### | ||
# ## Rack3 Switch Configuration | ||
# ## ================================================================ | ||
# ## K10:A11-01:A11-P0 K50:A11-55:A11-P10-K1 K70:A11-49:A11-P09-K1 | ||
# ## K11:A11-14:A11-P0 K51:A11-56:A11-P10-K2 K71:A11-67:A11-P12 | ||
# ## K12:A11-26:A11-P0 K52:A11-43:A11-P08-K1 K72:A11-50:A11-P09-K2 | ||
# ## K13:A11-15:A11-P0 K53:A11-44:A11-P08-K2 K73:A11-61:A11-P11 | ||
# ## K14:A11-27:A11-P0 K74:A12-49:A12-P09 | ||
# ## K15:A11-13:A11-P0 K75:A12-37:A12-P07-K1 | ||
# ## K16:A11-25:A11-P0 K76:A12-67:A12-P12 | ||
# ## K17:A11-02:A11-P0 K77:A12-55:A12-P10 | ||
# ## K18:A11-03:A11-P0 K78:A12-61:A12-P11 | ||
|
||
######################################################################## | ||
### User Entry | ||
# ## User Entry | ||
######################################################################## | ||
OSP_IP = '192.168.1.150' #IP Address | ||
RF1ThruSA = [[12,67,3],[12,49,1],[11,61,1],[11,67,2],[11,49,1]] #K76(RF1)-K74-K73(Thru)K71-K70 | ||
RF1HP5GSA = [[12,67,3],[12,49,1],[11,61,2],[11,67,1],[11,49,1]] #K76(RF1)-K74-K73(HP5G)K71-K70 | ||
RF1LNASA = [[12,67,3],[12,49,1],[11,61,5],[11,67,3],[11,49,1]] #K76(RF1)-K74-K73(LNA)K71-K70 | ||
IFHtoSA = [[11,43,0],[11,56,0],[11,55,1],[11,67,5],[11,49,1]] #K52-K51-K50(Thru)K71-K70 | ||
IFHtoSA = [[11,43,0],[11,56,0],[11,55,0],[11,67,6],[11,49,1]] #K52-K51-K50(HP5G)K71-K70 | ||
IFVtoSA = [[11,44,0],[11,56,1],[11,55,1],[11,67,5],[11,49,1]] #K53-K51-K50(Thru)K71-K70 | ||
RF21Noise = [[12,37,0],[12,49,2],[11,61,4]] #K75-K74-K73 | ||
RF1toRF21 = [[12,67,3],[12,49,1],[11,61,1],[12,37,0]] #K76(RF1)-K74-K73-75(RF21) | ||
OSP_IP = '192.168.1.150' # IP Address | ||
RF1ThruSA = [[12, 67, 3], [12, 49, 1], [11, 61, 1], [11, 67, 2], [11, 49, 1]] # K76(RF1)-K74-K73(Thru)K71-K70 | ||
RF1HP5GSA = [[12, 67, 3], [12, 49, 1], [11, 61, 2], [11, 67, 1], [11, 49, 1]] # K76(RF1)-K74-K73(HP5G)K71-K70 | ||
RF1LNASA = [[12, 67, 3], [12, 49, 1], [11, 61, 5], [11, 67, 3], [11, 49, 1]] # K76(RF1)-K74-K73(LNA)K71-K70 | ||
IFHtoSA = [[11, 43, 0], [11, 56, 0], [11, 55, 1], [11, 67, 5], [11, 49, 1]] # K52-K51-K50(Thru)K71-K70 | ||
IFHtoSA = [[11, 43, 0], [11, 56, 0], [11, 55, 0], [11, 67, 6], [11, 49, 1]] # K52-K51-K50(HP5G)K71-K70 | ||
IFVtoSA = [[11, 44, 0], [11, 56, 1], [11, 55, 1], [11, 67, 5], [11, 49, 1]] # K53-K51-K50(Thru)K71-K70 | ||
RF21Noise = [[12, 37, 0], [12, 49, 2], [11, 61, 4]] # K75-K74-K73 | ||
RF1toRF21 = [[12, 67, 3], [12, 49, 1], [11, 61, 1], [12, 37, 0]] # K76(RF1)-K74-K73-75(RF21) | ||
Path = RF1ThruSA | ||
|
||
######################################################################## | ||
### Code Start | ||
# ## Code Start | ||
######################################################################## | ||
from rssd.OSP.Common import OSP | ||
Rack3 = OSP() | ||
Rack3.jav_openvisa('TCPIP0::192.168.1.150::INSTR') | ||
#Rack3.Set_SW(11,49,0) | ||
# Rack3.Set_SW(11, 49, 0) | ||
for sw in Path: | ||
Rack3.Set_SW(sw[0],sw[1],sw[2]) | ||
Rack3.jav_ClrErr() #Clear Errors | ||
Rack3.Set_SW(sw[0], sw[1], sw[2]) | ||
Rack3.jav_ClrErr() # Clear Errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,62 @@ | ||
########################################################## | ||
### Rohde & Schwarz Automation for demonstration use. | ||
### | ||
### Title : Timing SCPI Commands Example | ||
### Author : mclim | ||
### Date : 2018.05.24 | ||
### | ||
########################################################## | ||
### User Entry | ||
########################################################## | ||
SMW_IP = '192.168.1.114' | ||
FSWP_IP = '192.168.1.108' | ||
FreqArry = range(int(39.8e9),int(43e9),int(100e6)) | ||
pwrArry = range(-20,-13,1) #Power Array | ||
FreqArry = range(int(39.8e9), int(43e9), int(100e6)) | ||
pwrArry = range(-20, -13, 1) # Power Array | ||
numMeas = 1 | ||
|
||
########################################################## | ||
### Code Overhead: Import and create objects | ||
# ## Code Overhead: Import and create objects | ||
########################################################## | ||
# import time | ||
# from datetime import datetime #pylint: disable=E0611,E0401 | ||
from rssd.FileIO import FileIO #pylint: disable=E0611,E0401 | ||
from rssd.VSG.Common import VSG #pylint: disable=E0611,E0401 | ||
from rssd.PNA.Common import PNA #pylint: disable=E0611,E0401 | ||
# from datetime import datetime # pylint: disable=E0611, E0401 | ||
from rssd.FileIO import FileIO # pylint: disable=E0611, E0401 | ||
from rssd.VSG.Common import VSG # pylint: disable=E0611, E0401 | ||
from rssd.PNA.Common import PNA # pylint: disable=E0611, E0401 | ||
|
||
OFile = FileIO().makeFile(__file__) | ||
|
||
########################################################## | ||
### Code Start | ||
# ## Code Start | ||
########################################################## | ||
SMW = VSG().jav_Open(SMW_IP, OFile) | ||
FSWP = PNA().jav_Open(FSWP_IP, OFile) | ||
|
||
########################################################## | ||
### Measure Time | ||
# ## Measure Time | ||
########################################################## | ||
Header = 'Iter,SetFreq,SMFPwr,FSWPFreq,FSWPPwr,LockStatus,PN1,PN2,PN3,PN4' | ||
Header = 'Iter, SetFreq, SMFPwr, FSWPFreq, FSWPPwr, LockStatus, PN1, PN2, PN3, PN4' | ||
OFile.write(Header) | ||
|
||
FSWP.Set_SweepCont(0) | ||
SMW.Set_RFPwr(-50) | ||
SMW.Set_RFState(1) | ||
|
||
for i in range(numMeas): #Loop: Measurements | ||
for freq in FreqArry: #Loop: Frequency | ||
for i in range(numMeas): # Loop: Measurements | ||
for freq in FreqArry: # Loop: Frequency | ||
SMW.Set_Freq(freq) | ||
# FSWP.Set_Freq(freq) | ||
lockHist = [] | ||
lockPerf = [2,0,0,0] | ||
for pwr in pwrArry: #Loop: Power | ||
lockPerf = [2, 0, 0, 0] | ||
for pwr in pwrArry: # Loop: Power | ||
SMW.Set_RFPwr(pwr) | ||
FSWP.Set_InitImm() | ||
FSWP.Set_InitImm() | ||
# SMW.delay(2) | ||
lock = FSWP.Get_FreqLock() | ||
mkr = [] | ||
for m in range(1,5): | ||
for m in range(1, 5): | ||
mkr.append(FSWP.Get_Mkr_Y(m)) | ||
# mkr[m-1] = FSWP.Get_Mkr_Y(m) | ||
ffrq = FSWP.Get_Freq() | ||
fpwr = FSWP.Get_Power() | ||
OutStr = f'{i},{freq},{pwr:.2f},{ffrq},{fpwr},{lock},{mkr}' | ||
OutStr = f'{i}, {freq}, {pwr:.2f}, {ffrq}, {fpwr}, {lock}, {mkr}' | ||
OFile.write(OutStr) | ||
lockHist.append(int(lock)) | ||
if (lockHist[-4:] == [2,0,0,0]): | ||
if (lockHist[-4:] == [2, 0, 0, 0]): | ||
break | ||
|
||
########################################################## | ||
### Cleanup Automation | ||
# ## Cleanup Automation | ||
########################################################## | ||
SMW.jav_Close() | ||
FSWP.jav_Close() |
Oops, something went wrong.