LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how we can enter data when a Vi is running

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 

Certified LabVIEW Developer
0 Kudos
Message 1 of 11
(3,959 Views)

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!

 

Warm regards,
Karunya R
National Instruments
Applications Engineer
Message 2 of 11
(3,924 Views)

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.

Message 3 of 11
(3,918 Views)

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.

------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
0 Kudos
Message 4 of 11
(3,914 Views)

thanks for your reply but i am not getting what you mean please explain little more how it is possible

 

Certified LabVIEW Developer
0 Kudos
Message 5 of 11
(3,845 Views)
First let us know whether you want to change the value that is being displayed or you want to change the value in the file or do both?
------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
0 Kudos
Message 6 of 11
(3,841 Views)

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?

Message 7 of 11
(3,839 Views)

Here's a simple example of a primitve popup.

 

(Make sure to close the front panel of ModifyValuePopup.vi before running AdjustValue.vi)

 

 

Message 8 of 11
(3,831 Views)

 Thanks for your time

  I want to change the value displayed  

regards

augustin 

Certified LabVIEW Developer
0 Kudos
Message 9 of 11
(3,706 Views)

Thanks a lot for your link and Vi.

 

Certified LabVIEW Developer
0 Kudos
Message 10 of 11
(3,703 Views)