From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

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

Create User Event function : Output indicator's name should be input control's name

Status: New

User Event Refnum.PNG

 

Create User Event function

Output of Create User Event function should be name of the input instead of "user event out"

This will save time to rename each output indicator as input. 

CLD
6 Comments
AristosQueue (NI)
NI Employee (retired)

There are many difficulties with this idea. It sounds simple, but it is not.

 

To accomplish you goal, either we (A) change the name of the output terminal so that every instance of the node has a different name, thereby causing indicators created from that terminal have the different name OR we (B) add special code for created indicators to use a different name than the terminal name.

 

Option B would be behavior unlike anything else in LabVIEW, but it could be done.

 

Option A is problematic -- changing the name of the terminal would mess up existing scripting code that is doing wiring by name. In fact, now that you point it out to me, the output should never have had the word "out" on it... it should have been just "user event"... we only add the word "out" when there's a matching "in". But although that is a mistake, I would not correct it today... those primitives have been around now for 18 years, and it isn't worth risking breaking even one user's scripting code to fix it.

 

So let's focus on (B) -- creating an indicator from the terminal will create an indicator with a different label than the terminal label. We could do that. So now let's look at what name you're requesting.

 

The name wired to the input is used as the name of the data inside the user event. If the input is "string" the output is a refnum... it should not be named "string". Just using the same label carried across would be wrong. The output is an event, and the current name correctly reflects that.

 

However, an argument could be made that if the input is named "X" then the output should be named "X event". You would wire "string" to the input and get a "string event" indicator. In English, that would work. 

 

LabVIEW works in many human languages: not all of them are amenable to taking a noun (the name "X" used as the input) and turning it into an adjective (the name "X event" used as the output). Most languages do not use word order to determine parts of speech and instead require that the words get changed endings, or even change forms entirely, in order to become adjectives. Because of that, LV R&D avoids constructing grammar from arbitrary pieces because it does not work in all human language translations.

 

In order to fulfill this request, we would need to make "Create Indicator" behave differently for that one terminal than for any other terminal in LabVIEW. And we would have to put in behavior that is restricted only to English LabVIEW (maybe German, but all the others that we localize into have problems converting nouns to adjectives). Those are both special cases that I would treat as negatives for this idea.

 

Summary: We could do this idea if we do it in a very particular way. That way is non-standard, so would need a significant number of customers saying, "Yes, I'd like this," before we would likely do it.

 

The idea stays open to see other feedback, but I personally suspect it'll eventually be rejected without being done.

wiebe@CARYA
Knight of NI

Other functions have the exact same strategy: New DVR, Obtain Queue, etc.

 

If this is a good idea for Create user Event, then those functions need the same change.

Intaris
Proven Zealot

Is there a way we can get this to work via Malleable IVs somehow, to wrap the existing nodes in a malleable VI to do the work for us?

wiebe@CARYA
Knight of NI

VI Input and output terminal labels cannot be dynamically changed, not even for .vims. It would require an XNode.

AristosQueue (NI)
NI Employee (retired)

Weibe is correct. Not changing the labels of the malleable VIs is both a bone of contention -- it is a deliberate design choice with various ramifications.

Yamaeda
Proven Zealot

I guess you could make a quick drop plugin that copies the incoming label text to the event indicator (and add "event"?), that doesn't sound too hard. 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer