04-01-2015 11:07 AM
We're using a NI driver for the HP3458A DMM from LabWindows/CVI. The source file is hp3458a.c. The function hp3458a_revision_query() throws an exception. The following line in this function appears to be the culprit:
checkErr( Ivi_GetAttributeViString (vi, "", HP3458A_ATTR_INSTRUMENT_FIRMWARE_REVISION, 0, 256, instrRev));
If we comment out this line and rebuild the driver, the issue goes away. The preceding line, which queries a different attribute using the same function, seems to work fine:
checkErr( Ivi_GetAttributeViString (vi, VI_NULL, HP3458A_ATTR_SPECIFIC_DRIVER_REVISION, 0, 256, driverRev));
So the issue seems to have something to do with the "firmware revision" attribute. Commenting out the offending line is an acceptable workaround, but we'd like to include the "firmware revision" information in our reporting process as well, if possible. Is there possibly a fix for this issue?
Note: Changing the second argument from "" to VI_NULL does not help.
Thanks!
04-01-2015 12:58 PM
@Barry_Wealand wrote:
We're using a NI driver for the HP3458A DMM from LabWindows/CVI. The source file is hp3458a.c. The function hp3458a_revision_query() throws an exception. The following line in this function appears to be the culprit:
checkErr( Ivi_GetAttributeViString (vi, "", HP3458A_ATTR_INSTRUMENT_FIRMWARE_REVISION, 0, 256, instrRev));
If we comment out this line and rebuild the driver, the issue goes away. The preceding line, which queries a different attribute using the same function, seems to work fine:
checkErr( Ivi_GetAttributeViString (vi, VI_NULL, HP3458A_ATTR_SPECIFIC_DRIVER_REVISION, 0, 256, driverRev));
So the issue seems to have something to do with the "firmware revision" attribute. Commenting out the offending line is an acceptable workaround, but we'd like to include the "firmware revision" information in our reporting process as well, if possible. Is there possibly a fix for this issue?
Note: Changing the second argument from "" to VI_NULL does not help.
Thanks!
HP3458A_ATTR_INSTRUMENT_FIRMWARE_REVISION is a constant as is HP3458A_ATTR_SPECIFIC_DRIVER_REVISION
04-01-2015 01:47 PM
Yes, understood. It is indeed a little puzzling as to why one constant would work fine and the other would throw an exception...
04-01-2015 03:24 PM
Because your firmware is different.
May be possible to verify with front panel keystrokes.
04-01-2015 11:52 PM
The difference is probably that HP3458A_ATTR_SPECIFIC_DRIVER_REVISION can be set internally by the driver but HP3458A_ATTR_INSTRUMENT_FIRMWARE_REVISION has to be queried from the instrument. Running NI IO-Trace might give you an idea, what is going wrong.