LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running labview program every five minutes

I am very inexperienced with Labview, but I am attempting to build a program.  This program is to get measurements of frequency (can be used to determine strain) and resistance (can be used to measure temperature).  I got the program to work when I push a button on the front panel to start the process and then process data when I push another button.  I need to get this process to be automated because it needs to run for a long time.  I want to take measurements (frequency and temperature) every five minutes. Also, I need to have some delay (maybe 10 sec) before the data is processed because it take time for the data to be received.  Any help is appreciated. I attached the .vi Thanks! 

0 Kudos
Message 1 of 7
(3,183 Views)

Hi laplanmd,

 

well, you didn't read the style guide before?

 

Please:

- use shift registers to replace all those "data buffer" and "sample count" local variables

- think about using a state machine for your program as you have 3 states: DAQ measurement, data processing, and wait state

 

Once you have made your state machine it's very easy to wait 10s before data processing or to wait 5mins before next measurement!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,174 Views)

@GerdW wrote:

Hi laplanmd,

 

well, you didn't read the style guide before?

 


That is the understatement of the year!  Smiley Very Happy  Hidden wires everywhere.  I would love to see the tracing with highlite execution on.  SampleCount is a race condition just waiting to happen.

 

To the OP:  Please think of us poor volunteers that have to waddle through this mess to try to help you.  We can't decipher code that has hidden wires, right to left wires, structures put on top of controls/indicators.  Please try to clean things up before posting.  In your case, a total re-write using a state machine is very appropriate.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 3 of 7
(3,165 Views)

Sorry about all the bad wiring. I just started using LabView this week, so I really know nothing about it.

0 Kudos
Message 4 of 7
(3,162 Views)

You can find free Labview lessons on NI's website.  Just enter "LabVIEW tutorials" in the search box.  You should become familiar with Labview before trying to tackle such a complex problem.  Also, there is a style guide online that you should read.  It will help you be a better programmer.

- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 7
(3,147 Views)

The only thing is that I only need this program and it will probably be the last time using it because I am getting a new job after this project.  I don't want to spend a lot of time on something I am not going to use later on.

0 Kudos
Message 6 of 7
(3,140 Views)
0 Kudos
Message 7 of 7
(3,116 Views)