08-10-2010 11:23 PM - edited 08-10-2010 11:25 PM
I like how there is a new item added to the numeric palette in LV 2010. It is a numeric constant already set for double precision representation. Previously, you only had a integer numeric constant. If you wanted a double, you'd have to drop the blue integer numeric constant, then go through a right click to change the representation of the integer to double.
So this saves an annoying step. This is great.
But one question I have when context help is show for that palette item, what does the "(4800)" in parentheses mean?
Solved! Go to Solution.
08-10-2010 11:29 PM - edited 08-10-2010 11:30 PM
The four digit number after SubVIs refers to the connector pane pattern of the SubVI. I believe this number only appears when you have Scripting enabled. The valid connector pane ranges are from 4800 to 4835 (someone correct me here...), where 4800 is the single terminal connector pane.
08-10-2010 11:33 PM
Except it's a constant and not a VI.
Went to the Boolean palette and I see the same thing for the True constant but not for the False.
08-10-2010 11:51 PM
@Dennis Knutson wrote:
Except it's a constant and not a VI.
Or is it??
For those who don't know the Easter Egg (NI oversight?) for "when a constant is not a constant", go to the Strings palette and drop a Space Constant on your diagram. Now double-click the "constant" to reveal it's a SubVI.
Seriously, I don't know enough about how BD nodes define wiring terminals, but I would not be surprised if both SubVIs and constants used the same underlying notion of a connector pane. I'm all ears waiting for someone to jump in with some better insight.
08-10-2010 11:53 PM - edited 08-10-2010 11:56 PM
Jack,
You're right. It's kind of a strange coincidence because right around the time I found the double constant on the palette, I had just enabled scripting in LV 2010. I had never seen that notation before with respect to scripting before now. Is scripting now inherently a part of 2010 that you just have to click an option in Tools/Option to access, as opposed to previously where you needed to install it and run license manager to activate? Somewhere, I thought I read that NI was now embracing scripting a bit more, where in LV2009, they basically opened it up publically, but said use at your own risk. Am I thinking correctly on this?
I was kind of confused with trying to get scripting installed in LV2010. It came up as a package in VIPM, while previously, I remember it being a separate download from NI unrelated to VIPM. So I went ahead and installed in LV2010 with VIPM. Then I went into LV to find it, but couldn't. Then I checked the more info in VIPM and it said, go to license manager LV, Toolkits to activate it with the special license number. "Oh yeah, I remember having to activate it that way under 2009!" But I went to the license manager, and scripting did not show up under 2010 (only 2009 which was activated because I did it a year ago.) WTF? Is it installed or not?? Searching NI.com about scripting lead me to a couple pages that looked relatively new, and one said go to Tools/Options and click on a checkbox to show scripting functions. I did that, and it worked.
It looks like there is another option (already checked by default) to show additional scripting information in context help. I didn't know what that meant at the time so I didn't change it. But based on your information, if I uncheck that, the (4800) goes away. I don't know why I'd care to see the (4800) . (Is this piece of scripting informatoin new in LV2010?) Is there any other additional scripting information that I might have cared about but will now be hidden because I unchecked that box?
Dennis, as for the (4800) showing up on the true constant, I remembered a past message about the true constant being different from the false because it was actually a "merge VI". I found the message at Darren's Weekly Nugget 11/23/2009.
08-11-2010 12:12 AM
Missed that in the nugget. So instead of changing the engine to add new functions/constants, NI simply writes a VI. Cool.
08-11-2010 01:12 AM
Scripting is now a click (or two) away in LV2010. No more installs and activations, getting to be quite mainstream. I have used scripting as much as the next guy, but even I have not found a lot of use for those numbers.
As to the DBL constant, I still instinctively add a '.0' so it probably won't help me out much.
The constant/VI distinction can now be blurred even further thanks to the ability to set up SubVIs to inline themselves automatically. One of the first things I did was write a SubVI/constant which implements the imaginary number i. A very nice way to implement constants and not have to worry about dropping them in tight loops or other places.
08-11-2010 07:27 AM
The extra information you get by leaving the checkbox checked is the connector pane number and the indices of the terminals. The former is useful to find the number of a pattern quickly. The latter prevents the trial-and-error approach scripting required you to go through to get terminal indices for wiring. If you do much scripting, you will enjoy having the info easily available.
08-11-2010 09:49 AM
My guess is that to add this quickly to the palette they used a Merge VI (Place VI Contents) with just the constant on the block diagram. That could explain why the constant in the palette claims to have a connector pane.
But that is purely a guess, I had no idea either that this was added in 2010.
08-11-2010 11:10 AM
To summarize this thread: