04-28-2008 04:33 AM
Boolean arrays..
Is there anybody that can help me to find a way to count how many times each boolean element in an array is high..
Here is what I want to do:
The Boolean array read about 40 pir detectors. Each element in the array control lights, and I also need it to work as an alarm system. Many detectors can be active/high in the same time,
it only depends on how much movement there is in the area.
I want to count each element in the array, and when one of them reach a limit.. lets say “
the buffer(or memory) will reset all values to zero.
I have searched in this forum for a long time, but I can’t find any solution..
Is there anybody that have an idea, and can help me?? I use LV8.0
Very best regards
Benjii
04-28-2008 05:06 AM
04-28-2008 05:15 AM - edited 04-28-2008 05:16 AM

04-28-2008 05:23 AM - edited 04-28-2008 05:24 AM
Hi Benji,
here is another example for you. I understand it in this way. Hope it helps. ![]()
Mike
04-28-2008 05:41 AM
Hi, and thank's for your fast reply..
Either I didn't explain clearly, or you have missunderstood me.. I have tried many solutions before, but I haven't been lucky to solve this yet... Your exemple wotks fine, but I need to explain to you how I want it to work..
Let's say that one pir detector(element in array) is high for about 500ms, and then goes low again.. Next time the same detector goes high, it will count 2 (for this specific element).. the next time.. 3 etc.. And in the mean time the same could happen to other elements in the array. When one of the array element reach the counting level 3, an alarm will be active.. and all counters for the arrays, or memory will be reseted.
Thanks again.. regards Benjii
04-28-2008 05:42 AM
04-28-2008 06:11 AM
Hi Mike... and thank's for your answer and example..
It didn't work in the way I wanted it to be, but if you read my second explanation, maybe you can help me.. In the mean time.. thanks..
regards from Benjii
04-28-2008 06:20 AM - edited 04-28-2008 06:24 AM
04-28-2008 06:21 AM
04-28-2008 06:37 AM - edited 04-28-2008 06:46 AM