From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

readout of variant type to tranform new value correctly

Hello dear community,

i have the following problem.

I've created a 1D array of Clusters, containing the label, the reference to the control and the value as a variant data type. 

In the loop where i want to change the value i get the new value as a string.

up to now, i use a case structure that proofs ( as an example) "is the value type boolean, I32 or string?" and depending on the result i transform the string. But it don't like this solution.

Is there any way to read out the type information from the old value and convert the string depending on this to the correct variant type?

0 Kudos
Message 1 of 3
(2,369 Views)

Hello Filos92,

 

with the get type information you get the actual stored type back from the variant. What to you mean with, i want to get the old type?

Also i see, you are using visa inside of a event structure, sometimes visa need some time to be executed, this can block the event structure, because the event with visa inside needs more time, then the other events, for an example the user is pressing a button, are blocked and delayed.

best regards
Alexander
0 Kudos
Message 2 of 3
(2,310 Views)

sorry for the Late response, i was in vacation for a while.

thanks for the solution! i've used the get type function to get the value but it didn't worked. after building in a timer everything worked fine!

thanks you very much!

0 Kudos
Message 3 of 3
(2,260 Views)