09-04-2008 05:36 AM
hi
I have a programe that reads variables from files and do calculations based on that .some times after reading some variables need to be replaced .Can we make the program in such a way that after reading it displays data and ask user whether it is correct if wrong change the wrong vaiables only.then continue the programe.
THANKS IN ADVANCE
AUGUSTIN
09-05-2008 11:55 AM
Hi Augustin,
You will probably need indicators to display the data. Use a boolean control with an event structure to detect the boolean bontrol change. Use a case structure for the result from the boolean control. Create a true/false case to take care of your two cases (whether the variables are wrong or not). If the values are wrong, read the new values from the File using the File I/O functions.
Hope this helps!
Thanks!
09-05-2008 12:15 PM
I would go with a dialog popup.
A control (containing the original value!) allows changing the value and [OK] would return with the current setting. [Cancel] would return the original value, even if it has been edited in the dialog.
09-05-2008 12:34 PM
Augustin,
If you want to replace the incorrect previous value from the file, you will have to set the current file position to point to the previous data (substract the size ,in bytes, of your variable from the current file position) and write the new variable value.
09-06-2008 11:28 AM
thanks for your reply but i am not getting what you mean please explain little more how it is possible
09-06-2008 11:38 AM
09-06-2008 11:50 AM
Exactly which reply are you referring to? I agree that a simple popup will work just fine unless you do need to modify the original file. Attached is an example of a popup.
A popup is pretty basic LabVIEW coding. Have you looked at the on-line training?
09-06-2008 12:13 PM
Here's a simple example of a primitve popup.
(Make sure to close the front panel of ModifyValuePopup.vi before running AdjustValue.vi)
09-07-2008 11:30 PM
Thanks for your time
I want to change the value displayed
regards
augustin
09-07-2008 11:34 PM
Thanks a lot for your link and Vi.