LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save the details entered?

Solved!
Go to solution

I am attaching a vi. I need to read the information from the text file then I need to enter it into the block but i am not able to understand how to remove the concatenated string into the parts required for the block.

Download All
0 Kudos
Message 11 of 20
(876 Views)

See attached VI. But I suggest you use config files instead as they are more flexible and standardized. They are in the file palette.

Certified LabVIEW Architect
0 Kudos
Message 12 of 20
(867 Views)

An error is occuring when I am trying to run this vi. I am attaching the screenshot of the error.

0 Kudos
Message 13 of 20
(865 Views)

Hi Neha,

 

so there is an error with your VI - and all we get is an image of the error message.

What kind of help do you expect?

 

EOF of your datafile is encountered. Either the file or your constants/settings in your VI are wrong…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 20
(860 Views)

The error is due to not having and End Of Line character at the end of the last line.  Or you could just ignore the error (Clear Error.vi, set error code to ignore to 4).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 15 of 20
(858 Views)

Oh, I didn't bother to check that. Just add a return last in the file to get rid of the error.

Certified LabVIEW Architect
0 Kudos
Message 16 of 20
(863 Views)
Solution
Accepted by Neha987

If you right click on your Read from File function and choose Read Lines, then wire a -1 to the "Count" input, you'll get an array of strings. That should be easier to parse as needed (for example using String to Path).

read_txt_BD.png


GCentral
0 Kudos
Message 17 of 20
(862 Views)

I am attaching a VI. It creates a notepad and then reads the details from the notepad and enters in the input. I need something like an update button so that when it is clicked then a popup comes and then we enter the new details (in the same input format) which then updates this detail in the notepad and is entered in the input.

Download All
0 Kudos
Message 18 of 20
(824 Views)

Hi Neha,

 


@Neha987 wrote:

I am attaching a VI. It creates a notepad and then reads the details from the notepad and enters in the input.


The VI reads from a text file and writes to a text file…

 


@Neha987 wrote:

I need something like an update button so that when it is clicked then a popup comes and then we enter the new details (in the same input format) which then updates this detail in the notepad and is entered in the input.


So you want to handle some GUI events?

You need a button on your frontpanel.

In the block diagram you need a loop with an event structure to handle events.

In the "button: value change" event you can call your "popup" VI, which ask for user input and again waits for user action (like a "Finished" button) on its own.

In your main VI you are getting the user input from your popup VI and save it to your text file.

 

Basic LabVIEW stuff: did you take the Training resources as has been suggested several times before?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 19 of 20
(813 Views)

Thank you..........It's not basic for a beginner like me!

0 Kudos
Message 20 of 20
(792 Views)