Basic principle of data provision for third-party components (non-Lenze components)
-
Lenze components are added to the Component Directory automatically when they are activated via the symbol configuration. For details, see Basic principle of data provision for the hardware components.
-
For third-party components (non-Lenze components), the programmer can add components to the "GVL_ComponentHardware" global variable list by creating an instance of the L_IC1P_ComponentHardware function block.
VAR_GLOBAL
// Controller
Device : L_IC1P_ComponentHardware;
Non_LenzeDevice_Inverter1 : L_IC1P_ComponentHardware;
END_VAR
-
The L_IC1P_ComponentHardware function block provides the following fields:
sDeviceClass : STRING
sManufacturer : STRING
sProductCode : STRING
sSerialNumber : STRING
sHardwareRevision : STRING
sSoftwareRevision : STRING
xAutomaticDataUpdate : BOOL
xDataAvailable : BOOL
-
Set the required component data in the initialization routine or whenever the component data changes, and then call the function block. Do not call it cyclically.
GVL_ComponentHardware.Non_LenzeDevice_Inverter1.sManufacturer := 'TestInvert';
GVL_ComponentHardware.Non_LenzeDevice_Inverter1.sSerialNumber := '123456789';
GVL_ComponentHardware.Non_LenzeDevice_Inverter1();