LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Missing text data

Highlighted

I am writing a program in old labview 7.1 (old computer also) that gathers electrical and output data on an ultraviolet lamp in operation and displays

the data in text and grapical format to the user, who has the option of saving the data to a text file by pushing a button. The problem is that the program

misses a lot of data when the button is pushed nothing is written. Despite the size of the program the write to file section is practically identical to the example given. What did I do wrong? Note: this is an intermittant problem, the equipment can record dozens of lines of text then just stop.

The program is called peak3 and is attached below.

 

Bill Lubarsky

0 Kudos
Message 1 of 3
(495 Views)

Hi kuchean,

 

I've roughly at your code, and I believe the problem is due to the Latch when Pressed mechanical action set in the Reset/Save button.

 

This means that in this mechanical action you've set, when you pressed the Reset/Save button, it will sent out a TRUE value once to the Case Structure before the button can automatically revert back to FALSE value. In that case, the code in the TRUE case will only run once (Means that it will only write recent data to binary file once) and then remains in the FALSE case, until you pressed the button again to do the same operation.

 

What you can do is, try setting the mechanical action to Switch when Pressed (Right click the Reset/Save button in the front panel, select Mechanical Action), so that when it is pressed, it will remain in TRUE state until you pressed the button again. So in that case, TRUE = Save, FALSE = Reset.

http://zone.ni.com/reference/en-XX/help/371361K-01/lvhowto/changemechactofboolswitch/

 

Hope this helps.

 

Ee Lim



See that button on the left side of this post...

If you feel my post is helpful, all you need is just (at most) 2 seconds to click that button, to show your appreciation. Thank you~~



0 Kudos
Message 2 of 3
(459 Views)

I want it to write only  once, when the operator sees that the measurement has been completed. It will do this properly for hours then suddenly stop

writing to the file.

 

WEL

0 Kudos
Message 3 of 3
(425 Views)