05-20-2020 07:09 AM
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!
05-20-2020 07:17 AM - edited 05-20-2020 07:21 AM
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.
05-20-2020 07:39 AM
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...)
05-20-2020 07:59 AM
Yes, you mention it (I've already started ).
Meanwhile, I need a solution.
Is it really difficult to give me an example ??
Thanks.
05-20-2020 08:29 AM
Ok, I think I found the solution == local variables.
Thanks