LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to collapse boolean sequence into digital waveform

Solved!
Go to solution

Hi Moran,

 


@moranfarky wrote:

### I'm using Labview 2020 - how to downgrade and send you VI for 2019 ? or drug and drop image?


Ever looked into the menu? ("Edit -> Save for previous…" should be available in LV2020 too!)

 


@moranfarky wrote:

At the end, I need a bool array that filled with 8 elements, while each element is a sample of my pushbutton.

MyArray[0] = pushbutton level at t0

MyArray[1] = pushbutton level at t0 + 200mS

MyArray[2] = pushbutton level at t0 + 400mS

...

The result of my "solution": at the end ( 8x200mS ) --> all the 8 ( That's why the For loop iteration is 8 ) elements are High or all of them are Low.


Then why do you read the button before the loop?

Did you take the beginner tutorials on LabVIEW? Do you know what "THINK DATAFLOW!" actually means?

 

When you wan to read the button inside the loop then you should read the button inside the loop!

Best regards,
GerdW


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

I can't read the pushbutton inside the loop.

It's should simulate a stream of data that arrived from visa (RS232).

 

RS232 --> Package of Bytes --> parsing it --> Analog data /  digital data .. etc  .

Now we focus on the digital data (lots of boolean that toogle sometime).

 

In our example, I need a solution to collect a stream of one boolean that changed sometime.

 

Maybe the For loop doesn't do the work.

I just need simple mechanism that collect stream of boolean and build bool array from it. 

0 Kudos
Message 12 of 15
(810 Views)

Hi moran,

 

the for loop will exactly do what you want...

 

Why can't you read this button in the loop? DATAFLOW dictates you must do this!

 

When the underlying problem is "How do I transfer data between loops?" then you should take the beginner courses to learn LabVIEW! Did I mention that before?

Learn about queues and producer-consumer scheme...

(Or collect your data directly in the loop handling the VISA stuff. In the long run I don't advise to do so...)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 15
(805 Views)

Yes, you mention it (I've already started ).

 

Meanwhile, I need a solution.

Is it really difficult to give me an example ??

 

Thanks. 

 

 

 

 

 

 

 

0 Kudos
Message 14 of 15
(801 Views)
Solution
Accepted by topic author moranfarky

Ok, I think I found the solution == local variables.

 

Thanks

0 Kudos
Message 15 of 15
(794 Views)