Showing results for 
Search instead for 
Did you mean: 

what different between Set Control Value [Variant] and Set Control Value Method

I wanna to read many input parameter(more than one subvi) from ini file.
And input parameter will be different type (number,bool sting)
so how I can use "Set Control Value [Variant]" or" Set Control Value" to do it.
I do not know how to input  different type parameter ?
thanks for your helps!

Diffrent Strokes for Different Folks
0 Kudos
Message 1 of 5
With Set Control Value, you had to use a Variant to Flattened String function or Flatten to String function to provide the type descriptor and flattened data inputs. This was the original method LabVIEW provided to set a control. In LabVIEW 7.0, Set Control Value [Variant] was introduced and the old method was left for compatability reasons. The new method determines the data type and flatens the data for you so you can just wire your data in. The data type that you wire must match the data type of the control you are trying to set with either method. So, if you wire a number (i.e. 1.234) to either Set Control Value or Set Control Value [Variant] and the control is a string, you will get an error.
Message 2 of 5

thanks Dennis !

if i wanna input many type of input parameter,I can not change the input type toilless.

I wanna read the data from a ini file ,the data include many type of input parameter,then I use set Set Control Value [Variant} to change the control value.but it hardly come true by differnet  type parameter.



Diffrent Strokes for Different Folks
0 Kudos
Message 3 of 5
I'm not really sure what you are asking. I think you want to use the ini file functions from OpenG. There are functions to read/write panels with variants and makes it all pretty simple.
Message 4 of 5


I will try.....


Diffrent Strokes for Different Folks
0 Kudos
Message 5 of 5