SFC-MET
5.0
Steuerung des SFC-Umrichter Variante Metuchen
|
Due to a bug in Rhapsody, copying a class to create a New Class doesn't work, if the original class already has an Initializer-Operation. Therefore this template class has no Initializer, whis has to be added manually after creating the class.
Workflow: Copy the class Template as a new Class KNU to the appropriate Package. Insert the correct Hyperlink eg. KNU.dat Rectify the attributes c_ale, c_ale_dat to their correct new types, eg struct knu_ale *, struct knu_ale_dat Stereotype accordingly, eg fbaccp, fbaccx,... Create the "knu.dat" with the necessary definitions (according to D7-Syntax) in the corresponding library-directory (FBACCP,FBACCX,..). Also create a corresponding BMP-file, eg knu.bmp. In the Properties window "C_CG::Class"-category, rectify following entries: ImpIcludes knu_d.h SpecIncludes knu_r.h Create an "Initializer"-operation for the new class, empty for now. Use the CFC_D7_Program macro: First execution usually ends with an error in VBA. Restart macro and everything will be ok. Generate the necessary support files as listed above, placed in the "INC_Rhaps"-directory, and the ini-code, which is automatically inserted in the Initializer "Init"-operation-body, but also saved in the "AUX-INI"-directory. Create an "Initializer"-operation for the new class, and insert the code from the "AUX-INI" directory per copy/paste. If needed, add extension-linking statements manually. In the appropriate Rhapsody-Component, tick the new class KNU to be included in the scope of the component. Program the FBAI and FBA0-routines appropriately. Don't forget the "MAC_C_ALE(knu_ale);" at the start of the routines. Test-compile the new class on its own using the CFC_D7_Program macro.