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,
"",
};
RestoreDefaultFunction_F32 SetToDefaultFunction_STD_F32
Definition: PARA_Lib.h:1201
WriteFunction_F32 WriteFunction_STD_F32
Definition: PARA_Lib.h:1188
#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:151
ReadFunction_F32 ReadFunction_STD_F32
Definition: PARA_Lib.h:1176
@ PROFESSIONAL_WRITE
Definition: PARA_Lib.h:846
@ PROFESSIONAL_READ
Definition: PARA_Lib.h:845
@ USER_READ
Definition: PARA_Lib.h:843
@ DEVELOPER_WRITE
Definition: PARA_Lib.h:848
@ VIEWER_READ
Definition: PARA_Lib.h:841
@ DEVELOPER_READ
Definition: PARA_Lib.h:847
@ FLAG_NONE
No special flags.
Definition: PARA_Lib.h:909
@ TYPE_float
Definition: SYS_Type.h:83
Parameter-data structure for float (32-Bit)
Definition: PARA_Lib.h:1061
Parameter definition (datatype independent).
The header-file of the parameter interface library and the definition-file of the identifier have to be included: