From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I'm readong from a file, as one part of my prgram, which displays the data on a table, i'm reading this file continuo

sly, however, it slows down my system to such an extent that windows complains about memory, and closes the program. What can i use inorder to obtain the same functionality, and eliminate the memory problem.???Please help, an example will be great, thanks?
0 Kudos
Message 1 of 6
(2,321 Views)
sly, however, it slows down my system to such an extent that windows complains about memory, and closes the program. What can i use inorder to obtain the same functionality, and eliminate the memory problem.???Please help, an example will be great, thanks?How big is the file that you are trying to read? Is it a file that is continually growing in size?

How are you reading the file - reading new data or reading the entire file all at once?

Maybe you could add some sort of a delay in your system, like a 1ms wait in between reads.

Shan Pin Koh
0 Kudos
Message 2 of 6
(2,321 Views)
sly, however, it slows down my system to such an extent that windows complains about memory, and closes the program. What can i use inorder to obtain the same functionality, and eliminate the memory problem.???Please help, an example will be great, thanks?The file is continually growing, as it is being written to by another program, I tried a wait, but it still does that. What other method is there to do this? Thanks
0 Kudos
Message 3 of 6
(2,321 Views)
sly, however, it slows down my system to such an extent that windows complains about memory, and closes the program. What can i use inorder to obtain the same functionality, and eliminate the memory problem.???Please help, an example will be great, thanks?It sounds like you're reading the entire file as it grows incrementally. I may be entirely wrong but here's what I'd suggest you do:

Read the file. Use "Read File" function. Pos Mode: 0. Use a Shift Register to keep track of the location that you have read. Wire that into Pos Offset.

Here's why: Try reading for example 5 characters at a time. You don't want to read the same old 5 characters again the next time around but instead the new data. You might want to put some form of error checking, that is if you don't see any new characters at all.

If you're confused, let me know.

Shan Pin Koh
0 Kudos
Message 4 of 6
(2,321 Views)
sly, however, it slows down my system to such an extent that windows complains about memory, and closes the program. What can i use inorder to obtain the same functionality, and eliminate the memory problem.???Please help, an example will be great, thanks?I am kind of confused.
I had a look at your example, However, what i want to do is to display a table, with the data from the time the file was created, and add to the table as the other program writes data to the file. However, i see that it takes up to much memory, because NT complains and ends the program.
What do i do??
0 Kudos
Message 6 of 6
(2,321 Views)
sly, however, it slows down my system to such an extent that windows complains about memory, and closes the program. What can i use inorder to obtain the same functionality, and eliminate the memory problem.???Please help, an example will be great, thanks?I had some time so I created this example. Specify the file that you want to read, the number of characters to read and where to start. You'll need to sequence this program to how you want it to run. The WHILE loop is the concept that I was describing.

I hope that helps.

Shan Pin Koh

P/S: This was created in LabVIEW 6.0.2. If you need it in 5.0, let me know.
0 Kudos
Message 5 of 6
(2,321 Views)