IObjectDictionary.WriteObject (METH) ¶ METHOD WriteObject : ABORT_CODE Used to write an object in the local object dictionary. If ABORT_CODE.SUCCESSFUL is returned data in pbyData was copied to the object. If error occured the corresponding abort code is returned. Difference to IObjectDictionary.WriteObjectByAddress : Better performance because itfObject is an input variable => no internal binary search necessary. InOut: Scope Name Type Initial Comment Return WriteObject ABORT_CODE ABORT_CODE.SUCCESSFUL : Writing successful, object value was changed according to pbyData; ELSE: Writing not permitted Input itfObject IODObject Object which should be written. bySubIndex BYTE Subindex of object xCheckAccess BOOL TRUE TRUE : Access rights should be checked. Write on readonly object will fail. FALSE : Ignore access rights and force writing. xDataInBusOrder BOOL Specifies Byte Order of data pbyData points to; TRUE : Data in CANopen Byteorder (Little Endian), FALSE : Data in Host Byte Order pbyData POINTER TO BYTE Pointer to data which should be written to the object Inout udiSize UDINT VAR IN: Size of memory pbyData points to; VAR OUT: Size of Object
IObjectDictionary.WriteObjectByAddress (METH) ¶ METHOD WriteObjectByAddress : ABORT_CODE Used to write an object in the local object dictionary. If ABORT_CODE.SUCCESSFUL is returned data in pbyData was copied to the object. If error occured the corresponding abort code is returned. InOut: Scope Name Type Initial Comment Return WriteObjectByAddress ABORT_CODE ABORT_CODE.SUCCESSFUL : Writing successful, object value was changed according to pbyData; ELSE: Writing not permitted. Input wIndex WORD Index of object which should be written bySubIndex BYTE Subindex of object xCheckAccess BOOL TRUE TRUE: Access rights should be checked. Write on readonly object will fail. FALSE: Ignore access rights and force writing. xDataInBusOrder BOOL Specifies Byte Order of data pbyData points to; TRUE: Data in CANopen Byteorder (Little Endian), FALSE: Data in Host Byte Order pbyData POINTER TO BYTE Pointer to data which should be written to the object Inout udiSize UDINT VAR IN: Size of memory pbyData points to; VAR OUT: Size of Object
ObjectIterator.MoveNext (METH) ¶ METHOD MoveNext : BOOL Sets the iterator to the next object. This object can be retrieved afterwards by property |ObjectIterator.Current|. Method returns ``TRUE` if iterator was successfully moved. Method returns FALSE e.g. if end of list. InOut: Scope Name Type Comment Return MoveNext BOOL TRUE : Current points to the next object, FALSE : MoveNext failed, e.g. if end of list.
ObjectIterator.ObjectDictionary (PROP) ¶ PROPERTY ObjectDictionary : IObjectDictionary IObjectDictionary where the iterator is connected to. Iterator will be automatically resetted if ObjectDictionary will be set.
ObjectIterator.Reset (METH) ¶ METHOD Reset Resets the iterator. Afterwards iterator points in front of the first element (==> ObjectIterator.Current is 0).
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)
SubObjectIterator.Current (PROP) ¶ PROPERTY Current : IODSubObject Gets the subobject where the iterator points to.
SubObjectIterator.MoveNext (METH) ¶ METHOD MoveNext : BOOL Sets the iterator to the next subobject. This subobject can be retrieved afterwards by property SubObjectIterator.Current . Method returns TRUE if iterator was successfully moved. Method returns FALSE e.g. if end of list. InOut: Scope Name Type Comment Return MoveNext BOOL TRUE : Current points to the next subobject, FALSE : MoveNext failed, e.g. if end of list.
SubObjectIterator.Object (PROP) ¶ PROPERTY Object : IODObject Object where the iterator is connected to. Iterator will be automatically resetted if object will be set.
SubObjectIterator.Reset (METH) ¶ METHOD Reset Resets the iterator. Afterwards iterator points in front of the first element (==> SubObjectIterator.Current is 0).