ifm
System Manual
ecomat
mobile
SmartController (CR2500) V05
CAN in the ecomatmobile controller
ifm CANopen library
99
If index and sub-index of the object directory are known, an entry can be addressed as follows:
I := GetODMEntryValue(16#iiiiss00, pCanOpenMaster[0].wODMFirstIdx,
pCanOpenMaster[0].wODMFi pCanOpenMaster[0]. wODMCount;
For "iii" the index must be used and for "ss" the sub-index (as hex values).
The number of the array entry is available in I. You can now directly access the components of the
entry.
It is sufficient to enter address, length and flags so that this entry can be directly transferred to an IEC
variable:
ODMEntries[I].dwContent := ADR(<variable name>);
ODMEntries[I].wLen := sizeof(<variable name>);
ODMEntries[I]. dwIdxSubIdxF := ODMEntries[I]. dwIdxSubIdxF OR
OD_ENTRYFLG_WRITE OR OD_ENTRYFLG_ISPOINTER;
It is sufficient to change the content of "dwContent" to change only the content of the entry.