LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Shawn_S.

Double Click on Error Lines to Provide Quick Data Type Conversion

Status: Declined

Any idea that has received less than 8 kudos within 8 years after posting will be automatically declined.

Hello,

 

I was recently working on a project where I connected one output up to an input of a different data type.  I knew that I needed a conversion VI, and went to hunt down the correct VI.  Could we please write code that would automatically hunt down the correct conversion VI, insert it into a user's code, and make all of the necessary connections, simply with a double click on the broken error wire where there is a type mismatch?  This type of quick conversion feature could be very useful.  And users could toggle this feature on or off at their discretion.

 

QuickConversion.png

Regards,

Shawn S. | NIC
Instrument Driver/IVI PSE
National Instruments
5 Comments
SteveChandler
Trusted Enthusiast

Double click selects the wire. Maybe a right click menu item to insert the correct conversion function? Kudos contingent on that.

=====================
LabVIEW 2012


Shawn_S.
NI Employee (retired)

Oops, you are correct, but I like the idea of a context menu option for this feature!

 

However, it would be nice if when a user double clicked a wire, LabVIEW would check to see if the quick conversion feature was enabled.  Then if it was enabled, it would check if the wire was broken because of a data type imcompatibility.  Then finally, if the conversion VI existed, then it could replace the broken wire with the conversion VI and correct connections.

Regards,

Shawn S. | NIC
Instrument Driver/IVI PSE
National Instruments
altenbach
Knight of NI

Your example is a difficult scneario because it wants a conversion from DBL to string.

 

What kind of conversion would you suggest to be "correct" here? (e.g. format into string, typecast, flatten to string, number fo fractional string, number to exponential string, number to engineering string, format value, etc.)

AristosQueue (NI)
NI Employee (retired)

LabVIEW already has pop up menu options on broken wires for inserting conversions when we know what to insert. For example, wire an array to a terminal that takes a scalar of the array type. Pop up on the broken wire and there's an option for "Insert Index Array". Similar for "Insert Build Array". When there's an obvious thing to insert, we've added it.

 

Double clicking is for selecitng the wire. Often you want to trace where the wire goes because the terminals that are connected may be the actual problem, not the type conversion. That's why these options were added as popup menus.

 

These options started appearing in LV 7.0 and new ones have been added over time.

 

In this particular case, Shawn, altenbach makes a good point... what function would you want us to have inserted? We could just pick one, but we've avoided assumptions like that, sticking to the cases where there is one obvious node to insert (like the Build Array example).

 

For the record, there are other "fix this wire" options when you pop up on broken wires.

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 8 kudos within 8 years after posting will be automatically declined.