LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tare function DAQ assist and restart function for the vi program

Solved!
Go to solution

Hi!

 

I have a program that aquiers a signal from the DAQ assist. I have searched here on the forum and on the web, but I can't find a way to implement a tare function. The signal is from a loadcell and therby it would be good if Icould tare the signal to value zero. In the DAQ assist I can calibrate it manually, but i would like to wire this function to a button. 

 

Also I have another problem that shouldn't be hard to solve, but I'm struggling with it. I want a resert function in my labview code so that i can restart the program from the begginging. I have used a case structure with normal and restart enum constant, and wierd them via a tunnel. But it dosn't seems to work. Instead of resetting the program it only stops it 

 

I have attached my code below.

 

Best Regards Maurlind

0 Kudos
Message 1 of 22
(6,098 Views)

Hi maurlind,

 

I have searched here on the forum and on the web, but I can't find a way to implement a tare function.

Well, often this function is called "Zero" - and often this was discussed here in the forum…

You need to store one measurement value (in a shift register) and subtract it from following measurements!

 

I want a resert function in my labview code so that i can restart the program from the begginging.

Usually you put your main part of the program in a loop that runs until you stop it with a condition of your choice…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 22
(6,088 Views)

How do you store a live signal and subtract it?, i have seen people who manage to zero a counting timer, with the help of an array and **bleep** register. But how can I do this with a signal ?

I don't know how to take the signal and subtract it with an offset. 

 

With the reset function:

I know that I have to put a loop in the main part of my code, but I have a hard time to get my condition to work. 

 

Best Regards Maurlind.

0 Kudos
Message 3 of 22
(6,065 Views)

Hi Maurlind,

 

you really need to learn how to use (and spell :D) shift registers.

Go through those free LabVIEW beginner courses offered by NI - and through all those example VIs coming with LabVIEW!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 22
(6,063 Views)

Hi Maurlind,

 

maybe you can team up with JM?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 22
(6,053 Views)
Or the revived old thread at http://forums.ni.com/t5/Multifunction-DAQ/Zero-strain-readings-at-the-start-of-a-test-using-Daq-Assi...

Sounds like multiple students with the same assignment.
0 Kudos
Message 6 of 22
(6,048 Views)

Snippet2.png

0 Kudos
Message 7 of 22
(6,038 Views)

I solved my problem with the tare function, i used a case structure and shift register to store values in it. se picture below.

 

I haven't found a way to restart my VI yet. I tried to implement something from the community , see this link: https://decibel.ni.com/content/docs/DOC-4747
But that doesn't work for my VI and i don't know why. Could someone explain why doesn't work ?

 

My goal is to restart my whole VI with a press of a button.

 

 

Best Regards Maurlind

 

Download All
0 Kudos
Message 8 of 22
(6,007 Views)

Hi Maurlind,

 

I appreciate cleaning up a VI before uploading as a kind of respect for this forum…

You really should read the Design Guidelines in the LabVIEW help!

 

Could you please attach your VI in LV2011?

 

My goal is to restart my whole VI with a press of a button.

Usually you need a loop and a case structure wired to your button - similar as shown in that linked example…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 22
(5,996 Views)

Here is the program in LV 2011

 

I know my code is a bit off and need alot of polishing, but i have only worked with Labview for a month or two, so I'm still learning. 

 

Sorry for any inconvenience!

 

Best Regards Marulind

0 Kudos
Message 10 of 22
(5,992 Views)