From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tare in QMH

Hi,

    I need to do a tare function using QMH and here i have attached my vi, go through this and give some idea to do that.

Thank you in advance,

Regards,

Paul

0 Kudos
Message 1 of 2
(1,971 Views)

Paul,

     I'm not sure how you want your code to works.  This looks like a "Weighing" task, where pushing Tare saves a single result that serves as a "Tare", to zero (by being subtracted from) subsequent Weighings.  It is unclear what you want to happen if Tare is never pushed, or if Tare is pushed 17 times.  Similarly with Start -- what if it is never pushed, or pushed 5 times?  Stop is clearer ...

     Look at the Tare case.  You know you've got Tare from the Queue (as you are in the Tare case), so comparing it with itself will always be True.

     You should need only two loops.  One loops handles your Events (button pushes, with all of your buttons being proper Latch When Released, especially Stop), and the other your QMH.  Think about how you might have another message ("Sample") that does the AI Read.  You might need to know what "State" the system was in, i.e. "Has Start been pushed?", "Has Tare been pushed?", and act accordingly (see questions in first paragraph).

 

Bob Schor

0 Kudos
Message 2 of 2
(1,947 Views)