10-26-2015 03:40 PM
I make a number of IVI calls to varius instruments. Recently I have experienced a seemingly random time out from one of the instruments. I know what instrument is throwing up the error, but in the error handler, I would like it to report the source code line number where to IVI call occured so I can find which IVI call is causing the issue.
Here is the quote from the boss: "embellish our error checking macros with file name and line number macros. I know some compilers have them but not sure CVI does. This would help identify where these (and possibly others) errors come from."
Solved! Go to Solution.
10-26-2015 05:08 PM
CVI offers __FILE__, __LINE__ and __ FUNCTION__ macros that are useful in these cases.
10-26-2015 05:43 PM
THANKS
11-04-2015 04:39 AM
Don't you have to activate the C99 option in [Options][Build Options] in order to get those pseudo-macros ?
11-04-2015 05:28 AM
I am currently using CVI2012SP1 and don't need this option enabled to use __FILE__, __LINE__ and __FUNCTION__macros.
I know it was necessary to add a macro in 8.5 to enable those elements, but I tested now and as of CVI2009 c99 extensions need to be enabled to evaluate those macros.