Migration of a class from CS version 3.00 to CS version 3.10.

General things

  1. Using CS version 3.10 requires using LabVIEW 8.20.
  2. In case this is your first time using LabVIEW 8.20, take a few hours of time and make yourself familiar with that version.
    1. Start LabVIEW->Help->Find Examples->Browse.
    2. Have a look at "New Examples for LabVIEW 8.x".
  3. Make sure to fulfill the coding conventions.
  4. When migrating from CS version < 3.00 read the recipe on migrating to CS 3.00.
  5. All changes, editing and testing should be done with VIs libraries and CS classes that are part of the LabVIEW project "cs-framework.lvproj": Always open VIs from the project explorer, never open VIs by double-clicking in the File-Explorer!
  6. At a later stage, building an executable requires that all sources are part of that project.

What to do

  1. Have a look at the project. There are two top folders "CSMainAndLibsDontTouch" and "myStuff". Don't modify anything below "CSMainAndLibsDontTouch". That folder is useful for drag and drop of VIs of the CS core system into your VIs. Your classes and libraries should be located below the folder "myStuf". Take a few minutes of time thinking about a good structure below "myStuff". Please consider, that you want to add other classes of other people as well.
  2. By using a right mouse-click->"Add Folder..." add the folder of a class to be migrated somewhere below the folder "myStuff".
  3. Convert the class folder to a library.
  4. Search (and replace) all missing VIs (sorry!).
  5. Cut the VI description from the constructor and paste it to the library description (library "Properties").
  6. Move the methods CLASSNAME.ProcCases, CLASSNAME.ProcPeriodic, CLASSNAME.ProcState methods etc. to "protected".
  7. Edit the method CLASSNAME.ProcCases. On the connector pane, you must set the "i ref in" (upper left connection) to "required".
  8. If class is child of BaseSM, edit the method CLASSNAME.ProcState. On the connector pane, you must set the "i ref in" (upper left connection) to "required".
  9. Edit the item properties and set the access scope of all folders according to coding conventions.
  10. Save the library to the class folder.
  11. In the project do "Save All".
  12. Save the project.
  13. Close the project.
  14. To be sure: Exit LabVIEW.
  15. Using the File Explorer, browse to the file system folder of your class.
  16. Move (!) all VI files of the sub-folders "public", "protected" and "private" one hierarchy level up (to the class folder).
  17. Delete the folders "public", "protected" and "private".
  18. Comment: The "inheritance" folder should stay as it is.
  19. Start LabVIEW, open the project and browse to the lvlib of your class.
  20. Open all VIs of your library. LabVIEW will automatically search for the VIs and take care of the changed location in the file hierarchy.
  21. In the project do "Save All".

Using VI Templates

After building an executable using the application builder, runtime systems LabVIEW 8.20 have problems using VI templates (VITs) that are part of a library. I have a service request on that issue and hope this will be fixed in the next version of LabVIEW. To solve the problem, you should remove all VITs from the library and put them into a special folder.

Why does my class not work?

  • If methods of your class are broken: Is your class using private methods of another class? In that case your class is (already in the old CS verion) violating the object oriented principles! Class "A" is (was) not allowed to use private methods of class "B". Revise your code.
  • Methods are not broken but I get a fatal error like "caller is not a friend". Your class "A" is using a method "forFriendsOnly" of class "B" (In the old CS version this method was probably private). If the developer of class "B" has not specified that your class "A" is a friend of his class, you are not allowed to use methods "forFriendsOnly". Revise your code.
  • Each time you send an command ("event", "call") to an object of a class you get a timeout or error "1026". Are methods like CLASSNAME.ProcCases, CLASSNAME.ProcPeriodic, CLASSNAME.ProcState etc still private? You should make them at least protected, see above.

What about tools like CSSqlServer, CSDB_Config, DMSManagementSystem, ... ?

Those tools are still based on LabVIEW 7.1. However, the communiation is only done using TCP/IP and those tools will work together with CS 3.10. I recommend installing the runtime engine of LabVIEW 7.1 and using the pre-compiled binaries of those tools. We will only migrate those tools once the majority of CS users has switched to LabVIEW 8.20.

-- DietrichBeck - 14 Mar 2007
Topic revision: r6 - 2008-06-11, HolgerBrand - This page was cached on 2023-02-09 - 09:59.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback | Legal notice | Privacy Policy (german)