Jump to content

durnek60

Members
  • Posts

    50
  • Joined

  • Last visited

Posts posted by durnek60

  1. Why is it annoying? What is your goal?

    Dear Michael!

    Annoying is handling these properties on the block diagram...

    My goal is to try to find a solution or technique how do other LV programmers handling controls prperties in large applications...

    I'm sure that when u have a well structured SW implementation and about 15 controls/indicators, I don't think your block diagramm is full of with Visible/disabled porperties and some realsubVIs...

  2. Hi Experts!

    I need some advice!

    I've been developing LV over 5 years, using OO, singleton, DVR, Plugins, JKI tools in my apps. When I start my new project, I often make UML diagrams to create the backbone of my app, create parent - child classes in order to use override methods and so on...

    But when I'm ready with methods, database functions and procedures I'm on the point on to make a connection between my top level methods and the top level vi's controls. i.e buttons, indicators and their prperties. I often use controls/indicators disable properties to keep my program on the right way to run.... ie avoid unexpected function calls and so on...

    I'm using classes for modelling the real world item but I dont know what technque would be the best handling the top level controls.

    For example, I've about 8 controls and 8 indicators. Some of them only visible on the specific point on my application state. But I think it is very annoying the handle these front panel items in my top level vi block diagram. I saw so many useful solutions and design patterns, but non of handling these controls / indicators references and properties.

    Imagine a class, it's attributes and methdos modelling a car. Attribs: number of wheels, color, type, process_class... , Methods,: Move, stop,... and so on.

    I wanna create a top level vi for handling cars. When I press the start button, Car class initialized but the car itself is not moving. I set another button to start its engine... When this car is started, I have to disable and grayedout the Car_Init button, in order to prevent my program to create a new car object ....

    What could be the best way?

    1.) Set these controls references as a class private data In the car class and handle these references on time when a specific method executed,

    2.) Create a new singleton object that contains all of my buttons palced on the front panel, defining methods such as Car_Stated and palce this method a specific position on the diagram?

    Both solution has so many advantages and disadvantages:

    Advantages:

    1.) Specify control propery can be handled on time when the right method run. ie: I hit start engine, And Set the the Init_car property disabled on the same vi, or a privete method in it....

    2.) In OO desing I would create a class for Controls_ and define some methods for disabling and enabling controls ref. ie. Controls - Start_Engine.vi ( Enable Stop Engine Button Ref, and disable Init Car ref.)

    Disadvantages:

    1.) I think the control refenrce is not a neccessary attribute of the Car Class so why should I place about 4 or more control reference into my Car class???

    2.) If I have a singleton or native LV class, control refrence handling , I have to specify all controls prpperty values in every method...

    Conclusion:

    I need some implementation desing or suggestion how can the labview professionals handle these things in labview?

    I hope I was clear, and u can understand what I really want to say!

    Thank you!

  3. You just beat me to the punch there Shaun :thumbup1: , I was going to say the same thing. As an added extra here is a list of other useful control Panel app names

    Just remember that you need to type control and then the applet’s name!

    Accessibility Options

    access.cpl

    Add/Remove Programs

    appwiz.cpl

    Add Hardware Wizard

    hdwwiz.cpl

    Administrative Tools

    admintools

    Automatic Updates

    wuaucpl.cpl

    Bluetooth Properties

    bthprops.cpl

    Control Panel

    panel

    Desktop Properties

    desktop

    Desktop Appearances Properties

    color

    Display Properties

    desk.cpl

    Fastfind Properties

    findfast.cpl

    Firewall Properties

    firewall.cpl

    Fonts Folder

    fonts

    Game Controllers

    joy.cpl

    Infrared Properties

    infrared

    Internet Options

    inetcpl.cpl

    iSCSI Initiator

    iscsicpl.cpl

    Java Control Panel

    jpicpl32.cpl

    Keyboard Properties

    main.cpl keyboard

    Licensing Mode

    liccpa.cpl

    Mouse Properties

    main.cpl

    Network Connections

    ncpa.cpl

    Network Setup Wizard

    netsetup.cpl

    ODBC Properties

    odbccp32.cpl

    Power Options

    powercfg.cpl

    Printers Folder

    printers

    Regional and Language Options

    intl.cpl

    Scanners and Camera Properties

    sticpl.cpl

    Schedule Tasks

    schedtasks

    Sound and Audio Devices

    mmsys.cpl

    Stored Passwords

    keymgr.cpl

    System Properties

    sysdm.cpl

    Telephone and Modem Properties

    telephon.cpl

    Time and Date Settings

    timedate.cpl

    User Accounts

    nusrmgr.cpl

    User Accounts Advances

    userpasswords2

    User Passwords

    userpasswords

    Windows Security Center

    wscui.cpl

    Wireless Link

    irprops.cpl

    Hello!

    I've found your reply what is very helpful.

    I think I have the same problem, but I don't know how to solve is....

    I Would like to do the following:

    I've a scanner: Colortrac Smartlf Ci24, I would like to use it (start scanning, setting up, and so on... from labview.) I did not find any manual about this scanner.

    Could you help me how to go on?

    1.) I've attached a picture, that would be greate if I can get this property window from labview...

    2.) The best would be if I could start the scanning process from labview.

    Thank you very much!

    post-16152-0-98378100-1302423621_thumb.p

  4. Thank you!

    That's very helpful!

    Where can I find more intel about this topic?

    Tim,

    Sorry I took me a while to respond to this after I said I would in that other thread.

    Ok, so the other thread mentions that in general if you have an EXE that has plugins, the EXE needs to have everything it needs to run and each plugin should have everything it needs to run, in case the EXE changes or some of the plugins aren't in memory. So that should be it for the 1003 error, right? Well there is new way in LabVIEW 8.0 that you can end up with a 1003 error on your plugin VIs if they use VIs from Project Libraries and your EXE uses VIs from the same project Library. You mentioned Mean.vi which is probably one of the VIs that is broken in your plugin and it is part of a Project Library. Also you probably don't have any of your user.lib VIs in Project Libraries, so that is why you are seeing a difference.

    The other way to get this 1003 error is by trying to have 2 Project Libraries of the same name in memory at the same time. This doesn't happen in the development environment because there is only one copy of each Project Library. However in an EXE with plugins, where the plugins were built separately from the EXE (Method B from the other post) you can end up with a copy of the .lvlib in the exe and another copy in one or more of the plugins. This seems harmless since the first one in memory is the one that is used (just like VIs), but during the build process we remove unused members of the Project Library in the EXE. And since a VI knows which Project Library it is a member of and a Project Library knows its members. So if the Project Library is already in memory and a VI is loaded that says it is part of the Project Libary, but the Project Library doesn't think the VI is part of it, then the VI will be broken. I think this why you are seeing the 1003 but it works when you load the vi.lib VIs from vi.lib since in there is only one copy of the Project Libraries being used and no references have been removed from them.

    Lets take a specific example where you are using some of the Analysis VIs and the EXE only uses Histogram.vi and the plugin only uses FIR.vi (I got a CAR on this last week and wrote a long explanation that I'll copy and paste):

    When the exe is built it includes NI_AALBase.lvlib and Histogram.vi in the exe, since Histogram is the only item in NI_AALBase.lvlib used by the exe, App Builder by default removes all the other references that NI_AALBase.lvib has. The new copy of NI_AALBase.lvlib inside the exe is essentially a Project Library with one item referenced in it (there may be some subVIs if Histogram has any that are part of the .lvlib). When the Source Distribution is built the new copy of NI_AALBase.lvlib inside the source distribution has all its references by default because Source Distributions keep them. Even if you trimmed it down in the Build Specification it would only have a reference to FIR.vi which wouldn't be helpful either.

    As I said, a VI knows what .lvlib it is a member of and a .lvlib knows what VIs are part of it.

    So when the EXE is launched it loads the EXE's copy of NI_AALBase.lvlib into memory. Then the EXE is calling the Source Distribution as a plugin so the VI being called tries to load FIR.vi which knows it is part of NI_AALBase.lvlib, well that is already in memory, so the Run-Time Engine can't load the source dist copy of NI_AALBase.lvlib because a library of the same name is already in memory (so it doesn't matter what links that copy contains). But the copy of NI_AALBase.lvlib in memory reports it doesn't have FIR.vi as a member of it (remember the EXE copy only has a link to Histogram.vi). So FIR.vi is broken because its owning .lvlib isn't found.

    The removal of non-essential items is basically a size optimization, so what can be done? Well, not be optimized, by including the entire Project Library into the EXE and the source distribution. That way the 2 new copies of NI_AALBase.lvlib will have links to all the items in it, so the first one loaded will respect everything else.

    Either 1) move the NI_AALBase.lvlib out of dependencies into the tree with the rest of your source and include it as a Dynamic VI in the EXE build and Always Include it and its sub items in the Source Distribution. There will still be 2 copies of NI_AALBase.lvlib but they both contain links to all of the items in the Project Library, therefore which ever one loads first, it won't prevent other VIs from running. Also all the items directly referenced by NI_AALBase.lvlib and their dependencies will be included.

    Or

    2) Uncheck "Disconnect Type Definitions and Remove unused Polymorphic VI instances", that also removes unused .lvlib components if it is checked (maybe we should make those separate options). This will cause all the contents of NI_AALBase.lvlib to be included and the contents of all the .lvlibs it links to. Since NI_AALBase.lvlib contains VIs that have references into NI_AALPro.lvlib, all of it and its dependencies will be included, even if they aren't used by the code. So this can get very big and I wouldn't recommend it (for .lvlibs without circular links, this would be okay).

    With method 1 you could also build the .lvlibs and the files referenced by them and their dependencies into the same location on disk. That there would only be one copy and each build would overwrite it.

    I have some thoughts on how to make this better for future versions of App Builder/LabVIEW, but right now it only takes what you tell it you need or it takes it all.

    Kennon

  5. These are two separate issues: drag over not working, and drop deleting tree items.  You can use the attached VI to copy a tree and event structure out of.  What's important is that you have the old event ("Drop?", not "Drop").  You can replace the tree with a system tree as long as you right click on the tree and select Replace.  Don't delete the tree.

    Hi! 

    Is there any way to Get these new Items, without replacing my old event structure with yours? My App is big...

  6. If you set fit control to pane on the tab control, then only the tab control will resize. Not the contents.

    One possible solution is to programmatically resize the Image Display control based on the size of the tab control. You would have to put this code in a parallel loop so it always runs and feels smooth to the user.

    Thank you! That it what I'm affraid of... :)

  7. HI Experts! :)

    I have a question for you! I would like to use the " fit control to pane" behaviour on control, that placed on a tab control page. After setting "fit  control to pane" to the tab control, the other control i.e Image Display wont resize when I resize the window. 

    Could you help me how to do that?

    Thank you! 

  8. LVOOP has only been out for 4 years. That might sound like a long time in computer terms, but in terms of writing high level programming design texts, it's very short. Having said that, this December, a revised LVOOP customer education course from NI will be available, which does include lessons on design. In the short term, there are several texts on designing various subsystems you can find by going to ni.com and searching in the search bar for "LVOOP FAQ" and scrolling to the bottom of the FAQ document -- it includes links to a few design papers. There's also good stuff for OO design in the 2010 NI Week presentations (instructions for accessing those are included here).

    Thank you for your reply! I sent a join request to access to the private group! I think this will be very useful. BTW, what do you think about my other questioln? what and why do you choose that?

  9. Hi all! 

    I am wondering about the following.. I have a very comlex OO structure and the top level object contains all the current classe ie. the backbone of the application. There are many events that can modify the current state of the program. ( set / update attributes for classes, save or load).

    These events are generated in very special parts of the code(even different VIs), so I have to place this top level object into many VIs in order to keep the dataflow but in this case the wiring is not acceptable. 

    I have three alternatives:

    1. Global Variable : ~ Contains the top level Object, and Set the Global var. to Read / Write - the dataflow is given
    2. FUnction Global: at the init state of my program, The functin global initializes the top level object , and every time when I wanna use this object I have to create a new state for the function global (or use Get - Set states)
    3. Singleton DP. : I have never used this before, and I dont know how to combine the by ref. top level Object with the contained by value object. 

    I dont know how to go on! I would be so greatfull if u could help me to choose right, or suggest me another soultion for my problem! 

    Thank you very much.

    (i think the real problem is, this is the first time when I am working such a great application. There is no problem for me to design the specific classes, write all the methods. but when i am at the point of  compile the whole program, I dont know how to compose all classes for one.) It is so sad that very difficult to find any quotes about application desing. )

  10. Hi! 

    I have downloaded many cool UI Controls, they are cool! btw ... in the VI package manager there are many cool contorls

     - Install and Upgrade Packages

    - Uninstall packages... and so on...

    Is it possible to download these controls?

    Thanks!

  11. Hello!

    I would like to make image calibration. There is very useful vis in IMAQ Lib, but I would like to use Vision Assistant - Image Calibration method.

    In VA. selecting Image Calibration - The 3 steps wizard appears, and it is very easy to use the 3 type of calibrations. 

    Could you help me, that how to call this wizzard from Labview, without starting Vision Assistant? 

    (the resource files of Image Calibration are founded, but some parts are missing.) 

    Is there any other way? 

    Thank you! 

  12.  Thank you very much! 

    In the middle of January I will start to develop any solution for this problem. Yes, you are totally right about lightening. Changing it  will be the first thing what's need to be replaced... 

    If I have any problems, I gonna tell you. BTW, i will share my solution too :)

    Best Regards!

  13. Hi all!

    First of all, Merry Christmas! by the way, the work never ends. I am wondering about a solution, without any success. Could you help me?

    My problem is the following. I have a surface, and I have to detect all of defects on it. I don't have any good idea how to find them. In the attachment, you can see a small surface defect. My project is: find and localize all of these defects automatically, and measure them. What kind of image processing tools can be used to find and measure (area) them?

    Measuring them is not as important as than finding, and localizing them.

    First of all, using a morphological procedures could be a good start, but I don't know to detect these defect automatically...

    Please see the attachment:

    post-16152-126181609257_thumb.jpg

  14. Hi!

    I downloaded a package from Code Repository -> UI Controls -> Lavalib-UI-tools, package. I tried them and i say, wonderful. 

    I've been trying to do the follow for a long time, but I need a little help. I wanna design a button, for example : My link, but, I would like to do that, the circle(filled) will be button, without backgorund.

    I tried to customize buttons, copy the circle and paste it, but, LV insert a default white background around the circle, and created a rectangle control. How to do that, the white background gone and only the filled circle will be visible ? (the white will be translucent)   

    Like in the package!!  Could you help me, I tried so many things... but I don't know how to go on... 

  15. I've tried to do that to but couldn't fine a way...

    when you want to open a certain file with a certain application in Windows, you can try to run a command "application_path" "file_path"

    for instance : "C:\Windows\notepad.exe" "C:\text.txt" would work ; but when you launch VBAI, after the splash screen you need to select between configuration and inspection before you can select the file you want to open.

    So... yeah... sorry, I have no solution for you. If you find one, please let me know!

    Hi!

    I have tried, but sadly doesn't work... when u start that application , before u do anything u have to select File -> new Template... i'm affraid that's why tha command line argument doesn't work.. :(

    Thanx your reply... i hope we will find out one day :)

    Anyone else?

  16. Hi Boss! 

    I have a very big problem, and i can't find ansver to my question.

    My problem is: 

    I would like to execute an *.exe file, named : Ni vision Template Editor.exe.

    It is a part of vision development tool. Have you ever tried this?

    When u start the application, u should click first File -> new Template.

    This editor is used by another application for example: Vision Builder AI, Vision Developement Tool.

    And when u use this Editor from VisionB. A.I, it is needless to select a file to, open, the editor opens it automaticly.

    How should I do tis, from LV code?

    I think I would use a kind of parameter(image), or kind of property node, But i dont know how to do this.

    So. how to run this exe with parameters? I read many topics but I didn't find any useful answers...:(

    Could u help me?

    Thank you very much!

×
×
  • Create New...

Important Information

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