A parameter allows access to a global variable. It can be read or written on a per parameter defined Access restrictions. A parameter needs to be defined globally in a c-file.
Example of a simple parameter of the datatype float. It gives access to the global variable "g_fRatedSpeed". Allow reading by the users VIEWER, USER, and read/write by PROFESSIONAL and DEVELOPER. It can be changed between 0 and 5000.
&g_fRatedSpeed,
PARA_ID_IDM_RatedSpeed,
GROUP_ID_Drive,
"n_N",
"Rated Speed",
"Nominal speed.<br />"
"The nominal speed of the induction machine given by the machine type plate.",
"Nenndrehzahl<br />"
"Dieser Wert entspricht der Nenndrehzahl laut Typenschild der Asynchronmaschine.",
"{0}rpm",
"",
1,
0,
5000,
0.0,
DEFAULT_BACKUP_LOCATION,
)
{
&g_fRatedSpeed,
0,
0,
5000,
0.0
};
const Parameter PARA_fRatedSpeed __attribute__((section(
"para_descriptor"))) =
{
GROUP_ID_Drive,
PARA_ID_IDM_RatedSpeed,
"n_N",
"Rated Speed\
DOC_D Nenndrehzahl<br />\
Dieser Wert entspricht der Nenndrehzahl laut Typenschild der Asynchronmaschine.\
DOC_E Nominal speed.<br />\
The nominal speed of the induction machine given by the machine type plate.",
"{0}rpm",
1,
(void*)&ParaData_fRatedSpeed,
DEFAULT_BACKUP_LOCATION,
"",
};
int32_t WriteFunction_STD_F32(Parameter *ptThis, uint16_t ui16SubId, void *pData, int32_t ui32MaxCount, uint32_t ui32Offset, ParameterAccessSource tAccessSource, uint8_t ui8AccessLevel)
Default write-function for float (32-Bit) datatype.
Definition: PARA_Data.c:1529
int32_t SetToDefaultFunction_STD_F32(Parameter *ptThis, uint16_t ui16SubId, ParameterAccessSource tAccessSource, uint8_t ui8AccessLevel)
Default setToDefault-function for float (32-Bit) datatype.
Definition: PARA_Data.c:1557
int32_t ReadFunction_STD_F32(Parameter *ptThis, uint16_t ui16SubId, void *pData, int32_t ui32MaxCount, uint32_t ui32Offset, ParameterAccessSource tAccessSource, uint8_t ui8AccessLevel)
Default read-function for float (32-Bit) datatype.
Definition: PARA_Data.c:1504
int32_t WriteFunction(void *ptThis, uint16_t ui16SubId, void *pData, int32_t ui32MaxCount, uint32_t ui32Offset, ParameterAccessSource tAccessSource, uint8_t ui8AccessLevel)
Definition: PARA_Lib.h:856
int32_t RestoreDefaultFunction(void *ptThis, uint16_t ui16SubId, ParameterAccessSource tAccessSource, uint8_t ui8AccessLevel)
Definition: PARA_Lib.h:857
#define ParameterF32(VARIABLE_NAME, PARA_ID, GROUP_ID, NAME, UNIT, DESCRIPTION, HELP_EN, HELP_DE, SUBSTITUTION, COUNT, MIN, MAX, DEFAULT, ON_READ, ON_WRITE, SET_TO_DEFAULT, ACCESS, STORE_LOCATION, FLAGS)
Defines an 32 bit floating point parameter.
Definition: PARA_Lib.h:135
int32_t ReadFunction(void *ptThis, uint16_t ui16SubId, void *pData, int32_t ui32MaxCount, uint32_t ui32Offset, ParameterAccessSource tAccessSource, uint8_t ui8AccessLevel)
Definition: PARA_Lib.h:855
@ PROFESSIONAL_WRITE
Definition: PARA_Lib.h:797
@ PROFESSIONAL_READ
Definition: PARA_Lib.h:796
@ USER_READ
Definition: PARA_Lib.h:794
@ DEVELOPER_WRITE
Definition: PARA_Lib.h:799
@ VIEWER_READ
Definition: PARA_Lib.h:792
@ DEVELOPER_READ
Definition: PARA_Lib.h:798
@ FLAG_NONE
No special flags.
Definition: PARA_Lib.h:845
@ TYPE_float
Definition: SYS_Type.h:83
Parameter-data structure for float (32-Bit)
Definition: PARA_Lib.h:966
Parameter definition.
Definition: PARA_Lib.h:861
The header-file of the parameter interface library and the definition-file of the identifier have to be included: