11-09-2012 09:17 AM - edited 11-09-2012 09:37 AM
has anyone had problems with saving type definitions (controls) in lv2012? it often won't save data if the control is cluster of hand populated arrays. I had to go into every populated value of an array and save it as the default value and I did it more than once, realizing that it's spitting out zeroes instead of string values I had populated
11-09-2012 09:34 AM
Have you tried a strict type def?
11-09-2012 09:36 AM
no I haven't, but is that a bug? let's start with that.
Also in a slave/master setup if you put a type-def to be read in the slave loop it is not read unless you put it in the case statement that's reading the current message from the master loop. In my understanding the slave loop executes either way, I would think it's a bug as well, no?
11-09-2012 09:41 AM
Isn't the problem here, that a typ def is a definition of a data type, NOT a container of data.
If you need to have some default data, make a normal vi that uses a constant of the type def.
11-09-2012 09:45 AM
@Vadim wrote:
no I haven't, but is that a bug? let's start with that.
Not a bug. expected behavior. a type def defines the data type not the default value (although a "Class" has a default values for the data members of the class that may be different than the default value for the data type - perhaps that is where you want to go)
Also in a slave/master setup if you put a type-def to be read in the slave loop it is not read unless you put it in the case statement that's reading the current message from the master loop. In my understanding the slave loop executes either way, I would think it's a bug as well, no?
Only the code in the executing case is executed. Dataflow 101. If there is any code in a non-executing case it does not execute. That is just how case structures work and I wouldn't want it any other way.
11-09-2012 09:47 AM
i c, so the loop where the case structure is located doesn't execute?
11-09-2012 09:48 AM
You need to show us some code, before we can tell you anything about that.
11-09-2012 09:48 AM
Not a bug. expected behavior. a type def defines the data type not the default value (although a "Class" has a default values for the data members of the class that may be different than the default value for the data type - perhaps that is where you want to go)
I still don't get it, if you save a control that is populated with value, how come the values don't get saved?
11-09-2012 09:50 AM
@Vadim wrote:
Not a bug. expected behavior. a type def defines the data type not the default value (although a "Class" has a default values for the data members of the class that may be different than the default value for the data type - perhaps that is where you want to go)
I still don't get it, if you save a control that is populated with value, how come the values don't get saved?
Because that is not the job of the control. The control only knows about type.
11-09-2012 10:50 AM
Because type definitions identify only the data type, only the values that are part of the data type update.... Because the item names in ring [combo box] controls do not define the data type, changes to ring [combo box] control item names in a type definition do not change the item names in instances of the type definition."