LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Zeroing a load cell with Arduino

Solved!
Go to solution

I am using a load cell curcuit with an Arduino Mega and controling an operation with LabView.  I would like to create a tear button for the load cell just like a scale would have. In order to do that, I need to read the analog value and then set that value to a variable, like "x", when the zeroing button is pressed. Then x becomes a constant that subtracks from the analog signal from the load cell. I am not sure how to set a numeric constant using a case structure controlled by a button.   I think I may be making this harder than it needs to be, but I am stuck, and would appreciate some insight. 

0 Kudos
Message 1 of 10
(5,512 Views)
It's a tare function, not tear and you would write to a shift register when the button is pressed.
0 Kudos
Message 2 of 10
(5,505 Views)

So,  does that mean I need to use a  while loop that has a shift register inside a boolean case structure? or can it be done with just a button and a shift register?

0 Kudos
Message 3 of 10
(5,483 Views)

I think I did it, but I don't really understand if what I did was the proper way or not.  When I tested the VI it indeed zeroed out the input like I wanted.  I used a feedback node to make it work.

0 Kudos
Message 4 of 10
(5,476 Views)
Solution
Accepted by beedoo

Try this, I don't have the arduino code enabled so I can't run it. 
What it should do is on the rising pulse of pressing the zero button is set the current output to the zero value. 
I've just done this quickly so no guarantee! 

Message 5 of 10
(5,469 Views)

Thanks! That seems to work. I completely forgot about the other boolean operators.  It has been a long while since I last used LV.  

0 Kudos
Message 6 of 10
(5,461 Views)

Please, could you share your code in a later version? Thanks

0 Kudos
Message 7 of 10
(5,306 Views)

@DiegoSV wrote:

Please, could you share your code in a later version? Thanks


Later version?  Like LabVIEW 2015?  I'm pretty sure you mean earlier version.  Attached is the same VI saved in 2011.

0 Kudos
Message 8 of 10
(5,300 Views)

Your are right. I need the earlier version. Thanks!

0 Kudos
Message 9 of 10
(5,296 Views)

@DiegoSV wrote:

Your are right. I need the earlier version. Thanks!


Thanks are given with kudos.

Message 10 of 10
(5,286 Views)