10-22-2020 04:37 AM
Hi,
I am working on a project where I receive a string of numbers continuously from Arduino via com port using Visa. I've converted the string into a 2D array of 5 columns (5 different data) and n number of rows which gets updated continuously as long as i run the program.
have a look at the below array (example),
whenever the value of the 4th column is 23, i need to make a LED glow for 5 iteration regardless of the value in 4th column. problem is, i am able to make the LED glow for only the iteration where the value is 23. but, as soon as the value changes to 41, my LED is turned OFF.
can anyone tell me how to program this??
thanks in advance.
Solved! Go to Solution.
10-22-2020 04:59 AM - edited 10-22-2020 05:12 AM
Hi VigViv,
@VigViv wrote:
whenever the value of the 4th column is 23, i need to make a LED glow for 5 iteration regardless of the value in 4th column. problem is, i am able to make the LED glow for only the iteration where the value is 23. but, as soon as the value changes to 41, my LED is turned OFF.
Now your LED will be TRUE for 5 iterations…
I prepared an example for you:
10-22-2020 06:10 AM
Hi GerdW,
Thanks for the reply. The concept is working. However, I'm not sure of the purpose of the icon (which has jars inside) after decrement and I have not used it in my program. kindly bear with me as I'm a beginner.
Also, I'm not using timer function in my while loop as it will delay my entire measurement and plotting of graph.
In the end, I have what I needed. thank you once again!
regards,
Vigviv
10-22-2020 06:39 AM
Hi VigViv,
@VigViv wrote:
However, I'm not sure of the purpose of the icon (which has jars inside) after decrement and I have not used it in my program. kindly bear with me as I'm a beginner.
Also, I'm not using timer function in my while loop as it will delay my entire measurement and plotting of graph.
That function is found in the comparison palette - read its help.
The Wait was used just for demonstration purposes: the examples should make sense as is and so allows the user to actually "see" the "LED glow". Without this wait it would iterate so fast you couldn't see the LED blink…
10-23-2020 03:51 AM
Hi GerdW,
Got it! thank you.
Regards,
VigViv