07-22-2009 03:25 PM
I m writting a program to perform automatised S-parameter measurements with an Agilent PNA-X Network Analyser. To do so, I use a DCOM connection between the bench computer and the PNA. I created an ActiveX server which gave me, from the *.tlb libraries, a *.fp driver for the PNA. I managed to setup a measurement (frequency, number of points, etc) but I can t get to the measured data of the network analyser. I tried to use the "getData()" function:
AgilentPNA835x_IMeasurementgetData (measObj, NULL, AgilentPNA835xConst_
naCorrectedData,
AgilentPNA835xConst_naDataFormat_LogMag, data);
to access the data but it returns a VARIANT with which I m not sure what I have to do. Something is written in the variant and it seems to be an array of variants (Ox1070). Nevertheless, I have no idea how I can access the data in the variant.
Do you have an idea of the procedure I have to do to access the data ?
Thanks in advance,
William
07-23-2009 08:54 AM
Hi William,
Variant is an ActiveX datatype that can contain any type of data internally. For more information on what it is and how to use it in CVI, please read the following links:
What Are the Variant, SafeArray, and BSTR Data Types
http://digital.ni.com/public.nsf/allkb/C5834A84795DFA86862565FC0079BAF5?OpenDocument
Convert Between ActiveX Data Types and LabWindows/CVI Data Types
http://digital.ni.com/public.nsf/allkb/3B6488F2B05439C686256D1A007E8B61?OpenDocument
Can anyone help me with activex and variants?
http://forums.ni.com/ni/board/message?board.id=180&message.id=32087&requireLogin=False
Please let me know if this is still unclear.
Best regards,
11-23-2009 10:09 AM
William
We are about to begin with the PNA-X Analyzer.
Could you share your expiriance of working on that equipment:
1. Were did you found the driver?
2. How dificult for you is the Intergration with the Code?
3. How much time it takes to build something that is working?
TX
Arik