CONodeParaLoad
Description
This function is responsible for the loading of all parameter groups with the given type. The single parameter group(s) will be loaded from NVM by calling the user application callback function CO_ParaLoad()
.
Prototype
CPU_INT16S CONodeParaLoad(CO_NODE *node, CO_NMT_RESET type);
Parameter | Description |
---|---|
node | pointer to the CANopen node object |
type | Reset type, e.g. CO_RESET_COM or CO_RESET_NODE |
Returned Value
=0 loading successful
<0 an error is detected and function aborted
Additional Information
This function considers all parameter groups, which are linked to the parameter store index (1010h) within the object directory. Every not linked parameter group is not scope of this function and must be handled within the application.
This function can be removed from the CANopen device by disabling the object entry parameter support with the configuration CO_OBJ_PARA.EN
.
Example
The function CONodeParaLoad()
is rarely called from within the applications. Typically the CANopen master requests the parameter loading from NVM via NMT command. In some special cases it is useful to initiate a reset from the slave application or communication. The following example shows the sequence to load all parameters, which are linked to the object directory entries related to the communication profile (index 1000h to 1FFFh).
: success = CONodeParaLoad (&AppNode, CO_RESET_COM); if (success < 0) { err = CONodeGetErr (&AppNode); } :
Whereas the callback function CO_ParaLoad()
must be implemented within the application area to get the data from NVM into the object directory entries. See CANopen Config Manual for details on the callback function.