08-09-2013 01:27 AM
Hi there,
I was using labview 2012 to handle GBIP interface with VISA, the VISA write code will return an error cluster if exists. Recently, I switch to CVI and I use viWrite to write to the GBIP, but in this case, how can I get the error cluster?
08-12-2013 01:10 PM
Hi dragondriver,
There is not an error cluster in CVI in the same way that there are error clusters in LabVIEW. A VISA function should output an integer if there is an error, but it will not include a string and a boolean like LabVIEW does. You can set up a function that acts like an error cluster by creating a struct that has the error integer, a string related to that integer, and a boolean. You would have to use the integer to look up the error string from a library.
-Erik S
11-04-2013 08:40 AM - edited 11-04-2013 08:42 AM
@Erik-S wrote:
Hi dragondriver,
There is not an error cluster in CVI in the same way that there are error clusters in LabVIEW. A VISA function should output an integer if there is an error, but it will not include a string and a boolean like LabVIEW does. You can set up a function that acts like an error cluster by creating a struct that has the error integer, a string related to that integer, and a boolean. You would have to use the integer to look up the error string from a library.
-Erik S
Thanks Erik. I found that when I operate the VISA, it actually return a number to tell success or failure only. I wonder how to extract the error message as string in CVI?
11-05-2013 08:13 AM
Hi PKM,
You can use the "char *GetUILErrorString (int errorNumber);" function to get the error string from the error number.
Here is some documentation on the function:
http://zone.ni.com/reference/en-XX/help/370051Y-01/cvi/uiref/cvigetuilerrorstring/
Nick