LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
gb119

User defineable automatic LVOOP class conversion functions

Status: New

Whilst pondering Chris Relf's presentation on LVOOP based error handling for NI Week, it occured to me that it would be really nice if it was possible to define LVOOP methods that would be called automatically when LabVIEW needed to convert a class to a different (eg built in) type.

For example, imagine I have a class for handling errors - the obvious thing to do is to wire that class wire into a case structure selector and provide cases for error/no error. Of course that won't work, but if I could define a method that takes my class in and outputs an error cluster and was somehow appropriately marked so that LV would automatically call it, then the case structure could automatically do 'the right thing'.

The inverse functions that build a class from another type would be a form of constructor for the class that might be useful - e.g. I have a class that represents a measurement, wiring a path control into the class terminal causes LabVIEW to run a method that I have defined and appropriately marked that loads the measurement from disc and initialises the class.

There are a few problems I can immediately see - if one defines two possible conversion methods (e.g. class to error cluster and class to enum) one needs to have a way of defining which one is used (right click on terminal of node would seem the most obvious to me) and you'd probably want a specially covered coercion node as well....

--
Gavin Burnell
Condensed Matter Physics Group, University of Leeds, UK
http://www.stoner.leeds.ac.uk/
5 Comments
crelf
Trusted Enthusiast

Was I talking to you about this after the presentation?  I remember talking to someone about the "Merge Signals" primative that is automatically inserted when you try to wire rwo signals into a graph:

 

Merge Signals.png

 

I figure something like that might work...





Copyright © 2004-2023 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
AristosQueue (NI)
NI Employee (retired)
This is an idea already on the LVOOP roadmap, but at this time it is fairly far down the roadmap, time horizon 8 to 10 years. Kudos for this idea might pull it up sooner.
gb119
Member

> This is an idea already on the LVOOP roadmap, but at this time it is fairly far down the roadmap, time horizon 8 to 10 years.

> Kudos for this idea might pull it up sooner.

 

Ok, so we're about 9 years out from the original idea, any sign of that horizon getting any closer?

--
Gavin Burnell
Condensed Matter Physics Group, University of Leeds, UK
http://www.stoner.leeds.ac.uk/
AristosQueue (NI)
NI Employee (retired)

Nope. Very low priority. Lots of things got bumped down in the wake of LabVIEW NXG.

gb119
Member

Ok, I'll ask again in another 9 years then ! Smiley Happy

--
Gavin Burnell
Condensed Matter Physics Group, University of Leeds, UK
http://www.stoner.leeds.ac.uk/