Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

The CANopen stack provides service functions, a callback interface and a system object type for managing parameters. The parameters are handled in parameter groups. The parameter group memory must be a consecutive memory area. The recommended way to allocate this memory area is shown in the following example:

The parameter group object holds all necessary information, which are needed for the parameter handling. Note: this structure may be placed into ROM, because it holds only constant values.

If this parameter group must be controllable from the CAN network side, the standard parameter save object (and optionally the parameter load object) must be placed into the corresponding place of the object directory:

  (CPU_INT32U)&DemoParaObj       /* pointer to parameter object    */

The parameter values itself can be used within any object directory entry. The following example shows the usage of the first parameter within the parameter group DemoParaMem:

  (CPU_INT32U)&(DemoParaMem.ParaLong)   /* pointer to parameter  */

If a parameter group must be controllable from the node application side, the API function group COPara…() is provided. The following line stores the given parameter group in NVM.

COParaStore(&DemoParaObj, &demo);       /* store parameter group */

The following diagram shows the internal behavior of storing a parameter object:

  • No labels