Jump to content

unicorn

Members
  • Posts

    68
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by unicorn

  1. I have got a ring and an enumeration control on the front panel which do not generate value change events. Both are embedded in two different XControls. One XControl is loaded with a VI in a Subpanel. The other XControl is straight on the front Panel an has got some splitter bars. Other Controls on the related XControls work fine and generate their value change events if the user changes their values.

     

    Does anyone have a clue what going on?

  2. Currently I am also in the nightmare of replacing a class by another class. This time I am switching to packed library.

     

    I found that

     - that you can also make the old class inherit from the new class to replace all class VIs at once ( without "find and replace", just by replacing the first class constant/Control)

    - you can use copy and paste on the front panel from the controls and terminals of the class

    - LabVIEW IDE can switch instantaneouly from a class in a library to a class in a packed library (function available from context menu of a class in a lib)

     

    So I see no reason why NI should implement a feature "replace class by anóther class" easily. Of course you would have broken wires if the new class does not have the right class VIs or if their connector panes are different. But this is trivial and up to the programmer.

  3. You could use a slide with text labels and put it above the scale. Make the slide transparent so that you only see the scale. Now you have to transfer the scale setting from the plot scale to the slide scale and define the appropriate label. But if the scales of the plot are not fixed you need to change the size of the slide using splitter bars because the plot area changes if the plot scales display different numbers. Its quite difficult to implement but the additional label is not in the plot area as in mje much simpler solution.

  4. @Mads

     

    If one does two steps at once (rename class and rename folders outside LV IDE) you run into trouble. I often find myself in the situation to do to much in one step.

     

     

    When having renamed a class outside of a project, I wonder if it would be possible that LabVIEW IDE tries to relink everything assuming that the new class (which the user selects as a replacement) is designed like a child class. I think you rename a class but you wouldn't change class VI names like "init", "get property XYZ", "calculate abc", "uninit", ... So LV IDE could find the right class VI for replacement in the new class. Of course new classes have new functionality. But no one can guess how and where to use it except for the architect and programmer. So new functionallity has always to be updated manually. 

    • Like 1
  5. Renaming a folder holding a class with Windows Explorer is no problem, because you can afterwards open the class and LabVIEW will find the right VIs relative to the path of the *.lvclass files. Even opening a project file will ask only once where to find the class. Then you could save the class files with "Save all (this Class)" and all class VIs will be saved. But be aware that also all subVIs of the class VIs will be saved as well if they are changed.

     

    Renaming a class in a project will become a nightmare if not all callers of that class are loaded in memory.

     

    If you want to exchange a class for a different one (e. g. if you have prepared a new revision like in your case) than you could do the following:

    1. open your Project

    2. add old and new class to the project, if not already done

    3. make the new class (temporarily) a child class of the old class

    4. replace all class constants of the old class only in the block diagram with constants of the new class. As the new class is a child of the old class all wires, front panel element and class VIs will adopt automatically to the child (new) class. Of course, class VIs are only exchanged if they have not been renamed and if the class in and out is dynamic dispatch.

    5. undo the inheritance

    6. save everything

     

    With this procedure all class VIs are exchanged at once. You have to replace only (normally a few) class constants in the BD but not a large number of class VIs in many caller VIs. To prepare the new revision of a class with a different name use "Save as > Copy -create copy on disk" on the class in the project explorer.

     

    You could also apply this method step by step to several projects as you have the old and new class on disk.

    • Like 1
  6. Some time ago I made a VI which does the job the other way. It creates clusters from database tables. Using these clusters you can read a line of a database table at once. But it does not create a conversion to different complex data structure. Anyway I think it is quite complicated to do the job  automatically unless you have set of specifications. I think one would get into trouble if you want to create universal specification which are not too tight to ones current Project. So in my case I get only clusters with basic data types and the labels are given by the column names of the database tables.

  7. My XV3-6FileDIO.lvclass is a child class of some template class. This template class (parent class) is already in a packed lib. In order to compile the child class I had to check the option "Additional Exclusions > Disconnect type definitions". If this option is not checked the following error occurs:

     

    Visit the Request Support page at ni.com/ask to learn more about resolving this problem. Use the following information as a reference:

    Error 7 occurred at Set Permissions in AB_Engine_Update_Paths_In_Palette_File.vi->AB_Engine_Update_Palette_Files.vi->AB_PackedLibrary.lvclass:Save.vi->AB_Build.lvclass:Copy_Files.vi->AB_Build.lvclass:Build.vi->AB_PackedLibrary.lvclass:Build.vi->AB_Engine_Build.vi->AB_Build_Invoke.vi->AB_Build_Invoke.vi.ProxyCaller

     

    Possible reason(s):

    LabVIEW: File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use as path separators on Windows, : on Mac OS X, and / on Linux. Verify that the path is correct using the command prompt or file explorer.

    D:LV12XV4buildsXVDIOXVDataInOut.lvlibp1abvi3wmenusCategoriesProgramming_File IOconfig.mnu

     

    I find it a bit strange that the palette menu configuration of the configuration files palette is included in the build and causes an error.

     

    If a VI of a class is broken I get immediately an error if I try to compile a packed library. So I expect that there are no broken VI if I can compile my packed library. If I look at the VI hierarchy of XV3-6FileDIO.lvclass I don't see any VI which might cause the class to break.

  8. I tried to use source code in the main application as well as in the packed library. But ended up with broken wires in the main when calling VIs from the packed lib.

     

    Does the difference in identifying Information also applies for LabVIEW specific types like the configuration files refnum?

     

    Currently I try to pass a configuration file refnum to a VI from my packed lib. When loading the packed lib, LabVIEW produces error 1498 at Get LV Class Default Value.vi. Before building the lib, there were no Errors.

     

    Details:

    Possible reason(s):

    LabVIEW:  Library has errors. Fix the errors before attempting this operation.


    Complete call chain:
    Get LV Class Default Value.vi
    XiraView 4.0.2.lvlib:XiraView 4.0.2.lvclass:detect Data Source.vi
    XiraView 4.0.2.lvlib:XiraView 4.0.2.lvclass:Read Config File.vi
    XiraView 4.0.2.lvlib:XiraView 4.0.2.lvclass:Load App.vi
    XiraView 4.0.2 Launcher.lvlib:Splash Screen.vi

    LabVIEW attempted to load the class at this path:
    D:LV12XV4buildsXVDIOXV3-6FileDIO.lvlibpXiraDataIOXV36FileXV3-6FileDIO.lvclass

  9. I would like to create a software, where plugins can be installed and used after having the main program already installed and running on a customer System. So I am trying the "Plug-in Architecture using Packed Project Libraries (lvlibp) (see http://decibel.ni.com/content/docs/DOC-19176)" but I am running into problems.

     

    Which datatypes can be used in connectors of VIs applying the "Plug-in Architecture using Packed Project Libraries (lvlibp)"?

    Which datatypes cannot be used in Packed Projects Libraries, if I want to create child classes from the packed libraries?

     

  10. One of the purposes behind "friends" is to tighten the relationship (pun intended) between XControls (a type of library) and LVOOP classes. So now there is greater protection in setting up an XControl as the UI for the class data. Prior to this, the XControl would have to access the class data through public VIs. As such any other VI could access the data through those public VIs.

    Now, the class can declare the XControl as the friend. Thus there is protection of the class data for anything other than the XControl friend (or other descendants through protected methods).

    Hope this helps.

    It is good to have a UI for the class data. But this could have solved also by allowing XControls to become members of a class. With this concept the XControl is tightened to the class and has direct access to the class data. But it cannot be used without the class any more. So there is no need to have this XControl outside of the class.

  11. Yeah that works but it has the same flaw that mine had where things don't work right if the 2nd array has more rows than the 1st, but it is an improvement over my code.

    Right, then we need to check for this and concenate the missing lines to the first array. Or use the initial solution using transpose arrays which is applicable to 2D-arrays only

  12. hi

    i need ur help

    i need to biult system that can be measure pressure from sensor i have the transfer funtion

    but i try to make it but it does not work

    i need to save data in excel file and in same time i need to display the reading of pressure in table by front panel

    table conssit of (date\time\value).

    ..

    You can format your date into strings and build an array out of them. Then build a 2D array form multiple array from separate measurements. This 2D-Array can be displayed using the table indicator.

    ..

    also i need to make excle file save data day by day not all of them in same file

    thanx for all

    Simply start a new file every day by adding the date to the file name. If the day changes the file name changes as well (as long the clock in the computer is working correctly (empty buffer battery)). You need to open and close the file for each or a couple of measurements. And the access need to append data. At the moment I don't overlook how this is done with Excel. In case of doubt you need to store the last location where wrote your data (and if your programm is started repeatedly you will need a configuration file to store it). Increment the location with writing the next data.

  13. @Paul: Right. I haven't looked into LV2009 yet.

    @jgcode: A class which is declared as a friend can access private or protected attributes of the class where the declaration is. In contrast to public attributes only specific classes can access the class attributes. Accessing attributes directly improves performance. So if you rember that calling a VI allocates space for the input and output data it is clear that the performance is better with direct access than accessing data via methods. On the other hand data is not protected any more if its public. So friend classes are a compromise between the trade off protecting data of an object and improving performance.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.