Jump to content

XControl usage - best if many instances required?


Recommended Posts

I'm wondering what peoples thoughts are on XControl usage. Are they most useful where the control will be used over and over or are there circumstances where it's worth the trouble to build one for one instance? Seems like for everything I can think of so far that if I only need the control in one place that it's just as easy to implement the features right in the VI - especially now that LV8 has runtime shortcut menus for controls.

George

Link to comment

I don't really think their use is really valuable for multiple instances (you can save any normal cutomized control for that), but for when you want to build functionality into a control - sort of like the difference between a standard VI Global (just holds data) and a Functional VI Global (holds data and performs some work on them).

Link to comment
But why bother building an XControl if you're only going to use it once? Isn't it just as easy (easier actually) to just build the functionality into the VI where you're going to use the control?

It's easier in terms of time and work to implement, but XControls abstract the data handling you use just to display it, so your code is more readable (eg: you're not cluttering up your main BD with code that just rotates an array and picks off a few values to get them onto a graph) and generally easier to debug. Sure, you could just have all the code on the BD or put it into a subVI and then into your FP node, but XControls really clean all of that up. I also agree that using them in different places and across different projects is certainly useful too...

Link to comment

I think the XControl is more fun and nifty than it is useful. I can think of one scenario where it would be useful. In a company that has many programmers working on many Labview programs of the same class, and one of the programmers is in charge of maintaining a library of useful code pieces. Before LV8, the library would consist of VIs and maybe some customized CTLs. Now with LV8, the library would also contain XCTLs.

Link to comment
IIn a company that has many programmers working on many Labview programs of the same class, and one of the programmers is in charge of maintaining a library of useful code pieces.

Indeed, very true. However, in addition to this, XControls can prove very useful when you are deploying projects to clients and wish to provide some level of customisation to them. While it is very easy to learn and use labview's basic fucntions, it can be a little tougher to deal with more complex code and interactions for one who has little or no programming background.

In such a case, XControls are a boon. We had been searching for this functionality since some time now and were eventually thinking of using ActiveX controls when NI released Labview 8 with XControls. So, i would say that it is definitely a very good feature.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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