01-23-2013 08:25 AM
Hi,
I am developing an application where in i need to use the device.open() method. When i am trying to use this method, i am seeing an exception with error code E_OK. This is not consistent and i am seeing this once in a while. Is this expected and we need to handle this exception, please let me know.
Regards,
Sundar
01-23-2013 11:34 PM
Hi, sundara,
Would you please specify the exception type? Please read the exception's property Message to see more details.
This might be caused by inproper operation in the code.
01-24-2013 08:12 AM
Hi,
I am seeing the exception to be of the type "FBUnknown expecption" but the error code of the exception is E_OK.
Regards,
Sundar
01-24-2013 08:49 PM - edited 01-24-2013 08:50 PM
Hi,
FBUnknown works like the default of a case scenario.
In this case, would you please tell me how to reproduce this?
The more detailed, the better.
Also with version info please.
Thanks.
01-25-2013 06:49 AM
Hi,
I am using NIFBus communications manager 4.1 .
In this i am justing using the API curDevice.Open() where curDevice is an object of the device class.
Using it a couple of times, i am seeing this behaviour.
Please check this and let me know for any other clarifications. Below is the log of the exception
NationalInstruments.FieldBus.ExceptionHandler.FBUnknownException: Unknown exception, check the code!
at NationalInstruments.FieldBus.Device.Open()
Regards,
Sundar
01-27-2013 08:08 PM
Hi,
I'm using the same version of CM as yours, but I can't reproduce the error.
The application I ran is in the directory <National Instruments>\NI-FBUS\MS .NET\examples\CsharpExample , which comes along with the installation of NI-FBUS software.
If you have not tried this, would you please see if the same problem happens here? Also you can check if there's any inproper implementaion in you code.
Or, if possible, send us your reproducible example, and we can start from there.
Thanks a lot.
Regards
01-29-2013 05:59 PM
Hi,
Can you share me an email id so that i can sent the code. I can share the code in Forums.
Regards,
Sundar
01-29-2013 07:16 PM
hi,
You can send it here: yishi.liu@ni.com
Thanks
06-18-2013 03:10 PM
I am having similar issues with receiving ErrorCode 0, E_OK when other ErrorCode is expected.
An easy example is when the API is used to perform a write to a Read-Only parameter.
E.g..
Write 1 to ResourceBlock.ST_REV
Expected Result: Write Fails with ErrorCode= E_DATA_NEVER_WRITABLE
Obtained result: Write Fails with ErrorCode=E_OK
However when using NI-Dialog, ErrorCode I receive is E_OTHER (-46)
06-19-2013 12:32 AM
Hi Issac.
The error returned from a Rosemount device here for test (Type 3051 Dev_Rev03 DD_Rev01) is also -46 (E_OTHER) (NIFBUS version 4.1.1), because from the frimware of the DUT this value is returned.
It's most likely that the firmware of this( or certain) Rosemount device doesn't conform to the standard in this respect.
A test on another FF device (Honeywell's) writing the same parameter returned the appropricate value -41(Error: This data is never writable.)
FYI, In order to returned the correct value, these conditions have to be met:
silRtn == SIL_NEGATIVE_CONFIRM
(errorInfo->errorClass == ECL_OTHER) &&(errorInfo->errorCode == ECO_OTHER)
errorInfo->additionalCode == (-E_DATA_NOT_WRITABLE)