LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counters

Solved!
Go to solution

Hi Everyone

 

I am trying to make two separate counters on a true and false case structure. I want to count every time the true and 

false case occurs and then do logic on the counts outside of the structure.

 

I have done research and saw that you can put shift registers on the edges of a while loop and put the case structure inside. 

But it does not seem to work when I want to output the two different numbers each time the while loop runs. 

 

Does anyone know what I can do or what is wrong? Do I just need one pair of shift registers or two?

I am using LabView 2010.

 

Best Regards

 

 

0 Kudos
Message 1 of 6
(2,807 Views)

Try this and let me know it this what you are looking for.

 

 

Thanks

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
Message 2 of 6
(2,775 Views)
Solution
Accepted by topic author Midna19

Ranjeet_Singh 's solution will work but I would recommend using shift registers as per your original thought.

Here is a slightly modified version:

Counter.png


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
Message 3 of 6
(2,764 Views)

 


@.aCe. wrote:

Ranjeet_Singh 's solution will work but I would recommend using shift registers as per your original thought.

Here is a slightly modified version:

 


Why you recommend this, Just asking ?

 

 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 4 of 6
(2,758 Views)

I didnt read the problem properly and give solution in slightly different way. My apologise.

 

Instead of counting true and false case counter I gave true and false counter.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 5 of 6
(2,757 Views)

Thank you .aCe. and Ranjeet_Singh!!

Sorry Ranjeet_Singh but I could not see your VI since you have a later version of LV but .aCe.'s solution worked for me. 🙂

 

I was able to keep the increment for each case in the loop and do logic outside.

 

I was just using one pair of shift registers and I also did not connect the wires in both cases correctly.

 

xxxMidna19

 

0 Kudos
Message 6 of 6
(2,732 Views)