Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
In text based language, define some constants with meaningful names are very common task. For example, you typically define constant in C like this:
#define RED 1
#define GREEN 2
#define BLUE 3
In LabVIEW, you can use ring to define them:
and then you can use the constant very simple:
But the following definition can not be implemented with ring:
#define RED 1
#define GREEN 2
#define BLUE 3
#define DEFAULT 1
Here, DEFAULT is the same with RED. But this is not permitted by ring, it will popup a warning if you try to do this: "Waring: Identical values in the Values list are not permitted. The oblject cannot be updated until you assign new values or remove items with identical values. "
I know you can use local or global varibles to define constant as a work around, but variables have performance overhead, it is not the best solution as a result.
I propose to create a "const" that allow different items share the same value, and the other behaviours will be the same as a ring. You can also add "picture const" and "text & picture const".
The following topic on NI discussion forums inspires me to propose this idea.
http://forums.ni.com/ni/board/message?board.id=170&thread.id=435687
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.