LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview does not clear memory of indicators on front panel.

I developed Labview Gaussmeter Magnetometer with Hall Effect Sensor

https://decibel.ni.com/content/docs/DOC-22595.  For the maximum,  minimum and average gauss on the front panel, I set the default to zero and set zero as the defaul when I right clicked the indicators.  I run the program once and get results.  When I start it a second time, it starts at zero like it is supposed to do, but when I stop the program, it gives me the results of the first run.  The only time the indicators are different is when the results are higher than the maximum gauss or lower than the maximum gauss.  Thank you for any suggestions.

0 Kudos
Message 1 of 3
(2,924 Views)

It depends how you have done the code. You can clear the indicators by setting the Clear Indicators in VI Properties>> Execution. It would be better if you can attach the code or atleast a snippet of your code.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 3
(2,922 Views)

Hello Hacklord,

 

there are some things to mention to your VI.

  • since the invoke nodes "Reinit To Default" are independent from other structures in your case- structure, they will be executed in parallel to the for- loop. That's why the indicators are set to zero after pressing "START"
  • when the measuring has finished, the Min/Max wil be determined and then compared with the previous minimum / maximum stored in the feedback nodes. For the first run the feedback nodes are initialized with the default data for the appropriate data type, which is zero for Dbl. For following measurements there will be only the lower value between the currently and the previously stored value fed into "Minimum Gauss" - indicator. So everything looks fine.
  • with every loop of your main loop your physical channel will be newly created without being cleared when the START- Button isn't pressed
  • your while- loop doesn't have a wait, so it runs free. You should take a look at your task manager to check the CPU- load
  • you didn't connect the task-wire and the error-wire to the shift registers, so they are useless
  • for documentation reasons it is bad habit to wire the feedback with hidden wires from the wrong direction. There is a context menu entry called "Change Direction" to switch the positions of input and output
Greets, Dave
0 Kudos
Message 3 of 3
(2,905 Views)