FAQs from Rohde & Schwarz

Caricamento di un file parametro S da un PC in una traccia di memoria

Domanda

Ho un file parametro S sul mio PC e desidero caricarlo in una traccia di memoria del mio analizzatore di rete.

Come posso farlo attraverso il controllo remoto?

Risposta

Occorre il programma allegato scritto in VisualBasicApplication in EXCEL.

Se un driver NI-VISA è installato su un collegamento GPIB o TCP/IP dell'analizzatore di rete, potete avviare autonomamente il programma.

Il programma cerca il file TEST.S1P in 'C:\Work\'

La parte importante è la seguente:

Rem Aprire il file parametro S Test.S1P e leggere il contenuto

Set fs = CreateObject("Scripting.FileSystemObject")

Set f = fs.GetFile("C:\work\Test.S1P")

Rem s è il numero di byte con file dati Test.S1P

s = f.Size

Apri "C:\work\Test.S1P" Per input come #1

Do While Not EOF(1)

Text1 = Input(s, #1)

Loop

Close #1

Rem Creare i dati da inviare a ZVL

Rem l è il numero di byte necessari per le informazioni sulla lunghezza dei dati

l = Len(s)

Text2 = "#" + CStr(l) + CStr(s) + Text1

Rem Invia i dati in un file a ZVL

commandStr = "MMEMory:DATA 'C:\Temp\Test.S1P', " + Text2

countsend = Len(commandStr)

status = viWrite(vinstr, commandStr, countsend, count)

Rem Aprire il file in una traccia di memoria

commandStr = "MMEM:LOAD:TRAC 'TRC1','c:\temp\test.s1p'"

countsend = Len(commandStr)

status = viWrite(vinstr, commandStr, countsend, count)

Name
Type
Version
Date
Size
XLS_VISA_LAN_GPIB_ZVL_Transmit_S1P_From_PC-MEM.xls
Type
Domande frequenti
Version
Date
Dec 05, 2012
Size
242 kB
Test.s1p
Type
Domande frequenti
Version
Date
Dec 05, 2012
Size
15 kB