LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

partial and total indicator with counter

Solved!
Go to solution

Hello guys,

I'm  implementing an application using counter timers.

I created a Vi that read a counter from a sensor of water ( each liter give me an impulse), and I use it to analyze the  partial and total  consumption of water in the laboratory.

I wants to create a front panel that the customer can observe the current consumption of water ( last 24 hours) ( last 7 days ) and ( total ).

I can read correctly for a partial last 24 hours and reset the indicator  correctly after 24 hours, but I can't do the same thing with indicator of  after 7 days because when reset the indicator of partial 1 ( last 24 hours) is resetted also the indicator partial 2  ...    while the total indicator is ok..

Do you have any ideas to solve this problem,. any suggest are precious for me..

 

P.s I think a good workaround is to use another counter timers to acquire the same impulse and use the same programm, but i think there is a tip to solve this  problem by programm

 

Thanks in advance

 

Dave

0 Kudos
Message 1 of 7
(2,705 Views)

Good Evening

Can someone give me a suggest to solve this problem, i trying to developing the Vi, but i can't find the solution..

I need to use another shift register with a case structor to reset the total indicator ? or there is a simple tip?

thanks who wants to help me

 

Dave

 

 

0 Kudos
Message 2 of 7
(2,669 Views)

Hi,

 

Can you downconvert your vi into 2009 and upload it. Then I can take a look now.

 

Regards,


Nitzz

(Kudos are always Welcome;))

0 Kudos
Message 3 of 7
(2,664 Views)

Hi,

 

If you debug your code, you will see the following in your lower True/False case

  - When it's true you are changing Partial2 to zero.

  - When it's false you are changing Partial2=Partial1 but JUST after change Partial1 to zero (that's in your upper True/False cycle).

 

Basically you will see in Partial2 the value of Value1 or Zero.  You need to change your code to add to the value of Partial2.

 

Best Regards,

 

Jorge N.

 

PD: "Quotient & Remainder" function and "Select" functions are not doing anything in your code

0 Kudos
Message 4 of 7
(2,660 Views)

Hi Nitzz

Thanks for your precious help.. here below i attached the VI with a partial and total counter..

I ask  you only an advice how to reset the total counter after 30 second because the partial counter is ok ( is able to reset after 10 seconds ) while the loop is running..

thanks again for any suggest you can give me.. 🙂

 

Dave

0 Kudos
Message 5 of 7
(2,657 Views)
Solution
Accepted by topic author devil80

Hi,

 

I still couldn't run your vi as I don't have the necessary tool kits:) but i guess i figured out what was wrong with the code. I have edited your second code a bit and have attached here. Have a look. The explanations are also included in the block diagram so that you can understand the concept well.

Regards,


Nitzz

(Give kudos to good Answers, Mark it as a solution if your problem is Solved;)) 

Message 6 of 7
(2,642 Views)

Hello Nitzz

I read your code..it's so similar  as  "C code concept " first istruction is reset partial and second istruction reset  total keeping the shift register the same..

Thank you very much for you big help and your precious explanation.. Smiley Happy

you'll have  a good Kudos..

 

Good Evening

 

Dave

 

0 Kudos
Message 7 of 7
(2,627 Views)