LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV 2012 type def issues

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

0 Kudos
Message 1 of 14
(2,472 Views)

Have you tried a strict type def?


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 14
(2,467 Views)

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?

0 Kudos
Message 3 of 14
(2,463 Views)

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.

0 Kudos
Message 4 of 14
(2,459 Views)

@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.


 

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 14
(2,456 Views)

i c, so the loop where the case structure is located doesn't execute?

0 Kudos
Message 6 of 14
(2,453 Views)

You need to show us some code, before we can tell you anything about that.

0 Kudos
Message 7 of 14
(2,450 Views)

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?

0 Kudos
Message 8 of 14
(2,450 Views)

@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.

 

Message 9 of 14
(2,447 Views)

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."

0 Kudos
Message 10 of 14
(2,433 Views)