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
IODSubObject.pData (PROP) ¶ PROPERTY pData : POINTER TO BYTE Gets the pointer to the object value. Data is saved in Host Byte Order and can be directly accessed and modified. Note When changing an object manually, don’t forget to call IObjectDictionary.RaiseWriteObject before and IObjectDictionary.RaiseObjectChanged after modifiying the object. This is important to notify the stack and all other instances implementing IODCallback that an object change has happened. Otherwise there could be a stack missbehaviour regarding this object. But you can also call IObjectDictionary.WriteObject or IObjectDictionary.WriteObjectByAddress to modify an object’s value. In this case events are raised automatically.