Hi,
I use the following code in my instrument driver:
ViStatus _VI_FUNC Norma5xx_InitWithOptions (ViRsrc resourceName, ViBoolean IDQuery,
ViBoolean resetDevice, ViString optionString,
ViSession *newVi)
{
ViStatus error = VI_SUCCESS;
ViSession vi = VI_NULL;
ViChar newResourceName[IVI_MAX_MESSAGE_BUF_SIZE];
ViChar newOptionString[IVI_MAX_MESSAGE_BUF_SIZE];
ViBoolean isLogicalName;
ViBoolean bit;
if (newVi == VI_NULL)
{
Ivi_SetErrorInfo (VI_NULL, VI_FALSE, IVI_ERROR_INVALID_PARAMETER,
VI_ERROR_PARAMETER5, "Null address for Instrument Handle");
checkErr( IVI_ERROR_INVALID_PARAMETER);
}
*newVi = VI_NULL;
checkErr( Ivi_GetInfoFromResourceName (resourceName, optionString, newResourceName,
newOptionString, &isLogicalName));
/* create a new interchangeable driver */
checkErr( Ivi_SpecificDriverNew ("Norma5xx", newOptionString, &vi));
/* init the driver */
checkErr( Norma5xx_IviInit (newResourceName, IDQuery, resetDevice, vi));
bit = Ivi_QueryInstrStatus (vi);
if (isLogicalName)
checkErr( Ivi_ApplyDefaultSetup (vi));
*newVi = vi;
Error:
if (error < VI_SUCCESS)
Ivi_Dispose (vi);
return error;
}
The optionsString I pass from Norma5xx_init is "". According to the manual then IVI_ATTR_QUERY_INSTR_STATUS gets set to the default value TRUE. However if I check the boolean 'bit' in the code above its FALSE(0). It's only TRUE(1) if I explicitly set QueryInstrStatus=1 in the optionsString. Does that mean that the manual is wrong and the default value for IVI_ATTR_QUERY_INSTR_STATUS is false?
Thanks and best regards,
Marcus