02-12-2014 01:16 PM
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
02-12-2014 07:51 PM - edited 02-12-2014 07:52 PM
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
02-14-2014 07:49 AM
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