LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with strict type def. enum constants

Does anyone know why strict type def. Enum constants on the block diagram sometimes change their value to its default value. Let’s say for example the enum constant has three values which are “init”, “write” and “save”, where “init” is the default value. We place this enum on the block diagram and select for its value “write”. Later on, all by its one, without any user interaction, this enum constant suddenly changes its value to “init”. The three value just mentioned are not the actual values of the enum constant causing the problem. Their real values are a list of 19 items. Each item is a string of up to 23 characters, combining upper case and lower case, and some space characters (ASCII 0x20).

The solution so far has been to disconnect this strict type def. Enum constant from the strict type def. definition. This solves the problem but at a high price, since we lose the benefits of using strict type defs.

Thanks in advance for any help

0 Kudos
Message 1 of 6
(2,685 Views)

I have never seen an instance of type def to change its value "randomly". My suspicion is that the type def was modified and the change submitted to all instances. Depending on the instance value, that value might change (e.g. the value was deleted from the type def).

 

Why are you using strict type defs for block diagram constants?

Do you encounter issues like this with "normal" ('weak') type defs as well?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 6
(2,675 Views)
What version of LabVIEW and which OS?

I found this (well, it was not a strict typedef enum, just a typedef enum) in version 7.1 for Windows just before 8.0 was released...NI confirmed and fixed it when they released 8.0 a few weeks later.
Message 3 of 6
(2,674 Views)

There was a bug (I think in LV 2011) that would change constant enum values when a search for a string landed on the enum constant.

0 Kudos
Message 4 of 6
(2,652 Views)

pcardinale,

 

Looks like this bug was fixed in 2011 SP1.   http://digital.ni.com/public.nsf/websearch/8CE4357F29F8FA3E86257A37008051F6?OpenDocument

 

 

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 5 of 6
(2,634 Views)

I use strict type def constants to have to change only the strict type def definition instead of all the instances in my code. I have so far not tested the “weak” type def.

I’m using LabVIEW 2010 and Windows 7 Professional.

For now I disconnected the strict type def constants from the type def definition.

I made a test VI and put in its block diagram an enum strict type def constant and then did a text search for one of the elements name of the enum constant. It did not change the value of the mentioned constant. Can you provide a hint on how to perform the search to trigger the enum value change.

Many thanks

0 Kudos
Message 6 of 6
(2,617 Views)