SubObjectIterator (FB) ¶ FUNCTION_BLOCK SubObjectIterator IMPLEMENTS ISubObjectIterator Helps to iterate through the subobjects of an object. For using this iterator property SubObjectIterator.Object must be set to the corresponding object. The iterator then points in front of the first subobject of this object (==> property SubObjectIterator.Current is 0). By calling SubObjectIterator.MoveNext the iterator can be moved to the next subobject. If SubObjectIterator.MoveNext returns TRUE the current subobject can be retrieved by property SubObjectIterator.Current . The iterator can be set back in front of the first element by calling SubObjectIterator.Reset . Example See ObjectIterator . Properties: Current Object Methods: MoveNext Reset Structure: Current (Property) MoveNext (Method) Object (Property) Reset (Method)
ObjectDictionary ¶ IODCallback (Interface) OnObjectChanged (Method) OnReadObject (Method) OnWriteObject (Method) IODObject (Interface) GetSubObject (Method) Index (Property) SubCount (Property) IODSubObject (Interface) AccessType (Property) DataType (Property) Formula (Property) RefuseSDOAccess (Property) Size (Property) SubIndex (Property) pData (Property) pDefault (Property) IObjectDictionary (Interface) Callback RegisterCallback (Method) UnregisterCallback (Method) Events RaiseObjectChanged (Method) RaiseReadObject (Method) RaiseWriteObject (Method) Read ReadObject (Method) ReadObjectByAddress (Method) Search GetObject (Method) GetObjectToWrite (Method) Write WriteObject (Method) WriteObjectByAddress (Method)
IODCallback (ITF) ¶ INTERFACE IODCallback EXTENDS __SYSTEM.IQueryInterface This interface must be implemented if someone wants to register an ObjectDictionary callback for read and write operations via the IObjectDictionary.RegisterCallback method of IObjectDictionary . All write and read operations on objects can be monitored and aborted by returning an appropriate abort code. Methods: OnObjectChanged OnReadObject OnWriteObject Structure: OnObjectChanged (Method) OnReadObject (Method) OnWriteObject (Method)
IODCallback.OnObjectChanged (METH) ¶ METHOD OnObjectChanged Will be called after a write operation was performed on an object. If all IODCallback instances registered to the Object Dictionary return ABORT_CODE.SUCCESSFUL write operation will be executed. Vice versa: If any instance returns an error write operation will be aborted and the reader will be informed. InOut: Scope Name Type Comment Input itfObject IODObject Corresponding object itfSubObject IODSubObject Corresponding subobject
IODCallback.OnReadObject (METH) ¶ METHOD OnReadObject : ABORT_CODE Will be called before a read operation is performed on an object. If all IODCallback instances registered to the Object Dictionary return ABORT_CODE.SUCCESSFUL read operation will be executed. Vice versa: If any instance returns an error read operation will be aborted and the reader will be informed. InOut: Scope Name Type Comment Return OnReadObject ABORT_CODE ABORT_CODE.SUCCESSFUL if reading is permitted, else corresponding abort code Input itfObject IODObject Object to be read itfSubObject IODSubObject Subobject to be read
IODCallback.OnWriteObject (METH) ¶ METHOD OnWriteObject : ABORT_CODE Will be called before a write operation is performed on an object. If all IODCallback instances registered to the Object Dictionary return ABORT_CODE.SUCCESSFUL write operation will be executed and an IODCallback.OnObjectChanged event will be raised. Vice versa: If any instance returns an error write operation will be aborted and the writer will be informed. InOut: Scope Name Type Comment Return OnWriteObject ABORT_CODE ABORT_CODE.SUCCESSFUL if writing is permitted, else corresponding abort code Input itfObject IODObject itfSubObject IODSubObject pbyData POINTER TO BYTE udiSize UDINT
IODObject (ITF) ¶ INTERFACE IODObject EXTENDS __SYSTEM.IQueryInterface Defines an object dictionary entry. Each entry has subobjects which hold the object values. Properties: Index SubCount Methods: GetSubObject Structure: GetSubObject (Method) Index (Property) SubCount (Property)
IODObject.GetSubObject (METH) ¶ METHOD GetSubObject : IODSubObject Get subobject InOut: Scope Name Type Comment Return GetSubObject IODSubObject Subobject with given SubIndex, else 0 if no such subobject Input bySubIndex BYTE Subindex of requested subobject
IODObject.Index (PROP) ¶ PROPERTY Index : WORD Index of object
IODSubObject.SubIndex (PROP) ¶ PROPERTY SubIndex : BYTE SubIndex of object