AnsweredAssumed Answered

vrf controlling a network analyzer with VEE: noob issues

Question asked by VRFuser on Aug 3, 2006
Hi Abe,
 
If you are using the NA IVI-COM driver than you have to use the System.IO.WriteString() command to send the SCPI commands that OJ has mentioned below.  You will have to use the IO commands to save the data, as there is not built-in function in the IVI_COM interface that saves data.  It is only capable of saving states.  However, for making a measurement other than S11, you do have a couple of choices.  You can create the measurement to be what you want by using the Measurement.Create() command:
 

IAgilentNAMeasurement.Create Method


Creates a new measurement using specified Source and Receiver port values.

[Visual Basic]
Sub Create( _
   ReceiverPortVal As Long, _
   SourcePortVal As Long _
)
[C++]
HRESULT Create(
   long ReceiverPortVal,
   long SourcePortVal
);
[ANSI C]
HRESULT IAgilentNAMeasurement_Create(
   IAgilentNAMeasurement* This
   long ReceiverPortVal,
   long SourcePortVal
);
[C#]
public void Create(
   long ReceiverPortVal,
   long SourcePortVal
);

Parameters


ReceiverPortVal
Receiver port number.
SourcePortVal
Source port number.

to create an S21 measurement, set the ReceiverPortVal to 2 and the SourcePortVal to 1.
 
The other option is to change the parameter of an already existing measurement.  This can be done by using the Measurement.SetSParameter() method:
 

IAgilentNAMeasurement.SetSParameter Method


Changes the source port and receiver port values for the measurement.

[Visual Basic]
Sub SetSParameter( _
   NewReceiverPortVal As Long, _
   NewSourcePortVal As Long _
)
[C++]
HRESULT SetSParameter(
   long NewReceiverPortVal,
   long NewSourcePortVal
);
[ANSI C]
HRESULT IAgilentNAMeasurement_SetSParameter(
   IAgilentNAMeasurement* This
   long NewReceiverPortVal,
   long NewSourcePortVal
);
[C#]
public void SetSParameter(
   long NewReceiverPortVal,
   long NewSourcePortVal
);

Parameters


NewReceiverPortVal
New Receiver Port Value
NewSourcePortVal
New Source Port Value

Again, you can set the source and receiver ports to change the existing measurement to which ever SParameter that you like.
 
Best Regards,
 
Dara Sariaslani
_____________________________________________
Application Architect,
Component Test Division R&D,
Agilent Technologies,
1400 Fountaingrove Parkway, Santa Rosa CA 95401
 


  _____  

From: DANZY,OJ (A-USA,ex1)
Sent: Wednesday, August 02, 2006 6:57 PM
Subject: RE: controlling a network analyzer with VEE: noob issues


Hello Abe,
 
For saving measurement data, I would recommend using the ":MMEM:STOR <filename>.<ext>" where <filename> is the filename that may include the path and <ext> is the extension that you want to save (e.g. s2p, prn, and state files).  For CITIfiles you would use the "MMEM:STOR:CIT:DATA <filename>" or "MMEM:STOR:CIT:FORM <filename>" commands.
 
As for changing the measurement type you use the "CALC:PAR:SEL <meas_name>" command and then the "CALC:PAR:MOD <meas_type>".  The PNA Help file has examples in it that show how to use the SCPI commands.
 
PNA Help File:
http://na.tm.agilent.com/pna/help/PNAWebHelp/help.htm
 
O.J.

  _____  

From: abep@lonestar.utsa.edu [mailto:abep@lonestar.utsa.edu]
Sent: Wednesday, August 02, 2006 6:01 PM
To: VRF
Subject: [vrf] controlling a network analyzer with VEE: noob issues



Hello all,

I am currently attempting (with capital a), to control an N5230A network analyzer with VEE Pro 7.5 software via a GPIB cable.  I've downloaded the IVI-driver for the analyzer and can successfully communicate with the analyzer through my main computer, but I currently have two problems.

My first problem is that when I save a state using the IVI-driver it seems to only accept a file name with the extension of ".sta"  I would like to instead save a state's data, such as it's *.cti, *.SnP, *.prn extensions does anyone have an idea on how I would get away with this?  I have tried to change the extensions to cti, s1p, s2p, s3p, and prn when using the SaveState command in the driver with no luck.  Also, I believe I could instead of using the IVI-driver, use DIRECT I/O to save the state's data however, I've never used DIRECT I/O before and could use a helping hand on where I can find standard commands in DIRECT I/O - such as "save".

My second problem is that in my VEE program, after I create in instance of my analyzer and initialize my analyzer, I can give it a start and stop frequency and it will go through a measurement given that input.  What I would like to measure is S12 or S21.  However by default, it will measure S11 for me.  How can I set the measurement for S12 or S21.

Any help would be greatly appreciated.

Thank you,

Abe

Also, I have went ahead and posted with my e-mail, the code I am working with.  As it is, it illustrates how it gives an S11 reading and how it will not save the state with the .cti extension.



___________________________________________________________________________
***************************************************************************
If you are not the intended recipient of this e-mail, please notify the
sender immediately. The contents of this e-mail do not amend any existing
disclosures or agreements unless expressly stated.
--- You are currently subscribed to vrf as: oj_danzy@agilent.com To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body. To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com". To send messages to this mailing list, email "vrf@agilent.com". If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com". Search the "unofficial vrf archive" at "www.oswegosw.com/vrf_archive/".
---

To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "www.oswegosw.com/vrf_archive/".  

Outcomes