LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Build Text Express VI doesn't work without a variable

I like the build text express VI because it lets me hide a lot of the clutter of building text strings on the code page itself, inside the express VI.

Two questions:

1) Why does the build text express VI require a single variable before 'Result' will contain text typed into the 'Text with Variables in Percents' field. If no variable is listed the result is always null.

2) Is using many copies of this express VI a waste of memory or is it decent sized or possibly doesn't matter at all... I have just started using it so have no idea how well it works as far as adding bulk to the program.
0 Kudos
Message 1 of 11
(3,471 Views)
The express vi is a vi. Yes it will take more memory to use the build text vi that using the format into string function. The express vi if you right click on it and open front panel you will see what code is involved. A good example is to go and look at the vi metrics with a build text express vi and you will see that there are 42 different nodes in one express vi. If you put a format into string function you will see using vi metrics only 1 node. Another drawback is that the build text will only allow you to have 8 input variables. It is a easy tool to use but can be bulky if used improperly. Hope this helps.
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 2 of 11
(3,471 Views)
1) What would be the point of using a function that converts a variable into text if you don't want to use a variable. Use Concatanate Strings to combine two different strings or wire your string constant to the Beginning Text input (though that would be kind of silly).

2) Since the express VI does the same thing as Format Into String but with the limitation of only accepting up to 8 inputs, I would expect that you wouldn't see much difference in memory or execution speed. If you're truly concerned, it would be easy enough to test. Write one VI with the express VI and one with Format into String and compare the two.
0 Kudos
Message 3 of 11
(3,471 Views)
I guess I was wondering if multiple instances of the express VI is significantly different than multiple instances of a regular VI (which of course is no problem)
0 Kudos
Message 4 of 11
(3,471 Views)
In answer to question 1, the basis of my inquiry is not that I am using the VI to convert variables but to hide text (as stated previously). I would be just as happy with a little icon that popped up with the contents of a text constant so I could see/edit it and then minimize it on my code page. Like an Excel comment. This express VI more or less can do that--hide it on the page but let me see everything if I need to for editing. The problem being that I need to add a dummy variable in somewhere. However, this is still way better than trying to write a large error message (text constant) into a small case statement or something of that nature where it doesn't fit. That gets really messy and especially so when you try to edit them and have to move stuff a
round.
0 Kudos
Message 5 of 11
(3,471 Views)
Sure you can use as many as you want. Just like a subvi or any other function.
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 6 of 11
(3,471 Views)
why don't you try and make your own subvi that does this. The subvi can store the text that you want and using vi properties if it is called it can popup and dissappear if orginally closed.
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 7 of 11
(3,471 Views)
I thought when you said you wanted to hide text, the text you wanted to hide was the format string. One thing I suppose you could do is get the Express VI creation toolkit from NI and make your that doesn't require a comment. I also wonder about the description that can be added to every function or subVI in a main program. I don't know if its possible to pass that information to a subVI and then have the subVI output that to a string indicator. I'll post back if I can find a way to do that.
0 Kudos
Message 8 of 11
(3,471 Views)
In fact you could use a LV2 style global (unitialized shift register) and an action engine combination and place this subvi where ever you want to in your application. This would allow you to write to it or read from it at any time.
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 9 of 11
(3,471 Views)
Do you have links or info on the toolkit? I have not heard of it previously and could not find information on it on the website. Sounds interesting... I was wondering if it was possible to make express VI's or not.
0 Kudos
Message 10 of 11
(3,471 Views)