XControl Inheritanc​e

I've found XControls of greate use. Thank you NI development team.
Is it possible to inherit some or all of the properties (and methods)
of the Facade panel objects to the XControl itself. It's very very
frustrating to create a
better version of let's say XY graph and then have none of the properties of the XY graph
inhereted to this modified version. I'm working on a XY graph which
allows text labels instead of numbers on scales and would like to have
it behave exactly like XY graph otherwise.
p.s. NI folks, I'd very much like to see real object oriented programming build in labview with inheritance, interfaces and event registration.
Tomi
Tomi Maila

The basic answer is that XControls don't inherit, because they don't necessarily have a single control on the FP. There's an idea here to create such a link - http://forums.ni.com/t5/LabVIEW-Idea-Exchange/XCon​trols-Inherit-the-properties-methods-of-a-base-con​...
If you look at the comments there, you will find a link to a tool which can script this inheritance today by creating the properties automatically.
Try to take over the world!

Similar Messages

  • Xcontrol does not work in built application

    I can't seem to get my custom xcontrol to work in the final built application.  It works perfectly fine when the top-level .vi is started from the development environment.  But all I get is the broken control image when I run the built application.  Is there something I'm missing in the build definition?
    I tried puting the thermometer xcontrol example into a built application and everything works fine.  The build definition only included the top-level file, so I don't think it's a problem with support/dynamic files...
    By the way, is there some trick to maintaining these xcontrols?  I love the concept, but man they are a pain in the butt to work with.  One wrong move in the project manager and they're messed up for life.  I finally learned to back everything up on a regular basis so I wouldn't lose everything if it one decided to go psycho on me.
    TIA,
    Greg

    I've got it working now, but I'm going about it in a round-about way.  My application has (had) a splash-screen/launcher vi that dynamically loads and launches the actual top-level user-interface vi.  The top-level vi was included in the build definition as a dynamic file.  This is the ONLY dynamic call in the entire application.  All other vi are called the normal way on the wiring diagram.  I could never get the xcontrol to work this way.  I even tried including ALL of the relevant files as dynamic/support file and could never get it to work.  In one experiment, I placed an xcontrol on the top-level vi (the top-level vi doesn't have any of the xcontrols, only a couple dialog-box sub-vis that it calls).  Again, everything worked fine from the development environment.  But, when compiled, the top-level vi would fail to start completely.  I never bothered to check what the execution state of the top-level vi was before I called it, but I assume it was "bad" so the dynamic call would fail.
    I got it working by eliminating the dynamic call and calling the top-level vi as a normal sub-vi from the wiring diagram.  BUT, it still had problems and would always ask me to find a couple files from the 'XControlSupport.lvlib', specifically 'Action.ctl' and 'Container State.ctl'.  The xcontrol also uses the standard 'eventkey.ctl' from the 'event_ctls.llb' and it would ask me to find this file every time as well.  I tried including the libraries in the project and including these libraries in the build as dynamic/support files, but still no good.  To fix the problem, I copied these files into my project folder, specifically included them in my project, and then replaced all of the controls wherever they appeared with the corresponding controls included within the project.
    Message Edited by GTM on 07-14-2006 08:48 AM

  • How can I Change data in a type def control containing a Xcontrol with a local variable

    Hello
    I made a Xcontrol and I inserted this control in a type def.
    When I want to change the control's data with a local variable in a VI, the VI change nothing. The change of data isn't perform
    How can I correct this issue?
    Thanks for your help
    Solved!
    Go to Solution.

    Hello,
    What's your LabVIEW version ? Do you have a simple example program which demonstrates this behavior ?
    I found another discussions related to your issues with Xcontrols:
    updating type defs in Xcontrol Facade
    No Data Change event generated for a XControl in a Type Def
    XControl facede.vi 
    Hope this helps.
    Regards, 
    Steve M.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> Vidéo-t'chats de l'été : présentations techniques et ingénieurs pour répondre à vos questions

  • How do I create an xControl with multiple inputs and outputs?

    Hello,
    i am trying to write a new Xcontrol Element. In the data model I can create data types using the cluster to create compound types, eg an int and an int array. But how do I create an xcontrol which has multiple data inputs and outputs?
    Kind Regards

    Limping_Twerp wrote:
    Alright: I see: An xcontrol is either an input OR an output. How do I achieve an output? Secondly: So you are saying the only Elements that can have multiple inputs and outputs are VIs?
    Can you take a few steps back and explain what you are actually trying to do. SubVIs and Xcontrols have nothing in common and it is not clear why you even try to compare them side by side (e.g. in terms of the number of connectors).
    Your questions about input or output tell us that you seems to have some misconceptions about xcontrols. Xcontrols are like regular controls, except they have some built-in intelligence that you can program. Most front panel object can be either controls or indicators and the same is true for Xcontrol. You create an Xcontrol, and after placing it on the front panel you can decide if it should be a control (where the code reads the value) or an indicator (were the code writes values to it). When you define the xcontrol facade, you also need to program how the visuals change if it is changed from control to indicator or vice versa.
    As a first step, you should opend the example finder and look at some xcontrol examples.
    Again, what are you actually trying to do? 
    LabVIEW Champion . Do more with less code and in less time .

  • No Data Change event generated for a XControl in a Type Def.

    Hello,
    Maybe I am missing something but the Data Change event of a XControl is not called when the XControl is used in a Type Def. or Strictly Type Def. (see the attached file).
    There may be some logics behind it but it eludes me. Any idea of why or any idea of a workaround still keeping the Type Def. ?
    Best Regards.
    Julian
    Windows XP SP2 & Windows Vista 64 - LV 8.5 & LV 8.5.1
    Attachments:
    XControl No Data Change event.zip ‏45 KB

    Hi TWGomez,
    Thank you for addressing this issue. It must be a XControl because it carries many implemented functions/methods (though there is none in the provided example).
    Also consider that the provided non-working example is in fact a reduction of my actual problem (in a 1000-VI large application) to the smallest relevant elements. In fact I use a  typedef of a mix of a lot of different XControls and normal controls, some of them being typedef, strictly typedef or normal controls and other XControls of XControls (of XControls...) in a object oriented like approach...
    Hi Prashant,
    I use a typedef to propagate its modifications automatically everywhere it is used in the application (a lot of places). As you imply a XControl would do the same, though one would like to construct a simple typedef when no additional functionality is wanted.
    The remark "XControl=typedef+block diagram" is actually very neat (never thought of it that way) because it provides a workaround by transforming every typedef into a XControl. Thanks very much, I will explore this solution.
    One issue remains: All normal controls update their displayed value when inserted into a typedef but not XControls. Data change event is not triggered. I known that XControls have some limitations (no array of XControls) but I would say, like TWGomez, that this is a “bug” considering the expected functionality.

  • Copying an XControl from one LVLib to another

    Hi,
    I'm trying to copy a project from a template into a new location programatically. I face problems while copying XControls from one LVLib to another. I also need to rename the all the VIs and Ctls in the XControl and the XControl and LVLib. Kindly post in your ideas.
    Thanks,
    Vaishnavi

    Hi Vaishnavi,
    You can not just copy an XControl folder on the disk, you have to do this from LabVIEW.
    The Save As dialog will give you an option to create a copy and it will take care of all naming issues automatically.
    Ravi Beniwal

  • Xcontrol project management

    I was hoping to get some advice or to be pointed in the direction where I can find out more info about managing an xcontrol "project" library.
    More specifically, I am curious as to what people do and what is considered best practice in the following case.  I am working with an xcontrol and have fairly little experience with an actual project (running Labview 2009).  I have been using the xcontrol project or library window (not sure what its proper name is), but I have consistently created new vis which are specifically for the xcontrol, but haven't been added to the library.  I tried creating a project and adding all of the files in the xcontrol to that library but then I got warnings about a conflict.  
    My main goal (I think) is the following, to have a "project" in which I can examine the vi hierarchy/dependencies.
    Unfortunately the xcontrol library window itself only allows for adding snapshots of folders, and the contents of the library are woefully out of date, and as I said before, many vis are "a part of the library" but haven't been officially added to it yet.
    Any advice or direction would be greatly appreciated.

    I hardly ever work without a project window, and especially with libraries (lvlib, xctl, lvclass) its unwise to work without one.
    My advice would be to create a new project, and import the xcontrol to the project, then add the new VIs to the project and drag drop them to your xctl inside the project.
    Regards,
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • "Project or Library file is corrupt" when trying to open XControl

    This is not a question, this is an account of my learning experience that I hope saves you from throwing your monitor through the wall.
    When trying to open an XControl, I received the following error: "Project or Library file is corrupt"
    Knowing Projects/Classes/XControls are all XML files, I opened the XControl using Notepad++ to see what was going on. The file structure is somewhat intuitive, and you'll be able to recognize many components of your library.
    I used a binary search approach to find the offending XML by deleting all of the virtual folders, then seeing if the XControl would open. It did, meaning the headers of the XML were fine. Then I took the original file again, and deleted half the virtual folders to see if it would open, and it did not, meaning the offending XML was in a virtual folder I had not deleted that round. I took the original file, and deleted the other half of virtual folders, and it opened. I took the original file, and deleted only one virtual folder, and it opened. Aha! that virtual folder had only 5 items, and I knew one of the items must be the culprit.
    Anyway, it only took about 10 minutes to narrow it down to an item that had a duplicate entry, two lines that were exactly the same:
    After I deleted the duplicate item, the XControl opened up just fine! No data loss, no corruption.
    How did the item get duplicated? Beats me. Could have been the product of a crash, some of my notorious renaming shenanigans, who knows.
    Lessons learned:
    Version Control (Source Code Control) is a hero, as usual.
    Try poking around with the XML if you get corrupt libraries - it may be an easy fix, but your mileage may vary.
    Don't even think about #2 unless you have #1 "under control"
    Action Item for Applications Engineer: could you point this error to the Owning Developer? I would suggest this type of an error fail more gracefully, or at least with more information. Possibly, this type of error could self-correct silently since it's so easy to diagnose? Watching the library tank due to a benign issue nearly cost me a monitor and a monitor-sized area worth of sheetrock damage.  (  )
    a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}

    I cannot find the result about this topic.
    So I recreate a new project file
    Hope there is better solution for this problem
    thank you all
    QIA
    http://www.vitst.com
    Virry Test & Control
    LabVIEW Certified Developer

  • Bound XControl doesn't update when not visible

    Hi all,
    I'm running into an issue with XControl binding and missed Data Change events. In particular I have a VI with a single subpanel. The VI loads and asynchronously runs multiple different subVIs, and handles swapping the subVIs into and out of the subpanel. So far, so good.
    The problem I have is that each of these subVIs contains multiple XControls, each of which is bound to a shared variable. When the subVI is visible in the subpanel, the bound XControl receives Data Change events without issue. The bound XControls in the other subVIs don't receive any Data Change events, and when the subVI is loaded into the subpanel, all of the XControl data is stale. I've verified the subVIs are running correctly, and that simple numeric controls which are bound do correctly update when the subVI isn't visible.
    This appears related to the issue(s) mentioned in this thread from 2006 (!), for which a CAR was raised (41OGGULG).
    Was this issue ever resolved?
    For now my workaround is to bind a control within the XControl (which does work), but this will only work for simple datatypes to be displayed. For complex data types requiring additional prcoessing for display, this is still an issue. Is there anything else I can do to get around this problem?

    Hi MichaelBalzer,
    I've looked at our CAR database and a previous SR having to deal with this CAR. It seems that the answer given by RnD is that the workaround is the "final solution" having to deal with this CAR. Please post this on our idea exchange (http://forums.ni.com/t5/NI-Idea-Exchange/ct-p/idea​s) and keep an eye out for fixes in future versions of LabVIEW!
    Casey B.
    Applications Engineer
    National Instruments

  • How to extract the xcontrol output

    I created one xcontrol for pressure sensors . I am able to display the output correctly but i could not able to use the output for other inputs .
    how to extract the xcontrol output
    for clear understanding please see the attached vi testing .
    Attachments:
    testing.vi ‏9 KB
    Pressure sensors.zip ‏96 KB
    testing.vi ‏9 KB

    I always measure velocity in furlongs per fortnight 
    Units are very powerful, and like any great magic, can result in serious unintended circumstances.
    I've tried them a couple of times and decided they were more difficult to use than the value provided. Maybe it's better now, but I'm still on LV 8.6
    http://forums.ni.com/t5/LabVIEW/Why-do-very-few-programmers-use-LabVIEW-unit-labels/td-p/1119746
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • More XControl questions / issues

    XControl 1, X1, has two other XControls, X2 and X3, on its
    block diagram
    When I open a VI with X1 on it, the Init ability is called
    for X2 and X3 three times each.  X1’s
    Init ability is called one time.  (The
    other VIs you see pop up are called from X2 and X3 as a result of Init
    executing, so they illustrate the Init calls. 
    They close when Uninit is called, and you can see as much when you close
    the VI and project)
    When I close said VI, the Uninit ability is called for X1
    and called twice for X2 and X3.  This, of
    course, leaves one instance of X2 and X3 left open.  Consequently, references and VI’s I opened as
    a result of the Init call are left open (you notice the two subvi's still open). 
    Once I close the project, the Uninit abilities are called
    for X2 and X3, closing the remaining resources.
    There is a file in the folder called log.txt I write to in
    the init and Uninit abilities for each XControl.  If you open it after each step you can see
    what I’m talking about.
    Additional things: 
    After I close the VI, but not the project, X2 and X3 are of course
    locked.  When I right click “Unlock this
    library for Editing”, LabVIEW crashes with a .cpp error.  http://forums.ni.com/t5/LabVIEW/Error-when-I-Unlock-Library-for-Editing-with-XControl/m-p/1009044#M4...
    My real project loads the XControls (and executes the Init ability) as soon as it opens for
    some reason, and makes it nearly impossible to edit them unless I close and open the
    XControls individually, due to the .cpp error above.
    Questions
    Is it expected that an XControl an another XControl should be called more than once?
    Why don't they get unloaded when the main XControl is closed and unloaded?
    Why the .cpp error?
    Tim Elsey
    LabVIEW 2010, 2012
    Certified LabVIEW Architect
    Attachments:
    XControl Forum Test source.zip ‏165 KB
    XControl demo video.zip ‏3598 KB

    Hello elset191
    Here is the Corrective Action Request that references your issue.  I have included you as a customer whom this problem is affecting.
    Request #: 302463
    Description: XControls remain open after corresponding VI is closed and crash occurs, XControl cpp error in LabVIEW 8.6.1f1 (Fatal Internal Error: "ThEvent.cpp", line 184) 
    I'm sorry that this has been a frustration to you.  The fastest way to resolve this issue appears to upgrade.  Have you attempted to reproduce this error in LabVIEW 2010 SP1?  I was unable to reproduce this situation in LabVIEW 2010 SP1.
    The CPP error is due to some issue with how this has been internally developed.  It appears to have been resolved in LabVIEW 2010 SP1 as do the other issues you have been dealing with.  Can you please confirm this for me?  I am happy to further address this issue to ensure your success.  All the best!
    P.S.  I have provided a link to the LabVIEW 8.6 Help simply for competeness.
    Editing XControls that are in Use
    http://zone.ni.com/reference/en-XX/help/371361E-01/lvhowto/editing_xcontrols_in_use/
    Sincerely,
    Greg S.

  • Front panel freezes using custom XControl

    So here's the situation: I wrote an XControl using an external library (camera control functions). The control works as it should work. So I use it in a VI and save this file. Reopening the file causes the front panel to freeze. Why? When I restart labview after it ultimately crashed and place the xcontrol in a new VI it works like a charm again - but saving and reopening it leads to freeze and crash again. In an attempt to debug I deleted all the external VIs from my XControl, believing this to be the problem. Its completely empty now, but still the freezing and crashing. What could be the problem?
    Kai

    Thank you for your input! I appreciate it very much.
    To Chris:
    1) Version 12, 32 Bit
    2) Here is my init vi:
    As you can see, this is still default. I have not changed a thing. Maybe I should?
    3) This could be the case! How can I prevent this, if it is the case? Other XControls work fine. I will try a minimal experiment.
    To Altenbach: I tried to follow the instructions. Heres my facade timeout. Maybe the need to be more in there:
    One last thing. When loading the facade.vi it told me the following:
    Vi was expected under "C:\Program Files\Andor SOLIS\Drivers\Examples\LabVIEW\System Files\user.lib\atmcd32d_internal.llb\Error Code Handler.vi", but was loaded from "Z:\Kai\xcamera\MicroscopeControlPanel_64bit_06042​012_newroomPalmSet Folder\Program Files\National Instruments\LabVIEW 2010\user.lib\atmcd64d_internal.llb\Error Code Handler.vi"
     The first is the local machine, the second is an (access restricted) external drive. How can you EXPECT a source at one place, but load it from another? I will try to change that....it is definitely a possible error source.
    Thank you!

  • Using Xcontrols in the user defined express vi's

    Hi All,
                            I am actually using a Xcontrol inside a user defined express that we develop. The xcontrol is working as expected when i use it in the standard vis. But when i use it in the express, simply it crashes the LabVIEW and i need to restart the LabVIEW again. I am worried with this.
                            I put break points in the Facade vi of the xcontrol to know what is happening. But, i am not able to debug as the configure vi comes infront as modal even though the Source, sub and the configure vi of the express was not been configured as modal.
                        How to solve this problem?
                        Is there any restriction in using xcontrol with express vi's?
                        I am refering the Express Tool Kit Manual.pdf. Is there any other documents to know about the operation of the express vi's?
    Thanks,
    Pandiarajan R

    Hello Pandiarajan,
    Since I didn't see it mentioned, I'm going to presume (hope) you're using 8.0.  In LabVIEW 8.0, certain parts of XControls ran in a different application instance than where the VI was.  This was a source of many issues related to XControls.  In your case, since Express VI configuration pages also run in a separate application instance (and a different one than the XControls), I suspect this is related to the problems you are seeing.  If this is the case, it may not be possible to use an XControl on the front panel of an Express VI config page in 8.0.
    The resolution to many of these issues was to allow these XControl parts to run in the application instance of the VI whose front panel contains the XControl.  This fairly substantial change did not make it in until LabVIEW 8.2.
    If you are already using LabVIEW 8.2, it may not be an easy issue to troubleshoot, but I'd like to help isolate this issue.  If you can simplify your XControl / Express VI into something that you could package and attach to this thread, I'd be willing to take a look at it.

  • XControl not updating properly

    So,
    i am writing an XControl which works fine by itself and does what I expect it to do, but as soon as I test it and put it into a small programme with a while loop, it doesnt properly update its appearence anymore. To be more specific:
    So this is an example for the on/off switch of a camera. If it is running and the switch is TRUE, the camera gets initialized and the indicator changes to TRUE and a little status message is produced and send out to another XControl, which just prints out text (and works fine, I wrote a test programme). The initialization of the camera always works, the light goes green and the correct status message is printed. But the shutdown process doesnt work:
    Although its quite similar. So i tested a) the initialization and shutdown VIs, they work fine. b) the information output xcontrol which works fine, too. If I run the XControl by itself it works as expected, too. Just the case where I place it in a test environment fails. Any suggestions?
    Solved!
    Go to Solution.

    to be continued here...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Xcontrol boolean state default

    I have made an XControl.  The State ability contains 3 booleans among other values.  One of the booleans, the first one I defined, is giving trouble.  Even though I set it True, and select "Make current value default" then "Apply Changes" then "Save", I can not get a Property read of the value to return True on the first attempt.  Also, program behavior that depends on this value does not properly default.  I have also checked that the default value for the "Read" property and the "Write" property that access this value are also set to True.  In the Init ability, I also can not get the three states to keep a True value in this item.
    Something, somewhere has decided very firmly that the default value for this item must be False, and I cannot get it changed.
    Any ideas?
    Solved!
    Go to Solution.

    It's hard for me to reproduce, since I don't have daqmx installed.
    Howeve you could try debugging your init ability by placint a break point inside the VI.
    And you could inspect the variant from a previous run (if the owning VI is saved) with my Variant XControl.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

Maybe you are looking for

  • Voice Memos not working in iOS 6

    I just updated my iPhone 4 and suddenly my voice memos app doesn't work. When I click on it, it loads the microphone icon then closes and goes back to the main screen.  Is anyone else having this issue?

  • General Characters Question

    Hi all, 20 years ago, i was using Mac Classic OS (from 6.x to 9.x) and MS.Windows, both for many targets and using many softwares... i type in MS Word in windows for example... and when i try to transfer what i typed for my mac, i faced problems... t

  • Unable to update to 1.1.1 do I need to? Unknown error (1417)

    iPod Classic 80GB. My software version is 1.0.2. Every time I plug my iPod in I am informaed that a newer version of the software (1.1.1) is available, but every time I try to update I am told that the message "could not be completed. An unknown erro

  • Moving Composition from one project to another?

    Hi Is there any way to move a Composition from Project A into Project B with all it's layers,Keyframes etc...? I'm using AE CS3 ... never had to do it before ... but never say never hey? Thanks for the help Lee

  • Archive Object  GLFUNCA, GLFUNCP and other Custom table ZGLFUNCA, etc

    Hi Expert,     I am encountering one issue that is how to define the write and delete program. I have three standard tables which have standard archive object and meanwhile I have another three custom own table which have the relationship with these