LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to count, how many knobs are created in this

Solved!
Go to solution

hi everyone, i want to ask you simple but maybe complicated, how we can count that how many knobs are present in this string array at run time. 

0 Kudos
Message 1 of 9
(2,365 Views)
Solution
Accepted by topic author sam67

use "Array Size"

Certified LabVIEW Architect
0 Kudos
Message 2 of 9
(2,340 Views)

Thanks but i already did.

Now i want to create truth table combination depends on input like, if one input then just two combination 0 and 1 and if two input then combinations are 00, 10, 01, 11 and the inputs are N so it creates depends on input number

0 Kudos
Message 3 of 9
(2,329 Views)

Hi sam,

 

how many knobs are present in this string array at run time.

There is no "string array": it's an array of clusters of [DBL, string]…

 

Please note there is a difference between the number of array elements and the number of the visible array elements (aka number of visible rows/columns)!

 

Now i want to create truth table combination depends on input like, if one input then just two combination 0 and 1 and if two input then combinations are 00, 10, 01, 11 and the inputs are N so it creates depends on input number

And what is the problem?

Did you search this forum for "combinations"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(2,322 Views)

@GerdW wrote:

Did you search this forum for "combinations"?


Hi GerdW, I already searched but i didnt find. 

I just need combination of truth table according to given input. 1 input make 2 combination and 2 input make 4 combinations and Nth input make Nth combinations. 

0 Kudos
Message 5 of 9
(2,315 Views)
Solution
Accepted by topic author sam67

Hi sam,

 

search more…

 

Just to give an idea:

check.png

The "magic" is hidden behind the gray box.

(All you need is to "add" some rows/columns to the array stored in the shift register. It's a nice lesson to learn array handling in LabVIEW!)

 

I just need combination of truth table

Btw. that is not a "truth table", it's just a table with all possible combinations of 0 and 1…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(2,288 Views)

The "magic" is hidden behind the gray box.

(All you need is to "add" some rows/columns to the array stored in the shift register. It's a nice lesson to learn array handling in LabVIEW!)

 


Thanks man, well i will try. 

0 Kudos
Message 7 of 9
(2,283 Views)

@GerdW wrote:

Hi sam,

 

search more…

 

Just to give an idea:

check.png

The "magic" is hidden behind the gray box.

(All you need is to "add" some rows/columns to the array stored in the shift register. It's a nice lesson to learn array handling in LabVIEW!)

 

I just need combination of truth table

Btw. that is not a "truth table", it's just a table with all possible combinations of 0 and 1…


I tried but hidden part contain logic that i need, if possible show me 

0 Kudos
Message 8 of 9
(2,266 Views)

Hi sam,

 

I tried but hidden part contain logic that i need,

What have you tried? Where are you stuck?

Why don't you attach your VI?

 

if possible show me

Not possible, I didn't save the VI.

Start with a sheet of paper. Draw the starting array of [0, 1]. Now where do you need to add a column/row with another pair of 0 and 1? How do you need to write the resulting array for the first iteration? Is there an algorithm you need to apply? And the last step: how to you reproduce that algorithm using LabVIEW's array functions?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 9
(2,263 Views)