04-05-2006 04:43 AM
Ret (nifGetObjectType(BlockDesc, ListParameter, ObjectType))
Select Case ObjectType.objectCode
Case Is = ODT_SIMPLEVAR
typeStr = GetODTypeString(ObjectType.allElems(0))
Case Is = ODT_RECORD
typeStr = "Record"
' You can call "nifReadObject" to get more information of the record members
Case Is = ODT_ARRAY
typeStr = "Array of " + GetODTypeString(ObjectType.allElems(0))
Case Is = ODT_VARLIST
typeStr = "Variable List"
End Select
04-06-2006 05:14 AM
This should be a bug of standard NI-FBUS Client DLL "nifbstd.dll". Can you please try to use the attached new DLL to replace the existing DLL in the "$WINDOWS\SYSTEM32" directory and try again?
Please let me know you test result, thanks!
04-06-2006 06:17 AM
Thank you for your quick response.
With the new nifbstd.dll everything works exactly as it supposed to be.
04-06-2006 06:50 AM
Good to know it works! And we will ship the new DLL with NI-FBUS 3.2 version this year.
Please send e-mail to us at fieldbus.support@ni.com if you have any other questions.
Thanks!
-- Sean Gao
07-19-2006 10:11 AM
07-20-2006 03:13 AM
You can not get OD start entry by calling nifReadObject. The index 0 of VFD (FBAP or MIB) is not the first index of OD. You should get to know the index of OD start entry first before you read OD objects by calling nifReadObject.
Different devices have different OD index, an example is that OD of some device start from 256. But you need to find out this value for your device. And the standard NI-FBUS software doesn't provide such information.
07-20-2006 04:50 AM
thank you for the response...
but i am not convinced coz as per Foundation Fieldbus specification (FF890F16 Section 5.4) it states
"...The directory object will be defined as the first index in the static object dictionary (S-OD). The starting point of the Static Object
Dictionary is defined by the OD object description which always resides at index 0..." So every FF device will/should have index starting from 0.
I need to read the first index (0) coz it gives me the starting index for S-OD, View Object and Program Invokation. Infact I need to go to S-OD index identified from data read from index 0 then to Link Object. I cannot use .cff files (it has link objects index value), i need to get through Object Dictionary only.
Hope you understood my requirements. Please help me out if possible.
Thanks & Regards,
Shankar.
07-21-2006 04:12 AM
You are right that the OD directory object is the first index of S-OD, and you could get index to Action Object, Link Object, Trend Object, Alarm Object through this directory object. However, when you tried to call ReadObject with index 0 input in Dialog Utility, you were trying to read the first (0) object of VFD instead of S-OD.
FF defines a standard FMS service "GetOD" to get the index of the first required object description (StartIndex) of OD, which is the correct way to get the StartIndex of S-OD. In fact, NI-FBUS software calls GetOD service internally to get this StartIndex to interpret the entire OD; thus the clients just need to access the high-level parameters in an easy way.
However, the standard NI-FBUS CM doesn't provide "GetOD", such low-level API. You must find out the start index of S-OD for each device you are using. But for many FF devices, the StartIndex is 256. You can try on it.
When you read the first OD directory object, you will have the following structures:
1) Directory ID (Reserved)
2) Directory Revision Number
3) Number of Directory Objects
4) Total Number of Directory Entries
5) Directory Index of first Composite List Reference
6) Number of Composite List Reference.
7) OD Index for starting Action Object
😎 Number of Action Objects
9) OD index of the starting link object in the VFD.
10) Number of link objects in the VFD.
11) OD index of the starting alert object in the VFD.
12) Number of alert notification objects in the VFD.
13) OD index of the starting trend object in the VFD.
14) Number of trend objects in the VFD.
15) OD index of the starting domain object in the VFD.
16) Total number of domain objects allowed in the VFD.
17*) OD index of the starting MVC object in the VFD.
18*) Number of MVC objects and associated MVC Revision Number objects in the VFD
19*) OD index of the starting MVC variable list object in the VFD
20*) Number of MVC variable list objects
...
Then you can get the index to Link Object and the objects of whole S-OD.
Hope it helps.
07-21-2006 05:38 AM
thank you very much for your answer. I will try to get the starting index of Link Object other than from NI-FBus, as NI-FBus does not support GetOD(...) kind of requests.
Regards
Shankar.
07-16-2008 01:33 PM