LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counter increment without using shift register

Solved!
Go to solution

Is there a way to do count=count+1 with out using a shift register or feedback node??  I have an event structure inside a do while loop (see attached).  When the button is hit ( kicks off the event) a test is done.  Based on the test in the event a string is passed outside the event to a pass/fail case statement.  The user can run any of these "events" as many times as he/she wishes.  And in any order.. Test1(fails)..test 1(fails)... again...test1 (pass) again...test 2 (pass) then test 1 (pass).  When the stop button is hit I would like to know how many times each pass/fail occurred for each test.  Trying to stay away from shift registers as I have 18 button so w a possible pass fail for each so I would need 36 shift registers.

 

In my example the final printout tally would be :

TEST      PASS/Fail           # x's test was run

test1          fail                             1

test1          fail                             2

test1          pass                          3

test2          pass                          1

test1          pass                          4

etc

0 Kudos
Message 1 of 5
(3,296 Views)
Well you will need SOME type of "storage" for the data. In this case I would rethink how I wanted to organize my data (array clusters of(test, results[]) Andres an "Action Engine" to maintain all the data. I'm mobile now so no link but

Ben's famous nugget on AEs is easy to find. look at most kudoed posts all time. Its #1

"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 5
(3,285 Views)
Solution
Accepted by topic author MarkDavid

Don't see an attachment.

 

You could use a shift register to store an array.

 

Each button would map to an array index. For each button pushed you would index the array, +1 the value, replace the array element and pass back out to the shift register.


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

Message 3 of 5
(3,269 Views)
0 Kudos
Message 4 of 5
(3,264 Views)

I'm working that idea now...thanks.

0 Kudos
Message 5 of 5
(3,262 Views)