Declaring function blocks
- The IEC package of the software module has been downloaded from Online Support and installed.
- The IEC library included in the IEC package has been added to the IEC project.
- Add a new STRUCT element to the IEC project (in this case: ST_DR_DeviceIdentity_Drives).
- In the STRUCT element, declare a variable of the type
SEW_MK_DeviceIdentity.ST_DR_Identity_Drive for each MOVI-C® drive system for which the software module is to be used (in this case: MOVIGEAR_1 and MOVIGEAR_2). If possible, use the same designations as in the MOVISUITE® project.
- Add a new STRUCT element to the IEC project (in this case: ST_DR_DeviceIdentity).
- In the STRUCT element, declare a variable of the type
SEW_MK_DeviceIdentity.ST_DR_Identity_Controller for the MOVI-C® CONTROLLER (in this case: Controller). If possible, use the same designations as in the MOVISUITE® project.
- In the STRUCT element, declare a variable of the type
ST_DR_DeviceIdentity_Drives (in this case: Drives).
- Add a global variable list to the IEC project (in this case: GVL_DriveRadar). This functions as a user interface. If a global variable list has already been created by using other software modules, you can skip this step.
- In the global variable list GVL_DriveRadar, declare a variable of the type
ST_DR_DeviceIdentity (in this case: DeviceIdentity) to use the variables created for the MOVI-C® CONTROLLER and the MOVI-C® drive systems in the user interface.
- Link the variables declared in the global variable list GVL_DriveRadar with the function blocks provided by the software module. To do so, declare a function block of the type
FB_DR_Controller_Identity for the MOVI-C® CONTROLLER in the User_PRG program (in this case: fbController_Identity) as well as function blocks of the type FB_DriveRadar_Drive_Identity for the MOVI-C®drive systems (in this case: fbMOVIGEAR_1_Identity and fbMOVIGEAR_2_Identity).
- In the User_PRG.Main program, call the function block
fbController_Identity with the variable GVL_DriveRadar.DeviceIdentity.Controller for the transfer parameter stController.
- In the User_PRG.Main program, call each function block declared for the MOVI-C® drive systems using the following transfer parameters: