10-19-2016 02:33 AM
@GerdW wrote:Hi Lexen,
I have to check the C and G values if they are larger than 0.65.... if one of the values are larger than 0.65, I have to increment a count and the boolean button would light up indicating there is one. The entire process continues throughout the data.
Trying to translate your text "word by word" into LabVIEW:
Read the file, index the columns, compare with your threshold value, "light" a boolean indicator, increment a "count"…
Thanks for the gracious help again dark knight, however I couldn't create the DBL as shown as for my labview my dbl created was just a constant....
The boolean, count and the one below I also could derive out the location of the components...
10-19-2016 02:34 AM - edited 10-19-2016 02:36 AM
Hi,
even when I was faster the problem is maybe not solved: LexenZ wasn't very specific in it's definitions!
What's the exact condition? Three possible interpretations:
- check for at least one value bigger than threshold? (This one I chose.)
- check for exactly one value bigger than threshold?
- check for values bigger than threshold and count them?
The biggest problem in programming is defining the algorithm in an exact way…
however I couldn't create the DBL as shown as for my labview my dbl created was just a constant....
What are you talking about? Mind to share a snippet (or VI, I prefer LV2014)?
10-19-2016 02:48 AM - edited 10-19-2016 02:48 AM
@GerdW wrote:
however I couldn't create the DBL as shown as for my labview my dbl created was just a constant....
What are you talking about? Mind to share a snippet (or VI, I prefer LV2014)?
Apologies for the difficult to understand me, basically I am trying to replicate your VI, as you are using 2014 edition while I am using the 2015 edition, I could not source for the DBL and Boolean constants out as shown..
10-19-2016 02:51 AM
Hi LexenZ,
I could not source for the DBL and Boolean constants out as shown..
There are no constants in my image! There are only indicators…
Basic LabVIEW knowledge, learned by taking the free beginner courses:
Right-click an input/output of a function -> Create -> Constant/Control/Indicator…
10-19-2016 03:04 AM
I have managed to set it up as shown.
However, I presume is because of my lousy explaination, my main objective is to see 3 columns of data(from the text file shown).
Any value greater than 0.65 should be checked(There should be a count to increment it like you did, but I have to see how many values are greater than 0.65 in that particular column). Furthermore, once a value greater than 0.65 is found, the boolean acts like a LED to blink if there is a value greater than 0.65 being found.
10-19-2016 03:09 AM - edited 10-19-2016 03:11 AM
Hi LexenZ,
my main objective is to see 3 columns of data(from the text file shown).
You already see those 3 columns in the C, G, and D array indicators!
Edit: you have implemented to index rows instead of columns. You should follow my suggestions more carefully!
Any value greater than 0.65 should be checked
This also already is done by the comparison functions!
(There should be a count to increment it like you did, but I have to see how many values are greater than 0.65 in that particular column).
All you need to do is: use BooleanTo0/1 function on the boolean arrays (after the comparison). Then convert the result of this function to I32, then use SumArray on this I32 array: wow, you got your number of values greater than threshold!
Furthermore, once a value greater than 0.65 is found, the boolean acts like a LED to blink if there is a value greater than 0.65 being found.
Should the LED be "lighted" or should it "blink"?
I have shown you how the "light" it. When you want it to blink you need to use a "Blinking?" property node of the boolean indicator…
10-19-2016 03:17 AM - edited 10-19-2016 03:22 AM
This one may not be the right way to do.. but may give you a simple overview.
And it all depends on your way of explanation and the reader's way of perception.At first i thought you want something like this and i was doing it in this way
10-19-2016 03:32 AM
@GerdW wrote:Hi LexenZ,
-You already see those 3 columns in the C, G, and D array indicators!
Edit: you have implemented to index rows instead of columns. You should follow my suggestions more carefully!
-This also already is done by the comparison functions!
So sorry! I managed to solve this issue by placing the correct constant, now the columns are shown.
All you need to do is: use BooleanTo0/1 function on the boolean arrays (after the comparison). Then convert the result of this function to I32, then use SumArray on this I32 array: wow, you got your number of values greater than threshold!
Apologies I still do not understand this part. As shown my the latest snippet I uploaded, I am unsure why is there only 1 count, when there should be more than 1 values are that greater than 0.65.
Should the LED be "lighted" or should it "blink"?
I have shown you how the "light" it. When you want it to blink you need to use a "Blinking?" property node of the boolean indicator…
It should be lighted whenever there is a value greater than 0.65. Perhaps I should not mention blink. However even so it only lighted once, perhaps I should use a while loop or something to check the every values?
10-19-2016 03:41 AM
@Nghtcrwlr wrote:This one may not be the right way to do.. but may give you a simple overview.
And it all depends on your way of explanation and the reader's way of perception.At first i thought you want something like this and i was doing it in this way
YESS Nightcrawler!!! That is exactly what I wanted! Except for the boolean section I would only require 2 LEDs instead of mutiple LEDS. (1 for C and 1 for G) How should I show it out say for example, once I open the text file and view the data, each of the number is scanned and checked if its greater than 0.65, if it is, the LED would light up once per every value of 0.65)
10-19-2016 03:46 AM - edited 10-19-2016 03:52 AM
Hi LexenZ,
All you need to do is: use BooleanTo0/1 function on the boolean arrays (after the comparison). Then convert the result of this function to I32, then use SumArray on this I32 array: wow, you got your number of values greater than threshold!
Apologies I still do not understand this part. As shown my the latest snippet I uploaded, I am unsure why is there only 1 count, when there should be more than 1 values are that greater than 0.65.
This is what I'm talking about:
It should be lighted whenever there is a value greater than 0.65. Perhaps I should not mention blink. However even so it only lighted once,
And so my solution works!
Whenever there is a value greater than threshold the LED is lighted! Wh should it light up more than once?
Again: you need to define your tasks very carefully!
Edit: the image in your last post is OVERLY complicated! Learn to use autoindexing - or use polymorphism as I did…