LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with variant block

Hi nutty,

 

what is a "structure"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 17
(939 Views)

nutty_1988 wrote:

I agree with you, infact i have used that block.

 

The problem is... When, instead of a bool or a number, i receive a structure... how can i make to manage it?!?!


What do you mean by structure?

0 Kudos
Message 12 of 17
(933 Views)

Structure is a sort of cluster...

For example... Consider a variable called "machine".

Inside "machine" variable" you could have another variable called "command". Inside command there are two variables, for example start and stop that are two booleans.

The hierarchy could be like this

machine

             command

                              start

                              stop

 How can i manage this?!

0 Kudos
Message 13 of 17
(927 Views)

Hi nutty,

 

can you show a FP element depicting your "structure"?

 

What is "sort of a cluster"? Is it a cluster - or is it something different?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 17
(923 Views)

Yes... Is a cluster.

If i receive a string like this "FALSE;FALSE;0" how can i separate each of this in a correct manner?! I would want separate them in two bool and one numeric...

 In each word... i would like to convert the string in a cluster...

0 Kudos
Message 15 of 17
(918 Views)

Hi nutty,

 

when you receive a string like "value ; value ; value" you use SpreadsheetStringToArray with a separator of ";" to get an array of strings.

Then you index each string as needed…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 17
(916 Views)

GREAT!!

I will try!!

0 Kudos
Message 17 of 17
(912 Views)