09-08-2014 08:37 PM
I design a labview program to control Agilent E5072C network analyzer. When I want to get value from this instrument, I use the "VISA read" VI which listed in the block plate. However, the value read by this VI is last time measurement value. For example, last time the read value is 1.0 db and this time the measurement value is 1.2 db. But when I use "VISA read" VI to fetch the value, it is 1.0 db.
Agilent also provide a VI for this device to read measurement value, and it alway read correct value. so could someone tell me why? do I need do any action before read value from this instrument if I want to use "VISA read" VI instead of Agilent VI?
Solved! Go to Solution.
09-08-2014 08:53 PM
09-08-2014 08:55 PM
09-08-2014 09:12 PM
In my program, I use "VISA WRITE" to input a command ":CALC:MARK1:Y?" Then I use "VISA READ" to fetch the value. I want to get the value at mark1 point. But as I described, the value fetched is last time measurement value. In addition, if I fetch the value by mannually through NI Max, the value is correct. Afte change "VISA READ" VI to the VI I posted in my topic. The value fetched is correct.
09-08-2014 11:29 PM - edited 09-08-2014 11:32 PM
OK, what does the Agilent VI do that the plain read does not? Also, does the CALC command cause a new measurement to be made or just report the result from the last measurement?
Mike...
09-08-2014 11:38 PM
After my program input CALC command, the value displayed on screen is correct. for instance 1.2db. but my program use read VI to fetch this value, it get the last time measurement value like 1.0. As for Agilent VI attached on my topic. I am not sure what does it do before fetch value. could you please look at that VI?
09-09-2014 12:07 AM
09-09-2014 03:19 AM
Hi all,
It is no matter which company write this VI. What I am really care about is that why "VISA read" VI unable to read the measurement value correctly? another VI can read correctly. what is the difference between them. and Agilent network analyzer has some special rule should be obey before reading Mark value?
09-09-2014 03:42 AM
09-09-2014 07:09 AM
You are probably reading it too quickly. By reading it in NI-MAX, you are doing it by hand, so it takes longer. When you do it programmatically, it is "instant". Try using the *OPC? command to turn your command into a query. It will then return a "1" in the read buffer. Read the "1" and then do the fetch command.
To Dennis:
I've had bad experiences with manufacturer-supplied drivers to the point where I don't even try to use them any more. But if Agilent is as anal about their drivers as they are about their manuals, they should be no problem. 😄