LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a truth table based on boolean functions

0 Kudos
Message 1 of 13
(5,401 Views)

I want to store all the 8 possible switching states in one table i.e. 8 rows and 3 columns.

 

It doesnot matter which sequence comes first.

 

Please see the attachment above

0 Kudos
Message 2 of 13
(5,398 Views)

This is an offshoot of your original post: http://forums.ni.com/t5/LabVIEW/Digial-Waveform-Graph-Samples/m-p/1713714

 

Unfortunately, what you're trying to do is no more clear than what you were saying there, despite your statement "The attachment clearly shows my end application."

 

All I can tell is you the following with regards to the basic operation:

  • You cannot replace elements in an array if they don't exist. Thus, you have to initialize an array to something.
  • It is pointless to use a matrix data type. Use a simple array of integers.
  • Is is also pointless to build an array out of a single Boolean and to then use the Boolean Array to Number function. The Boolean to (0,1) function does this quite well.
  • If your intention is to replace a row, then replace a row. Do not replace each column in the row one by one. Create an array which is your row (only one Build Array), and use the Replace Array Subset to replace a row.
0 Kudos
Message 3 of 13
(5,392 Views)

Do you have an example to show of  "Create an array which is your row (only one Build Array), and use the Replace Array Subset to replace a row" somewhat related to what i have.

 

Even if i have that, would it allow me have number of samples (on x axis of digital waveform graph) if i am switchin the boolean functions.

 

 

0 Kudos
Message 4 of 13
(5,384 Views)

See attached example. Note that this example is purely for demonstration. The VI is completely meaningless and I don't see how it helps you in doing whatever it is that you are trying to do, which you haven't really explained all that well.

0 Kudos
Message 5 of 13
(5,361 Views)

I am sorry but i hope this time you can get a better idea of what iam trying to say.

 

I have created a boolean array of switching sequence and feeding them into digital data.For example if i switch a, b and c in 100 sequence but i would like to repeat this sequence six times. I have already done this manually but i would like to know if its possible to feed in the numeric control value of Number of Cycle 100. This means what ever the numeric value is in the numeric control, the number of samples for the 100 would be that much.

 

thanks

0 Kudos
Message 6 of 13
(5,343 Views)

jackferz,

 

Take a look at the attached vi.  Note that numeric control # samples controls how many times the pattern is repeated for each step.

0 Kudos
Message 7 of 13
(5,328 Views)

Wayne

 

thats pretty much it.


But is it possbile to get rid of the # Samples from cluster of two elements since i want to feed in the sample values that i calculate as explained in my last attachment.

 

Which may require a seperate 1d array for # Sample, and to specify which row i want to feed in a required value. Can we use Get Matrix Elements for this puprose or etcc......

 

thanks a lot

 

 

0 Kudos
Message 8 of 13
(5,310 Views)
This might be what you're looking for. Seems like an odd way to go about this.
0 Kudos
Message 9 of 13
(5,298 Views)
Lets try that again.
0 Kudos
Message 10 of 13
(5,295 Views)